@zephinel/dsh-intelligent-ui 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +7 -0
- package/README.en.md +107 -86
- package/README.md +103 -82
- package/assets/intelligent-ui-components-layout.webp +0 -0
- package/assets/intelligent-ui-dashboard-en.webp +0 -0
- package/assets/intelligent-ui-dashboard-zh.webp +0 -0
- package/assets/intelligent-ui-editing-en.webp +0 -0
- package/assets/intelligent-ui-editing-zh.webp +0 -0
- package/assets/intelligent-ui-itinerary-en.webp +0 -0
- package/assets/intelligent-ui-itinerary-zh.webp +0 -0
- package/assets/intelligent-ui-on-demand-hint.webp +0 -0
- package/assets/intelligent-ui-quiz-en.webp +0 -0
- package/assets/intelligent-ui-quiz-zh.webp +0 -0
- package/assets/intelligent-ui-readme-components.webp +0 -0
- package/assets/intelligent-ui-readme-controls.webp +0 -0
- package/assets/intelligent-ui-readme-generation-en.webp +0 -0
- package/assets/intelligent-ui-readme-generation-zh.webp +0 -0
- package/assets/intelligent-ui-readme-overview-en.webp +0 -0
- package/assets/intelligent-ui-readme-overview-zh.webp +0 -0
- package/assets/intelligent-ui-readme-temporary.webp +0 -0
- package/assets/intelligent-ui-real-dashboard-en.webp +0 -0
- package/assets/intelligent-ui-real-dashboard-zh.webp +0 -0
- package/assets/intelligent-ui-real-itinerary-en.webp +0 -0
- package/assets/intelligent-ui-real-itinerary-zh.webp +0 -0
- package/assets/intelligent-ui-real-quiz-en.webp +0 -0
- package/assets/intelligent-ui-real-quiz-zh.webp +0 -0
- package/assets/intelligent-ui-settings.webp +0 -0
- package/assets/intelligent-ui-style-panel.webp +0 -0
- package/assets/intelligent-ui-temporary-result-dark.webp +0 -0
- package/assets/intelligent-ui-temporary-result.webp +0 -0
- package/assets/intelligent-ui-toggle.png +0 -0
- package/lib/client.js +169 -146
- package/lib/index.js +101 -62
- package/lib/standalone.css +1 -1
- package/lib/standalone.js +139 -133
- package/licenses/remix-icon-LICENSE +186 -0
- package/package.json +12 -6
- package/skills/intelligent-ui/SKILL.md +46 -25
- package/skills/intelligent-ui/references/components.md +10 -10
- package/skills/intelligent-ui/references/integration.md +24 -22
- package/skills/intelligent-ui/references/troubleshooting.md +11 -2
package/NOTICE
CHANGED
|
@@ -33,6 +33,13 @@ lucide-react (icons)
|
|
|
33
33
|
ISC License.
|
|
34
34
|
Full text: licenses/lucide-react-LICENSE.
|
|
35
35
|
|
|
36
|
+
Remix Icon (icons)
|
|
37
|
+
https://github.com/Remix-Design/RemixIcon
|
|
38
|
+
Remix Icon License v1.0, Copyright (c) 2017-2026 Remix Design.
|
|
39
|
+
Adapted: path data transcribed (unmodified geometry) into
|
|
40
|
+
src/lib/components/remix-icon.tsx, which renders the plugin's own chrome icons.
|
|
41
|
+
Full text: licenses/remix-icon-LICENSE.
|
|
42
|
+
|
|
36
43
|
KaTeX
|
|
37
44
|
https://github.com/KaTeX/KaTeX
|
|
38
45
|
MIT License.
|
package/README.en.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@zephinel/dsh-intelligent-ui)
|
|
8
8
|
[](LICENSE)
|
|
9
|
-
[](https://www.npmjs.com/package/@deepseek-ai/dsh)
|
|
10
10
|
[](https://github.com/Zephinel/dsh-intelligent-ui/actions/workflows/publish.yml)
|
|
11
11
|
|
|
12
12
|
**Turn a DeepSeek Harness (DSH) model answer into a page you can actually use.** After installing and enabling the plugin, ask:
|
|
@@ -15,59 +15,79 @@
|
|
|
15
15
|
Plan two days in Shanghai, with checkboxes and adjustments
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
The model calls the `render_ui` tool and writes its answer as an [OpenUI Lang 1.0](https://openui.com) program; at the end of the turn, DSH renders it into an interactive page — maps, photos, charts, checklists, forms, SVG drawings and mini-games are all real components
|
|
18
|
+
The model calls the `render_ui` tool and writes its answer as an [OpenUI Lang 1.0](https://openui.com) program; at the end of the turn, DSH renders it into an interactive page — maps, photos, charts, checklists, forms, SVG drawings and mini-games are all real components.
|
|
19
19
|
|
|
20
20
|
Ported from [Open Intelligent UI](https://github.com/thesysdev/open-intelligent-ui) (MIT), with an Agent Skill (`intelligent-ui`) that the plugin registers automatically.
|
|
21
21
|
|
|
22
22
|
> [!NOTE]
|
|
23
|
-
> **Current status**: published on GitHub and npm as **`@zephinel/dsh-intelligent-ui@0.
|
|
23
|
+
> **Current status**: published on GitHub and npm as **`@zephinel/dsh-intelligent-ui@0.6.1`** (`latest`). 0.6.1 fixes an availability issue where the bundled OpenUI parser (1.0.1) could expand shared references exponentially and block or OOM the Host; it now bundles `@openuidev/lang-core` 1.1.1. 0.6.0's in-place editing with revision history, Auto page-vs-text decision, experimental answer-as-document mode, local images, style switching and sidebar update card remain available.
|
|
24
24
|
|
|
25
25
|
[Quick start](#quick-start) · [Getting the code](#getting-the-code) · [Build, test and deploy](#build-test-and-deploy)
|
|
26
26
|
|
|
27
27
|
## What it looks like
|
|
28
28
|
|
|
29
|
-

|
|
30
30
|
|
|
31
31
|
- When the user asks "plan two days in Shanghai", the model no longer replies with just a paragraph: it renders an itinerary page (map + photos + timeline + checklist + budget) at the end of the answer that can be clicked, checked off and dragged.
|
|
32
32
|
- The `$variables`, `@Set` and `@functions` inside the card all execute locally in the browser: checkboxes, sliders, steppers, timers and budget allocation never require another model request.
|
|
33
|
+
- A rendered page can be edited again: click **Edit** in the card header, write change requests for blocks, drag or keyboard-reorder them in **Block arrangement**; duplicate, delete, move, nested editing, quick adjust and revisions are recorded deterministically by the Host. See the [usage guide](docs/usage.en.md#edit-a-rendered-page) for the full flow.
|
|
33
34
|
- Only actions that genuinely need to continue the conversation (`@ToAssistant`, such as a form submission) put a short message back into the composer and send it.
|
|
34
35
|
|
|
35
|
-
##
|
|
36
|
+
## Generation
|
|
37
|
+
|
|
38
|
+
Generation is the core of the extension: open the **UI** control to the right of the composer (or send `/iui on`), then ask normally. The model calls `render_ui` and writes the answer as an [OpenUI Lang](https://openui.com) program; DSH renders it as an interactive page when the turn ends.
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
- No extra step: ask → the model generates → the card appears at the end of the turn.
|
|
41
|
+
- **The model decides whether a page helps (Auto has no default)**: it renders one when showing the answer helps the reader understand faster or more accurately — a concept, mechanism/process, structure, comparison, data or interaction; a bare fact, a term restatement, a one-sentence definition that does not explain how something works, code/translation, chit-chat or an explicit text request stays in Markdown. When both seem to fit, the kind decides: a bare fact or a term restatement stays text, while an explanation of how something works is a page even when the prose version would be short. When it renders, pick Card / Article per session under **UI → Display style**, or let **Auto** choose (Card, Article or a free layout); **On-demand UI** describes the result without picking a template.
|
|
42
|
+
- `$variables`, `@Set` and `@functions` run in the browser; only `@ToAssistant` puts a short message back into the composer.
|
|
43
|
+
- The result is real components: checkboxes, drag, expand and play all work, and the page can be edited afterwards.
|
|
38
44
|
|
|
39
|
-

|
|
40
46
|
|
|
41
|
-
|
|
47
|
+
The composite above comes from real DSH sessions (DeepSeek V4.1 Flash · Max): the same renderer produced an itinerary, a data dashboard and a quiz — three different artifact types, not hand-written fixtures.
|
|
42
48
|
|
|
43
|
-
|
|
49
|
+
See the [usage guide](docs/usage.en.md) for switches, styles, templates and on-demand generation.
|
|
44
50
|
|
|
45
|
-
##
|
|
51
|
+
## Editing a rendered page
|
|
46
52
|
|
|
47
|
-
|
|
53
|
+
A rendered page stays editable.
|
|
48
54
|
|
|
49
|
-

|
|
50
56
|
|
|
51
|
-
|
|
57
|
+
- Click **Edit** in the card header to open the canvas; root blocks show a soft orbit glow.
|
|
58
|
+
- Each row's **More** menu offers Locate/Edit/Duplicate/Move/Delete; Delete confirms inside the menu.
|
|
59
|
+
- Block requests, drag/keyboard reordering, nested editing, Divider/Spacer quick adjust and structure previews all happen in the left panel; structural operations first enter this round's pending queue, and **Apply** (after confirming the total preview) makes the Host record one structural revision atomically. A structure-only Apply closes the draft after recording; with model requests, a global note or ordering, the remaining request is auto-sent after the structural revision (the chip stays for a manual send while the composer holds prose).
|
|
60
|
+
- Revision history (the header history icon, which shows the rendered revision number for edited revisions) lists each artifact's revisions and can delete recorded ones behind an inline confirmation; the initial render cannot be deleted and a revision still used as another revision's base must have its newer revision deleted first. Deleting a revision a card renders names the rollback target in the confirmation and rolls that card back to the newest older revision whose program is still retained (if that target is deleted later, the client resolves the fallback chain to a revision that still exists); the stage selects that rollback target and stays read-only while it displays it, and selecting another revision restores editing. The redirected card is read-only so it cannot share an edit session with the revision's native card. A revision that an unsent draft in the chat is editing cannot be deleted, and a revision still used as a newer revision's base hides its delete action with an explanation. When no fallback exists the row offers no delete, and other cards still showing the revision only roll back when a fallback is available — otherwise they may become stale.
|
|
61
|
+
- The **Style** section at the top of the panel (expand it with **Change style**) does two things: **Switch style** selects and previews a built-in Card/Article or saved template; confirm with **Apply style** (zero model, records a new revision immediately, changing only style identity and theme, not content; Article needs a page with contents and sections and is disabled otherwise), while **Or describe it (model-applied)** (max 2000 chars) asks the model to restyle the page (the Host enforces the layout and only warns about content changes) and records a new temporary-style revision. Temporary results can be restyled here too. Cards on a new Host that are editable no longer show the footer Adjust style button (old Hosts or non-editable cards keep that fallback; a redirected read-only fallback card shows neither Save nor Adjust).
|
|
62
|
+
- See the [usage guide](docs/usage.en.md#edit-a-rendered-page) for the full flow.
|
|
63
|
+
|
|
64
|
+
## Component tour
|
|
52
65
|
|
|
53
|
-
|
|
66
|
+
Generated pages are built from the components below. The renderer is not a chat bubble around a paragraph — it is a full component library: **57 components, 73 functions, 5 action steps**. The composite below is a real render from the extension: same renderer, same DSH theme tokens, no mockups:
|
|
67
|
+
|
|
68
|
+

|
|
69
|
+
|
|
70
|
+
Three real examples (sales dashboard, coffee brewing quiz, pour-over calculator in the narrow capture) are in the same image; on narrow screens cards reflow to one column and long chart labels truncate instead of overflowing.
|
|
54
71
|
|
|
55
72
|
## Capabilities
|
|
56
73
|
|
|
57
74
|
| Capability | What it gives you |
|
|
58
75
|
|---|---|
|
|
59
|
-
| Interactive pages | Maps, photos, charts, checklists, forms, SVG drawings and mini-games are real components
|
|
76
|
+
| Interactive pages | Maps, photos (including local image files in the workspace), charts, checklists, forms, SVG drawings and mini-games are real components |
|
|
77
|
+
| Block editing and arrangement | Write change requests for blocks on a rendered page and drag or keyboard-reorder the top-level blocks (the canvas previews the target order); content edits, order-only or combined updates all work, the model returns block fragments and the Host merges them into a page whose unselected blocks stay byte-identical, producing a new revision. One chat can keep several drafts in parallel (one active canvas, one chip per artifact); one send can submit up to 3 artifacts' requests and each revision is independent; a historical revision can be restored as a local revision card without a model call, or branched from when it is outdated; nested blocks inside `Col`/`Row`/`Box`/`Grid`/`Card`/`Section`/`Carousel` accept content edits, same-parent reordering, model-added blocks and zero-model duplicate/delete/cross-container-move structure operations behind an opt-in toggle while the root order stays unchanged |
|
|
60
78
|
| Image export | Saves the rendered result as one PNG with a raw, rounded or card frame; background color and 1x/2x live on the Plugin detail page |
|
|
61
|
-
| Interactive-page export | Saves every card from the turn as a single-file HTML page;
|
|
79
|
+
| Interactive-page export | Saves every card from the turn as a single-file HTML page; workspace image files are inlined as data URLs so they render offline, and `@ToAssistant` copies its message plus a paste-back-into-DSH hint |
|
|
62
80
|
| Local execution | `$variables`, `@Set` and `@functions` run in the browser; only `@ToAssistant` writes a message back |
|
|
81
|
+
| Answer as a document (experimental) | An experimental Plugin-detail switch: an ordinary rendered answer drops the card shell and reads as chat message text; the model writes the whole answer into the page and adds no prose outside it. See [Known limitations](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/limitations.en.md) |
|
|
63
82
|
| Switch and style | Global defaults on the Plugin detail page; composer overrides per session; built-in Auto / Card / Article and custom templates |
|
|
64
83
|
| Custom templates and visual themes | Reusable display preferences with light/dark palettes, font, radius, density and shadow; use, rename, edit or delete in My styles |
|
|
65
84
|
| Chat-native on-demand UI | No template required; choose On-demand UI in the UI panel, send a normal message, clarify with the built-in question tool when needed |
|
|
66
|
-
| Free on-demand layouts
|
|
85
|
+
| Free on-demand layouts | Compose the page from the user's request; saved templates keep the free layout, preferences and theme without a Card/Article shell |
|
|
67
86
|
| Temporary results and optional saving | Inline style snapshots are ready to use, adjust or save later; no required preview, naming or saving |
|
|
68
87
|
| Bilingual UI | Follows DSH's Chinese or English UI language |
|
|
69
88
|
| Agent Skill | Registers `intelligent-ui` with the plugin so the model can load syntax, examples and troubleshooting on demand |
|
|
70
|
-
| Plugin detail page | Manage global enablement, default style, templates, composition and export preferences in one place |
|
|
89
|
+
| Plugin detail page | Manage global enablement, default style, templates, composition, experimental features and export preferences in one place |
|
|
90
|
+
| Update notice | The Host reads the npm `latest` stable version (six-hour cache; highlights come from the human-reviewed `release-notes/<version>.md`; an optional `<version>.en.md` serves English UIs and falls back to the default file when missing); a newer version adds one sidebar card whose "View details" label opens a popover with the points; clicking the rest of the card (including the always-right arrow) opens the plugin detail page. The card stays in normal flow and never covers Plugins or Automation tasks |
|
|
71
91
|
| Replayable | Programs and temporary styles replay from recorded tool arguments; exported pages freeze the scheme at export time |
|
|
72
92
|
|
|
73
93
|
## Getting the code
|
|
@@ -85,17 +105,17 @@ To contribute, fork this repository and clone your fork. To use the plugin, inst
|
|
|
85
105
|
|
|
86
106
|
These commands are for DSH Web and source development; DSH Desktop users can follow the in-app steps in [Quick start](#quick-start).
|
|
87
107
|
|
|
88
|
-
- **DSH 0.2.
|
|
108
|
+
- **DSH 0.2.2 plugin API** (the [`dsh` CLI](https://www.npmjs.com/package/@deepseek-ai/dsh)): the Host/Client halves and plugin protocol target this version; the verified version is `0.2.2-rc.1` (current latest), and later versions are unverified. Install the latest: `npm install -g @deepseek-ai/dsh`.
|
|
89
109
|
- **[Node.js 24 and its bundled npm](https://nodejs.org/en/download)**: builds, tests and the publish workflow use Node 24. The repository has no `engines` or `.nvmrc` pin, so select Node 24 before running `npm install`; the Host's Node 22 build target does not verify the whole toolchain on Node 22.
|
|
90
110
|
- **[Git](https://git-scm.com/downloads)**: needed only to get the source; the repository sets no minimum version.
|
|
91
|
-
- **`@deepseek-ai/dsh-client-locale`**: the browser half requires a deployment that composes it; DSH Web 0.2.
|
|
111
|
+
- **`@deepseek-ai/dsh-client-locale`**: the browser half requires a deployment that composes it; DSH Web 0.2.2 includes it by default, and without it the switch and card do not mount (the Host tool and prompt keep working).
|
|
92
112
|
|
|
93
113
|
Confirm the tools are present:
|
|
94
114
|
|
|
95
115
|
```bash
|
|
96
116
|
node --version # v24.x
|
|
97
117
|
npm --version
|
|
98
|
-
dsh --version # verified: 0.2.
|
|
118
|
+
dsh --version # verified: 0.2.2-rc.1
|
|
99
119
|
git --version # only needed to get the source
|
|
100
120
|
```
|
|
101
121
|
|
|
@@ -103,10 +123,10 @@ The restart examples cover a foreground `dsh web`, macOS launchd and Linux syste
|
|
|
103
123
|
|
|
104
124
|
## Quick start
|
|
105
125
|
|
|
106
|
-
**DSH Web**: install the published 0.
|
|
126
|
+
**DSH Web**: install the published 0.6.1 package and start the Web UI (first foreground run):
|
|
107
127
|
|
|
108
128
|
```bash
|
|
109
|
-
dsh plugin --profile web add @zephinel/dsh-intelligent-ui@0.
|
|
129
|
+
dsh plugin --profile web add @zephinel/dsh-intelligent-ui@0.6.1
|
|
110
130
|
dsh web
|
|
111
131
|
```
|
|
112
132
|
|
|
@@ -117,69 +137,50 @@ Alternative sources replace the install command above: use `dsh plugin --profile
|
|
|
117
137
|
**DSH Desktop** needs no terminal command — install it inside the app:
|
|
118
138
|
|
|
119
139
|
1. Open **Plugins** in the sidebar → **Add plugin** (or the arrow → **Install a third-party plugin**).
|
|
120
|
-
2. Enter `@zephinel/dsh-intelligent-ui@0.
|
|
140
|
+
2. Enter `@zephinel/dsh-intelligent-ui@0.6.1` (or just the package name for the latest), then click **Install**.
|
|
121
141
|
3. When the install finishes, click **Enable now**; if the **UI** control does not appear, quit and reopen DSH Desktop.
|
|
122
142
|
|
|
123
143
|
The desktop profile is owned by the Electron app, so `dsh plugin --profile desktop` is rejected. A mainland-China mirror can lag behind the official npm registry for a fresh release; switch the install source back to npm if the version is not found.
|
|
124
144
|
|
|
125
|
-
After installing, click **UI**, choose **This session only** (or send `/iui on`), then send the itinerary example at the top. An interactive itinerary at the end of the turn confirms it works.
|
|
145
|
+
After installing, click **UI**, choose **This session only** (or send `/iui on`), then send the itinerary example at the top. An interactive itinerary at the end of the turn confirms it works. To set the session Auto / Card / Article style, reopen the **UI** menu and choose **Display style** (or click the already-active **This session only** entry) — switching the scope itself no longer opens the panel.
|
|
126
146
|
|
|
127
147
|
See [Development and deployment](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/development.en.md) for the local-checkout development loop, uninstall and troubleshooting; the extension has no development server of its own.
|
|
128
148
|
|
|
129
149
|
## Switch and answer style
|
|
130
150
|
|
|
131
|
-

|
|
151
|
+

|
|
134
152
|
|
|
135
153
|
- **Global defaults:** the Plugin detail page sets **Enable in all sessions** and **Answer style** for new sessions; choose a built-in style or a saved global template.
|
|
136
|
-
- **Session overrides:** Composer **UI** chip
|
|
137
|
-
- **Auto**
|
|
154
|
+
- **Session overrides:** Composer **UI** chip: switching the scope only changes the enable state and never opens the panel; open the panel from the **Display style** row, or by clicking the already-active session entry while it resolves to enabled. built-in Auto / Card / Article preview cards, **Custom styles** (saved templates), then **On-demand UI** at the bottom. **Follow global** follows the global switch for this session without turning it on globally; the chip shows `global on` / `global off`, so a globally-off state reads `Follow global · global off`. Commands are `/iui on|off|inherit` and `/iui style auto|card|article|inherit|<cs_id>`.
|
|
155
|
+
- **Auto** decides both format and layout: first whether the answer needs a page at all; when it renders, compact Card for interactive/structured answers, Article for detailed/long-form ones, or a free layout when neither shell fits (`Toc`/`Section` optional). Article needs a `Toc`, collapsible `Section`s and substantive prose. **Card / Article are layout preferences for when a page is rendered**; the model may still answer in Markdown when text serves better.
|
|
156
|
+
- **Document answer (experimental):** the Plugin detail page's **Experimental** group offers **Answer as a document (experimental)**. When on, an ordinary rendered answer has no card header, collapse control, frame or actions and reads as this turn's chat message text; the model puts ordinary content (prose, tables, ...) and interactive blocks into one `render_ui` program and adds no Markdown outside it. It is a stopgap for in-message UI: the page still lives at the turn tail, copying, search and transcript Markdown export do not include its body, and the switch will be removed once DSH supports in-message UI natively; on-demand generation, saved templates and Artifact edit requests are unaffected.
|
|
138
157
|
- **On-demand UI:** choosing it closes the panel, focuses the composer and shows a cancellable hint with examples. Examples fill without sending and preserve the existing draft. Send normally: clear requests render directly; material ambiguity uses the built-in `ask_user_question`, then generation continues after the answer.
|
|
139
158
|
- Session enable/style settings are written atomically to `<DSH_HOME>/dsh-intelligent-ui.json`. An on-demand operation changes neither setting; a temporary style is not the selected style. See [Architecture and behavior](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/architecture.en.md) for the boundaries.
|
|
140
159
|
|
|
141
|
-

|
|
142
|
-
|
|
143
160
|
## Usage
|
|
144
161
|
|
|
145
|
-
With the switch on,
|
|
162
|
+
With the switch on, ask in natural language:
|
|
146
163
|
|
|
147
164
|
- "Plan two days in Shanghai, with checkboxes and adjustments"
|
|
148
|
-
- "Build a
|
|
149
|
-
- "Turn these tables into a sales dashboard
|
|
150
|
-
- "Introduce Chinese history
|
|
151
|
-
- Choose On-demand UI
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
Once enabled, **any answer with structure defaults to a card** — including explanations, introductions, timelines, stages, comparisons and things to explore; Markdown is reserved for a single fact, a one- or two-sentence reply, an explicit request for text/document/code, or repeated render failures. When the switch is off the model cannot see `render_ui` and answers in plain text — that is not a failure; turn the switch on and ask again.
|
|
155
|
-
|
|
156
|
-
To guarantee a card (or when the model still replies in text), invoke the skill explicitly with `/intelligent-ui` in a session where the switch is on; explicit invocation is treated as a direct instruction. You can also say "read the intelligent-ui skill and then build ... with render_ui".
|
|
157
|
-
|
|
158
|
-

|
|
159
|
-
|
|
160
|
-

|
|
161
|
-
|
|
162
|
-
A temporary result is ready to use. **Adjust style** binds that result and fills an adjustment prompt while preserving your draft; send it normally. **Save as template** optionally asks for a name, description and availability (this session or global); saving preserves the result’s layout (free/card/article), preferences and explicit light/dark theme without a layout choice. A result without an explicit theme inherits the session theme and is not offered Save as template, because there is no palette to copy. Free templates have a local preview and **Free layout** hint; selecting one keeps the DSH card header without a Card/Article shell, with optional Toc/Section. Saving reuses the validated result style, makes no new model request, and neither selects the template nor changes the global default. No preview, naming or saving is required before use.
|
|
163
|
-
|
|
164
|
-
**Since 0.5.0**: the Host requires free layout for new on-demand generation; adjustments preserve the parent layout (free, legacy card or article). If the parent snapshot is absent from the latest-200 result registry, adjustment returns an error; cancel it and choose **On-demand UI** again. Historical results can still replay from tool arguments.
|
|
165
|
+
- "Build a 7-speed bicycle shifting simulator"
|
|
166
|
+
- "Turn these tables into a filterable sales dashboard"
|
|
167
|
+
- "Introduce Chinese history with expandable dynasties"
|
|
168
|
+
- Choose **On-demand UI**, then send "Turn this analysis into a compact dashboard with cards and charts"
|
|
169
|
+
- Click **Edit** in a rendered page, change blocks or reorder them, then send normally
|
|
165
170
|
|
|
166
|
-
|
|
171
|
+
Edit requests live in composer chips: one per artifact, `Edit {title} · revision N · {summary}` (plus ` · branch` when branching). Removing a chip only detaches its draft from this send; re-attach it from the **pending edits** area. One send can merge up to 3 artifacts.
|
|
167
172
|
|
|
168
|
-
|
|
173
|
+
With the switch on, the model decides per answer whether a page helps; to require a page for that turn (or when the model still answers in text), invoke `/intelligent-ui` in an enabled session. See the [usage guide](docs/usage.en.md) for switches, templates, on-demand generation and editing.
|
|
169
174
|
|
|
170
|
-
|
|
175
|
+
### Temporary results
|
|
171
176
|
|
|
172
|
-
|
|
177
|
+

|
|
173
178
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
**Security boundary**: an external template's name and display preferences enter the prompt and may affect model behavior; the description is stored/exported only and never enters the prompt. All three are treated as untrusted text. Preview, acknowledgement and no automatic application mitigate risk without eliminating prompt injection; DSH’s tool/permission layer controls execution authority. The current implementation follows the owner-approved approach (2026-10-24): a disclaimer plus acknowledgement before retaining external content. Real-deployment Origin/CSRF and tool-privilege auditing remain recommended pre-release hardening.
|
|
177
|
-
|
|
178
|
-
Once an answer has rendered, a labeled **export pill** appears at the **far right** of the message action strip (visually distinct from the native copy / like / branch icons); only answers rendered by the extension have it. It can save every card from that turn as one PNG — **Raw** (the answer alone), **Rounded** (background color and rounded padding) or **Card** (padding, rounded corners and a soft shadow) — or export them as a single-file HTML page, which opens in a browser with the interactions intact; in that page `@ToAssistant` copies the message and shows the paste-back-into-DSH hint instead of calling DSH. The image contains the rendered cards only, not the Markdown text around them and not the export control itself. See [Architecture and behavior](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/architecture.en.md) for the full flow.
|
|
179
|
+
Temporary results are usable immediately; style adjustment happens inside the card's **Edit** canvas (**Style → Change style**: describe the change or switch to a built-in/saved style; the Host keeps the layout and only warns about content changes), while **Save as template** asks for a name and scope. Saving reuses the validated style snapshot and does not select the template or change the global default. Old Hosts or non-editable temporary cards keep the footer Adjust style fallback; redirected read-only fallback cards keep neither Save nor Adjust.
|
|
179
180
|
|
|
180
181
|
## Build, test and deploy
|
|
181
182
|
|
|
182
|
-
Start at the checkout root from [Getting the code](#getting-the-code). `npm install` builds automatically through `prepare`; the local installer defaults to the `web` profile and backs up its patch. If that profile already has the npm/GitHub version, remove it first with `dsh plugin --profile web remove @zephinel/dsh-intelligent-ui` to avoid registering the plugin twice.
|
|
183
|
+
Start at the checkout root from [Getting the code](#getting-the-code). `npm install` builds automatically through `prepare`; the local installer defaults to the `web` profile and backs up its patch. If that profile already has the npm/GitHub version, remove it first with `dsh plugin --profile web remove @zephinel/dsh-intelligent-ui` to avoid registering the plugin twice. See [Two install modes and switching](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/development.en.md#two-install-modes-and-switching) for the switch and rollback steps, and [Pre-release checks](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/development.en.md#pre-release-checks) for the publish gate.
|
|
183
184
|
|
|
184
185
|
```bash
|
|
185
186
|
npm install
|
|
@@ -197,54 +198,55 @@ Everyday checks and packaging:
|
|
|
197
198
|
| `npm run build` | Generate the prompt, Host, Client and standalone export-page bundles |
|
|
198
199
|
| `npm test` | Run Host, Client and packaging Node tests after a build |
|
|
199
200
|
| `npm run typecheck` | Run `tsc --noEmit` (the browser `src/client` half is currently excluded: its DSH platform types are runtime-provided) |
|
|
200
|
-
| `npm run check` | Full pre-submit check: typecheck, build, Node tests
|
|
201
|
+
| `npm run check` | Full pre-submit check: typecheck, build, Node tests, renderer checks, docs facts/links and packaged-manifest facts |
|
|
201
202
|
| `npm run pack:check` | Preview the final npm package file list without publishing |
|
|
202
|
-
| `npm run
|
|
203
|
+
| `npm run check:release` | Extract the packed tarball, check that every packed path exists in the checkout, hash-compare `lib/`, `skills/`, `locale/` and the bundle patch, then install it into a throwaway `$DSH_HOME` on an isolated port and verify the installed file set and hashes, the mounted row, the served client bundle and uninstall; never touches the user's profile; needs the `dsh` CLI and pnpm on PATH |
|
|
204
|
+
| `npm run test:browser` | Run 10 browser suites after a build; Chrome required. `test/browser/visual-baselines/` holds manual visual baselines (5 PNGs + `captures.json` + `SHA256SUMS`) with no automated pixel comparison |
|
|
203
205
|
|
|
204
|
-
- Current main-
|
|
206
|
+
- Current verification record (local `main`, pushed and in sync with origin/main; the Auto format decision, the merged revision stage/version bar and block-arrangement batch operations, the composer notice and draft-row chips, this independent re-review follow-up, and the sidebar update card (Host reads npm `latest` plus the human-reviewed release highlights; the card opens a popover whose arrow opens the plugin detail page)): **821/821** Node tests (Host 320, Client 464, packaging 37; covering block editing/arrangement/multi-card/branch/restore/draft persistence/temporary style/nested editing/hierarchical order/structure operations/container expansion/model additions/cross-container moves/structure preview/strict protection/runtime state/panel animation and width fit/experimental document mode (prompt, tool, replay and browser rendering)/revision history and deletion rollback/local image sources/active revision stage and visibility fallback/recent-tasks version bar with screenshot thumbnails/root and nested batch selection, ordering, duplicate/delete and draft confirmation; and the edit pipeline (pending structure queue, batch save/cancel, explicit global-instruction save, total Apply preview, draft remap after the structural revision, automatic model-request send and root structure operations on deep pages up to CST depth 10, plus the Phase A review fixes: nested Apply rebuild, queued-structure send blocking, attached preservation, preview contract checks and honest auto-send confirmation, and the Phase B review fixes: displayed-revision deletion fallback/read-only recovery, concrete image-export errors, props revision labels, the single 20-op shared cap and the contextual docs-facts checker)); renderer parse/render **42/42** each, CSS/prop contract **50/50** and **63/63**, typography **22/22**, i18n **4** programs, nested CSS-compensation contract **28/28 direct + 5/5 scoped**; **10/10** browser suites passed, including **101** settings template-exchange, **114** on-demand, **50** interactive-page and **76** image-export assertions, plus **944** checks in the Artifact block-editing suite and **75** checks in the nested edit-renderer suite. Browser tests cover components/contracts; real-model validation scope and remaining scenarios are in the [verification record](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/verification.en.md) (historical evidence).
|
|
205
207
|
- `node scripts/capture-screenshots.mjs` rebuilds panel, hint, temporary-result and settings captures at 2x in Chrome using fixed DSH tokens, production components and fake services. English UI; shell card glyphs use lucide stand-ins.
|
|
206
208
|
- The typography check inside `npm run check` needs a local Chrome; without one that check is skipped and the remaining tests still run. Use `CHROME_BIN` for a non-default Chrome executable location (also used by the browser suites).
|
|
207
209
|
|
|
208
210
|
The published artifact is a DSH bundle; deploying means installing the plugin into the target DSH profile. See [Development and deployment](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/development.en.md) for uninstall and version notes.
|
|
209
211
|
|
|
212
|
+
## Publication and listing
|
|
213
|
+
|
|
214
|
+
The extension is published to npm and GitHub and indexed by these DSH community markets (DSH has no built-in official marketplace; Discover only reads user-added index sources):
|
|
215
|
+
|
|
216
|
+
- **awesome-dsh-plugin / dsh-market**: [awesome entry](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/blob/main/data/plugins/Zephinel__dsh-intelligent-ui.yml) · [listing page](https://awesome-dsh-plugin.com/p/Zephinel/dsh-intelligent-ui/); dsh-market's catalog comes from awesome and syncs with it.
|
|
217
|
+
- **Open Plugin Market**: [index entry](https://dshopen.org/plugins/@zephinel/dsh-intelligent-ui/) ([dshopen.org](https://dshopen.org/)).
|
|
218
|
+
- **bradeGithub/DSH-Plugins-Marketplace**: auto-indexed from the GitHub `dsh-plugin` topic.
|
|
219
|
+
|
|
220
|
+
npm package: [`@zephinel/dsh-intelligent-ui`](https://www.npmjs.com/package/@zephinel/dsh-intelligent-ui) (default `latest`); GitHub repository: [Zephinel/dsh-intelligent-ui](https://github.com/Zephinel/dsh-intelligent-ui) (topics: `dsh-plugin`, `dsh-bundle`, `deepseek-harness`, `intelligent-ui`, `agent-skills`).
|
|
221
|
+
|
|
222
|
+
Market versions follow npm `latest`; after publishing a new version and pushing the repository, the markets refresh on their own schedule without a new submission. Screenshots come from this repository's `screenshots.json`; maintenance details are in [Development and deployment](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/development.en.md#community-marketplace-maintenance).
|
|
223
|
+
|
|
210
224
|
## Contributing
|
|
211
225
|
|
|
212
226
|
- Questions and feature requests: use [GitHub Issues](https://github.com/Zephinel/dsh-intelligent-ui/issues).
|
|
213
|
-
- Run `npm run check` before opening a PR;
|
|
227
|
+
- Run `npm run check` before opening a PR; CI ([`ci.yml`](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/.github/workflows/ci.yml)) runs the local gate on PRs and main: CHANGELOG/PRODUCT/docs-only diffs run just the docs checks, while the packed README pair takes the full gate; the ten browser suites run on main for code changes. Releases use the [GitHub Actions Trusted Publishing workflow](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/.github/workflows/publish.yml) on `v*` tags; the development guide describes the process.
|
|
214
228
|
- Contributors and AI coding agents should follow the [doc-sync skill](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/.agents/skills/sync-iui-docs/SKILL.md): when behavior, copy or counts change, update both READMEs, `CHANGELOG.md` and the matching documents under `docs/`. In a checkout, use the local `.agents/skills/sync-iui-docs/SKILL.md`.
|
|
215
229
|
- Maintainer: [@Zephinel](https://github.com/Zephinel).
|
|
216
230
|
|
|
217
231
|
## Known limitations
|
|
218
232
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
- The
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
-
|
|
225
|
-
-
|
|
226
|
-
- Every card rendered by one turn is combined into one image; the image captures **what is currently rendered**, so it includes the interaction state at export time (checked items, active filters and so on). The export waits for in-card photos and image searches to settle (at most about 12.5 seconds); offline or still-pending photos are recorded from the placeholder state shown on the page.
|
|
227
|
-
- The interactive-page export inlines the renderer, the current theme and every card into one HTML file (about 3.4–4.9 MB), so it is large but install-free; maps, photos and other components still need the network. `@ToAssistant` in that page tries the clipboard and shows a toast; when the clipboard is unavailable the toast keeps the message for manual copying.
|
|
228
|
-
- The browser half requires a deployment that composes `dsh-client-locale` (included by default in DSH Web 0.2.1); a minimal custom profile without it will not mount the switch or the card, while the Host tool and prompt keep working.
|
|
229
|
-
- The configuration on the Plugin detail page requires the DSH settings services: a minimal custom profile without `dsh-settings` / `dsh-client-ui-settings` does not show it, and a Host/Client version mismatch can leave the switch unavailable. Global enable/style and free-form layout only change the prompt and page shape; no model is guaranteed to follow them perfectly, and session style overrides still rely on the Host-injected prompt.
|
|
230
|
-
- The interactive-page export needs the `webServer` service (included by default in DSH Web 0.2.1); a minimal custom profile without it cannot build the exported page, while image export is unaffected.
|
|
231
|
-
|
|
232
|
-
- Temporary styles live in recorded tool arguments/result snapshots, outside the catalog. Replay needs the call arguments in the loaded history window. Saving later depends on the bounded result registry (latest 200 records); an evicted result may still replay but cannot be saved. Saved templates and result snapshots persist in separate JSON files under `<DSH_HOME>`.
|
|
233
|
-
- Style creation/on-demand generation uses the deployment's default main-conversation model services; the extension supplies no separate generation model or draft interview service. `ask_user_question` is the structured clarification path; if unavailable, text questions are a degraded fallback — the hint stays and the next message continues the same operation without re-selecting On-demand UI (except after expiry, restart or failure).
|
|
234
|
-
- Operations are in memory: armed intent expires after 10 minutes; active operations cannot resume after restart and must be re-armed. Completed results survive. There is one active operation per session: re-arming replaces it while armed, while a bound running/clarifying operation rejects re-arming until explicitly cancelled. Clarification is limited to two rounds. A text-only completion without rendering returns to the pending/resume state and the next message continues; failed/interrupted turns show Retry/Dismiss guidance.
|
|
235
|
-
- Multi-tab binding is conservative: only the arming tab shows the hint, but the Host binds the next human message in the session without verifying its sending tab. Send from the arming tab and avoid concurrent messages in another tab.
|
|
236
|
-
- Custom themes apply to the renderer host; portaled popovers and sandboxed iframes keep the default theme, and semantic status colors remain renderer-owned. Exported pages freeze the light/dark scheme at export time.
|
|
237
|
-
- Saved-template directives are bounded display preferences (2,000 characters), with no authority over system, tool or safety rules. Limits are 40 global templates and 20 per session. Missing/deleted saved templates fall back to the default theme; a theme-less temporary result inherits the session template or built-in theme, while a snapshot with an explicit theme remains catalog-independent.
|
|
233
|
+
Cards appear at the end of the turn; full boundaries for model validation, network dependencies, export, template security, editing scope, legacy pages/base limits and unverified accessibility are in [Known limitations](docs/limitations.en.md).
|
|
234
|
+
|
|
235
|
+
- The experimental document answer only simulates message-body presentation: the content still lives in a turn-tail `render_ui` result rather than in the message, so copying, search and transcript Markdown export omit its body; the document page has no card editing entry or revision history; only the Web renderer (Web/Desktop) shows it — clients that do not render plugin cards (TUI/headless) show nothing. The switch affects future answers only; a recorded document answer keeps its recorded presentation.
|
|
236
|
+
- Editing covers direct children of the root `Col` and blocks inside seven containers; the CST node budget is 200, so larger pages are not editable.
|
|
237
|
+
- Legacy pages need no manual migration: the first open of editing, revision history or restore registers the authoritative program automatically; under a mixed old Host or a failed registration, quick property adjust falls back to instruction editing and structure operations may need a re-render.
|
|
238
|
+
- Real screen readers, Windows High Contrast, iPad/Safari and dark-theme input-focus contrast are unmeasured; visual baselines are manual comparisons.
|
|
239
|
+
- After a client-bundle change, restart `dsh-web`; a page refresh is not enough.
|
|
238
240
|
|
|
239
241
|
## FAQ
|
|
240
242
|
|
|
241
243
|
**Must I create a template, preview or name it first?** No. Choose On-demand UI and chat normally; use the result immediately. A name is needed only when you choose Save as template. Temporary results do not replace the selected session style.
|
|
242
244
|
|
|
243
|
-
**Can I save later or keep adjusting?** Yes.
|
|
245
|
+
**Can I save later or keep adjusting?** Yes. Open the card's **Edit** canvas and either describe the visual change under **Style → Change style** or switch directly with **Switch style**; Save as template stays on the card footer. Saving uses the clicked result's version, not a later result. If the registry has evicted it, saving reports an unavailable snapshot.
|
|
244
246
|
|
|
245
247
|
**Why did clarification not continue generation?** A structured `ask_user_question` answer resumes the same operation; after a text question, the next message automatically continues it. Only expiry, restart, failure or interruption needs a re-arm/retry. Concurrent messages in multiple tabs may also consume the same intent.
|
|
246
248
|
|
|
247
|
-
**Why does an answer come back as plain text with no card?** First check that the switch is on for that session (the **UI** control in the composer, or `/iui on`). Even then the model
|
|
249
|
+
**Why does an answer come back as plain text with no card?** First check that the switch is on for that session (the **UI** control in the composer, or `/iui on`). Even then the model decides whether a page helps: a short answer, a concise explanation, code, a translation or an explicit text request is expected to stay in Markdown. To require a page for that turn, invoke the skill explicitly with `/intelligent-ui` in a session where the switch is on. See [Usage](#usage).
|
|
248
250
|
|
|
249
251
|
**Why is there no export pill under an answer?** Only answers rendered by the extension have it; it is absent when the switch is off, the model replies in text, or rendering fails. See [Usage](#usage) and [Known limitations](#known-limitations).
|
|
250
252
|
|
|
@@ -254,12 +256,31 @@ The published artifact is a DSH bundle; deploying means installing the plugin in
|
|
|
254
256
|
|
|
255
257
|
Detailed docs, the changelog and repository maintenance skills are excluded from the npm package, so their links use absolute GitHub URLs. For uncommitted features, use the corresponding files in the checkout.
|
|
256
258
|
|
|
257
|
-
- [Architecture and behavior](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/architecture.en.md): Host/Client component tree, the full switch and answer-style semantics, UI language, image and interactive-page export flows, and the Agent Skill.
|
|
259
|
+
- [Architecture and behavior](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/architecture.en.md): Host/Client component tree, the full switch and answer-style semantics, Artifact block editing, arrangement and multi-card parallel editing, UI language, image and interactive-page export flows, and the Agent Skill.
|
|
258
260
|
- [Development and deployment](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/development.en.md): install and uninstall, development commands, the restart tip after renaming/rebuilding, Host/Client version mismatch, release layout and community marketplace maintenance.
|
|
259
261
|
- [Verification record](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/verification.en.md): end-to-end verification, test and packaging results (historical).
|
|
260
262
|
- [Changelog](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/CHANGELOG.md): additions, changes and fixes per release.
|
|
263
|
+
- [Usage guide](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/usage.en.md): switch, asking, editing, templates and export.
|
|
264
|
+
- [Known limitations](https://github.com/Zephinel/dsh-intelligent-ui/blob/main/docs/limitations.en.md): current boundaries and unverified areas.
|
|
261
265
|
- [GitHub Releases](https://github.com/Zephinel/dsh-intelligent-ui/releases): dated release pages with install notes.
|
|
262
266
|
|
|
267
|
+
## Credits and third-party dependencies
|
|
268
|
+
|
|
269
|
+
This extension builds on the following open-source projects and assets; thanks to their authors and maintainers:
|
|
270
|
+
|
|
271
|
+
- **[Open Intelligent UI](https://github.com/thesysdev/open-intelligent-ui) / [OpenUI](https://github.com/thesysdev/openui)** — the starting point for the component library, renderer, system prompt and component spec. MIT, Copyright (c) 2026 Thesys Inc.
|
|
272
|
+
- **OpenUI packages** — `@openuidev/lang-core`, `@openuidev/react-lang`, plus the transitive `@openuidev/devtools` and `@openuidev/observability`; they parse OpenUI Lang, define components and render them. MIT.
|
|
273
|
+
- **[Remix Icon](https://github.com/Remix-Design/RemixIcon)** — icons used by the plugin's own chrome (edit, delete, move, locate, info, etc.); path data is transcribed as-is. Remix Icon License v1.0, Copyright (c) 2017-2026 Remix Design.
|
|
274
|
+
- **[lucide-react](https://github.com/lucide-icons/lucide)** — icons for the model-rendered `Icon` component. ISC.
|
|
275
|
+
- **[KaTeX](https://github.com/KaTeX/KaTeX)** — math rendering for the `Math` component, including the bundled fonts. MIT.
|
|
276
|
+
- **[MapLibre GL JS](https://github.com/maplibre/maplibre-gl-js)** — map and route rendering; its worker source is embedded in the bundle. BSD-3-Clause, Copyright (c) MapLibre contributors.
|
|
277
|
+
- **[SnapDOM](https://github.com/zumerlab/snapdom)** (`@zumer/snapdom`) — answer-card image export. MIT, Copyright (c) 2025 ZumerLab.
|
|
278
|
+
- **[zod](https://github.com/colinhacks/zod)** — runtime validation for component props and OpenUI programs. MIT.
|
|
279
|
+
|
|
280
|
+
**React / React DOM** (MIT) are provided by the DSH Web platform; the standalone interactive-page bundle inlines them. Map tiles and routing data come from OpenFreeMap / OpenMapTiles / OpenStreetMap, Esri and OSRM, and the map shows the corresponding attribution in place.
|
|
281
|
+
|
|
282
|
+
Full license texts are in [NOTICE](NOTICE) and [licenses/](licenses/). If something is missing or misattributed, please open an issue or PR.
|
|
283
|
+
|
|
263
284
|
## License
|
|
264
285
|
|
|
265
286
|
This project is [MIT](LICENSE). It is based on Open Intelligent UI (MIT, Copyright (c) 2026 Thesys Inc.) and the OpenUI ecosystem; the browser bundle contains lucide-react (ISC), KaTeX (MIT), MapLibre GL JS (BSD-3-Clause), zod (MIT) and SnapDOM (MIT); the standalone interactive-page bundle also inlines React / React DOM (MIT). Full notices and license texts are in [NOTICE](NOTICE) and [licenses/](licenses/).
|