mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 13:03:58 +00:00
Improve navigateTree API
This commit is contained in:
parent
ffdc8d686b
commit
6b6707f30c
5 changed files with 68 additions and 10 deletions
|
|
@ -57,7 +57,7 @@ export type ForkHandler = (entryId: string) => Promise<{ cancelled: boolean }>;
|
|||
|
||||
export type NavigateTreeHandler = (
|
||||
targetId: string,
|
||||
options?: { summarize?: boolean },
|
||||
options?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },
|
||||
) => Promise<{ cancelled: boolean }>;
|
||||
|
||||
export type ShutdownHandler = () => void;
|
||||
|
|
|
|||
|
|
@ -344,6 +344,12 @@ export interface TreePreparation {
|
|||
commonAncestorId: string | null;
|
||||
entriesToSummarize: SessionEntry[];
|
||||
userWantsSummary: boolean;
|
||||
/** Custom instructions for summarization */
|
||||
customInstructions?: string;
|
||||
/** If true, customInstructions replaces the default prompt instead of being appended */
|
||||
replaceInstructions?: boolean;
|
||||
/** Label to attach to the branch summary entry */
|
||||
label?: string;
|
||||
}
|
||||
|
||||
/** Fired before navigating in the session tree (can be cancelled) */
|
||||
|
|
@ -633,6 +639,12 @@ export interface SessionBeforeTreeResult {
|
|||
summary: string;
|
||||
details?: unknown;
|
||||
};
|
||||
/** Override custom instructions for summarization */
|
||||
customInstructions?: string;
|
||||
/** Override whether customInstructions replaces the default prompt */
|
||||
replaceInstructions?: boolean;
|
||||
/** Override label to attach to the branch summary entry */
|
||||
label?: string;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
|
@ -917,7 +929,10 @@ export interface ExtensionCommandContextActions {
|
|||
setup?: (sessionManager: SessionManager) => Promise<void>;
|
||||
}) => Promise<{ cancelled: boolean }>;
|
||||
fork: (entryId: string) => Promise<{ cancelled: boolean }>;
|
||||
navigateTree: (targetId: string, options?: { summarize?: boolean }) => Promise<{ cancelled: boolean }>;
|
||||
navigateTree: (
|
||||
targetId: string,
|
||||
options?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },
|
||||
) => Promise<{ cancelled: boolean }>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue