mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 06:21:50 +01:00
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()
This commit is contained in:
29
.github/hooks/hooks.json
vendored
Normal file
29
.github/hooks/hooks.json
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user