Skip to content

[FEATURE]: Let GUI plugins add per-message actions and reveal a message in the timeline #61385

Open

Description

@zhejingxu

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

GUI plugins can add commands, panels, slots and composer pills, but nothing on an individual message. The action row under a user message or an assistant response (copy, revert, fork) is fixed, and a plugin can't scroll the timeline to a given message.

That is what blocks #55195 (pin messages) from being a plugin, as the bot noted there. I built pinning in my fork: a pin button on the user message and on the response, plus a panel that lists pinned turns and jumps back to them. The panel itself would fit the current plugin API, but the button and the jump need a patch to session-ui and app, which I have to rebase on every release.

Proposal:

ctx.add(MessageAction, {
  id: "pin",
  on: ["user", "assistant"],
  icon: (input) => (pinned(input.messageID) ? "pin-active" : "pin"),
  title: () => ctx.t("pin"),
  pressed: (input) => pinned(input.messageID),
  run: (input) => toggle(input.sessionID, input.messageID),
})

ctx.sessions.reveal({ sessionID, messageID })

with { sessionID, messageID, role } as the action input. A per-session store (already available through stores) covers the rest.

Patch for reference: https://github.com/zhejingxu/opencode-plugins/blob/main/patches/0002-feat-app-pin-Q-A-turns-to-a-left-side-panel.patch

Activity

  1. opencodejr commented on Nov 3, 2026

    @opencodejr

    Thanks for the clear proposal and the reference patch, @zhejingxu!

    You're asking for two additions to the GUI plugin API: a MessageAction registry, so plugins can add their own buttons to the action row under user messages and assistant responses, and a ctx.sessions.reveal({ sessionID, messageID }) call that scrolls the timeline to a given message. Together they would let features like pinning ship as plugins instead of patches to session-ui and app.

    I checked the current plugin API, and it has neither of these. Plugins can't add anything to a message's action row, and Sessions, MountedSession and Layout have no way to jump to a message. So this can't be done as a plugin yet. Maintainers will consider it.

    Related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions