DSH Story Mode: DeepSeek Harness Story Mode Toggle

Introduction

In DeepSeek Harness (DSH), common practices for roleplay or scenario-based dialogue involve writing large blocks of settings into the system prompt or manually pasting scenario documents each time. Modifying settings often requires changing configurations and restarting the service, making it difficult to temporarily switch between “normal chat” and “script performance” during a conversation. The community plugin dsh-story-mode (maintained by xianshu-virtuous) targets a different set of needs: entering story roleplay via a switch while retaining the current persona (e.g., the persona injected by whale-companion). It treats Markdown/text documents in the workspace as scenes and instructions to be injected into the prompt. The switch takes effect immediately without requiring a DSH restart.

Below is an introduction to the plugin’s positioning, workflow, installation, and typical usage.

What is this

DSH Story Mode is a client-side external plugin for DSH, with the package name @dsh-external/dsh-story-mode (Repository: xianshu-virtuous/dsh-story-mode). Official description: Story mode for DeepSeek Harness — a session-level switch that performs roleplay using the current persona and loads documents under the workspace story/ directory as scene descriptions into the system prompt.

It does not replace persona text nor overwrite other system prompt sections; identity is still provided by persona plugins like whale-companion. This plugin only appends “roleplay boundaries + scene document content.”

Core Functions

Immediate Switch Effect

When enabled, the model enters story roleplay with the current persona identity; when disabled, it reverts to normal conversation. No restart of the DSH process is required; the state is reflected when the prompt is assembled for the next request.

Workspace Documents as Scenes

When enabled, the plugin reads .md and .txt files from the story/ directory within the current session workspace (session cwd). It sorts them by filename and concatenates them into the <story-mode> instruction, segmented by [Filename]. Filenames can be customized, such as scene.md (scenes), rules.md (instructions), or characters.md (character cards).

If the total number of characters in the documents exceeds the configuration item maxChars (default 12000), they are truncated in the aforementioned order to avoid overwhelming the context.

Dual Control Entry Points

  1. WebUI: Settings → Story Mode page, providing a button switch and a list of loaded documents.
  2. Tool story_mode: Callable by the model during conversation. The action parameter can be on / off / status (status returns the state and document list without the body content, saving tokens).

Integration with System Prompt

The plugin registers an additional system prompt section (order 15, immediately following the whale-companion persona section). It reads the switch state synchronously during every assembly:

  • Off: The section returns an empty string and does not participate in assembly.
  • On: Injects the <story-mode> instruction (including roleplay boundary rules) and the full text of all read story documents.

The switch state is persisted at:

$DSH_HOME/plugins/dsh-story-mode/state.json

The story document path is determined by the configuration storyDir, defaulting to story relative to the workspace.

Configuration

You can override the plugin instance configuration in cordis.patch.yml (example from the documentation):

- insert:
    - id: dsh-story-mode
      name: '@dsh-external/dsh-story-mode'
      config:
        enabled: true        # Master switch for the plugin, false disables it completely
        storyDir: story      # Story document directory; relative paths are relative to the session workspace, absolute paths are also supported
        maxChars: 12000      # Total character limit for documents injected into the system prompt

Installation and Activation

The process given in the README is to build locally and then install via path (the example uses Windows paths; you need to replace them with the plugin directory after cloning or downloading on your machine):

pnpm install
pnpm run typecheck
pnpm test
pnpm run build
dsh plugin --profile web add F:\dsh\dsh-story-mode

Restart dsh web after completion. Open Settings → Story Mode on the Web side to use the UI switch.

package.json requires Node ^22.19.0 || >=24.0.0; the current release version is 0.2.0. Please review the repository source code and LICENSE before installation, as the plugin runs with the current DSH process permissions.

Typical Usage

Preparing Scene Documents

Create a directory (default name story) in the session workspace and place several .md or .txt files, for example:

your-workspace/
  story/
    scene.md
    rules.md
    characters.md

After saving, enable Story Mode; the next conversation prompt will include the content of these files (subject to maxChars limits).

Switching via Tool

The story_mode tool callable by the model:

  • action: 'on' — Enables story mode (writes state, takes effect in the next turn).
  • action: 'off' — Disables, restores normal conversation.
  • action: 'status' — Queries the switch and the list of loaded document filenames.

Combining with whale-companion

The two plugins can be installed independently: whale-companion provides personas like “Shen Shen”; dsh-story-mode only determines “whether to enter roleplay with that persona” and “what the scene documents are.” If whale-companion is not installed, Story Mode can still be used, but the “current persona” depends on other persona injection methods in your environment.

Use Cases and Notes

Suitable for: Situations where you need switchable roleplay in DSH Web sessions; where scenes, rules, and character cards are maintained via files and version-controlled with the workspace; where UI and tool dual-channel control is preferred over modifying global prompt templates.

Notes:

  • Story content comes from workspace files and plugin injection logic. Before installation, you should read the GitHub repository source code and license.
  • Large documents will be truncated. Important rules should be placed in files sorted early or control the size of individual files.
  • The community directory SkillHub Plugin Page has no official affiliation with DeepSeek / High-Flyer. The DSH ecosystem philosophy is “everything is a plugin”; the facts in this introduction are based on the README and package metadata.

Conclusion

dsh-story-mode turns “story switch + workspace story document injection” into a client-side plugin: an order 15 system section, persistent state, a Web settings page, and the story_mode tool, with a clear division of labor from the whale-companion persona section. If you are doing scenario-based dialogue in the Harness, you can get the repository from the directory page or GitHub, build and install it according to the README, and try it out in Settings → Story Mode.

  • Directory Page: https://www.skillhub.cn/plugins/xianshu-virtuous/dsh-story-mode
  • GitHub: https://github.com/xianshu-virtuous/dsh-story-mode
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye