Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dsh-stable-web-prompt

DSH web profile plugin that makes the model-visible system prompt independent of the web server port.

Why

@deepseek-ai/dsh-web-app registers the app:web-surface system-prompt section with the live URL embedded in the first line:

You are interacting with the user through the DeepSeek Harness Web GUI
at http://127.0.0.1:3080. ...

When dsh web runs on a different port (for example --port 3099), that line changes. The rest of the prompt, tool schemas, and earlier messages are byte-identical, so the port change needlessly invalidates the model provider's cached prompt prefix for ordinary calls.

What it does

The plugin listens on the authoritative system-prompt/assemble waterfall, rewrites only the dynamic address in the app:web-surface section, and moves that section to the end of the assembled system prompt:

You are interacting with the user through the DeepSeek Harness Web GUI
on this machine. Its exact loopback URL is available to shell commands as
$DSH_WEB_URL; run `echo "$DSH_WEB_URL"` when a literal address is required. ...
  • The this page / this GUI orientation prose is preserved.
  • The normalized section is moved to the end of the system prompt.
  • The exact URL is still available on demand through DSH_WEB_URL, the shell variable already registered by dsh-web-app.
  • Every other section is left untouched and keeps its relative order.
  • The normalization is idempotent and logs once per process.

Install

dsh plugin --profile web add /path/to/dsh-stable-web-prompt

Then restart dsh web and hard-refresh the browser.

Verify

Start the web profile on two different ports and compare the assembled system prompt in the session log, or run the unit tests:

npm test

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages