dsh-chat-fold
其他 活跃维护

dsh-chat-fold

502399493zjw-lgtm/dsh-chat-fold

为原生多轮对话场景提供逐轮执行自动折叠能力,部署后无需额外复杂配置即可启用,可有效压缩对话执行上下文占用,降低长会话下的资源消耗与响应延迟。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
561 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:502399493zjw-lgtm/dsh-chat-fold
git clone https://github.com/502399493zjw-lgtm/dsh-chat-fold.git
git clone git@github.com:502399493zjw-lgtm/dsh-chat-fold.git
README.md main

dsh-chat-fold

Optional DSH Web bundle that adds per-turn execution folding to the stock Chat
view. It is pinned to stock DSH 0.1.0-rc.8.

After installation, the plugin wraps the existing Chat entry in place
instead of registering another tab. The same rc.8 Chat component still owns
history paging, scrolling, file opening, pending steering, and Deep diving...; the plugin
only groups each turn's execution rows behind Execution process · N steps.
Running work opens automatically and folds when the turn finishes. Expanding
the group renders the registered native Context, Think, Tool, command, Goal,
and Workflow surfaces with their normal inner disclosure defaults. User
messages, final assistant answers, and the native turn tail remain outside the
group.

Execution folding in the native Chat view

The GIF is an editorially retimed recording from stock DSH 0.1.0-rc.8: it
shows a running turn staying open, the turn folding automatically on
completion, and a manual reopen with native inner disclosures still closed.

This is deliberately a short-term, rc.8-specific integration. rc.8 does not
expose a supported interceptor for a registered Chat entry, so the plugin
temporarily replaces that entry's component and inject function while leaving
its id, tab, store, child-slot ownership, and native renderSlot binding
untouched. If the wrapper itself fails, it renders the captured stock Chat
component with the untouched native props.

Install

dsh plugin --profile web add dsh-chat-fold@0.1.0-rc.9

Restart the Web process after installing the package, then reload the browser.
To follow later prereleases instead, install dsh-chat-fold@next.

This plugin depends on rc.8's internal Chat registration shape. Re-run the
tarball smoke and interaction tests before upgrading DSH; compatibility with a
later DSH release must not be inferred from the package name or npm tag.

Remove

dsh plugin --profile web remove dsh-chat-fold

Restart the Web process and reload the browser. Removing the plugin restores
the original Chat entry.

Development

pnpm install
pnpm test
pnpm run check
pnpm run build
pnpm run verify:package
pnpm pack

verify:package checks the built package boundary. A release claim additionally
requires installing the packed tarball into an isolated stock DSH 0.1.0-rc.8
profile and exercising the wrapped Chat entry.

License

MIT