feat(aggregation): Implement tier-level aggregation strategy tied to Personas
This commit is contained in:
@@ -148,6 +148,7 @@ class AppController:
|
||||
self.project_paths: List[str] = []
|
||||
self.active_discussion: str = "main"
|
||||
self.disc_entries: List[Dict[str, Any]] = []
|
||||
self.ui_active_persona: str = ""
|
||||
self.disc_roles: List[str] = []
|
||||
self.files: List[str] = []
|
||||
self.screenshots: List[str] = []
|
||||
@@ -2550,12 +2551,16 @@ class AppController:
|
||||
models.save_config(self.config)
|
||||
track_id = self.active_track.id if self.active_track else None
|
||||
flat = project_manager.flat_config(self.project, self.active_discussion, track_id=track_id)
|
||||
full_md, path, file_items = aggregate.run(flat)
|
||||
|
||||
persona = self.personas.get(self.ui_active_persona)
|
||||
strategy = persona.aggregation_strategy if persona else "auto"
|
||||
|
||||
full_md, path, file_items = aggregate.run(flat, aggregation_strategy=strategy)
|
||||
# Build stable markdown (no history) for Gemini caching
|
||||
screenshot_base_dir = Path(flat.get("screenshots", {}).get("base_dir", "."))
|
||||
screenshots = flat.get("screenshots", {}).get("paths", [])
|
||||
summary_only = flat.get("project", {}).get("summary_only", False)
|
||||
stable_md = aggregate.build_markdown_no_history(file_items, screenshot_base_dir, screenshots, summary_only=summary_only)
|
||||
stable_md = aggregate.build_markdown_no_history(file_items, screenshot_base_dir, screenshots, summary_only=summary_only, aggregation_strategy=strategy)
|
||||
# Build discussion history text separately
|
||||
history = flat.get("discussion", {}).get("history", [])
|
||||
discussion_text = aggregate.build_discussion_text(history)
|
||||
|
||||
Reference in New Issue
Block a user