mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 07:04:25 +00:00
Fix tests for sessionManager/modelRegistry on context
- compaction-hooks-example.test.ts: get sessionManager/modelRegistry from ctx - compaction-hooks.test.ts: - Pass sessionManager/modelRegistry to HookRunner constructor - Remove setSessionFile call - Update tests to use session.sessionManager instead of event.sessionManager
This commit is contained in:
parent
29fec7848e
commit
5fee9005b7
4 changed files with 18 additions and 11 deletions
|
|
@ -298,7 +298,8 @@ export async function loadCustomTools(
|
|||
// Shared API object - all tools get the same instance
|
||||
const sharedApi: ToolAPI = {
|
||||
cwd,
|
||||
exec: (command: string, args: string[], options?: ExecOptions) => execCommand(command, args, cwd, options),
|
||||
exec: (command: string, args: string[], options?: ExecOptions) =>
|
||||
execCommand(command, args, options?.cwd ?? cwd, options),
|
||||
ui: createNoOpUIContext(),
|
||||
hasUI: false,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ export interface ExecOptions {
|
|||
signal?: AbortSignal;
|
||||
/** Timeout in milliseconds */
|
||||
timeout?: number;
|
||||
/** Working directory */
|
||||
cwd?: string;
|
||||
}
|
||||
|
||||
/** API passed to custom tool factory (stable across session changes) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue