Add the Enhance Prompt feature to the VS Code extension, matching the
legacy extension's behaviour. A ✨ sparkle button in the chat input
toolbar rewrites the user's draft prompt using an LLM.
CLI:
- POST /enhance-prompt endpoint using LLM.stream with small model
- System prompt as agent.prompt for caching; user text as user message
- clean() strips code fences and surrounding quotes from LLM output
Extension:
- KiloProvider handler using SDK client.enhancePrompt.enhance()
- Shows VS Code error notification on failure
- WandSparkles icon from lucide-solid via @kilocode/kilo-ui
- Spin animation while enhancement is in flight
- Empty-input click shows feature description (all 16 i18n locales)
- Ctrl+Z / ⌘Z undo restores original draft
- Guard checks isBusy/isDisabled/enhancing matching canEnhance()
Tests:
- 11 unit tests for clean() in enhance-prompt.test.ts
Migration plan:
- Removed feature row (parity achieved)
- Deleted prompt-improvement.md spec doc
The KiloProvider session refresh tests failed intermittently because
two test files each called mock.module('vscode', ...) with different
mock shapes. Since Bun's mock.module is global and tests run
concurrently, the module resolution could non-deterministically pick
up the wrong mock depending on execution order.
Fix: move the vscode mock to a shared preload file loaded via
bunfig.toml [test].preload. This ensures a single comprehensive mock
is registered once before any test file loads, eliminating the race.
* feat: add apply-to-local button in Agent Manager
* fix: address PR review - path traversal guard, safer regex, stdin null check
- Reject selectedFiles with absolute paths or .. components
- Narrow conflict regex to known git error patterns (avoids Windows colon misparse)
- Fail early if child.stdin is null instead of silently dropping patch data
* fix: address PR review round 2
- Add ApplyDialog.tsx to CSS consistency test TSX_FILES
- Clear applyTarget when worktree is deleted (avoids stale dialog)
- Add integration tests for checkApplyPatch and applyPatch
* fix: add missing vscode.Uri mock in KiloProvider session refresh test
The mock was missing the Uri namespace, causing TypeError on CI where
Bun resolves the type annotation at runtime. Locally it worked because
the constructor param was cast via 'as never'.
* fix: harden KiloProvider test mock with full Uri class and Disposable
The previous fix only added static methods to Uri. CI Bun resolves
vscode.Uri as a runtime class reference in the constructor parameter
type position. Provide a proper MockUri class, Disposable, and
EventEmitter stubs so the mock satisfies all runtime lookups.