Skip to content
dsh.fish
Bundle

dsh-quote-temp-ask

Selection toolbar for the DSH web UI: quote (expandable markers in the composer), temp chat (in-page context-free panel), web ask (chat.deepseek.com popup with ?q= prefill)

Source
Enc-hanted
stars
1 stars
License
MIT
Updated
Updated 5 days ago

Readme

# dsh-quote-temp-ask

**English** · [中文](README.zh-CN.md)

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:

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

Or from a local checkout:

```bash
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

```bash
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

Install

dsh plugin --profile web add github:Enc-hanted/dsh-quote-temp-ask

Profile: web

  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source