legco_ai_assistant/frontend/src
Woody 3b868a0133 feat(prompts): integrate filter_per_subq with PromptService, fix seed bugs, restructure UI
Break the hardcoded per-sub-q filter prompt into 3 editable PromptService templates (filter_intro, filter_section, filter_outro) with placeholders for the for-loop iteration pattern. Refactor RelevanceFilter._build_per_subq_prompt() to compose them at runtime, falling back to built-in defaults when PromptService is unavailable.

Fix two latent bugs from Package 4:
- generate_per_subq was called by rag.py but never added to _VALID_STEPS or DB seed (would ValueError at runtime)
- _SEED_GENERATE placeholder mismatch: flat generate_response() expects {question}/{context} but Package 4 changed it to {context_sections}. Restored flat template; generate_per_subq now holds {context_sections}.

Add database backfill migration in seed_default_profiles() to INSERT OR IGNORE missing steps into existing profile rows, ensuring all 7 steps exist on restart.

Restructure System Prompts UI: remove unused flat filter/generate steps, replace with Step 2.1-2.3 (filter_intro/section/outro) and Step 3 (generate_per_subq). Update PlaceholderDocs with {context_sections}, {subq_idx}, {subq_question}.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 11:14:27 +08:00
..
components feat(prompts): integrate filter_per_subq with PromptService, fix seed bugs, restructure UI 2026-04-27 11:14:27 +08:00
lib feat(frontend): add per-sub-question types and stream state management 2026-04-26 23:29:38 +08:00
pages feat(frontend): redesign ResponsePanel for per-sub-question sections with grouped sources 2026-04-26 23:29:51 +08:00
test feat(prompts): integrate filter_per_subq with PromptService, fix seed bugs, restructure UI 2026-04-27 11:14:27 +08:00
types feat(frontend): add per-sub-question types and stream state management 2026-04-26 23:29:38 +08:00
utils feat(frontend): redesign ResponsePanel for per-sub-question sections with grouped sources 2026-04-26 23:29:51 +08:00
App.tsx feat(frontend): Phase 3.6 — History page with timing bars, expandable cards, and pagination 2026-04-26 13:19:52 +08:00
main.tsx feat(frontend): Phase 1.1 grid layout with Phase 2 pre-allocation and tests 2026-04-23 10:58:03 +08:00
styles.css feat(frontend): Phase 1.1 project scaffold with Vite, Tailwind, and API client 2026-04-23 10:57:20 +08:00