Skip to content

feat: open a clip from a message marker - #20

Merged
nabheet merged 1 commit into
mainfrom
feat/marker
Nov 21, 2026
Merged

nabheet merged 1 commit into
mainfrom
feat/marker

Conversation

@nabheet

@nabheet nabheet commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Trigger without a shell

0.1.11 made the plugin send the open request through its own RPC. This adds a way for a message to ask for it, with no CLI, curl or subprocess anywhere:

media-panel: /home/user/clips/demo.mp4

A finished message containing that line opens the clip:

assistant text ends
  → plugin's session.text.ended handler (client-side, already subscribed)
  → open() → client.rpc(Media).open() → server emits → local render

An agent writes the marker in a reply; the plugin does the rest.

Fix found while testing

Session events carry their payload under data. The first version read event.text and silently did nothing; the handler now reads event.data.text.

Verification

Isolated instance, marker produced by a model reply: panel opened at 13/48, and the trace showed match → open → rpc open → show (show from the server event, so the round trip succeeded). Instrumentation removed; npm run check green.

A finished message containing `media-panel: /path` now opens that clip. The
plugin subscribes to session.text.ended through the client it already holds, so
the request originates inside the TUI process and takes the same RPC path as
/media: client call, server event, local render. No shell, no CLI.

Fixes the documented payload shape (events carry `data`) and records both paths
in the README.
@github-actions

Copy link
Copy Markdown

Beta prerelease published: 0.1.0-beta.49. Install with npm i opencode-media-panel@beta.

@nabheet
nabheet merged commit 5dd71a8 into main Nov 21, 2026
3 checks passed
@nabheet
nabheet deleted the feat/marker branch November 21, 2026 00:18
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