dsh-quote-temp-ask
界面增强 活跃维护

dsh-quote-temp-ask

Enc-hanted/dsh-quote-temp-ask

提供对应网页端选中内容唤出的多功能操作能力,内置引用展开编辑器标记、免上下文临时聊天面板、预填充提问参数的网页弹窗提问三项核心功能,操作轻便,选中内容即可快速调用。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
18 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Enc-hanted/dsh-quote-temp-ask
git clone https://github.com/Enc-hanted/dsh-quote-temp-ask.git
git clone git@github.com:Enc-hanted/dsh-quote-temp-ask.git
README.md main

dsh-quote-temp-ask

English · 中文

A selection toolbar for the DSH web UI. Select text in a conversation and three buttons appear above it:

  • 引用 (Quote) — appends a [引用到内容N] marker to the composer draft. The marker is the source of truth: cut/paste it inside the textarea to reorder. On send (Enter or the send button) each marker expands into a > **引用的内容N** blockquote with the full text; the expanded draft is also copied to the clipboard.
  • 临时对话 (Temp chat) — opens an in-page 390px right panel. Each question is one stateless turn using DSH's current default model, streamed via 250ms polling. Markdown rendering (code blocks, inline code, bold, italic, links, headings, lists), 清理上下文 (clear), 停止 (stop, real abort via AbortController).
  • 去网页问 (Web ask) — opens real chat.deepseek.com in a 390×844 popup docked to the right screen edge, prefilled via ?q=. Text over the 8KB URI budget degrades to plain open + full-text clipboard.

Install

From npm:

dsh plugin --profile web add dsh-quote-temp-ask

Or from a local checkout:

dsh plugin --profile web add link:D:/path/to/dsh-quote-temp-ask

dsh plugin forwards to pnpm and reconciles dsh.profile.bundles automatically — no manual profile edits. Restart DSH; the plugin loads without approval.

Uninstall

dsh plugin --profile web remove dsh-quote-temp-ask

Restart DSH. The bundle-patch row disappears with the dependency.

Minimal usage

  1. Select any text in a conversation → click 引用.
  2. The marker [引用到内容1] appears in the composer; preview cards show above it.
  3. Press Enter (or the send button) — the marker expands into the blockquote and the message is sent.

Compatibility

Verified against @deepseek-ai/dsh 0.1.0-rc.6 (web profile). Node >=22.15.

Runtime dependencies are declared explicitly: react and @deepseek-ai/dsh-client-ui-slots (peer; provided by the web app). The host half imports no npm packages — it uses injected DSH services (llm, agentDefaultModel, webServer) and Node builtins only.

Known limitations

# Limitation
L1 Send-button interception relies on aria-label="发送消息" (Chinese UI); Enter interception is unaffected
L2 Other submit paths (Cmd/Ctrl+Enter) are not intercepted — markers go out literally
L3 Manually typing a marker-shaped string that matches a pooled id gets expanded
L4 Marker renumbering adds undo entries
L5 The quote pool is per-session memory — markers lose their mapping after switching sessions or refreshing
L6 Streaming is 250ms polling, not SSE
L7 Panel message history is unbounded (use 清理上下文)
L8 chat.deepseek.com sends frame-ancestors 'none' — no iframe embedding; the web popup is the only path

License

MIT