Add fromHook field to CompactionEntry and BranchSummaryEntry

- fromHook: true = hook generated, skip file extraction
- fromHook: undefined/false = pi generated, extract files (backward compatible)
- branchWithSummary now accepts fromHook parameter
- File extraction only runs for !entry.fromHook entries
This commit is contained in:
Mario Zechner 2025-12-29 23:14:13 +01:00
parent 0445da666c
commit f118cdc67b
3 changed files with 9 additions and 3 deletions

View file

@ -1704,7 +1704,7 @@ export class AgentSession {
let summaryEntry: BranchSummaryEntry | undefined;
if (summaryText) {
// Create summary at target position (can be null for root)
const summaryId = this.sessionManager.branchWithSummary(newLeafId, summaryText, summaryDetails);
const summaryId = this.sessionManager.branchWithSummary(newLeafId, summaryText, summaryDetails, fromHook);
summaryEntry = this.sessionManager.getEntry(summaryId) as BranchSummaryEntry;
} else if (newLeafId === null) {
// No summary, navigating to root - reset leaf