Ask a sidebar assistant about selected assistant text: choose how much of the main conversation to reuse, then stop, copy or regenerate the answer. The panel is ephemeral and never touches the main conversation.
Install
# from a prebuilt release tarball
dsh plugin --profile web add -w "https://github.com/Ruiming-cn/dsh-ask-in-sidebar/releases/download/v0.3.0/dsh-ask-in-sidebar-0.3.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Ruiming-cn/dsh-ask-in-sidebar
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
A DeepSeek Harness (DSH) web plugin that lets you select text in an assistant answer and ask questions about it in an ephemeral right-side panel, using the main conversation's existing context without modifying or reloading it.
Don't want to interrupt the main conversation just to ask one question? Select the text and keep asking in the right-hand panel — you decide how much context it reuses, and every answer can be stopped, copied or regenerated.
Features
- Select any text inside an assistant answer in the main DSH conversation.
- A floating Ask in Sidebar action appears next to the selection.
- Clicking it opens a right-side panel with:
- the quoted selected text,
- a question/composer input,
- a running discussion transcript,
- live streaming output,
- a collapsible thinking process,
- timing metadata (time to first thought, first token, total duration, and token usage when available).
- Assistant answers are rendered as safe Markdown: headings, lists, inline code, code blocks, blockquotes, links, and tables.
- While an answer streams, Stop aborts it and keeps the text received so far; completed answers offer Copy for the raw Markdown and Regenerate to ask the same question again.
- The panel header switches the context scope: full context, last 20 messages, last 6 messages, or quote only. The choice is stored per browser and applies to the next follow-up without reopening the panel.
- The first question is answered from a snapshot of the main conversation's existing LLM message history plus the quoted text.
- Follow-up questions remain inside the same ephemeral sidebar discussion.
- Closing the panel discards the sidebar discussion and its in-memory host snapshot.
- Starting a new ask by selecting different assistant text creates a fresh discussion with a fresh main-conversation snapshot.
How it preserves the main conversation
- The host only reads the main session's already-derived LLM message history and latest request header. It does not index, scan, summarize, or reload the project.
- The plugin registers no tools, opens no new DSH session, and never appends messages to the main session.
- The sidebar transcript lives in browser memory for the lifetime of the panel and in a short-lived host-side in-memory snapshot for the same discussion. Both are removed on close/discard or after a TTL.
- There is no persistent side-session archive, no history tree, and no workspace write path.
Installation
Requirements: a local DSH web profile (verified against DSH 0.2.2-rc.5) with Node.js 20+.
# one-command install from GitHub (replace "web" with your profile name if needed)
dsh plugin --profile web add github:Ruiming-cn/dsh-ask-in-sidebar
# or install the prebuilt pinned GitHub release tarball (no build step)
dsh plugin --profile web add https://github.com/Ruiming-cn/dsh-ask-in-sidebar/releases/download/v0.3.0/dsh-ask-in-sidebar-0.3.0.tgz
# or build from a local checkout and install it
npm run build
dsh plugin --profile web add /path/to/dsh-ask-in-sidebar
The plugin is also compatible with the DSH super-injector / dev hot-inject
workflow: build lib/ with npm run build, then inject or link the package
into the target profile. The package includes:
lib/index.js– host half (HTTP endpoints)lib/client.js– browser half (selection action + sidebar panel)cordis.patch.yml– stable bundle-layer insertpackage.jsondsh.bundleanddsh.clientmetadata
Usage
- Open a DSH web conversation.
- Select a portion of an assistant answer.
- Click Ask in Sidebar.
- Type a question such as "Why is it done this way?" and press Enter or click Send.
- Read the answer in the panel and ask follow-up questions as needed.
- Click Stop while an answer streams to abort it, or Copy on a completed answer to copy its Markdown.
- Close the panel at any time to return to the main conversation.
Configuration
There is no plugin-specific configuration. The sidebar uses the main
conversation's current provider/model route; if no request/header is
available, it falls back to the live agent's options, then to the first
configured LLM provider. The sidebar uses a small dedicated tool-less system
prompt so it answers from the supplied context instead of trying to use the
main agent's tools.
Context scope
The selector in the panel header decides how much of the main conversation one question reuses:
| Option | What is sent |
|---|---|
| Full context (default) | Every sanitized main-conversation message in the snapshot plus the sidebar's own history. |
| Last 20 / last 6 messages | Only the last N main-conversation messages, which keeps long interviews cheap and focused. |
| Quote only | No main-conversation messages at all: just the quoted text and the sidebar history. |
The scope is read per question, so switching to a shorter context applies to
the next follow-up without reopening the panel; the snapshot and its
deriveMessages result stay unchanged. The choice is stored in the browser
(dsh-ask-in-sidebar:context-scope) and survives a reload.
Context snapshot boundaries
- A snapshot is taken when the first question of a sidebar discussion is submitted. It contains the main session's derived LLM messages at that moment and the latest request header.
- Follow-up questions in the same panel reuse that same snapshot plus the sidebar's own completed history.
- The main conversation may continue to change while the panel is open; the open sidebar discussion does not automatically pick up those later main messages.
- Starting a new ask (a new selection + panel) takes a new snapshot of the then-current main conversation.
- Sidebar context never carries over between separate asks unless the user is explicitly continuing in the same open discussion.
Limitations
- The Markdown renderer is intentionally lightweight; it does not cover every Markdown extension (nested tables, footnotes, task lists, etc.).
- The plugin does not provide tools to the sidebar model, so it cannot call host tools or mutate the workspace from the panel.
- Model context follows the main session. Very long main conversations may produce large sidebar requests because the full derived history is reused.
- Ephemeral snapshots are process-local. A host restart drops them; a follow-up after a restart falls back to a current-main-context snapshot.
- The panel is a plain-DOM overlay, not a DSH native slot. It follows the
conversation DOM contract used by the current web UI (assistant rows expose
data-chat-flow-kind="assistant-step").
Development
npm test # unit tests for the host core
npm run build # copy src/ -> lib/
npm run check # test + build
License
MIT. See LICENSE.
Suggested repository tags when publishing: dsh, dsh-plugin,
deepseek-harness, sidebar, ask-in-sidebar, context.
Release workflow: see RELEASING.md.
Credits and acknowledgements
- DeepSeek Harness (MIT) provides the DSH plugin, session, LLM, and web runtime this plugin runs on.
- The host-side HTTP route + same-origin guard pattern and the browser
window.__ModuleLoader__/ plain-DOM injection pattern are informed by existing MIT-licensed DSH plugins that use the same patterns: - No third-party code is copied into this repository. The implementation is original and attributed to the DSH ecosystem where API shape or patterns are derived from it.
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10669
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10669
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 8366
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7489
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5362
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1070
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.