light-only
dsh-codex-select
No description
- Stars
- 0
- Language
- JavaScript
- Created
- Aug 17, 2026
- Updated
- Aug 17, 2026
Introduction
dsh-codex-select
Codex-style code selection for the DeepSeek Harness Web GUI.
Select code in a workspace file viewer — it is automatically added to the message as a reference chip (no button, no code dumped into the draft text), and at send time the selection is serialized into the prompt as context, exactly like Codex.
Features
- 文件 / Files conversation view tab: lazy workspace file tree (skips
node_modules/.gitby default, toggles included) + read-only file viewer (UTF-8 text only, ≤ 1 MiB, binary rejected). - Codex-style selection: select code inside the viewer — a chip appears
above the composer:
已选中 N 行 · <file>, and a matching reference chip is inserted into the composer automatically. - No button, no draft pollution: the code never lands in the visible draft text; the input machine serializes the chip through the plugin codec into a fenced code block with a file-path comment when you send.
- × clears the chip; selecting different code replaces the previous chip; collapsing the selection keeps the chip (Codex behaviour).
Install
dsh plugin --profile web add dsh-codex-select
dsh web
Restart dsh web after install, then open a session and click the
文件 / Files tab.
Usage
- Click the 文件 / Files tab next to the conversation tabs.
- Expand the workspace file tree (left) and click a file to view it (right).
- Select code in the viewer — a chip
已选中 N 行 · 文件名appears above the composer, and the selection is attached to the message automatically. - Type your prompt and send — the selected code rides the message as context.
- × on the chip removes the selection.
How it works
cordis.patch.yml— bundle patch inserting thecodex-selecthost row.lib/index.js— host half:GET /dsh-codex-select/list|read(same-origin routes, same trust model as the core directory picker).lib/client.js— browser half:- a
conversation.viewentry (the Files tab), - a
conversation.input.dockentry (the chip bar above the composer), - an input-trigger source named
codex-selectwhose codec serializes the reference chip at submit time (async fetch-by-path fallback so chips survive reloads).
- a
Security
The host routes share the harness web server's trust model: anyone who can reach the harness can list/read absolute paths on the host account — the same capability the core directory picker already exposes. The viewer is read-only; this plugin never writes or executes files.