@zhin.js/client 1.1.6 → 1.1.8
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/client/segments.test.ts +2 -0
- package/client/segments.ts +1 -1
- package/dist/segments.js +1 -1
- package/dist/segments.js.map +1 -1
- package/package.json +3 -3
package/client/segments.test.ts
CHANGED
|
@@ -6,10 +6,12 @@ describe('console segmentsForImDelivery', () => {
|
|
|
6
6
|
const full = [
|
|
7
7
|
{ type: 'thinking', data: { text: 'plan' } },
|
|
8
8
|
{ type: 'text', data: { text: 'hi' } },
|
|
9
|
+
{ type: 'share', data: { title: 'Example', url: 'https://example.com' } },
|
|
9
10
|
{ type: 'tool_call', data: { name: 'bash' } },
|
|
10
11
|
];
|
|
11
12
|
expect(segmentsForImDelivery(full)).toEqual([
|
|
12
13
|
{ type: 'text', data: { text: 'hi' } },
|
|
14
|
+
{ type: 'share', data: { title: 'Example', url: 'https://example.com' } },
|
|
13
15
|
]);
|
|
14
16
|
expect(segmentsForAgentPanel(full)).toEqual(full);
|
|
15
17
|
});
|
package/client/segments.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { MessageSegment } from './types.js';
|
|
|
4
4
|
const IM_VISIBLE_TYPES = new Set([
|
|
5
5
|
'text', 'mention', 'image', 'video', 'audio', 'voice', 'record', 'file',
|
|
6
6
|
'face', 'reply', 'forward', 'link', 'dice', 'rps', 'markdown', 'html',
|
|
7
|
-
'qrcode', 'tts', 'keyboard', 'action',
|
|
7
|
+
'qrcode', 'tts', 'keyboard', 'action', 'share',
|
|
8
8
|
]);
|
|
9
9
|
|
|
10
10
|
const AI_ONLY_TYPES = new Set(['thinking', 'tool_call']);
|
package/dist/segments.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const IM_VISIBLE_TYPES = new Set([
|
|
3
3
|
'text', 'mention', 'image', 'video', 'audio', 'voice', 'record', 'file',
|
|
4
4
|
'face', 'reply', 'forward', 'link', 'dice', 'rps', 'markdown', 'html',
|
|
5
|
-
'qrcode', 'tts', 'keyboard', 'action',
|
|
5
|
+
'qrcode', 'tts', 'keyboard', 'action', 'share',
|
|
6
6
|
]);
|
|
7
7
|
const AI_ONLY_TYPES = new Set(['thinking', 'tool_call']);
|
|
8
8
|
function isSegmentLike(value) {
|
package/dist/segments.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segments.js","sourceRoot":"","sources":["../client/segments.ts"],"names":[],"mappings":"AAEA,qDAAqD;AACrD,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM;IACvE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM;IACrE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ;
|
|
1
|
+
{"version":3,"file":"segments.js","sourceRoot":"","sources":["../client/segments.ts"],"names":[],"mappings":"AAEA,qDAAqD;AACrD,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM;IACvE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM;IACrE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO;CAC/C,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;AAEzD,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;WACtB,KAAK,KAAK,IAAI;WACd,OAAQ,KAAwB,CAAC,IAAI,KAAK,QAAQ;WAClD,MAAM,IAAI,KAAK,CACnB,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAA4B;IAChE,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;YAAE,SAAS;QACnC,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,SAAS;QAC3C,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,SAAS;QAC/C,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,qBAAqB,CAAC,QAAmC;IACvE,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;AACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"description": "Zhin Remote Console client SDK (entries loader, app registry, REST/SSE) — UI lives in zhin-console repo",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"clsx": "^2.1.1",
|
|
16
16
|
"tailwind-merge": "^3.6.0",
|
|
17
|
-
"@zhin.js/console-protocol": "1.1.
|
|
18
|
-
"@zhin.js/contract": "1.1.
|
|
17
|
+
"@zhin.js/console-protocol": "1.1.7",
|
|
18
|
+
"@zhin.js/contract": "1.1.3"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": ">=18"
|