mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 03:01:56 +00:00
Use CompactionResult type for hook compaction return value
- Import CompactionResult in hooks/types.ts - Replace inline type with CompactionResult for SessionEventResult.compaction - Add labels feature to changelog
This commit is contained in:
parent
9e68a59fed
commit
e841942377
3 changed files with 28 additions and 7 deletions
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import type { AppMessage, Attachment } from "@mariozechner/pi-agent-core";
|
||||
import type { ImageContent, Model, TextContent, ToolResultMessage } from "@mariozechner/pi-ai";
|
||||
import type { CutPointResult } from "../compaction.js";
|
||||
import type { CompactionResult, CutPointResult } from "../compaction.js";
|
||||
import type { CompactionEntry, SessionEntry } from "../session-manager.js";
|
||||
import type {
|
||||
BashToolDetails,
|
||||
|
|
@ -354,11 +354,7 @@ export interface SessionEventResult {
|
|||
/** If true (for before_branch only), skip restoring conversation to branch point while still creating the branched session file */
|
||||
skipConversationRestore?: boolean;
|
||||
/** Custom compaction result (for before_compact event) - SessionManager adds id/parentId */
|
||||
compaction?: {
|
||||
summary: string;
|
||||
firstKeptEntryId: string;
|
||||
tokensBefore: number;
|
||||
};
|
||||
compaction?: CompactionResult;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue