Skip to content

Fix ExtensionUIContext.setEditorComponent in interactive mode#909

Open
ckumar1 wants to merge 1 commit intocan1357:mainfrom
quickserve-ai:fix/pi-vim-editor-component-hook
Open

Fix ExtensionUIContext.setEditorComponent in interactive mode#909
ckumar1 wants to merge 1 commit intocan1357:mainfrom
quickserve-ai:fix/pi-vim-editor-component-hook

Conversation

@ckumar1
Copy link
Copy Markdown
Contributor

@ckumar1 ckumar1 commented May 1, 2026

Summary

  • wire ExtensionUIContext.setEditorComponent to interactive mode instead of no-op
  • add InteractiveMode.setEditorComponent(...) to safely replace the prompt editor
  • rebind input handlers/autocomplete after editor swap and preserve current draft text
  • add regression tests for replacement and guard behavior

Root cause

pi-vim relies on session_start -> ctx.ui.setEditorComponent(...), but interactive mode's ExtensionUiController provided setEditorComponent: () => {}. The plugin loaded successfully, but editor replacement never occurred, so vim NORMAL/INSERT mode never activated.

Verification

  • bun test packages/coding-agent/test/interactive-mode-editor-component.test.ts
  • bun run check:types (from packages/coding-agent)
  • bun x biome check packages/coding-agent/src/modes/types.ts packages/coding-agent/src/modes/interactive-mode.ts packages/coding-agent/src/modes/controllers/extension-ui-controller.ts packages/coding-agent/test/interactive-mode-editor-component.test.ts

@ckumar1 ckumar1 force-pushed the fix/pi-vim-editor-component-hook branch from e5a79b7 to dabf03b Compare May 2, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant