Files
vscode/.github/hooks/hooks.json
Josh Spicer 28a550e634 sessions: tweaks to customizations (#298155)
* add hook for sessions selfhosting

* Fix section selection, list refresh, commit guard, hooks display, count races

- selectSectionById: inline all state updates to avoid race with onDidChangeSelection
- goBackToList: refresh list to show newly created files
- goBackToList: only auto-commit if editor content was actually modified
- Hooks: parse individual hooks from files, show hook type labels and commands
- Hooks: show (unset) for empty hook commands
- Toolbar: use MODAL_GROUP when opening editor in sessions
- Overview: use MODAL_GROUP when opening editor in sessions
- Toolbar: add _updateCountsRequestId guard to prevent stale count renders
- SessionsViewPane: subscribe to activeProjectRoot for total count updates
- List widget: add IFileService + IPathService for hook file parsing

* Fix hook parsing: use JSONC parser and async userHome

- Replace JSON.parse with parseJSONC to handle comments/trailing commas
- Use await pathService.userHome() instead of preferLocal for remote compat
- Match the pattern used in promptsServiceImpl.ts getHooks()
2026-02-26 20:42:37 -08:00

29 lines
436 B
JSON

{
"version": 1,
"hooks": {
"sessionStart": [
{
"type": "command",
"bash": "if [ -f ~/.vscode-worktree-setup ]; then nohup npm ci > /tmp/npm-ci-$(date +%Y-%m-%d_%H-%M-%S).log 2>&1 & fi"
}
],
"userPromptSubmitted": [
{
"type": "command",
"bash": ""
}
],
"preToolUse": [
{
"type": "command",
"bash": ""
}
],
"postToolUse": [
{
"type": "command",
"bash": ""
}
]
}
}