dsh-genui-a2ui 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.en.md +106 -0
- package/README.md +105 -2
- package/THIRD_PARTY_NOTICES.md +48 -0
- package/assets/icon.svg +19 -0
- package/assets/screenshots/hero-executive-dashboard.png +0 -0
- package/cordis.patch.yml +6 -0
- package/docs/DETAIL.md +35 -0
- package/docs/DETAIL.zh.md +35 -0
- package/lib/client.echarts.js +47 -0
- package/lib/client.js +11 -0
- package/lib/client.mermaid.js +3728 -0
- package/lib/client.runtime.js +979 -0
- package/lib/index.js +287 -0
- package/locale/en.json +7 -0
- package/locale/zh-CN.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +135 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Geekhyt and dsh-genui-a2ui contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# dsh-genui-a2ui
|
|
2
|
+
|
|
3
|
+
[简体中文](./README.md) | **English** | [Developer and architecture guide](./docs/DEVELOPMENT.md)
|
|
4
|
+
|
|
5
|
+
[](https://github.com/Geekhyt/dsh-genui-a2ui/actions/workflows/ci.yml) [](https://www.npmjs.com/package/dsh-genui-a2ui) [](./LICENSE) [](https://github.com/google/A2UI) [](./package.json)
|
|
6
|
+
|
|
7
|
+
**Don't just chat. Let AI speak in interfaces.**
|
|
8
|
+
|
|
9
|
+
`dsh-genui-a2ui` brings Google's open A2UI (Agent to User Interface) standard to DeepSeek Harness. Simple questions still get fast text replies. When plain text falls short, AI renders clickable, draggable, filterable native UI directly inside your chat.
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
**Option 1: Install directly inside DeepSeek Harness (recommended, no terminal or restart needed)**
|
|
14
|
+
|
|
15
|
+
Open **Plugins** in the left sidebar, click **Add plugin**, enter `dsh-genui-a2ui`, and choose **Enable now**.
|
|
16
|
+
|
|
17
|
+
**Option 2: Install via CLI**
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
dsh plugin --profile desktop add dsh-genui-a2ui
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
To install from a local clone instead, run `npm ci && npm run build` and then `dsh plugin --profile desktop add link:./dsh-genui-a2ui`. To upgrade later, run `dsh plugin --profile desktop add dsh-genui-a2ui@latest`; to uninstall, run `dsh plugin --profile desktop remove dsh-genui-a2ui`.
|
|
24
|
+
|
|
25
|
+
Once enabled, ask questions as usual. Click **A2UI** below the input box or type `/a2ui off` anytime to switch back to plain text.
|
|
26
|
+
|
|
27
|
+
<details>
|
|
28
|
+
<summary><strong>Click to expand 8 ready-to-run example prompts</strong></summary>
|
|
29
|
+
|
|
30
|
+
1. **Executive conversion and health dashboard**: `Build a quarterly growth and conversion diagnostic dashboard with four KPI cards with sparklines on top, a four-stage Sankey flow paired with a five-axis health radar chart side by side, plus tabs for regional growth bars and a searchable channel ROI table.`
|
|
31
|
+
2. **Live multi-store operations dashboard**: `Create a live chain coffee store operations dashboard showing daily revenue, total orders, peak fulfillment rate, and stock alerts, paired with hourly channel area curves, a store-by-hour order heatmap, and a searchable inventory warning table.`
|
|
32
|
+
3. **Zero-latency LLM inference and cache simulator**: `Build a zero-latency LLM inference and prompt-cache cost calculator where I can switch models (DeepSeek-V3 vs DeepSeek-R1), drag sliders for daily call volume, prompt cache hit rate, and average output tokens, and see monthly spend, net cache savings, budget utilization, and a cost breakdown bar chart update live.`
|
|
33
|
+
4. **Code diff approval gate**: `Suppose you are updating our production gateway canary weight from 5% to 20% and adding a circuit-breaker timeout. Pause with a review card showing the split config diff, target cluster selector, and auto-rollback checkbox for my confirmation before proceeding.`
|
|
34
|
+
5. **Workspace architecture diagram and source explorer**: `Analyze the architecture of this workspace, render a layered Mermaid diagram alongside a clickable file tree and config JSON inspector so I can open any file directly in the right sidebar.`
|
|
35
|
+
6. **Persistent bottom task tracker**: `Pin a five-stage release verification tracker above the chat input showing step status and overall completion percentage across typecheck, bundle build, host API check, test suite, and tarball audit.`
|
|
36
|
+
7. **Market candlestick and volatility distribution**: `Create a 10-day market review dashboard combining a sentiment gauge with a daily OHLC candlestick chart and a sector return boxplot side by side.`
|
|
37
|
+
8. **Incident triage accordion and detail modal**: `Generate a layered API latency incident report using collapsible accordions for root-cause summary, key-value metrics, and mitigation steps, plus a modal button to inspect full slow-query details.`
|
|
38
|
+
|
|
39
|
+
</details>
|
|
40
|
+
|
|
41
|
+
## See it in action
|
|
42
|
+
|
|
43
|
+
### Diagnose multi-stage conversion flows and health scores
|
|
44
|
+
|
|
45
|
+
Equal-height KPI cards with sparklines pair with a four-stage Sankey flow and a five-axis radar chart in one view. Switch tabs to inspect regional revenue bars or filter channel ROI rows.
|
|
46
|
+
|
|
47
|
+

|
|
48
|
+
|
|
49
|
+
### Monitor live store operations and stock alerts
|
|
50
|
+
|
|
51
|
+
Track daily chain revenue, order volume, and peak-hour fulfillment in real time. Combine stacked channel area curves, store-by-hour order heatmaps, and searchable inventory warning tables on one screen.
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
### Model costs and returns with live sliders
|
|
56
|
+
|
|
57
|
+
Drag sliders or switch tiers to test budget, rate, or traffic assumptions right in chat. Totals, margins, and charts recalculate locally in 0 ms without spending extra tokens.
|
|
58
|
+
|
|
59
|
+

|
|
60
|
+
|
|
61
|
+
### Review diffs before approving critical actions
|
|
62
|
+
|
|
63
|
+
Pause high-impact changes with a review card above the chat input. Inspect the split code diff, select a rollout scope, and confirm before execution continues.
|
|
64
|
+
|
|
65
|
+

|
|
66
|
+
|
|
67
|
+
### Map layered system architecture to live source files
|
|
68
|
+
|
|
69
|
+
Render multi-layer Mermaid architecture diagrams alongside a workspace file tree and JSON inspector. Click any file node to open that exact line inside the right sidebar.
|
|
70
|
+
|
|
71
|
+

|
|
72
|
+
|
|
73
|
+
### Pin live task progress above the chat input
|
|
74
|
+
|
|
75
|
+
Keep multi-stage pipelines anchored at the bottom of the window. Stages and completion rates update in place while you scroll through earlier messages.
|
|
76
|
+
|
|
77
|
+

|
|
78
|
+
|
|
79
|
+
## Why A2UI
|
|
80
|
+
|
|
81
|
+
- **Safe by design**: Built on Google's A2UI 1.0 specification, models output declarative JSON only and never execute untrusted HTML or scripts.
|
|
82
|
+
- **Native look and feel**: Every surface renders with DeepSeek Harness UI primitives, adapting automatically to light mode, dark mode, and community themes.
|
|
83
|
+
- **Zero host patches, fast startup**: Built on official plugin APIs with a 16.1 KB gzipped core; chart and diagram engines load only on demand.
|
|
84
|
+
|
|
85
|
+
## Component catalog
|
|
86
|
+
|
|
87
|
+
Includes 32 native UI components, 14 interactive chart types, and full Mermaid diagram support:
|
|
88
|
+
|
|
89
|
+
| Category | Components | Purpose |
|
|
90
|
+
| :--- | :--- | :--- |
|
|
91
|
+
| **Layout containers** | `Card`, `Row`, `Column`, `Tabs`, `Accordion`, `List`, `Modal`, `Divider` | Multi-column dashboards, tabbed views, collapsible panels, and modal details |
|
|
92
|
+
| **Metrics and status** | `Stat`, `KeyValue`, `Steps`, `Progress` | KPI cards with deltas and sparklines, spec grids, step timelines, and progress bars |
|
|
93
|
+
| **Charts and tables** | `Chart`, `Mermaid`, `Table` | 14 interactive chart types, architecture diagrams, and searchable, sortable, paginated tables |
|
|
94
|
+
| **Code and workspace** | `Code`, `DiffView`, `FileTree`, `JsonTree` | Highlighted code, unified or split diffs, clickable workspace file trees, and JSON inspectors |
|
|
95
|
+
| **Form controls** | `Button`, `Slider`, `ChoicePicker`, `TextField`, `CheckBox`, `DateTimeInput` | Sliders, single or multi-select chips, validated inputs, date pickers, and action buttons |
|
|
96
|
+
| **Typography and alerts** | `Text`, `Callout`, `Badge`, `Icon` | Rich text, color-coded callouts, status badges, and semantic icons |
|
|
97
|
+
| **Media** | `Image`, `AudioPlayer`, `Video` | Inline image previews, audio players, and video playback |
|
|
98
|
+
|
|
99
|
+
- **14 interactive charts (`Chart`)**: Vertical and horizontal ranking bars (`bar`), `line`, `area`, donut and pie (`pie`), bubble and `scatter`, `radar`, `funnel`, `gauge`, `heatmap`, `treemap`, `sankey`, `boxplot`, network (`graph`), and `candlestick`.
|
|
100
|
+
- **Architecture and flow diagrams (`Mermaid`)**: Flowcharts, sequence diagrams, state machines, class diagrams, ER diagrams, Gantt charts, Git graphs, and mindmaps with `10%–2000%` lossless vector zoom, pointer-anchored wheel zoom, drag-to-pan, fit-to-viewport, fullscreen view, and source toggle.
|
|
101
|
+
|
|
102
|
+
## Documentation and license
|
|
103
|
+
|
|
104
|
+
- [Developer and architecture guide (English)](./docs/DEVELOPMENT.md) | [开发与架构文档(简体中文)](./docs/DEVELOPMENT.zh-CN.md)
|
|
105
|
+
- [Contributing guide](./CONTRIBUTING.md) | [Code of conduct](./CODE_OF_CONDUCT.md) | [Security policy](./SECURITY.md) | [Changelog](./CHANGELOG.md)
|
|
106
|
+
- Released under the [MIT License](./LICENSE). See [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md) for third-party open-source notices.
|
package/README.md
CHANGED
|
@@ -1,3 +1,106 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-genui-a2ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**简体中文** | [English](./README.en.md) | [开发与架构文档](./docs/DEVELOPMENT.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
[](https://github.com/Geekhyt/dsh-genui-a2ui/actions/workflows/ci.yml) [](https://www.npmjs.com/package/dsh-genui-a2ui) [](./LICENSE) [](https://github.com/google/A2UI) [](./package.json)
|
|
6
|
+
|
|
7
|
+
**别只靠文字聊天,让 AI 直接用界面与你沟通。**
|
|
8
|
+
|
|
9
|
+
`dsh-genui-a2ui` 将 Google 开源的 A2UI(Agent to User Interface)标准带入 DeepSeek Harness。简单问题依然用文字快回;遇到数据对比、测算推演、代码审阅或复杂流程时,AI 会在对话里直接生成可点击、可拖动、可筛选的原生交互界面。
|
|
10
|
+
|
|
11
|
+
## 快速开始
|
|
12
|
+
|
|
13
|
+
**方式一:客户端界面一键安装(推荐,免终端与重启)**
|
|
14
|
+
|
|
15
|
+
打开 DeepSeek Harness 左侧边栏的 **插件** 页面,点击 **添加插件**,输入 `dsh-genui-a2ui` 并选择 **立即启用** 即可直接使用。
|
|
16
|
+
|
|
17
|
+
**方式二:命令行安装**
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
dsh plugin --profile desktop add dsh-genui-a2ui
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
如果是从源码仓库本地体验,克隆后运行 `npm ci && npm run build`,再执行 `dsh plugin --profile desktop add link:./dsh-genui-a2ui` 即可。后续升级版本执行 `dsh plugin --profile desktop add dsh-genui-a2ui@latest`,卸载可执行 `dsh plugin --profile desktop remove dsh-genui-a2ui`。
|
|
24
|
+
|
|
25
|
+
安装启用后,像平时一样用自然语言提问;点击输入框左下方的 **A2UI** 按钮或输入 `/a2ui off` 可随时切回纯文字模式。
|
|
26
|
+
|
|
27
|
+
<details>
|
|
28
|
+
<summary><strong>点击展开 8 个可直接复制试跑的提示词示例</strong></summary>
|
|
29
|
+
|
|
30
|
+
1. **转化漏斗与健康度大盘**:`帮我做一份季度业务增长与全链路转化诊断看板,包含四个带趋势微图的核心指标卡,下方同屏放一张四阶桑基流向图和一张五维健康度雷达对比图,再用标签页放区域增长柱状图和可搜索的渠道明细表。`
|
|
31
|
+
2. **连锁门店实时经营看板**:`模拟一份连锁咖啡品牌今日实时经营仪表盘,顶部展示今日实收、总单量、高峰出杯准时率和缺货预警数,下方联动分时段全渠道面积图、各门店分时段单量热力图,以及可搜索排序的原料库存预警表。`
|
|
32
|
+
3. **零延迟算力与缓存成本测算器**:`做一个大模型推理算力与缓存成本实时测算沙盘,支持单选切换主力推理模型(DeepSeek-V3 / R1),并用滑块调节日均调用量、Prompt 缓存命中率和平均输出长度,本地实时算出月度总成本、缓存净节省额、预算水位与费用对比柱状图。`
|
|
33
|
+
4. **代码差异核对与确认单**:`假设你要把线上网关的灰度权重从 5% 调到 20% 并新增超时熔断参数,请先弹出交互确认卡片展示双栏配置差异、生效集群单选和自动回滚勾选框,等我确认后再继续。`
|
|
34
|
+
5. **当前工作区架构图与源码联动**:`梳理当前工作区项目的核心模块分层,画一张多层 Mermaid 架构图,并附上关键源码文件树和核心配置树,方便我点击直接在右侧打开对应文件。`
|
|
35
|
+
6. **底部常驻多阶段进度栏**:`把一个包含类型检查、分包构建、契约核验、回归测试和打包审计五步的发布流水线进度条固定在输入框上方,展示各阶段状态与整体完成百分比。`
|
|
36
|
+
7. **量化行情 K 线与波动分布**:`模拟一份科技指数近 10 个交易日的量化复盘看板,同屏组合情绪水位仪表盘、日 K 线图以及各细分板块涨跌幅箱线分布图。`
|
|
37
|
+
8. **故障排查折叠手风琴与详情弹窗**:`生成一份线上网关延迟突增的分级排查卡片,用折叠手风琴分层收纳根因摘要、关键指标键值表与回滚预案,并附带一个点击弹出慢查询详情的弹窗按钮。`
|
|
38
|
+
|
|
39
|
+
</details>
|
|
40
|
+
|
|
41
|
+
## 场景预览
|
|
42
|
+
|
|
43
|
+
### 一屏看清多阶转化流向与多维健康度
|
|
44
|
+
|
|
45
|
+
顶栏指标卡自动等高对齐并附带趋势微图。下方同屏组合四阶全链路桑基流向图与五维健康度雷达对比图,点击标签页还可切换区域柱状图与可检索明细表。
|
|
46
|
+
|
|
47
|
+

|
|
48
|
+
|
|
49
|
+
### 连锁门店实时经营与库存预警
|
|
50
|
+
|
|
51
|
+
汇总多门店今日实收、单量与高峰出杯准时率。同屏联动分时段全渠道面积图、门店客流热力矩阵与可搜索排序的原料库存预警表,异常门店一眼定位。
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
### 拖动滑块实时推演成本与回报
|
|
56
|
+
|
|
57
|
+
调整预算、利率或流量假设时,不必反复发消息等待重算。直接在对话内拖动滑块或切换档位,账单金额、预算水位与对比图表会在本地 0 ms 即时更新,不额外消耗 Token。
|
|
58
|
+
|
|
59
|
+

|
|
60
|
+
|
|
61
|
+
### 关键操作前先核对差异再放行
|
|
62
|
+
|
|
63
|
+
执行重要配置修改或高影响动作前,输入框上方会弹出确认卡片。核对双栏代码差异、选择生效范围并勾选确认后,任务才会继续执行。
|
|
64
|
+
|
|
65
|
+

|
|
66
|
+
|
|
67
|
+
### 分层系统架构图与右侧源码联动
|
|
68
|
+
|
|
69
|
+
多层级 Mermaid 系统架构图、工作区文件树与配置树同屏呈现。点击左侧任意文件节点,右侧边栏会直接打开真实工作区文件并跳到对应行号。
|
|
70
|
+
|
|
71
|
+

|
|
72
|
+
|
|
73
|
+
### 多步骤任务常驻底部实时跟进
|
|
74
|
+
|
|
75
|
+
运行长耗时检查或多阶段流水线时,进度条固定在输入框上方原地刷新。向上翻看历史消息时,也能随时掌握当前阶段与整体完成度。
|
|
76
|
+
|
|
77
|
+

|
|
78
|
+
|
|
79
|
+
## 为什么选择 A2UI
|
|
80
|
+
|
|
81
|
+
- **纯数据声明,安全流式渲染**:遵循 Google A2UI 1.0 规范,模型只输出结构化 JSON 描述,不注入外部 HTML 或执行未知脚本,支持边生成边上屏。
|
|
82
|
+
- **原生组件绘制,自动跟随主题**:界面由 DeepSeek Harness 原生设计体系渲染,自动适配浅色模式、深色模式与社区皮肤。
|
|
83
|
+
- **官方接口实现,按需加载更轻快**:基于官方插件接口构建,无任何宿主魔改;首屏核心包仅 16.1 KB(gzip),图表与流程图引擎仅在实际展示时按需加载。
|
|
84
|
+
|
|
85
|
+
## 组件与图表目录
|
|
86
|
+
|
|
87
|
+
内置 32 种原生交互组件、14 类动态图表与 Mermaid 流程图:
|
|
88
|
+
|
|
89
|
+
| 分类 | 组件 | 用途 |
|
|
90
|
+
| :--- | :--- | :--- |
|
|
91
|
+
| **布局容器** | `Card`、`Row`、`Column`、`Tabs`、`Accordion`、`List`、`Modal`、`Divider` | 多栏看板、标签页切换、折叠面板与弹窗详情 |
|
|
92
|
+
| **指标与状态** | `Stat`、`KeyValue`、`Steps`、`Progress` | 带涨跌与微图的指标卡、参数表、步骤条与进度条 |
|
|
93
|
+
| **图表与表格** | `Chart`、`Mermaid`、`Table` | 14 类动态图表、架构时序图,以及可搜索、排序、分页的数据表 |
|
|
94
|
+
| **研发与工作区** | `Code`、`DiffView`、`FileTree`、`JsonTree` | 语法高亮代码、单双栏差异对比、联动右侧边栏的文件树与 JSON 树 |
|
|
95
|
+
| **表单交互** | `Button`、`Slider`、`ChoicePicker`、`TextField`、`CheckBox`、`DateTimeInput` | 滑块、单选多选组、校验输入框、日期时间选择与动作按钮 |
|
|
96
|
+
| **排版与提示** | `Text`、`Callout`、`Badge`、`Icon` | 文本排版、四色提示框、状态标签与语义图标 |
|
|
97
|
+
| **多媒体** | `Image`、`AudioPlayer`、`Video` | 对话内图片预览与音视频播放 |
|
|
98
|
+
|
|
99
|
+
- **14 类动态图表(`Chart`)**:柱状与横向排行图(`bar`)、折线图(`line`)、面积图(`area`)、饼图与环图(`pie`)、散点与气泡图(`scatter`)、雷达图(`radar`)、漏斗图(`funnel`)、仪表盘(`gauge`)、热力图(`heatmap`)、矩形树图(`treemap`)、桑基图(`sankey`)、箱线图(`boxplot`)、关系网络图(`graph`)、K 线图(`candlestick`)。
|
|
100
|
+
- **结构与流程图(`Mermaid`)**:流程图、时序图、状态机图、类图、ER 图、甘特图、Git 分支图与思维导图,支持 `10%–2000%` 矢量无损缩放、指针中心滚轮缩放、按住拖拽漫游、自适应复位、全屏查看与源码切换。
|
|
101
|
+
|
|
102
|
+
## 文档与许可
|
|
103
|
+
|
|
104
|
+
- [开发与架构文档(简体中文)](./docs/DEVELOPMENT.zh-CN.md) | [Developer and architecture guide (English)](./docs/DEVELOPMENT.md)
|
|
105
|
+
- [贡献指南](./CONTRIBUTING.md) | [行为准则](./CODE_OF_CONDUCT.md) | [安全策略](./SECURITY.md) | [更新日志](./CHANGELOG.md)
|
|
106
|
+
- 基于 [MIT License](./LICENSE) 开源,第三方开源依赖声明见 [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md)。
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
`dsh-genui-a2ui` distributes self-contained Host and Client bundles (`lib/*.js`) so end users can install the plugin with zero runtime npm dependency trees. Those bundles incorporate portions of the following permissive open-source packages:
|
|
4
|
+
|
|
5
|
+
| Package(s) | License | Role in `dsh-genui-a2ui` |
|
|
6
|
+
| :--- | :--- | :--- |
|
|
7
|
+
| `@a2ui/agent`, `@a2ui/react`, `@a2ui/web_core`, `@a2ui/markdown-it` | Apache-2.0 | Google A2UI 1.0 Express compiler, state processor, and React surface binding |
|
|
8
|
+
| `echarts` | Apache-2.0 | Lazy-loaded (`lib/client.echarts.js`) 14-kind canvas/SVG chart engine |
|
|
9
|
+
| `zrender` | BSD-3-Clause | 2D vector and canvas rendering engine underlying ECharts |
|
|
10
|
+
| `react-aria-components`, `react-aria`, `react-stately`, `@internationalized/*` | Apache-2.0 | Accessible headless UI primitives for interactive form controls |
|
|
11
|
+
| `@tanstack/react-table`, `@tanstack/table-core` | MIT | Headless sorting, filtering, and pagination state for `Table` |
|
|
12
|
+
| `mermaid`, `@mermaid-js/parser`, `dagre-d3-es`, `cytoscape*`, `roughjs`, `khroma` | MIT | Lazy-loaded (`lib/client.mermaid.js`) strict-sandbox diagram layout and rendering |
|
|
13
|
+
| `katex` | MIT | Math typesetting support inside Mermaid diagrams |
|
|
14
|
+
| `d3`, `d3-*` (`d3-array`, `d3-scale`, `d3-shape`, `d3-selection`, etc.) | ISC / BSD-3-Clause | Graph geometry, scales, and Sankey layout utilities used by Mermaid |
|
|
15
|
+
| `dompurify` | MPL-2.0 OR Apache-2.0 | HTML and SVG sanitization (used under Apache-2.0) |
|
|
16
|
+
| `lit`, `lit-html`, `lit-element`, `@lit/*`, `antlr4ng` | BSD-3-Clause | Reactive internals and grammar parser runtime used by `@a2ui/*` |
|
|
17
|
+
| `markdown-it`, `marked`, `dayjs`, `lodash-es`, `uuid`, `clsx`, `zod` | MIT | Markdown parsing, date utilities, UUID generation, and isomorphic schema validation |
|
|
18
|
+
| `zod-to-json-schema` | ISC | Tool parameter JSON Schema generation on the Host |
|
|
19
|
+
| `entities`, `regjsparser` | BSD-2-Clause | HTML entity decoding and regular expression AST checks |
|
|
20
|
+
| `tslib` | 0BSD | TypeScript runtime helpers |
|
|
21
|
+
|
|
22
|
+
All bundled runtime dependencies are distributed under permissive open-source licenses (`MIT`, `Apache-2.0`, `BSD-3-Clause`, `BSD-2-Clause`, `ISC`, `0BSD`, and dual-licensed `MPL-2.0 OR Apache-2.0` elected under `Apache-2.0`). Their respective copyright notices and license terms remain with their original authors.
|
|
23
|
+
|
|
24
|
+
## Required Apache-2.0 Attribution Notices
|
|
25
|
+
|
|
26
|
+
### Apache ECharts (`echarts`)
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
Apache ECharts
|
|
30
|
+
Copyright 2017-2026 The Apache Software Foundation
|
|
31
|
+
|
|
32
|
+
This product includes software developed at
|
|
33
|
+
The Apache Software Foundation (https://www.apache.org/).
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Google A2UI (`@a2ui/agent`, `@a2ui/react`, `@a2ui/web_core`, `@a2ui/markdown-it`)
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
Copyright 2024-2026 Google LLC
|
|
40
|
+
Licensed under the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0).
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Adobe React Spectrum / React Aria (`react-aria-components`, `react-aria`, `react-stately`, `@internationalized/*`)
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
Copyright 2020-2026 Adobe. All rights reserved.
|
|
47
|
+
Licensed under the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0).
|
|
48
|
+
```
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="none">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="a2ui-card" x1="7" y1="7" x2="29" y2="29" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop offset="0" stop-color="#5B7CFA"/>
|
|
5
|
+
<stop offset="1" stop-color="#3355D8"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="a2ui-accent" x1="17" y1="12" x2="28" y2="27" gradientUnits="userSpaceOnUse">
|
|
8
|
+
<stop offset="0" stop-color="#38D399"/>
|
|
9
|
+
<stop offset="1" stop-color="#149E73"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
</defs>
|
|
12
|
+
<rect x="6.5" y="7.5" width="17" height="19" rx="3.5" fill="url(#a2ui-card)"/>
|
|
13
|
+
<rect x="9.5" y="11" width="7.5" height="2" rx="1" fill="#FFFFFF" fill-opacity="0.92"/>
|
|
14
|
+
<rect x="9.5" y="15" width="11" height="1.8" rx="0.9" fill="#FFFFFF" fill-opacity="0.58"/>
|
|
15
|
+
<rect x="9.5" y="18.6" width="8.5" height="1.8" rx="0.9" fill="#FFFFFF" fill-opacity="0.58"/>
|
|
16
|
+
<rect x="16" y="14" width="13.5" height="14.5" rx="3.5" fill="url(#a2ui-accent)"/>
|
|
17
|
+
<path d="M19 24.2L21.5 21.2L23.6 22.7L26.6 18.3" stroke="#FFFFFF" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/>
|
|
18
|
+
<circle cx="26.6" cy="18.3" r="1.4" fill="#FFFFFF"/>
|
|
19
|
+
</svg>
|
|
Binary file
|
package/cordis.patch.yml
ADDED
package/docs/DETAIL.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
`dsh-genui-a2ui` brings Google's open A2UI 1.0 standard to DeepSeek Harness. Simple questions still get fast text replies; when plain text falls short, AI renders clickable, draggable, filterable native UI directly inside your chat.
|
|
4
|
+
|
|
5
|
+
## Ready-to-run example prompts
|
|
6
|
+
|
|
7
|
+
1. **Executive conversion and health dashboard**: `Build a quarterly growth and conversion diagnostic dashboard with four KPI cards with sparklines on top, a four-stage Sankey flow paired with a five-axis health radar chart side by side, plus tabs for regional growth bars and a searchable channel ROI table.`
|
|
8
|
+
2. **Live multi-store operations dashboard**: `Create a live chain coffee store operations dashboard showing daily revenue, total orders, peak fulfillment rate, and stock alerts, paired with hourly channel area curves, a store-by-hour order heatmap, and a searchable inventory warning table.`
|
|
9
|
+
3. **Zero-latency LLM inference and cache simulator**: `Build a zero-latency LLM inference and prompt-cache cost calculator where I can switch models (DeepSeek-V3 vs DeepSeek-R1), drag sliders for daily call volume, prompt cache hit rate, and average output tokens, and see monthly spend, net cache savings, budget utilization, and a cost breakdown bar chart update live.`
|
|
10
|
+
4. **Code diff approval gate**: `Suppose you are updating our production gateway canary weight from 5% to 20% and adding a circuit-breaker timeout. Pause with a review card showing the split config diff, target cluster selector, and auto-rollback checkbox for my confirmation before proceeding.`
|
|
11
|
+
5. **Workspace architecture diagram and source explorer**: `Analyze the architecture of this workspace, render a layered Mermaid diagram alongside a clickable file tree and config JSON inspector so I can open any file directly in the right sidebar.`
|
|
12
|
+
6. **Persistent bottom task tracker**: `Pin a five-stage release verification tracker above the chat input showing step status and overall completion percentage across typecheck, bundle build, host API check, test suite, and tarball audit.`
|
|
13
|
+
7. **Market candlestick and volatility distribution**: `Create a 10-day market review dashboard combining a sentiment gauge with a daily OHLC candlestick chart and a sector return boxplot side by side.`
|
|
14
|
+
8. **Incident triage accordion and detail modal**: `Generate a layered API latency incident report using collapsible accordions for root-cause summary, key-value metrics, and mitigation steps, plus a modal button to inspect full slow-query details.`
|
|
15
|
+
|
|
16
|
+
## Toggle and slash commands
|
|
17
|
+
|
|
18
|
+
- Click the **A2UI** button below the chat input box anytime to switch between generative UI mode and plain text mode.
|
|
19
|
+
- Slash commands: type `/a2ui off` to pause UI generation (removes tools, prompt section, and skill catalog entry for zero system prompt overhead), `/a2ui on` to re-enable it, or `/a2ui status` to check the current state.
|
|
20
|
+
|
|
21
|
+
## Built-in 32 native components and chart catalog
|
|
22
|
+
|
|
23
|
+
| Category | Components | Purpose |
|
|
24
|
+
| :--- | :--- | :--- |
|
|
25
|
+
| **Layout containers** | `Card`, `Row`, `Column`, `Tabs`, `Accordion`, `List`, `Modal`, `Divider` | Multi-column dashboards, tabbed views, collapsible panels, and modal details |
|
|
26
|
+
| **Metrics and status** | `Stat`, `KeyValue`, `Steps`, `Progress` | KPI cards with deltas and sparklines, spec grids, step timelines, and progress bars |
|
|
27
|
+
| **Charts and tables** | `Chart`, `Mermaid`, `Table` | 14 interactive chart types, architecture diagrams, and searchable, sortable, paginated tables |
|
|
28
|
+
| **Code and workspace** | `Code`, `DiffView`, `FileTree`, `JsonTree` | Highlighted code, unified or split diffs, clickable workspace file trees, and JSON inspectors |
|
|
29
|
+
| **Form controls** | `Button`, `Slider`, `ChoicePicker`, `TextField`, `CheckBox`, `DateTimeInput` | Sliders, single or multi-select chips, validated inputs, date pickers, and action buttons |
|
|
30
|
+
| **Typography and alerts** | `Text`, `Callout`, `Badge`, `Icon` | Rich text, color-coded callouts, status badges, and semantic icons |
|
|
31
|
+
| **Media** | `Image`, `AudioPlayer`, `Video` | Inline image previews, audio players, and video playback |
|
|
32
|
+
|
|
33
|
+
- **14 interactive charts (`Chart`)**: Vertical and horizontal ranking bars (`bar`), `line`, `area`, donut and pie (`pie`), bubble and `scatter`, `radar`, `funnel`, `gauge`, `heatmap`, `treemap`, `sankey`, `boxplot`, network (`graph`), and `candlestick`.
|
|
34
|
+
- **Architecture and flow diagrams (`Mermaid`)**: Flowcharts, sequence diagrams, state machines, class diagrams, ER diagrams, Gantt charts, Git graphs, and mindmaps with `10%–2000%` lossless vector zoom, drag-to-pan, fullscreen view, and source toggle.
|
|
35
|
+
- **Repository and full documentation**: [github.com/Geekhyt/dsh-genui-a2ui](https://github.com/Geekhyt/dsh-genui-a2ui)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
`dsh-genui-a2ui` 将 Google 开源的 A2UI 1.0 标准带入 DeepSeek Harness。简单问题依然用文字快回;遇到数据对比、测算推演、代码审阅或复杂流程时,AI 会在对话里直接生成可点击、可拖动、可筛选的原生交互界面。
|
|
4
|
+
|
|
5
|
+
## 可直接复制体验的提示词
|
|
6
|
+
|
|
7
|
+
1. **转化漏斗与健康度大盘**:`帮我做一份季度业务增长与全链路转化诊断看板,包含四个带趋势微图的核心指标卡,下方同屏放一张四阶桑基流向图和一张五维健康度雷达对比图,再用标签页放区域增长柱状图和可搜索的渠道明细表。`
|
|
8
|
+
2. **连锁门店实时经营看板**:`模拟一份连锁咖啡品牌今日实时经营仪表盘,顶部展示今日实收、总单量、高峰出杯准时率和缺货预警数,下方联动分时段全渠道面积图、各门店分时段单量热力图,以及可搜索排序的原料库存预警表。`
|
|
9
|
+
3. **零延迟算力与缓存成本测算器**:`做一个大模型推理算力与缓存成本实时测算沙盘,支持单选切换主力推理模型(DeepSeek-V3 / R1),并用滑块调节日均调用量、Prompt 缓存命中率和平均输出长度,本地实时算出月度总成本、缓存净节省额、预算水位与费用对比柱状图。`
|
|
10
|
+
4. **代码差异核对与确认单**:`假设你要把线上网关的灰度权重从 5% 调到 20% 并新增超时熔断参数,请先弹出交互确认卡片展示双栏配置差异、生效集群单选和自动回滚勾选框,等我确认后再继续。`
|
|
11
|
+
5. **当前工作区架构图与源码联动**:`梳理当前工作区项目的核心模块分层,画一张多层 Mermaid 架构图,并附上关键源码文件树和核心配置树,方便我点击直接在右侧打开对应文件。`
|
|
12
|
+
6. **底部常驻多阶段进度栏**:`把一个包含类型检查、分包构建、契约核验、回归测试和打包审计五步的发布流水线进度条固定在输入框上方,展示各阶段状态与整体完成百分比。`
|
|
13
|
+
7. **量化行情 K 线与波动分布**:`模拟一份科技指数近 10 个交易日的量化复盘看板,同屏组合情绪水位仪表盘、日 K 线图以及各细分板块涨跌幅箱线分布图。`
|
|
14
|
+
8. **故障排查折叠手风琴与详情弹窗**:`生成一份线上网关延迟突增的分级排查卡片,用折叠手风琴分层收纳根因摘要、关键指标键值表与回滚预案,并附带一个点击弹出慢查询详情的弹窗按钮。`
|
|
15
|
+
|
|
16
|
+
## 模式切换与指令
|
|
17
|
+
|
|
18
|
+
- 点击对话输入框左下方的 **A2UI** 按钮,可随时在生成式界面模式与纯文字模式之间切换。
|
|
19
|
+
- 支持斜杠指令:输入 `/a2ui off` 关闭界面生成(同步移除工具、提示词与技能目录,零额外系统提示词消耗),输入 `/a2ui on` 重新开启,输入 `/a2ui status` 查看当前状态。
|
|
20
|
+
|
|
21
|
+
## 内置 32 种原生组件与图表体系
|
|
22
|
+
|
|
23
|
+
| 分类 | 组件 | 用途 |
|
|
24
|
+
| :--- | :--- | :--- |
|
|
25
|
+
| **布局容器** | `Card`、`Row`、`Column`、`Tabs`、`Accordion`、`List`、`Modal`、`Divider` | 多栏看板、标签页切换、折叠面板与弹窗详情 |
|
|
26
|
+
| **指标与状态** | `Stat`、`KeyValue`、`Steps`、`Progress` | 带涨跌与微图的指标卡、参数表、步骤条与进度条 |
|
|
27
|
+
| **图表与表格** | `Chart`、`Mermaid`、`Table` | 14 类动态图表、架构时序图,以及可搜索、排序、分页的数据表 |
|
|
28
|
+
| **研发与工作区** | `Code`、`DiffView`、`FileTree`、`JsonTree` | 语法高亮代码、单双栏差异对比、联动右侧边栏的文件树与 JSON 树 |
|
|
29
|
+
| **表单交互** | `Button`、`Slider`、`ChoicePicker`、`TextField`、`CheckBox`、`DateTimeInput` | 滑块、单选多选组、校验输入框、日期时间选择与动作按钮 |
|
|
30
|
+
| **排版与提示** | `Text`、`Callout`、`Badge`、`Icon` | 文本排版、四色提示框、状态标签与语义图标 |
|
|
31
|
+
| **多媒体** | `Image`、`AudioPlayer`、`Video` | 对话内图片预览与音视频播放 |
|
|
32
|
+
|
|
33
|
+
- **14 类动态图表(`Chart`)**:柱状与横向排行图(`bar`)、折线图(`line`)、面积图(`area`)、饼图与环图(`pie`)、散点与气泡图(`scatter`)、雷达图(`radar`)、漏斗图(`funnel`)、仪表盘(`gauge`)、热力图(`heatmap`)、矩形树图(`treemap`)、桑基图(`sankey`)、箱线图(`boxplot`)、关系网络图(`graph`)、K 线图(`candlestick`)。
|
|
34
|
+
- **结构与流程图(`Mermaid`)**:流程图、时序图、状态机图、类图、ER 图、甘特图、Git 分支图与思维导图,支持 `10%–2000%` 矢量无损缩放、按住拖拽漫游、全屏查看与源码切换。
|
|
35
|
+
- **项目主页与完整文档**:[github.com/Geekhyt/dsh-genui-a2ui](https://github.com/Geekhyt/dsh-genui-a2ui)
|