|
20 | 20 |
|
21 | 21 | st.set_page_config(page_title="Omen Strategic Reasoning", layout="wide") |
22 | 22 | WORKSPACE_ROOT = Path(__file__).resolve().parents[2] |
| 23 | +DEMO_ROOT = WORKSPACE_ROOT / "demo" |
| 24 | +DEMO_DATA_ROOT = DEMO_ROOT / "data" / "scenarios" |
| 25 | +DEMO_OUTPUT_ROOT = DEMO_ROOT / "output" |
| 26 | +DEMO_ACTOR_ROOT = DEMO_ROOT / "data" / "actors" |
23 | 27 |
|
24 | 28 |
|
25 | 29 | def _normalize_pack_id(value: Any) -> str: |
@@ -63,8 +67,8 @@ def _read_json_file(*, base_dir: Path, pack_id: str, filename: str) -> dict[str, |
63 | 67 |
|
64 | 68 | def _load_sample_actor_payloads(pack_id: str) -> dict[str, Any]: |
65 | 69 | safe_pack_id = _normalize_pack_id(pack_id) |
66 | | - actor_dir = Path("demo/data/actors") / safe_pack_id |
67 | | - actor_base = Path("demo/data/actors") |
| 70 | + actor_dir = DEMO_ACTOR_ROOT / safe_pack_id |
| 71 | + actor_base = DEMO_ACTOR_ROOT |
68 | 72 | actor_profile_path = actor_dir / "actor_ontology.json" |
69 | 73 | persona_path = actor_dir / "analyze_persona.json" |
70 | 74 | status_path = actor_dir / "analyze_status.json" |
@@ -586,10 +590,10 @@ def _render_flow_fallback(payloads: dict[str, Any]) -> None: |
586 | 590 | with st.sidebar: |
587 | 591 | st.header("Sample Data Source") |
588 | 592 | st.warning("Demo mode: this app reads bundled demo artifacts only.") |
589 | | - DATA_ROOT = "demo/data/scenarios" |
590 | | - OUTPUT_ROOT = "demo/output" |
591 | | - st.caption(f"Data root: {DATA_ROOT}") |
592 | | - st.caption(f"Output root: {OUTPUT_ROOT}") |
| 593 | + DATA_ROOT = str(DEMO_DATA_ROOT) |
| 594 | + OUTPUT_ROOT = str(DEMO_OUTPUT_ROOT) |
| 595 | + st.caption(f"Data root: {DEMO_DATA_ROOT.relative_to(WORKSPACE_ROOT)}") |
| 596 | + st.caption(f"Output root: {DEMO_OUTPUT_ROOT.relative_to(WORKSPACE_ROOT)}") |
593 | 597 |
|
594 | 598 | candidates = discover_spec8_pack_candidates(data_root=DATA_ROOT, output_root=OUTPUT_ROOT) |
595 | 599 | selected_pack = st.selectbox("Pack ID", options=candidates or [""], index=0) |
|
0 commit comments