dsh-codinput 0.1.0 → 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/CHANGELOG.md +22 -0
- package/README.en.md +5 -4
- package/README.md +5 -6
- package/lib/client.js +81 -70
- package/package.json +1 -1
- package/src/client/components/SlashMenu.tsx +1 -1
- package/src/client/components/StatsRow.tsx +140 -6
- package/src/client/components/Toolbar.tsx +2 -121
- package/src/client/stats.ts +5 -4
- package/src/client/styles.ts +52 -41
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
本项目遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/) 与 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## [0.1.1] — 2026-09-25
|
|
6
|
+
|
|
7
|
+
适配宿主 `0.1.7-rc.2`(`next` 通道)的官方候选菜单亚克力改版;旧 rc 宿主经 token 回退链保持原样。
|
|
8
|
+
|
|
9
|
+
### 新增
|
|
10
|
+
|
|
11
|
+
- **候选框亚克力背景**:`/` `@` 候选菜单对齐官方 `0.1.7-rc.2`——官方此版起菜单表面改为 primitives `MenuSurface` 的 material 层(`--dsw-menu-surface-fill` ≈ 45% alpha + `backdrop-filter: blur(40px) saturate(150%)`),菜单本体不再自带背景。复刻菜单改为单元素合并两层,取值逐值一致;同一 token 链应用到指令菜单、数据行详情面板与上下文分段面板。
|
|
12
|
+
- **上下文小圈挪进数据行**:官方 `0.1.7-rc.2` 把上下文占用小圈从输入卡片工具行挪到卡片下方 dock 行(stats 胶囊之后),trigger 变为「双环仪表 + 百分比」药丸(padding 1px 8px、gap 6px、13px tabular-nums),且独立于 stats 胶囊渲染(无统计数据时也出现)。已逐值对齐。
|
|
13
|
+
- **候选菜单尺寸同步 rc.2**:max-height 320→400(`SlashMenu` 的 JS 上限常量同步修正——该常量以内联样式覆盖 CSS,仅改 CSS 不生效)、item 行 40px/14px→34px/13px(gap 8→6、radius→`--dsw-radius-md`)、图标 16→14px 且颜色走新的 `--dsw-alias-menu-icon`、分节标题/骨架屏/面包屑收紧值同步。
|
|
14
|
+
|
|
15
|
+
### 修复
|
|
16
|
+
|
|
17
|
+
- **上下文小圈数值与官方不一致**:官方 `contextOccupancy` 优先取 `projectedTokens`(含投影增长),缺失才退 `pressureTokens`;复刻此前只读 `pressureTokens`,导致启用 Codinput 前后小圈显示不同(如官方 3%、Codinput 2%)。已按官方语义修正(含分段面板 figures 取数)。
|
|
18
|
+
|
|
19
|
+
### 说明
|
|
20
|
+
|
|
21
|
+
- **双通道兼容**:`0.1.7-rc.2` 走新 token(亚克力、16px 圆角、menu-icon 色);`0.1.5-rc.3` 等旧宿主没有这些 token,回退链落回原 rc.3 形态(不透明 `--dsw-specific-menu`、20px 圆角、无 blur),两端均与各自官方一致。
|
|
22
|
+
- 官方 rc.2 新增的候选菜单 `[data-overflow-below]` 底部渐隐未复刻(需宿主溢出方向状态,仅影响菜单向下展开的变体)。
|
|
23
|
+
- 测试状况(分两层):静态层面,官方 CSS 从 `dsh-client-ui-theme` / `dsh-client-ui-input-trigger` / `dsh-client-ui-conversation` 的 `0.1.7-rc.2` 包内逐值提取核对;运行时层面,在实机 `0.1.7-rc.2` 上验证了暗/亮主题亚克力、悬浮形态菜单与小圈挪位(CI 仍只做静态把关,运行时零覆盖不变)。
|
|
24
|
+
|
|
25
|
+
[0.1.1]: https://github.com/Witherwithwinter/DSH-Codinput/compare/v0.1.0...v0.1.1
|
|
26
|
+
|
|
5
27
|
## [0.1.0] — 2026-09-23
|
|
6
28
|
|
|
7
29
|
首个公开版本。
|
package/README.en.md
CHANGED
|
@@ -112,15 +112,16 @@ After editing the profile by hand, run `pnpm install` inside the profile directo
|
|
|
112
112
|
|
|
113
113
|
## Compatibility
|
|
114
114
|
|
|
115
|
-
The host publishes **rc** builds on npm
|
|
115
|
+
The host publishes **rc** builds on npm (`latest` is the current stable rc, `next` is the following rc, `alpha` is the further-ahead channel), so a plain install gives you an rc.
|
|
116
116
|
|
|
117
117
|
| Host version | Status |
|
|
118
118
|
| --- | --- |
|
|
119
|
-
| `0.1.
|
|
119
|
+
| `0.1.7-rc.2` | ✅ Verified on a real instance (current `next`; the acrylic candidate menu and the relocated context meter are aligned to this build) |
|
|
120
|
+
| `0.1.5-rc.2` | ✅ Verified on a real instance |
|
|
120
121
|
| `0.1.6-alpha.2` | ✅ Current development baseline; every feature verified end to end |
|
|
121
|
-
| others | untested |
|
|
122
|
+
| others (incl. `0.1.5-rc.3`, the current `latest`) | untested; older hosts lack the rc.2 tokens, so the fallback chain keeps each host's official look |
|
|
122
123
|
|
|
123
|
-
|
|
124
|
+
For `0.1.7-rc.2`, on top of the real-instance run, the official CSS for the candidate menu and the context meter was extracted value by value from that version's client packages (`dsh-client-ui-theme` / `dsh-client-ui-input-trigger` / `dsh-client-ui-conversation`) and checked against the replica. The contracts this plugin relies on were verified per version: the three slots it uses (`conversation.composer.bar`, `sidebar.right.pane.tab`, `settings.section`), the `sidebarRight` / `sidebarRightTabs` / `locale` services and `openTabIn`, the sidebar expansion planner (dockkit `planSetExpanded`), and the official primitives the replicas are copied from (`fileSizeText` / `fileExtension` and the attachment glyph paths, byte for byte). For how to re-run this on another channel, see the “Verifying on another channel” section of [TESTING.md](./TESTING.md).
|
|
124
125
|
|
|
125
126
|
The plugin leans on host internals (slot shadowing, `useTabInfo`, `sidebarRight`, `--dsw-*` tokens). Every call site guards with `typeof` checks and degrades gracefully, but a major host upgrade can still break it. **After upgrading the host, walk through [TESTING.md](./TESTING.md).**
|
|
126
127
|
|
package/README.md
CHANGED
|
@@ -112,17 +112,16 @@ dsh plugin --profile web add link:/abs/path/to/DSH-Codinput
|
|
|
112
112
|
|
|
113
113
|
## 兼容性
|
|
114
114
|
|
|
115
|
-
宿主通过 npm
|
|
115
|
+
宿主通过 npm 发的是 **rc** 版本(`latest` 是当前稳定 rc,`next` 是下个 rc,`alpha` 是更超前的通道),所以普通用户装到的就是 rc。
|
|
116
116
|
|
|
117
117
|
| 宿主版本 | 状态 |
|
|
118
118
|
| --- | --- |
|
|
119
|
-
| `0.1.
|
|
119
|
+
| `0.1.7-rc.2` | ✅ 实机实测通过(`next` 通道当前版本;候选菜单亚克力、上下文小圈挪位即为此版对齐) |
|
|
120
|
+
| `0.1.5-rc.2` | ✅ 实机实测通过 |
|
|
120
121
|
| `0.1.6-alpha.2` | ✅ 开发基线,全部功能端到端实测通过 |
|
|
121
|
-
|
|
|
122
|
+
| 其它(含 `latest` 现指向的 `0.1.5-rc.3`) | 未实测;旧宿主无 rc.2 新 token,回退链自动保持各版官方原形态 |
|
|
122
123
|
|
|
123
|
-
rc
|
|
124
|
-
|
|
125
|
-
插件对宿主内部结构的依赖较多(槽位遮蔽、`useTabInfo`、`sidebarRight`、`--dsw-*` 令牌),代码里处处用 `typeof` 守卫 + `try/catch` 降级,但宿主大版本升级仍可能失效。**升级宿主后请按 [TESTING.md](./TESTING.md) 走一遍冒烟清单。**
|
|
124
|
+
对 `0.1.7-rc.2` 除实机验证外,还从该版本的客户端包(`dsh-client-ui-theme` / `dsh-client-ui-input-trigger` / `dsh-client-ui-conversation`)逐值提取了候选菜单与上下文小圈的官方 CSS 核对。插件依赖的契约按版本核对过:用到的 3 个槽位(`conversation.composer.bar`、`sidebar.right.pane.tab`、`settings.section`)、`sidebarRight` / `sidebarRightTabs` / `locale` 服务与 `openTabIn`、侧栏展开规划(dockkit `planSetExpanded`)、以及复刻所依据的官方原语(`fileSizeText` / `fileExtension` 与附件 glyph 路径,逐字一致)。插件对宿主内部结构的依赖较多(槽位遮蔽、`useTabInfo`、`sidebarRight`、`--dsw-*` 令牌),代码里处处用 `typeof` 守卫 + `try/catch` 降级,但宿主大版本升级仍可能失效。**升级宿主后请按 [TESTING.md](./TESTING.md) 走一遍冒烟清单。**
|
|
126
125
|
|
|
127
126
|
## 已知限制
|
|
128
127
|
|