@blueking/chat-helper 0.0.1-beta.24 → 0.0.1-beta.25

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.
@@ -53,7 +53,7 @@ export interface IAgentCommandComponentApi {
53
53
  }
54
54
  export interface IAgentInfo {
55
55
  agentName?: string;
56
- resources?: IAgentResources;
56
+ resources?: IAgentResourceItem[];
57
57
  saasUrl?: string;
58
58
  chatGroup?: {
59
59
  enabled: boolean;
@@ -72,7 +72,7 @@ export interface IAgentInfo {
72
72
  }
73
73
  export interface IAgentInfoApi {
74
74
  agent_name: string;
75
- resources?: IAgentResources;
75
+ resources?: IAgentResourceItem[];
76
76
  saas_url?: string;
77
77
  chat_group?: {
78
78
  enabled: boolean;
@@ -94,7 +94,9 @@ export interface IAgentResourceItem {
94
94
  icon: null | string;
95
95
  id: null | number;
96
96
  name: string;
97
+ type: string;
97
98
  }
99
+ /** @deprecated 后端已改为扁平列表 IAgentResourceItem[],不再使用分组结构 */
98
100
  export interface IAgentResources {
99
101
  command?: IAgentResourceItem[];
100
102
  knowledgebase?: IAgentResourceItem[];
@@ -22,4 +22,4 @@
22
22
  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
23
23
  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24
24
  * IN THE SOFTWARE.
25
- */ export { };
25
+ */ /** @deprecated 后端已改为扁平列表 IAgentResourceItem[],不再使用分组结构 */ export { };
@@ -12,31 +12,12 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
12
12
  info: import("vue").Ref<{
13
13
  agentName?: string;
14
14
  resources?: {
15
- command?: {
16
- code: string;
17
- icon: null | string;
18
- id: null | number;
19
- name: string;
20
- }[];
21
- knowledgebase?: {
22
- code: string;
23
- icon: null | string;
24
- id: null | number;
25
- name: string;
26
- }[];
27
- mcp?: {
28
- code: string;
29
- icon: null | string;
30
- id: null | number;
31
- name: string;
32
- }[];
33
- tool?: {
34
- code: string;
35
- icon: null | string;
36
- id: null | number;
37
- name: string;
38
- }[];
39
- };
15
+ code: string;
16
+ icon: null | string;
17
+ id: null | number;
18
+ name: string;
19
+ type: string;
20
+ }[];
40
21
  saasUrl?: string;
41
22
  chatGroup?: {
42
23
  enabled: boolean;
@@ -287,6 +268,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
287
268
  };
288
269
  command?: string;
289
270
  context?: Array<Record<string, unknown>>;
271
+ resources?: Array<Record<string, unknown>>;
290
272
  };
291
273
  };
292
274
  role: MessageRole.User;
@@ -300,31 +282,12 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
300
282
  }, IAgentInfo | {
301
283
  agentName?: string;
302
284
  resources?: {
303
- command?: {
304
- code: string;
305
- icon: null | string;
306
- id: null | number;
307
- name: string;
308
- }[];
309
- knowledgebase?: {
310
- code: string;
311
- icon: null | string;
312
- id: null | number;
313
- name: string;
314
- }[];
315
- mcp?: {
316
- code: string;
317
- icon: null | string;
318
- id: null | number;
319
- name: string;
320
- }[];
321
- tool?: {
322
- code: string;
323
- icon: null | string;
324
- id: null | number;
325
- name: string;
326
- }[];
327
- };
285
+ code: string;
286
+ icon: null | string;
287
+ id: null | number;
288
+ name: string;
289
+ type: string;
290
+ }[];
328
291
  saasUrl?: string;
329
292
  chatGroup?: {
330
293
  enabled: boolean;
@@ -575,6 +538,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
575
538
  };
576
539
  command?: string;
577
540
  context?: Array<Record<string, unknown>>;
541
+ resources?: Array<Record<string, unknown>>;
578
542
  };
579
543
  };
