2026-06-30 15:40:29 +05:30
|
|
|
{
|
2026-06-30 16:15:10 +05:30
|
|
|
// Tasks that auto-run when a worktree folder is opened (runOptions.runOn:
|
|
|
|
|
// folderOpen). First time, VS Code asks to "Allow Automatic Tasks in Folder"
|
|
|
|
|
// (or set task.allowAutomaticTasks: "on" in User settings to skip the prompt).
|
|
|
|
|
// - "Assign worktree port" : fast; sets UVICORN_PORT + UI BACKEND_URLs
|
|
|
|
|
// - "Set up worktree environment" : heavy first time (submodule + venv +
|
|
|
|
|
// deps), instant skip after — run-once via
|
|
|
|
|
// venv/.worktree-setup-complete. Follow it:
|
|
|
|
|
// tail -f logs/setup-worktree.log
|
2026-06-30 15:40:29 +05:30
|
|
|
"version": "2.0.0",
|
|
|
|
|
"tasks": [
|
|
|
|
|
{
|
|
|
|
|
"label": "Assign worktree port",
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"command": "${workspaceFolder}/scripts/worktree-assign-port.sh",
|
|
|
|
|
"presentation": {
|
|
|
|
|
"reveal": "silent",
|
|
|
|
|
"panel": "shared",
|
|
|
|
|
"close": true
|
|
|
|
|
},
|
|
|
|
|
"runOptions": {
|
|
|
|
|
"runOn": "folderOpen"
|
|
|
|
|
},
|
|
|
|
|
"problemMatcher": []
|
2026-06-30 15:59:18 +05:30
|
|
|
},
|
|
|
|
|
{
|
2026-06-30 16:15:10 +05:30
|
|
|
"label": "Set up worktree environment",
|
|
|
|
|
"type": "shell",
|
|
|
|
|
"command": "${workspaceFolder}/scripts/setup-worktree.sh",
|
|
|
|
|
"args": ["--if-needed"],
|
|
|
|
|
"presentation": {
|
|
|
|
|
"reveal": "silent",
|
|
|
|
|
"panel": "dedicated"
|
|
|
|
|
},
|
|
|
|
|
"runOptions": {
|
|
|
|
|
"runOn": "folderOpen"
|
|
|
|
|
},
|
|
|
|
|
"problemMatcher": []
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// Manual: force a full re-provision, ignoring the run-once sentinel.
|
|
|
|
|
// Run via: Tasks: Run Task -> "Re-setup worktree (force)".
|
|
|
|
|
"label": "Re-setup worktree (force)",
|
2026-06-30 15:59:18 +05:30
|
|
|
"type": "shell",
|
|
|
|
|
"command": "${workspaceFolder}/scripts/setup-worktree.sh",
|
|
|
|
|
"presentation": {
|
|
|
|
|
"reveal": "always",
|
|
|
|
|
"panel": "dedicated"
|
|
|
|
|
},
|
|
|
|
|
"problemMatcher": []
|
2026-06-30 15:40:29 +05:30
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|