@deepseek-ai/dsh-client-ui-plan 0.1.1-rc.2 → 0.1.2-alpha.2
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/README.i18n.yaml +2 -2
- package/README.md +72 -5
- package/README.zh.md +76 -9
- package/lib/client.js +8 -4
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/locales.d.ts +4 -0
- package/package.json +14 -18
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-plan/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 569cac06d95c5db6af21f623c8699109e3eafaa3
|
|
6
|
+
README.zh.md: a1e0465d103c2cd725909df64203eadcf3681108
|
package/README.md
CHANGED
|
@@ -1,18 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Plan-mode status chip for the Web GUI: the composer control that shows plan mode is on and turns it off; for users and maintainers of plan mode."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# @deepseek-ai/dsh-client-ui-plan
|
|
2
7
|
|
|
3
8
|
English | [中文](README.zh.md)
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
This package renders the plan-mode status chip in the Web GUI: when the host-computed projection's effective target is plan mode, the composer shows a warn-colored "Plan ×" button that turns plan mode off; otherwise the seat stays empty. Plan mode itself — the `/plan` command, the committed `plan/mode` state, the projection unit, and the policy section — belongs to `dsh-plan-mode`; this package only renders the projection and sends what a user could equally type. The model exits plan mode through the stable `exit_plan_mode` tool; its plan review uses the composed Web question channel.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Use this package](#use-this-package)
|
|
17
|
+
- [Understand the implementation](#understand-the-implementation)
|
|
18
|
+
- [Further Exploration](#further-exploration)
|
|
19
|
+
- [Model Experience](#model-experience)
|
|
20
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
21
|
+
- [Dev Note](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## Use this package
|
|
27
|
+
|
|
28
|
+
Mount this plugin alongside `ui-conversation` and `dsh-plan-mode`; the chip then occupies the composer's plan seat to the right of the access-mode control whenever plan mode is active. Enter plan mode through the `/plan` command path — choose Plan from the composer's `+` Command menu or type `/plan` — and turn it off with the chip.
|
|
29
|
+
|
|
30
|
+
### What the chip shows
|
|
31
|
+
|
|
32
|
+
While the effective target is plan mode, the seat renders the warn-colored "Plan ×" status button, which executes `/plan off`. Otherwise the seat stays empty: a host without plan mode, or a Draft with no session, shows nothing. While plan mode is the effective target, the composer textarea's placeholder switches to the plan-task hint — "describe your task to generate plan" — unless the owning surface supplies its own placeholder.
|
|
33
|
+
|
|
34
|
+
### Failures
|
|
35
|
+
|
|
36
|
+
Admission failures (`matched: false`, business errors, transport faults) surface as an inline error and the chip stays until the projection confirms the exit.
|
|
37
|
+
|
|
38
|
+
-----
|
|
39
|
+
|
|
40
|
+
<a id="understand-the-implementation"></a>
|
|
41
|
+
## Understand the implementation
|
|
6
42
|
|
|
7
|
-
|
|
43
|
+
<details>
|
|
44
|
+
<summary>Implementation internals — click to expand</summary>
|
|
8
45
|
|
|
9
|
-
The chip
|
|
46
|
+
The chip occupies the conversation-declared `conversation.input.plan` single seat; the node half is an empty apply (the roster row). Reads ride the generic projection pair through the standard-kit `useProjection`: the effective target is `pending ? !active : active` — a folded host value, not client optimism, so an arriving frame corrects the chip either way. The seat's injected face carries one verb, `exitPlanMode`, which executes `/plan off` through `ctx.remote.commands.execute` and maps admission failures to an inline error line. The placeholder and hint text live in ui-conversation's `conversation` locale namespace and are shared verbatim with the claimed `/plan` command hint. The accessible description is "Plan mode on, press to turn off".
|
|
10
47
|
|
|
11
|
-
|
|
48
|
+
</details>
|
|
12
49
|
|
|
50
|
+
-----
|
|
51
|
+
|
|
52
|
+
<a id="further-exploration"></a>
|
|
53
|
+
## Further Exploration
|
|
54
|
+
|
|
55
|
+
Read these pages when the plan surface is not enough. They move from the chip to the plan-mode domain and the composer shell.
|
|
56
|
+
|
|
57
|
+
- [dsh-plan-mode](../../plan/plan-mode/README.md) — owns plan mode, the `/plan` command, the projection, and the policy section.
|
|
58
|
+
- [ui-conversation](../ui-conversation/README.md) — declares the composer's `conversation.input.plan` seat and the placeholder locale keys.
|
|
59
|
+
- [Tool catalog](../../../docs/tool-catalog.md#deepseek-aidsh-plan-mode) — the `exit_plan_mode` tool schema the model uses to leave plan mode.
|
|
60
|
+
- [Client package map](../README.md) — adjacent browser UI packages.
|
|
61
|
+
|
|
62
|
+
-----
|
|
63
|
+
|
|
64
|
+
<a id="model-experience"></a>
|
|
13
65
|
## Model Experience
|
|
14
66
|
|
|
15
|
-
Indirectly, through the `/plan off` command line the chip dispatches:
|
|
67
|
+
Indirectly, through the `/plan off` command line the chip dispatches: `dsh-plan-mode` owns the model-visible policy section, the exit-tool schema, and the logged state that line drives.
|
|
16
68
|
|
|
17
69
|
#### KV Cache effect
|
|
18
70
|
|
|
@@ -20,6 +72,21 @@ Entering or leaving plan mode changes the active `plan:policy` system-prompt sec
|
|
|
20
72
|
|
|
21
73
|
## Known Limitations and Deferred Work
|
|
22
74
|
|
|
75
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
These limits define the current plan chip. They are current package constraints, not a plan-mode comparison or a task backlog.
|
|
79
|
+
|
|
23
80
|
- **Plan mode is guidance, not an execution sandbox** — deployments that require enforced read-only planning must compose the independent sandbox and approval policies.
|
|
24
81
|
- **The chip belongs to the default composer** — a pending whole-composer interaction such as plan review temporarily replaces the InputBar and its chip.
|
|
25
82
|
- **No inactive plan control** — entry uses the shared Command source; a session with the capability but inactive mode shows no plan affordance in the tool row.
|
|
83
|
+
|
|
84
|
+
<a id="dev-note"></a>
|
|
85
|
+
### Dev Note
|
|
86
|
+
|
|
87
|
+
<details>
|
|
88
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
89
|
+
|
|
90
|
+
None.
|
|
91
|
+
|
|
92
|
+
</details>
|
package/README.zh.md
CHANGED
|
@@ -1,25 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Web GUI 的 plan 模式状态徽章:显示 plan 模式已开启并可将其关闭的 composer 控件;供 plan 模式的用户与维护者阅读。"
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# @deepseek-ai/dsh-client-ui-plan
|
|
2
7
|
|
|
3
8
|
[English](README.md) | 中文
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
本包在 Web GUI 中渲染 plan 模式状态徽章:当宿主计算的投影有效目标为 plan 模式时,composer 显示一个 warn 色「Plan ×」按钮,可关闭 plan 模式;否则该座位保持为空。plan 模式本身——`/plan` 命令、已提交的 `plan/mode` 状态、投影单元与 policy 段——归 `dsh-plan-mode` 所有;本包只渲染投影并发送用户同样可以手敲的内容。模型经稳定的 `exit_plan_mode` 工具退出 plan 模式;其 plan 评审走已组合的 Web question 通道。
|
|
13
|
+
|
|
14
|
+
## 目录
|
|
15
|
+
|
|
16
|
+
- [使用本包](#use-this-package)
|
|
17
|
+
- [理解实现](#understand-the-implementation)
|
|
18
|
+
- [进一步探索](#further-exploration)
|
|
19
|
+
- [模型体验](#model-experience)
|
|
20
|
+
- [已知限制与延期工作](#known-limitations-and-deferred-work)
|
|
21
|
+
- [开发备注](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## 使用本包
|
|
27
|
+
|
|
28
|
+
与 `ui-conversation` 及 `dsh-plan-mode` 一起挂载本插件;plan 模式激活时,徽章随即占据 composer 的 plan 座位(访问模式控件右侧)。经 `/plan` 命令路径进入 plan 模式——从 composer 的 `+` Command 菜单选择 Plan,或键入 `/plan`——再用徽章将其关闭。
|
|
29
|
+
|
|
30
|
+
### 徽章显示什么
|
|
31
|
+
|
|
32
|
+
当有效目标为 plan 模式时,该座位渲染 warn 色「Plan ×」状态按钮,执行 `/plan off`。否则座位保持为空:未组合 plan-mode 的宿主,或尚无会话的 Draft,都不显示任何内容。plan 模式为有效目标期间,composer 文本框的 placeholder 切换为 plan 任务提示——「describe your task to generate plan」——除非持有表面提供自己的 placeholder。
|
|
33
|
+
|
|
34
|
+
### 失败
|
|
35
|
+
|
|
36
|
+
准入失败(`matched: false`、业务错误、传输故障)以内联错误呈现,徽章保持显示直至投影确认退出。
|
|
37
|
+
|
|
38
|
+
-----
|
|
39
|
+
|
|
40
|
+
<a id="understand-the-implementation"></a>
|
|
41
|
+
## 理解实现
|
|
6
42
|
|
|
7
|
-
|
|
43
|
+
<details>
|
|
44
|
+
<summary>实现细节——点击展开</summary>
|
|
8
45
|
|
|
9
|
-
|
|
46
|
+
徽章占据 conversation 声明的 `conversation.input.plan` 单实例座位;node 半部是空 apply(roster 行)。读取经标准工具包 `useProjection` 走通用投影对:有效目标是 `pending ? !active : active`——折叠的宿主值而非客户端乐观态,因此到达的帧无论哪个方向都会纠正徽章。座位注入面携带一个动词 `exitPlanMode`,经 `ctx.remote.commands.execute` 执行 `/plan off`,并把准入失败映射为一行内联错误。placeholder 与提示文案位于 ui-conversation 的 `conversation` locale 命名空间,与已认领 `/plan` 命令的提示逐字共用。无障碍描述是「Plan mode on, press to turn off」。
|
|
10
47
|
|
|
11
|
-
|
|
48
|
+
</details>
|
|
12
49
|
|
|
50
|
+
-----
|
|
51
|
+
|
|
52
|
+
<a id="further-exploration"></a>
|
|
53
|
+
## 进一步探索
|
|
54
|
+
|
|
55
|
+
当 plan 面不够用时阅读以下页面。它们从徽章进入 plan 模式领域与 composer 外壳。
|
|
56
|
+
|
|
57
|
+
- [dsh-plan-mode](../../plan/plan-mode/README.zh.md)——拥有 plan 模式、`/plan` 命令、投影与 policy 段。
|
|
58
|
+
- [ui-conversation](../ui-conversation/README.zh.md)——声明 composer 的 `conversation.input.plan` 座位与 placeholder locale 键。
|
|
59
|
+
- [工具目录](../../../docs/tool-catalog.zh.md#deepseek-aidsh-plan-mode)——模型退出 plan 模式所用的 `exit_plan_mode` 工具 schema。
|
|
60
|
+
- [客户端包映射](../README.zh.md)——相邻的浏览器 UI 包。
|
|
61
|
+
|
|
62
|
+
-----
|
|
63
|
+
|
|
64
|
+
<a id="model-experience"></a>
|
|
13
65
|
## 模型体验
|
|
14
66
|
|
|
15
|
-
间接地,通过 chip 派发的 `/plan off`
|
|
67
|
+
间接地,通过 chip 派发的 `/plan off` 命令行:`dsh-plan-mode` 拥有该命令行驱动的模型可见 policy 段、退出工具 schema 与已记录状态。
|
|
16
68
|
|
|
17
69
|
#### KV Cache 影响
|
|
18
70
|
|
|
19
71
|
进入或离开 plan mode 会改变活跃的 `plan:policy` 系统提示词段,因此改变请求前缀;chip 本身不添加任何提示词内容。
|
|
20
72
|
|
|
21
|
-
##
|
|
73
|
+
## 已知限制与延期工作
|
|
74
|
+
|
|
75
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
这些限制界定了当前 plan 徽章。它们是当前包约束,不是 plan 模式对比或任务积压。
|
|
79
|
+
|
|
80
|
+
- **Plan 模式是引导而非执行沙箱**——需要强制只读规划的部署必须组合独立的沙箱与审批策略。
|
|
81
|
+
- **徽章属于默认 composer**——待处理的整 composer 交互(如 plan 评审)会临时取代 InputBar 及其徽章。
|
|
82
|
+
- **无未激活 plan 控件**——入口使用共享 Command source;有能力但模式未激活的会话在工具行不显示 plan 入口。
|
|
83
|
+
|
|
84
|
+
<a id="dev-note"></a>
|
|
85
|
+
### 开发备注
|
|
86
|
+
|
|
87
|
+
<details>
|
|
88
|
+
<summary>维护者的工作上下文——点击展开</summary>
|
|
89
|
+
|
|
90
|
+
无。
|
|
22
91
|
|
|
23
|
-
|
|
24
|
-
- **chip 属于默认编辑器**:待处理的整编辑器交互(如 plan 评审)会临时取代 InputBar 及其 chip。
|
|
25
|
-
- **无未激活态 plan 控件**——入口使用共享 Command source;有能力但 mode 未激活的会话在工具行不显示 plan 入口。
|
|
92
|
+
</details>
|
package/lib/client.js
CHANGED
|
@@ -65,7 +65,7 @@ window.__ModuleLoader__.load({
|
|
|
65
65
|
title: t("chip.on.title"),
|
|
66
66
|
disabled: locked || leaving,
|
|
67
67
|
onClick: off,
|
|
68
|
-
children: ["
|
|
68
|
+
children: [t("chip.label"), (0, react_jsx_runtime.jsx)("span", {
|
|
69
69
|
className: PlanModeControl_module_css_default.close,
|
|
70
70
|
"aria-hidden": true,
|
|
71
71
|
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseFill14, { size: 12 })
|
|
@@ -74,7 +74,7 @@ window.__ModuleLoader__.load({
|
|
|
74
74
|
className: PlanModeControl_module_css_default.error,
|
|
75
75
|
role: "status",
|
|
76
76
|
title: error,
|
|
77
|
-
children: "
|
|
77
|
+
children: t("chip.exitFailed")
|
|
78
78
|
})]
|
|
79
79
|
});
|
|
80
80
|
}
|
|
@@ -83,17 +83,21 @@ window.__ModuleLoader__.load({
|
|
|
83
83
|
/** `plan` namespace dictionaries (the composer plan chip's copy). */
|
|
84
84
|
/** Simplified Chinese dictionary (the key-set source of truth). */
|
|
85
85
|
const zh = {
|
|
86
|
+
"chip.label": "Plan",
|
|
86
87
|
"chip.on.aria": "plan mode 已开启,按下关闭",
|
|
87
88
|
"chip.on.title": "plan mode 已开启 — 点击关闭(/plan off)",
|
|
88
89
|
"chip.off.aria": "plan mode 已关闭,按下开启",
|
|
89
|
-
"chip.off.title": "plan mode 已关闭 — 点击开启(/plan)"
|
|
90
|
+
"chip.off.title": "plan mode 已关闭 — 点击开启(/plan)",
|
|
91
|
+
"chip.exitFailed": "退出 plan mode 失败"
|
|
90
92
|
};
|
|
91
93
|
/** English dictionary, checked complete against the zh key set. */
|
|
92
94
|
const en = {
|
|
95
|
+
"chip.label": "Plan",
|
|
93
96
|
"chip.on.aria": "Plan mode on, press to turn off",
|
|
94
97
|
"chip.on.title": "Plan mode on — click to turn off (/plan off)",
|
|
95
98
|
"chip.off.aria": "Plan mode off, press to turn on",
|
|
96
|
-
"chip.off.title": "Plan mode off — click to turn on (/plan)"
|
|
99
|
+
"chip.off.title": "Plan mode off — click to turn on (/plan)",
|
|
100
|
+
"chip.exitFailed": "Failed to exit plan mode"
|
|
97
101
|
};
|
|
98
102
|
//#endregion
|
|
99
103
|
//#region lib/types/client/index.js
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClientContext } from '@deepseek-ai/
|
|
1
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
2
2
|
import { type PlanKey } from './locales.ts';
|
|
3
3
|
export type { PlanKey } from './locales.ts';
|
|
4
4
|
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
/** `plan` namespace dictionaries (the composer plan chip's copy). */
|
|
2
2
|
/** Simplified Chinese dictionary (the key-set source of truth). */
|
|
3
3
|
export declare const zh: {
|
|
4
|
+
'chip.label': string;
|
|
4
5
|
'chip.on.aria': string;
|
|
5
6
|
'chip.on.title': string;
|
|
6
7
|
'chip.off.aria': string;
|
|
7
8
|
'chip.off.title': string;
|
|
9
|
+
'chip.exitFailed': string;
|
|
8
10
|
};
|
|
9
11
|
/** The plan namespace key union. */
|
|
10
12
|
export type PlanKey = keyof typeof zh;
|
|
11
13
|
/** English dictionary, checked complete against the zh key set. */
|
|
12
14
|
export declare const en: {
|
|
15
|
+
'chip.label': string;
|
|
13
16
|
'chip.on.aria': string;
|
|
14
17
|
'chip.on.title': string;
|
|
15
18
|
'chip.off.aria': string;
|
|
16
19
|
'chip.off.title': string;
|
|
20
|
+
'chip.exitFailed': string;
|
|
17
21
|
};
|
|
18
22
|
//# sourceMappingURL=locales.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-plan",
|
|
3
3
|
"description": "Plan-mode composer control: the conversation.input.plan seat over the plan projection and the /plan command channel",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -41,27 +41,23 @@
|
|
|
41
41
|
},
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@deepseek-ai/
|
|
45
|
-
"@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
|
|
46
|
-
"@deepseek-ai/dsh-api-remotes": "^0.1.1-rc.2",
|
|
47
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.1-rc.2",
|
|
48
|
-
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
49
|
-
"@deepseek-ai/dsh-plan-mode": "^0.1.1-rc.2",
|
|
50
|
-
"@deepseek-ai/cordis": "^4.0.1"
|
|
44
|
+
"@deepseek-ai/cordis": "^4.0.2"
|
|
51
45
|
},
|
|
52
46
|
"devDependencies": {
|
|
53
47
|
"@types/react": "~18.3.1",
|
|
54
48
|
"react": "^18.2.0",
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
"@deepseek-ai/dsh-client-test-runtime": "^0.1.
|
|
58
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.
|
|
60
|
-
"@deepseek-ai/dsh-client-
|
|
61
|
-
"@deepseek-ai/dsh-
|
|
62
|
-
"@deepseek-ai/dsh-
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/
|
|
49
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.2",
|
|
50
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.2",
|
|
51
|
+
"@deepseek-ai/dsh-client-test-runtime": "^0.1.2-alpha.2",
|
|
52
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-alpha.2",
|
|
53
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.2",
|
|
54
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.2",
|
|
55
|
+
"@deepseek-ai/dsh-invariants": "^0.1.2-alpha.2",
|
|
56
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.2-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-session": "^0.1.2-alpha.2",
|
|
59
|
+
"@deepseek-ai/dsh-plan-mode": "^0.1.2-alpha.2",
|
|
60
|
+
"@deepseek-ai/cordis": "^4.0.2"
|
|
65
61
|
},
|
|
66
62
|
"files": [
|
|
67
63
|
"lib/index.js",
|