580
544
  role: MessageRole.User;
package/dist/index.d.ts CHANGED
@@ -14,31 +14,12 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
14
14
  info: import("vue").Ref<{
15
15
  agentName?: string;
16
16
  resources?: {
17
- command?: {
18
- code: string;
19
- icon: null | string;
20
- id: null | number;
21
- name: string;
22
- }[];
23
- knowledgebase?: {
24
- code: string;
25
- icon: null | string;
26
- id: null | number;
27
- name: string;
28
- }[];
29
- mcp?: {
30
- code: string;
31
- icon: null | string;
32
- id: null | number;
33
- name: string;
34
- }[];
35
- tool?: {
36
- code: string;
37
- icon: null | string;
38
- id: null | number;
39
- name: string;
40
- }[];
41
- };
17
+ code: string;
18
+ icon: null | string;
19
+ id: null | number;
20
+ name: string;
21
+ type: string;
22
+ }[];
42
23
  saasUrl?: string;
43
24
  chatGroup?: {
44
25
  enabled: boolean;
@@ -289,6 +270,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
289
270
  };
290
271
  command?: string;
291
272
  context?: Array<Record<string, unknown>>;
273
+ resources?: Array<Record<string, unknown>>;
292
274
  };
293
275
  };
294
276
  role: import("./message").MessageRole.User;
@@ -302,31 +284,12 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
302
284
  }, import("./agent").IAgentInfo | {
303
285
  agentName?: string;
304
286
  resources?: {
305
- command?: {
306
- code: string;
307
- icon: null | string;
308
- id: null | number;
309
- name: string;
310
- }[];
311
- knowledgebase?: {
312
- code: string;
313
- icon: null | string;
314
- id: null | number;
315
- name: string;
316
- }[];
317
- mcp?: {
318
- code: string;
319
- icon: null | string;
320
- id: null | number;
321
- name: string;
322
- }[];
323
- tool?: {
324
- code: string;
325
- icon: null | string;
326
- id: null | number;
327
- name: string;
328
- }[];
329
- };
287
+ code: string;
288
+ icon: null | string;
289
+ id: null | number;
290
+ name: string;
291
+ type: string;
292
+ }[];
330
293
  saasUrl?: string;
331
294
  chatGroup?: {
332
295
  enabled: boolean;
@@ -577,6 +540,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
577
540
  };
578
541
  command?: string;
579
542
  context?: Array<Record<string, unknown>>;
543
+ resources?: Array<Record<string, unknown>>;
580
544
  };
581
545
  };
582
546
  role: import("./message").MessageRole.User;
@@ -828,6 +792,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
828
792
  };
829
793
  command?: string;
830
794
  context?: Array<Record<string, unknown>>;
795
+ resources?: Array<Record<string, unknown>>;
831
796
  };
832
797
  };
833
798
  role: import("./message").MessageRole.User;
@@ -1051,6 +1016,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
1051
1016
  };
1052
1017
  command?: string;
1053
1018
  context?: Array<Record<string, unknown>>;
1019
+ resources?: Array<Record<string, unknown>>;
1054
1020
  };
1055
1021
  };
1056
1022
  role: import("./message").MessageRole.User;
@@ -1294,6 +1260,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
1294
1260
  };
1295
1261
  command?: string;
1296
1262
  context?: Array<Record<string, unknown>>;
1263
+ resources?: Array<Record<string, unknown>>;
1297
1264
  };
1298
1265
  };
1299
1266
  role: import("./message").MessageRole.User;
@@ -1517,6 +1484,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
1517
1484
  };
1518
1485
  command?: string;
1519
1486
  context?: Array<Record<string, unknown>>;
1487
+ resources?: Array<Record<string, unknown>>;
1520
1488
  };
1521
1489
  };
