@vectorx/agent-simulator 1.0.0 → 1.1.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.
Files changed (311) hide show
  1. package/lib/app.d.ts +1 -1
  2. package/lib/app.js +4 -4
  3. package/lib/config/api.config.d.ts +0 -1
  4. package/lib/config/api.config.js +3 -2
  5. package/lib/config/app.config.d.ts +2 -1
  6. package/lib/config/app.config.js +0 -1
  7. package/lib/config/upload.config.d.ts +0 -1
  8. package/lib/config/upload.config.js +0 -1
  9. package/lib/container/container.d.ts +0 -1
  10. package/lib/container/container.js +4 -2
  11. package/lib/container/identifiers.d.ts +0 -1
  12. package/lib/container/identifiers.js +0 -1
  13. package/lib/container/index.d.ts +0 -1
  14. package/lib/container/index.js +0 -1
  15. package/lib/container/types.d.ts +9 -1
  16. package/lib/container/types.js +0 -1
  17. package/lib/controllers/agent.controller.d.ts +6 -3
  18. package/lib/controllers/agent.controller.js +17 -3
  19. package/lib/controllers/auth.controller.d.ts +4 -5
  20. package/lib/controllers/auth.controller.js +3 -4
  21. package/lib/controllers/simulator.controller.d.ts +2 -3
  22. package/lib/controllers/simulator.controller.js +1 -2
  23. package/lib/controllers/upload.controller.d.ts +1 -2
  24. package/lib/controllers/upload.controller.js +5 -2
  25. package/lib/index.d.ts +1 -2
  26. package/lib/index.js +0 -1
  27. package/lib/middleware/cors.middleware.d.ts +0 -1
  28. package/lib/middleware/cors.middleware.js +0 -1
  29. package/lib/middleware/error.middleware.d.ts +3 -4
  30. package/lib/middleware/error.middleware.js +2 -3
  31. package/lib/middleware/proxy.middleware.d.ts +1 -2
  32. package/lib/middleware/proxy.middleware.js +0 -1
  33. package/lib/middleware/upload.middleware.d.ts +0 -1
  34. package/lib/middleware/upload.middleware.js +0 -1
  35. package/lib/routes/agent.d.ts +0 -1
  36. package/lib/routes/agent.js +2 -1
  37. package/lib/routes/auth.d.ts +0 -1
  38. package/lib/routes/auth.js +0 -1
  39. package/lib/routes/index.d.ts +0 -1
  40. package/lib/routes/index.js +0 -1
  41. package/lib/routes/simulator.d.ts +0 -1
  42. package/lib/routes/simulator.js +0 -1
  43. package/lib/routes/upload.d.ts +0 -1
  44. package/lib/routes/upload.js +0 -1
  45. package/lib/services/agent.service.d.ts +15 -2
  46. package/lib/services/agent.service.js +34 -8
  47. package/lib/services/auth.service.d.ts +1 -2
  48. package/lib/services/auth.service.js +5 -6
  49. package/lib/services/simulator.service.d.ts +0 -1
  50. package/lib/services/simulator.service.js +0 -1
  51. package/lib/services/upload.service.d.ts +0 -1
  52. package/lib/services/upload.service.js +0 -1
  53. package/lib/simulator.d.ts +11 -1
  54. package/lib/simulator.js +90 -6
  55. package/lib/utils/env-helper.d.ts +0 -1
  56. package/lib/utils/env-helper.js +0 -1
  57. package/lib/utils/logger.d.ts +0 -1
  58. package/lib/utils/logger.js +0 -1
  59. package/lib/utils/request.d.ts +0 -1
  60. package/lib/utils/request.js +6 -2
  61. package/lib/utils/url-parser.d.ts +0 -1
  62. package/lib/utils/url-parser.js +1 -2
  63. package/lib/utils.d.ts +0 -1
  64. package/lib/utils.js +0 -1
  65. package/lib/webview-ui/Agent.d.ts +0 -1
  66. package/lib/webview-ui/Agent.js +0 -1
  67. package/lib/webview-ui/App.d.ts +0 -1
  68. package/lib/webview-ui/App.js +176 -34
  69. package/lib/webview-ui/ErrorBoundary.d.ts +0 -1
  70. package/lib/webview-ui/ErrorBoundary.js +0 -1
  71. package/lib/webview-ui/components/AsyncTaskBlock.d.ts +1 -2
  72. package/lib/webview-ui/components/AsyncTaskBlock.js +16 -5
  73. package/lib/webview-ui/components/AuthIndicator.d.ts +1 -2
  74. package/lib/webview-ui/components/AuthIndicator.js +0 -1
  75. package/lib/webview-ui/components/ErrorCard.d.ts +1 -2
  76. package/lib/webview-ui/components/ErrorCard.js +7 -5
  77. package/lib/webview-ui/components/KnowledgeBaseSearchBlock.d.ts +1 -2
  78. package/lib/webview-ui/components/KnowledgeBaseSearchBlock.js +4 -3
  79. package/lib/webview-ui/components/KnowledgeBaseSearchResult.d.ts +1 -2
  80. package/lib/webview-ui/components/KnowledgeBaseSearchResult.js +1 -2
  81. package/lib/webview-ui/components/MarkdownRenderer.d.ts +1 -2
  82. package/lib/webview-ui/components/MarkdownRenderer.js +3 -8
  83. package/lib/webview-ui/components/MessageRenderer.d.ts +1 -2
  84. package/lib/webview-ui/components/MessageRenderer.js +48 -5
  85. package/lib/webview-ui/components/MultimodalFileRenderer.d.ts +2 -2
  86. package/lib/webview-ui/components/MultimodalFileRenderer.js +97 -40
  87. package/lib/webview-ui/components/ThinkingBlock.d.ts +2 -3
  88. package/lib/webview-ui/components/ThinkingBlock.js +0 -1
  89. package/lib/webview-ui/components/ToolUseBlock.d.ts +1 -2
  90. package/lib/webview-ui/components/ToolUseBlock.js +1 -2
  91. package/lib/webview-ui/components/ToolUseBlockHeader.d.ts +1 -2
  92. package/lib/webview-ui/components/ToolUseBlockHeader.js +1 -2
  93. package/lib/webview-ui/components/UploadPreview.d.ts +1 -2
  94. package/lib/webview-ui/components/UploadPreview.js +0 -1
  95. package/lib/webview-ui/components/WelcomeModule.d.ts +0 -1
  96. package/lib/webview-ui/components/WelcomeModule.js +46 -16
  97. package/lib/webview-ui/components/index.d.ts +0 -1
  98. package/lib/webview-ui/components/index.js +0 -1
  99. package/lib/webview-ui/config/cos-config.d.ts +0 -1
  100. package/lib/webview-ui/config/cos-config.js +0 -1
  101. package/lib/webview-ui/config/http-config.d.ts +0 -1
  102. package/lib/webview-ui/config/http-config.js +0 -1
  103. package/lib/webview-ui/constants.d.ts +0 -1
  104. package/lib/webview-ui/constants.js +0 -1
  105. package/lib/webview-ui/contexts/AgentContext.d.ts +1 -2
  106. package/lib/webview-ui/contexts/AgentContext.js +0 -1
  107. package/lib/webview-ui/contexts/AuthContext.d.ts +2 -2
  108. package/lib/webview-ui/contexts/AuthContext.js +0 -1
  109. package/lib/webview-ui/contexts/ThemeContext.d.ts +2 -2
  110. package/lib/webview-ui/contexts/ThemeContext.js +0 -1
  111. package/lib/webview-ui/hooks/useAgentStatus.d.ts +4 -2
  112. package/lib/webview-ui/hooks/useAgentStatus.js +31 -5
  113. package/lib/webview-ui/hooks/useUploader.d.ts +0 -1
  114. package/lib/webview-ui/hooks/useUploader.js +5 -2
  115. package/lib/webview-ui/hooks/useUserAvatar.d.ts +0 -1
  116. package/lib/webview-ui/hooks/useUserAvatar.js +0 -1
  117. package/lib/webview-ui/index.d.ts +1 -1
  118. package/lib/webview-ui/index.js +1 -1
  119. package/lib/webview-ui/services/agent-service.d.ts +14 -1
  120. package/lib/webview-ui/services/agent-service.js +7 -1
  121. package/lib/webview-ui/services/index.d.ts +0 -1
  122. package/lib/webview-ui/services/index.js +0 -1
  123. package/lib/webview-ui/services/logger-service.d.ts +0 -1
  124. package/lib/webview-ui/services/logger-service.js +0 -1
  125. package/lib/webview-ui/styles/copilot.d.ts +0 -1
  126. package/lib/webview-ui/styles/copilot.js +80 -22
  127. package/lib/webview-ui/styles/workarea.d.ts +0 -1
  128. package/lib/webview-ui/styles/workarea.js +7 -2
  129. package/lib/webview-ui/types.d.ts +11 -2
  130. package/lib/webview-ui/types.js +0 -1
  131. package/lib/webview-ui/utils/cos.d.ts +0 -1
  132. package/lib/webview-ui/utils/cos.js +4 -3
  133. package/lib/webview-ui/utils/env-helper.d.ts +6 -1
  134. package/lib/webview-ui/utils/env-helper.js +16 -2
  135. package/lib/webview-ui/utils/http-client.d.ts +1 -2
  136. package/lib/webview-ui/utils/http-client.js +0 -1
  137. package/lib/webview-ui/utils/markdownHighlight.d.ts +3 -0
  138. package/lib/webview-ui/utils/markdownHighlight.js +75 -0
  139. package/lib/webview-ui/utils/stream-text-handler.d.ts +0 -1
  140. package/lib/webview-ui/utils/stream-text-handler.js +6 -3
  141. package/lib/webview-ui/utils/upload.d.ts +0 -1
  142. package/lib/webview-ui/utils/upload.js +5 -2
  143. package/lib/webview-ui/widgets/BubbleComponents.d.ts +1 -2
  144. package/lib/webview-ui/widgets/BubbleComponents.js +1 -2
  145. package/lib/webview-ui/widgets/ChatInput.d.ts +1 -2
  146. package/lib/webview-ui/widgets/ChatInput.js +63 -90
  147. package/lib/webview-ui/widgets/LogPanel.d.ts +2 -3
  148. package/lib/webview-ui/widgets/LogPanel.js +5 -2
  149. package/lib/webview-ui/widgets/SystemLogs.d.ts +1 -2
  150. package/lib/webview-ui/widgets/SystemLogs.js +26 -9
  151. package/lib/webview-ui/widgets/ToolBar.d.ts +4 -3
  152. package/lib/webview-ui/widgets/ToolBar.js +6 -4
  153. package/lib/webview-ui/widgets/WebSocketDebugger.d.ts +6 -0
  154. package/lib/webview-ui/widgets/WebSocketDebugger.js +226 -0
  155. package/lib/webview-ui/widgets/index.d.ts +0 -1
  156. package/lib/webview-ui/widgets/index.js +0 -1
  157. package/package.json +9 -7
  158. package/public/assets/main.js +193 -166
  159. package/public/assets/style.css +1 -1
  160. package/lib/app.d.ts.map +0 -1
  161. package/lib/app.js.map +0 -1
  162. package/lib/config/api.config.d.ts.map +0 -1
  163. package/lib/config/api.config.js.map +0 -1
  164. package/lib/config/app.config.d.ts.map +0 -1
  165. package/lib/config/app.config.js.map +0 -1
  166. package/lib/config/upload.config.d.ts.map +0 -1
  167. package/lib/config/upload.config.js.map +0 -1
  168. package/lib/container/container.d.ts.map +0 -1
  169. package/lib/container/container.js.map +0 -1
  170. package/lib/container/identifiers.d.ts.map +0 -1
  171. package/lib/container/identifiers.js.map +0 -1
  172. package/lib/container/index.d.ts.map +0 -1
  173. package/lib/container/index.js.map +0 -1
  174. package/lib/container/types.d.ts.map +0 -1
  175. package/lib/container/types.js.map +0 -1
  176. package/lib/controllers/agent.controller.d.ts.map +0 -1
  177. package/lib/controllers/agent.controller.js.map +0 -1
  178. package/lib/controllers/auth.controller.d.ts.map +0 -1
  179. package/lib/controllers/auth.controller.js.map +0 -1
  180. package/lib/controllers/simulator.controller.d.ts.map +0 -1
  181. package/lib/controllers/simulator.controller.js.map +0 -1
  182. package/lib/controllers/upload.controller.d.ts.map +0 -1
  183. package/lib/controllers/upload.controller.js.map +0 -1
  184. package/lib/index.d.ts.map +0 -1
  185. package/lib/index.js.map +0 -1
  186. package/lib/middleware/cors.middleware.d.ts.map +0 -1
  187. package/lib/middleware/cors.middleware.js.map +0 -1
  188. package/lib/middleware/error.middleware.d.ts.map +0 -1
  189. package/lib/middleware/error.middleware.js.map +0 -1
  190. package/lib/middleware/proxy.middleware.d.ts.map +0 -1
  191. package/lib/middleware/proxy.middleware.js.map +0 -1
  192. package/lib/middleware/upload.middleware.d.ts.map +0 -1
  193. package/lib/middleware/upload.middleware.js.map +0 -1
  194. package/lib/routes/agent.d.ts.map +0 -1
  195. package/lib/routes/agent.js.map +0 -1
  196. package/lib/routes/auth.d.ts.map +0 -1
  197. package/lib/routes/auth.js.map +0 -1
  198. package/lib/routes/index.d.ts.map +0 -1
  199. package/lib/routes/index.js.map +0 -1
  200. package/lib/routes/simulator.d.ts.map +0 -1
  201. package/lib/routes/simulator.js.map +0 -1
  202. package/lib/routes/upload.d.ts.map +0 -1
  203. package/lib/routes/upload.js.map +0 -1
  204. package/lib/services/agent.service.d.ts.map +0 -1
  205. package/lib/services/agent.service.js.map +0 -1
  206. package/lib/services/auth.service.d.ts.map +0 -1
  207. package/lib/services/auth.service.js.map +0 -1
  208. package/lib/services/simulator.service.d.ts.map +0 -1
  209. package/lib/services/simulator.service.js.map +0 -1
  210. package/lib/services/upload.service.d.ts.map +0 -1
  211. package/lib/services/upload.service.js.map +0 -1
  212. package/lib/simulator.d.ts.map +0 -1
  213. package/lib/simulator.js.map +0 -1
  214. package/lib/utils/env-helper.d.ts.map +0 -1
  215. package/lib/utils/env-helper.js.map +0 -1
  216. package/lib/utils/logger.d.ts.map +0 -1
  217. package/lib/utils/logger.js.map +0 -1
  218. package/lib/utils/request.d.ts.map +0 -1
  219. package/lib/utils/request.js.map +0 -1
  220. package/lib/utils/url-parser.d.ts.map +0 -1
  221. package/lib/utils/url-parser.js.map +0 -1
  222. package/lib/utils.d.ts.map +0 -1
  223. package/lib/utils.js.map +0 -1
  224. package/lib/webview-ui/Agent.d.ts.map +0 -1
  225. package/lib/webview-ui/Agent.js.map +0 -1
  226. package/lib/webview-ui/App.d.ts.map +0 -1
  227. package/lib/webview-ui/App.js.map +0 -1
  228. package/lib/webview-ui/ErrorBoundary.d.ts.map +0 -1
  229. package/lib/webview-ui/ErrorBoundary.js.map +0 -1
  230. package/lib/webview-ui/components/AsyncTaskBlock.d.ts.map +0 -1
  231. package/lib/webview-ui/components/AsyncTaskBlock.js.map +0 -1
  232. package/lib/webview-ui/components/AuthIndicator.d.ts.map +0 -1
  233. package/lib/webview-ui/components/AuthIndicator.js.map +0 -1
  234. package/lib/webview-ui/components/ErrorCard.d.ts.map +0 -1
  235. package/lib/webview-ui/components/ErrorCard.js.map +0 -1
  236. package/lib/webview-ui/components/KnowledgeBaseSearchBlock.d.ts.map +0 -1
  237. package/lib/webview-ui/components/KnowledgeBaseSearchBlock.js.map +0 -1
  238. package/lib/webview-ui/components/KnowledgeBaseSearchResult.d.ts.map +0 -1
  239. package/lib/webview-ui/components/KnowledgeBaseSearchResult.js.map +0 -1
  240. package/lib/webview-ui/components/MarkdownRenderer.d.ts.map +0 -1
  241. package/lib/webview-ui/components/MarkdownRenderer.js.map +0 -1
  242. package/lib/webview-ui/components/MessageRenderer.d.ts.map +0 -1
  243. package/lib/webview-ui/components/MessageRenderer.js.map +0 -1
  244. package/lib/webview-ui/components/MultimodalFileRenderer.d.ts.map +0 -1
  245. package/lib/webview-ui/components/MultimodalFileRenderer.js.map +0 -1
  246. package/lib/webview-ui/components/ThinkingBlock.d.ts.map +0 -1
  247. package/lib/webview-ui/components/ThinkingBlock.js.map +0 -1
  248. package/lib/webview-ui/components/ToolUseBlock.d.ts.map +0 -1
  249. package/lib/webview-ui/components/ToolUseBlock.js.map +0 -1
  250. package/lib/webview-ui/components/ToolUseBlockHeader.d.ts.map +0 -1
  251. package/lib/webview-ui/components/ToolUseBlockHeader.js.map +0 -1
  252. package/lib/webview-ui/components/UploadPreview.d.ts.map +0 -1
  253. package/lib/webview-ui/components/UploadPreview.js.map +0 -1
  254. package/lib/webview-ui/components/WelcomeModule.d.ts.map +0 -1
  255. package/lib/webview-ui/components/WelcomeModule.js.map +0 -1
  256. package/lib/webview-ui/components/index.d.ts.map +0 -1
  257. package/lib/webview-ui/components/index.js.map +0 -1
  258. package/lib/webview-ui/config/cos-config.d.ts.map +0 -1
  259. package/lib/webview-ui/config/cos-config.js.map +0 -1
  260. package/lib/webview-ui/config/http-config.d.ts.map +0 -1
  261. package/lib/webview-ui/config/http-config.js.map +0 -1
  262. package/lib/webview-ui/constants.d.ts.map +0 -1
  263. package/lib/webview-ui/constants.js.map +0 -1
  264. package/lib/webview-ui/contexts/AgentContext.d.ts.map +0 -1
  265. package/lib/webview-ui/contexts/AgentContext.js.map +0 -1
  266. package/lib/webview-ui/contexts/AuthContext.d.ts.map +0 -1
  267. package/lib/webview-ui/contexts/AuthContext.js.map +0 -1
  268. package/lib/webview-ui/contexts/ThemeContext.d.ts.map +0 -1
  269. package/lib/webview-ui/contexts/ThemeContext.js.map +0 -1
  270. package/lib/webview-ui/hooks/useAgentStatus.d.ts.map +0 -1
  271. package/lib/webview-ui/hooks/useAgentStatus.js.map +0 -1
  272. package/lib/webview-ui/hooks/useUploader.d.ts.map +0 -1
  273. package/lib/webview-ui/hooks/useUploader.js.map +0 -1
  274. package/lib/webview-ui/hooks/useUserAvatar.d.ts.map +0 -1
  275. package/lib/webview-ui/hooks/useUserAvatar.js.map +0 -1
  276. package/lib/webview-ui/index.d.ts.map +0 -1
  277. package/lib/webview-ui/index.js.map +0 -1
  278. package/lib/webview-ui/services/agent-service.d.ts.map +0 -1
  279. package/lib/webview-ui/services/agent-service.js.map +0 -1
  280. package/lib/webview-ui/services/index.d.ts.map +0 -1
  281. package/lib/webview-ui/services/index.js.map +0 -1
  282. package/lib/webview-ui/services/logger-service.d.ts.map +0 -1
  283. package/lib/webview-ui/services/logger-service.js.map +0 -1
  284. package/lib/webview-ui/styles/copilot.d.ts.map +0 -1
  285. package/lib/webview-ui/styles/copilot.js.map +0 -1
  286. package/lib/webview-ui/styles/workarea.d.ts.map +0 -1
  287. package/lib/webview-ui/styles/workarea.js.map +0 -1
  288. package/lib/webview-ui/types.d.ts.map +0 -1
  289. package/lib/webview-ui/types.js.map +0 -1
  290. package/lib/webview-ui/utils/cos.d.ts.map +0 -1
  291. package/lib/webview-ui/utils/cos.js.map +0 -1
  292. package/lib/webview-ui/utils/env-helper.d.ts.map +0 -1
  293. package/lib/webview-ui/utils/env-helper.js.map +0 -1
  294. package/lib/webview-ui/utils/http-client.d.ts.map +0 -1
  295. package/lib/webview-ui/utils/http-client.js.map +0 -1
  296. package/lib/webview-ui/utils/stream-text-handler.d.ts.map +0 -1
  297. package/lib/webview-ui/utils/stream-text-handler.js.map +0 -1
  298. package/lib/webview-ui/utils/upload.d.ts.map +0 -1
  299. package/lib/webview-ui/utils/upload.js.map +0 -1
  300. package/lib/webview-ui/widgets/BubbleComponents.d.ts.map +0 -1
  301. package/lib/webview-ui/widgets/BubbleComponents.js.map +0 -1
  302. package/lib/webview-ui/widgets/ChatInput.d.ts.map +0 -1
  303. package/lib/webview-ui/widgets/ChatInput.js.map +0 -1
  304. package/lib/webview-ui/widgets/LogPanel.d.ts.map +0 -1
  305. package/lib/webview-ui/widgets/LogPanel.js.map +0 -1
  306. package/lib/webview-ui/widgets/SystemLogs.d.ts.map +0 -1
  307. package/lib/webview-ui/widgets/SystemLogs.js.map +0 -1
  308. package/lib/webview-ui/widgets/ToolBar.d.ts.map +0 -1
  309. package/lib/webview-ui/widgets/ToolBar.js.map +0 -1
  310. package/lib/webview-ui/widgets/index.d.ts.map +0 -1
  311. package/lib/webview-ui/widgets/index.js.map +0 -1
