@deepseek-ai/dsh-client-ui-creation-recommendations 0.0.0-stage → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSeek
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.
@@ -0,0 +1,40 @@
1
+ # Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
2
+ # section, a hash of its English and Chinese blocks outside code blocks and generated regions.
3
+ # After editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write packages/experimental/client-ui-creation-recommendations/README.md
5
+ /:
6
+ en: e332dc3625021ad9
7
+ zh: a6637d7d8696ba5a
8
+ /deepseek-ai-dsh-client-ui-creation-recommendations:
9
+ en: b4af39c5d085f16e
10
+ zh: 19fd311580db7e2b
11
+ /deepseek-ai-dsh-client-ui-creation-recommendations/summary:
12
+ en: c2b93e3c50f80ecd
13
+ zh: da8aa68e686abddd
14
+ /deepseek-ai-dsh-client-ui-creation-recommendations/table-of-contents:
15
+ en: d152484eb41ac6b4
16
+ zh: b00dddf4c88f0a45
17
+ /deepseek-ai-dsh-client-ui-creation-recommendations/use-this-package:
18
+ en: 328d7d1d81bb2830
19
+ zh: 425df912753bae83
20
+ /deepseek-ai-dsh-client-ui-creation-recommendations/use-this-package/outcomes-and-recovery:
21
+ en: 5a3df9cd58832f91
22
+ zh: 2068dca0a62394fe
23
+ /deepseek-ai-dsh-client-ui-creation-recommendations/understand-the-implementation:
24
+ en: 26b049c5e3f38846
25
+ zh: 15768ae54aec3511
26
+ /deepseek-ai-dsh-client-ui-creation-recommendations/further-exploration:
27
+ en: 6543c44016da2cdf
28
+ zh: fb0d365a5e411b04
29
+ /deepseek-ai-dsh-client-ui-creation-recommendations/model-experience:
30
+ en: 176de8a02931b042
31
+ zh: b1f1228f011ab056
32
+ /deepseek-ai-dsh-client-ui-creation-recommendations/model-experience/kv-cache-effect:
33
+ en: 6a708541b49367ae
34
+ zh: 5722b25a6a8e6724
35
+ /deepseek-ai-dsh-client-ui-creation-recommendations/known-limitations-and-deferred-work:
36
+ en: 93594f90162451d5
37
+ zh: ca27b35469b537be
38
+ /deepseek-ai-dsh-client-ui-creation-recommendations/known-limitations-and-deferred-work/dev-note:
39
+ en: e67f633dc6fe7773
40
+ zh: 8ec3e73528ddb1a6
package/README.md CHANGED
@@ -1,3 +1,88 @@
1
- # Temporary Holding Version
1
+ ---
2
+ description: "Show completed-answer creation cards with location choice, Keep and Undo."
3
+ kind: "package-reference"
4
+ ---
2
5
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
6
+ # @deepseek-ai/dsh-client-ui-creation-recommendations
7
+
8
+ English | [中文](README.zh.md)
9
+
10
+ ## Summary
11
+
12
+ Users see one creation proposal below the completed answer. Short plans appear in full; longer ones fold after about two lines and expand on request. A dropdown offers Right sidebar, Session tab, Global page, or Write your own. The cost notice opens until dismissed; this browser remembers the choice across sessions. The information button reopens it. Only Create starts background work; chatting can continue. Progress appears in the header. Keep confirms retention; Undo removes the plugin, and Restore reinstalls it.
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
+ Enable the [Personalized recommendations bundle](../personalized-recommendations/README.md). This browser contribution has no configuration fields; it fills the shared [action card frame](../client-ui-action-cards/README.md) for `create_personalized_page` cards.
29
+
30
+ ### Outcomes and recovery
31
+
32
+ An unstarted card stays available until a newer proposal in the same conversation replaces it. The replaced card keeps its history with a Replaced label and no creation or location controls. Supplied initial content appears below the plan as folded data, so the user sees what the Creator will receive. Started tasks retain their progress and retry actions. The shared card projection owns this state, so reload does not reactivate a card.
33
+
34
+ Creation, installation, retention and removal receipts come from the Session projection. The card restores them after reconnecting. A lost action reply shows an actionable error; retry uses the Host’s recorded state. Pending requests disable repeated actions. During generation, Cancel stops the child and waits for cleanup before retry. Accepted installations finish without cancellation. The information disclosure contains the source directory and explains that Undo keeps those files. The removed card offers Restore; when the retained files are gone, it asks for a new proposal.
35
+
36
+ Write your own reveals a placement field, limited to 1,000 characters; blank input cannot start creation. Choosing a preset ignores that custom text. Accepted requests persist it with the receipt for reconnect and retry, and Creator receives it with the full brief. Editing the draft, opening the menu and reading the cost notice make no model request. Dismissing the notice or choosing Create/Not now acknowledges it in browser-local storage; a new browser or cleared/unavailable storage can show it again. Historical settled cards keep the notice collapsed.
37
+
38
+ Plan disclosure depends on omitted text, not rendered height. Long previews collapse whitespace and preserve grapheme boundaries, including combined emoji; expanding restores the original brief. Short plans remain complete at every viewport width. Lines wrap naturally, with no fixed three-line limit, DOM measurement, or ResizeObserver.
39
+
40
+ -----
41
+
42
+ <a id="understand-the-implementation"></a>
43
+ ## Understand the implementation
44
+
45
+ <details>
46
+ <summary>Implementation internals — click to expand</summary>
47
+
48
+ The plugin registers its body with the shared card frame, which places the card after its Turn and supplies the title, the folded brief, the fold component and card-bound actions. The body validates the card's details and recorded data, then renders the header with the cost notice toggle, the location picker, written placement, folded initial content, progress, Keep, Undo and Restore. The cost notice preference is a browser-local store owned by the plugin. The shared Menu handles portal positioning, keyboard selection and dismissal. The body registration and its dictionaries share one plugin lifetime.
49
+
50
+ - [Source](src/client/Card.tsx)
51
+ - [Tests](tests/)
52
+
53
+ </details>
54
+
55
+ -----
56
+
57
+ <a id="further-exploration"></a>
58
+ ## Further Exploration
59
+
60
+ - [Creation service](../creation-recommendations/README.md) — creation ownership and persistence.
61
+ - [Action card display](../client-ui-action-cards/README.md) — the frame, fold and actions this body uses.
62
+ - [Slots](../../client/ui-slots/README.md) — completed-Turn presentation.
63
+
64
+ <a id="model-experience"></a>
65
+ ## Model Experience
66
+
67
+ Indirectly, through an accepted Create action: the Host starts Creator with the full brief and selected or human-written placement, without adding browser tools or resuming the parent model.
68
+
69
+ #### KV Cache effect
70
+
71
+ Rendering and changing the location do not affect the model cache.
72
+
73
+ ## Known Limitations and Deferred Work
74
+
75
+ <a id="known-limitations-and-deferred-work"></a>
76
+
77
+ - The displayed brief is model-authored. Necessary existing data travels separately in the proposal’s optional `initialContent`.
78
+ - Historical receipts do not continuously track later manual changes on the Plugins page.
79
+
80
+ <a id="dev-note"></a>
81
+ ### Dev Note
82
+
83
+ <details>
84
+ <summary>Working context for maintainers — click to expand</summary>
85
+
86
+ None.
87
+
88
+ </details>
package/README.zh.md ADDED
@@ -0,0 +1,88 @@
1
+ ---
2
+ description: "在完整回答末尾显示支持位置选择、保留和撤销的创建卡片。"
3
+ kind: "package-reference"
4
+ ---
5
+
6
+ # @deepseek-ai/dsh-client-ui-creation-recommendations
7
+
8
+ [English](README.md) | 中文
9
+
10
+ ## 概述
11
+
12
+ 用户在完整回答下方看到一条创建建议。短方案完整显示,长方案约两行后折叠,可展开全文。下拉菜单提供右侧栏、会话 Tab、全局页面和自行撰写四项。消耗提示在用户收起前默认展开,本浏览器跨会话记住选择,信息按钮可重新打开。只有点击创建才启动后台任务,主对话可继续。进度显示在顶部,保留用于确认继续使用,撤销则移除插件,恢复会重新安装它。
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
+ 启用[个性化推荐 Bundle](../personalized-recommendations/README.zh.md)。本浏览器组件没有配置字段;它为 `create_personalized_page` 卡片填充共享的[操作卡片框架](../client-ui-action-cards/README.zh.md)。
29
+
30
+ ### 操作结果与恢复
31
+
32
+ 尚未创建的卡片一直可用,直到同一会话里更新的方案替换它。被替换的卡片保留历史内容和“已替换”标签,没有创建和位置控件。提供的预填内容以折叠形式显示在方案下方,用户能看到交给 Creator 的内容。已开始的任务保留进度和重试操作。共享卡片投影拥有这个状态,所以刷新不会重新激活卡片。
33
+
34
+ 创建、安装、保留和移除记录来自 Session 投影,重新连接后会在卡片中恢复。操作回复丢失时显示可采取行动的错误信息;重试以 Host 已记录的状态为准。请求处理中禁用重复操作。生成阶段可取消,等待子任务清理后才能重试;已接纳的安装不再取消。信息说明中包含源码目录,并明确撤销会保留这些文件。已移除的卡片提供“恢复”;保留的文件已不在时,提示需要重新提案。
35
+
36
+ 自行撰写会显示位置输入框,最多 1,000 字,空白内容不能启动创建;改选预设位置后不提交自定义文字。已接受的请求将文字存入操作记录,供重连和重试恢复,并连同完整方案交给 Creator。编辑草稿、打开菜单或查看消耗说明都不会调用模型。收起提示或点击创建、暂不需要后,浏览器本地存储记住已读;更换浏览器、清除或无法使用存储时可能再次显示。历史已结束的卡片默认收起提示。
37
+
38
+ 是否展开只取决于有没有省略内容,不取决于渲染高度。长方案预览合并空白,并保留组合 emoji 等字素边界;展开后恢复原始全文。短方案在任何窗口宽度都完整显示。文字自然换行,不固定三行,不读取 DOM 尺寸或使用 ResizeObserver。
39
+
40
+ -----
41
+
42
+ <a id="understand-the-implementation"></a>
43
+ ## 实现原理
44
+
45
+ <details>
46
+ <summary>实现细节 — 点击展开</summary>
47
+
48
+ 插件把正文注册到共享卡片框架,由框架把卡片放在所属回合之后,并提供标题、折叠后的说明、折叠组件和绑定到卡片的操作。正文先校验卡片的 details 和已记录的数据,再渲染带消耗说明开关的标题栏、位置选择、手写位置、折叠的预填内容、进度,以及保留、撤销和恢复。消耗说明的偏好是插件自有的浏览器本地存储。共享 Menu 处理浮层定位、键盘选择和关闭。正文注册和语言字典使用同一插件生命周期。
49
+
50
+ - [源码](src/client/Card.tsx)
51
+ - [测试](tests/)
52
+
53
+ </details>
54
+
55
+ -----
56
+
57
+ <a id="further-exploration"></a>
58
+ ## 延伸阅读
59
+
60
+ - [创建服务](../creation-recommendations/README.zh.md) — 创建任务与持久化。
61
+ - [操作卡片显示](../client-ui-action-cards/README.zh.md) — 本正文使用的框架、折叠和操作。
62
+ - [Slots](../../client/ui-slots/README.zh.md) — 回合末尾呈现.
63
+
64
+ <a id="model-experience"></a>
65
+ ## 模型体验
66
+
67
+ 间接影响来自用户接受的创建操作:Host 启动 Creator,传入完整方案和选定或手写的位置,不增加浏览器侧模型工具,也不恢复父模型执行。
68
+
69
+ #### KV Cache effect
70
+
71
+ 渲染卡片和修改位置不会影响模型缓存。
72
+
73
+ ## 已知限制与后续工作
74
+
75
+ <a id="known-limitations-and-deferred-work"></a>
76
+
77
+ - 展示方案由模型编写,所需已有数据通过方案的可选 `initialContent` 单独交接。
78
+ - 历史记录不会持续跟踪之后在插件页手动进行的修改。
79
+
80
+ <a id="dev-note"></a>
81
+ ### 开发备注
82
+
83
+ <details>
84
+ <summary>维护者工作上下文 — 点击展开</summary>
85
+
86
+ 无。
87
+
88
+ </details>