open-code-review/internal/session
kite 77e73e53f8 feat(agent): add LLM-driven file grouping for multi-file co-review
Group functionally related files (e.g., impl + test, handler + model) into
a single review context using an LLM clustering step. This improves review
quality by giving the model cross-file awareness within related changes.

Key changes:
- Add file grouping agent with threshold-based decisions and recursive splitting
- Refactor dispatchSubtasks/executeSubtask to operate on DiffGroup instead of
  individual diffs, supporting combined multi-file diffs with FILE separators
- Add path validation in code_comment tool for multi-file groups
- Add StripDiffHeaders to reduce token usage in prompts
- Add extractJSONArray fallback for filter response parsing robustness
- Persist file group metadata to JSONL and render groups in viewer UI
- Merge intermediate tool-only agent rounds in viewer for cleaner display
- Update prompt templates: remove {{current_file_path}}, use <pending_review_diff>
2026-06-20 21:31:14 +08:00
..
history.go feat(agent): add LLM-driven file grouping for multi-file co-review 2026-06-20 21:31:14 +08:00
persist.go feat(agent): add LLM-driven file grouping for multi-file co-review 2026-06-20 21:31:14 +08:00
persist_test.go feat(agent): add LLM-driven file grouping for multi-file co-review 2026-06-20 21:31:14 +08:00