@@ -80,4 +80,3 @@ exports.uploadConfig = {
80
80
  "application/vnd.openxmlformats-officedocument.presentationml.presentation": "document",
81
81
  },
82
82
  };
83
- //# sourceMappingURL=cos-config.js.map
@@ -5,4 +5,3 @@ export interface HttpDefaultConfig {
5
5
  }
6
6
  export declare function getHttpConfig(): HttpDefaultConfig;
7
7
  export declare function updateHttpConfig(partial: Partial<HttpDefaultConfig>): void;
8
- //# sourceMappingURL=http-config.d.ts.map
@@ -33,4 +33,3 @@ function updateHttpConfig(partial) {
33
33
  },
34
34
  };
35
35
  }
36
- //# sourceMappingURL=http-config.js.map
@@ -15,4 +15,3 @@ export declare const MOCK_SUGGESTIONS: ({
15
15
  export declare const MOCK_QUESTIONS: string[];
16
16
  export declare const AGENT_PLACEHOLDER = "Generating content, please wait...";
17
17
  export declare const LOG_PANEL_HEIGHT = 480;
18
- //# sourceMappingURL=constants.d.ts.map
@@ -22,4 +22,3 @@ exports.MOCK_QUESTIONS = [
22
22
  ];
23
23
  exports.AGENT_PLACEHOLDER = "Generating content, please wait...";
24
24
  exports.LOG_PANEL_HEIGHT = 480;
25
- //# sourceMappingURL=constants.js.map
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import type React from "react";
2
2
  import type { AgentSimulatorInfo } from "../services/agent-service";
3
3
  interface AgentContextValue {
4
4
  agentSimulatorInfo: AgentSimulatorInfo | null;
@@ -10,4 +10,3 @@ interface AgentProviderProps {
10
10
  export declare const AgentProvider: React.FC<AgentProviderProps>;
11
11
  export declare function useAgentInfo(): AgentContextValue;
12
12
  export {};
13
- //# sourceMappingURL=AgentContext.d.ts.map
@@ -16,4 +16,3 @@ function useAgentInfo() {
16
16
  }
17
17
  return ctx;
18
18
  }
19
- //# sourceMappingURL=AgentContext.js.map
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from "react";
1
+ import type React from "react";
2
+ import { type ReactNode } from "react";
2
3
  import { type LoginInfo } from "../services/agent-service";
3
4
  interface AuthContextType {
4
5
  isLoggedIn: boolean;
@@ -14,4 +15,3 @@ interface AuthProviderProps {
14
15
  export declare const AuthProvider: React.FC<AuthProviderProps>;
15
16
  export declare const useAuth: () => AuthContextType;
16
17
  export {};
17
- //# sourceMappingURL=AuthContext.d.ts.map
@@ -101,4 +101,3 @@ const useAuth = () => {
101
101
  return context;
102
102
  };
103
103
  exports.useAuth = useAuth;
104
- //# sourceMappingURL=AuthContext.js.map
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from "react";
1
+ import type React from "react";
2
+ import { type ReactNode } from "react";
2
3
  interface ThemeContextType {
3
4
  isDark: boolean;
4
5
  }
@@ -9,4 +10,3 @@ interface ThemeProviderProps {
9
10
  export declare const ThemeProvider: React.FC<ThemeProviderProps>;
10
11
  export declare const useThemeHook: () => ThemeContextType;
11
12
  export {};
12
- //# sourceMappingURL=ThemeContext.d.ts.map
@@ -18,4 +18,3 @@ const useThemeHook = () => {
18
18
  return context;
19
19
  };
20
20
  exports.useThemeHook = useThemeHook;
21
- //# sourceMappingURL=ThemeContext.js.map
@@ -1,11 +1,14 @@
1
- import { type AgentSimulatorInfo } from "../services/agent-service";
1
+ import { type AgentSimulatorInfo, type FunctionMeta } from "../services/agent-service";
2
2
  export type DebugStatusType = "normal" | "stopped" | "error" | "connecting" | "timeout";
3
+ export type FunctionMode = "agent" | "websocket";
3
4
  interface UseAgentStatusReturn {
4
5
  agentSimulatorInfo: AgentSimulatorInfo | null;
5
6
  debugStatus: DebugStatusType;
6
7
  isConnecting: boolean;
7
8
  error: string | null;
8
9
  retryConnection: () => void;
10
+ functionMode: FunctionMode;
11
+ functionMeta: FunctionMeta | null;
9
12
  }
10
13
  /**
11
14
  * Agent 状态管理 Hook
@@ -14,4 +17,3 @@ interface UseAgentStatusReturn {
14
17
  */
15
18
  export declare const useAgentStatus: (pollInterval?: number) => UseAgentStatusReturn;
16
19
  export {};
17
- //# sourceMappingURL=useAgentStatus.d.ts.map
@@ -13,6 +13,8 @@ const useAgentStatus = (pollInterval = 5000) => {
13
13
  const [debugStatus, setDebugStatus] = (0, react_1.useState)("connecting");
14
14
  const [isConnecting, setIsConnecting] = (0, react_1.useState)(true);
15
15
  const [error, setError] = (0, react_1.useState)(null);
16
+ const [functionMode, setFunctionMode] = (0, react_1.useState)("agent");
17
+ const [functionMeta, setFunctionMeta] = (0, react_1.useState)(null);
16
18
  const pollTimerRef = (0, react_1.useRef)(null);
17
19
  const timeoutRef = (0, react_1.useRef)(null);
18
20
  /**
@@ -44,6 +46,21 @@ const useAgentStatus = (pollInterval = 5000) => {
44
46
  setError(err instanceof Error ? err.message : "检查 Agent 状态失败");
45
47
  }
46
48
  }, []);
49
+ /**
50
+ * 获取函数能力元数据,自动识别是否为 WebSocket 函数
51
+ */
52
+ const fetchFunctionMeta = (0, react_1.useCallback)(async () => {
53
+ try {
54
+ const meta = await agent_service_1.apiService.getFunctionMeta();
55
+ setFunctionMeta(meta);
56
+ const hasWebSocket = meta.functions?.some((fn) => fn.features?.websocket);
57
+ setFunctionMode(hasWebSocket ? "websocket" : "agent");
58
+ }
59
+ catch {
60
+ setFunctionMeta(null);
61
+ setFunctionMode("agent");
62
+ }
63
+ }, []);
47
64
  /**
48
65
  * 设置连接超时
49
66
  */
@@ -87,9 +104,9 @@ const useAgentStatus = (pollInterval = 5000) => {
87
104
  setDebugStatus("connecting");
88
105
  setError(null);
89
106
  startTimeout();
90
- await Promise.all([fetchAgentInfo(), fetchAgentStatus()]);
107
+ await Promise.all([fetchAgentInfo(), fetchAgentStatus(), fetchFunctionMeta()]);
91
108
  clearTimeoutRef();
92
- }, [fetchAgentInfo, fetchAgentStatus, startTimeout, clearTimeoutRef]);
109
+ }, [fetchAgentInfo, fetchAgentStatus, fetchFunctionMeta, startTimeout, clearTimeoutRef]);
93
110
  /**
94
111
  * 初始化
95
112
  */
@@ -98,20 +115,29 @@ const useAgentStatus = (pollInterval = 5000) => {
98
115
  setDebugStatus("connecting");
99
116
  setError(null);
100
117
  startTimeout();
101
- Promise.all([fetchAgentInfo(), fetchAgentStatus()]).then(clearTimeoutRef);
118
+ Promise.all([fetchAgentInfo(), fetchAgentStatus(), fetchFunctionMeta()]).then(clearTimeoutRef);
102
119
  startPolling();
103
120
  return () => {
104
121
  stopPolling();
105
122
  clearTimeoutRef();
106
123
  };
107
- }, [fetchAgentInfo, fetchAgentStatus, startPolling, stopPolling, startTimeout, clearTimeoutRef]);
124
+ }, [
125
+ fetchAgentInfo,
126
+ fetchAgentStatus,
127
+ fetchFunctionMeta,
128
+ startPolling,
129
+ stopPolling,
130
+ startTimeout,
131
+ clearTimeoutRef,
132
+ ]);
108
133
  return {
109
134
  agentSimulatorInfo,
110
135
  debugStatus,
111
136
  isConnecting,
112
137
  error,
113
138
  retryConnection,
139
+ functionMode,
140
+ functionMeta,
114
141
  };
115
142
  };
