Back to home@Aafff623

dsh-callout

No description

Stars
0
Language
JavaScript
Created
Sep 6, 2026
Updated
Sep 6, 2026
GitHub repo

Introduction

English · 简体中文

Five dsh-callout semantic alert cards: NOTE, TIP, IMPORTANT, WARNING, and CAUTION.

GitHub stars MIT license Tested with DSH 0.1.2-rc.1

dsh-callout

GitHub-style alert blocks for the DeepSeek Harness (DSH) Web UI.

DSH's Markdown renderer intentionally treats > [!NOTE] as an ordinary blockquote. dsh-callout adds the missing semantic layer: matching assistant Markdown becomes a compact, theme-aware card with a stable type, icon, and accent color.

Why this plugin exists

A warning should look like a warning before the reader reaches the command. A key decision should be easy to find without wrapping the entire answer in a colored box.

dsh-callout keeps the source format readable Markdown and upgrades it only at presentation time:

assistant Markdown → DSH MarkdownText → ordinary blockquote → callout card

It does not modify stored session content, providers, permissions, tools, or the DSH core renderer.

Supported types

TypeUse it forAccent
NOTEPremises, environment facts, and boundariesBlue
TIPA better or less obvious approachGreen
IMPORTANTA decision or key conclusionPurple
WARNINGPotential loss or destructive operationsAmber
CAUTIONHigh-impact or difficult-to-reverse operationsRed

Install

From the DSH / npm package registry

Once the package is available in your configured registry:

dsh plugin add --profile web dsh-callout

Directly from GitHub

dsh plugin add --profile web github:Aafff623/dsh-callout

After installing or changing a plugin source, refresh the profile's served revision:

dsh plugin dedupe --profile web

Restart dsh web or refresh the Web UI after the revision changes.

Canonical syntax

Use one of these two forms:

> [!NOTE]
> Body text on the next line.
> [!NOTE] Body text on the same line.

The marker must be the first content of the blockquote. Every physical line in a multiline callout starts with >.

These are not canonical callouts:

[!NOTE] Body without the `>` marker.
Intro text > [!NOTE] > body squeezed onto one line.

Malformed or unknown markers fail open as ordinary text. The plugin does not attempt to turn every occurrence of [!NOTE] into a card.

What is guaranteed

  • Five fixed types, case-insensitive.
  • Code, inline code, emphasis, links, lists, nested quotes, and later paragraphs do not activate the blockquote transform.
  • The marker is removed only from a qualifying leading text node; the body node is retained.
  • The observer-echo path is idempotent: the plugin's own text mutation is not mistaken for an edit.
  • Real edits can remove plugin-owned card chrome and restore the source marker when it is still safe to do so.
  • Light/dark palette rules follow DSH's body[data-ds-dark-theme] switch.

What this plugin does not do

  • Human messages are rendered by DSH as plain text and are intentionally outside this plugin's scope.
  • It is not a Markdown parser replacement and does not add new Markdown AST node types.
  • It does not guarantee source-level distinction between a real marker and a backslash-escaped marker after Markdown parsing.
  • The plugin uses the current DSH Web DOM contract; a future renderer change should be checked with the regression suite and a browser smoke test.

Architecture

LayerFileResponsibility
Hostlib/index.jsInjects the concise output contract into the system prompt
Bundlecordis.patch.ymlRegisters the plugin entry in the DSH bundle
Browserclient.jsMatches rendered DOM, applies card attributes/CSS, observes streaming updates, and owns teardown
Verificationsyntax-tests.mjsTests GFM shapes, negative cases, and the observer state machine

The browser half is deliberately presentation-only. It uses plugin-owned data-md-alert-* attributes and --dsh-callout-* variables, and registers cleanup with Cordis ctx.effect().

Development

npm install
npm test

The test suite currently covers 22 cases, including:

  • standard one-line and multiline forms;
  • all five types, lowercase types, CRLF, and CJK text;
  • unknown/glued markers, code, emphasis, links, lists, nested quotes, and indented/fenced code;
  • bare assistant-Markdown paragraph fallback;
  • first upgrade, observer echo, and real-edit cleanup.

For a quick visual check, open demo-before-after.html. The SVG in this README is a deterministic overview of the same type palette, not a screenshot of a running session.

Compatibility and maintenance

PluginDSH baselineStatus
0.1.x0.1.2-rc.1Tested

After a DSH upgrade, run npm test, then smoke-test one standard callout, one code example, one theme switch, and one session switch. If the renderer, Markdown root class, client loader, or chat-flow attributes change, review client.js before upgrading the plugin version.

License

MIT — see LICENSE.