mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 15:02:32 +00:00
Remove hook execution timeouts
- Remove timeout logic from HookRunner - Remove hookTimeout from Settings interface - Remove getHookTimeout/setHookTimeout methods - Update CHANGELOG.md and hooks.md Timeouts were inconsistently applied and caused issues with legitimate slow operations (LLM calls, user prompts). Users can use Ctrl+C to abort hung hooks.
This commit is contained in:
parent
bab343b8bc
commit
88e39471ea
5 changed files with 10 additions and 63 deletions
|
|
@ -313,7 +313,6 @@ export function loadSettings(cwd?: string, agentDir?: string): Settings {
|
|||
shellPath: manager.getShellPath(),
|
||||
collapseChangelog: manager.getCollapseChangelog(),
|
||||
hooks: manager.getHookPaths(),
|
||||
hookTimeout: manager.getHookTimeout(),
|
||||
customTools: manager.getCustomToolPaths(),
|
||||
skills: manager.getSkillsSettings(),
|
||||
terminal: { showImages: manager.getShowImages() },
|
||||
|
|
@ -536,7 +535,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|||
if (options.hooks !== undefined) {
|
||||
if (options.hooks.length > 0) {
|
||||
const loadedHooks = createLoadedHooksFromDefinitions(options.hooks);
|
||||
hookRunner = new HookRunner(loadedHooks, cwd, sessionManager, modelRegistry, settingsManager.getHookTimeout());
|
||||
hookRunner = new HookRunner(loadedHooks, cwd, sessionManager, modelRegistry);
|
||||
}
|
||||
} else {
|
||||
// Discover hooks, merging with additional paths
|
||||
|
|
@ -547,7 +546,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|||
console.error(`Failed to load hook "${path}": ${error}`);
|
||||
}
|
||||
if (hooks.length > 0) {
|
||||
hookRunner = new HookRunner(hooks, cwd, sessionManager, modelRegistry, settingsManager.getHookTimeout());
|
||||
hookRunner = new HookRunner(hooks, cwd, sessionManager, modelRegistry);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue