Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

feat(vscode): Wire up OpenCode chat UI in webview (1)#139

Closed
markijbema wants to merge 6 commits intomark/copy-files-from-appfrom
mark/add-chat-to-vscode-extension
Closed

feat(vscode): Wire up OpenCode chat UI in webview (1)#139
markijbema wants to merge 6 commits intomark/copy-files-from-appfrom
mark/add-chat-to-vscode-extension

Conversation

@markijbema
Copy link
Copy Markdown
Contributor

Context

Implementation

Screenshots

before after

How to Test

Get in Touch

@markijbema markijbema changed the title feat: add CLI backend integration for server communication WIP add chat to vscode extension Feb 5, 2026
@markijbema markijbema force-pushed the mark/add-chat-to-vscode-extension branch 3 times, most recently from 13d5fef to 990f48a Compare February 5, 2026 16:40
@markijbema markijbema changed the base branch from dev to mark/copy-files-from-app February 5, 2026 16:41
@markijbema markijbema changed the title WIP add chat to vscode extension feat(vscode): Wire up OpenCode chat UI in webview (1) Feb 9, 2026
@markijbema markijbema force-pushed the mark/copy-files-from-app branch from 7b228c0 to cc14ca0 Compare February 9, 2026 09:00
- Add message protocol for webview <-> extension communication (src/shared/protocol.ts)
- Implement webview transport layer with request/response semantics (webview-ui/src/lib/transport.ts)
- Create chat-store.ts for Solid.js state management
- Add ChatView component with message display and prompt input
- Implement ChatController in extension host to handle chat messages
- Wire up KiloProvider to route messages to ChatController
- Add VS Code platform adapter for webview environment
- Configure @/ path alias for opencode-app imports
- Add CSS styles for chat UI using VS Code theme variables
- Document architecture in NOTES.md

The chat UI is functional with simulated responses.
Next steps: connect to actual OpenCode backend.
- Update ChatController to use HttpClient and SSEClient from CLI backend services
- Add setBackendClients() method to inject backend clients from KiloProvider
- Handle SSE events for streaming responses (message.updated, message.part.updated, session.status)
- Implement proper session management via backend API (create, load, list)
- Send prompts to backend and stream responses back to webview
- Handle abort requests via backend API
- Convert between backend types and protocol types
- Update KiloProvider to pass backend clients to ChatController
- Update NOTES.md with backend connection documentation
- ChatController: detect local_session_* placeholder IDs and create real
  backend session before sending messages
- HttpClient: handle empty 200/204 responses gracefully (sendMessage returns
  void, actual data comes via SSE)
- Add request/response logging for debugging HTTP calls
- Add messageID field to SSE event type in types.ts
- Fix messageID extraction and SSE event forwarding in ChatController
- Add onSessionCreated method to transport.ts
- Fix session ID mismatch with automatic migration in chat-store.ts
@markijbema markijbema force-pushed the mark/add-chat-to-vscode-extension branch from 47971ac to c04b149 Compare February 9, 2026 09:01
@markijbema markijbema closed this Feb 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant