dsh-config-sync-plugin 0.3.85 → 0.3.86
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 +10 -1
- package/README.md +10 -1
- package/client.js +30 -18
- package/index.js +62 -2
- package/package.json +1 -1
- package/tools/selftest.mjs +40 -0
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.
|
|
22
|
+
| npm | `npm i dsh-config-sync-plugin` | Use it as a dependency, or add `"dsh-config-sync-plugin": "^0.3.86"` 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,14 @@ 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
|
+
### Local data moved into To-do, grouped by sync content, sessions shown by name (0.3.86)
|
|
257
|
+
|
|
258
|
+
The "Local data" row in the "Local repo" card moved into "Overview → To-do", with its presentation reorganised:
|
|
259
|
+
|
|
260
|
+
1. **Location**: the old "Local data" line at the bottom of the "Local repo" card is gone. The To-do card now shows even when nothing else is wrong — it starts with local data (last sync time / pending count / mode) and then the existing to-do suggestions. "How much is still unsynced" and "what to do about it" sit together.
|
|
261
|
+
2. **Grouped by sync content**: pending files are counted by the same twelve groups as "Sync content" — Conversations / Skills / Plugin data / Memory data / Local profile / Global prompts / Agent presets / Plugin settings & workflows / Workspace files / Extra paths, etc. Each group is a chip with a count, sorted by count descending; no more bare single total.
|
|
262
|
+
3. **Sessions shown by name**: in the "Recently changed" sample, session files show the projected session title (matching the DSH panel, e.g. "列出工作区下的文件夹") instead of a `session-xxx/session.v4.jsonl.zstd` directory id; non-session items with no title still show their parent directory / file name.
|
|
263
|
+
|
|
256
264
|
### Workspace visibility card: one Edit button for the whole card, sessions paired with their toggles (0.3.84 / 0.3.85)
|
|
257
265
|
|
|
258
266
|
The edit interaction of the "Workspace visibility" card was rebuilt:
|
|
@@ -669,6 +677,7 @@ The log shows which path ran: `文件比较(快筛):比对 N 个,深哈
|
|
|
669
677
|
|
|
670
678
|
| Date | Version | Summary |
|
|
671
679
|
|---|---|---|
|
|
680
|
+
| 2026-11-23 | 0.3.86 | Moved "Local data" into Overview / To-do, grouped pending files by the twelve sync-content groups, and show session names instead of session ids in the sample |
|
|
672
681
|
| 2026-11-23 | 0.3.85 | Removed the tinted banner above the workspace list in edit mode; edit state is read from the Edit/Done button in the header |
|
|
673
682
|
| 2026-11-23 | 0.3.84 | Workspace visibility card uses one Edit button for the whole card; each session row carries its own toggle with a background and divider, hidden names struck through |
|
|
674
683
|
| 2026-11-23 | 0.3.83 | Workspace visibility card also collapses blank sessions and Mnemon idle-review parents; default view on this machine 99 → 10 |
|
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.
|
|
18
|
+
| npm | `npm i dsh-config-sync-plugin` | 适合把它当依赖管理,或在 profile 的 `package.json` 里写 `"dsh-config-sync-plugin": "^0.3.86"` 后 `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,14 @@ pwsh -File runtime\sync.ps1 pull `
|
|
|
273
273
|
1. **跳转顺序对齐卡片**:快捷标签顺序改为与分区实际渲染顺序完全一致(概览 / 同步冲突[有冲突时] / 本机路径[展开时] / 同步目标 / 自动化与插件更新 / 生成脚本 / 还原备份 / 同步内容 / 插件数据 / 工作区显示 / 问题反馈)。同步冲突、本机路径两个条件分区只在卡片存在时才出现在标签里。
|
|
274
274
|
2. **滚动落点在标题下方**:标题栏改为不透明背景(面板卡片同色),滚动时内容不再从标题背后透出;点标签跳转时按标题栏实际高度设置滚动落点,目标分区完整显示在标题下方,不再被遮住。
|
|
275
275
|
|
|
276
|
+
### 本机数据挪进待办 + 按同步内容分组 + 会话显示会话名(0.3.86)
|
|
277
|
+
|
|
278
|
+
把「本机仓库」卡里的「本机数据」行移到了「概览 → 待办」,并重新组织它的呈现:
|
|
279
|
+
|
|
280
|
+
1. **位置**:原先「本机仓库」卡底部那行「本机数据」删掉;现在待办卡在无其它异常时也照样出现,顶部先显示本机数据(上次同步时间 / 待推送数 / 模式),下面才是原来的待办建议。这样「本机还有多少没推」和「该做什么」在同一处看。
|
|
281
|
+
2. **按同步内容分组**:待推送文件按「同步内容」那套 12 组口径归类统计 —— 会话记录 / Skills / 插件数据 / 记忆数据 / 本机 profile / 全局提示 / Agent 预设 / 插件设置 / 工作区资料 / 额外路径 等,每组一个 chip 显示条数,按数量从多到少排;不再只报一个总数。
|
|
282
|
+
3. **会话显示会话名**:待办里「最近写入」的样本,会话文件显示投影缓存里的会话标题(和 DSH 面板一致,如「列出工作区下的文件夹」),不再是 `session-xxx/session.v4.jsonl.zstd` 这种目录 ID;取不到标题的非会话项仍显示父目录/文件名。
|
|
283
|
+
|
|
276
284
|
### 工作区显示卡片:整卡一个「修改」按钮,会话与开关一一对应(0.3.84 / 0.3.85)
|
|
277
285
|
|
|
278
286
|
「工作区显示」卡片的编辑交互重做:
|
|
@@ -651,6 +659,7 @@ pwsh -File sync.ps1 push -ScanHistory
|
|
|
651
659
|
|
|
652
660
|
| 日期 | 版本 | 要点 |
|
|
653
661
|
|---|---|---|
|
|
662
|
+
| 2026-11-23 | 0.3.86 | 「本机数据」挪进概览-待办,按同步内容的 12 组口径分类统计,会话样本显示会话标题而非 session id |
|
|
654
663
|
| 2026-11-23 | 0.3.85 | 去掉工作区显示卡片编辑态的强调色说明条,编辑与否只看标题行「修改」/「完成」按钮 |
|
|
655
664
|
| 2026-11-23 | 0.3.84 | 工作区显示卡片改成整卡一个「修改」按钮;会话行自带开关、加底色与分隔线,隐藏态删除线 |
|
|
656
665
|
| 2026-11-23 | 0.3.83 | 工作区显示卡片再折叠空会话与 Mnemon 空闲审查父容器;本机默认视图 99 → 10 条 |
|
package/client.js
CHANGED
|
@@ -713,21 +713,6 @@ window.__ModuleLoader__.load({
|
|
|
713
713
|
'The local repo has no content yet: Pull fetches the whole repo into this path (git init + fetch + checkout). Push is disabled until then.',
|
|
714
714
|
))
|
|
715
715
|
: null,
|
|
716
|
-
h(Kv, { k: M('本机数据', 'Local data'), v: (() => {
|
|
717
|
-
const local = props.data && props.data.local
|
|
718
|
-
if (!local || !local.known) return M('还没同步过', 'Never synced yet')
|
|
719
|
-
const when = local.lastSyncAt ? new Date(local.lastSyncAt).toLocaleString(localeNow(), { hour12: false }) : '?'
|
|
720
|
-
const tail = local.pending > 0
|
|
721
|
-
? M(
|
|
722
|
-
`有 ${local.pending} 个文件待推送${local.sample && local.sample.length ? `(如 ${local.sample.join('、')})` : ''}`,
|
|
723
|
-
`${local.pending} file(s) to push${local.sample && local.sample.length ? ` (e.g. ${local.sample.join(', ')})` : ''}`,
|
|
724
|
-
)
|
|
725
|
-
: M('没有新写入', 'nothing new')
|
|
726
|
-
return M(
|
|
727
|
-
`${tail} · 上次同步 ${when}${local.mode ? `(${local.mode})` : ''}`,
|
|
728
|
-
`${tail} · last sync ${when}${local.mode ? ` (${local.mode})` : ''}`,
|
|
729
|
-
)
|
|
730
|
-
})() }),
|
|
731
716
|
h('div', { style: S.footnote }, M(
|
|
732
717
|
'路径只存本机设置文件(~\\.dsh\\dsh-config-sync.json),不进仓库,各机器各配各的。',
|
|
733
718
|
'The path lives only in the local settings file (~\\.dsh\\dsh-config-sync.json), never in the repo.',
|
|
@@ -2626,12 +2611,39 @@ window.__ModuleLoader__.load({
|
|
|
2626
2611
|
return local.pending > 0 ? M(`${base}(+${local.pending})`, `${base} (+${local.pending})`) : base
|
|
2627
2612
|
})(), data && data.local && data.local.pending > 0 ? 'warn' : 'ok'),
|
|
2628
2613
|
)
|
|
2614
|
+
// 本机数据(原「本机仓库」卡里的一行)挪进待办:按「同步内容」分组列出待推送项,会话显示会话名
|
|
2615
|
+
const localBlock = data && data.local && data.local.known ? (() => {
|
|
2616
|
+
const local = data.local
|
|
2617
|
+
const when = local.lastSyncAt ? new Date(local.lastSyncAt).toLocaleString(localeNow(), { hour12: false }) : '?'
|
|
2618
|
+
const groups = Array.isArray(local.groups) ? local.groups : []
|
|
2619
|
+
const head = h('div', { style: { ...S.cardTitle, marginBottom: '4px' } }, M('本机数据', 'Local data'))
|
|
2620
|
+
const meta = h('div', { style: S.footnote }, M(
|
|
2621
|
+
`上次同步 ${when} · ${local.pending > 0 ? `有 ${local.pending} 个文件待推送` : '没有新写入'}${local.mode ? `(${local.mode})` : ''}`,
|
|
2622
|
+
`Last sync ${when} · ${local.pending > 0 ? `${local.pending} file(s) to push` : 'nothing new'}${local.mode ? ` (${local.mode})` : ''}`,
|
|
2623
|
+
))
|
|
2624
|
+
const groupRows = groups.length
|
|
2625
|
+
? h('div', { style: { display: 'flex', flexWrap: 'wrap', gap: '6px' } }, groups.map((g, i) =>
|
|
2626
|
+
h('div', {
|
|
2627
|
+
key: i,
|
|
2628
|
+
style: { ...S.chip, background: 'var(--dsw-alias-fill-l1, var(--dsw-alias-border-l1))' },
|
|
2629
|
+
}, `${langIsZh() ? g.zh : g.en} · ${g.count}`)))
|
|
2630
|
+
: null
|
|
2631
|
+
const sampleRow = Array.isArray(local.sample) && local.sample.length
|
|
2632
|
+
? h('div', { style: S.footnote }, M(
|
|
2633
|
+
`最近写入:${local.sample.join('、')}`,
|
|
2634
|
+
`Recently changed: ${local.sample.join(', ')}`,
|
|
2635
|
+
))
|
|
2636
|
+
: null
|
|
2637
|
+
return h('div', { style: { display: 'flex', flexDirection: 'column', gap: '4px' } }, head, meta, groupRows, sampleRow)
|
|
2638
|
+
})() : null
|
|
2639
|
+
|
|
2629
2640
|
const overview = h('div', { style: { gridColumn: '1 / -1', display: 'flex', flexDirection: 'column', gap: '8px' } },
|
|
2630
2641
|
metrics,
|
|
2631
|
-
data && Array.isArray(data.advice) && data.advice.length
|
|
2632
|
-
? h('div', { style: { ...S.card, gap: '
|
|
2642
|
+
(localBlock || (data && Array.isArray(data.advice) && data.advice.length))
|
|
2643
|
+
? h('div', { style: { ...S.card, gap: '6px', padding: '10px 13px' } },
|
|
2633
2644
|
h('div', { style: S.cardTitle }, M('待办', 'To-do')),
|
|
2634
|
-
|
|
2645
|
+
localBlock,
|
|
2646
|
+
data && Array.isArray(data.advice) && data.advice.length ? h(Advice, { items: data.advice }) : null)
|
|
2635
2647
|
: null,
|
|
2636
2648
|
)
|
|
2637
2649
|
|
package/index.js
CHANGED
|
@@ -1761,6 +1761,51 @@ function workspaceRoots(dshHome) {
|
|
|
1761
1761
|
: []
|
|
1762
1762
|
}
|
|
1763
1763
|
|
|
1764
|
+
// 本机待推送文件按「同步内容」的分组归类;标签与 collectScopeGroups 的 titleZh/titleEn 对齐
|
|
1765
|
+
const PENDING_GROUP_LABEL = {
|
|
1766
|
+
profile: ['本机 profile', 'Local profile'],
|
|
1767
|
+
prompt: ['全局提示', 'Global prompts'],
|
|
1768
|
+
skills: ['Skills', 'Skills'],
|
|
1769
|
+
presets: ['Agent 预设', 'Agent presets'],
|
|
1770
|
+
'storages-record': ['技能市场台账', 'Skill market ledger'],
|
|
1771
|
+
settings: ['插件设置与工作流', 'Plugin settings & workflows'],
|
|
1772
|
+
mnemon: ['记忆数据', 'Memory data'],
|
|
1773
|
+
'local-plugins': ['本地源码插件包', 'Local plugin packages'],
|
|
1774
|
+
'plugin-data': ['插件数据', 'Plugin data'],
|
|
1775
|
+
extra: ['额外路径', 'Extra paths'],
|
|
1776
|
+
workspace: ['工作区资料', 'Workspace files'],
|
|
1777
|
+
conversations: ['会话记录', 'Conversations'],
|
|
1778
|
+
other: ['其它', 'Other'],
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
function pendingGroupOf(file, dshHome, profileDir, workspacePaths) {
|
|
1782
|
+
const norm = String(file).replace(/\\/g, '/')
|
|
1783
|
+
const base = String(dshHome).replace(/\\/g, '/').replace(/\/+$/, '')
|
|
1784
|
+
const prof = String(profileDir).replace(/\\/g, '/').replace(/\/+$/, '')
|
|
1785
|
+
if (prof && norm.startsWith(prof + '/')) return 'profile'
|
|
1786
|
+
if (/\/AGENTS\.md$|\/prompt-inject\.md$/i.test(norm)) return 'prompt'
|
|
1787
|
+
if (norm.startsWith(base + '/skills/')) return 'skills'
|
|
1788
|
+
if (norm.startsWith(base + '/.agent-presets/')) return 'presets'
|
|
1789
|
+
if (norm.startsWith(base + '/mnemon/')) return 'mnemon'
|
|
1790
|
+
if (norm.startsWith(base + '/sessions/')) return 'conversations'
|
|
1791
|
+
for (const w of workspacePaths || []) {
|
|
1792
|
+
const wn = String(w).replace(/\\/g, '/').replace(/\/+$/, '')
|
|
1793
|
+
if (wn && norm.startsWith(wn + '/')) return 'workspace'
|
|
1794
|
+
}
|
|
1795
|
+
return 'other'
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
// 会话文件的标题:投影缓存 record.rows.title.val 就是 DSH 面板显示的会话名
|
|
1799
|
+
function sessionTitleOf(dshHome, sessionId) {
|
|
1800
|
+
if (!sessionId) return ''
|
|
1801
|
+
try {
|
|
1802
|
+
const p = join(dshHome, 'storages', 'session_projcache', 'sessions', sessionId + '.json')
|
|
1803
|
+
const o = JSON.parse(readFileSync(p, 'utf8'))
|
|
1804
|
+
const t = o && o.record && o.record.rows && o.record.rows.title && o.record.rows.title.val
|
|
1805
|
+
return typeof t === 'string' && t.trim() ? t : ''
|
|
1806
|
+
} catch { return '' }
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1764
1809
|
/**
|
|
1765
1810
|
* 本机 DSH 数据里「上次同步之后又写过」的文件有多少个。
|
|
1766
1811
|
* 只看 mtime,不读内容、**不跑 capture**(跑 capture 要复制整个工作区,几 GB)。
|
|
@@ -1773,9 +1818,10 @@ function workspaceRoots(dshHome) {
|
|
|
1773
1818
|
*/
|
|
1774
1819
|
function localPending(dshHome, lastSyncAt, profileName, ctx = {}) {
|
|
1775
1820
|
const since = lastSyncAt ? Date.parse(lastSyncAt) : NaN
|
|
1776
|
-
if (!Number.isFinite(since)) return { known: false, pending: 0, newestAt: '', sample: [] }
|
|
1821
|
+
if (!Number.isFinite(since)) return { known: false, pending: 0, newestAt: '', sample: [], groups: [] }
|
|
1777
1822
|
const skip = new Set(['node_modules', '.git', 'models', '_tmp', 'staging', 'logs', 'attachments'])
|
|
1778
1823
|
const profile = join(dshHome, 'profiles', profileName || 'desktop')
|
|
1824
|
+
const workspacePaths = workspaceRoots(dshHome)
|
|
1779
1825
|
const stack = [
|
|
1780
1826
|
join(dshHome, 'sessions'),
|
|
1781
1827
|
join(dshHome, 'skills'),
|
|
@@ -1804,6 +1850,7 @@ function localPending(dshHome, lastSyncAt, profileName, ctx = {}) {
|
|
|
1804
1850
|
let pending = 0
|
|
1805
1851
|
let newest = 0
|
|
1806
1852
|
const sample = []
|
|
1853
|
+
const groupCount = new Map()
|
|
1807
1854
|
while (stack.length && scanned < 20000 && Date.now() < deadline) {
|
|
1808
1855
|
const cur = stack.pop()
|
|
1809
1856
|
let st
|
|
@@ -1826,14 +1873,27 @@ function localPending(dshHome, lastSyncAt, profileName, ctx = {}) {
|
|
|
1826
1873
|
}
|
|
1827
1874
|
pending++
|
|
1828
1875
|
if (st.mtimeMs > newest) newest = st.mtimeMs
|
|
1829
|
-
|
|
1876
|
+
const gid = pendingGroupOf(cur, dshHome, profile, workspacePaths)
|
|
1877
|
+
groupCount.set(gid, (groupCount.get(gid) || 0) + 1)
|
|
1878
|
+
// 会话文件显示会话标题而不是目录 ID;其余显示父目录/文件名
|
|
1879
|
+
let label = `${basename(dirname(cur))}/${basename(cur)}`
|
|
1880
|
+
if (gid === 'conversations') {
|
|
1881
|
+
const sid = basename(dirname(cur)) // sessions/<workspace>/<sessionId>/session.v4.jsonl.zstd
|
|
1882
|
+
const title = sessionTitleOf(dshHome, sid)
|
|
1883
|
+
if (title) label = title
|
|
1884
|
+
}
|
|
1885
|
+
if (sample.length < 3) sample.push(label)
|
|
1830
1886
|
}
|
|
1831
1887
|
}
|
|
1888
|
+
const groups = [...groupCount.entries()]
|
|
1889
|
+
.map(([id, count]) => ({ id, zh: PENDING_GROUP_LABEL[id]?.[0] || id, en: PENDING_GROUP_LABEL[id]?.[1] || id, count }))
|
|
1890
|
+
.sort((a, b) => b.count - a.count)
|
|
1832
1891
|
return {
|
|
1833
1892
|
known: true,
|
|
1834
1893
|
pending,
|
|
1835
1894
|
newestAt: newest ? new Date(newest).toISOString() : '',
|
|
1836
1895
|
sample,
|
|
1896
|
+
groups,
|
|
1837
1897
|
truncated: scanned >= 20000 || Date.now() >= deadline,
|
|
1838
1898
|
}
|
|
1839
1899
|
}
|
package/package.json
CHANGED
package/tools/selftest.mjs
CHANGED
|
@@ -1726,5 +1726,45 @@ console.log('== 配置同步页面 5 点调整 ==')
|
|
|
1726
1726
|
&& cliSrc.includes("scrollMarginTop: '8px'")
|
|
1727
1727
|
&& !cliSrc.includes('headerRef.current ? headerRef.current.offsetHeight'), '滚动遮挡')
|
|
1728
1728
|
}
|
|
1729
|
+
console.log('')
|
|
1730
|
+
console.log('== 0.3.86:本机数据挪进待办 + 会话显示会话名 + 按同步内容分组 ==')
|
|
1731
|
+
{
|
|
1732
|
+
const idxSrc = existsSync(join(pluginRootSelf, 'index.js')) ? readFileSync(join(pluginRootSelf, 'index.js'), 'utf8') : ''
|
|
1733
|
+
const cliSrc = existsSync(join(pluginRootSelf, 'client.js')) ? readFileSync(join(pluginRootSelf, 'client.js'), 'utf8') : ''
|
|
1734
|
+
// 1) 宿主:按同步内容分组归类 + 从投影缓存取会话标题
|
|
1735
|
+
check('本机数据按同步内容分组归类(pendingGroupOf + PENDING_GROUP_LABEL)',
|
|
1736
|
+
idxSrc.includes('const PENDING_GROUP_LABEL = {')
|
|
1737
|
+
&& idxSrc.includes('conversations: [\'会话记录\', \'Conversations\']')
|
|
1738
|
+
&& idxSrc.includes('function pendingGroupOf(')
|
|
1739
|
+
&& idxSrc.includes('const gid = pendingGroupOf(')
|
|
1740
|
+
&& idxSrc.includes('groupCount.set(gid, (groupCount.get(gid) || 0) + 1)'), 'index.js 分组统计')
|
|
1741
|
+
check('本机数据样本里会话显示会话标题(sessionTitleOf)',
|
|
1742
|
+
idxSrc.includes('function sessionTitleOf(')
|
|
1743
|
+
&& idxSrc.includes('record.rows.title.val')
|
|
1744
|
+
&& idxSrc.includes("if (gid === 'conversations')")
|
|
1745
|
+
&& idxSrc.includes('if (title) label = title')
|
|
1746
|
+
&& idxSrc.includes('if (sample.length < 3) sample.push(label)'), 'index.js 会话标题')
|
|
1747
|
+
check('localPending 返回 groups(zh/en/count)',
|
|
1748
|
+
idxSrc.includes('const groups = [...groupCount.entries()]')
|
|
1749
|
+
&& idxSrc.includes('zh: PENDING_GROUP_LABEL[id]?.[0]')
|
|
1750
|
+
&& idxSrc.includes('groups,')
|
|
1751
|
+
&& idxSrc.includes('sample: [], groups: []'), 'index.js localPending 返回值')
|
|
1752
|
+
// 2) 客户端:本机数据从「本机仓库」卡挪进「待办」
|
|
1753
|
+
const localDataHits = cliSrc.split("M('本机数据', 'Local data')").length - 1
|
|
1754
|
+
check('本机数据只出现在待办卡(从本机仓库卡移除)',
|
|
1755
|
+
localDataHits === 1
|
|
1756
|
+
&& cliSrc.includes('const localBlock = data && data.local && data.local.known')
|
|
1757
|
+
&& cliSrc.includes('localBlock,'), 'client.js 待办装配')
|
|
1758
|
+
check('待办里按同步内容分组显示,并列出会话名样本',
|
|
1759
|
+
cliSrc.includes('langIsZh() ? g.zh : g.en')
|
|
1760
|
+
&& cliSrc.includes('g.count')
|
|
1761
|
+
&& cliSrc.includes('最近写入:')
|
|
1762
|
+
&& cliSrc.includes('local.sample.join'), 'client.js 分组展示')
|
|
1763
|
+
check('分组标签与同步内容一致(会话记录/技能/插件数据/记忆数据)',
|
|
1764
|
+
idxSrc.includes("conversations: ['会话记录', 'Conversations']")
|
|
1765
|
+
&& idxSrc.includes("skills: ['Skills', 'Skills']")
|
|
1766
|
+
&& idxSrc.includes("'plugin-data': ['插件数据', 'Plugin data']")
|
|
1767
|
+
&& idxSrc.includes("mnemon: ['记忆数据', 'Memory data']"), '分组口径')
|
|
1768
|
+
}
|
|
1729
1769
|
process.exit(failures === 0 ? 0 : 1)
|
|
1730
1770
|
|