Back to home@xie-tj

dsh-easy-exit

Optional DeepSeek Harness plugin for editing and resending the latest direct-human message

Stars
0
Language
TypeScript
Created
Aug 21, 2026
Updated
Aug 23, 2026
GitHub repo

Introduction

@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.