dsh-easy-exit
文件与数据 活跃维护

dsh-easy-exit

xie-tj/dsh-easy-exit

轻量级可选插件,安装后可快速调取最近一次用户直发的消息内容,支持编辑修改后一键重发,无需手动重新输入内容,操作简单高效。

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

@deepseek-ai/dsh-session-message-revision

English | 中文

Optional Web action for editing and resending the latest direct-human text message. The package contributes an additive action beside the built-in Copy control and keeps the conversation renderer owned by dsh-client-ui-conversation.

Features

  • Shows Edit only for the latest direct-human message.
  • Accepts text-only messages and preserves the original text until submission.
  • Sends with Enter, inserts a newline with Shift+Enter, and cancels with Escape.
  • Uses the existing Session revision API, which validates idle state, pending work, target identity, and surface replacement before queuing the new turn.
  • Removes the superseded tail from active model history while append-only logs and durable side effects remain available to their owning projections.

Composition

- id: session-message-revision
  name: '@deepseek-ai/dsh-session-message-revision'

The standard Web composition includes this row, while a profile may omit it to remove the action. The package requires dsh-client-ui-conversation, dsh-client-runtime, dsh-client-locale, and the Session revision capability exposed by the runtime; it does not replace the shipped conversation node renderer.

Install

Install the standalone bundle into a profile:

dsh plugin --profile demo add github:xie-tj/dsh-easy-exit

This repository includes the prebuilt lib/ entry points, so a Git installation does not need a build step. Restart the Web process after changing the profile composition. Pin a commit when the profile must remain reproducible.

For a local checkout, replace the GitHub reference with its directory path.

Development

The source package is maintained in the DeepSeek Harness monorepo. Build and test it there:

pnpm --filter @deepseek-ai/dsh-session-message-revision bundle
pnpm exec vitest run packages/session-query/session-message-revision/tests

Model Experience

Latest-user-message revision

What the model sees

The replacement text is admitted as a new durable user/message event, and the paired session/revision record hides the superseded tail from the next active request; raw events and revision metadata stay append-only.

Token effect

The next request uses the edited message and the active surface after the replacement. Superseded messages and responses do not consume tokens in that request.

KV Cache effect

The request prefix after the edited message changes, so provider-side cache reuse depends on the new prompt prefix.

Known Limitations and Deferred Work

  • The package requires the Session revision capability and user-action Slot supplied by the corresponding deepseek-harness version; it cannot add those Host protocol primitives from the browser package alone.
  • Only the latest direct-human text message is editable, settled or steered. Images, injected context, and older user messages are not editable.
  • A running session, pending queue, pending interaction, closed session, or removed session keeps the action visible but unavailable.