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

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,10 +1,8 @@
1
- import type { IArtifactsGeneratedCustomValue, IFlowAgentResultCustomValue, IRunFinishedEvent } from '../event/type';
1
+ import type { IFlowAgentResultCustomValue, IRunFinishedEvent } from '../event/type';
2
2
  export declare enum ActivityType {
3
- ArtifactsGenerated = "artifacts_generated",
4
3
  FlowAgent = "flow_agent",
5
4
  KnowledgeRag = "knowledge_rag",
6
5
  ReferenceDocument = "reference_document",
7
- Info = "info",
8
6
  Interrupt = "interrupt"
9
7
  }
10
8
  export declare enum MessageRole {
@@ -56,14 +54,12 @@ export type IUserOperationPayload = {
56
54
  };
57
55
  export interface IActivityMessage extends IBaseMessage {
58
56
  activityType: ActivityType;
59
- content: IArtifactsGeneratedCustomValue | IFlowAgentResultCustomValue | IKnowledgeRag | IReferenceDocument;
60
- property?: IMessageProperty;
57
+ content: IFlowAgentResultCustomValue | IKnowledgeRag | IReferenceDocument;
61
58
  role: MessageRole.Activity;
62
59
  }
63
60
  export interface IActivityMessageApi extends IBaseMessageApi {
64
61
  activity_type: ActivityType;
65
- content: IArtifactsGeneratedCustomValue | IFlowAgentResultCustomValue | IKnowledgeRagApi | IReferenceDocumentApi;
66
- property?: IMessageProperty;
62
+ content: IFlowAgentResultCustomValue | IKnowledgeRagApi | IReferenceDocumentApi;
67
63
  role: MessageRole.Activity;
68
64
  }
69
65
  export interface IAssistantMessage extends IBaseMessage {
@@ -255,16 +251,6 @@ export interface IKnowledgeRagApi {
255
251
  }
256
252
  export type IMessage = IActivityMessage | IAssistantMessage | IDeveloperMessage | IGuideMessage | IHiddenAssistantMessage | IHiddenGuideMessage | IHiddenMessage | IHiddenSystemMessage | IHiddenUserMessage | IInfoMessage | IPauseMessage | IPlaceholderMessage | IReasoningMessage | ISystemMessage | ITemplateAssistantMessage | ITemplateGuideMessage | ITemplateHiddenMessage | ITemplateSystemMessage | ITemplateUserMessage | IToolMessage | IUserMessage | IInterruptMessage;
257
253
  export type IMessageApi = IActivityMessageApi | IAssistantMessageApi | IDeveloperMessageApi | IGuideMessageApi | IHiddenAssistantMessageApi | IHiddenGuideMessageApi | IHiddenMessageApi | IHiddenSystemMessageApi | IHiddenUserMessageApi | IInfoMessageApi | IPauseMessageApi | IPlaceholderMessageApi | IReasoningMessageApi | ISystemMessageApi | ITemplateAssistantMessageApi | ITemplateGuideMessageApi | ITemplateHiddenMessageApi | ITemplateSystemMessageApi | ITemplateUserMessageApi | IToolMessageApi | IUserMessageApi | IInterruptMessageApi;
258
- export interface IMessageArtifact {
259
- name: string;
260
- outputId: string;
261
- size: number;
262
- type: string;
263
- /** 事件不再下发;仅兼容旧数据 */
264
- previewUrl?: string;
265
- /** 事件不再下发;仅兼容旧数据 */
266
- url?: string;
267
- }
268
254
  /**
269
255
  * 消息属性 - 用于传递引用内容或快捷键相关信息
270
256
  * 该类型设计为灵活的结构,由外部调用方决定具体内容
@@ -272,7 +258,6 @@ export interface IMessageArtifact {
272
258
  export interface IMessageProperty {
273
259
  /** 其他扩展字段 */
274
260
  [key: string]: unknown;
275
- artifacts?: IMessageArtifact[];
276
261
  extra?: {
277
262
  /** 其他扩展字段 */
278
263
  [key: string]: unknown;
@@ -24,11 +24,9 @@
24
24
  * IN THE SOFTWARE.
25
25
  */ export var ActivityType;
26
26
  (function(ActivityType) {
27
- ActivityType["ArtifactsGenerated"] = "artifacts_generated";
28
27
  ActivityType["FlowAgent"] = "flow_agent";
29
28
  ActivityType["KnowledgeRag"] = "knowledge_rag";
30
29
  ActivityType["ReferenceDocument"] = "reference_document";
31
- ActivityType["Info"] = "info";
32
30
  ActivityType["Interrupt"] = "interrupt";
33
31
  })(ActivityType || (ActivityType = {}));
34
32
  export var MessageRole;
@@ -9,17 +9,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
9
9
  list: import("vue").Ref<({
10
10
  activityType: import("./type").ActivityType;
11
11
  content: {
12
- artifacts: {
13
- name: string;
14
- outputId: string;
15
- size: number;
16
- type: string;
17
- previewUrl?: string;
18
- url?: string;
19
- }[];
20
- runId: string;
21
- status: "complete" | "empty";
22
- } | {
23
12
  nodes: Record<string, import("..").IFlowAgentNode>;
24
13
  task_id: string;
25
14
  task_name: string;
@@ -37,31 +26,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
37
26
  originFileUrl?: string;
38
27
  url: string;
39
28
  }[];
40
- property?: {
41
- [x: string]: unknown;
42
- artifacts?: {
43
- name: string;
44
- outputId: string;
45
- size: number;
46
- type: string;
47
- previewUrl?: string;
48
- url?: string;
49
- }[];
50
- extra?: {
51
- [x: string]: unknown;
52
- cite?: string | {
53
- data: {
54
- key: string;
55
- value: string;
56
- }[];
57
- title: string;
58
- type: string;
59
- };
60
- command?: string;
61
- context?: Array<Record<string, unknown>>;
62
- resources?: Array<Record<string, unknown>>;
63
- };
64
- };
65
29
  role: MessageRole.Activity;
66
30
  id?: string;
67
31
  messageId?: string;
@@ -72,14 +36,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
72
36
  content?: string;
73
37
  property?: {
74
38
  [x: string]: unknown;
75
- artifacts?: {
76
- name: string;
77
- outputId: string;
78
- size: number;
79
- type: string;
80
- previewUrl?: string;
81
- url?: string;
82
- }[];
83
39
  extra?: {
84
40
  [x: string]: unknown;
85
41
  cite?: string | {
@@ -903,14 +859,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
903
859
  })[];
904
860
  property?: {
905
861
  [x: string]: unknown;
906
- artifacts?: {
907
- name: string;
908
- outputId: string;
909
- size: number;
910
- type: string;
911
- previewUrl?: string;
912
- url?: string;
913
- }[];
914
862
  extra?: {
915
863
  [x: string]: unknown;
916
864
  cite?: string | {
@@ -935,17 +883,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
935
883
  })[], IMessage[] | ({
936
884
  activityType: import("./type").ActivityType;
937
885
  content: {
938
- artifacts: {
939
- name: string;
940
- outputId: string;
941
- size: number;
942
- type: string;
943
- previewUrl?: string;
944
- url?: string;
945
- }[];
946
- runId: string;
947
- status: "complete" | "empty";
948
- } | {
949
886
  nodes: Record<string, import("..").IFlowAgentNode>;
950
887
  task_id: string;
951
888
  task_name: string;
@@ -963,31 +900,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
963
900
  originFileUrl?: string;
964
901
  url: string;
965
902
  }[];
966
- property?: {
967
- [x: string]: unknown;
968
- artifacts?: {
969
- name: string;
970
- outputId: string;
971
- size: number;
972
- type: string;
973
- previewUrl?: string;
974
- url?: string;
975
- }[];
976
- extra?: {
977
- [x: string]: unknown;
978
- cite?: string | {
979
- data: {
980
- key: string;
981
- value: string;
982
- }[];
983
- title: string;
984
- type: string;
985
- };
986
- command?: string;
987
- context?: Array<Record<string, unknown>>;
988
- resources?: Array<Record<string, unknown>>;
989
- };
990
- };
991
903
  role: MessageRole.Activity;
992
904
  id?: string;
993
905
  messageId?: string;
@@ -998,14 +910,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
998
910
  content?: string;
999
911
  property?: {
1000
912
  [x: string]: unknown;
1001
- artifacts?: {
1002
- name: string;
1003
- outputId: string;
1004
- size: number;
1005
- type: string;
1006
- previewUrl?: string;
1007
- url?: string;
1008
- }[];
1009
913
  extra?: {
1010
914
  [x: string]: unknown;
1011
915
  cite?: string | {
@@ -1829,14 +1733,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
1829
1733
  })[];
1830
1734
  property?: {
1831
1735
  [x: string]: unknown;
1832
- artifacts?: {
1833
- name: string;
1834
- outputId: string;
1835
- size: number;
1836
- type: string;
1837
- previewUrl?: string;
1838
- url?: string;
1839
- }[];
1840
1736
  extra?: {
1841
1737
  [x: string]: unknown;
1842
1738
  cite?: string | {
@@ -1866,17 +1762,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
1866
1762
  getCurrentLoadingMessage: () => {
1867
1763
  activityType: import("./type").ActivityType;
1868
1764
  content: {
1869
- artifacts: {
1870
- name: string;
1871
- outputId: string;
1872
- size: number;
1873
- type: string;
1874
- previewUrl?: string;
1875
- url?: string;
1876
- }[];
1877
- runId: string;
1878
- status: "complete" | "empty";
1879
- } | {
1880
1765
  nodes: Record<string, import("..").IFlowAgentNode>;
1881
1766
  task_id: string;
1882
1767
  task_name: string;
@@ -1894,31 +1779,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
1894
1779
  originFileUrl?: string;
1895
1780
  url: string;
1896
1781
  }[];
1897
- property?: {
1898
- [x: string]: unknown;
1899
- artifacts?: {
1900
- name: string;
1901
- outputId: string;
1902
- size: number;
1903
- type: string;
1904
- previewUrl?: string;
1905
- url?: string;
1906
- }[];
1907
- extra?: {
1908
- [x: string]: unknown;
1909
- cite?: string | {
1910
- data: {
1911
- key: string;
1912
- value: string;
1913
- }[];
1914
- title: string;
1915
- type: string;
1916
- };
1917
- command?: string;
1918
- context?: Array<Record<string, unknown>>;
1919
- resources?: Array<Record<string, unknown>>;
1920
- };
1921
- };
1922
1782
  role: MessageRole.Activity;
1923
1783
  id?: string;
1924
1784
  messageId?: string;
@@ -1929,14 +1789,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
1929
1789
  content?: string;
1930
1790
  property?: {
1931
1791
  [x: string]: unknown;
1932
- artifacts?: {
1933
- name: string;
1934
- outputId: string;
1935
- size: number;
1936
- type: string;
1937
- previewUrl?: string;
1938
- url?: string;
1939
- }[];
1940
1792
  extra?: {
1941
1793
  [x: string]: unknown;
1942
1794
  cite?: string | {
@@ -2760,14 +2612,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
2760
2612
  })[];
2761
2613
  property?: {
2762
2614
  [x: string]: unknown;
2763
- artifacts?: {
2764
- name: string;
2765
- outputId: string;
2766
- size: number;
2767
- type: string;
2768
- previewUrl?: string;
2769
- url?: string;
2770
- }[];
2771
2615
  extra?: {
2772
2616
  [x: string]: unknown;
2773
2617
  cite?: string | {
@@ -2793,17 +2637,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
2793
2637
  getMessageByMessageId: (id: string) => {
2794
2638
  activityType: import("./type").ActivityType;
2795
2639
  content: {
2796
- artifacts: {
2797
- name: string;
2798
- outputId: string;
2799
- size: number;
2800
- type: string;
2801
- previewUrl?: string;
2802
- url?: string;
2803
- }[];
2804
- runId: string;
2805
- status: "complete" | "empty";
2806
- } | {
2807
2640
  nodes: Record<string, import("..").IFlowAgentNode>;
2808
2641
  task_id: string;
2809
2642
  task_name: string;
@@ -2821,31 +2654,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
2821
2654
  originFileUrl?: string;
2822
2655
  url: string;
2823
2656
  }[];
2824
- property?: {
2825
- [x: string]: unknown;
2826
- artifacts?: {
2827
- name: string;
2828
- outputId: string;
2829
- size: number;
2830
- type: string;
2831
- previewUrl?: string;
2832
- url?: string;
2833
- }[];
2834
- extra?: {
2835
- [x: string]: unknown;
2836
- cite?: string | {
2837
- data: {
2838
- key: string;
2839
- value: string;
2840
- }[];
2841
- title: string;
2842
- type: string;
2843
- };
2844
- command?: string;
2845
- context?: Array<Record<string, unknown>>;
2846
- resources?: Array<Record<string, unknown>>;
2847
- };
2848
- };
2849
2657
  role: MessageRole.Activity;
2850
2658
  id?: string;
2851
2659
  messageId?: string;
@@ -2856,14 +2664,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
2856
2664
  content?: string;
2857
2665
  property?: {
2858
2666
  [x: string]: unknown;
2859
- artifacts?: {
2860
- name: string;
2861
- outputId: string;
2862
- size: number;
2863
- type: string;
2864
- previewUrl?: string;
2865
- url?: string;
2866
- }[];
2867
2667
  extra?: {
2868
2668
  [x: string]: unknown;
2869
2669
  cite?: string | {
@@ -3687,14 +3487,6 @@ export declare const useMessage: (mediator: IMediatorModule) => {
3687
3487
  })[];
3688
3488
  property?: {
3689
3489
  [x: string]: unknown;
3690
- artifacts?: {
3691
- name: string;
3692
- outputId: string;
3693
- size: number;
3694
- type: string;
3695
- previewUrl?: string;
3696
- url?: string;
3697
- }[];
3698
3490
  extra?: {
3699
3491
  [x: string]: unknown;
3700
3492
  cite?: string | {
@@ -96,17 +96,3 @@ export interface ISessionFeedbackApi {
96
96
  session_code: string;
97
97
  session_content_ids: number[];
98
98
  }
99
- /** pv_files/download_url 响应(保持后端 snake_case) */
100
- export interface IPvFileDownloadUrlResult {
101
- download_url: string;
102
- expires_at: string;
103
- preview_url: string;
104
- sha256: string;
105
- size: number;
106
- }
107
- export interface GetPvFileDownloadUrlOptions {
108
- /** 有效期秒数,默认 600,最大 3600 */
109
- expiresIn?: number;
110
- /** 请求超时毫秒,默认 20000 */
111
- timeout?: number;
112
- }