@deepseek-ai/dsh-client-ui-plugin-recommendations 0.0.0-stage → 0.2.2-alpha.3
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.i18n.yaml +37 -0
- package/README.md +81 -2
- package/README.zh.md +81 -0
- package/lib/client.js +775 -0
- package/lib/index.js +6 -0
- package/lib/types/client/Card.d.ts +37 -0
- package/lib/types/client/index.d.ts +9 -0
- package/lib/types/client/locales.d.ts +227 -0
- package/lib/types/client/mount.d.ts +17 -0
- package/lib/types/index.d.ts +4 -0
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +66 -3
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.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
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-plugin-recommendations/README.md
|
|
5
|
+
/:
|
|
6
|
+
en: 56ef0772b237c7f1
|
|
7
|
+
zh: 02f3a41d3b778505
|
|
8
|
+
/deepseek-ai-dsh-client-ui-plugin-recommendations:
|
|
9
|
+
en: 54f686f0de0dc75d
|
|
10
|
+
zh: 33341df7cfb4fa5c
|
|
11
|
+
/deepseek-ai-dsh-client-ui-plugin-recommendations/summary:
|
|
12
|
+
en: a4484eb034e7311a
|
|
13
|
+
zh: 34e47149ecf23d67
|
|
14
|
+
/deepseek-ai-dsh-client-ui-plugin-recommendations/table-of-contents:
|
|
15
|
+
en: d152484eb41ac6b4
|
|
16
|
+
zh: b00dddf4c88f0a45
|
|
17
|
+
/deepseek-ai-dsh-client-ui-plugin-recommendations/use-this-package:
|
|
18
|
+
en: 10c47fd420b1f232
|
|
19
|
+
zh: 7094c3b465978372
|
|
20
|
+
/deepseek-ai-dsh-client-ui-plugin-recommendations/understand-the-implementation:
|
|
21
|
+
en: 1b20e5e631381ab1
|
|
22
|
+
zh: a3f0bbc3dc14001d
|
|
23
|
+
/deepseek-ai-dsh-client-ui-plugin-recommendations/further-exploration:
|
|
24
|
+
en: 4fd18141ccbba60b
|
|
25
|
+
zh: 137a74a945ac3f23
|
|
26
|
+
/deepseek-ai-dsh-client-ui-plugin-recommendations/model-experience:
|
|
27
|
+
en: d73a452f8bf206b7
|
|
28
|
+
zh: 67db0a1b3a5767cf
|
|
29
|
+
/deepseek-ai-dsh-client-ui-plugin-recommendations/model-experience/kv-cache-effect:
|
|
30
|
+
en: 4faf0dd1beff482e
|
|
31
|
+
zh: a2794bbdb956d557
|
|
32
|
+
/deepseek-ai-dsh-client-ui-plugin-recommendations/known-limitations-and-deferred-work:
|
|
33
|
+
en: e3f3f2ef1459fb1b
|
|
34
|
+
zh: 427dbabb303f6284
|
|
35
|
+
/deepseek-ai-dsh-client-ui-plugin-recommendations/known-limitations-and-deferred-work/dev-note:
|
|
36
|
+
en: e67f633dc6fe7773
|
|
37
|
+
zh: 8ec3e73528ddb1a6
|
package/README.md
CHANGED
|
@@ -1,3 +1,82 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "Show official plugin recommendation cards after completed answers."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# @deepseek-ai/dsh-client-ui-plugin-recommendations
|
|
7
|
+
|
|
8
|
+
English | [中文](README.zh.md)
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
Users see one plugin recommendation below the completed answer, with the plugin's current title and description in the interface language. The title and description form one target that highlights on hover; clicking it opens that plugin's details in Plugins without enabling it or changing the current Session. Enable and Not now remain separate choices. Decisions and the details link remain available after reconnecting.
|
|
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 `enable_official_plugin` cards.
|
|
29
|
+
|
|
30
|
+
-----
|
|
31
|
+
|
|
32
|
+
<a id="understand-the-implementation"></a>
|
|
33
|
+
## Understand the implementation
|
|
34
|
+
|
|
35
|
+
<details>
|
|
36
|
+
<summary>Implementation internals — click to expand</summary>
|
|
37
|
+
|
|
38
|
+
The plugin mounts its catalog-text Remote, then registers its body with the shared card frame, which places the card after its Turn and supplies the card, its recorded decision and card-bound actions. The body asks the Host for the plugin's current catalog text and selection and renders the header with the Official badge, the details target, status, and Enable and Not now through the frame's action. The details target is named View details with the plugin title, and the catalog description remains its accessible description. A refused lookup shows its reason and a lost reply says the details could not be loaded; both offer Not now and Try again, which repeats the lookup, but no Enable. A recorded outcome stays as recorded even after its plugin leaves the catalog. While an action runs, only its own button reads Working, and both stay disabled. The plugin keeps returned catalog text by plugin name for its lifetime, so a revisited card renders it at once while its own lookup refreshes the selection. Until a plugin's first lookup returns, the card shows the proposed title, a placeholder description line and the disabled actions, so its layout holds. The Remote, the body registration and its dictionaries share one plugin lifetime.
|
|
39
|
+
|
|
40
|
+
Cards use the application font, a distinct title and compact body scale, and a separate action footer. The built entry supplies generated Remote descriptors to the source-tested mount lifecycle.
|
|
41
|
+
|
|
42
|
+
- [Source](src/client/index.ts)
|
|
43
|
+
- [Tests](tests/)
|
|
44
|
+
|
|
45
|
+
</details>
|
|
46
|
+
|
|
47
|
+
-----
|
|
48
|
+
|
|
49
|
+
<a id="further-exploration"></a>
|
|
50
|
+
## Further Exploration
|
|
51
|
+
|
|
52
|
+
- [Recommendation service](../plugin-recommendations/README.md) — eligibility, enabling and decisions.
|
|
53
|
+
- [Action card display](../client-ui-action-cards/README.md) — the frame, kind bodies and the process row.
|
|
54
|
+
|
|
55
|
+
<a id="model-experience"></a>
|
|
56
|
+
## Model Experience
|
|
57
|
+
|
|
58
|
+
Indirectly, through card actions: the shared Host card service adds a logged status notice to the next model request. The browser contribution adds no model tools or prompt content.
|
|
59
|
+
|
|
60
|
+
#### KV Cache effect
|
|
61
|
+
|
|
62
|
+
The card adds no model context. Its Enable action can change subsequent tool declarations through the Host.
|
|
63
|
+
|
|
64
|
+
## Known Limitations and Deferred Work
|
|
65
|
+
|
|
66
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
67
|
+
|
|
68
|
+
- Only the first proposal in a Turn appears.
|
|
69
|
+
- Before a plugin's first lookup returns, the card reserves one description line; a longer description still extends the card when it arrives.
|
|
70
|
+
- Historical decisions do not track later changes made from the Plugins page.
|
|
71
|
+
- After a refused or lost lookup, Enable returns only when Try again gets the plugin's catalog text.
|
|
72
|
+
- A card whose plugin has left the catalog shows the proposed title instead of catalog text.
|
|
73
|
+
|
|
74
|
+
<a id="dev-note"></a>
|
|
75
|
+
### Dev Note
|
|
76
|
+
|
|
77
|
+
<details>
|
|
78
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
79
|
+
|
|
80
|
+
None.
|
|
81
|
+
|
|
82
|
+
</details>
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "在完整回答之后显示官方插件推荐卡片。"
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @deepseek-ai/dsh-client-ui-plugin-recommendations
|
|
7
|
+
|
|
8
|
+
[English](README.md) | 中文
|
|
9
|
+
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
用户在完整回答下方看到一张插件推荐卡片,显示插件当前的界面语言标题和描述。标题和描述是同一个点击区域,悬停时整体高亮;点击可打开插件页中的对应详情,不会启用插件或改变当前 Session。启用和暂不需要仍是独立操作。重新连接后仍能看到之前的选择并打开详情。
|
|
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)。这个浏览器端贡献没有配置项;它为 `enable_official_plugin` 卡片填充共享的[操作卡片框架](../client-ui-action-cards/README.zh.md)。
|
|
29
|
+
|
|
30
|
+
-----
|
|
31
|
+
|
|
32
|
+
<a id="understand-the-implementation"></a>
|
|
33
|
+
## 实现原理
|
|
34
|
+
|
|
35
|
+
<details>
|
|
36
|
+
<summary>实现细节 — 点击展开</summary>
|
|
37
|
+
|
|
38
|
+
插件先挂载读取目录文本的 Remote,再向共享的卡片框架注册正文;框架把卡片放在所在回合之后,并提供卡片、已记录的决定和绑定到卡片的操作。正文向 Host 读取插件当前的目录文本和启用状态,渲染带「官方」标记的标题栏、详情点击区域、状态,以及通过框架操作发出的启用和暂不需要。详情点击区域的无障碍名称是「查看详情」加插件标题,目录描述仍作为它的无障碍描述。查询被拒绝时显示原因,回复丢失时说明无法读取插件信息;两种情况都提供「暂不需要」和重新查询的「重试」,不提供启用。已记录的结果保持不变,插件之后离开目录也一样。操作进行中只有被点击的按钮显示「正在处理…」,两个按钮都禁用。插件在自身生命周期内按插件名记住读到的目录文本,再次进入会话时卡片立即显示,同时卡片自己的查询会刷新启用状态。某个插件的第一次查询返回前,卡片显示提议的标题、一行描述占位和禁用的按钮,布局不跳动。Remote、正文注册和词典共用同一个插件生命周期。
|
|
39
|
+
|
|
40
|
+
卡片沿用应用字体,通过标题、正文和独立操作区区分信息层级。构建入口将生成的 Remote 描述传给可直接从源码测试的挂载流程。
|
|
41
|
+
|
|
42
|
+
- [Source](src/client/index.ts)
|
|
43
|
+
- [Tests](tests/)
|
|
44
|
+
|
|
45
|
+
</details>
|
|
46
|
+
|
|
47
|
+
-----
|
|
48
|
+
|
|
49
|
+
<a id="further-exploration"></a>
|
|
50
|
+
## 延伸阅读
|
|
51
|
+
- [推荐服务](../plugin-recommendations/README.zh.md) — 推荐范围、启用和决定。
|
|
52
|
+
- [操作卡片显示](../client-ui-action-cards/README.zh.md) — 框架、种类正文和过程行。
|
|
53
|
+
|
|
54
|
+
<a id="model-experience"></a>
|
|
55
|
+
## 模型体验
|
|
56
|
+
|
|
57
|
+
间接影响来自卡片操作:共享的 Host 卡片服务在下一次模型请求中追加一条已记录的状态通知。本界面不增加模型工具或提示词。
|
|
58
|
+
|
|
59
|
+
#### KV Cache effect
|
|
60
|
+
|
|
61
|
+
卡片不增加模型上下文。启用操作可能通过 Host 改变之后的工具声明。
|
|
62
|
+
|
|
63
|
+
## 已知限制与后续工作
|
|
64
|
+
|
|
65
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
66
|
+
|
|
67
|
+
- 每个回合只显示第一条推荐。
|
|
68
|
+
- 插件第一次查询返回前,卡片只预留一行描述;更长的描述返回后卡片仍会变高。
|
|
69
|
+
- 历史选择不会跟踪之后在插件页面进行的修改。
|
|
70
|
+
- 查询被拒绝或回复丢失后,要等「重试」读到插件的目录文本,才会重新提供启用。
|
|
71
|
+
- 插件离开目录后,卡片显示提议时的标题,而不是目录文本。
|
|
72
|
+
|
|
73
|
+
<a id="dev-note"></a>
|
|
74
|
+
### 开发备注
|
|
75
|
+
|
|
76
|
+
<details>
|
|
77
|
+
<summary>维护者工作上下文 — 点击展开</summary>
|
|
78
|
+
|
|
79
|
+
无。
|
|
80
|
+
|
|
81
|
+
</details>
|