@ranker/raxflow 0.2.2 → 0.2.3

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 (378) hide show
  1. package/dist/benchmark.d.ts +10 -0
  2. package/dist/benchmark.d.ts.map +1 -0
  3. package/dist/benchmark.js +123 -0
  4. package/dist/benchmark.js.map +1 -0
  5. package/dist/bin.d.ts +3 -0
  6. package/dist/bin.d.ts.map +1 -0
  7. package/dist/bin.js +141 -0
  8. package/dist/bin.js.map +1 -0
  9. package/dist/bootstrap.d.ts +8 -0
  10. package/dist/bootstrap.d.ts.map +1 -0
  11. package/dist/bootstrap.js +22 -0
  12. package/dist/bootstrap.js.map +1 -0
  13. package/dist/bridge-adapter-templates.d.ts +4 -0
  14. package/dist/bridge-adapter-templates.d.ts.map +1 -0
  15. package/dist/bridge-adapter-templates.js +185 -0
  16. package/dist/bridge-adapter-templates.js.map +1 -0
  17. package/dist/bridge-test.d.ts +7 -0
  18. package/dist/bridge-test.d.ts.map +1 -0
  19. package/dist/bridge-test.js +89 -0
  20. package/dist/bridge-test.js.map +1 -0
  21. package/dist/dashboard.d.ts +4 -0
  22. package/dist/dashboard.d.ts.map +1 -0
  23. package/{src/dashboard.ts → dist/dashboard.js} +8 -10
  24. package/dist/dashboard.js.map +1 -0
  25. package/dist/doctor.d.ts +6 -0
  26. package/dist/doctor.d.ts.map +1 -0
  27. package/dist/doctor.js +70 -0
  28. package/dist/doctor.js.map +1 -0
  29. package/dist/evolve.d.ts +7 -0
  30. package/dist/evolve.d.ts.map +1 -0
  31. package/{src/evolve.ts → dist/evolve.js} +7 -33
  32. package/dist/evolve.js.map +1 -0
  33. package/dist/host-init-templates.d.ts +16 -0
  34. package/dist/host-init-templates.d.ts.map +1 -0
  35. package/dist/host-init-templates.js +119 -0
  36. package/dist/host-init-templates.js.map +1 -0
  37. package/dist/hub/__tests__/commands.test.d.ts +2 -0
  38. package/dist/hub/__tests__/commands.test.d.ts.map +1 -0
  39. package/dist/hub/__tests__/commands.test.js +72 -0
  40. package/dist/hub/__tests__/commands.test.js.map +1 -0
  41. package/dist/hub/__tests__/history.test.d.ts +2 -0
  42. package/dist/hub/__tests__/history.test.d.ts.map +1 -0
  43. package/dist/hub/__tests__/history.test.js +119 -0
  44. package/dist/hub/__tests__/history.test.js.map +1 -0
  45. package/dist/hub/__tests__/parser.test.d.ts +2 -0
  46. package/dist/hub/__tests__/parser.test.d.ts.map +1 -0
  47. package/dist/hub/__tests__/parser.test.js +92 -0
  48. package/dist/hub/__tests__/parser.test.js.map +1 -0
  49. package/dist/hub/commands/agents.d.ts +3 -0
  50. package/dist/hub/commands/agents.d.ts.map +1 -0
  51. package/dist/hub/commands/agents.js +36 -0
  52. package/dist/hub/commands/agents.js.map +1 -0
  53. package/dist/hub/commands/index.d.ts +4 -0
  54. package/dist/hub/commands/index.d.ts.map +1 -0
  55. package/dist/hub/commands/index.js +123 -0
  56. package/dist/hub/commands/index.js.map +1 -0
  57. package/dist/hub/commands/logs.d.ts +3 -0
  58. package/dist/hub/commands/logs.d.ts.map +1 -0
  59. package/dist/hub/commands/logs.js +53 -0
  60. package/dist/hub/commands/logs.js.map +1 -0
  61. package/dist/hub/commands/memory.d.ts +3 -0
  62. package/dist/hub/commands/memory.d.ts.map +1 -0
  63. package/dist/hub/commands/memory.js +40 -0
  64. package/dist/hub/commands/memory.js.map +1 -0
  65. package/dist/hub/commands/metrics.d.ts +3 -0
  66. package/dist/hub/commands/metrics.d.ts.map +1 -0
  67. package/dist/hub/commands/metrics.js +35 -0
  68. package/dist/hub/commands/metrics.js.map +1 -0
  69. package/dist/hub/commands/providers.d.ts +3 -0
  70. package/dist/hub/commands/providers.d.ts.map +1 -0
  71. package/dist/hub/commands/providers.js +26 -0
  72. package/dist/hub/commands/providers.js.map +1 -0
  73. package/dist/hub/commands/run.d.ts +3 -0
  74. package/dist/hub/commands/run.d.ts.map +1 -0
  75. package/dist/hub/commands/run.js +31 -0
  76. package/dist/hub/commands/run.js.map +1 -0
  77. package/dist/hub/commands/status.d.ts +3 -0
  78. package/dist/hub/commands/status.d.ts.map +1 -0
  79. package/dist/hub/commands/status.js +61 -0
  80. package/dist/hub/commands/status.js.map +1 -0
  81. package/dist/hub/commands/workflows.d.ts +3 -0
  82. package/dist/hub/commands/workflows.d.ts.map +1 -0
  83. package/dist/hub/commands/workflows.js +45 -0
  84. package/dist/hub/commands/workflows.js.map +1 -0
  85. package/dist/hub/config-loader.d.ts +4 -0
  86. package/dist/hub/config-loader.d.ts.map +1 -0
  87. package/dist/hub/config-loader.js +27 -0
  88. package/dist/hub/config-loader.js.map +1 -0
  89. package/dist/hub/event-listener.d.ts +6 -0
  90. package/dist/hub/event-listener.d.ts.map +1 -0
  91. package/dist/hub/event-listener.js +12 -0
  92. package/dist/hub/event-listener.js.map +1 -0
  93. package/dist/hub/history.d.ts +13 -0
  94. package/dist/hub/history.d.ts.map +1 -0
  95. package/dist/hub/history.js +59 -0
  96. package/dist/hub/history.js.map +1 -0
  97. package/dist/hub/index.d.ts +4 -0
  98. package/dist/hub/index.d.ts.map +1 -0
  99. package/dist/hub/index.js +114 -0
  100. package/dist/hub/index.js.map +1 -0
  101. package/dist/hub/parser.d.ts +4 -0
  102. package/dist/hub/parser.d.ts.map +1 -0
  103. package/dist/hub/parser.js +98 -0
  104. package/dist/hub/parser.js.map +1 -0
  105. package/dist/hub/styles/borders.d.ts +23 -0
  106. package/dist/hub/styles/borders.d.ts.map +1 -0
  107. package/dist/hub/styles/borders.js +64 -0
  108. package/dist/hub/styles/borders.js.map +1 -0
  109. package/dist/hub/styles/colors.d.ts +63 -0
  110. package/dist/hub/styles/colors.d.ts.map +1 -0
  111. package/dist/hub/styles/colors.js +115 -0
  112. package/dist/hub/styles/colors.js.map +1 -0
  113. package/dist/hub/styles/typography.d.ts +34 -0
  114. package/dist/hub/styles/typography.d.ts.map +1 -0
  115. package/dist/hub/styles/typography.js +60 -0
  116. package/dist/hub/styles/typography.js.map +1 -0
  117. package/dist/hub/types.d.ts +27 -0
  118. package/dist/hub/types.d.ts.map +1 -0
  119. package/dist/hub/types.js +2 -0
  120. package/dist/hub/types.js.map +1 -0
  121. package/dist/index.d.ts +11 -0
  122. package/dist/index.d.ts.map +1 -0
  123. package/{src/index.ts → dist/index.js} +1 -0
  124. package/dist/index.js.map +1 -0
  125. package/dist/init-host.d.ts +10 -0
  126. package/dist/init-host.d.ts.map +1 -0
  127. package/dist/init-host.js +232 -0
  128. package/dist/init-host.js.map +1 -0
  129. package/dist/install.d.ts +8 -0
  130. package/dist/install.d.ts.map +1 -0
  131. package/dist/install.js +99 -0
  132. package/dist/install.js.map +1 -0
  133. package/dist/run.d.ts +16 -0
  134. package/dist/run.d.ts.map +1 -0
  135. package/dist/run.js +238 -0
  136. package/dist/run.js.map +1 -0
  137. package/dist/setup/components/ApiKeyInput.d.ts +25 -0
  138. package/dist/setup/components/ApiKeyInput.d.ts.map +1 -0
  139. package/dist/setup/components/ApiKeyInput.js +54 -0
  140. package/dist/setup/components/ApiKeyInput.js.map +1 -0
  141. package/dist/setup/components/AsciiBanner.d.ts +22 -0
  142. package/dist/setup/components/AsciiBanner.d.ts.map +1 -0
  143. package/{src/setup/components/AsciiBanner.tsx → dist/setup/components/AsciiBanner.js} +24 -94
  144. package/dist/setup/components/AsciiBanner.js.map +1 -0
  145. package/dist/setup/components/CliDetector.d.ts +17 -0
  146. package/dist/setup/components/CliDetector.d.ts.map +1 -0
  147. package/dist/setup/components/CliDetector.js +79 -0
  148. package/dist/setup/components/CliDetector.js.map +1 -0
  149. package/dist/setup/components/ModeSelector.d.ts +8 -0
  150. package/dist/setup/components/ModeSelector.d.ts.map +1 -0
  151. package/dist/setup/components/ModeSelector.js +76 -0
  152. package/dist/setup/components/ModeSelector.js.map +1 -0
  153. package/dist/setup/components/ProviderSelector.d.ts +18 -0
  154. package/dist/setup/components/ProviderSelector.d.ts.map +1 -0
  155. package/dist/setup/components/ProviderSelector.js +98 -0
  156. package/dist/setup/components/ProviderSelector.js.map +1 -0
  157. package/dist/setup/components/SetupWizard.d.ts +2 -0
  158. package/dist/setup/components/SetupWizard.d.ts.map +1 -0
  159. package/dist/setup/components/SetupWizard.js +212 -0
  160. package/dist/setup/components/SetupWizard.js.map +1 -0
  161. package/dist/setup/components/StepIndicator.d.ts +13 -0
  162. package/dist/setup/components/StepIndicator.d.ts.map +1 -0
  163. package/dist/setup/components/StepIndicator.js +18 -0
  164. package/dist/setup/components/StepIndicator.js.map +1 -0
  165. package/dist/setup/components/SuccessScreen.d.ts +18 -0
  166. package/dist/setup/components/SuccessScreen.d.ts.map +1 -0
  167. package/dist/setup/components/SuccessScreen.js +38 -0
  168. package/dist/setup/components/SuccessScreen.js.map +1 -0
  169. package/dist/setup/index.d.ts +12 -0
  170. package/dist/setup/index.d.ts.map +1 -0
  171. package/{src/setup/index.ts → dist/setup/index.js} +14 -19
  172. package/dist/setup/index.js.map +1 -0
  173. package/dist/setup/utils/cli-detection.d.ts +12 -0
  174. package/dist/setup/utils/cli-detection.d.ts.map +1 -0
  175. package/dist/setup/utils/cli-detection.js +83 -0
  176. package/dist/setup/utils/cli-detection.js.map +1 -0
  177. package/dist/setup/utils/config-writer.d.ts +43 -0
  178. package/dist/setup/utils/config-writer.d.ts.map +1 -0
  179. package/dist/setup/utils/config-writer.js +180 -0
  180. package/dist/setup/utils/config-writer.js.map +1 -0
  181. package/dist/styles.d.ts +12 -0
  182. package/dist/styles.d.ts.map +1 -0
  183. package/dist/styles.js +12 -0
  184. package/dist/styles.js.map +1 -0
  185. package/dist/tui/App.d.ts +3 -0
  186. package/dist/tui/App.d.ts.map +1 -0
  187. package/dist/tui/App.js +136 -0
  188. package/dist/tui/App.js.map +1 -0
  189. package/dist/tui/components/AgentStateIcon.d.ts +18 -0
  190. package/dist/tui/components/AgentStateIcon.d.ts.map +1 -0
  191. package/dist/tui/components/AgentStateIcon.js +57 -0
  192. package/dist/tui/components/AgentStateIcon.js.map +1 -0
  193. package/dist/tui/components/AnimatedBranch.d.ts +39 -0
  194. package/dist/tui/components/AnimatedBranch.d.ts.map +1 -0
  195. package/dist/tui/components/AnimatedBranch.js +64 -0
  196. package/dist/tui/components/AnimatedBranch.js.map +1 -0
  197. package/dist/tui/components/ChatPanel.d.ts +17 -0
  198. package/dist/tui/components/ChatPanel.d.ts.map +1 -0
  199. package/dist/tui/components/ChatPanel.js +51 -0
  200. package/dist/tui/components/ChatPanel.js.map +1 -0
  201. package/dist/tui/components/DAGPanel.d.ts +37 -0
  202. package/dist/tui/components/DAGPanel.d.ts.map +1 -0
  203. package/dist/tui/components/DAGPanel.js +52 -0
  204. package/dist/tui/components/DAGPanel.js.map +1 -0
  205. package/dist/tui/components/ExecutionTimeline.d.ts +34 -0
  206. package/dist/tui/components/ExecutionTimeline.d.ts.map +1 -0
  207. package/dist/tui/components/ExecutionTimeline.js +67 -0
  208. package/dist/tui/components/ExecutionTimeline.js.map +1 -0
  209. package/dist/tui/components/Header.d.ts +12 -0
  210. package/dist/tui/components/Header.d.ts.map +1 -0
  211. package/dist/tui/components/Header.js +32 -0
  212. package/dist/tui/components/Header.js.map +1 -0
  213. package/dist/tui/components/HelpOverlay.d.ts +7 -0
  214. package/dist/tui/components/HelpOverlay.d.ts.map +1 -0
  215. package/dist/tui/components/HelpOverlay.js +60 -0
  216. package/dist/tui/components/HelpOverlay.js.map +1 -0
  217. package/dist/tui/components/InputBar.d.ts +10 -0
  218. package/dist/tui/components/InputBar.d.ts.map +1 -0
  219. package/dist/tui/components/InputBar.js +21 -0
  220. package/dist/tui/components/InputBar.js.map +1 -0
  221. package/dist/tui/components/LogsPanel.d.ts +10 -0
  222. package/dist/tui/components/MemoryPanel.d.ts +22 -0
  223. package/dist/tui/components/MetricsPanel.d.ts +19 -0
  224. package/dist/tui/components/StatusPanel.d.ts +24 -0
  225. package/dist/tui/components/TaskTree.d.ts +28 -0
  226. package/dist/tui/components/TaskTree.d.ts.map +1 -0
  227. package/dist/tui/components/TaskTree.js +29 -0
  228. package/dist/tui/components/TaskTree.js.map +1 -0
  229. package/dist/tui/components/animations/ProgressBar.d.ts +39 -0
  230. package/dist/tui/components/animations/ProgressBar.d.ts.map +1 -0
  231. package/dist/tui/components/animations/ProgressBar.js +39 -0
  232. package/dist/tui/components/animations/ProgressBar.js.map +1 -0
  233. package/dist/tui/components/animations/Pulse.d.ts +17 -0
  234. package/dist/tui/components/animations/Pulse.d.ts.map +1 -0
  235. package/dist/tui/components/animations/Pulse.js +47 -0
  236. package/dist/tui/components/animations/Pulse.js.map +1 -0
  237. package/dist/tui/components/animations/Spinner.d.ts +13 -0
  238. package/dist/tui/components/animations/Spinner.d.ts.map +1 -0
  239. package/dist/tui/components/animations/Spinner.js +36 -0
  240. package/dist/tui/components/animations/Spinner.js.map +1 -0
  241. package/dist/tui/components/animations/StatusAnimator.d.ts +27 -0
  242. package/dist/tui/components/animations/StatusAnimator.d.ts.map +1 -0
  243. package/dist/tui/components/animations/StatusAnimator.js +85 -0
  244. package/dist/tui/components/animations/StatusAnimator.js.map +1 -0
  245. package/dist/tui/components/animations/TypingEffect.d.ts +26 -0
  246. package/dist/tui/components/animations/TypingEffect.d.ts.map +1 -0
  247. package/dist/tui/components/animations/TypingEffect.js +59 -0
  248. package/dist/tui/components/animations/TypingEffect.js.map +1 -0
  249. package/{src/tui/components/animations/index.ts → dist/tui/components/animations/index.d.ts} +2 -10
  250. package/dist/tui/components/animations/index.d.ts.map +1 -0
  251. package/dist/tui/components/animations/index.js +6 -0
  252. package/dist/tui/components/animations/index.js.map +1 -0
  253. package/dist/tui/hooks/useAnimation.d.ts +42 -0
  254. package/dist/tui/hooks/useAnimation.d.ts.map +1 -0
  255. package/dist/tui/hooks/useAnimation.js +212 -0
  256. package/dist/tui/hooks/useAnimation.js.map +1 -0
  257. package/dist/tui/hooks/useAppState.d.ts +65 -0
  258. package/dist/tui/hooks/useAppState.d.ts.map +1 -0
  259. package/dist/tui/hooks/useAppState.js +293 -0
  260. package/dist/tui/hooks/useAppState.js.map +1 -0
  261. package/dist/tui/index.d.ts +3 -0
  262. package/dist/tui/index.d.ts.map +1 -0
  263. package/{src/tui/index.ts → dist/tui/index.js} +2 -3
  264. package/dist/tui/index.js.map +1 -0
  265. package/dist/tui/services/orchestrator.d.ts +16 -0
  266. package/dist/tui/services/orchestrator.d.ts.map +1 -0
  267. package/dist/tui/services/orchestrator.js +152 -0
  268. package/dist/tui/services/orchestrator.js.map +1 -0
  269. package/dist/tui/styles/borders.d.ts +31 -0
  270. package/dist/tui/styles/borders.d.ts.map +1 -0
  271. package/dist/tui/styles/borders.js +47 -0
  272. package/dist/tui/styles/borders.js.map +1 -0
  273. package/dist/tui/styles/colors.d.ts +18 -0
  274. package/dist/tui/styles/colors.d.ts.map +1 -0
  275. package/dist/tui/styles/colors.js +18 -0
  276. package/dist/tui/styles/colors.js.map +1 -0
  277. package/dist/tui/styles/index.d.ts +6 -0
  278. package/dist/tui/styles/index.d.ts.map +1 -0
  279. package/dist/tui/styles/index.js +6 -0
  280. package/dist/tui/styles/index.js.map +1 -0
  281. package/dist/tui/styles/indicators.d.ts +67 -0
  282. package/dist/tui/styles/indicators.d.ts.map +1 -0
  283. package/dist/tui/styles/indicators.js +42 -0
  284. package/dist/tui/styles/indicators.js.map +1 -0
  285. package/dist/tui/styles/layout.d.ts +21 -0
  286. package/dist/tui/styles/layout.d.ts.map +1 -0
  287. package/dist/tui/styles/layout.js +42 -0
  288. package/dist/tui/styles/layout.js.map +1 -0
  289. package/dist/tui/styles/providers.d.ts +77 -0
  290. package/dist/tui/styles/providers.d.ts.map +1 -0
  291. package/dist/tui/styles/providers.js +31 -0
  292. package/dist/tui/styles/providers.js.map +1 -0
  293. package/dist/tui/utils/animation.d.ts +44 -0
  294. package/dist/tui/utils/animation.d.ts.map +1 -0
  295. package/dist/tui/utils/animation.js +107 -0
  296. package/dist/tui/utils/animation.js.map +1 -0
  297. package/dist/vendor-manifests.d.ts +22 -0
  298. package/dist/vendor-manifests.d.ts.map +1 -0
  299. package/dist/vendor-manifests.js +94 -0
  300. package/dist/vendor-manifests.js.map +1 -0
  301. package/dist/ws-relay.d.ts +12 -0
  302. package/dist/ws-relay.d.ts.map +1 -0
  303. package/{src/ws-relay.ts → dist/ws-relay.js} +39 -47
  304. package/dist/ws-relay.js.map +1 -0
  305. package/package.json +5 -1
  306. package/dashboard/index.html +0 -420
  307. package/src/benchmark.ts +0 -156
  308. package/src/bin.ts +0 -156
  309. package/src/bootstrap.ts +0 -36
  310. package/src/bridge-adapter-templates.ts +0 -181
  311. package/src/bridge-test.ts +0 -107
  312. package/src/doctor.ts +0 -92
  313. package/src/host-init-templates.ts +0 -134
  314. package/src/hub/__tests__/commands.test.ts +0 -84
  315. package/src/hub/__tests__/history.test.ts +0 -137
  316. package/src/hub/__tests__/parser.test.ts +0 -105
  317. package/src/hub/commands/agents.ts +0 -53
  318. package/src/hub/commands/index.ts +0 -140
  319. package/src/hub/commands/logs.ts +0 -70
  320. package/src/hub/commands/memory.ts +0 -47
  321. package/src/hub/commands/metrics.ts +0 -49
  322. package/src/hub/commands/providers.ts +0 -39
  323. package/src/hub/commands/run.ts +0 -37
  324. package/src/hub/commands/status.ts +0 -69
  325. package/src/hub/commands/workflows.ts +0 -64
  326. package/src/hub/config-loader.ts +0 -37
  327. package/src/hub/event-listener.ts +0 -17
  328. package/src/hub/history.ts +0 -66
  329. package/src/hub/index.ts +0 -132
  330. package/src/hub/parser.ts +0 -107
  331. package/src/hub/styles/borders.ts +0 -74
  332. package/src/hub/styles/colors.ts +0 -129
  333. package/src/hub/styles/typography.ts +0 -68
  334. package/src/hub/types.ts +0 -31
  335. package/src/init-host.ts +0 -285
  336. package/src/install.ts +0 -118
  337. package/src/run.ts +0 -317
  338. package/src/setup/components/ApiKeyInput.tsx +0 -158
  339. package/src/setup/components/CliDetector.tsx +0 -230
  340. package/src/setup/components/ModeSelector.tsx +0 -137
  341. package/src/setup/components/ProviderSelector.tsx +0 -175
  342. package/src/setup/components/SetupWizard.tsx +0 -368
  343. package/src/setup/components/StepIndicator.tsx +0 -74
  344. package/src/setup/components/SuccessScreen.tsx +0 -229
  345. package/src/setup/utils/cli-detection.ts +0 -99
  346. package/src/setup/utils/config-writer.ts +0 -249
  347. package/src/styles.ts +0 -12
  348. package/src/tui/App.tsx +0 -183
  349. package/src/tui/components/AgentStateIcon.tsx +0 -84
  350. package/src/tui/components/AnimatedBranch.tsx +0 -134
  351. package/src/tui/components/ChatPanel.tsx +0 -128
  352. package/src/tui/components/DAGPanel.tsx +0 -212
  353. package/src/tui/components/ExecutionTimeline.tsx +0 -225
  354. package/src/tui/components/Header.tsx +0 -109
  355. package/src/tui/components/HelpOverlay.tsx +0 -140
  356. package/src/tui/components/InputBar.tsx +0 -69
  357. package/src/tui/components/LogsPanel.tsx +0 -132
  358. package/src/tui/components/MemoryPanel.tsx +0 -166
  359. package/src/tui/components/MetricsPanel.tsx +0 -152
  360. package/src/tui/components/StatusPanel.tsx +0 -140
  361. package/src/tui/components/TaskTree.tsx +0 -159
  362. package/src/tui/components/animations/ProgressBar.tsx +0 -160
  363. package/src/tui/components/animations/Pulse.tsx +0 -73
  364. package/src/tui/components/animations/Spinner.tsx +0 -54
  365. package/src/tui/components/animations/StatusAnimator.tsx +0 -153
  366. package/src/tui/components/animations/TypingEffect.tsx +0 -119
  367. package/src/tui/hooks/useAnimation.ts +0 -290
  368. package/src/tui/hooks/useAppState.ts +0 -403
  369. package/src/tui/services/orchestrator.ts +0 -195
  370. package/src/tui/styles/borders.ts +0 -51
  371. package/src/tui/styles/colors.ts +0 -19
  372. package/src/tui/styles/index.ts +0 -20
  373. package/src/tui/styles/indicators.ts +0 -54
  374. package/src/tui/styles/layout.ts +0 -44
  375. package/src/tui/styles/providers.ts +0 -32
  376. package/src/tui/utils/animation.ts +0 -124
  377. package/src/vendor-manifests.ts +0 -113
  378. package/tsconfig.json +0 -28
