Introduction

When using slash commands in DeepSeek Harness (DSH), common issues are not just “can the command execute,” but also how to complete command names, how to prompt parameter formats, why command options are missing in tool-enabled sessions (subagent), and why outputs and header buttons are abnormal after executing commands in empty chats.

Below is an introduction to csiroqa/dsh-command-opt. It is a DSH command optimization plugin that mainly covers command name completion, parameter format guidance, command prompt overlays, subagent session patches, and empty chat command output fixes.

What is this

dsh-command-opt is a DSH command optimization plugin:

  • Tab/Enter command name completion
  • Parameter format guidance and prompt overlay
  • Patch for tool-enabled sessions (subagent)
  • Empty chat command output fix

The repository address is:

https://github.com/csiroqa/dsh-command-opt

Maintained by csiroqa, license is MIT License.

It mainly targets use on the DSH web page, solving specific problems in the stages of slash command input, parameter prompting, command execution, and session state.

Core Features

Tab/Enter Command Name Completion

After typing / to add a prefix, pressing Tab can complete the command name.

In multi-candidate scenarios:

  1. First complete the common prefix
  2. Then press Tab to cycle through candidates
  3. After selecting with / , use Tab or Enter to complete the selected item

This capability targets commands already existing in the command directory, not arbitrary free-text completion.

Parameter Format Guidance

After completing to a command with parameter slots, you can enter the parameter slots.

Parameter guidance includes:

  • input hint ghost text aligned with input
  • Tab cycling parameter options
  • Keeping the prompt overlay resident while inputting parameters

For example, after completing to a command like /schedule, you can continue to input parameters, and the prompt overlay displays the context of the current command.

Command Prompt Overlay

The command prompt overlay uses the conversation.input.overlay slot.

Its function is to continuously display command prompts while inputting command parameters, rather than appearing only once during the command name completion phase. For multi-parameter commands, the prompt does not disappear immediately after inputting parameters.

Patch for tool-enabled sessions (subagent)

In tool-enabled sessions (subagent), the built-in command directory may return empty, causing these sessions to appear as having “no options,” preventing direct execution of commands like /archive.

This plugin provides patches for such sessions:

  • Connect command directory directly to host command directory
  • Execute full command on Enter
  • Register “Actions” menu in session header

The header “Actions” menu provides:

  • Archive
  • Copy Session
  • Locate Parent Session

Empty Chat Command Output Fix

After executing a command in an empty session, this plugin restores normalcy for outputs and header actions:

  • Command output renders normally
  • Header action buttons appear
  • Not reused or merged by the next “New Chat” scan

Directory Caching

The plugin applies caching to the command directory:

  • Warm up when typing /
  • Actively invalidate on commands/change and agent-preset/selected events
  • TTL fallback
  • Deduplicate concurrently in the same session
  • Prune when session is deleted

These caching strategies primarily serve command completion and command prompts and do not change DSH’s own command definitions.

Installation and Usage

Prerequisites:

  • Node.js >= 22
  • pnpm
  • Local deepseek-harness source checkout
  • Dependencies pointing to ../deepseek-harness via link:

First, clone and build the plugin:

git clone https://github.com/csiroqa/dsh-command-opt.git
cd dsh-command-opt
pnpm install
pnpm build

Then install into the web profile. The plugin is installed pointing to the current directory via link::

dsh plugin --profile web add link:$(pwd)

After installation:

  1. Restart dsh web
  2. Hard refresh browser Ctrl+F5

If modifying plugin source code later, rebuild and hard refresh:

pnpm build

Configuration

After installation, the command-opt insert line in cordis.patch.yml supports optional configuration.

However, a DSH inherent behavior needs attention: the browser half cannot receive the patch config; defaults are built into the code, and modifying the config will not change browser behavior.

Therefore, daily use relies more on the plugin code’s default behavior and actual runtime effects rather than adjusting browser-side behavior via the config file.

Typical Usage

1. Complete Command Name

Input:

/

Continue typing the command prefix, then press Tab.

If there are multiple candidates in the command directory:

  1. First complete the common prefix
  2. Continue pressing Tab to cycle through candidates
  3. Use / to select the target command
  4. Press Tab or Enter to complete the selected item

2. Input Command Parameters

After completing to a command with parameter slots, such as /schedule, directly enter the parameter slots.

At this time:

  • Ghost text shows the parameter format
  • Tab can cycle through parameter options
  • While inputting parameters, the prompt overlay remains resident

3. Execute Command in tool-enabled session

In a tool-enabled session:

  1. Input a command like /archive
  2. Press Enter to execute directly
  3. Execute Archive, Copy Session, or Locate Parent Session via the header “Actions” menu

4. Execute Command in Empty Chat

After executing a command in an empty session:

  • Output renders normally
  • Header action buttons appear
  • This session will not be reused or merged by the next “New Chat” scan

Applicable Scenarios and Notes

Suitable for the following scenarios:

  • Frequent use of slash commands on the DSH web page
  • Want faster command name completion
  • Want parameter format prompts for commands
  • Need to execute commands like /archive in tool-enabled sessions
  • Need to execute commands in empty chats with normal output

Notes before use:

  • The plugin runs under the permissions of the current dsh process
  • Check source code and license before installing
  • License is MIT License; retain the LICENSE file and copyright notice, and attribute the source (repository link)
  • The plugin only takes effect on local pages, does not involve network listening
  • Plugin code is installed pointing to the current repository directory via link:; changes to source code require rebuilding and hard refresh to take effect

Regarding compatibility:

  • Developed and verified against DSH 0.1.1-rc.2 source checkout
  • Relies on the public interface of dsh-client-runtime
  • A few internal interfaces are protected by runtime feature detection, falling back silently if missing

Known limitations:

  • Empty chat activation is a browser-side behavior
  • Host summary still reports as blank
  • After refreshing the page, this empty session disappears from the list until a real turn exists

Conclusion

dsh-command-opt solves specific problems: slash command completion, parameter prompting, subagent session command execution, and empty chat command output. It does not change DSH command definitions but fills gaps in the DSH web command experience.

GitHub repository:

https://github.com/csiroqa/dsh-command-opt

The directory page address did not appear in verified materials, so it is not listed in this article.