Clear activity after session and on tool failure

This commit is contained in:
Chris Wanstrath 2026-03-11 21:39:27 -07:00
parent 3631411ce2
commit fa45ea43ce
3 changed files with 5 additions and 0 deletions

View File

@ -137,5 +137,7 @@ export async function action(
await vm.claude(worktreeAbs, { prompt, print: opts.print })
}
await vm.clearActivity(worktreeAbs, branch)
if (opts.save !== false) await saveChanges(worktreeAbs, branch)
}

View File

@ -33,5 +33,7 @@ export async function action(
await vm.claude(session.worktree, { prompt, print: opts.print, continue: true })
}
await vm.clearActivity(session.worktree, branch)
if (opts.save !== false) await saveChanges(session.worktree, branch)
}

View File

@ -155,6 +155,7 @@ async function configureEnvironment(home: string, apiKey: string): Promise<void>
const hooks = {
UserPromptSubmit: [{ hooks: [{ type: "command", command: `${activityBin} active` }] }],
Stop: [{ hooks: [{ type: "command", command: `${activityBin} idle` }] }],
PostToolUseFailure: [{ hooks: [{ type: "command", command: `${activityBin} idle` }] }],
}
const settingsJson = JSON.stringify({ apiKeyHelper: "~/.claude/api-key-helper.sh", skipDangerousModePermissionPrompt: true, hooks })
const claudeJson = JSON.stringify({ hasCompletedOnboarding: true, effortCalloutDismissed: true, projects: { "/": { hasTrustDialogAccepted: true } } })