Skip to content

Feat/opencode v2 - #73

Closed
pplewa wants to merge 4 commits into
mtymek:mainfrom
pplewa:feat/opencode-v2
Closed

pplewa wants to merge 4 commits into
mtymek:mainfrom
pplewa:feat/opencode-v2

Conversation

@pplewa

@pplewa pplewa commented Oct 19, 2026

Copy link
Copy Markdown

No description provided.

pplewa and others added 4 commits May 31, 2026 13:56
- Added support for appending prompt references when dropping notes.
- Improved drag-and-drop handling to ensure only the first note is referenced when multiple notes are dragged.
- Updated CSS for better visibility of drop overlay and adjusted styles for specific view types.
- Introduced a method to retrieve the OpenCode client instance for better integration.
- Introduced FileLinkBridge to handle vault-relative file links in the OpenCode webview.
- Implemented methods for binding webview events and handling navigation and console messages.
- Added constants and utility functions for managing file link interactions.
- Enhanced OpenCodeView to integrate the new file link bridge, improving user experience when opening files.
- Created tests for file link script and path utilities to ensure functionality and reliability.
v2 changed the web UI routes, made authentication mandatory, and moved the
HTTP API under /api. The plugin spoke the v1 scheme, so the embedded view
crashed with "Unrecognised route!" and every API call returned the HTML shell.

- Build session URLs as /server/<base64url(serverUrl)>/session/<id>, the only
  session route v2 accepts. getUrl() now returns the server root, without the
  encoded project directory in the path.
- Generate a server password, pass it to opencode as OPENCODE_SERVER_PASSWORD,
  seed it into the web UI storage so the view connects without the pairing
  screen, and use HTTP Basic auth for API calls.
- Prefix API requests with /api and pass the directory in the body or query.
  The x-opencode-directory header is gone in v2.
- Replace the removed message-part endpoints with synthetic messages for
  workspace context.
- Drop the append-prompt fallback, which has no v2 equivalent. The drag-drop
  injection still works and remains the only path.
- Report a clear error when a server on the port rejects the configured
  password, and stop the process rather than leaving the view broken.
- Add a Server password setting so it can be inspected and rotated.
@pplewa pplewa closed this Oct 19, 2026
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