@blueking/chat-helper 0.0.12-beta.9 → 0.0.13-dev.1

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.
Files changed (38) hide show
  1. package/README.md +21 -7
  2. package/dist/agent/type.d.ts +82 -0
  3. package/dist/agent/type.ts.js +5 -1
  4. package/dist/agent/use-agent.d.ts +229 -10
  5. package/dist/agent/use-agent.ts.js +365 -25
  6. package/dist/event/ag-ui.d.ts +4 -1
  7. package/dist/event/ag-ui.ts.js +76 -6
  8. package/dist/event/type.d.ts +14 -2
  9. package/dist/event/type.ts.js +2 -0
  10. package/dist/http/fetch/fetch.spec.d.ts +1 -0
  11. package/dist/http/fetch/fetch.ts.js +106 -22
  12. package/dist/http/index.d.ts +11 -5
  13. package/dist/http/module/agent.d.ts +2 -0
  14. package/dist/http/module/agent.ts.js +19 -2
  15. package/dist/http/module/index.d.ts +11 -5
  16. package/dist/http/module/message.d.ts +1 -1
  17. package/dist/http/module/message.ts.js +4 -3
  18. package/dist/http/module/session.d.ts +10 -5
  19. package/dist/http/module/session.ts.js +60 -3
  20. package/dist/http/transform/agent.d.ts +9 -1
  21. package/dist/http/transform/agent.spec.d.ts +1 -0
  22. package/dist/http/transform/agent.ts.js +29 -0
  23. package/dist/http/transform/message.spec.d.ts +1 -0
  24. package/dist/http/transform/message.ts.js +19 -5
  25. package/dist/index.d.ts +1194 -16
  26. package/dist/message/type.d.ts +35 -3
  27. package/dist/message/type.ts.js +16 -0
  28. package/dist/message/use-message.d.ts +316 -0
  29. package/dist/session/index.d.ts +1 -0
  30. package/dist/session/index.ts.js +2 -1
  31. package/dist/session/pv-file-upload.d.ts +7 -0
  32. package/dist/session/pv-file-upload.spec.d.ts +1 -0
  33. package/dist/session/pv-file-upload.ts.js +64 -0
  34. package/dist/session/type.d.ts +57 -0
  35. package/dist/session/use-session.d.ts +644 -6
  36. package/dist/session/use-session.spec.d.ts +1 -0
  37. package/dist/session/use-session.ts.js +117 -10
  38. package/package.json +4 -2
@@ -1,9 +1,9 @@
1
- import { ApprovalInterruptTicketStatus, ResumeStatus, RunFinishedOutcomeType, type IResume } from '../event';
1
+ import { ApprovalInterruptTicketStatus, EventType, ResumeStatus, RunFinishedOutcomeType, type IResume } from '../event';
2
2
  import { MessageRole, MessageStatus, UserOperation } from '../message';
3
3
  import type { IRequestConfig, ISSEProtocol } from '../http';
4
4
  import type { IMediatorModule } from '../mediator';
5
5
  import type { IMessageProperty, IUserMessage, IUserOperationPayload } from '../message/type';