116
143
  exports.useAgentStatus = useAgentStatus;
117
- //# sourceMappingURL=useAgentStatus.js.map
@@ -16,4 +16,3 @@ export declare function useUploader(options?: UseUploaderOptions): {
16
16
  pauseTask: (tempId: string) => void;
17
17
  resumeTask: (tempId: string) => void;
18
18
  };
19
- //# sourceMappingURL=useUploader.d.ts.map
@@ -98,7 +98,11 @@ function useUploader(options) {
98
98
  })
99
99
  .catch((e) => {
100
100
  const error = e instanceof Error ? e : new Error(e?.message || "上传失败");
101
- const errorItem = { ...temp, status: "error", errorMessage: error.message };
101
+ const errorItem = {
102
+ ...temp,
103
+ status: "error",
104
+ errorMessage: error.message,
105
+ };
102
106
  callbacks?.onError?.(error, errorItem);
103
107
  antd_1.message.error(`${file.name} 上传失败: ${error.message}`);
104
108
  return errorItem;
@@ -129,4 +133,3 @@ function useUploader(options) {
129
133
  };
130
134
  return { uploadFiles, cancelTask, pauseTask, resumeTask };
131
135
  }
132
- //# sourceMappingURL=useUploader.js.map
@@ -25,4 +25,3 @@ export declare const useUserAvatar: () => {
25
25
  hasUserAvatar: boolean;
26
26
  userName: string | undefined;
27
27
  };
28
- //# sourceMappingURL=useUserAvatar.d.ts.map
@@ -71,4 +71,3 @@ const useUserAvatar = () => {
71
71
  };
72
72
  };
