zcw-shared 2.10.0 → 2.12.0
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/assets/materialFileIconMaps.json +3256 -0
- package/dist/constants/apiErrorCodes.d.ts +2 -2
- package/dist/constants/apiErrorCodes.js +11 -12
- package/dist/constants/apiErrorCodes.js.map +1 -1
- package/dist/functions/ai/aiLlmModelCapabilities.d.ts +13 -0
- package/dist/functions/ai/aiLlmModelCapabilities.js +80 -0
- package/dist/functions/ai/aiLlmModelCapabilities.js.map +1 -0
- package/dist/functions/browser/shortcutModKeyHint.d.ts +7 -0
- package/dist/functions/browser/shortcutModKeyHint.js +21 -0
- package/dist/functions/browser/shortcutModKeyHint.js.map +1 -0
- package/dist/functions/chat/chatShellTabConfig.d.ts +36 -0
- package/dist/functions/chat/chatShellTabConfig.js +222 -0
- package/dist/functions/chat/chatShellTabConfig.js.map +1 -0
- package/dist/functions/chat/chatShellTabEditor.d.ts +7 -0
- package/dist/functions/chat/chatShellTabEditor.js +43 -0
- package/dist/functions/chat/chatShellTabEditor.js.map +1 -0
- package/dist/functions/code/getLanguageFromExtension.d.ts +5 -0
- package/dist/functions/code/getLanguageFromExtension.js +90 -0
- package/dist/functions/code/getLanguageFromExtension.js.map +1 -0
- package/dist/functions/code/index.d.ts +1 -0
- package/dist/functions/code/index.js +2 -0
- package/dist/functions/code/index.js.map +1 -0
- package/dist/functions/dom/copyHtmlAndPlainToClipboard.d.ts +1 -0
- package/dist/functions/dom/copyHtmlAndPlainToClipboard.js +68 -0
- package/dist/functions/dom/copyHtmlAndPlainToClipboard.js.map +1 -0
- package/dist/functions/dom/copyTextToClipboard.d.ts +1 -0
- package/dist/functions/dom/copyTextToClipboard.js +36 -0
- package/dist/functions/dom/copyTextToClipboard.js.map +1 -0
- package/dist/functions/file/extractVideoCover.d.ts +6 -0
- package/dist/functions/file/extractVideoCover.js +57 -0
- package/dist/functions/file/extractVideoCover.js.map +1 -0
- package/dist/functions/file/index.d.ts +4 -0
- package/dist/functions/file/index.js +5 -0
- package/dist/functions/file/index.js.map +1 -0
- package/dist/functions/file/inferMediaType.d.ts +8 -0
- package/dist/functions/file/inferMediaType.js +24 -0
- package/dist/functions/file/inferMediaType.js.map +1 -0
- package/dist/functions/file/materialFileIcon.d.ts +10 -0
- package/dist/functions/file/materialFileIcon.js +36 -0
- package/dist/functions/file/materialFileIcon.js.map +1 -0
- package/dist/functions/im/forwardBundlePayload.d.ts +23 -0
- package/dist/functions/im/forwardBundlePayload.js +59 -0
- package/dist/functions/im/forwardBundlePayload.js.map +1 -0
- package/dist/functions/im/getActiveMentionQuery.d.ts +4 -0
- package/dist/functions/im/getActiveMentionQuery.js +23 -0
- package/dist/functions/im/getActiveMentionQuery.js.map +1 -0
- package/dist/functions/im/imInlineContentTokens.d.ts +49 -0
- package/dist/functions/im/imInlineContentTokens.js +185 -0
- package/dist/functions/im/imInlineContentTokens.js.map +1 -0
- package/dist/functions/im/imRichClipboardPlain.d.ts +8 -0
- package/dist/functions/im/imRichClipboardPlain.js +162 -0
- package/dist/functions/im/imRichClipboardPlain.js.map +1 -0
- package/dist/functions/im/imRichContentHtml.d.ts +53 -0
- package/dist/functions/im/imRichContentHtml.js +476 -0
- package/dist/functions/im/imRichContentHtml.js.map +1 -0
- package/dist/functions/im/index.d.ts +4 -0
- package/dist/functions/im/index.js +5 -0
- package/dist/functions/im/index.js.map +1 -0
- package/dist/functions/im/parseImMentionSegments.d.ts +8 -4
- package/dist/functions/im/parseImMentionSegments.js +39 -3
- package/dist/functions/im/parseImMentionSegments.js.map +1 -1
- package/dist/functions/path/index.d.ts +4 -0
- package/dist/functions/path/index.js +5 -0
- package/dist/functions/path/index.js.map +1 -0
- package/dist/functions/path/pathBasename.d.ts +1 -0
- package/dist/functions/path/pathBasename.js +11 -0
- package/dist/functions/path/pathBasename.js.map +1 -0
- package/dist/functions/path/pathDirname.d.ts +1 -0
- package/dist/functions/path/pathDirname.js +19 -0
- package/dist/functions/path/pathDirname.js.map +1 -0
- package/dist/functions/path/pathExtname.d.ts +4 -0
- package/dist/functions/path/pathExtname.js +15 -0
- package/dist/functions/path/pathExtname.js.map +1 -0
- package/dist/functions/path/pathLastSegment.d.ts +1 -0
- package/dist/functions/path/pathLastSegment.js +11 -0
- package/dist/functions/path/pathLastSegment.js.map +1 -0
- package/dist/functions/qiankun/createQiankunVueApp.js +94 -18
- package/dist/functions/qiankun/createQiankunVueApp.js.map +1 -1
- package/dist/functions/tencent-cloud/deploy.tcb.d.ts +0 -1
- package/dist/functions/tencent-cloud/deploy.tcb.js +0 -1
- package/dist/functions/tencent-cloud/deploy.tcb.js.map +1 -1
- package/dist/functions/tree/index.d.ts +1 -0
- package/dist/functions/tree/index.js +2 -0
- package/dist/functions/tree/index.js.map +1 -0
- package/dist/functions/tree/pathsToTreeNodes.d.ts +26 -0
- package/dist/functions/tree/pathsToTreeNodes.js +102 -0
- package/dist/functions/tree/pathsToTreeNodes.js.map +1 -0
- package/dist/schemas/video.schema.d.ts +45 -45
- package/dist/schemas/video.schema.js +3 -3
- package/dist/schemas/video.schema.js.map +1 -1
- package/package.json +24 -2
- package/types/ai-llm-model-capabilities.d.ts +25 -0
- package/types/assets.d.ts +12 -0
- package/types/chat-shell-tab-config.d.ts +64 -0
- package/types/im-api.d.ts +11 -1
- package/types/im-chat.d.ts +47 -2
- package/types/im-forward.d.ts +37 -0
- package/types/im-reply.d.ts +6 -0
- package/types/video.d.ts +8 -4
|
@@ -22,9 +22,9 @@ export declare const VideoSchema: z.ZodObject<{
|
|
|
22
22
|
id: z.ZodString;
|
|
23
23
|
title: z.ZodString;
|
|
24
24
|
description: z.ZodOptional<z.ZodString>;
|
|
25
|
-
cover_url: z.
|
|
26
|
-
video_url: z.
|
|
27
|
-
|
|
25
|
+
cover_url: z.ZodString;
|
|
26
|
+
video_url: z.ZodString;
|
|
27
|
+
author_id: z.ZodOptional<z.ZodString>;
|
|
28
28
|
category_id: z.ZodOptional<z.ZodString>;
|
|
29
29
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
30
30
|
views: z.ZodOptional<z.ZodNumber>;
|
|
@@ -38,13 +38,13 @@ export declare const VideoSchema: z.ZodObject<{
|
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
39
|
title: string;
|
|
40
40
|
id: string;
|
|
41
|
+
cover_url: string;
|
|
42
|
+
video_url: string;
|
|
41
43
|
description?: string | undefined;
|
|
42
44
|
duration?: number | undefined;
|
|
43
45
|
status?: string | undefined;
|
|
44
46
|
created_at?: string | undefined;
|
|
45
|
-
|
|
46
|
-
video_url?: string | undefined;
|
|
47
|
-
author?: string | undefined;
|
|
47
|
+
author_id?: string | undefined;
|
|
48
48
|
category_id?: string | undefined;
|
|
49
49
|
views?: number | undefined;
|
|
50
50
|
like_count?: number | undefined;
|
|
@@ -55,13 +55,13 @@ export declare const VideoSchema: z.ZodObject<{
|
|
|
55
55
|
}, {
|
|
56
56
|
title: string;
|
|
57
57
|
id: string;
|
|
58
|
+
cover_url: string;
|
|
59
|
+
video_url: string;
|
|
58
60
|
description?: string | undefined;
|
|
59
61
|
duration?: number | undefined;
|
|
60
62
|
status?: string | undefined;
|
|
61
63
|
created_at?: string | undefined;
|
|
62
|
-
|
|
63
|
-
video_url?: string | undefined;
|
|
64
|
-
author?: string | undefined;
|
|
64
|
+
author_id?: string | undefined;
|
|
65
65
|
category_id?: string | undefined;
|
|
66
66
|
views?: number | undefined;
|
|
67
67
|
like_count?: number | undefined;
|
|
@@ -75,9 +75,9 @@ export declare const VideoListResponseSchema: z.ZodObject<{
|
|
|
75
75
|
id: z.ZodString;
|
|
76
76
|
title: z.ZodString;
|
|
77
77
|
description: z.ZodOptional<z.ZodString>;
|
|
78
|
-
cover_url: z.
|
|
79
|
-
video_url: z.
|
|
80
|
-
|
|
78
|
+
cover_url: z.ZodString;
|
|
79
|
+
video_url: z.ZodString;
|
|
80
|
+
author_id: z.ZodOptional<z.ZodString>;
|
|
81
81
|
category_id: z.ZodOptional<z.ZodString>;
|
|
82
82
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
83
83
|
views: z.ZodOptional<z.ZodNumber>;
|
|
@@ -91,13 +91,13 @@ export declare const VideoListResponseSchema: z.ZodObject<{
|
|
|
91
91
|
}, "strip", z.ZodTypeAny, {
|
|
92
92
|
title: string;
|
|
93
93
|
id: string;
|
|
94
|
+
cover_url: string;
|
|
95
|
+
video_url: string;
|
|
94
96
|
description?: string | undefined;
|
|
95
97
|
duration?: number | undefined;
|
|
96
98
|
status?: string | undefined;
|
|
97
99
|
created_at?: string | undefined;
|
|
98
|
-
|
|
99
|
-
video_url?: string | undefined;
|
|
100
|
-
author?: string | undefined;
|
|
100
|
+
author_id?: string | undefined;
|
|
101
101
|
category_id?: string | undefined;
|
|
102
102
|
views?: number | undefined;
|
|
103
103
|
like_count?: number | undefined;
|
|
@@ -108,13 +108,13 @@ export declare const VideoListResponseSchema: z.ZodObject<{
|
|
|
108
108
|
}, {
|
|
109
109
|
title: string;
|
|
110
110
|
id: string;
|
|
111
|
+
cover_url: string;
|
|
112
|
+
video_url: string;
|
|
111
113
|
description?: string | undefined;
|
|
112
114
|
duration?: number | undefined;
|
|
113
115
|
status?: string | undefined;
|
|
114
116
|
created_at?: string | undefined;
|
|
115
|
-
|
|
116
|
-
video_url?: string | undefined;
|
|
117
|
-
author?: string | undefined;
|
|
117
|
+
author_id?: string | undefined;
|
|
118
118
|
category_id?: string | undefined;
|
|
119
119
|
views?: number | undefined;
|
|
120
120
|
like_count?: number | undefined;
|
|
@@ -130,13 +130,13 @@ export declare const VideoListResponseSchema: z.ZodObject<{
|
|
|
130
130
|
data: {
|
|
131
131
|
title: string;
|
|
132
132
|
id: string;
|
|
133
|
+
cover_url: string;
|
|
134
|
+
video_url: string;
|
|
133
135
|
description?: string | undefined;
|
|
134
136
|
duration?: number | undefined;
|
|
135
137
|
status?: string | undefined;
|
|
136
138
|
created_at?: string | undefined;
|
|
137
|
-
|
|
138
|
-
video_url?: string | undefined;
|
|
139
|
-
author?: string | undefined;
|
|
139
|
+
author_id?: string | undefined;
|
|
140
140
|
category_id?: string | undefined;
|
|
141
141
|
views?: number | undefined;
|
|
142
142
|
like_count?: number | undefined;
|
|
@@ -152,13 +152,13 @@ export declare const VideoListResponseSchema: z.ZodObject<{
|
|
|
152
152
|
data: {
|
|
153
153
|
title: string;
|
|
154
154
|
id: string;
|
|
155
|
+
cover_url: string;
|
|
156
|
+
video_url: string;
|
|
155
157
|
description?: string | undefined;
|
|
156
158
|
duration?: number | undefined;
|
|
157
159
|
status?: string | undefined;
|
|
158
160
|
created_at?: string | undefined;
|
|
159
|
-
|
|
160
|
-
video_url?: string | undefined;
|
|
161
|
-
author?: string | undefined;
|
|
161
|
+
author_id?: string | undefined;
|
|
162
162
|
category_id?: string | undefined;
|
|
163
163
|
views?: number | undefined;
|
|
164
164
|
like_count?: number | undefined;
|
|
@@ -176,9 +176,9 @@ export declare const VideoDetailResponseSchema: z.ZodObject<{
|
|
|
176
176
|
id: z.ZodString;
|
|
177
177
|
title: z.ZodString;
|
|
178
178
|
description: z.ZodOptional<z.ZodString>;
|
|
179
|
-
cover_url: z.
|
|
180
|
-
video_url: z.
|
|
181
|
-
|
|
179
|
+
cover_url: z.ZodString;
|
|
180
|
+
video_url: z.ZodString;
|
|
181
|
+
author_id: z.ZodOptional<z.ZodString>;
|
|
182
182
|
category_id: z.ZodOptional<z.ZodString>;
|
|
183
183
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
184
184
|
views: z.ZodOptional<z.ZodNumber>;
|
|
@@ -192,13 +192,13 @@ export declare const VideoDetailResponseSchema: z.ZodObject<{
|
|
|
192
192
|
}, "strip", z.ZodTypeAny, {
|
|
193
193
|
title: string;
|
|
194
194
|
id: string;
|
|
195
|
+
cover_url: string;
|
|
196
|
+
video_url: string;
|
|
195
197
|
description?: string | undefined;
|
|
196
198
|
duration?: number | undefined;
|
|
197
199
|
status?: string | undefined;
|
|
198
200
|
created_at?: string | undefined;
|
|
199
|
-
|
|
200
|
-
video_url?: string | undefined;
|
|
201
|
-
author?: string | undefined;
|
|
201
|
+
author_id?: string | undefined;
|
|
202
202
|
category_id?: string | undefined;
|
|
203
203
|
views?: number | undefined;
|
|
204
204
|
like_count?: number | undefined;
|
|
@@ -209,13 +209,13 @@ export declare const VideoDetailResponseSchema: z.ZodObject<{
|
|
|
209
209
|
}, {
|
|
210
210
|
title: string;
|
|
211
211
|
id: string;
|
|
212
|
+
cover_url: string;
|
|
213
|
+
video_url: string;
|
|
212
214
|
description?: string | undefined;
|
|
213
215
|
duration?: number | undefined;
|
|
214
216
|
status?: string | undefined;
|
|
215
217
|
created_at?: string | undefined;
|
|
216
|
-
|
|
217
|
-
video_url?: string | undefined;
|
|
218
|
-
author?: string | undefined;
|
|
218
|
+
author_id?: string | undefined;
|
|
219
219
|
category_id?: string | undefined;
|
|
220
220
|
views?: number | undefined;
|
|
221
221
|
like_count?: number | undefined;
|
|
@@ -228,13 +228,13 @@ export declare const VideoDetailResponseSchema: z.ZodObject<{
|
|
|
228
228
|
data: {
|
|
229
229
|
title: string;
|
|
230
230
|
id: string;
|
|
231
|
+
cover_url: string;
|
|
232
|
+
video_url: string;
|
|
231
233
|
description?: string | undefined;
|
|
232
234
|
duration?: number | undefined;
|
|
233
235
|
status?: string | undefined;
|
|
234
236
|
created_at?: string | undefined;
|
|
235
|
-
|
|
236
|
-
video_url?: string | undefined;
|
|
237
|
-
author?: string | undefined;
|
|
237
|
+
author_id?: string | undefined;
|
|
238
238
|
category_id?: string | undefined;
|
|
239
239
|
views?: number | undefined;
|
|
240
240
|
like_count?: number | undefined;
|
|
@@ -247,13 +247,13 @@ export declare const VideoDetailResponseSchema: z.ZodObject<{
|
|
|
247
247
|
data: {
|
|
248
248
|
title: string;
|
|
249
249
|
id: string;
|
|
250
|
+
cover_url: string;
|
|
251
|
+
video_url: string;
|
|
250
252
|
description?: string | undefined;
|
|
251
253
|
duration?: number | undefined;
|
|
252
254
|
status?: string | undefined;
|
|
253
255
|
created_at?: string | undefined;
|
|
254
|
-
|
|
255
|
-
video_url?: string | undefined;
|
|
256
|
-
author?: string | undefined;
|
|
256
|
+
author_id?: string | undefined;
|
|
257
257
|
category_id?: string | undefined;
|
|
258
258
|
views?: number | undefined;
|
|
259
259
|
like_count?: number | undefined;
|
|
@@ -310,8 +310,8 @@ export declare const VideoCommentSchema: z.ZodObject<{
|
|
|
310
310
|
created_at: z.ZodOptional<z.ZodString>;
|
|
311
311
|
updated_at: z.ZodOptional<z.ZodString>;
|
|
312
312
|
}, "strip", z.ZodTypeAny, {
|
|
313
|
-
id: number;
|
|
314
313
|
content: string;
|
|
314
|
+
id: number;
|
|
315
315
|
video_id: string;
|
|
316
316
|
user_id: string;
|
|
317
317
|
created_at?: string | undefined;
|
|
@@ -319,8 +319,8 @@ export declare const VideoCommentSchema: z.ZodObject<{
|
|
|
319
319
|
updated_at?: string | undefined;
|
|
320
320
|
parent_id?: number | null | undefined;
|
|
321
321
|
}, {
|
|
322
|
-
id: number;
|
|
323
322
|
content: string;
|
|
323
|
+
id: number;
|
|
324
324
|
video_id: string;
|
|
325
325
|
user_id: string;
|
|
326
326
|
created_at?: string | undefined;
|
|
@@ -339,8 +339,8 @@ export declare const VideoCommentsResponseSchema: z.ZodObject<{
|
|
|
339
339
|
created_at: z.ZodOptional<z.ZodString>;
|
|
340
340
|
updated_at: z.ZodOptional<z.ZodString>;
|
|
341
341
|
}, "strip", z.ZodTypeAny, {
|
|
342
|
-
id: number;
|
|
343
342
|
content: string;
|
|
343
|
+
id: number;
|
|
344
344
|
video_id: string;
|
|
345
345
|
user_id: string;
|
|
346
346
|
created_at?: string | undefined;
|
|
@@ -348,8 +348,8 @@ export declare const VideoCommentsResponseSchema: z.ZodObject<{
|
|
|
348
348
|
updated_at?: string | undefined;
|
|
349
349
|
parent_id?: number | null | undefined;
|
|
350
350
|
}, {
|
|
351
|
-
id: number;
|
|
352
351
|
content: string;
|
|
352
|
+
id: number;
|
|
353
353
|
video_id: string;
|
|
354
354
|
user_id: string;
|
|
355
355
|
created_at?: string | undefined;
|
|
@@ -362,8 +362,8 @@ export declare const VideoCommentsResponseSchema: z.ZodObject<{
|
|
|
362
362
|
offset: z.ZodNumber;
|
|
363
363
|
}, "strip", z.ZodTypeAny, {
|
|
364
364
|
data: {
|
|
365
|
-
id: number;
|
|
366
365
|
content: string;
|
|
366
|
+
id: number;
|
|
367
367
|
video_id: string;
|
|
368
368
|
user_id: string;
|
|
369
369
|
created_at?: string | undefined;
|
|
@@ -376,8 +376,8 @@ export declare const VideoCommentsResponseSchema: z.ZodObject<{
|
|
|
376
376
|
offset: number;
|
|
377
377
|
}, {
|
|
378
378
|
data: {
|
|
379
|
-
id: number;
|
|
380
379
|
content: string;
|
|
380
|
+
id: number;
|
|
381
381
|
video_id: string;
|
|
382
382
|
user_id: string;
|
|
383
383
|
created_at?: string | undefined;
|
|
@@ -10,9 +10,9 @@ export const VideoSchema = z.object({
|
|
|
10
10
|
id: z.string(),
|
|
11
11
|
title: z.string(),
|
|
12
12
|
description: z.string().optional(),
|
|
13
|
-
cover_url: z.string()
|
|
14
|
-
video_url: z.string()
|
|
15
|
-
|
|
13
|
+
cover_url: z.string(),
|
|
14
|
+
video_url: z.string(),
|
|
15
|
+
author_id: z.string().optional(),
|
|
16
16
|
category_id: z.string().optional(),
|
|
17
17
|
duration: z.number().optional(),
|
|
18
18
|
views: z.number().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.schema.js","sourceRoot":"","sources":["../../src/schemas/video.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAgBvB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAoC,CAAA;AAErC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"video.schema.js","sourceRoot":"","sources":["../../src/schemas/video.schema.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zcw-shared",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"references",
|
|
6
6
|
"dist",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"./constants/namedColors": "./dist/constants/namedColors.js",
|
|
44
44
|
"./constants/softwareConfigs": "./dist/constants/softwareConfigs.js",
|
|
45
45
|
"./functions/ag-grid/generateLicense": "./dist/functions/ag-grid/generateLicense.js",
|
|
46
|
+
"./functions/ai/aiLlmModelCapabilities": "./dist/functions/ai/aiLlmModelCapabilities.js",
|
|
46
47
|
"./functions/algorithm/binarySearch": "./dist/functions/algorithm/binarySearch.js",
|
|
47
48
|
"./functions/algorithm/canJump": "./dist/functions/algorithm/canJump.js",
|
|
48
49
|
"./functions/algorithm/climbStairs": "./dist/functions/algorithm/climbStairs.js",
|
|
@@ -113,6 +114,10 @@
|
|
|
113
114
|
"./functions/browser/isElectron": "./dist/functions/browser/isElectron.js",
|
|
114
115
|
"./functions/browser/isMobile": "./dist/functions/browser/isMobile.js",
|
|
115
116
|
"./functions/browser/isWeChat": "./dist/functions/browser/isWeChat.js",
|
|
117
|
+
"./functions/browser/shortcutModKeyHint": "./dist/functions/browser/shortcutModKeyHint.js",
|
|
118
|
+
"./functions/chat/chatShellTabConfig": "./dist/functions/chat/chatShellTabConfig.js",
|
|
119
|
+
"./functions/chat/chatShellTabEditor": "./dist/functions/chat/chatShellTabEditor.js",
|
|
120
|
+
"./functions/code/getLanguageFromExtension": "./dist/functions/code/getLanguageFromExtension.js",
|
|
116
121
|
"./functions/color/colorValidation": "./dist/functions/color/colorValidation.js",
|
|
117
122
|
"./functions/color/convertColor": "./dist/functions/color/convertColor.js",
|
|
118
123
|
"./functions/color/deduplicateColors": "./dist/functions/color/deduplicateColors.js",
|
|
@@ -141,6 +146,8 @@
|
|
|
141
146
|
"./functions/design-tokens/mixColors": "./dist/functions/design-tokens/mixColors.js",
|
|
142
147
|
"./functions/design-tokens/parseDesignTokens": "./dist/functions/design-tokens/parseDesignTokens.js",
|
|
143
148
|
"./functions/dom/computePosition": "./dist/functions/dom/computePosition.js",
|
|
149
|
+
"./functions/dom/copyHtmlAndPlainToClipboard": "./dist/functions/dom/copyHtmlAndPlainToClipboard.js",
|
|
150
|
+
"./functions/dom/copyTextToClipboard": "./dist/functions/dom/copyTextToClipboard.js",
|
|
144
151
|
"./functions/dom/createSharedKeyboardCenter": "./dist/functions/dom/createSharedKeyboardCenter.js",
|
|
145
152
|
"./functions/dom/createThrottledEventListener": "./dist/functions/dom/createThrottledEventListener.js",
|
|
146
153
|
"./functions/dom/demonstrateResourceLoading": "./dist/functions/dom/demonstrateResourceLoading.js",
|
|
@@ -165,6 +172,8 @@
|
|
|
165
172
|
"./functions/file/formatFileSize": "./dist/functions/file/formatFileSize.js",
|
|
166
173
|
"./functions/file/getFileExtension": "./dist/functions/file/getFileExtension.js",
|
|
167
174
|
"./functions/file/getIconfontNameByExtension": "./dist/functions/file/getIconfontNameByExtension.js",
|
|
175
|
+
"./functions/file/inferMediaType": "./dist/functions/file/inferMediaType.js",
|
|
176
|
+
"./functions/file/materialFileIcon": "./dist/functions/file/materialFileIcon.js",
|
|
168
177
|
"./functions/functional/compose": "./dist/functions/functional/compose.js",
|
|
169
178
|
"./functions/functional/cond": "./dist/functions/functional/cond.js",
|
|
170
179
|
"./functions/functional/curry": "./dist/functions/functional/curry.js",
|
|
@@ -179,7 +188,10 @@
|
|
|
179
188
|
"./functions/hybrid/postBridgeMessage": "./dist/functions/hybrid/postBridgeMessage.js",
|
|
180
189
|
"./functions/hybrid/validateBridgeMessage": "./dist/functions/hybrid/validateBridgeMessage.js",
|
|
181
190
|
"./functions/im/formatImChatConversationListTime": "./dist/functions/im/formatImChatConversationListTime.js",
|
|
182
|
-
"./functions/im/
|
|
191
|
+
"./functions/im/forwardBundlePayload": "./dist/functions/im/forwardBundlePayload.js",
|
|
192
|
+
"./functions/im/getActiveMentionQuery": "./dist/functions/im/getActiveMentionQuery.js",
|
|
193
|
+
"./functions/im/imRichClipboardPlain": "./dist/functions/im/imRichClipboardPlain.js",
|
|
194
|
+
"./functions/im/imRichContentHtml": "./dist/functions/im/imRichContentHtml.js",
|
|
183
195
|
"./functions/image/compressImageToWidth": "./dist/functions/image/compressImageToWidth.js",
|
|
184
196
|
"./functions/image/compressToTargetSize": "./dist/functions/image/compressToTargetSize.js",
|
|
185
197
|
"./functions/image/generateFavIcon": "./dist/functions/image/generateFavIcon.js",
|
|
@@ -217,6 +229,10 @@
|
|
|
217
229
|
"./functions/number/formatNumber": "./dist/functions/number/formatNumber.js",
|
|
218
230
|
"./functions/number/random": "./dist/functions/number/random.js",
|
|
219
231
|
"./functions/number/range": "./dist/functions/number/range.js",
|
|
232
|
+
"./functions/path/pathBasename": "./dist/functions/path/pathBasename.js",
|
|
233
|
+
"./functions/path/pathDirname": "./dist/functions/path/pathDirname.js",
|
|
234
|
+
"./functions/path/pathExtname": "./dist/functions/path/pathExtname.js",
|
|
235
|
+
"./functions/path/pathLastSegment": "./dist/functions/path/pathLastSegment.js",
|
|
220
236
|
"./functions/patterns/EventEmitter": "./dist/functions/patterns/EventEmitter.js",
|
|
221
237
|
"./functions/patterns/adapter": "./dist/functions/patterns/adapter.js",
|
|
222
238
|
"./functions/patterns/builder": "./dist/functions/patterns/builder.js",
|
|
@@ -268,6 +284,7 @@
|
|
|
268
284
|
"./functions/tree/filterTree": "./dist/functions/tree/filterTree.js",
|
|
269
285
|
"./functions/tree/findNode": "./dist/functions/tree/findNode.js",
|
|
270
286
|
"./functions/tree/flattenTree": "./dist/functions/tree/flattenTree.js",
|
|
287
|
+
"./functions/tree/pathsToTreeNodes": "./dist/functions/tree/pathsToTreeNodes.js",
|
|
271
288
|
"./functions/uniapp/api/audio": "./dist/functions/uniapp/api/audio.js",
|
|
272
289
|
"./functions/uniapp/api/auth": "./dist/functions/uniapp/api/auth.js",
|
|
273
290
|
"./functions/uniapp/api/dom": "./dist/functions/uniapp/api/dom.js",
|
|
@@ -403,11 +420,14 @@
|
|
|
403
420
|
"./vue-hooks/worker/useWorkerFunction": "./dist/vue-hooks/worker/useWorkerFunction.js",
|
|
404
421
|
"./vue-hooks/worker/useWorkerPool": "./dist/vue-hooks/worker/useWorkerPool.js",
|
|
405
422
|
"./types/address": "./types/address.d.ts",
|
|
423
|
+
"./types/ai-llm-model-capabilities": "./types/ai-llm-model-capabilities.d.ts",
|
|
406
424
|
"./types/algorithm-visual": "./types/algorithm-visual.d.ts",
|
|
407
425
|
"./types/algorithm": "./types/algorithm.d.ts",
|
|
408
426
|
"./types/altool": "./types/altool.d.ts",
|
|
409
427
|
"./types/android-build": "./types/android-build.d.ts",
|
|
428
|
+
"./types/assets": "./types/assets.d.ts",
|
|
410
429
|
"./types/auth": "./types/auth.d.ts",
|
|
430
|
+
"./types/chat-shell-tab-config": "./types/chat-shell-tab-config.d.ts",
|
|
411
431
|
"./types/checkin-config": "./types/checkin-config.d.ts",
|
|
412
432
|
"./types/cloud-disk-config": "./types/cloud-disk-config.d.ts",
|
|
413
433
|
"./types/color": "./types/color.d.ts",
|
|
@@ -416,7 +436,9 @@
|
|
|
416
436
|
"./types/hybrid": "./types/hybrid.d.ts",
|
|
417
437
|
"./types/im-api": "./types/im-api.d.ts",
|
|
418
438
|
"./types/im-chat": "./types/im-chat.d.ts",
|
|
439
|
+
"./types/im-forward": "./types/im-forward.d.ts",
|
|
419
440
|
"./types/im-message-display": "./types/im-message-display.d.ts",
|
|
441
|
+
"./types/im-reply": "./types/im-reply.d.ts",
|
|
420
442
|
"./types/ios-build": "./types/ios-build.d.ts",
|
|
421
443
|
"./types/music": "./types/music.d.ts",
|
|
422
444
|
"./types/notification": "./types/notification.d.ts",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type AiLlmModelParameterSpec = {
|
|
2
|
+
enabled: boolean
|
|
3
|
+
min?: number
|
|
4
|
+
max?: number
|
|
5
|
+
default?: number
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type AiLlmModelCapabilities = {
|
|
9
|
+
attachments: boolean
|
|
10
|
+
imageInput: boolean
|
|
11
|
+
streaming: boolean
|
|
12
|
+
parameters: {
|
|
13
|
+
temperature?: AiLlmModelParameterSpec
|
|
14
|
+
maxTokens?: AiLlmModelParameterSpec
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Admin 模型表单 capabilities 勾选态 */
|
|
19
|
+
export type AiLlmModelCapabilitiesFormFlags = {
|
|
20
|
+
attachments: boolean
|
|
21
|
+
imageInput: boolean
|
|
22
|
+
temperature: boolean
|
|
23
|
+
/** true = 上游 SSE 流式;false = HTTP 同步 */
|
|
24
|
+
streaming: boolean
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// 资源文件类型声明
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Material File Icon 映射数据
|
|
5
|
+
*
|
|
6
|
+
* 包含 vscode-material-icon-theme 的图标映射规则
|
|
7
|
+
*/
|
|
8
|
+
declare module 'zcw-shared/assets/materialFileIconMaps.json' {
|
|
9
|
+
import type { MaterialFileIconMaps } from '../src/functions/file/materialFileIcon'
|
|
10
|
+
const value: MaterialFileIconMaps
|
|
11
|
+
export default value
|
|
12
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** Chat 壳层 Tab(page-config displays.chatShell.tabs) */
|
|
2
|
+
export interface ChatShellTabConfig {
|
|
3
|
+
/** 唯一标识,用于 Tabbar v-model */
|
|
4
|
+
key: string
|
|
5
|
+
label: string
|
|
6
|
+
/** iconfont 名(不含 icon- 前缀) */
|
|
7
|
+
icon?: string
|
|
8
|
+
iconActive?: string
|
|
9
|
+
/** 路由 path,如 /messages */
|
|
10
|
+
route?: string
|
|
11
|
+
/** Vue Router name,优先用于跳转与高亮匹配 */
|
|
12
|
+
routeName?: string
|
|
13
|
+
/** 路由 name 前缀匹配(如 chat-doc 匹配 chat-docs-home、chat-doc-editor) */
|
|
14
|
+
routeNamePrefix?: string
|
|
15
|
+
/** 额外视为当前 Tab 高亮的路由 name(如钱包页 chat-wallet 归属「我的」) */
|
|
16
|
+
relatedRouteNames?: string[]
|
|
17
|
+
/** 移动端底栏隐藏文案(仅图标);默认 false 显示文案 */
|
|
18
|
+
hideLabel?: boolean
|
|
19
|
+
/**
|
|
20
|
+
* 宽屏侧栏隐藏文案(仅图标,悬停 tooltip)。
|
|
21
|
+
* 默认未设置等同 true;设为 false 时在侧栏显示 label。
|
|
22
|
+
*/
|
|
23
|
+
desktopHideLabel?: boolean
|
|
24
|
+
/** 仅 Electron 壳展示 */
|
|
25
|
+
electronOnly?: boolean
|
|
26
|
+
/** 宽屏左侧 Tabbar(默认 true,mine 为 false) */
|
|
27
|
+
desktopNav?: boolean
|
|
28
|
+
/** 宽屏底部头像入口(mine) */
|
|
29
|
+
desktopFooter?: boolean
|
|
30
|
+
/** 移动端底部 Tabbar(默认 true) */
|
|
31
|
+
mobile?: boolean
|
|
32
|
+
/** 使用「我的」头像而非 icon */
|
|
33
|
+
useMineAvatar?: boolean
|
|
34
|
+
/**
|
|
35
|
+
* 该 Tab 激活时切换整应用为深色主题(`html[data-theme="dark"]`),Dialog 等与主界面一致。
|
|
36
|
+
* 默认仅 AI Tab 开启;其它 Tab 可在 page-config「更多」里勾选。
|
|
37
|
+
*/
|
|
38
|
+
shellDark?: boolean
|
|
39
|
+
/**
|
|
40
|
+
* 该 Tab 激活时隐藏壳层 Tabbar(移动端底栏 + 宽屏左侧导航,含底部头像入口)。
|
|
41
|
+
* 切换到其它 Tab 后 Tabbar 恢复;适合全屏沉浸页。
|
|
42
|
+
*/
|
|
43
|
+
hideTabbar?: boolean
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ChatShellDisplaysConfig {
|
|
47
|
+
tabs?: ChatShellTabConfig[]
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** page-config `displays` 中与 Chat 壳层相关的字段 */
|
|
51
|
+
export interface ChatAppDisplaysConfig {
|
|
52
|
+
chatShell?: ChatShellDisplaysConfig
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ChatShellTabbarItem {
|
|
56
|
+
key: string
|
|
57
|
+
label: string
|
|
58
|
+
icon: string
|
|
59
|
+
iconName?: string
|
|
60
|
+
iconActiveName?: string
|
|
61
|
+
hideLabel?: boolean
|
|
62
|
+
ariaLabel?: string
|
|
63
|
+
useMineAvatar?: boolean
|
|
64
|
+
}
|
package/types/im-api.d.ts
CHANGED
|
@@ -31,7 +31,15 @@ export interface ImApiMessage {
|
|
|
31
31
|
sender_id: string
|
|
32
32
|
conversation_id: string
|
|
33
33
|
content: string
|
|
34
|
-
type:
|
|
34
|
+
type:
|
|
35
|
+
| 'text'
|
|
36
|
+
| 'markdown'
|
|
37
|
+
| 'image'
|
|
38
|
+
| 'file'
|
|
39
|
+
| 'system'
|
|
40
|
+
| 'audio'
|
|
41
|
+
| 'video'
|
|
42
|
+
| 'forward_bundle'
|
|
35
43
|
status: 'sent' | 'delivered' | 'read'
|
|
36
44
|
/** 发送方在该会话中的第几条(由服务端写入;旧数据可由接口补算) */
|
|
37
45
|
sender_seq?: number
|
|
@@ -47,6 +55,8 @@ export interface ImApiMessage {
|
|
|
47
55
|
outbound_status?: ImOutboundStatus
|
|
48
56
|
/**
|
|
49
57
|
* 可含 attachments、im_display(多段展示,见 types/im-message-display)等。
|
|
58
|
+
* 用户消息引用:`extra_data.reply_to`(见 `types/im-reply.d.ts` 的 `ImReplyToRef`)。
|
|
59
|
+
* 合并转发:主载荷在 `content`(JSON,见 `types/im-forward.d.ts`);旧数据可能仍在 `extra_data.forward_bundle`。
|
|
50
60
|
* 智能体中断回复:`extra_data.ai_reply` 见 {@link ImApiAiReplyExtra}。
|
|
51
61
|
*/
|
|
52
62
|
extra_data?: Record<string, any>
|
package/types/im-chat.d.ts
CHANGED
|
@@ -5,17 +5,45 @@
|
|
|
5
5
|
* 在仓库层做 `ImApiMessage` → `ChatMessage` 的映射即可两端共类型、各层语义清晰。
|
|
6
6
|
*/
|
|
7
7
|
import type { ImMessageDisplaySpec } from './im-message-display'
|
|
8
|
+
import type { ImForwardBundleStoredItem } from './im-forward'
|
|
9
|
+
import type { ImReplyToRef } from './im-reply'
|
|
10
|
+
|
|
11
|
+
/** 引用预览(仅 UI 解析 id 后填充,不落库) */
|
|
12
|
+
export interface ChatMessageQuotePreview {
|
|
13
|
+
senderName: string
|
|
14
|
+
snippet: string
|
|
15
|
+
/** 原消息不在当前线程缓存中(已删或未加载) */
|
|
16
|
+
missing?: boolean
|
|
17
|
+
}
|
|
8
18
|
|
|
9
19
|
/** 与 `ImMessage.extra_data.attachments[]` 对齐的列表项(会话消息内联附件) */
|
|
10
20
|
export interface ChatInlineAttachmentListItem {
|
|
11
21
|
url: string
|
|
12
22
|
name?: string
|
|
13
23
|
mimeType?: string
|
|
24
|
+
/** 字节数,来自 extra_data.attachments[].size */
|
|
25
|
+
size?: number
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** 合并转发气泡内单条预览(由 `forward_bundle` 解析) */
|
|
29
|
+
export interface ChatForwardBundleItem {
|
|
30
|
+
senderName: string
|
|
31
|
+
snippet: string
|
|
32
|
+
/** 原会话消息 id(合并转发快照内) */
|
|
33
|
+
messageId?: string
|
|
34
|
+
/** 原会话发送方序号 #N */
|
|
35
|
+
senderSeq?: number
|
|
36
|
+
/** 原消息 IM type(text / markdown / image …) */
|
|
37
|
+
type?: string
|
|
38
|
+
/** 转发快照正文(URL 或文本) */
|
|
39
|
+
content?: string
|
|
40
|
+
/** 原消息展示用 extra(缩略图、im_display 等) */
|
|
41
|
+
extraData?: Record<string, unknown>
|
|
14
42
|
}
|
|
15
43
|
|
|
16
44
|
export interface ChatMessage {
|
|
17
45
|
id: string
|
|
18
|
-
type: 'text' | 'markdown' | 'image' | 'video' | 'voice' | 'file'
|
|
46
|
+
type: 'text' | 'markdown' | 'image' | 'video' | 'voice' | 'file' | 'forward_bundle'
|
|
19
47
|
content: string
|
|
20
48
|
timestamp: Date
|
|
21
49
|
sender: {
|
|
@@ -38,7 +66,8 @@ export interface ChatMessage {
|
|
|
38
66
|
* 媒体出站细分阶段:登记接口尚未返回时没有 OSS 字节进度,勿与实际上传百分比混淆。
|
|
39
67
|
* server_storage:客户端向 COS 直传时的占位阶段(如 PUT 已发出、等待完成回调)。
|
|
40
68
|
*/
|
|
41
|
-
|
|
69
|
+
/** queued:已落本地草稿、排队等待串行上传;仅当前活跃条在 UI 上映射为 registering */
|
|
70
|
+
mediaUploadPhase?: 'queued' | 'registering' | 'oss' | 'server_storage'
|
|
42
71
|
/** 终端幂等 id,与 ImApiMessage.client_message_id 一致 */
|
|
43
72
|
clientMessageId?: string
|
|
44
73
|
/** 媒体登记时原名(content 尚为空时用于文件气泡标题) */
|
|
@@ -57,6 +86,16 @@ export interface ChatMessage {
|
|
|
57
86
|
inlineAttachmentCount?: number
|
|
58
87
|
/** 与 `extra_data.attachments` 同步的只读列表(用于附件列表弹窗等) */
|
|
59
88
|
inlineAttachments?: ChatInlineAttachmentListItem[]
|
|
89
|
+
/**
|
|
90
|
+
* 正文富文本仍在本地补齐资源(`extra_data.inline_uploading`):
|
|
91
|
+
* 工具栏待传附件条,或正文 `img:[local:…]` / blob 预览 → OSS。
|
|
92
|
+
* 进度用 {@link inlineUploadUploadedCount} / {@link inlineUploadTotalCount}(仅附件条);勿往 `content` 拼接文案。
|
|
93
|
+
*/
|
|
94
|
+
inlineUploading?: boolean
|
|
95
|
+
/** 已完成上传的附件个数(`extra_data.inline_upload_uploaded_count`) */
|
|
96
|
+
inlineUploadUploadedCount?: number
|
|
97
|
+
/** 附件总数(`extra_data.inline_upload_total_count`) */
|
|
98
|
+
inlineUploadTotalCount?: number
|
|
60
99
|
/**
|
|
61
100
|
* `extra_data.im_display`:多段气泡(图文混排等);存在时气泡层优先按块渲染。
|
|
62
101
|
*/
|
|
@@ -65,6 +104,12 @@ export interface ChatMessage {
|
|
|
65
104
|
agentProxyRetryable?: boolean
|
|
66
105
|
/** 代理失败时的错误文案(如库不可用、ENOTFOUND) */
|
|
67
106
|
agentProxyError?: string
|
|
107
|
+
/** `extra_data.reply_to.message_id`:引用的目标消息 */
|
|
108
|
+
replyToMessageId?: string
|
|
109
|
+
/** 由列表层按 {@link replyToMessageId} 从同会话消息解析,仅展示用 */
|
|
110
|
+
quotePreview?: ChatMessageQuotePreview
|
|
111
|
+
/** `type === 'forward_bundle'` 时由 content JSON(兼容 extra_data.forward_bundle)解析 */
|
|
112
|
+
forwardBundle?: ChatForwardBundleItem[]
|
|
68
113
|
}
|
|
69
114
|
|
|
70
115
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 合并转发:`ImMessage.type === 'forward_bundle'`,载荷在 **content**(JSON,见 {@link ImForwardBundleContentPayload})。
|
|
3
|
+
* 引用回复才用 `extra_data.reply_to`;合并转发不是引用,不应占用 extra 主载荷。
|
|
4
|
+
* 旧数据可能仍在 `extra_data.forward_bundle`,读路径在 `parseForwardBundleFromImMessage` 中兼容。
|
|
5
|
+
*/
|
|
6
|
+
export const IM_FORWARD_BUNDLE_EXTRA_KEY: 'forward_bundle'
|
|
7
|
+
|
|
8
|
+
/** content 内 JSON 版本号 */
|
|
9
|
+
export const IM_FORWARD_BUNDLE_CONTENT_VERSION: 1
|
|
10
|
+
|
|
11
|
+
/** 合并转发条目中单条原消息的快照(落库) */
|
|
12
|
+
export interface ImForwardBundleStoredItem {
|
|
13
|
+
sender_id?: string
|
|
14
|
+
sender_name: string
|
|
15
|
+
/** 原消息 IM type(text / markdown / image …) */
|
|
16
|
+
type: string
|
|
17
|
+
/** 转发发送用的正文(URL 或文本) */
|
|
18
|
+
content: string
|
|
19
|
+
/** 列表/气泡内预览文案 */
|
|
20
|
+
snippet: string
|
|
21
|
+
/** 原会话中的消息主键(便于详情展示 #序号 或跳转) */
|
|
22
|
+
message_id?: string
|
|
23
|
+
/** 原会话中的发送方序号(与气泡元数据 #N 一致) */
|
|
24
|
+
sender_seq?: number
|
|
25
|
+
/** 原消息展示用 extra(如 im_display、缩略图字段等) */
|
|
26
|
+
extra_data?: Record<string, unknown>
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ImForwardBundleExtra {
|
|
30
|
+
items: ImForwardBundleStoredItem[]
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** 写入 `ImMessage.content` 的 JSON 结构 */
|
|
34
|
+
export interface ImForwardBundleContentPayload {
|
|
35
|
+
v: typeof IM_FORWARD_BUNDLE_CONTENT_VERSION
|
|
36
|
+
items: ImForwardBundleStoredItem[]
|
|
37
|
+
}
|