1522
1490
  role: import("./message").MessageRole.User;
@@ -1761,6 +1729,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
1761
1729
  };
1762
1730
  command?: string;
1763
1731
  context?: Array<Record<string, unknown>>;
1732
+ resources?: Array<Record<string, unknown>>;
1764
1733
  };
1765
1734
  };
1766
1735
  role: import("./message").MessageRole.User;
@@ -1984,6 +1953,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
1984
1953
  };
1985
1954
  command?: string;
1986
1955
  context?: Array<Record<string, unknown>>;
1956
+ resources?: Array<Record<string, unknown>>;
1987
1957
  };
1988
1958
  };
1989
1959
  role: import("./message").MessageRole.User;
@@ -2227,6 +2197,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
2227
2197
  };
2228
2198
  command?: string;
2229
2199
  context?: Array<Record<string, unknown>>;
2200
+ resources?: Array<Record<string, unknown>>;
2230
2201
  };
2231
2202
  };
2232
2203
  role: import("./message").MessageRole.User;
@@ -2450,6 +2421,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
2450
2421
  };
2451
2422
  command?: string;
2452
2423
  context?: Array<Record<string, unknown>>;
2424
+ resources?: Array<Record<string, unknown>>;
2453
2425
  };
2454
2426
  };
2455
2427
  role: import("./message").MessageRole.User;
@@ -2710,6 +2682,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
2710
2682
  };
2711
2683
  command?: string;
2712
2684
  context?: Array<Record<string, unknown>>;
2685
+ resources?: Array<Record<string, unknown>>;
2713
2686
  };
2714
2687
  };
2715
2688
  role: import("./message").MessageRole.User;
@@ -2930,6 +2903,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
2930
2903
  };
2931
2904
  command?: string;
2932
2905
  context?: Array<Record<string, unknown>>;
2906
+ resources?: Array<Record<string, unknown>>;
2933
2907
  };
2934
2908
  };
2935
2909
  role: import("./message").MessageRole.User;
@@ -3154,6 +3128,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
3154
3128
  };
3155
3129
  command?: string;
3156
3130
  context?: Array<Record<string, unknown>>;
3131
+ resources?: Array<Record<string, unknown>>;
3157
3132
  };
3158
3133
  };
3159
3134
  role: import("./message").MessageRole.User;
@@ -3375,6 +3350,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
3375
3350
  };
3376
3351
  command?: string;
3377
3352
  context?: Array<Record<string, unknown>>;
3353
+ resources?: Array<Record<string, unknown>>;
3378
3354
  };
3379
3355
  };
3380
3356
  role: import("./message").MessageRole.User;
@@ -208,6 +208,8 @@ export interface IMessageProperty {
208
208
  command?: string;
209
209
  /** 上下文信息 */
210
210
  context?: Array<Record<string, unknown>>;
211
+ /** 用户通过 @ 选择的资源列表 */
212
+ resources?: Array<Record<string, unknown>>;
211
213
  };
212
214
  }
213
215
  export interface IPauseMessage extends IBaseMessage {
@@ -218,6 +218,7 @@ export declare const useMessage: (mediator: IMediatorModule) => {
218
218
  };
219
219
  command?: string;
220
220
  context?: Array<Record<string, unknown>>;
221
+ resources?: Array<Record<string, unknown>>;
221
222
  };
222
223
  };
223
224
  role: MessageRole.User;
@@ -438,6 +439,7 @@ export declare const useMessage: (mediator: IMediatorModule) => {
438
439
  };
439
440
  command?: string;
440
441
  context?: Array<Record<string, unknown>>;
442
+ resources?: Array<Record<string, unknown>>;
441
443
  };
442
444
  };
443
445
  role: MessageRole.User;
@@ -662,6 +664,7 @@ export declare const useMessage: (mediator: IMediatorModule) => {
662
664
  };
663
665
  command?: string;
