dsh-at-file
FSMargoo/dsh-at-fileCodex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
Improve the current chat draft before sending. One click optimizes the draft with the session's currently selected model, then shows an original-vs-result comparison so you decide before anything is applied.
在发送前优化当前聊天输入。一键用当前对话选中的模型优化草稿,并以 原文 / 优化结果对比 的方式呈现,由你确认后再采用。
slots
(no DOM hacking, no replacement of shipped UI):
conversation.input.left);conversation.session.header.actions);/optimize slash command (inputTriggers, when available).conversation.input.dock, showing 原始输入 / 优化结果 side by
side; choose 采用优化结果 or 放弃. Narrow windows stack the columns vertically.llm
service with the session's default model selection (agentDefaultModel). No
extra credentials, no separate provider config.From the DSH market (once listed), npm, or a Git URL:
# npm / pnpm
npm install @joe0001/dsh-prompt-optimizer
# or from source
git clone https://github.com/LHF198/dsh-prompt-optimizer.git
cd dsh-prompt-optimizer
Then add the loader row (or use the market's install flow):
plugins:
- id: dsh-prompt-optimizer
name: '@joe0001/dsh-prompt-optimizer'
config: {}
After enabling, reload the Web GUI. A 优化 / Optimize action appears at the left
end of the composer tool row, in the session header, and as /optimize.
工程化说明:当前包为手写 bundle、无编译步骤——缺省情况下克隆即用,本地校验 用 package 的三个脚本:
npm run lint(对lib/index.js与lib/client.js做node --check)、npm run build(lint 后确认lib/client.js存在,并非真正的转译/打包)、npm run test(运行node test/verify.js)。pnpm 下等价为pnpm run <script>。 (当前仓库 URL 已指向LHF198;创建远程仓库并推送后,即可按docs/release.md发布。)
You can also press /optimize in the composer, or use the header action.
webServer, llm and
agentDefaultModel, the client services slots, locale and timer, and
the client slots conversation.input.left, conversation.session.header.actions
and conversation.input.dock. The /optimize command additionally needs the
optional inputTriggers service (the plugin degrades gracefully without it).
Verified against DSH 0.1.1-rc.2, cordis 4.0.1.@deepseek-ai/* core packages are peerDependencies only — the plugin
never ships its own copy and never shadows the host version.window.__ModuleLoader__ loader entry with
an explicit dsh.client.inject list (slots, locale, timer); no
install-time build scripts.packageManager pin yet).lib/index.js).llm service.The package ships a hand-built bundle (lib/client.js) and a hand-written host
entry (lib/index.js); there is no compile step — the build script does not
transpile, it only validates that both halves are syntactically valid and that
the client bundle exists. Cloning and enabling is all that is needed to try it.
Validate and verify with the package scripts (run with npm or pnpm):
npm run lint # node --check lib/index.js && node --check lib/client.js
npm run build # lint + confirm lib/client.js exists
npm run test # node test/verify.js
Keep the client bundle free of JSX/TypeScript/import and always register UI
through the official slots API. When changing the client, bump the loader
entry revision so running pages pick up the new bundle.
See CONTRIBUTING.md for the contribution workflow, commit conventions and testing requirements. Architecture decisions are recorded under docs/adr (start at the index).
Apache-2.0 — see LICENSE.