dsh-multi-chat 1.0.2 → 1.0.4
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.md +287 -268
- package/README.zh.md +269 -232
- package/bin/dsh-multi-chat.mjs +33 -0
- package/lib/client.js +66 -28
- package/lib/client.js.map +1 -1
- package/lib/index.js +211 -22
- package/lib/invariant.js +23 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/client/WallToggle.js +2 -2
- package/lib/types/client/WallToggle.js.map +1 -1
- package/lib/types/client/WallView.js +8 -8
- package/lib/types/client/WallView.js.map +1 -1
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/index.js.map +1 -1
- package/lib/types/client/store.d.ts +1 -1
- package/lib/types/client/store.d.ts.map +1 -1
- package/lib/types/client/store.js +1 -1
- package/lib/types/client/store.js.map +1 -1
- package/lib/types/index.d.ts +80 -80
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +117 -12
- package/lib/types/index.js.map +1 -1
- package/package.json +139 -108
- package/scripts/check-platform-contract.mjs +171 -0
- package/src/client/WallToggle.tsx +52 -52
- package/src/client/WallView.tsx +406 -406
- package/src/client/index.ts +108 -103
- package/src/client/store.ts +40 -40
- package/src/index.ts +715 -618
- package/scripts/sync-vitest-paths.mjs +0 -63
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Regenerate tsconfig.vitest.json from the vendored harness workspace's
|
|
4
|
-
* tsconfig.base.json paths map.
|
|
5
|
-
*
|
|
6
|
-
* The vitest config resolves every `@deepseek-ai/*` import to harness
|
|
7
|
-
* sources through vite-tsconfig-paths. The base map's targets are relative
|
|
8
|
-
* to harness-src/, while tsconfig.vitest.json lives at the repo root, so
|
|
9
|
-
* every target is rewritten with a `harness-src/` prefix (and the locale
|
|
10
|
-
* source fixture import the tests use is added — the base wildcards do not
|
|
11
|
-
* cover it).
|
|
12
|
-
*
|
|
13
|
-
* Run after updating harness-src/: `node scripts/sync-vitest-paths.mjs`
|
|
14
|
-
*/
|
|
15
|
-
import { readFileSync, writeFileSync } from 'node:fs'
|
|
16
|
-
import { fileURLToPath } from 'node:url'
|
|
17
|
-
import { dirname, resolve } from 'node:path'
|
|
18
|
-
|
|
19
|
-
const ROOT = dirname(dirname(fileURLToPath(import.meta.url)))
|
|
20
|
-
const basePath = resolve(ROOT, 'harness-src/tsconfig.base.json')
|
|
21
|
-
const outPath = resolve(ROOT, 'tsconfig.vitest.json')
|
|
22
|
-
|
|
23
|
-
// Strip JSONC comments (line // and block /* */), preserving string contents.
|
|
24
|
-
function stripJsonc(source) {
|
|
25
|
-
let out = ''
|
|
26
|
-
let inString = false
|
|
27
|
-
for (let i = 0; i < source.length; i++) {
|
|
28
|
-
const c = source[i]
|
|
29
|
-
const n = source[i + 1]
|
|
30
|
-
if (inString) {
|
|
31
|
-
out += c
|
|
32
|
-
if (c === '\\') { out += n ?? ''; i++ }
|
|
33
|
-
else if (c === '"') inString = false
|
|
34
|
-
continue
|
|
35
|
-
}
|
|
36
|
-
if (c === '"') { inString = true; out += c; continue }
|
|
37
|
-
if (c === '/' && n === '/') { while (i < source.length && source[i] !== '\n') i++; continue }
|
|
38
|
-
if (c === '/' && n === '*') {
|
|
39
|
-
i += 2
|
|
40
|
-
while (i < source.length && !(source[i] === '*' && source[i + 1] === '/')) i++
|
|
41
|
-
i++
|
|
42
|
-
continue
|
|
43
|
-
}
|
|
44
|
-
out += c
|
|
45
|
-
}
|
|
46
|
-
return out
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const base = JSON.parse(stripJsonc(readFileSync(basePath, 'utf8')))
|
|
50
|
-
const paths = {}
|
|
51
|
-
for (const [key, targets] of Object.entries(base.compilerOptions.paths)) {
|
|
52
|
-
paths[key] = targets.map(target => (target.startsWith('./') ? `harness-src/${target.slice(2)}` : target))
|
|
53
|
-
}
|
|
54
|
-
// Deep locale source import used by the test suite; not covered by the base
|
|
55
|
-
// wildcards (the generic `@deepseek-ai/dsh-*` map mis-substitutes subpaths).
|
|
56
|
-
paths['@deepseek-ai/dsh-client-locale/src/*'] = ['harness-src/packages/client/locale/src/*']
|
|
57
|
-
|
|
58
|
-
const result = {
|
|
59
|
-
extends: './harness-src/tsconfig.base.json',
|
|
60
|
-
compilerOptions: { paths },
|
|
61
|
-
}
|
|
62
|
-
writeFileSync(outPath, `${JSON.stringify(result, null, 2)}\n`, 'utf8')
|
|
63
|
-
console.log(`tsconfig.vitest.json: ${Object.keys(paths).length} path entries`)
|