Repository navigation
Description
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
Summary
In long sessions important answers and decisions quickly scroll out of view. I would like to "pin" (bookmark) a specific message in the chat — at minimum an assistant response, and ideally also a user message or an arbitrary selected text range. A small pin (📌) affordance on the message would toggle the state, and pinned items would be listed in a compact "Pinned" area/panel so I can jump straight back to them without scrolling.
Motivation / use case
- Long threads with large answers; a key answer scrolls away while the agent keeps working.
- Keeping a shortlist of decisions / open questions visible while continuing the conversation.
- Pinning only a selected fragment of a long answer instead of the whole message.
Proposed behavior
- A pin affordance appears on message hover (or in the message action row) for both user and assistant messages.
- Clicking it toggles the pinned state; pinned messages show a persistent marker.
- A collapsible "Pinned" panel/section lists pinned messages with one-click jump to the original message in the transcript.
- Optionally, pinning a selected text range stores only that snippet.
- Pinned state is persisted per session, ideally on the shared backend so Desktop and Web behave consistently.
Scope note / related requests
This is about pinning messages or text inside a session, not pinning whole sessions to the sidebar.
- Session pinning already exists for the TUI (feat(tui): pin, quick-switch, and cycle recent sessions #26858); Desktop/Web parity is tracked in [FEATURE]: Session pinning support for Desktop/Web (shared backend) #28813.
- Older message-bookmark requests were closed: bookmarks for important message in the session #27490 ("bookmarks for important message in the session") and [FEATURE]: Add ability to (un)mark points in the thread, to use as "bookmarks" #9227 (marks in the TUI thread).
- General chat/session pinning was also raised in [FEATURE]: Chat pinning and projects #18330 (scoped to web).
This request targets the Desktop (and Web) app chat UI specifically: a pin control on individual messages / selected text.
Environment (for context)
- opencode version: 2.0.28
- Install/channel: Desktop app (BETA), latest
- App: OpenCode Desktop 2.0.28.0
- OS: Windows (win32 x64)
Activity
opencode-agent commentedon Oct 13, 2026
Thanks for the detailed request, @Nekspert! You'd like to pin individual messages (user or assistant), and ideally selected text, in the Desktop/Web chat. Pinned items would get a persistent marker and be listed in a collapsible "Pinned" panel that jumps back to them, with pins saved per session.
The Desktop app doesn't have anything like this today. It also can't be added as a plugin yet, because the app's extension API has no way to add actions to individual messages or to jump to a specific message in the timeline. Maintainers will consider it.
Related issues (none of them is open):
Nekspert commentedon Oct 13, 2026
Design proposal for this feature (pin a message / assistant answer)
I looked through the code to scope a minimal first version. Note per
CONTRIBUTING.mdthat UI features need design review before implementation, so opening this here first to agree on the shape before any PR.Target
Pin/unpin a whole message (either a user message or an assistant answer) inside a session. Pins are per session, stored client-side, and shown in a small "Pinned" list that jumps to the message. Works in both web and desktop because the chat UI is shared (
packages/session-uiconsumed bypackages/app).Deliberately out of scope for v1 (happy to extend if wanted):
Where it plugs in
packages/session-ui/src/message/message-content.tsx(user-message-copy-wrapper)text-part-copy-wrapper)packages/session-ui/src/actions.ts(SessionUserActions), provided frompackages/app/src/session/composer/region.tsx.packages/session-ui/src/components/message-nav.tsx.packages/app/src/runtime/persistence/storage.ts.packages/ui/src/i18n/en.ts; add apinicon topackages/ui/src/icons/catalog.ts.Proposed v1
opencode.pinned-messages, shape{ [sessionID]: string[] }, newest first).SessionUserActionswith optionalpin/unpin/isPinned(optional → no change for other consumers such as TUI/storybook).pin/pin-filledicon.MessageNavpresentation), reachable from the session header (with a count badge, hidden when empty); clicking an entry scrolls to the message.ui.message.pinMessage,ui.message.unpinMessage,ui.message.pinned, plus pinned-list title/empty state.Questions before I write code
pinvsbookmark?Happy to adjust the scope based on your preference.
zhejingxu commentedon Nov 3, 2026
I built a version of this in my fork. It may help answer the questions in the design proposal above:
pin/pin-activepair.Patch: https://github.com/zhejingxu/opencode-plugins/blob/main/patches/0002-feat-app-pin-Q-A-turns-to-a-left-side-panel.patch
I'd rather ship this as a GUI plugin, but it needs the extension point I asked for in #61385.