dsh-config-sync-plugin 0.3.80 → 0.3.81

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.en.md CHANGED
@@ -19,7 +19,7 @@ The package name is **`dsh-config-sync-plugin`** (the `dsh-config-sync` name on
19
19
 
20
20
  | Way | Command / entry | Notes |
21
21
  |---|---|---|
22
- | npm | `npm i dsh-config-sync-plugin` | Use it as a dependency, or add `"dsh-config-sync-plugin": "^0.3.80"` to the profile's `package.json` and run `pnpm i`. The name matches the `cordis.patch.yml` insert name and the install folder `dsh-config-sync-plugin-<ver>` |
22
+ | npm | `npm i dsh-config-sync-plugin` | Use it as a dependency, or add `"dsh-config-sync-plugin": "^0.3.81"` to the profile's `package.json` and run `pnpm i`. The name matches the `cordis.patch.yml` insert name and the install folder `dsh-config-sync-plugin-<ver>` |
23
23
  | Marketplace | client → Plugins → Discover → “Config Sync” | Installs from the git commit registered in `market-index.json` |
24
24
  | Offline tgz | `releases\dsh-config-sync-plugin-<ver>.tgz` | GitHub Release asset for air-gapped machines; the panel's Update button downloads the same file |
25
25
 
@@ -253,6 +253,11 @@ Two display fixes on top of 0.3.77:
253
253
  1. **Jump order matches section order**: the quick-jump tabs now follow the exact render order of the sections (Overview / Sync conflicts [when present] / Local paths [when expanded] / Targets / Automation & updates / Scripts / Restore / Content / Plugin data / Workspace visibility / Feedback). The two conditional sections (conflicts, local paths) appear in the tabs only when their cards are shown.
254
254
  2. **Scroll lands below the title**: the sticky title bar now uses an opaque background (same fill as panel cards), so content no longer shows through it; jumping to a tab sets the scroll offset from the title bar's actual height, so the target section lands fully below the title instead of being covered.
255
255
 
256
+ ### Workspace visibility card session names now match the DSH panel (0.3.81)
257
+
258
+ Fixes session names in the "Workspace visibility" card differing from the DSH session panel.
259
+
260
+ DSH session titles evolve: a fallback title (truncated first message) is created first, then a provider title is generated by the model. The card previously stopped at the first fallback; it now picks the latest title by priority — provider > fallback > untagged title > first user message — matching the DSH panel exactly.
256
261
  ### Fix cross-machine sync downgrading the installed plugin and rolling back pulls (0.3.80)
257
262
 
258
263
  Fixes an issue where pulling on another machine replaced a newer locally installed plugin with an older archive from the config repo, turning the link into 0.0.0, failing bundle resolution, and rolling the pull back.
package/README.md CHANGED
@@ -15,7 +15,7 @@ DSH 插件:左侧栏多一行「配置同步」,点开是整页体检面板
15
15
 
16
16
  | 方式 | 命令 / 入口 | 说明 |
17
17
  |---|---|---|
18
- | npm | `npm i dsh-config-sync-plugin` | 适合把它当依赖管理,或在 profile 的 `package.json` 里写 `"dsh-config-sync-plugin": "^0.3.80"` 后 `pnpm i`;包名与 `cordis.patch.yml` 里注册的名字、插件目录 `dsh-config-sync-plugin-<ver>` 一致 |
18
+ | npm | `npm i dsh-config-sync-plugin` | 适合把它当依赖管理,或在 profile 的 `package.json` 里写 `"dsh-config-sync-plugin": "^0.3.81"` 后 `pnpm i`;包名与 `cordis.patch.yml` 里注册的名字、插件目录 `dsh-config-sync-plugin-<ver>` 一致 |
19
19
  | 插件市场 | 客户端「插件市场 → 发现」搜「配置同步」 | 走 `market-index.json` 登记的 git 提交,版本与 README 对齐 |
20
20
  | 离线 tgz | `releases\dsh-config-sync-plugin-<ver>.tgz` | GitHub Release 附件,适合内网机器;面板「更新」按钮下载的也是它 |
21
21
 
@@ -273,6 +273,11 @@ pwsh -File runtime\sync.ps1 pull `
273
273
  1. **跳转顺序对齐卡片**:快捷标签顺序改为与分区实际渲染顺序完全一致(概览 / 同步冲突[有冲突时] / 本机路径[展开时] / 同步目标 / 自动化与插件更新 / 生成脚本 / 还原备份 / 同步内容 / 插件数据 / 工作区显示 / 问题反馈)。同步冲突、本机路径两个条件分区只在卡片存在时才出现在标签里。
274
274
  2. **滚动落点在标题下方**:标题栏改为不透明背景(面板卡片同色),滚动时内容不再从标题背后透出;点标签跳转时按标题栏实际高度设置滚动落点,目标分区完整显示在标题下方,不再被遮住。
275
275
 
276
+ ### 工作区显示卡片的会话名称与 DSH 面板保持一致(0.3.81)
277
+
278
+ 修复「工作区显示」卡片里会话名称与 DSH 会话面板显示不一致的问题。
279
+
280
+ DSH 的会话标题会演进:先产生 fallback 临时标题(首条消息截断),随后由大模型生成 provider 正式标题。之前卡片只读到第一条 fallback 就停止;现在改为按 provider 正式标题 > fallback > 无来源 title > 首条用户消息 的优先级取最新标题,与 DSH 面板完全一致。
276
281
  ### 修复跨机同步把新插件降级覆盖、拉取后被回滚(0.3.80)
277
282
 
278
283
  修复跨机拉取时本地已安装的新版插件被配置仓库里的旧归档反向覆盖,进而导致 link 变成 0.0.0、插件 bundle 自检失败、拉取自动回滚的问题。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-config-sync-plugin",
3
- "version": "0.3.80",
3
+ "version": "0.3.81",
4
4
  "type": "module",
5
5
  "description": "在 DSH 设置里查看 dsh-config 仓库与本机的同步状态,并生成退出后执行的 push/pull 脚本。同步动作本身不在应用内执行。面板与文案跟随客户端语言(中文/English)。",
6
6
  "main": "./index.js",
package/runtime/apply.ps1 CHANGED
@@ -900,6 +900,7 @@ $localPluginMap = [ordered]@{
900
900
  'dsh-our-free-model-2.8.0' = 'dsh-our-free-model'
901
901
  'dsh-purge-1.4.0' = 'dsh-purge'
902
902
  'dsh-config-sync-plugin-0.3.69' = 'dsh-config-sync-plugin'
903
+ 'dsh-config-sync-plugin-0.3.81' = 'dsh-config-sync-plugin'
903
904
  'dsh-config-sync-plugin-0.3.80' = 'dsh-config-sync-plugin'
904
905
  'dsh-config-sync-plugin-0.3.79' = 'dsh-config-sync-plugin'
905
906
  'dsh-config-sync-plugin-0.3.78' = 'dsh-config-sync-plugin'
@@ -134,14 +134,21 @@ function titleFromFile(file) {
134
134
  } else {
135
135
  text = buf.toString('utf8', 0, 256 * 1024)
136
136
  }
137
- let lastTitle = ''
137
+ // 会话标题会演进:先产生 fallback(首条消息截断),随后 AI 生成 provider 正式标题覆盖。
138
+ // DSH 面板显示的是最新/provider 标题;这里必须一致,不能像以前那样找到第一条就 break。
139
+ let providerTitle = '' // source.kind === 'provider' 的 AI 标题(取最后一条)
140
+ let fallbackTitle = '' // fallback 标题(取最后一条)
141
+ let anyTitle = '' // 无 source 信息的兜底标题(取最后一条)
138
142
  let firstUserText = ''
139
143
  for (const line of text.split('\n')) {
140
144
  if (!line) continue
141
145
  let ev
142
146
  try { ev = JSON.parse(line) } catch { continue }
143
147
  if (ev.type === 'session/title' && ev.data && typeof ev.data.title === 'string') {
144
- lastTitle = ev.data.title
148
+ const kind = ev.data.source && ev.data.source.kind
149
+ if (kind === 'provider') providerTitle = ev.data.title
150
+ else if (kind === 'fallback') fallbackTitle = ev.data.title
151
+ else anyTitle = ev.data.title
145
152
  }
146
153
  if (!firstUserText && ev.type === 'user/message' && ev.data && Array.isArray(ev.data.content)) {
147
154
  for (const part of ev.data.content) {
@@ -151,9 +158,9 @@ function titleFromFile(file) {
151
158
  }
152
159
  }
153
160
  }
154
- if (lastTitle) break
155
161
  }
156
- result = { title: cleanTitle(lastTitle) || cleanTitle(firstUserText) }
162
+ // 优先级与 DSH 面板一致:provider 正式标题 > fallback > 无来源 title > 首条用户消息
163
+ result = { title: cleanTitle(providerTitle) || cleanTitle(fallbackTitle) || cleanTitle(anyTitle) || cleanTitle(firstUserText) }
157
164
  } catch {
158
165
  result = { title: '' }
159
166
  }
@@ -1627,6 +1627,10 @@ console.log('== 配置同步页面 5 点调整 ==')
1627
1627
  wvSrc.includes('zstdDecompressSync') && wvSrc.includes('buildSessionLogIndex')
1628
1628
  && wvSrc.includes("'session/title'") && wvSrc.includes('title: rec.title || wsId')
1629
1629
  && wvSrc.includes('const title = log ? titleFromFile(log).title'), 'workspace-view.mjs 的标题提取')
1630
+ check('会话名称:与 DSH 面板一致——优先 provider 正式标题,不再取第一条 fallback',
1631
+ wvSrc.includes('providerTitle') && wvSrc.includes("kind === 'provider'")
1632
+ && wvSrc.includes('cleanTitle(providerTitle) || cleanTitle(fallbackTitle)')
1633
+ && !wvSrc.includes('if (lastTitle) break'), '标题演进:provider > fallback > 无来源 > 首条消息')
1630
1634
  check('会话名称:卡片显示 s.title || s.id', cliSrc.includes('s.title || s.id'), 'client.js 卡片')
1631
1635
  // 2) 修改按钮:点「修改」才出现三态 select 与会话隐藏按钮
1632
1636
  check('修改按钮:编辑态才显示三态 select 与会话隐藏按钮',