@blueking/chat-helper 0.0.12-beta.10 → 0.0.12-beta.12

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.
@@ -1,5 +1,5 @@
1
1
  import type { IMediatorModule } from '../mediator';
2
- import type { ISession, ISessionFeedback, ISessionListParams } from './type';
2
+ import type { GetPvFileDownloadUrlOptions, ISession, ISessionFeedback, ISessionListParams } from './type';
3
3
  /**
4
4
  * 使用会话模块,主要做业务的组合
5
5
  * @param mediator - 中介者模块,用于获取其他模块的引用
@@ -25,6 +25,17 @@ export declare const useSession: (mediator: IMediatorModule) => {
25
25
  content: ({
26
26
  activityType: import("..").ActivityType;
27
27
  content: {
28
+ artifacts: {
29
+ name: string;
30
+ outputId: string;
31
+ size: number;
32
+ type: string;
33
+ previewUrl?: string;
34
+ url?: string;
35
+ }[];
36
+ runId: string;
37
+ status: "complete" | "empty";
38
+ } | {
28
39
  nodes: Record<string, import("..").IFlowAgentNode>;
29
40
  task_id: string;
30
41
  task_name: string;
@@ -42,6 +53,31 @@ export declare const useSession: (mediator: IMediatorModule) => {
42
53
  originFileUrl?: string;
43
54
  url: string;
44
55
  }[];
56
+ property?: {
57
+ [x: string]: unknown;
58
+ artifacts?: {
59
+ name: string;
60
+ outputId: string;
61
+ size: number;
62
+ type: string;
63
+ previewUrl?: string;
64
+ url?: string;
65
+ }[];
66
+ extra?: {
67
+ [x: string]: unknown;
68
+ cite?: string | {
69
+ data: {
70
+ key: string;
71
+ value: string;
72
+ }[];
73
+ title: string;
74
+ type: string;
75
+ };
76
+ command?: string;
77
+ context?: Array<Record<string, unknown>>;
78
+ resources?: Array<Record<string, unknown>>;
79
+ };
80
+ };
45
81
  role: import("..").MessageRole.Activity;
46
82
  id?: string;
47
83
  messageId?: string;
@@ -52,6 +88,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
52
88
  content?: string;
53
89
  property?: {
54
90
  [x: string]: unknown;
91
+ artifacts?: {
92
+ name: string;
93
+ outputId: string;
94
+ size: number;
95
+ type: string;
96
+ previewUrl?: string;
97
+ url?: string;
98
+ }[];
55
99
  extra?: {
56
100
  [x: string]: unknown;
57
101
  cite?: string | {
@@ -875,6 +919,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
875
919
  })[];
876
920
  property?: {
877
921
  [x: string]: unknown;
922
+ artifacts?: {
923
+ name: string;
924
+ outputId: string;
925
+ size: number;
926
+ type: string;
927
+ previewUrl?: string;
928
+ url?: string;
929
+ }[];
878
930
  extra?: {
879
931
  [x: string]: unknown;
880
932
  cite?: string | {
@@ -902,6 +954,17 @@ export declare const useSession: (mediator: IMediatorModule) => {
902
954
  value: string | ({
903
955
  activityType: import("..").ActivityType;
904
956
  content: {
957
+ artifacts: {
958
+ name: string;
959
+ outputId: string;
960
+ size: number;
961
+ type: string;
962
+ previewUrl?: string;
963
+ url?: string;
964
+ }[];
965
+ runId: string;
966
+ status: "complete" | "empty";
967
+ } | {
905
968
  nodes: Record<string, import("..").IFlowAgentNode>;
906
969
  task_id: string;
907
970
  task_name: string;
@@ -919,6 +982,31 @@ export declare const useSession: (mediator: IMediatorModule) => {
919
982
  originFileUrl?: string;
920
983
  url: string;
921
984
  }[];
985
+ property?: {
986
+ [x: string]: unknown;
987
+ artifacts?: {
988
+ name: string;
989
+ outputId: string;
990
+ size: number;
991
+ type: string;
992
+ previewUrl?: string;
993
+ url?: string;
994
+ }[];
995
+ extra?: {
996
+ [x: string]: unknown;
997
+ cite?: string | {
998
+ data: {
999
+ key: string;
1000
+ value: string;
1001
+ }[];
1002
+ title: string;
1003
+ type: string;
1004
+ };
1005
+ command?: string;
1006
+ context?: Array<Record<string, unknown>>;
1007
+ resources?: Array<Record<string, unknown>>;
1008
+ };
1009
+ };
922
1010
  role: import("..").MessageRole.Activity;
923
1011
  id?: string;
924
1012
  messageId?: string;
@@ -929,6 +1017,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
929
1017
  content?: string;
930
1018
  property?: {
931
1019
  [x: string]: unknown;
1020
+ artifacts?: {
1021
+ name: string;
1022
+ outputId: string;
1023
+ size: number;
1024
+ type: string;
1025
+ previewUrl?: string;
1026
+ url?: string;
1027
+ }[];
932
1028
  extra?: {
933
1029
  [x: string]: unknown;
934
1030
  cite?: string | {
@@ -1752,6 +1848,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
1752
1848
  })[];
1753
1849
  property?: {
1754
1850
  [x: string]: unknown;
1851
+ artifacts?: {
1852
+ name: string;
1853
+ outputId: string;
1854
+ size: number;
1855
+ type: string;
1856
+ previewUrl?: string;
1857
+ url?: string;
1858
+ }[];
1755
1859
  extra?: {
1756
1860
  [x: string]: unknown;
1757
1861
  cite?: string | {
@@ -1800,6 +1904,17 @@ export declare const useSession: (mediator: IMediatorModule) => {
1800
1904
  content: ({
1801
1905
  activityType: import("..").ActivityType;
1802
1906
  content: {
1907
+ artifacts: {
1908
+ name: string;
1909
+ outputId: string;
1910
+ size: number;
1911
+ type: string;
1912
+ previewUrl?: string;
1913
+ url?: string;
1914
+ }[];
1915
+ runId: string;
1916
+ status: "complete" | "empty";
1917
+ } | {
1803
1918
  nodes: Record<string, import("..").IFlowAgentNode>;
1804
1919
  task_id: string;
1805
1920
  task_name: string;
@@ -1817,6 +1932,31 @@ export declare const useSession: (mediator: IMediatorModule) => {
1817
1932
  originFileUrl?: string;
1818
1933
  url: string;
1819
1934
  }[];
1935
+ property?: {
1936
+ [x: string]: unknown;
1937
+ artifacts?: {
1938
+ name: string;
1939
+ outputId: string;
1940
+ size: number;
1941
+ type: string;
1942
+ previewUrl?: string;
1943
+ url?: string;
1944
+ }[];
1945
+ extra?: {
1946
+ [x: string]: unknown;
1947
+ cite?: string | {
1948
+ data: {
1949
+ key: string;
1950
+ value: string;
1951
+ }[];
1952
+ title: string;
1953
+ type: string;
1954
+ };
1955
+ command?: string;
1956
+ context?: Array<Record<string, unknown>>;
1957
+ resources?: Array<Record<string, unknown>>;
1958
+ };
1959
+ };
1820
1960
  role: import("..").MessageRole.Activity;
1821
1961
  id?: string;
1822
1962
  messageId?: string;
@@ -1827,6 +1967,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
1827
1967
  content?: string;
1828
1968
  property?: {
1829
1969
  [x: string]: unknown;
1970
+ artifacts?: {
1971
+ name: string;
1972
+ outputId: string;
1973
+ size: number;
1974
+ type: string;
1975
+ previewUrl?: string;
1976
+ url?: string;
1977
+ }[];
1830
1978
  extra?: {
1831
1979
  [x: string]: unknown;
1832
1980
  cite?: string | {
@@ -2650,6 +2798,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
2650
2798
  })[];
2651
2799
  property?: {
2652
2800
  [x: string]: unknown;
2801
+ artifacts?: {
2802
+ name: string;
2803
+ outputId: string;
2804
+ size: number;
2805
+ type: string;
2806
+ previewUrl?: string;
2807
+ url?: string;
2808
+ }[];
2653
2809
  extra?: {
2654
2810
  [x: string]: unknown;
2655
2811
  cite?: string | {
@@ -2677,6 +2833,17 @@ export declare const useSession: (mediator: IMediatorModule) => {
2677
2833
  value: string | ({
2678
2834
  activityType: import("..").ActivityType;
2679
2835
  content: {
2836
+ artifacts: {
2837
+ name: string;
2838
+ outputId: string;
2839
+ size: number;
2840
+ type: string;
2841
+ previewUrl?: string;
2842
+ url?: string;
2843
+ }[];
2844
+ runId: string;
2845
+ status: "complete" | "empty";
2846
+ } | {
2680
2847
  nodes: Record<string, import("..").IFlowAgentNode>;
2681
2848
  task_id: string;
2682
2849
  task_name: string;
@@ -2694,6 +2861,31 @@ export declare const useSession: (mediator: IMediatorModule) => {
2694
2861
  originFileUrl?: string;
2695
2862
  url: string;
2696
2863
  }[];
2864
+ property?: {
2865
+ [x: string]: unknown;
2866
+ artifacts?: {
2867
+ name: string;
2868
+ outputId: string;
2869
+ size: number;
2870
+ type: string;
2871
+ previewUrl?: string;
2872
+ url?: string;
2873
+ }[];
2874
+ extra?: {
2875
+ [x: string]: unknown;
2876
+ cite?: string | {
2877
+ data: {
2878
+ key: string;
2879
+ value: string;
2880
+ }[];
2881
+ title: string;
2882
+ type: string;
2883
+ };
2884
+ command?: string;
2885
+ context?: Array<Record<string, unknown>>;
2886
+ resources?: Array<Record<string, unknown>>;
2887
+ };
2888
+ };
2697
2889
  role: import("..").MessageRole.Activity;
2698
2890
  id?: string;
2699
2891
  messageId?: string;
@@ -2704,6 +2896,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
2704
2896
  content?: string;
2705
2897
  property?: {
2706
2898
  [x: string]: unknown;
2899
+ artifacts?: {
2900
+ name: string;
2901
+ outputId: string;
2902
+ size: number;
2903
+ type: string;
2904
+ previewUrl?: string;
2905
+ url?: string;
2906
+ }[];
2707
2907
  extra?: {
2708
2908
  [x: string]: unknown;
2709
2909
  cite?: string | {
@@ -3527,6 +3727,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
3527
3727
  })[];
3528
3728
  property?: {
3529
3729
  [x: string]: unknown;
3730
+ artifacts?: {
3731
+ name: string;
3732
+ outputId: string;
3733
+ size: number;
3734
+ type: string;
3735
+ previewUrl?: string;
3736
+ url?: string;
3737
+ }[];
3530
3738
  extra?: {
3531
3739
  [x: string]: unknown;
3532
3740
  cite?: string | {
@@ -3576,6 +3784,17 @@ export declare const useSession: (mediator: IMediatorModule) => {
3576
3784
  content: ({
3577
3785
  activityType: import("..").ActivityType;
3578
3786
  content: {
3787
+ artifacts: {
3788
+ name: string;
3789
+ outputId: string;
3790
+ size: number;
3791
+ type: string;
3792
+ previewUrl?: string;
3793
+ url?: string;
3794
+ }[];
3795
+ runId: string;
3796
+ status: "complete" | "empty";
3797
+ } | {
3579
3798
  nodes: Record<string, import("..").IFlowAgentNode>;
3580
3799
  task_id: string;
3581
3800
  task_name: string;
@@ -3593,6 +3812,31 @@ export declare const useSession: (mediator: IMediatorModule) => {
3593
3812
  originFileUrl?: string;
3594
3813
  url: string;
3595
3814
  }[];
3815
+ property?: {
3816
+ [x: string]: unknown;
3817
+ artifacts?: {
3818
+ name: string;
3819
+ outputId: string;
3820
+ size: number;
3821
+ type: string;
3822
+ previewUrl?: string;
3823
+ url?: string;
3824
+ }[];
3825
+ extra?: {
3826
+ [x: string]: unknown;
3827
+ cite?: string | {
3828
+ data: {
3829
+ key: string;
3830
+ value: string;
3831
+ }[];
3832
+ title: string;
3833
+ type: string;
3834
+ };
3835
+ command?: string;
3836
+ context?: Array<Record<string, unknown>>;
3837
+ resources?: Array<Record<string, unknown>>;
3838
+ };
3839
+ };
3596
3840
  role: import("..").MessageRole.Activity;
3597
3841
  id?: string;
3598
3842
  messageId?: string;
@@ -3603,6 +3847,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
3603
3847
  content?: string;
3604
3848
  property?: {
3605
3849
  [x: string]: unknown;
3850
+ artifacts?: {
3851
+ name: string;
3852
+ outputId: string;
3853
+ size: number;
3854
+ type: string;
3855
+ previewUrl?: string;
3856
+ url?: string;
3857
+ }[];
3606
3858
  extra?: {
3607
3859
  [x: string]: unknown;
3608
3860
  cite?: string | {
@@ -4426,6 +4678,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
4426
4678
  })[];
4427
4679
  property?: {
4428
4680
  [x: string]: unknown;
4681
+ artifacts?: {
4682
+ name: string;
4683
+ outputId: string;
4684
+ size: number;
4685
+ type: string;
4686
+ previewUrl?: string;
4687
+ url?: string;
4688
+ }[];
4429
4689
  extra?: {
4430
4690
  [x: string]: unknown;
4431
4691
  cite?: string | {
@@ -4453,6 +4713,17 @@ export declare const useSession: (mediator: IMediatorModule) => {
4453
4713
  value: string | ({
4454
4714
  activityType: import("..").ActivityType;
4455
4715
  content: {
4716
+ artifacts: {
4717
+ name: string;
4718
+ outputId: string;
4719
+ size: number;
4720
+ type: string;
4721
+ previewUrl?: string;
4722
+ url?: string;
4723
+ }[];
4724
+ runId: string;
4725
+ status: "complete" | "empty";
4726
+ } | {
4456
4727
  nodes: Record<string, import("..").IFlowAgentNode>;
4457
4728
  task_id: string;
4458
4729
  task_name: string;
@@ -4470,6 +4741,31 @@ export declare const useSession: (mediator: IMediatorModule) => {
4470
4741
  originFileUrl?: string;
4471
4742
  url: string;
4472
4743
  }[];
4744
+ property?: {
4745
+ [x: string]: unknown;
4746
+ artifacts?: {
4747
+ name: string;
4748
+ outputId: string;
4749
+ size: number;
4750
+ type: string;
4751
+ previewUrl?: string;
4752
+ url?: string;
4753
+ }[];
4754
+ extra?: {
4755
+ [x: string]: unknown;
4756
+ cite?: string | {
4757
+ data: {
4758
+ key: string;
4759
+ value: string;
4760
+ }[];
4761
+ title: string;
4762
+ type: string;
4763
+ };
4764
+ command?: string;
4765
+ context?: Array<Record<string, unknown>>;
4766
+ resources?: Array<Record<string, unknown>>;
4767
+ };
4768
+ };
4473
4769
  role: import("..").MessageRole.Activity;
4474
4770
  id?: string;
4475
4771
  messageId?: string;
@@ -4480,6 +4776,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
4480
4776
  content?: string;
4481
4777
  property?: {
4482
4778
  [x: string]: unknown;
4779
+ artifacts?: {
4780
+ name: string;
4781
+ outputId: string;
4782
+ size: number;
4783
+ type: string;
4784
+ previewUrl?: string;
4785
+ url?: string;
4786
+ }[];
4483
4787
  extra?: {
4484
4788
  [x: string]: unknown;
4485
4789
  cite?: string | {
@@ -5303,6 +5607,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
5303
5607
  })[];
5304
5608
  property?: {
5305
5609
  [x: string]: unknown;
5610
+ artifacts?: {
5611
+ name: string;
5612
+ outputId: string;
5613
+ size: number;
5614
+ type: string;
5615
+ previewUrl?: string;
5616
+ url?: string;
5617
+ }[];
5306
5618
  extra?: {
5307
5619
  [x: string]: unknown;
5308
5620
  cite?: string | {
@@ -5351,6 +5663,17 @@ export declare const useSession: (mediator: IMediatorModule) => {
5351
5663
  content: ({
5352
5664
  activityType: import("..").ActivityType;
5353
5665
  content: {
5666
+ artifacts: {
5667
+ name: string;
5668
+ outputId: string;
5669
+ size: number;
5670
+ type: string;
5671
+ previewUrl?: string;
5672
+ url?: string;
5673
+ }[];
5674
+ runId: string;
5675
+ status: "complete" | "empty";
5676
+ } | {
5354
5677
  nodes: Record<string, import("..").IFlowAgentNode>;
5355
5678
  task_id: string;
5356
5679
  task_name: string;
@@ -5368,6 +5691,31 @@ export declare const useSession: (mediator: IMediatorModule) => {
5368
5691
  originFileUrl?: string;
5369
5692
  url: string;
5370
5693
  }[];
5694
+ property?: {
5695
+ [x: string]: unknown;
5696
+ artifacts?: {
5697
+ name: string;
5698
+ outputId: string;
5699
+ size: number;
5700
+ type: string;
5701
+ previewUrl?: string;
5702
+ url?: string;
5703
+ }[];
5704
+ extra?: {
5705
+ [x: string]: unknown;
5706
+ cite?: string | {
5707
+ data: {
5708
+ key: string;
5709
+ value: string;
5710
+ }[];
5711
+ title: string;
5712
+ type: string;
5713
+ };
5714
+ command?: string;
5715
+ context?: Array<Record<string, unknown>>;
5716
+ resources?: Array<Record<string, unknown>>;
5717
+ };
5718
+ };
5371
5719
  role: import("..").MessageRole.Activity;
5372
5720
  id?: string;
5373
5721
  messageId?: string;
@@ -5378,6 +5726,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
5378
5726
  content?: string;
5379
5727
  property?: {
5380
5728
  [x: string]: unknown;
5729
+ artifacts?: {
5730
+ name: string;
5731
+ outputId: string;
5732
+ size: number;
5733
+ type: string;
5734
+ previewUrl?: string;
5735
+ url?: string;
5736
+ }[];
5381
5737
  extra?: {
5382
5738
  [x: string]: unknown;
5383
5739
  cite?: string | {
@@ -6201,6 +6557,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
6201
6557
  })[];
6202
6558
  property?: {
6203
6559
  [x: string]: unknown;
6560
+ artifacts?: {
6561
+ name: string;
6562
+ outputId: string;
6563
+ size: number;
6564
+ type: string;
6565
+ previewUrl?: string;
6566
+ url?: string;
6567
+ }[];
6204
6568
  extra?: {
6205
6569
  [x: string]: unknown;
6206
6570
  cite?: string | {
@@ -6228,6 +6592,17 @@ export declare const useSession: (mediator: IMediatorModule) => {
6228
6592
  value: string | ({
6229
6593
  activityType: import("..").ActivityType;
6230
6594
  content: {
6595
+ artifacts: {
6596
+ name: string;
6597
+ outputId: string;
6598
+ size: number;
6599
+ type: string;
6600
+ previewUrl?: string;
6601
+ url?: string;
6602
+ }[];
6603
+ runId: string;
6604
+ status: "complete" | "empty";
6605
+ } | {
6231
6606
  nodes: Record<string, import("..").IFlowAgentNode>;
6232
6607
  task_id: string;
6233
6608
  task_name: string;
@@ -6245,6 +6620,31 @@ export declare const useSession: (mediator: IMediatorModule) => {
6245
6620
  originFileUrl?: string;
6246
6621
  url: string;
6247
6622
  }[];
6623
+ property?: {
6624
+ [x: string]: unknown;
6625
+ artifacts?: {
6626
+ name: string;
6627
+ outputId: string;
6628
+ size: number;
6629
+ type: string;
6630
+ previewUrl?: string;
6631
+ url?: string;
6632
+ }[];
6633
+ extra?: {
6634
+ [x: string]: unknown;
6635
+ cite?: string | {
6636
+ data: {
6637
+ key: string;
6638
+ value: string;
6639
+ }[];
6640
+ title: string;
6641
+ type: string;
6642
+ };
6643
+ command?: string;
6644
+ context?: Array<Record<string, unknown>>;
6645
+ resources?: Array<Record<string, unknown>>;
6646
+ };
6647
+ };
6248
6648
  role: import("..").MessageRole.Activity;
6249
6649
  id?: string;
6250
6650
  messageId?: string;
@@ -6255,6 +6655,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
6255
6655
  content?: string;
6256
6656
  property?: {
6257
6657
  [x: string]: unknown;
6658
+ artifacts?: {
6659
+ name: string;
6660
+ outputId: string;
6661
+ size: number;
6662
+ type: string;
6663
+ previewUrl?: string;
6664
+ url?: string;
6665
+ }[];
6258
6666
  extra?: {
6259
6667
  [x: string]: unknown;
6260
6668
  cite?: string | {
@@ -7078,6 +7486,14 @@ export declare const useSession: (mediator: IMediatorModule) => {
7078
7486
  })[];
7079
7487
  property?: {
7080
7488
  [x: string]: unknown;
7489
+ artifacts?: {
7490
+ name: string;
7491
+ outputId: string;
7492
+ size: number;
7493
+ type: string;
7494
+ previewUrl?: string;
7495
+ url?: string;
7496
+ }[];
7081
7497
  extra?: {
7082
7498
  [x: string]: unknown;
7083
7499
  cite?: string | {
@@ -7143,6 +7559,7 @@ export declare const useSession: (mediator: IMediatorModule) => {
7143
7559
  uploadFile: (sessionCode: string, file: File) => Promise<{
7144
7560
  download_url?: string;
7145
7561
  }>;
7562
+ getPvFileDownloadUrl: (sessionCode: string, path: string, options?: GetPvFileDownloadUrlOptions) => Promise<import("./type").IPvFileDownloadUrlResult>;
7146
7563
  reset: () => void;
7147
7564
  };
7148
7565
  export type ISessionModule = ReturnType<typeof useSession>;
@@ -330,6 +330,10 @@ import { computed, ref } from 'vue';
330
330
  var _mediator_http;
331
331
  return (_mediator_http = mediator.http) === null || _mediator_http === void 0 ? void 0 : _mediator_http.session.uploadFile(sessionCode, file);
332
332
  };
333
+ const getPvFileDownloadUrl = (sessionCode, path, options)=>{
334
+ var _mediator_http;
335
+ return (_mediator_http = mediator.http) === null || _mediator_http === void 0 ? void 0 : _mediator_http.session.getPvFileDownloadUrl(sessionCode, path, options);
336
+ };
333
337
  /**
334
338
  * 重置 session 模块状态
335
339
  */ const reset = ()=>{
@@ -373,6 +377,7 @@ import { computed, ref } from 'vue';
373
377
  getSessionFeedbackReasons,
374
378
  renameSession,
375
379
  uploadFile,
380
+ getPvFileDownloadUrl,
376
381
  reset
377
382
  };
378
383
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/chat-helper",
3
- "version": "0.0.12-beta.10",
3
+ "version": "0.0.12-beta.12",
4
4
  "description": "",
5
5
  "main": "./dist/index.ts.js",
6
6
  "types": "./dist/index.d.ts",