664
666
  context?: Array<Record<string, unknown>>;
667
+ resources?: Array<Record<string, unknown>>;
665
668
  };
666
669
  };
667
670
  role: MessageRole.User;
@@ -883,6 +886,7 @@ export declare const useMessage: (mediator: IMediatorModule) => {
883
886
  };
884
887
  command?: string;
885
888
  context?: Array<Record<string, unknown>>;
889
+ resources?: Array<Record<string, unknown>>;
886
890
  };
887
891
  };
888
892
  role: MessageRole.User;
@@ -234,6 +234,7 @@ export declare const useSession: (mediator: IMediatorModule) => {
234
234
  };
235
235
  command?: string;
236
236
  context?: Array<Record<string, unknown>>;
237
+ resources?: Array<Record<string, unknown>>;
237
238
  };
238
239
  };
239
240
  role: import("..").MessageRole.User;
@@ -457,6 +458,7 @@ export declare const useSession: (mediator: IMediatorModule) => {
457
458
  };
458
459
  command?: string;
459
460
  context?: Array<Record<string, unknown>>;
461
+ resources?: Array<Record<string, unknown>>;
460
462
  };
461
463
  };
462
464
  role: import("..").MessageRole.User;
@@ -700,6 +702,7 @@ export declare const useSession: (mediator: IMediatorModule) => {
700
702
  };
701
703
  command?: string;
702
704
  context?: Array<Record<string, unknown>>;
705
+ resources?: Array<Record<string, unknown>>;
703
706
  };
704
707
  };
705
708
  role: import("..").MessageRole.User;
@@ -923,6 +926,7 @@ export declare const useSession: (mediator: IMediatorModule) => {
923
926
  };
924
927
  command?: string;
925
928
  context?: Array<Record<string, unknown>>;
929
+ resources?: Array<Record<string, unknown>>;
926
930
  };
927
931
  };
928
932
  role: import("..").MessageRole.User;
@@ -1167,6 +1171,7 @@ export declare const useSession: (mediator: IMediatorModule) => {
1167
1171
  };
1168
1172
  command?: string;
1169
1173
  context?: Array<Record<string, unknown>>;
1174
+ resources?: Array<Record<string, unknown>>;
1170
1175
  };
1171
1176
  };
1172
1177
  role: import("..").MessageRole.User;
@@ -1390,6 +1395,7 @@ export declare const useSession: (mediator: IMediatorModule) => {
1390
1395
  };
1391
1396
  command?: string;
1392
1397
  context?: Array<Record<string, unknown>>;
1398
+ resources?: Array<Record<string, unknown>>;
1393
1399
  };
1394
1400
  };
1395
1401
  role: import("..").MessageRole.User;
@@ -1633,6 +1639,7 @@ export declare const useSession: (mediator: IMediatorModule) => {
1633
1639
  };
1634
1640
  command?: string;
1635
1641
  context?: Array<Record<string, unknown>>;
1642
+ resources?: Array<Record<string, unknown>>;
1636
1643
  };
1637
1644
  };
1638
1645
  role: import("..").MessageRole.User;
@@ -1856,6 +1863,7 @@ export declare const useSession: (mediator: IMediatorModule) => {
1856
1863
  };
1857
1864
  command?: string;
1858
1865
  context?: Array<Record<string, unknown>>;
1866
+ resources?: Array<Record<string, unknown>>;
1859
1867
  };
1860
1868
  };
1861
1869
  role: import("..").MessageRole.User;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/chat-helper",
3
- "version": "0.0.1-beta.24",
3
+ "version": "0.0.1-beta.25",
4
4
  "description": "",
5
5
  "main": "./dist/index.ts.js",
6
6
  "types": "./dist/index.d.ts",
@@ -25,4 +25,4 @@
25
25
  "typescript": "^5.5.4",
26
26
  "vue-tsc": "^3.1.4"
27
27
  }
28
- }
28
+ }