dsh-as-aistudio 0.2.13 → 0.3.0
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/CHANGELOG.md +31 -0
- package/README.md +5 -5
- package/package.json +17 -12
- package/src/client.js +3362 -225
- package/src/components.js +1 -1
- package/src/index.js +26 -1
- package/src/shell.js +30 -5
- package/src/vendor/host/_platform.js +132 -0
- package/src/vendor/host/dsh-delete-turn.js +661 -0
- package/src/vendor/host/dsh-delete-turn.logic.js +655 -0
- package/src/vendor/host/dsh-edit-turn.js +2813 -0
- package/src/vendor/host/dsh-edit-turn.patch.js +285 -0
- package/src/vendor/host/dsh-markdown-bubble.js +37 -0
- package/src/vendor/host/dsh-rerun-turn.js +2784 -0
- package/src/vendor/versions.json +6 -0
- package/docs/INTEROP.md +0 -230
- package/src/studio.js +0 -553
- package/src/vendor/dsh-delete-turn.js +0 -1174
- package/src/vendor/dsh-edit-turn.js +0 -2626
- package/src/vendor/dsh-markdown-bubble.js +0 -872
- package/src/vendor/dsh-rerun-turn.js +0 -1014
- package/tools/build.mjs +0 -87
- package/tools/bump.mjs +0 -82
- package/tools/head.txt +0 -13
- package/tools/tail.txt +0 -5
- package/tools/tail2.txt +0 -4
- package/tools/vendor.mjs +0 -125
- package/tools/verify-manifest.mjs +0 -77
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 更新日志 / Changelog
|
|
2
|
+
|
|
3
|
+
本文档按语言分节;每条对应一个版本号。
|
|
4
|
+
|
|
5
|
+
## 中文
|
|
6
|
+
|
|
7
|
+
**0.3.0** —— 设置页搬到插件行自己的配置箭头;组件设置卡片直接复用组件自己的那一个。
|
|
8
|
+
|
|
9
|
+
- **设置页换了位置**:以前是「设置 → 插件 → AI Studio」里多一个标签页,和别的插件都不一样。现在注册到 `plugins.row.config`,键是 `dsh-as-aistudio#dsh-as-aistudio`(`<包名>#<行 id>` 的约定),于是**本包那一行**右侧多了配置箭头 —— 和这个 profile 里其它插件完全一致。点进去是整页:四个组件的实时状态,加下面的「组件设置」。
|
|
10
|
+
- **设置卡不再重画**:编辑样式、重跑方式、删除确认这三张卡,现在读组件自己导出的 `exports.ConfigCard`(`EditorStyleOption` / `AskBeforeRerunOption` / `AskBeforeDeleteOption`),渲染的就是组件那个组件函数本身。同一份设置、同一份存储键,组件页和本包页不会漂移;某个组件没跑起来时,它那张卡自动不出现。
|
|
11
|
+
- **每张卡用自己的字典**:卡里的文案(`config.style`、`config.ask` …)属于各组件自己的命名空间,本包按组件 id 取那个命名空间的翻译器再交给卡;否则屏幕上会原样打出键名。
|
|
12
|
+
- **版本不再「未知」**:四个组件的两半都内置在本包里,所以组件包**可以不装**。版本号以前从「已安装的包」读,于是不装就显示未知;现在 `tools/vendor.mjs` 在抄组件时写一份 `src/vendor/versions.json`,宿主半侧报的是**正在跑的那份代码**的版本(已安装的那份另记为 `installedVersion`)。实测四个包 `installed: false` 而 `mounted: true`,版本照样是 0.5.4 / 0.2.5 / 0.1.15 / 0.1.5。
|
|
13
|
+
- **组件跟进**:`dsh-edit-turn` 0.5.4、`dsh-rerun-turn` 0.2.5、`dsh-delete-turn` 0.1.15 —— 三者都导出了设置卡;rerun 另外把「顺补 / 自补」两个选项收成两个字、选项说明各收成一句、下拉宽度改成跟内容走。
|
|
14
|
+
|
|
15
|
+
**0.2.18** —— 报「正在跑的是哪一版」,不再依赖组件包是否安装。
|
|
16
|
+
|
|
17
|
+
**0.2.17** —— 重跑的下拉框宽度跟内容走(原来有 190px 下限,被撑满一行)。
|
|
18
|
+
|
|
19
|
+
**0.2.16** —— 重跑两个补法的选项说明各收成一句,去掉括号堆叠。
|
|
20
|
+
|
|
21
|
+
**0.2.15** —— 修正后的文案能真正进到页面:客户端按模块 id 缓存,旧 bundle 刷新也换不掉,换版本号是为了换 URL。
|
|
22
|
+
|
|
23
|
+
**0.2.14** —— 浏览器半侧与宿主半侧全部内置:本包没有任何运行时依赖,装它不会再装别的包;宿主半侧改为从运行中的 harness 解析平台包(`_platform.js`),并把组件导入的兄弟模块一起抄进来。
|
|
24
|
+
|
|
25
|
+
## English
|
|
26
|
+
|
|
27
|
+
**0.3.0** — the settings page moved to this plugin's own row, and the component cards are the components' own.
|
|
28
|
+
|
|
29
|
+
- **A row surface instead of a settings tab**: registered under `plugins.row.config` with the `dsh-as-aistudio#dsh-as-aistudio` key (`<package name>#<row id>`), so OUR row in the plugin manager gains the configure arrow every other plugin in this profile already has.
|
|
30
|
+
- **No second implementation**: the edit, rerun and delete cards render each component's own `exports.ConfigCard`, so the two surfaces share one preference and one storage key; a component that is not running contributes no card.
|
|
31
|
+
- **Each card speaks its own namespace**, and the version comes from what is vendored (`src/vendor/versions.json`) rather than from an installed package, which is why a fully self-contained studio never reports "version unknown".
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ AI Studio 的好用之处不在模型,在于一轮对话中的每一步都能
|
|
|
20
20
|
|
|
21
21
|
### 特性
|
|
22
22
|
|
|
23
|
-
- **一行搞定** —— 插件列表里只有 AI Studio
|
|
23
|
+
- **一行搞定** —— 插件列表里只有 AI Studio 一行。四个组件的**界面与后台都内置在本包里**,由本包的四个补丁行 `dsh-as-aistudio/edit` 等挂载(详情页因此能列出这 4 个组件),不再各自占一行。**装本包不会再装任何别的东西。**
|
|
24
24
|
- **组件仍是独立包** —— 每个都有自己的仓库与 cordis.patch.yml,单独安装照样工作;本包不复制任何组件逻辑:宿主半侧(路由、回滚、重放)就是组件自己,浏览器 factory 由 tools/vendor.mjs 从组件源码逐字剥离生成。
|
|
25
25
|
- **副本不会漂移** —— npm run vendor 重新生成内联包,npm run build 重新生成大 bundle,verify:vendor / verify:build 是只读校验;测试里 vendor-sync / build-sync 会在副本过期时失败。
|
|
26
26
|
- **一个挂了不影响其余** —— 四个 vendored factory 各自带 guard 挂载,一个抛错不会带走另外三个。
|
|
@@ -33,7 +33,7 @@ AI Studio 的好用之处不在模型,在于一轮对话中的每一步都能
|
|
|
33
33
|
dsh plugin --profile web add dsh-as-aistudio
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
桌面端把 --profile web 换成 --profile desktop
|
|
36
|
+
桌面端把 --profile web 换成 --profile desktop。四个组件已经内置在本包里,不需要再装任何东西。
|
|
37
37
|
|
|
38
38
|
### 使用
|
|
39
39
|
|
|
@@ -54,7 +54,7 @@ dsh plugin --profile web add dsh-as-aistudio
|
|
|
54
54
|
### 已知限制
|
|
55
55
|
|
|
56
56
|
- 四个组件的 browser factory 是生成副本。改了组件必须 npm run vendor && npm run build 再发本包;verify:vendor / verify:build 会拦住过期副本。
|
|
57
|
-
-
|
|
57
|
+
- 组件被关掉(插件页里把 `dsh-as-aistudio/<组件>` 那行停用)时,它的界面与后台都不挂载,面板显示「已安装,宿主未挂载」。
|
|
58
58
|
- 宿主版本常量只在进程启动时读一次:改了本包要重启宿主 + 硬刷新。
|
|
59
59
|
|
|
60
60
|
### 兼容性
|
|
@@ -77,7 +77,7 @@ What makes AI Studio pleasant is not the model: it is that every step of a turn
|
|
|
77
77
|
|
|
78
78
|
### Features
|
|
79
79
|
|
|
80
|
-
- **One row** — the plugin list shows only AI Studio.
|
|
80
|
+
- **One row** — the plugin list shows only AI Studio. Both halves of the four components travel inside this package and are mounted by its four patch rows (`dsh-as-aistudio/edit` and friends, which is why the detail page can list all four). Installing the studio installs nothing else.
|
|
81
81
|
- **Components stay independent packages** — each keeps its own repo and its own cordis.patch.yml and works alone. This package copies no component logic: the host halves ARE the components, and the browser factories are lifted verbatim from their sources by tools/vendor.mjs.
|
|
82
82
|
- **The vendored copy cannot drift** — npm run vendor regenerates it, npm run build regenerates the bundle, and verify:vendor / verify:build are read-only gates; the test suite fails on a stale copy.
|
|
83
83
|
- **One failure does not take the rest** — each vendored factory mounts behind its own guard.
|
|
@@ -90,7 +90,7 @@ What makes AI Studio pleasant is not the model: it is that every step of a turn
|
|
|
90
90
|
dsh plugin --profile web add dsh-as-aistudio
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Use --profile desktop on the desktop app. The four components
|
|
93
|
+
Use --profile desktop on the desktop app. The four components are already inside this package; there is nothing else to install.
|
|
94
94
|
|
|
95
95
|
### Usage
|
|
96
96
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-as-aistudio",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Google-AI-Studio-style turn controls for DeepSeek Harness, in one install: edit a prompt and re-run it, re-run a reply in place, delete a turn from the model context, and render sent prompts as Markdown. Self-contained: the plugin list shows this one row
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Google-AI-Studio-style turn controls for DeepSeek Harness, in one install: edit a prompt and re-run it, re-run a reply in place, delete a turn from the model context, and render sent prompts as Markdown. Self-contained: the plugin list shows this one row, and the four components are vendored inside it - installing the studio installs nothing else.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -14,10 +14,14 @@
|
|
|
14
14
|
"./package.json": "./package.json"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"src",
|
|
18
|
-
"
|
|
17
|
+
"src/index.js",
|
|
18
|
+
"src/shell.js",
|
|
19
|
+
"src/components.js",
|
|
20
|
+
"src/client.js",
|
|
21
|
+
"src/vendor/host",
|
|
22
|
+
"src/vendor/versions.json",
|
|
19
23
|
"cordis.patch.yml",
|
|
20
|
-
"
|
|
24
|
+
"CHANGELOG.md",
|
|
21
25
|
"README.md",
|
|
22
26
|
"LICENSE"
|
|
23
27
|
],
|
|
@@ -51,12 +55,7 @@
|
|
|
51
55
|
"verify:build": "node tools/build.mjs --check",
|
|
52
56
|
"verify:manifest": "node tools/verify-manifest.mjs"
|
|
53
57
|
},
|
|
54
|
-
"dependencies": {
|
|
55
|
-
"dsh-delete-turn": "^0.1.9",
|
|
56
|
-
"dsh-edit-turn": "^0.2.20",
|
|
57
|
-
"dsh-markdown-bubble": "^0.1.4",
|
|
58
|
-
"dsh-rerun-turn": "^0.1.26"
|
|
59
|
-
},
|
|
58
|
+
"dependencies": {},
|
|
60
59
|
"dsh": {
|
|
61
60
|
"bundle": {
|
|
62
61
|
"patch": "./cordis.patch.yml"
|
|
@@ -72,7 +71,7 @@
|
|
|
72
71
|
]
|
|
73
72
|
},
|
|
74
73
|
"engines": {
|
|
75
|
-
"dsh": ">=0.1
|
|
74
|
+
"dsh": ">=0.2.1-rc.2"
|
|
76
75
|
},
|
|
77
76
|
"compatibility": {
|
|
78
77
|
"dshReleases": {
|
|
@@ -80,5 +79,11 @@
|
|
|
80
79
|
"0.2.0-rc.2": "compatible"
|
|
81
80
|
}
|
|
82
81
|
}
|
|
82
|
+
},
|
|
83
|
+
"devDependencies": {
|
|
84
|
+
"dsh-delete-turn": "^0.1.14",
|
|
85
|
+
"dsh-edit-turn": "^0.5.3",
|
|
86
|
+
"dsh-markdown-bubble": "^0.1.5",
|
|
87
|
+
"dsh-rerun-turn": "^0.2.4"
|
|
83
88
|
}
|
|
84
89
|
}
|