6
- import type { IAgentInfo } from './type';
6
+ import type { IAgentInfo, ILlmItem, ILlmListQuery, StreamMode } from './type';
7
7
  /**
8
8
  * Agent 模块
9
9
  * @param options - 配置选项
@@ -12,6 +12,8 @@ import type { IAgentInfo } from './type';
12
12
  export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtocol) => {
13
13
  info: import("vue").Ref<{
14
14
  agentName?: string;
15
+ agentType?: "claw" | "single" | string;
16
+ agentSdkVersion?: string;
15
17
  relatedSkills?: {
16
18
  description: string;
17
19
  icon: string;
@@ -70,6 +72,17 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
70
72
  content?: ({
71
73
  activityType: import("../message").ActivityType;
72
74
  content: {
75
+ artifacts: {
76
+ name: string;
77
+ outputId: string;
78
+ size: number;
79
+ type: string;
80
+ previewUrl?: string;
81
+ url?: string;
82
+ }[];
83
+ runId: string;
84
+ status: "complete" | "empty";
85
+ } | {
73
86
  nodes: Record<string, import("../event").IFlowAgentNode>;
74
87
  task_id: string;
75
88
  task_name: string;
@@ -87,7 +100,34 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
87
100
  originFileUrl?: string;
88
101
  url: string;
89
102
  }[];
103
+ property?: {
104
+ [x: string]: unknown;
105
+ artifacts?: {
106
+ name: string;
107
+ outputId: string;
108
+ size: number;
109
+ type: string;
110
+ previewUrl?: string;
111
+ url?: string;
112
+ }[];
113
+ docSchema?: unknown;
114
+ extra?: {
115
+ [x: string]: unknown;
116
+ cite?: string | {
117
+ data: {
118
+ key: string;
119
+ value: string;
120
+ }[];
121
+ title: string;
122
+ type: string;
123
+ };
124
+ command?: string;
125
+ context?: Array<Record<string, unknown>>;
126
+ resources?: Array<Record<string, unknown>>;
127
+ };
128
+ };
90
129
  role: MessageRole.Activity;
130
+ createdAt?: string;
91
131
  id?: string;
92
132
  messageId?: string;
93
133
  name?: string;
@@ -97,6 +137,15 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
97
137
  content?: string;
98
138
  property?: {
99
139
  [x: string]: unknown;
140
+ artifacts?: {
141
+ name: string;
142
+ outputId: string;
143
+ size: number;
144
+ type: string;
145
+ previewUrl?: string;
146
+ url?: string;
147
+ }[];
148
+ docSchema?: unknown;
100
149
  extra?: {
101
150
  [x: string]: unknown;
102
151
  cite?: string | {
@@ -123,6 +172,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
123
172
  id: string;
124
173
  type: import("../message").MessageType.Function;
125
174
  }[];
175
+ createdAt?: string;
126
176
  id?: string;
127
177
  messageId?: string;
128
178
  name?: string;
@@ -131,6 +181,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
131
181
  } | {
132
182
  content: string;
133
183
  role: MessageRole.Developer;
184
+ createdAt?: string;
134
185
  id?: string;
135
186
  messageId?: string;
136
187
  name?: string;
@@ -154,7 +205,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
154
205
  };
155
206
  runId: number;
156
207
  threadId: string;
157
- type: import("../event").EventType.RunFinished;
208
+ type: EventType.RunFinished;
158
209
  outcome?: {
159
210
  type: RunFinishedOutcomeType.Success;
160
211
  } | {
@@ -761,6 +812,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
761
812
  timestamp?: number;
762
813
  };
763
814
  role: MessageRole.Interrupt;
815
+ createdAt?: string;
764
816
  id?: string;
765
817
  messageId?: string;
766
818
  name?: string;
@@ -769,6 +821,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
769
821
  } | {
770
822
  content: string;
771
823
  role: MessageRole.Guide;
824
+ createdAt?: string;
772
825
  id?: string;
773
826
  messageId?: string;
774
827
  name?: string;
@@ -777,6 +830,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
777
830
  } | {
778
831
  content: string;
779
832
  role: MessageRole.HiddenAssistant;
833
+ createdAt?: string;
780
834
  id?: string;
781
835
  messageId?: string;
782
836
  name?: string;
@@ -785,6 +839,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
785
839
  } | {
786
840
  content: string;
787
841
  role: MessageRole.HiddenGuide;
842
+ createdAt?: string;
788
843
  id?: string;
789
844
  messageId?: string;
790
845
  name?: string;
@@ -793,6 +848,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
793
848
  } | {
794
849
  content: string;
795
850
  role: MessageRole.Hidden;
851
+ createdAt?: string;
796
852
  id?: string;
797
853
  messageId?: string;
798
854
  name?: string;
@@ -801,6 +857,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
801
857
  } | {
802
858
  content: string;
803
859
  role: MessageRole.HiddenSystem;
860
+ createdAt?: string;
804
861
  id?: string;
805
862
  messageId?: string;
806
863
  name?: string;
@@ -809,6 +866,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
809
866
  } | {
810
867
  content: string;
811
868
  role: MessageRole.HiddenUser;
869
+ createdAt?: string;
812
870
  id?: string;
813
871
  messageId?: string;
814
872
  name?: string;
@@ -817,6 +875,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
817
875
  } | {
818
876
  content: string;
819
877
  role: MessageRole.Info;
878
+ createdAt?: string;
820
879
  id?: string;
821
880
  messageId?: string;
822
881
  name?: string;
@@ -825,6 +884,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
825
884
  } | {
826
885
  content: string;
827
886
  role: MessageRole.Pause;
887
+ createdAt?: string;
828
888
  id?: string;
829
889
  messageId?: string;
830
890
  name?: string;
@@ -833,6 +893,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
833
893
  } | {
834
894
  content: string;
835
895
  role: MessageRole.Placeholder;
896
+ createdAt?: string;
836
897
  id?: string;
837
898
  messageId?: string;
838
899
  name?: string;
@@ -842,6 +903,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
842
903
  content: string[];
843
904
  duration?: number;
844
905
  role: MessageRole.Reasoning;
906
+ createdAt?: string;
845
907
  id?: string;
846
908
  messageId?: string;
847
909
  name?: string;
@@ -850,6 +912,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
850
912
  } | {
851
913
  content: string;
852
914
  role: MessageRole.System;
915
+ createdAt?: string;
853
916
  id?: string;
854
917
  messageId?: string;
855
918
  name?: string;
@@ -858,6 +921,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
858
921
  } | {
859
922
  content: string;
860
923
  role: MessageRole.TemplateAssistant;
924
+ createdAt?: string;
861
925
  id?: string;
862
926
  messageId?: string;
863
927
  name?: string;
@@ -866,6 +930,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
866
930
  } | {
867
931
  content: string;
868
932
  role: MessageRole.TemplateGuide;
933
+ createdAt?: string;
869
934
  id?: string;
870
935
  messageId?: string;
871
936
  name?: string;
@@ -874,6 +939,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
874
939
  } | {
875
940
  content: string;
876
941
  role: MessageRole.TemplateHidden;
942
+ createdAt?: string;
877
943
  id?: string;
878
944
  messageId?: string;
879
945
  name?: string;
@@ -882,6 +948,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
882
948
  } | {
883
949
  content: string;
884
950
  role: MessageRole.TemplateSystem;
951
+ createdAt?: string;
885
952
  id?: string;
886
953
  messageId?: string;
887
954
  name?: string;
@@ -890,6 +957,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
890
957
  } | {
891
958
  content: string;
892
959
  role: MessageRole.TemplateUser;
960
+ createdAt?: string;
893
961
  id?: string;
894
962
  messageId?: string;
895
963
  name?: string;
@@ -901,6 +969,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
901
969
  error?: string;
902
970
  role: MessageRole.Tool;
903
971
  toolCallId: string;
972
+ createdAt?: string;
904
973
  id?: string;
905
974
  messageId?: string;
906
975
  name?: string;
@@ -912,6 +981,8 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
912
981
  filename?: string;
913
982
  id?: string;
914
983
  mimeType: string;
984
+ outputId?: string;
985
+ size?: number;
915
986
  type: import("../message").MessageType.Binary;
916
987
  url?: string;
917
988
  } | {
@@ -920,6 +991,15 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
920
991
  })[];
921
992
  property?: {
922
993
  [x: string]: unknown;
994
+ artifacts?: {
995
+ name: string;
996
+ outputId: string;
997
+ size: number;
998
+ type: string;
999
+ previewUrl?: string;
1000
+ url?: string;
1001
+ }[];
1002
+ docSchema?: unknown;
923
1003
  extra?: {
924
1004
  [x: string]: unknown;
925
1005
  cite?: string | {
@@ -936,6 +1016,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
936
1016
  };
937
1017
  };
938
1018
  role: MessageRole.User;
1019
+ createdAt?: string;
939
1020
  id?: string;
940
1021
  messageId?: string;
941
1022
  name?: string;
@@ -948,6 +1029,8 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
948
1029
  };
949
1030
  }, IAgentInfo | {
950
1031
  agentName?: string;
1032
+ agentType?: "claw" | "single" | string;
1033
+ agentSdkVersion?: string;
951
1034
  relatedSkills?: {
952
1035
  description: string;
953
1036
  icon: string;
@@ -1006,6 +1089,17 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1006
1089
  content?: ({
1007
1090
  activityType: import("../message").ActivityType;
1008
1091
  content: {
1092
+ artifacts: {
1093
+ name: string;
1094
+ outputId: string;
1095
+ size: number;
1096
+ type: string;
1097
+ previewUrl?: string;
1098
+ url?: string;
1099
+ }[];
1100
+ runId: string;
1101
+ status: "complete" | "empty";
1102
+ } | {
1009
1103
  nodes: Record<string, import("../event").IFlowAgentNode>;
1010
1104
  task_id: string;
1011
1105
  task_name: string;
@@ -1023,7 +1117,34 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1023
1117
  originFileUrl?: string;
1024
1118
  url: string;
1025
1119
  }[];
1120
+ property?: {
1121
+ [x: string]: unknown;
1122
+ artifacts?: {
1123
+ name: string;
1124
+ outputId: string;
1125
+ size: number;
1126
+ type: string;
1127
+ previewUrl?: string;
1128
+ url?: string;
1129
+ }[];
1130
+ docSchema?: unknown;
1131
+ extra?: {
1132
+ [x: string]: unknown;
1133
+ cite?: string | {
1134
+ data: {
1135
+ key: string;
1136
+ value: string;
1137
+ }[];
1138
+ title: string;
1139
+ type: string;
1140
+ };
1141
+ command?: string;
1142
+ context?: Array<Record<string, unknown>>;
1143
+ resources?: Array<Record<string, unknown>>;
1144
+ };
1145
+ };
1026
1146
  role: MessageRole.Activity;
1147
+ createdAt?: string;
1027
1148
  id?: string;
1028
1149
  messageId?: string;
1029
1150
  name?: string;
@@ -1033,6 +1154,15 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1033
1154
  content?: string;
1034
1155
  property?: {
1035
1156
  [x: string]: unknown;
1157
+ artifacts?: {
1158
+ name: string;
1159
+ outputId: string;
1160
+ size: number;
1161
+ type: string;
1162
+ previewUrl?: string;
1163
+ url?: string;
1164
+ }[];
1165
+ docSchema?: unknown;
1036
1166
  extra?: {
1037
1167
  [x: string]: unknown;
1038
1168
  cite?: string | {
@@ -1059,6 +1189,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1059
1189
  id: string;
1060
1190
  type: import("../message").MessageType.Function;
1061
1191
  }[];
1192
+ createdAt?: string;
1062
1193
  id?: string;
1063
1194
  messageId?: string;
1064
1195
  name?: string;
@@ -1067,6 +1198,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1067
1198
  } | {
1068
1199
  content: string;
1069
1200
  role: MessageRole.Developer;
1201
+ createdAt?: string;
1070
1202
  id?: string;
1071
1203
  messageId?: string;
1072
1204
  name?: string;
@@ -1090,7 +1222,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1090
1222
  };
1091
1223
  runId: number;
1092
1224
  threadId: string;
1093
- type: import("../event").EventType.RunFinished;
1225
+ type: EventType.RunFinished;
1094
1226
  outcome?: {
1095
1227
  type: RunFinishedOutcomeType.Success;
1096
1228
  } | {
@@ -1697,6 +1829,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1697
1829
  timestamp?: number;
1698
1830
  };
1699
1831
  role: MessageRole.Interrupt;
1832
+ createdAt?: string;
1700
1833
  id?: string;
1701
1834
  messageId?: string;
1702
1835
  name?: string;
@@ -1705,6 +1838,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1705
1838
  } | {
1706
1839
  content: string;
1707
1840
  role: MessageRole.Guide;
1841
+ createdAt?: string;
1708
1842
  id?: string;
1709
1843
  messageId?: string;
1710
1844
  name?: string;
@@ -1713,6 +1847,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1713
1847
  } | {
1714
1848
  content: string;
1715
1849
  role: MessageRole.HiddenAssistant;
1850
+ createdAt?: string;
1716
1851
  id?: string;
1717
1852
  messageId?: string;
1718
1853
  name?: string;
@@ -1721,6 +1856,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1721
1856
  } | {
1722
1857
  content: string;
1723
1858
  role: MessageRole.HiddenGuide;
1859
+ createdAt?: string;
1724
1860
  id?: string;
1725
1861
  messageId?: string;
1726
1862
  name?: string;
@@ -1729,6 +1865,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1729
1865
  } | {
1730
1866
  content: string;
1731
1867
  role: MessageRole.Hidden;
1868
+ createdAt?: string;
1732
1869
  id?: string;
1733
1870
  messageId?: string;
1734
1871
  name?: string;
@@ -1737,6 +1874,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1737
1874
  } | {
1738
1875
  content: string;
1739
1876
  role: MessageRole.HiddenSystem;
1877
+ createdAt?: string;
1740
1878
  id?: string;
1741
1879
  messageId?: string;
1742
1880
  name?: string;
@@ -1745,6 +1883,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1745
1883
  } | {
1746
1884
  content: string;
1747
1885
  role: MessageRole.HiddenUser;
1886
+ createdAt?: string;
1748
1887
  id?: string;
1749
1888
  messageId?: string;
1750
1889
  name?: string;
@@ -1753,6 +1892,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1753
1892
  } | {
1754
1893
  content: string;
1755
1894
  role: MessageRole.Info;
1895
+ createdAt?: string;
1756
1896
  id?: string;
1757
1897
  messageId?: string;
1758
1898
  name?: string;
@@ -1761,6 +1901,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1761
1901
  } | {
1762
1902
  content: string;
1763
1903
  role: MessageRole.Pause;
1904
+ createdAt?: string;
1764
1905
  id?: string;
1765
1906
  messageId?: string;
1766
1907
  name?: string;
@@ -1769,6 +1910,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1769
1910
  } | {
1770
1911
  content: string;
1771
1912
  role: MessageRole.Placeholder;
1913
+ createdAt?: string;
1772
1914
  id?: string;
1773
1915
  messageId?: string;
1774
1916
  name?: string;
@@ -1778,6 +1920,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1778
1920
  content: string[];
1779
1921
  duration?: number;
1780
1922
  role: MessageRole.Reasoning;
1923
+ createdAt?: string;
1781
1924
  id?: string;
1782
1925
  messageId?: string;
1783
1926
  name?: string;
@@ -1786,6 +1929,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1786
1929
  } | {
1787
1930
  content: string;
1788
1931
  role: MessageRole.System;
1932
+ createdAt?: string;
1789
1933
  id?: string;
1790
1934
  messageId?: string;
1791
1935
  name?: string;
@@ -1794,6 +1938,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1794
1938
  } | {
1795
1939
  content: string;
1796
1940
  role: MessageRole.TemplateAssistant;
1941
+ createdAt?: string;
1797
1942
  id?: string;
1798
1943
  messageId?: string;
1799
1944
  name?: string;
@@ -1802,6 +1947,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1802
1947
  } | {
1803
1948
  content: string;
1804
1949
  role: MessageRole.TemplateGuide;
1950
+ createdAt?: string;
1805
1951
  id?: string;
1806
1952
  messageId?: string;
1807
1953
  name?: string;
@@ -1810,6 +1956,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1810
1956
  } | {
1811
1957
  content: string;
1812
1958
  role: MessageRole.TemplateHidden;
1959
+ createdAt?: string;
1813
1960
  id?: string;
1814
1961
  messageId?: string;
1815
1962
  name?: string;
@@ -1818,6 +1965,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1818
1965
  } | {
1819
1966
  content: string;
1820
1967
  role: MessageRole.TemplateSystem;
1968
+ createdAt?: string;
1821
1969
  id?: string;
1822
1970
  messageId?: string;
1823
1971
  name?: string;
@@ -1826,6 +1974,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1826
1974
  } | {
1827
1975
  content: string;
1828
1976
  role: MessageRole.TemplateUser;
1977
+ createdAt?: string;
1829
1978
  id?: string;
1830
1979
  messageId?: string;
1831
1980
  name?: string;
@@ -1837,6 +1986,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1837
1986
  error?: string;
1838
1987
  role: MessageRole.Tool;
1839
1988
  toolCallId: string;
1989
+ createdAt?: string;
1840
1990
  id?: string;
1841
1991
  messageId?: string;
1842
1992
  name?: string;
@@ -1848,6 +1998,8 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1848
1998
  filename?: string;
1849
1999
  id?: string;
1850
2000
  mimeType: string;
2001
+ outputId?: string;
2002
+ size?: number;
1851
2003
  type: import("../message").MessageType.Binary;
1852
2004
  url?: string;
1853
2005
  } | {
@@ -1856,6 +2008,15 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1856
2008
  })[];
1857
2009
  property?: {
1858
2010
  [x: string]: unknown;
2011
+ artifacts?: {
2012
+ name: string;
2013
+ outputId: string;
2014
+ size: number;
2015
+ type: string;
2016
+ previewUrl?: string;
2017
+ url?: string;
2018
+ }[];
2019
+ docSchema?: unknown;
1859
2020
  extra?: {
1860
2021
  [x: string]: unknown;
1861
2022
  cite?: string | {
@@ -1872,6 +2033,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1872
2033
  };
1873
2034
  };
1874
2035
  role: MessageRole.User;
2036
+ createdAt?: string;
1875
2037
  id?: string;
1876
2038
  messageId?: string;
1877
2039
  name?: string;
@@ -1885,24 +2047,81 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
1885
2047
  }>;
1886
2048
  isInfoLoading: import("vue").Ref<boolean, boolean>;
1887
2049
  isChatting: import("vue").Ref<boolean, boolean>;
1888
- chat: (userInput: IUserMessage["content"], sessionCode: string, url?: string, config?: IRequestConfig, property?: IMessageProperty) => Promise<void>;
2050
+ models: import("vue").Ref<{
2051
+ base_model?: string;
2052
+ description?: string;
2053
+ disabled?: boolean;
2054
+ icon?: string;
2055
+ id: number;
2056
+ llm_code: string;
2057
+ llm_name: string;
2058
+ llm_type: string;
2059
+ max_token_size: number;
2060
+ property: {
2061
+ agent_type?: string;
2062
+ default?: boolean;
2063
+ is_self_host?: boolean;
2064
+ max_model_len?: number;
2065
+ support_summary?: boolean;
2066
+ support_thinking?: boolean;
2067
+ support_thinking_quick?: boolean;
2068
+ support_tools?: boolean;
2069
+ support_vision?: boolean;
2070
+ support_window?: boolean;
2071
+ };
2072
+ space_auth_mode: string;
2073
+ tag_names?: string[];
2074
+ user_auth_mode: string;
2075
+ }[], ILlmItem[] | {
2076
+ base_model?: string;
2077
+ description?: string;
2078
+ disabled?: boolean;
2079
+ icon?: string;
2080
+ id: number;
2081
+ llm_code: string;
2082
+ llm_name: string;
2083
+ llm_type: string;
2084
+ max_token_size: number;
2085
+ property: {
2086
+ agent_type?: string;
2087
+ default?: boolean;
2088
+ is_self_host?: boolean;
2089
+ max_model_len?: number;
2090
+ support_summary?: boolean;
2091
+ support_thinking?: boolean;
2092
+ support_thinking_quick?: boolean;
2093
+ support_tools?: boolean;
2094
+ support_vision?: boolean;
2095
+ support_window?: boolean;
2096
+ };
2097
+ space_auth_mode: string;
2098
+ tag_names?: string[];
2099
+ user_auth_mode: string;
2100
+ }[]>;
2101
+ isModelsLoading: import("vue").Ref<boolean, boolean>;
2102
+ chat: (userInput: IUserMessage["content"], sessionCode: string, url?: string, config?: IRequestConfig, property?: IMessageProperty, model?: string) => Promise<void>;
1889
2103
  handleRole: (data: IAgentInfo, sessionCode: string) => void;
1890
- resendMessage: (messageId: string, sessionCode: string, newContent?: IUserMessage["content"], url?: string, config?: IRequestConfig) => Promise<void>;
1891
- resumeStreamingChat: (sessionCode: string, url?: string, config?: IRequestConfig) => void;
2104
+ resendMessage: (messageId: string, sessionCode: string, newContent?: IUserMessage["content"], url?: string, config?: IRequestConfig, model?: string) => Promise<void>;
2105
+ resumeStreamingChat: (sessionCode: string, url?: string, config?: IRequestConfig, model?: string) => void;
1892
2106
  abortChat: () => void;
1893
2107
  stopChat: (sessionCode: string) => Promise<void>;
1894
2108
  getAgentInfo: () => Promise<void>;
2109
+ getLlms: (params?: ILlmListQuery, config?: IRequestConfig) => Promise<ILlmItem[]>;
1895
2110
  reset: (protocol: ISSEProtocol) => void;
1896
- pollResumeSession: (sessionCode: string) => void;
2111
+ pollResumeSession: (sessionCode: string, model?: string) => void;
1897
2112
  clearLongPollTimer: () => void;
1898
- userOperationStreamRequest: (sessionCode: string, operation: UserOperation, payload: IUserOperationPayload, config?: IRequestConfig) => Promise<void>;
1899
- streamRequest: ({ sessionCode, url, config, resume, input, lastMessageId, }: {
2113
+ userOperationStreamRequest: (sessionCode: string, operation: UserOperation, payload: IUserOperationPayload, config?: IRequestConfig, model?: string) => Promise<void>;
2114
+ streamRequest: ({ sessionCode, model, url, config, resume, input, lastMessageId, isReconnect, streamMode, }: {
1900
2115
  sessionCode: string;
2116
+ model?: string;
1901
2117
  url?: string;
1902
2118
  config?: IRequestConfig;
1903
2119
  resume?: IResume;
1904
2120
  input?: string;
1905
2121
  lastMessageId?: string;
2122
+ /** 内部静默重连,不重置重连计数 */
2123
+ isReconnect?: boolean;
2124
+ streamMode?: StreamMode;
1906
2125
  }) => Promise<void>;
1907
2126
  };
1908
2127
  export type IAgentModule = ReturnType<typeof useAgent>;