Commit Graph

9 Commits

Author SHA1 Message Date
Marius 4e0c912612 feat(agent-manager): add worktree setup script support (#492)
* feat(agent-manager): add worktree setup script support

Add SetupScriptService and SetupScriptRunner to manage and execute
worktree setup scripts stored at .kilocode/setup-script. Scripts run
in a VS Code terminal during worktree creation, blocking session start
until complete. Adds settings gear menu in WORKTREES section header
and overlay progress step.

* refactor(agent-manager): use kilo-ui DropdownMenu, extract setup script logic

- Replace custom dropdown with kilo-ui DropdownMenu component
- Extract buildSetupCommand into standalone testable module
- Move default template to setup-script-template.sh
- Remove chmod (unnecessary since runner uses sh explicitly)
- Remove custom am-options-* CSS (handled by kilo-ui)
- Add unit tests for buildSetupCommand (Unix + Windows)

* fix: address PR review comments

- Inline template as TS string constant (fixes ENOENT in packaged VSIX)
- Log error in catch block instead of swallowing silently
- Escape shell-special chars (", $, `, \) in Unix paths
- Add onDidCloseTerminal fallback to runViaShellIntegration
- Fix misleading 'non-blocking' comments (setup script blocks session start)
- Add tests for shell escaping (quotes, dollar signs, backticks)

* fix: remove stray non-blocking label from error log

* fix: use mock.module in git-context tests to avoid cross-file mock leakage
2026-02-20 13:13:53 +01:00
kilo-maintainer[bot] 3c8fc231d0 chore: generate 2026-02-19 15:40:27 +00:00
Mark IJbema bc27d8924b fix: address kiloconnect review comments on commit message generation
- Use trimEnd() instead of trim() in git() to preserve leading whitespace
  in porcelain output (fixes status parsing for ' M file' lines)
- Remove unused 'untracked' from FileChange status union
- Use repository.rootUri.fsPath instead of workspaceFolders[0]
- Add explicit null-check for client after try/catch
- Fix test mocks: add isActive/activate, use mockImplementation to throw,
  fix expected error message to match production code
2026-02-19 16:26:10 +01:00
Mark IJbema c071a6c77a fix: parse git rename entries correctly in git-context 2026-02-19 16:26:10 +01:00
Mark IJbema c09c77b8a6 fix: add GitContext type annotation to mock in generate.test.ts
The mockGitContext variable was declared without a type annotation,
causing TypeScript to infer a narrow type from the initial assignment
(status: "modified"). This made reassignment with status: "added"
fail with TS2322. Adding the GitContext type allows all valid status
values.
2026-02-19 16:26:10 +01:00
Mark IJbema 51329c4c65 fix: expand lock file exclusion list to 80+ patterns across 25+ ecosystems 2026-02-19 16:26:10 +01:00
Mark IJbema 158f87f548 feat: add regenerate-different-message support 2026-02-19 16:26:10 +01:00
Mark IJbema 2ecb523f99 fix: enhance commit message prompt with detailed Conventional Commits guidance 2026-02-19 16:26:10 +01:00
Mark IJbema a7cc035b0b feat: add commit message generation feature 2026-02-19 16:26:03 +01:00