mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
Store file lists in BranchSummaryEntry.details for cumulative tracking
- BranchSummaryResult now returns readFiles and modifiedFiles separately
- BranchSummaryDetails type for details: { readFiles, modifiedFiles }
- branchWithSummary accepts optional details parameter
- Collect files from existing branch_summary.details when preparing entries
- Files accumulate across nested branch summaries
This commit is contained in:
parent
04f2fcf004
commit
4ef3325cec
4 changed files with 111 additions and 95 deletions
|
|
@ -872,7 +872,7 @@ export class SessionManager {
|
|||
* Same as branch(), but also appends a branch_summary entry that captures
|
||||
* context from the abandoned conversation path.
|
||||
*/
|
||||
branchWithSummary(branchFromId: string | null, summary: string): string {
|
||||
branchWithSummary(branchFromId: string | null, summary: string, details?: unknown): string {
|
||||
if (branchFromId !== null && !this.byId.has(branchFromId)) {
|
||||
throw new Error(`Entry ${branchFromId} not found`);
|
||||
}
|
||||
|
|
@ -884,6 +884,7 @@ export class SessionManager {
|
|||
timestamp: new Date().toISOString(),
|
||||
fromId: branchFromId ?? "root",
|
||||
summary,
|
||||
details,
|
||||
};
|
||||
this._appendEntry(entry);
|
||||
return entry.id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue