Back to Kilocode

Feature Parity Plan — Kilo Code VS Code Extension (Rebuild)

packages/kilo-vscode/docs/opencode-migration-plan.md

7.2.4015.5 KB
Original Source

Feature Parity Plan — Kilo Code VS Code Extension (Rebuild)

Overview

This extension is a ground-up rebuild of the old Kilo Code extension using Kilo CLI as the backend. Rather than migrating the old extension's codebase, we started fresh with a Solid.js webview, a CLI server manager, and a message-based protocol between extension host and webview. This new extension lives in the kilocode monorepo.

This document tracks remaining work needed for feature parity with the old extension. Each feature links to its detailed parity requirement doc. Features sourced from the GitHub project board include issue links.


Chat UI Feature Parity

FeatureRemaining WorkBackendPriority
Browser Session ControlsIn-chat browser controls, action replay, screenshot viewingCLI-side (if browser tool exists) + webviewP3
Checkpoint & Task ManagementCheckpoint restore UI, navigation, diff viewing, "See New Changes" buttonsCLI session undo/redo/fork + extension git integrationP1
Mermaid Diagram FeaturesMermaid rendering, "Fix with AI" button, copy, open-as-PNGWebview-only (rendering); CLI for "Fix with AI"P2
Message Editing & ManagementInline editing, deletion, timestamp display, redo-previous-message (up-arrow)CLI session fork/undo for edit semanticsP1
Special Content TypesCopy button on error cards, dedicated MCP tool/resource rows, open-markdown-preview buttonMixed: CLI for MCP data; webview for renderingP1

Non-Agent Feature Parity

FeatureRemaining WorkBackendPriority
Authentication & EnterpriseOrg feature flags, MDM policy enforcementCLI handles its auth; extension handles org/MDMP1
Auto-PurgeScheduled cleanup of old session/task storageExtension-side (storage ownership TBD)P3
Cloud Task SupportUpload local sessions to cloud, real-time sync, conflict resolutionKilo cloud API + CLI; extension provides UIP2
Code ReviewsLocal review mode, automated AI review of uncommitted/branch changesCLI (partial); extension for VS Code review UXP2
Codebase Indexing & Semantic SearchVector indexing, semantic search, embeddings infrastructureCLI has grep/glob endpoints; semantic indexing is extension or cloudP2
Contribution TrackingAI attribution tracking, line fingerprinting, reportingExtension-sideP3
Custom CommandsSlash command system, project-level command discovery, YAML frontmatter supportCLI has custom commands; extension provides UI entry pointsP2
MarketplaceCatalog, install, update capabilities (toolbar button exists but renders a stub)Extension-sideP2
MCP & MCP HubMCP configuration UI (add/edit/delete servers), tool allowlistingCLI owns MCP lifecycle; extension provides config UIP1
Repository Initialization/init command support for setting up agentic engineeringCLI /init endpoint; extension provides UI triggerP3
Rules & WorkflowsWorkflow management UI (rules subtab exists, workflows subtab is a stub)CLI owns rules runtime; extension provides management UIP3
Settings SyncVS Code Settings Sync allowlist registrationExtension-side (VS Code API)P3
Settings UITerminal and Prompts tabs (show "Not implemented"), Workflows subtab stubCLI exposes config; extension provides settings formsP1
Skills SystemSkill execution, discovery, hot-reload (config UI for paths/URLs exists)CLI has skills runtime; extension provides packaging/UIP2
Speech-to-TextVoice input, streaming STTWebview (mic capture); CLI-compatible STT optionalP3

Agent Behaviour Tab Parity

The "Agent Behaviour" settings tab contains 5 sub-tabs in both the legacy and new extensions. The legacy tab was a combined 2800+ lines of UI; the new tab is ~820 lines. Each sub-tab has its own parity doc.

Sub-TabRemaining WorkPriority
Modes / AgentsCore CRUD done (PR #7225). Remaining: when-to-use, system prompt preview, import/export, default variant, hidden/disable, org featuresP2
MCP ServersAdd/edit servers, restart, per-server timeout, expandable detail (tools/resources/logs/auth)P2
Rules & WorkflowsRules: description text, global/workspace separation, per-rule toggles, new file creation, auto-discovery. Workflows: entire sub-tab is a stubP2/P3
SkillsMinor gaps: project/global separation, mode badge per skill. Covered by Skills SystemP2

Project Board Issues

Open issues from the GitHub project board not covered by the feature docs above. Each item has its own detailed doc.

UI Polish & Bugs

FeatureRemaining WorkPriority
Markdown Rendering ImprovementsAdd CSS for heading sizes, weights, spacing so headings look different from body textP1
Approval Box Missing Full PathAlways show full absolute path for out-of-workspace permission requestsP1
Profile View Missing Back ButtonAdd back button to Profile view header matching Settings view patternP2
Chat Input Overflow on Narrow SidebarMake chat input toolbar wrap when sidebar is too narrowP2

Features

FeatureRemaining WorkPriority
File AttachmentsAdd non-image file attachment via button, drag-and-drop, or file pickerP2
Task Completion NotificationVS Code toast when task completes or awaits input while panel is hiddenP2
Remember Last Model ChoicePersist last-used model and pre-select it for new sessionsP2
Expandable MCP ToolsMake MCP tool rows expandable to show inputs/outputs like regular toolsP2
Session Preview ImprovementsEvaluate showing first message snippet or improving title generationP2

Error Handling & Reliability

FeatureRemaining WorkPriority
Pre-Release Switch CPU SpikeFix race condition / process conflict when switching release ↔ pre-releaseP0
Extension View Doesn't Refresh on UpdateForce webview reload when extension version changesP1
Propagate CLI Errors to UISurface CLI stderr errors in chat or as VS Code notificationsP1
CLI Startup ErrorsDetect CLI process exit before connection; show error with details and retryP1
Autocomplete Settings Link BrokenFix "settings" link in autocomplete broken notice; fix missing default modelP1

Infrastructure / Refactoring

FeatureRemaining WorkPriority
Show Changelog on UpdateDetect version change on activation and offer "What's New" notificationP3
Publish to OpenVSXAdd ovsx publish step to CI/CD pipeline after VS Code Marketplace publishP3
HTTP Request TimeoutsAdd timeouts to SDK calls (only health check has timeout currently)P1
VSCode Error NotificationsError notifications for CLI start failure, SSE disconnectP1
Dedicated Output ChannelGeneral "Kilo Code" output channel and centralized logging utilityP2

CLI-Side (tracked here for awareness)

FeatureRemaining WorkPriority
/init Pre-Commit Secret CheckCheck for secret scanning hooks in /init; suggest adding one if missingP2
Plan Mode Over-PromptingFix Plan mode system prompt so agent stops repeatedly asking to implementP1
Architect Mode / Plan FilesExport plan as .md to /plans/ directory from Plan modeP2

Pre-Production Checklist

Before publishing this extension to the VS Code Marketplace or deploying to users, verify every item below.

Security

  • Review and tighten CSP — The current policy in KiloProvider._getHtmlForWebview() has several areas to audit:
    • style-src 'unsafe-inline' is broadly permissive — investigate whether nonce-based style loading is feasible now that kilo-ui styles are bundled
    • connect-src http://127.0.0.1:* http://localhost:* allows connections to any localhost port — tighten to the actual CLI server port once known at runtime
    • img-src … https: allows images from any HTTPS origin — scope to ${webview.cspSource} data: unless external images are explicitly needed
    • 'wasm-unsafe-eval' in script-src was added for shiki — confirm it is still required and document the reason
    • ws:// connections to any localhost port — same concern as connect-src
  • Validate openExternal URLs — The openExternal handler passes any URL from the webview directly to vscode.env.openExternal() with no allowlist or scheme check. Restrict to https: (and possibly vscode:) schemes, or allowlist specific hosts
  • Audit credential storage — CLI stores credentials as plaintext JSON with chmod 0600. Evaluate whether VS Code's SecretStorage API should be used for extension-side secrets, and document the threat model for CLI-managed credentials
  • Audit workspace path containment — CLI's path traversal checks are lexical only; symlinks and Windows cross-drive paths can escape the workspace boundary. Determine if additional hardening (realpath canonicalization) is needed before production

Reliability

  • VS Code error notifications — Critical errors (CLI missing, server crash, connection lost) need VS Code-native notifications (details). Users get no feedback if the webview is hidden
  • HTTP request timeouts — SDK calls need configurable timeouts (details)

Testing

  • Test coverage — Only one test file exists (extension.test.ts). Add integration tests for: server lifecycle, SSE event routing, message send/receive, permission flow, session management
  • Multi-theme visual check — Verify the webview renders correctly in at least one light theme, one dark theme, and one high-contrast theme
  • Multi-platform smoke test — Test on macOS, Windows, and Linux. Particularly: CLI binary provisioning, path handling, chmod-based credential protection on Windows

Packaging & Marketplace

  • Bundle size audit — With kilo-ui and its transitive dependencies (shiki, marked, katex, dompurify, etc.) now bundled, measure dist/webview.js size and verify the total .vsix package size is acceptable
  • .vscodeignore review — Ensure only necessary files are included in the package (no docs/, src/, test artifacts, or development scripts)
  • Marketplace metadata — Verify README.md, CHANGELOG.md, publisher name, extension icon, and package.json fields (displayName, description, categories, keywords, repository) are production-ready
  • activationEvents review — Confirm the extension only activates when needed (not *), to avoid impacting VS Code startup time
  • Minimum VS Code version — Verify engines.vscode in package.json matches the minimum API features actually used

Logging & Observability

  • Dedicated output channel — All logging currently goes to console.log mixed with other extensions (details). Create a dedicated "Kilo Code" output channel before production
  • Remove or guard verbose logging — Many console.log calls with emojis and debug detail exist in KiloProvider.ts. Gate behind a debug flag or move to the output channel at appropriate log levels

Implementation Notes

Architecture

  • Solid.js (not React) powers the webview. JSX compiles via esbuild-plugin-solid. All webview components use Solid's reactive primitives (signals, createEffect, etc.).
  • Two separate esbuild builds: extension (Node/CJS) and webview (browser/IIFE), configured in esbuild.js.
  • No shared state between extension and webview. All communication is via vscode.Webview.postMessage() with typed messages defined in messages.ts. Provider hierarchy: ThemeProvider → DialogProvider → VSCodeProvider → ServerProvider → LanguageBridge → MarkedProvider → ProviderProvider → SessionProvider → DataBridge.
  • CLI backend owns: agent orchestration, MCP lifecycle, tool execution, search/grep/glob, session storage, permissions runtime, custom commands, skills, and fast edits.
  • Extension owns: VS Code API integrations (code actions, inline completions, terminal, SCM, settings sync), webview rendering, auth mediation, and any feature not supported by CLI.

kilo-ui Shared Library

  • kilo-ui shared library: The webview now heavily uses @kilocode/kilo-ui for UI components. A DataBridge component in App.tsx adapts the session store to kilo-ui's DataProvider expected shape, enabling shared components like <KiloMessage> to work with the extension's data model.

Key Differences from Old Extension

  • No Task.ts or webviewMessageHandler.ts — the CLI server replaces the old in-process agent loop.
  • Permissions flow through CLI's ask/reply model, not extension-side approval queues. Permissions are rendered through kilo-ui's DataProvider pattern, not a standalone PermissionDialog.
  • Session history is CLI-managed, not stored in VS Code global state.
  • MCP servers are configured and managed by the CLI, not the extension.