Commit Graph

11 Commits

Author SHA1 Message Date
Marius 79d2567e6c fix(cli): hide commit-message git windows on Windows (#7692)
Prevent cmd.exe flashes when commit message generation shells out to git on Windows and add a regression test for the subprocess flags.
2026-03-26 13:59:04 +01:00
kilo-code-bot[bot] c87457ba5a fix(cli,vscode): consume stream explicitly to prevent commit message infinite loading (#7434)
* fix(cli,vscode): prevent infinite loading in commit message generation

Add timeout-based AbortController to both server-side LLM stream (30s)
and client-side HTTP request (35s) so the SCM progress spinner cannot
hang indefinitely. Make the VS Code progress indicator cancellable so
users can abort manually. Also fix outdated test mocks that referenced
the removed getHttpClient API instead of the current SDK getClient.

* fix(cli,vscode): consume stream explicitly to prevent infinite loading

Replace `await stream.text` with `for await (chunk of stream.textStream)`
so that stream-level errors surface immediately instead of leaving the
promise hanging indefinitely. With some providers and Vercel AI SDK
versions, the `.text` promise never resolves when the underlying stream
errors out early, causing the spinner to load forever (fixes #7345).

Add a catch block that distinguishes timeout aborts from other errors
and re-throws with a human-readable message (partially addresses #6568).

In the VS Code extension, log the actual error in the getClient catch
block instead of silently discarding it.

---------

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
2026-03-24 12:25:17 +01:00
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