@@ -1,134 +0,0 @@
1
- import React, { memo, useMemo } from "react";
2
- import { Box, Text } from "ink";
3
- import { tuiColors } from "../styles/index.js";
4
-
5
- const VERTICAL_PULSE_FRAMES = ["│", "┃", "│", "┃"];
6
- const HORIZONTAL_PULSE_FRAMES = ["─", "━", "─", "━"];
7
- const FLOW_FRAMES = ["◀═══▶", "═◀═══▶", "══◀══▶", "═══◀═▶", "════◀▶", "═▶═══◀", "══▶══◀", "═══▶═◀"];
8
-
9
- export type BranchType = 'vertical' | 'horizontal' | 'corner-left' | 'corner-right' | 'branch' | 'last-branch' | 'flow';
10
-
11
- interface AnimatedBranchProps {
12
- type: BranchType;
13
- tick?: number;
14
- animated?: boolean;
15
- length?: number;
16
- color?: string;
17
- }
18
-
19
- export const AnimatedBranch = memo(function AnimatedBranch({
20
- type,
21
- tick = 0,
22
- animated = true,
23
- length = 1,
24
- color
25
- }: AnimatedBranchProps) {
26
- const branchColor = color || tuiColors.textTertiary;
27
-
28
- const getFrame = (frames: string[]): string => {
29
- return frames[tick % frames.length];
30
- };
31
-
32
- const renderBranch = (): string => {
33
- switch (type) {
34
- case 'vertical':
35
- return animated ? getFrame(VERTICAL_PULSE_FRAMES) : "│";
36
- case 'horizontal':
37
- return animated ? getFrame(HORIZONTAL_PULSE_FRAMES).repeat(length) : "─".repeat(length);
38
- case 'corner-left':
39
- return "┌";
40
- case 'corner-right':
41
- return "┐";
42
- case 'branch':
43
- return "├─";
44
- case 'last-branch':
45
- return "└─";
46
- case 'flow':
47
- return animated ? getFrame(FLOW_FRAMES) : "◀═══▶";
48
- default:
49
- return "│";
50
- }
51
- };
52
-
53
- return <Text color={branchColor}>{renderBranch()}</Text>;
54
- });
55
-
56
- interface BranchLineProps {
57
- tick: number;
58
- animated?: boolean;
59
- length?: number;
60
- color?: string;
61
- }
62
-
63
- export const VerticalBranch = memo(function VerticalBranch({ tick, animated = true, length = 1, color }: BranchLineProps) {
64
- return <AnimatedBranch type="vertical" tick={tick} animated={animated} color={color} />;
65
- });
66
-
67
- export const HorizontalBranch = memo(function HorizontalBranch({ tick, animated = true, length = 1, color }: BranchLineProps) {
68
- return <AnimatedBranch type="horizontal" tick={tick} animated={animated} length={length} color={color} />;
69
- });
70
-
71
- export const BranchConnector = memo(function BranchConnector({ tick, animated = true, color }: BranchLineProps) {
72
- return <AnimatedBranch type="branch" tick={tick} animated={animated} color={color} />;
73
- });
74
-
75
- export const LastBranchConnector = memo(function LastBranchConnector({ tick, animated = true, color }: BranchLineProps) {
76
- return <AnimatedBranch type="last-branch" tick={tick} animated={animated} color={color} />;
77
- });
78
-
79
- export const FlowIndicator = memo(function FlowIndicator({ tick, animated = true, color }: BranchLineProps) {
80
- return <AnimatedBranch type="flow" tick={tick} animated={animated} color={color} />;
81
- });
82
-
83
- interface TaskBranchProps {
84
- tick: number;
85
- depth: number;
86
- isLast: boolean;
87
- hasChildren?: boolean;
88
- isExpanded?: boolean;
89
- color?: string;
90
- }
91
-
92
- export const TaskBranch = memo(function TaskBranch({ tick, depth, isLast, hasChildren = false, isExpanded = true, color }: TaskBranchProps) {
93
- const branchColor = color || tuiColors.textTertiary;
94
-
95
- if (depth === 0) {
96
- return null;
97
- }
98
-
99
- const indent = " ".repeat(depth - 1);
100
-
101
- return (
102
- <Box flexDirection="row">
103
- <Text color={branchColor}>{indent}</Text>
104
- <AnimatedBranch type={isLast ? "last-branch" : "branch"} tick={tick} color={branchColor} />
105
- </Box>
106
- );
107
- });
108
-
109
- interface AnimatedConnectorProps {
110
- tick: number;
111
- fromLevel: number;
112
- toLevel: number;
113
- isActive: boolean;
114
- }
115
-
116
- export const AnimatedConnector = memo(function AnimatedConnector({ tick, fromLevel, toLevel, isActive }: AnimatedConnectorProps) {
117
- const color = isActive ? tuiColors.primary : tuiColors.textTertiary;
118
- const rows = toLevel - fromLevel;
119
-
120
- const connectorElements = useMemo(() =>
121
- Array.from({ length: rows }).map((_, idx) => (
122
- <Box key={idx} paddingLeft={2}>
123
- <AnimatedBranch type="vertical" tick={tick} animated={isActive} color={color} />
124
- </Box>
125
- )),
126
- [rows, tick, isActive, color]
127
- );
128
-
129
- return (
130
- <Box flexDirection="column">
131
- {connectorElements}
132
- </Box>
133
- );
134
- });
@@ -1,128 +0,0 @@
1
- import React, { useState, useEffect, useMemo, memo, useCallback } from "react";
2
- import { Box, Text } from "ink";
3
- import { tuiColors, formatTimestamp, getProviderTag } from "../styles/index.js";
4
- import { TypingEffect, ProcessingIndicator } from "./animations/index.js";
5
-
6
- interface Message {
7
- id: string;
8
- type: "user" | "system" | "agent" | "error" | "success";
9
- content: string;
10
- timestamp: Date;
11
- agent?: string;
12
- }
13
-
14
- interface ChatPanelProps {
15
- messages: Message[];
16
- isProcessing: boolean;
17
- isActive: boolean;
18
- maxHeight?: number;
19
- }
20
-
21
- const MESSAGE_CONFIG: Record<string, { tag: string; color: string }> = {
22
- user: { tag: "[YOU]", color: tuiColors.textPrimary },
23
- system: { tag: "[SYS]", color: tuiColors.textTertiary },
24
- agent: { tag: "[AGENT]", color: tuiColors.primary },
25
- error: { tag: "[ERROR]", color: tuiColors.error },
26
- success: { tag: "[SUCCESS]", color: tuiColors.success },
27
- };
28
-
29
- const MAX_DISPLAYED_MESSAGES = 12;
30
- const TYPING_SPEED_PER_CHAR = 15;
31
- const TYPING_BUFFER_MS = 500;
32
-
33
- interface MessageItemProps {
34
- message: Message;
35
- animate?: boolean;
36
- }
37
-
38
- const MessageItem = memo(function MessageItem({ message, animate = false }: MessageItemProps) {
39
- const config = MESSAGE_CONFIG[message.type];
40
- const providerInfo = useMemo(() =>
41
- message.agent ? getProviderTag(message.agent) : null,
42
- [message.agent]
43
- );
44
- const tag = message.type === "agent" && message.agent
45
- ? `[${message.agent.toUpperCase().slice(0, 8)}]`
46
- : config.tag;
47
- const formattedTime = useMemo(() => formatTimestamp(message.timestamp), [message.timestamp]);
48
-
49
- return (
50
- <Box flexDirection="column" marginBottom={1}>
51
- <Box flexDirection="row">
52
- <Text color={tuiColors.textTertiary}>[{formattedTime}]</Text>
53
- <Text color={config.color} bold>{tag.padEnd(12)}</Text>
54
- {providerInfo && (
55
- <Text color={tuiColors.textTertiary}>{providerInfo.code}</Text>
56
- )}
57
- </Box>
58
- {animate ? (
59
- <TypingEffect text={message.content} speed={TYPING_SPEED_PER_CHAR} showCursor={false} />
60
- ) : (
61
- <Text color={tuiColors.textPrimary}> {message.content}</Text>
62
- )}
63
- </Box>
64
- );
65
- });
66
-
67
- export const ChatPanel = memo(function ChatPanel({ messages, isProcessing, isActive, maxHeight }: ChatPanelProps) {
68
- const borderColor = isActive ? tuiColors.primary : tuiColors.border;
69
- const [animatingMessageId, setAnimatingMessageId] = useState<string | null>(null);
70
- const timeoutRef = React.useRef<NodeJS.Timeout | null>(null);
71
-
72
- const maxMsgs = maxHeight ? Math.max(3, maxHeight - 4) : MAX_DISPLAYED_MESSAGES;
73
- const displayMessages = useMemo(() =>
74
- messages.slice(-maxMsgs),
75
- [messages, maxMsgs]
76
- );
77
-
78
- useEffect(() => {
79
- if (messages.length === 0) return;
80
-
81
- const lastMessage = messages[messages.length - 1];
82
- if (lastMessage.type !== "agent" && lastMessage.type !== "system") return;
83
-
84
- if (timeoutRef.current) clearTimeout(timeoutRef.current);
85
-
86
- setAnimatingMessageId(lastMessage.id);
87
- timeoutRef.current = setTimeout(() => {
88
- setAnimatingMessageId(null);
89
- }, lastMessage.content.length * TYPING_SPEED_PER_CHAR + TYPING_BUFFER_MS);
90
-
91
- return () => {
92
- if (timeoutRef.current) clearTimeout(timeoutRef.current);
93
- };
94
- }, [messages]);
95
-
96
- const messageElements = useMemo(() =>
97
- displayMessages.map((msg) => (
98
- <MessageItem
99
- key={msg.id}
100
- message={msg}
101
- animate={msg.id === animatingMessageId}
102
- />
103
- )),
104
- [displayMessages, animatingMessageId]
105
- );
106
-
107
- return (
108
- <Box
109
- flexDirection="column"
110
- flexGrow={2}
111
- height={maxHeight}
112
- borderStyle="single"
113
- borderColor={borderColor}
114
- paddingX={1}
115
- >
116
- <Box marginBottom={1} flexShrink={0}>
117
- <Text color={tuiColors.primary} bold>┌─</Text>
118
- <Text color={tuiColors.primary} bold> CHAT </Text>
119
- <Text color={tuiColors.textTertiary}>─────────────────────────────────────</Text>
120
- </Box>
121
-
122
- <Box flexDirection="column" flexGrow={1} overflow="hidden">
123
- {messageElements}
124
- {isProcessing && <ProcessingIndicator text="Processing" />}
125
- </Box>
126
- </Box>
127
- );
128
- });
@@ -1,212 +0,0 @@
1
- import React, { useMemo, memo } from "react";
2
- import { Box, Text } from "ink";
3
- import { tuiColors, getStatusIndicator, getSpinnerFrame, treeChars } from "../styles/index.js";
4
- import { AnimatedProgressBar } from "./animations/index.js";
5
- import { AgentStateIcon, AgentState } from "./AgentStateIcon.js";
6
-
7
- interface DAGSubtask {
8
- id: string;
9
- name: string;
10
- state: AgentState;
11
- }
12
-
13
- interface DAGNode {
14
- id: string;
15
- name: string;
16
- status: "pending" | "running" | "done" | "error";
17
- agent?: string;
18
- state?: AgentState;
19
- executionTime?: number;
20
- detail?: string;
21
- subtasks?: DAGSubtask[];
22
- }
23
-
24
- interface DAGLevel {
25
- name: string;
26
- progress: number;
27
- nodes: DAGNode[];
28
- status?: 'done' | 'running' | 'pending';
29
- }
30
-
31
- interface WorkflowState {
32
- levels: DAGLevel[];
33
- currentLevel: number;
34
- totalProgress: number;
35
- }
36
-
37
- interface DAGNodeItemProps {
38
- node: DAGNode;
39
- tick: number;
40
- isLast: boolean;
41
- }
42
-
43
- const STATE_LABELS: Record<AgentState, string> = {
44
- idle: "pending",
45
- thinking: "thinking...",
46
- processing: "processing",
47
- running: "running",
48
- success: "done",
49
- error: "error",
50
- waiting: "waiting",
51
- };
52
-
53
- const DAGNodeItem = memo(function DAGNodeItem({ node, tick, isLast }: DAGNodeItemProps) {
54
- const statusInfo = useMemo(() => getStatusIndicator(node.status), [node.status]);
55
- const agentState = useMemo((): AgentState => {
56
- if (node.state) return node.state;
57
- if (node.status === 'running') return 'running';
58
- if (node.status === 'done') return 'success';
59
- if (node.status === 'error') return 'error';
60
- return 'idle';
61
- }, [node.state, node.status]);
62
-
63
- const icon = node.status === "running"
64
- ? getSpinnerFrame(tick, "dots")
65
- : statusInfo.icon;
66
- const prefix = isLast ? treeChars.lastBranch : treeChars.branch;
67
- const timeStr = node.executionTime ? `${node.executionTime.toFixed(1)}s` : "";
68
-
69
- return (
70
- <Box flexDirection="column">
71
- <Box flexDirection="row">
72
- <Text color={tuiColors.textTertiary}>{prefix} </Text>
73
- <Box flexDirection="row">
74
- <Text color={tuiColors.textSecondary}>[</Text>
75
- <AgentStateIcon state={agentState} tick={tick} />
76
- <Text color={tuiColors.textSecondary}>]</Text>
77
- </Box>
78
- <Text color={tuiColors.textPrimary}> {node.name.padEnd(18)}</Text>
79
- {timeStr && (
80
- <Text color={tuiColors.textTertiary}> ● {timeStr}</Text>
81
- )}
82
- </Box>
83
- {node.detail && (
84
- <Box flexDirection="row">
85
- <Text color={tuiColors.textTertiary}> └── {node.detail}</Text>
86
- </Box>
87
- )}
88
- {node.subtasks && node.subtasks.length > 0 && (
89
- <Box flexDirection="column">
90
- {node.subtasks.map((subtask, idx) => (
91
- <Box key={subtask.id} flexDirection="row">
92
- <Text color={tuiColors.textTertiary}> {idx === node.subtasks!.length - 1 ? '└──' : '├──'} </Text>
93
- <AgentStateIcon state={subtask.state} tick={tick} />
94
- <Text color={tuiColors.textTertiary}> {subtask.name}</Text>
95
- </Box>
96
- ))}
97
- </Box>
98
- )}
99
- </Box>
100
- );
101
- });
102
-
103
- interface DAGLevelViewProps {
104
- level: DAGLevel;
105
- tick: number;
106
- isActive: boolean;
107
- }
108
-
109
- const DAGLevelView = memo(function DAGLevelView({ level, tick, isActive }: DAGLevelViewProps) {
110
- const levelColor = isActive ? tuiColors.primary : tuiColors.textSecondary;
111
- const statusColor = level.status === 'done'
112
- ? tuiColors.success
113
- : level.status === 'running'
114
- ? tuiColors.warning
115
- : tuiColors.textTertiary;
116
-
117
- return (
118
- <Box flexDirection="column" marginBottom={1}>
119
- <Box flexDirection="row">
120
- <Text color={levelColor} bold>{level.name.padEnd(12)}</Text>
121
- <AnimatedProgressBar
122
- progress={level.progress}
123
- width={16}
124
- tick={tick}
125
- animated={isActive}
126
- showMarker={isActive}
127
- glowEffect={isActive}
128
- />
129
- </Box>
130
- <Box flexDirection="row">
131
- <Text color={isActive ? tuiColors.primary : tuiColors.textTertiary}>
132
- {isActive ? "┃" : "│"}
133
- </Text>
134
- </Box>
135
- {level.nodes.map((node, idx) => (
136
- <DAGNodeItem
137
- key={node.id}
138
- node={node}
139
- tick={tick}
140
- isLast={idx === level.nodes.length - 1}
141
- />
142
- ))}
143
- </Box>
144
- );
145
- });
146
-
147
- interface DAGPanelProps {
148
- workflowState: WorkflowState;
149
- tick: number;
150
- isActive: boolean;
151
- maxHeight?: number;
152
- }
153
-
154
- export const DAGPanel = memo(function DAGPanel({ workflowState, tick, isActive, maxHeight }: DAGPanelProps) {
155
- const borderColor = isActive ? tuiColors.primary : tuiColors.border;
156
-
157
- const visibleLevels = maxHeight ? Math.max(2, Math.floor((maxHeight - 6) / 4)) : workflowState.levels.length;
158
-
159
- const levelViews = useMemo(() =>
160
- workflowState.levels.slice(0, visibleLevels).map((level, index) => (
161
- <DAGLevelView
162
- key={level.name}
163
- level={level}
164
- tick={tick}
165
- isActive={index === workflowState.currentLevel}
166
- />
167
- )),
168
- [workflowState.levels, workflowState.currentLevel, tick, visibleLevels]
169
- );
170
-
171
- const isAnimating = useMemo(() =>
172
- workflowState.totalProgress > 0 && workflowState.totalProgress < 100,
173
- [workflowState.totalProgress]
174
- );
175
-
176
- return (
177
- <Box
178
- flexDirection="column"
179
- width={46}
180
- height={maxHeight}
181
- borderStyle="single"
182
- borderColor={borderColor}
183
- paddingX={1}
184
- >
185
- <Box marginBottom={1} flexShrink={0}>
186
- <Text color={tuiColors.primary} bold>┌─</Text>
187
- <Text color={tuiColors.primary} bold> DAG_EXECUTION </Text>
188
- <Text color={tuiColors.textTertiary}>──────────────────────</Text>
189
- </Box>
190
-
191
- <Box flexDirection="column" flexGrow={1} overflow="hidden">
192
- {levelViews}
193
- </Box>
194
-
195
- <Box marginTop={1} flexShrink={0}>
196
- <Text color={tuiColors.textTertiary}>├─ TOTAL ─────────────────────────</Text>
197
- </Box>
198
- <Box flexDirection="row" flexShrink={0}>
199
- <Text color={tuiColors.textSecondary}>Progress: </Text>
200
- <AnimatedProgressBar
201
- progress={workflowState.totalProgress}
202
- width={16}
203
- tick={tick}
204
- animated={isAnimating}
205
- showMarker
206
- />
207
- </Box>
208
- </Box>
209
- );
210
- });
211
-
212
- export type { DAGNode, DAGLevel, WorkflowState, DAGSubtask };
@@ -1,225 +0,0 @@
1
- import React, { memo, useMemo } from "react";
2
- import { Box, Text } from "ink";
3
- import { tuiColors } from "../styles/index.js";
4
- import { AnimatedBranch } from "./AnimatedBranch.js";
5
-
6
- interface TimelineAgent {
7
- name: string;
8
- startTime: number;
9
- endTime?: number;
10
- isActive: boolean;
11
- color?: string;
12
- }
13
-
14
- interface TimelineLevel {
15
- name: string;
16
- startTime: number;
17
- endTime?: number;
18
- progress: number;
19
- status: 'done' | 'running' | 'pending';
20
- }
21
-
22
- export interface ExecutionTimelineProps {
23
- tick: number;
24
- totalDuration: number;
25
- currentTime: number;
26
- levels: TimelineLevel[];
27
- agents: TimelineAgent[];
28
- isActive?: boolean;
29
- width?: number;
30
- }
31
-
32
- const ACTIVE_MARKER_FRAMES = ["┃", "║", "┃", "║"];
33
-
34
- const BAR_COLORS: Record<string, string> = {
35
- done: tuiColors.success,
36
- running: tuiColors.warning,
37
- pending: tuiColors.textTertiary,
38
- };
39
-
40
- const STATUS_TEXT = {
41
- done: (endTime: number | undefined) => `done at ${endTime?.toFixed(1)}s`,
42
- running: () => "running...",
43
- pending: () => "pending",
44
- };
45
-
46
- function formatTime(s: number): string {
47
- return `${s}s`;
48
- }
49
-
50
- interface TimelineBarProps {
51
- level: TimelineLevel;
52
- timeScale: number;
53
- width: number;
54
- currentTime: number;
55
- }
56
-
57
- const TimelineBar = memo(function TimelineBar({ level, timeScale, width, currentTime }: TimelineBarProps) {
58
- const startCol = Math.floor(level.startTime * timeScale);
59
- const endCol = level.endTime
60
- ? Math.floor(level.endTime * timeScale)
61
- : Math.floor(currentTime * timeScale);
62
- const barWidth = Math.max(0, endCol - startCol);
63
- const beforeBar = "░".repeat(startCol);
64
-
65
- const barChar = level.status === 'done' ? "█" : level.status === 'running' ? "▓" : "░";
66
- const afterBar = "░".repeat(Math.max(0, width - endCol));
67
-
68
- const statusText = STATUS_TEXT[level.status](level.endTime);
69
- const paddedName = useMemo(() => level.name.padEnd(4), [level.name]);
70
-
71
- return (
72
- <Box flexDirection="row">
73
- <Text color={tuiColors.textTertiary}>{paddedName} </Text>
74
- <Text color={BAR_COLORS[level.status]}>{beforeBar}{barChar.repeat(barWidth)}</Text>
75
- <Text color={tuiColors.textTertiary}>{afterBar}</Text>
76
- <Text color={tuiColors.textTertiary}> {statusText}</Text>
77
- </Box>
78
- );
79
- });
80
-
81
- interface AgentTimelineProps {
82
- agent: TimelineAgent;
83
- timeScale: number;
84
- width: number;
85
- currentTime: number;
86
- }
87
-
88
- const AgentTimeline = memo(function AgentTimeline({ agent, timeScale, width, currentTime }: AgentTimelineProps) {
89
- const startCol = Math.floor(agent.startTime * timeScale);
90
- const endCol = agent.endTime
91
- ? Math.floor(agent.endTime * timeScale)
92
- : Math.floor(currentTime * timeScale);
93
- const barWidth = Math.max(0, endCol - startCol);
94
- const indent = " ".repeat(startCol);
95
- const bar = agent.isActive ? "─".repeat(barWidth) + "▶" : "─".repeat(barWidth) + "┘";
96
- const afterBar = " ".repeat(Math.max(0, width - endCol - 1));
97
-
98
- const agentColor = agent.color || (agent.isActive ? tuiColors.primary : tuiColors.textSecondary);
99
- const prefix = agent.isActive ? "▶" : "●";
100
- const paddedName = useMemo(() => agent.name.padEnd(10), [agent.name]);
101
-
102
- return (
103
- <Box flexDirection="row">
104
- <Text color={agentColor}>{prefix} {paddedName} </Text>
105
- <Text color={tuiColors.textTertiary}>{indent}</Text>
106
- <Text color={agentColor}>{bar}</Text>
107
- <Text color={tuiColors.textTertiary}>{afterBar}</Text>
108
- </Box>
109
- );
110
- });
111
-
112
- export const ExecutionTimeline = memo(function ExecutionTimeline({
113
- tick,
114
- totalDuration,
115
- currentTime,
116
- levels,
117
- agents,
118
- isActive = false,
119
- width = 50,
120
- }: ExecutionTimelineProps) {
121
- const borderColor = isActive ? tuiColors.primary : tuiColors.border;
122
- const timeScale = width / totalDuration;
123
- const markerPositions = [0, 5, 10, 15, 20];
124
-
125
- const activeMarker = isActive ? ACTIVE_MARKER_FRAMES[tick % ACTIVE_MARKER_FRAMES.length] : "│";
126
-
127
- const markerElements = useMemo(() =>
128
- markerPositions.map((pos, idx) => (
129
- <Box key={idx} width={10}>
130
- <Text color={tuiColors.textTertiary}>{formatTime(pos).padStart(6)}</Text>
131
- </Box>
132
- )),
133
- []
134
- );
135
-
136
- const separatorElements = useMemo(() =>
137
- Array.from({ length: 5 }).map((_, idx) => (
138
- <Box key={idx} width={10}>
139
- <Text color={tuiColors.textTertiary}>{idx === 0 ? "│" : " │"}</Text>
140
- </Box>
141
- )),
142
- []
143
- );
144
-
145
- const levelElements = useMemo(() =>
146
- levels.map((level, idx) => (
147
- <Box key={idx} marginBottom={1}>
148
- <TimelineBar level={level} timeScale={timeScale} width={width} currentTime={currentTime} />
149
- </Box>
150
- )),
151
- [levels, timeScale, width, currentTime]
152
- );
153
-
154
- const agentElements = useMemo(() =>
155
- agents.map((agent, idx) => (
156
- <Box key={idx}>
157
- <AgentTimeline agent={agent} timeScale={timeScale} width={width} currentTime={currentTime} />
158
- </Box>
159
- )),
160
- [agents, timeScale, width, currentTime]
161
- );
162
-
163
- return (
164
- <Box flexDirection="column" borderStyle="single" borderColor={borderColor} paddingX={1}>
165
- <Box marginBottom={1}>
166
- <Text color={tuiColors.primary} bold>┌─</Text>
167
- <Text color={tuiColors.primary} bold> EXECUTION_TIMELINE </Text>
168
- <Text color={tuiColors.textTertiary}>────────────────</Text>
169
- </Box>
170
-
171
- <Box flexDirection="row" marginBottom={1}>
172
- {markerElements}
173
- </Box>
174
-
175
- <Box flexDirection="row" marginBottom={1}>
176
- {separatorElements}
177
- </Box>
178
-
179
- <Box flexDirection="row" marginBottom={1}>
180
- <Text color={tuiColors.textTertiary}>{"├" + "─".repeat(width - 2) + "┤"}</Text>
181
- </Box>
182
-
183
- <Box flexDirection="column">
184
- {levelElements}
185
- </Box>
186
-
187
- <Box flexDirection="row" marginTop={1} marginBottom={1}>
188
- <AnimatedBranch type="vertical" tick={tick} animated={isActive} />
189
- </Box>
190
-
191
- <Box marginTop={1}>
192
- <Text color={tuiColors.textSecondary}>Agents:</Text>
193
- </Box>
194
-
195
- <Box flexDirection="column" marginTop={1}>
196
- {agentElements}
197
- </Box>
198
- </Box>
199
- );
200
- });
201
-
202
- interface MiniTimelineProps {
203
- progress: number;
204
- tick: number;
205
- isActive: boolean;
206
- width?: number;
207
- }
208
-
209
- export const MiniTimeline = memo(function MiniTimeline({ progress, tick, isActive, width = 30 }: MiniTimelineProps) {
210
- const filled = Math.floor((progress / 100) * width);
211
- const empty = width - filled;
212
- const currentPos = Math.min(filled, width - 1);
213
-
214
- const before = "─".repeat(currentPos);
215
- const marker = isActive ? "●" : "○";
216
- const after = "─".repeat(empty);
217
-
218
- return (
219
- <Box flexDirection="row">
220
- <Text color={tuiColors.textTertiary}>├{before}</Text>
221
- <Text color={isActive ? tuiColors.primary : tuiColors.textSecondary}>{marker}</Text>
222
- <Text color={tuiColors.textTertiary}>{after}┤</Text>
223
- </Box>
224
- );
225
- });