73
73
  exports.useUserAvatar = useUserAvatar;
74
- //# sourceMappingURL=useUserAvatar.js.map
@@ -1,3 +1,3 @@
1
+ import "highlight.js/styles/foundation.min.css";
1
2
  import "./styles.css";
2
3
  export { default as App } from "./App";
3
- //# sourceMappingURL=index.d.ts.map
@@ -7,6 +7,7 @@ exports.App = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const client_1 = __importDefault(require("react-dom/client"));
9
9
  const App_1 = __importDefault(require("./App"));
10
+ require("highlight.js/styles/foundation.min.css");
10
11
  require("./styles.css"); // 导入样式
11
12
  const rootElement = document.getElementById("root");
12
13
  if (!rootElement)
@@ -14,4 +15,3 @@ if (!rootElement)
14
15
  client_1.default.createRoot(rootElement).render((0, jsx_runtime_1.jsx)(App_1.default, {}));
15
16
  var App_2 = require("./App");
16
17
  Object.defineProperty(exports, "App", { enumerable: true, get: function () { return __importDefault(App_2).default; } });
17
- //# sourceMappingURL=index.js.map
@@ -25,6 +25,16 @@ export interface AgentStatus {
25
25
  baseUrl: string;
26
26
  };
27
27
  }
28
+ export interface FunctionFeatures {
29
+ websocket: boolean;
30
+ }
31
+ export interface FunctionMetaItem {
32
+ name: string;
33
+ features: FunctionFeatures;
34
+ }
35
+ export interface FunctionMeta {
36
+ functions: FunctionMetaItem[];
37
+ }
28
38
  export interface LoginInfo {
29
39
  secret_id: string;
30
40
  cli_token: string;
@@ -58,6 +68,10 @@ declare class ApiService {
58
68
  * 获取 Agent 状态
59
69
  */
60
70
  getAgentStatus(): Promise<AgentStatus>;
71
+ /**
72
+ * 获取函数能力元数据(检测 WebSocket 等特性)
73
+ */
74
+ getFunctionMeta(): Promise<FunctionMeta>;
61
75
  /**
62
76
  * 获取认证状态
63
77
  */
@@ -121,4 +135,3 @@ declare class ApiService {
121
135
  }
122
136
  export declare const apiService: ApiService;
123
137
  export {};
124
- //# sourceMappingURL=agent-service.d.ts.map
@@ -20,6 +20,13 @@ class ApiService {
20
20
  const data = await http_client_1.httpClient.get(`/api/agent/info/status`);
21
21
  return data;
22
22
  }
23
+ /**
24
+ * 获取函数能力元数据(检测 WebSocket 等特性)
25
+ */
26
+ async getFunctionMeta() {
27
+ const data = await http_client_1.httpClient.get(`/api/agent/meta`);
28
+ return data;
29
+ }
23
30
  /**
24
31
  * 获取认证状态
25
32
  */
@@ -77,4 +84,3 @@ class ApiService {
77
84
  }
78
85
  }
79
86
  exports.apiService = new ApiService();
80
- //# sourceMappingURL=agent-service.js.map
@@ -1,3 +1,2 @@
1
1
  export * from "./agent-service";
2
2
  export * from "./logger-service";
3
- //# sourceMappingURL=index.d.ts.map
@@ -16,4 +16,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./agent-service"), exports);
18
18
  __exportStar(require("./logger-service"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -43,4 +43,3 @@ export declare class LoggerService {
43
43
  }): Promise<PaginatedLogResponse>;
44
44
  formatLogEntry(entry: LogEntry): string;
45
45
  }
46
- //# sourceMappingURL=logger-service.d.ts.map
@@ -66,4 +66,3 @@ class LoggerService {
66
66
  }
67
67
  }
68
68
  exports.LoggerService = LoggerService;
69
- //# sourceMappingURL=logger-service.js.map
@@ -11,4 +11,3 @@ export declare const useCopilotStyle: (props?: unknown) => import("antd-style").
11
11
  speechButton: import("antd-style").SerializedStyles;
12
12
  markdownContent: import("antd-style").SerializedStyles;
13
13
  }>;
14
- //# sourceMappingURL=copilot.d.ts.map
@@ -28,6 +28,10 @@ exports.useCopilotStyle = (0, antd_style_1.createStyles)(({ token, css }) => {
28
28
  overflow: auto;
29
29
  padding-block: 16px;
30
30
  flex: 1;
31
+
32
+ .embed-ide & {
33
+ padding-block: 8px;
34
+ }
31
35
  `,
32
36
  chatWelcome: css `
33
37
  margin-inline: 16px;
@@ -54,24 +58,40 @@ exports.useCopilotStyle = (0, antd_style_1.createStyles)(({ token, css }) => {
54
58
  font-size: 18px;
55
59
  color: ${token.colorText} !important;
56
60
  `,
61
+ /* 使用 & 使选择器作用于挂载该 class 的同一 div(即 .markdown-content 容器),否则 .markdown-content table 无法匹配 */
57
62
  markdownContent: css `
58
- .markdown-content {
63
+ & {
59
64
  will-change: contents;
60
65
  contain: content;
66
+ line-height: 1.65;
67
+ }
61
68
 
62
- /* 优化代码块样式 */
63
- pre {
64
- background: ${token.colorBgTextHover};
65
- padding: 12px;
66
- border-radius: 6px;
67
- margin: 8px 0;
68
- }
69
+ /* 段落:适度段间距与行高,避免挤在一起 */
70
+ p {
71
+ margin: 0 0 0.85em;
72
+ line-height: 1.65;
73
+ }
74
+ p:last-child {
75
+ margin-bottom: 0;
76
+ }
69
77
 
70
- /* 优化列表样式 */
71
- ul, ol {
72
- padding-left: 20px;
73
- margin: 8px 0;
74
- }
78
+ /* 优化代码块样式 */
79
+ pre {
80
+ background: ${token.colorBgTextHover};
81
+ padding: 12px;
82
+ border-radius: 6px;
83
+ margin: 10px 0;
84
+ }
85
+
86
+ /* 优化列表样式:列表块与列表项留出间距 */
87
+ ul, ol {
88
+ padding-left: 20px;
89
+ margin: 10px 0;
90
+ }
91
+ li {
92
+ margin-bottom: 0.35em;
93
+ line-height: 1.6;
94
+ }
75
95
 
76
96
  /* 优化引用样式 */
77
97
  blockquote {
@@ -91,29 +111,67 @@ exports.useCopilotStyle = (0, antd_style_1.createStyles)(({ token, css }) => {
91
111
  }
92
112
  }
93
113
 
94
- /* 优化标题样式 */
114
+ /* 优化标题样式:层级清晰、段前段后留白 */
95
115
  h1, h2, h3, h4, h5, h6 {
96
- margin: 16px 0 8px;
116
+ margin: 1em 0 0.5em;
97
117
  font-weight: 600;
118
+ color: ${token.colorTextHeading};
119
+ line-height: 1.4;
120
+ }
121
+ h1:first-child, h2:first-child, h3:first-child,
122
+ h4:first-child, h5:first-child, h6:first-child {
123
+ margin-top: 0;
124
+ }
125
+ h1 { font-size: 1.25em; }
126
+ h2 { font-size: 1.15em; }
127
+ h3 { font-size: 1.05em; }
128
+ h4, h5, h6 { font-size: 1em; }
129
+
130
+ /* 分割线:细线、主题色,不突兀 */
131
+ hr {
132
+ border: none;
133
+ border-top: 1px solid ${token.colorBorderSecondary};
134
+ margin: 14px 0;
98
135
  }
99
136
 
100
- /* 优化表格样式 */
137
+ /* 表格:圆角、浅边框、表头与斑马纹 */
101
138
  table {
102
139
  border-collapse: collapse;
103
140
  width: 100%;
104
- margin: 8px 0;
141
+ margin: 10px 0;
142
+ border-radius: 8px;
143
+ overflow: hidden;
144
+ font-size: inherit;
145
+ box-sizing: border-box;
105
146
 
106
147
  th, td {
107
- border: 1px solid ${token.colorBorder};
108
- padding: 8px;
148
+ padding: 8px 12px;
149
+ text-align: left;
150
+ border: 1px solid ${token.colorBorderSecondary};
151
+ box-sizing: border-box;
152
+ word-wrap: break-word;
153
+ overflow-wrap: break-word;
109
154
  }
110
155
 
111
- th {
156
+ thead th {
157
+ background: ${token.colorBgTextHover};
158
+ font-weight: 600;
159
+ color: ${token.colorTextHeading};
160
+ border-bottom: 1px solid ${token.colorBorder};
161
+ }
162
+
163
+ tbody td {
164
+ background: ${token.colorBgContainer};
165
+ }
166
+
167
+ tbody tr:nth-child(even) td {
168
+ background: ${token.colorBgLayout};
169
+ }
170
+
171
+ tbody tr:hover td {
112
172
  background: ${token.colorBgTextHover};
113
173
  }
114
174
  }
115
- }
116
175
  `,
117
176
  };
118
177
  });
119
- //# sourceMappingURL=copilot.js.map
@@ -8,4 +8,3 @@ export declare const useWorkareaStyle: (props?: unknown) => import("antd-style")
8
8
  bodyContent: import("antd-style").SerializedStyles;
9
9
  bodyText: import("antd-style").SerializedStyles;
10
10
  }>;
11
- //# sourceMappingURL=workarea.d.ts.map
@@ -6,11 +6,17 @@ exports.useWorkareaStyle = (0, antd_style_1.createStyles)(({ token, css }) => {
6
6
  return {
7
7
  copilotWrapper: css `
8
8
  max-width: 800px;
9
- min-width: 300px;
9
+ min-width: 0;
10
10
  width: 100%;
11
11
  height: 100vh;
12
12
  display: flex;
13
13
  margin: 0 auto;
14
+
15
+ /* 嵌入 IDE 时去掉最大宽度限制,充满面板 */
16
+ &.embed-ide {
17
+ max-width: 100%;
18
+ margin: 0;
19
+ }
14
20
  `,
15
21
  workarea: css `
16
22
  flex: 1;
@@ -70,4 +76,3 @@ exports.useWorkareaStyle = (0, antd_style_1.createStyles)(({ token, css }) => {
70
76
  `,
71
77
  };
72
78
  });
73
- //# sourceMappingURL=workarea.js.map
@@ -12,10 +12,17 @@ export interface MultimodalFile {
12
12
  fileSource?: "standard" | "openai";
13
13
  fileId?: string;
14
14
  purpose?: string;
15
+ metadata?: Record<string, any>;
16
+ }
17
+ /** 消息内单段内容 */
18
+ export interface MessagePart {
19
+ type: "text" | "image" | "video" | "audio";
20
+ content: string;
21
+ metadata?: Record<string, any>;
15
22
  }
16
23
  export interface ChatMessage {
17
24
  id: string;
18
- type: "function_call" | "function_call_response" | "knowledge_base_search" | "knowledge_base_search_response" | "async_task" | "image" | "video" | "answer" | "thinking" | "timeout" | "interrupted" | "uiDiscard" | "error";
25
+ type: "composite" | "function_call" | "function_call_response" | "knowledge_base_search" | "knowledge_base_search_response" | "async_task" | "image" | "video" | "audio" | "answer" | "thinking" | "timeout" | "interrupted" | "uiDiscard" | "error";
19
26
  content: string;
20
27
  isThinking?: boolean;
21
28
  isTimeout?: boolean;
@@ -40,6 +47,9 @@ export interface ChatMessage {
40
47
  [key: string]: any;
41
48
  }>;
42
49
  files?: MultimodalFile[];
50
+ /** 多段内容(存在时按顺序渲染,兼容图文混排、多图等) */
51
+ parts?: MessagePart[];
52
+ metadata?: Record<string, any>;
43
53
  }
44
54
  export interface ChatHistoryProps {
45
55
  messages: ChatMessage[];
@@ -62,4 +72,3 @@ export interface MessageProps {
62
72
  message: ChatMessage;
63
73
  onRetry?: (messageId: string) => void;
64
74
  }
65
- //# sourceMappingURL=types.d.ts.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -62,4 +62,3 @@ export declare class Uploader {
62
62
  }): Promise<UploadResponse>;
63
63
  }
64
64
  export {};
65
- //# sourceMappingURL=cos.d.ts.map
@@ -16,14 +16,16 @@ class Uploader {
16
16
  this.getToken = args.getToken;
17
17
  this.enableResume = args.enableResume;
18
18
  }
19
- getPermit(file, fileInfo, fileFormat, persistentOps, persistentNotifyUrl) {
19
+ getPermit(_file, fileInfo, _fileFormat, persistentOps, persistentNotifyUrl) {
20
20
  return this.getToken().then(({ uploadTempPermits, uploadLimitPolicy }) => {
21
21
  const fileType = fileInfo.type;
22
22
  const fileSize = fileInfo.size;
23
23
  if (uploadLimitPolicy) {
24
24
  const { fileTypes, maxSize } = uploadLimitPolicy;
25
25
  if (fileTypes?.length &&
26
- !fileTypes.reduce((a, c) => [...a, ...c.split("/")], []).some((f) => fileType.endsWith(f))) {
26
+ !fileTypes
27
+ .reduce((a, c) => [...a, ...c.split("/")], [])
28
+ .some((f) => fileType.endsWith(f))) {
27
29
  throw new Error(`文件类型 ${fileType} 不在可上传的文件类型 ${fileTypes.join(", ")} 中。`);
28
30
  }
29
31
  if (maxSize !== undefined && fileSize > maxSize) {
@@ -110,4 +112,3 @@ class Uploader {
110
112
  }
111
113
  }
112
114
  exports.Uploader = Uploader;
113
- //# sourceMappingURL=cos.js.map
@@ -3,4 +3,9 @@
3
3
  * 判断当前是否运行在 IDE(Electron)环境中
4
4
  */
5
5
  export declare const isIDE: () => boolean;
6
- //# sourceMappingURL=env-helper.d.ts.map
6
+ /**
7
+ * 判断当前是否以嵌入模式运行在 Web IDE 中(通过 iframe 嵌入)。
8
+ * 当使用 `rcb agent dev --use-ide` 时,模拟器会以 iframe 形式嵌入到 Web IDE 的右侧面板,
9
+ * 此时 URL 会携带 `embed=ide` 参数。
10
+ */
11
+ export declare const isEmbeddedInIde: () => boolean;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isIDE = void 0;
3
+ exports.isEmbeddedInIde = exports.isIDE = void 0;
4
4
  /**
5
5
  * 前端环境判断工具
6
6
  * 判断当前是否运行在 IDE(Electron)环境中
@@ -10,4 +10,18 @@ const isIDE = () => {
10
10
  return typeof require === "function";
11
11
  };
12
12
  exports.isIDE = isIDE;
13
- //# sourceMappingURL=env-helper.js.map
13
+ /**
14
+ * 判断当前是否以嵌入模式运行在 Web IDE 中(通过 iframe 嵌入)。
15
+ * 当使用 `rcb agent dev --use-ide` 时,模拟器会以 iframe 形式嵌入到 Web IDE 的右侧面板,
16
+ * 此时 URL 会携带 `embed=ide` 参数。
17
+ */
18
+ const isEmbeddedInIde = () => {
19
+ try {
20
+ const params = new URLSearchParams(window.location.search);
21
+ return params.get("embed") === "ide";
22
+ }
23
+ catch {
24
+ return false;
25
+ }
26
+ };
27
+ exports.isEmbeddedInIde = isEmbeddedInIde;
@@ -1,4 +1,4 @@
1
- import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
1
+ import { type AxiosInstance, type AxiosRequestConfig, type AxiosResponse } from "axios";
2
2
  export interface HttpClientConfig {
3
3
  baseURL?: string;
4
4
  timeout?: number;
@@ -41,4 +41,3 @@ export declare class HttpClient {
41
41
  }
42
42
  export declare const httpClient: HttpClient;
43
43
  export type { AxiosRequestConfig, AxiosResponse };
44
- //# sourceMappingURL=http-client.d.ts.map
@@ -98,4 +98,3 @@ class HttpClient {
98
98
  }
99
99
  exports.HttpClient = HttpClient;
100
100
  exports.httpClient = new HttpClient();
101
- //# sourceMappingURL=http-client.js.map
@@ -0,0 +1,3 @@
1
+ import MarkdownIt from "markdown-it";
2
+ /** 带代码高亮的 markdown-it 实例,供 MarkdownRenderer 等使用 */
3
+ export declare const mdWithHighlight: MarkdownIt;