@johpaz/hive 1.7.2 → 1.7.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 (427) hide show
  1. package/README.md +178 -36
  2. package/dist/hive.js +315124 -0
  3. package/package.json +11 -3
  4. package/packages/core/src/index.ts +0 -1
  5. package/.dockerignore +0 -9
  6. package/CONTRIBUTING.md +0 -44
  7. package/Dockerfile +0 -67
  8. package/docker-compose.yml +0 -19
  9. package/packages/cli/package.json +0 -28
  10. package/packages/cli/src/commands/agent-run.ts +0 -168
  11. package/packages/cli/src/commands/agents.ts +0 -398
  12. package/packages/cli/src/commands/chat.ts +0 -142
  13. package/packages/cli/src/commands/config.ts +0 -50
  14. package/packages/cli/src/commands/cron.ts +0 -161
  15. package/packages/cli/src/commands/dev.ts +0 -95
  16. package/packages/cli/src/commands/doctor.ts +0 -133
  17. package/packages/cli/src/commands/gateway.ts +0 -422
  18. package/packages/cli/src/commands/logs.ts +0 -57
  19. package/packages/cli/src/commands/mcp.ts +0 -175
  20. package/packages/cli/src/commands/message.ts +0 -77
  21. package/packages/cli/src/commands/onboard.ts +0 -1696
  22. package/packages/cli/src/commands/security.ts +0 -144
  23. package/packages/cli/src/commands/service.ts +0 -50
  24. package/packages/cli/src/commands/sessions.ts +0 -116
  25. package/packages/cli/src/commands/skills.ts +0 -187
  26. package/packages/cli/src/commands/update.ts +0 -25
  27. package/packages/cli/src/index.ts +0 -190
  28. package/packages/cli/src/utils/token.ts +0 -6
  29. package/packages/code-bridge/README.md +0 -78
  30. package/packages/code-bridge/package.json +0 -18
  31. package/packages/code-bridge/src/index.ts +0 -95
  32. package/packages/code-bridge/src/process-manager.ts +0 -212
  33. package/packages/code-bridge/src/schemas.ts +0 -133
  34. package/packages/core/package.json +0 -55
  35. package/packages/core/src/agent/agent-loop.ts +0 -520
  36. package/packages/core/src/agent/compaction.ts +0 -183
  37. package/packages/core/src/agent/context-compiler.ts +0 -544
  38. package/packages/core/src/agent/context-guard.ts +0 -91
  39. package/packages/core/src/agent/conversation-store.ts +0 -193
  40. package/packages/core/src/agent/curator.ts +0 -158
  41. package/packages/core/src/agent/hooks.ts +0 -166
  42. package/packages/core/src/agent/llm-client.ts +0 -503
  43. package/packages/core/src/agent/native-tools.ts +0 -31
  44. package/packages/core/src/agent/playbook-selector.ts +0 -143
  45. package/packages/core/src/agent/prompt-builder.ts +0 -167
  46. package/packages/core/src/agent/providers/index.ts +0 -186
  47. package/packages/core/src/agent/providers.ts +0 -1
  48. package/packages/core/src/agent/reflector.ts +0 -200
  49. package/packages/core/src/agent/service.ts +0 -266
  50. package/packages/core/src/agent/skill-selector.ts +0 -413
  51. package/packages/core/src/agent/stuck-loop.ts +0 -133
  52. package/packages/core/src/agent/tool-selector.ts +0 -623
  53. package/packages/core/src/agent/tracer.ts +0 -102
  54. package/packages/core/src/canvas/canvas-manager.ts +0 -319
  55. package/packages/core/src/canvas/canvas-tools.ts +0 -420
  56. package/packages/core/src/canvas/emitter.ts +0 -119
  57. package/packages/core/src/canvas/index.ts +0 -2
  58. package/packages/core/src/channels/base.ts +0 -140
  59. package/packages/core/src/channels/discord.ts +0 -260
  60. package/packages/core/src/channels/index.ts +0 -7
  61. package/packages/core/src/channels/manager.ts +0 -383
  62. package/packages/core/src/channels/slack.ts +0 -287
  63. package/packages/core/src/channels/telegram.ts +0 -552
  64. package/packages/core/src/channels/webchat.ts +0 -139
  65. package/packages/core/src/channels/whatsapp.ts +0 -375
  66. package/packages/core/src/config/index.ts +0 -12
  67. package/packages/core/src/config/loader.ts +0 -529
  68. package/packages/core/src/events/agent-bus.ts +0 -460
  69. package/packages/core/src/events/event-bus.ts +0 -169
  70. package/packages/core/src/gateway/helpers/cors.ts +0 -32
  71. package/packages/core/src/gateway/helpers/index.ts +0 -4
  72. package/packages/core/src/gateway/helpers/narration.ts +0 -60
  73. package/packages/core/src/gateway/helpers/path.ts +0 -13
  74. package/packages/core/src/gateway/helpers/redact.ts +0 -61
  75. package/packages/core/src/gateway/index.ts +0 -5
  76. package/packages/core/src/gateway/initializer.ts +0 -332
  77. package/packages/core/src/gateway/lane-queue.ts +0 -169
  78. package/packages/core/src/gateway/resolver.ts +0 -108
  79. package/packages/core/src/gateway/router.ts +0 -124
  80. package/packages/core/src/gateway/routes/agents.ts +0 -187
  81. package/packages/core/src/gateway/routes/channels.ts +0 -203
  82. package/packages/core/src/gateway/routes/chat.ts +0 -241
  83. package/packages/core/src/gateway/routes/config.ts +0 -12
  84. package/packages/core/src/gateway/routes/cron.ts +0 -42
  85. package/packages/core/src/gateway/routes/ethics.ts +0 -46
  86. package/packages/core/src/gateway/routes/mcp.ts +0 -346
  87. package/packages/core/src/gateway/routes/models.ts +0 -93
  88. package/packages/core/src/gateway/routes/projects.ts +0 -179
  89. package/packages/core/src/gateway/routes/providers.ts +0 -192
  90. package/packages/core/src/gateway/routes/setup.ts +0 -267
  91. package/packages/core/src/gateway/routes/skills.ts +0 -70
  92. package/packages/core/src/gateway/routes/system.ts +0 -165
  93. package/packages/core/src/gateway/routes/tasks.ts +0 -44
  94. package/packages/core/src/gateway/routes/tools.ts +0 -35
  95. package/packages/core/src/gateway/routes/users.ts +0 -118
  96. package/packages/core/src/gateway/routes/voice.ts +0 -73
  97. package/packages/core/src/gateway/routes/workspace.ts +0 -281
  98. package/packages/core/src/gateway/server.ts +0 -1978
  99. package/packages/core/src/gateway/session.ts +0 -95
  100. package/packages/core/src/gateway/slash-commands.ts +0 -193
  101. package/packages/core/src/heartbeat/index.ts +0 -157
  102. package/packages/core/src/mcp/hot-reload.ts +0 -213
  103. package/packages/core/src/mcp/singleton.ts +0 -21
  104. package/packages/core/src/memory/index.ts +0 -1
  105. package/packages/core/src/memory/notes.ts +0 -68
  106. package/packages/core/src/plugins/api.ts +0 -128
  107. package/packages/core/src/plugins/index.ts +0 -2
  108. package/packages/core/src/plugins/loader.ts +0 -365
  109. package/packages/core/src/resilience/circuit-breaker.ts +0 -225
  110. package/packages/core/src/security/google-chat.ts +0 -269
  111. package/packages/core/src/security/index.ts +0 -192
  112. package/packages/core/src/security/pairing.ts +0 -250
  113. package/packages/core/src/security/rate-limit.ts +0 -270
  114. package/packages/core/src/security/signal.ts +0 -321
  115. package/packages/core/src/state/store.ts +0 -312
  116. package/packages/core/src/storage/crypto.ts +0 -101
  117. package/packages/core/src/storage/onboarding.ts +0 -1609
  118. package/packages/core/src/storage/schema.ts +0 -567
  119. package/packages/core/src/storage/seed.ts +0 -608
  120. package/packages/core/src/storage/sqlite.ts +0 -363
  121. package/packages/core/src/storage/usage.ts +0 -270
  122. package/packages/core/src/tools/agents/index.ts +0 -607
  123. package/packages/core/src/tools/bridge-events.ts +0 -26
  124. package/packages/core/src/tools/canvas/index.ts +0 -281
  125. package/packages/core/src/tools/cli/index.ts +0 -142
  126. package/packages/core/src/tools/codebridge/index.ts +0 -179
  127. package/packages/core/src/tools/core/index.ts +0 -257
  128. package/packages/core/src/tools/cron/index.ts +0 -373
  129. package/packages/core/src/tools/filesystem/fs-delete.ts +0 -78
  130. package/packages/core/src/tools/filesystem/fs-edit.ts +0 -106
  131. package/packages/core/src/tools/filesystem/fs-exists.ts +0 -63
  132. package/packages/core/src/tools/filesystem/fs-glob.ts +0 -108
  133. package/packages/core/src/tools/filesystem/fs-list.ts +0 -129
  134. package/packages/core/src/tools/filesystem/fs-read.ts +0 -72
  135. package/packages/core/src/tools/filesystem/fs-write.ts +0 -67
  136. package/packages/core/src/tools/filesystem/index.ts +0 -34
  137. package/packages/core/src/tools/filesystem/workspace-guard.ts +0 -62
  138. package/packages/core/src/tools/index.ts +0 -197
  139. package/packages/core/src/tools/projects/index.ts +0 -37
  140. package/packages/core/src/tools/projects/project-create.ts +0 -94
  141. package/packages/core/src/tools/projects/project-done.ts +0 -66
  142. package/packages/core/src/tools/projects/project-fail.ts +0 -66
  143. package/packages/core/src/tools/projects/project-list.ts +0 -96
  144. package/packages/core/src/tools/projects/project-update.ts +0 -72
  145. package/packages/core/src/tools/projects/task-create.ts +0 -68
  146. package/packages/core/src/tools/projects/task-evaluate.ts +0 -93
  147. package/packages/core/src/tools/projects/task-update.ts +0 -93
  148. package/packages/core/src/tools/search-knowledge/search-knowledge.ts +0 -155
  149. package/packages/core/src/tools/types.ts +0 -39
  150. package/packages/core/src/tools/voice/index.ts +0 -104
  151. package/packages/core/src/tools/web/browser-click.ts +0 -54
  152. package/packages/core/src/tools/web/browser-navigate.ts +0 -84
  153. package/packages/core/src/tools/web/browser-screenshot.ts +0 -54
  154. package/packages/core/src/tools/web/browser-type.ts +0 -60
  155. package/packages/core/src/tools/web/index.ts +0 -31
  156. package/packages/core/src/tools/web/web-fetch.ts +0 -78
  157. package/packages/core/src/tools/web/web-search.ts +0 -123
  158. package/packages/core/src/utils/benchmark.ts +0 -80
  159. package/packages/core/src/utils/crypto.ts +0 -73
  160. package/packages/core/src/utils/date.ts +0 -42
  161. package/packages/core/src/utils/index.ts +0 -5
  162. package/packages/core/src/utils/logger.ts +0 -389
  163. package/packages/core/src/utils/retry.ts +0 -70
  164. package/packages/core/src/utils/toon.ts +0 -356
  165. package/packages/core/src/voice/index.ts +0 -583
  166. package/packages/hive-ui/README.md +0 -52
  167. package/packages/hive-ui/components.json +0 -20
  168. package/packages/hive-ui/index.html +0 -30
  169. package/packages/hive-ui/package.json +0 -90
  170. package/packages/hive-ui/public/favicon.ico +0 -0
  171. package/packages/hive-ui/public/placeholder.svg +0 -1
  172. package/packages/hive-ui/src/App.tsx +0 -115
  173. package/packages/hive-ui/src/components/CronJobsPanel.tsx +0 -200
  174. package/packages/hive-ui/src/components/NavLink.tsx +0 -34
  175. package/packages/hive-ui/src/components/NotesPanel.tsx +0 -79
  176. package/packages/hive-ui/src/components/SystemMonitor.tsx +0 -270
  177. package/packages/hive-ui/src/components/UsageStatsPanel.tsx +0 -334
  178. package/packages/hive-ui/src/components/WelcomeDialog.tsx +0 -279
  179. package/packages/hive-ui/src/components/ui/accordion.tsx +0 -52
  180. package/packages/hive-ui/src/components/ui/alert-dialog.tsx +0 -104
  181. package/packages/hive-ui/src/components/ui/alert.tsx +0 -45
  182. package/packages/hive-ui/src/components/ui/aspect-ratio.tsx +0 -5
  183. package/packages/hive-ui/src/components/ui/avatar.tsx +0 -38
  184. package/packages/hive-ui/src/components/ui/badge.tsx +0 -29
  185. package/packages/hive-ui/src/components/ui/bee-loader.tsx +0 -68
  186. package/packages/hive-ui/src/components/ui/breadcrumb.tsx +0 -90
  187. package/packages/hive-ui/src/components/ui/button.tsx +0 -47
  188. package/packages/hive-ui/src/components/ui/calendar.tsx +0 -54
  189. package/packages/hive-ui/src/components/ui/card.tsx +0 -45
  190. package/packages/hive-ui/src/components/ui/carousel.tsx +0 -224
  191. package/packages/hive-ui/src/components/ui/chart.tsx +0 -303
  192. package/packages/hive-ui/src/components/ui/checkbox.tsx +0 -26
  193. package/packages/hive-ui/src/components/ui/collapsible.tsx +0 -9
  194. package/packages/hive-ui/src/components/ui/command.tsx +0 -133
  195. package/packages/hive-ui/src/components/ui/context-menu.tsx +0 -178
  196. package/packages/hive-ui/src/components/ui/dialog.tsx +0 -95
  197. package/packages/hive-ui/src/components/ui/drawer.tsx +0 -87
  198. package/packages/hive-ui/src/components/ui/dropdown-menu.tsx +0 -179
  199. package/packages/hive-ui/src/components/ui/form.tsx +0 -129
  200. package/packages/hive-ui/src/components/ui/hover-card.tsx +0 -27
  201. package/packages/hive-ui/src/components/ui/input-otp.tsx +0 -61
  202. package/packages/hive-ui/src/components/ui/input.tsx +0 -22
  203. package/packages/hive-ui/src/components/ui/label.tsx +0 -17
  204. package/packages/hive-ui/src/components/ui/menubar.tsx +0 -207
  205. package/packages/hive-ui/src/components/ui/navigation-menu.tsx +0 -120
  206. package/packages/hive-ui/src/components/ui/pagination.tsx +0 -80
  207. package/packages/hive-ui/src/components/ui/popover.tsx +0 -29
  208. package/packages/hive-ui/src/components/ui/progress.tsx +0 -23
  209. package/packages/hive-ui/src/components/ui/radio-group.tsx +0 -36
  210. package/packages/hive-ui/src/components/ui/resizable.tsx +0 -37
  211. package/packages/hive-ui/src/components/ui/scroll-area.tsx +0 -38
  212. package/packages/hive-ui/src/components/ui/select.tsx +0 -143
  213. package/packages/hive-ui/src/components/ui/separator.tsx +0 -20
  214. package/packages/hive-ui/src/components/ui/sheet.tsx +0 -107
  215. package/packages/hive-ui/src/components/ui/sidebar.tsx +0 -636
  216. package/packages/hive-ui/src/components/ui/skeleton.tsx +0 -7
  217. package/packages/hive-ui/src/components/ui/slider.tsx +0 -23
  218. package/packages/hive-ui/src/components/ui/sonner.tsx +0 -27
  219. package/packages/hive-ui/src/components/ui/switch.tsx +0 -27
  220. package/packages/hive-ui/src/components/ui/table.tsx +0 -72
  221. package/packages/hive-ui/src/components/ui/tabs.tsx +0 -53
  222. package/packages/hive-ui/src/components/ui/textarea.tsx +0 -21
  223. package/packages/hive-ui/src/components/ui/toast.tsx +0 -111
  224. package/packages/hive-ui/src/components/ui/toaster.tsx +0 -24
  225. package/packages/hive-ui/src/components/ui/toggle-group.tsx +0 -49
  226. package/packages/hive-ui/src/components/ui/toggle.tsx +0 -37
  227. package/packages/hive-ui/src/components/ui/tooltip.tsx +0 -28
  228. package/packages/hive-ui/src/components/ui/use-toast.ts +0 -3
  229. package/packages/hive-ui/src/hooks/use-mobile.tsx +0 -19
  230. package/packages/hive-ui/src/hooks/use-toast.ts +0 -186
  231. package/packages/hive-ui/src/hooks/useAgentConfig.ts +0 -25
  232. package/packages/hive-ui/src/hooks/useAgents.ts +0 -38
  233. package/packages/hive-ui/src/hooks/useBridge.ts +0 -38
  234. package/packages/hive-ui/src/hooks/useCanvas.ts +0 -24
  235. package/packages/hive-ui/src/hooks/useChannels.ts +0 -2
  236. package/packages/hive-ui/src/hooks/useEthics.ts +0 -51
  237. package/packages/hive-ui/src/hooks/useProviders.ts +0 -14
  238. package/packages/hive-ui/src/hooks/useTheme.ts +0 -29
  239. package/packages/hive-ui/src/hooks/useUserConfig.ts +0 -17
  240. package/packages/hive-ui/src/hooks/useWebSocket.ts +0 -12
  241. package/packages/hive-ui/src/index.css +0 -620
  242. package/packages/hive-ui/src/lib/api.ts +0 -100
  243. package/packages/hive-ui/src/lib/constants.ts +0 -6
  244. package/packages/hive-ui/src/lib/models.ts +0 -64
  245. package/packages/hive-ui/src/lib/swal.ts +0 -30
  246. package/packages/hive-ui/src/lib/utils.ts +0 -6
  247. package/packages/hive-ui/src/lib/websocket.ts +0 -7
  248. package/packages/hive-ui/src/main.tsx +0 -5
  249. package/packages/hive-ui/src/modules/agent-config/details/AgentDetailsEditor.tsx +0 -524
  250. package/packages/hive-ui/src/modules/agent-config/ethics/EthicsConflictDetector.tsx +0 -18
  251. package/packages/hive-ui/src/modules/agent-config/ethics/EthicsEditor.tsx +0 -19
  252. package/packages/hive-ui/src/modules/agent-config/ethics/EthicsRulesList.tsx +0 -36
  253. package/packages/hive-ui/src/modules/agent-config/ethics/EthicsTemplateGallery.tsx +0 -361
  254. package/packages/hive-ui/src/modules/agent-config/ethics/index.ts +0 -4
  255. package/packages/hive-ui/src/modules/agent-config/index.ts +0 -6
  256. package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerAdd.tsx +0 -322
  257. package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerCard.tsx +0 -93
  258. package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerConfig.tsx +0 -427
  259. package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerList.tsx +0 -85
  260. package/packages/hive-ui/src/modules/agent-config/mcp/MCPToolExplorer.tsx +0 -79
  261. package/packages/hive-ui/src/modules/agent-config/mcp/index.ts +0 -5
  262. package/packages/hive-ui/src/modules/agent-config/shared/ConfigEditorLayout.tsx +0 -30
  263. package/packages/hive-ui/src/modules/agent-config/shared/ConfigExporter.tsx +0 -26
  264. package/packages/hive-ui/src/modules/agent-config/shared/ConfigImporter.tsx +0 -25
  265. package/packages/hive-ui/src/modules/agent-config/shared/DiffViewer.tsx +0 -31
  266. package/packages/hive-ui/src/modules/agent-config/shared/MarkdownEditor.tsx +0 -32
  267. package/packages/hive-ui/src/modules/agent-config/shared/SaveStatusIndicator.tsx +0 -23
  268. package/packages/hive-ui/src/modules/agent-config/shared/ValidationPanel.tsx +0 -36
  269. package/packages/hive-ui/src/modules/agent-config/shared/index.ts +0 -7
  270. package/packages/hive-ui/src/modules/agent-config/skills/SkillCard.tsx +0 -81
  271. package/packages/hive-ui/src/modules/agent-config/skills/SkillConfigEditor.tsx +0 -22
  272. package/packages/hive-ui/src/modules/agent-config/skills/SkillCreator.tsx +0 -60
  273. package/packages/hive-ui/src/modules/agent-config/skills/SkillInstaller.tsx +0 -23
  274. package/packages/hive-ui/src/modules/agent-config/skills/SkillList.tsx +0 -72
  275. package/packages/hive-ui/src/modules/agent-config/skills/SkillsTab.tsx +0 -202
  276. package/packages/hive-ui/src/modules/agent-config/skills/index.ts +0 -5
  277. package/packages/hive-ui/src/modules/agent-config/tools/ToolCard.tsx +0 -27
  278. package/packages/hive-ui/src/modules/agent-config/tools/ToolConfigPanel.tsx +0 -22
  279. package/packages/hive-ui/src/modules/agent-config/tools/ToolManager.tsx +0 -266
  280. package/packages/hive-ui/src/modules/agent-config/tools/ToolPermissions.tsx +0 -287
  281. package/packages/hive-ui/src/modules/agent-config/tools/ToolRegistry.tsx +0 -84
  282. package/packages/hive-ui/src/modules/agent-config/tools/ToolUsageStats.tsx +0 -52
  283. package/packages/hive-ui/src/modules/agent-config/tools/index.ts +0 -4
  284. package/packages/hive-ui/src/modules/agent-config/user/ActiveAgentsList.tsx +0 -109
  285. package/packages/hive-ui/src/modules/agent-config/user/GlobalConfigOverview.tsx +0 -119
  286. package/packages/hive-ui/src/modules/agent-config/user/UserMemoryManager.tsx +0 -54
  287. package/packages/hive-ui/src/modules/agent-config/user/UserPreferencesForm.tsx +0 -163
  288. package/packages/hive-ui/src/modules/agent-config/user/UserProfileEditor.tsx +0 -261
  289. package/packages/hive-ui/src/modules/agent-config/user/index.ts +0 -3
  290. package/packages/hive-ui/src/modules/agents/AgentActivityLog.tsx +0 -25
  291. package/packages/hive-ui/src/modules/agents/AgentCard.tsx +0 -305
  292. package/packages/hive-ui/src/modules/agents/AgentCreateForm.tsx +0 -446
  293. package/packages/hive-ui/src/modules/agents/AgentDetail.tsx +0 -28
  294. package/packages/hive-ui/src/modules/agents/AgentInternalCard.tsx +0 -162
  295. package/packages/hive-ui/src/modules/agents/AgentList.tsx +0 -29
  296. package/packages/hive-ui/src/modules/agents/AgentStatusBadge.tsx +0 -34
  297. package/packages/hive-ui/src/modules/agents/ModelSelector.tsx +0 -151
  298. package/packages/hive-ui/src/modules/bridge/BridgeLogViewer.tsx +0 -61
  299. package/packages/hive-ui/src/modules/bridge/BridgeProcessList.tsx +0 -77
  300. package/packages/hive-ui/src/modules/bridge/BridgeStatus.tsx +0 -23
  301. package/packages/hive-ui/src/modules/bridge/BridgeTerminal.tsx +0 -7
  302. package/packages/hive-ui/src/modules/canvas/CanvasButton.tsx +0 -3
  303. package/packages/hive-ui/src/modules/canvas/CanvasChart.tsx +0 -3
  304. package/packages/hive-ui/src/modules/canvas/CanvasComponentMap.tsx +0 -605
  305. package/packages/hive-ui/src/modules/canvas/CanvasContainer.tsx +0 -360
  306. package/packages/hive-ui/src/modules/canvas/CanvasForm.tsx +0 -3
  307. package/packages/hive-ui/src/modules/canvas/CanvasMarkdown.tsx +0 -3
  308. package/packages/hive-ui/src/modules/canvas/CanvasTable.tsx +0 -3
  309. package/packages/hive-ui/src/modules/canvas/ComponentRenderer.tsx +0 -30
  310. package/packages/hive-ui/src/modules/canvas/DynamicRenderer.tsx +0 -3
  311. package/packages/hive-ui/src/modules/channels/available/AvailableChannelsGrid.tsx +0 -89
  312. package/packages/hive-ui/src/modules/channels/available/ChannelAuthForm.tsx +0 -33
  313. package/packages/hive-ui/src/modules/channels/available/ChannelSetupWizard.tsx +0 -48
  314. package/packages/hive-ui/src/modules/channels/available/ChannelTestConnection.tsx +0 -37
  315. package/packages/hive-ui/src/modules/channels/available/ChannelTypeCard.tsx +0 -30
  316. package/packages/hive-ui/src/modules/channels/available/ChannelWebhookConfig.tsx +0 -30
  317. package/packages/hive-ui/src/modules/channels/available/index.ts +0 -6
  318. package/packages/hive-ui/src/modules/channels/connected/ChannelCard.tsx +0 -95
  319. package/packages/hive-ui/src/modules/channels/connected/ChannelConfigPanel.tsx +0 -260
  320. package/packages/hive-ui/src/modules/channels/connected/ChannelDisconnectButton.tsx +0 -21
  321. package/packages/hive-ui/src/modules/channels/connected/ChannelLogsViewer.tsx +0 -42
  322. package/packages/hive-ui/src/modules/channels/connected/ChannelQRCode.tsx +0 -32
  323. package/packages/hive-ui/src/modules/channels/connected/ChannelReconnectButton.tsx +0 -16
  324. package/packages/hive-ui/src/modules/channels/connected/ChannelStatusBadge.tsx +0 -26
  325. package/packages/hive-ui/src/modules/channels/connected/ConnectedChannelsList.tsx +0 -40
  326. package/packages/hive-ui/src/modules/channels/connected/index.ts +0 -8
  327. package/packages/hive-ui/src/modules/channels/shared/ChannelCard.tsx +0 -84
  328. package/packages/hive-ui/src/modules/channels/shared/ChannelConfigDialog.tsx +0 -279
  329. package/packages/hive-ui/src/modules/channels/shared/ChannelIcon.tsx +0 -40
  330. package/packages/hive-ui/src/modules/channels/shared/ChannelStats.tsx +0 -37
  331. package/packages/hive-ui/src/modules/channels/shared/ChannelTypeBadge.tsx +0 -23
  332. package/packages/hive-ui/src/modules/channels/shared/ConnectionHealthIndicator.tsx +0 -20
  333. package/packages/hive-ui/src/modules/channels/shared/MessagePreview.tsx +0 -19
  334. package/packages/hive-ui/src/modules/channels/shared/index.ts +0 -5
  335. package/packages/hive-ui/src/modules/chat/ChatContainer.tsx +0 -268
  336. package/packages/hive-ui/src/modules/chat/ChatHistory.tsx +0 -101
  337. package/packages/hive-ui/src/modules/chat/ChatInput.tsx +0 -108
  338. package/packages/hive-ui/src/modules/chat/ChatMessage.tsx +0 -137
  339. package/packages/hive-ui/src/modules/chat/ThinkingIndicator.tsx +0 -10
  340. package/packages/hive-ui/src/modules/layout/AppLayout.tsx +0 -45
  341. package/packages/hive-ui/src/modules/layout/ConnectionStatus.tsx +0 -19
  342. package/packages/hive-ui/src/modules/layout/Header.tsx +0 -20
  343. package/packages/hive-ui/src/modules/layout/HiveSidebar.tsx +0 -173
  344. package/packages/hive-ui/src/modules/layout/ThemeToggle.tsx +0 -18
  345. package/packages/hive-ui/src/modules/providers/ProviderCard.tsx +0 -319
  346. package/packages/hive-ui/src/modules/providers/ProviderConfigForm.tsx +0 -146
  347. package/packages/hive-ui/src/modules/providers/ProviderFailoverConfig.tsx +0 -110
  348. package/packages/hive-ui/src/modules/providers/ProviderList.tsx +0 -33
  349. package/packages/hive-ui/src/modules/providers/ProviderStatusIndicator.tsx +0 -23
  350. package/packages/hive-ui/src/modules/providers/configs/ProviderAPIKeyManager.tsx +0 -39
  351. package/packages/hive-ui/src/modules/providers/configs/ProviderEndpointConfig.tsx +0 -27
  352. package/packages/hive-ui/src/modules/providers/configs/ProviderRateLimits.tsx +0 -37
  353. package/packages/hive-ui/src/modules/providers/configs/ProviderRetryPolicy.tsx +0 -46
  354. package/packages/hive-ui/src/modules/providers/configs/index.ts +0 -4
  355. package/packages/hive-ui/src/modules/providers/index.ts +0 -5
  356. package/packages/hive-ui/src/modules/providers/models/ModelBenchmarkBadge.tsx +0 -21
  357. package/packages/hive-ui/src/modules/providers/models/ModelCapabilities.tsx +0 -44
  358. package/packages/hive-ui/src/modules/providers/models/ModelCard.tsx +0 -36
  359. package/packages/hive-ui/src/modules/providers/models/ModelComparisonTable.tsx +0 -47
  360. package/packages/hive-ui/src/modules/providers/models/ModelList.tsx +0 -51
  361. package/packages/hive-ui/src/modules/providers/models/ModelPricingInfo.tsx +0 -17
  362. package/packages/hive-ui/src/modules/providers/models/ModelSelector.tsx +0 -32
  363. package/packages/hive-ui/src/modules/providers/models/index.ts +0 -7
  364. package/packages/hive-ui/src/pages/AgentDetailPage.tsx +0 -74
  365. package/packages/hive-ui/src/pages/AgentNewPage.tsx +0 -5
  366. package/packages/hive-ui/src/pages/AgentsPage.tsx +0 -147
  367. package/packages/hive-ui/src/pages/BridgePage.tsx +0 -83
  368. package/packages/hive-ui/src/pages/CanvasPage.tsx +0 -32
  369. package/packages/hive-ui/src/pages/ChannelsPage.tsx +0 -176
  370. package/packages/hive-ui/src/pages/DashboardPage.tsx +0 -321
  371. package/packages/hive-ui/src/pages/Index.tsx +0 -14
  372. package/packages/hive-ui/src/pages/LogsPage.tsx +0 -252
  373. package/packages/hive-ui/src/pages/NotFound.tsx +0 -24
  374. package/packages/hive-ui/src/pages/ProjectsPage.tsx +0 -241
  375. package/packages/hive-ui/src/pages/ProvidersPage.tsx +0 -111
  376. package/packages/hive-ui/src/pages/SettingsPage.tsx +0 -147
  377. package/packages/hive-ui/src/pages/SetupPage.tsx +0 -1177
  378. package/packages/hive-ui/src/pages/WebChatPage.tsx +0 -15
  379. package/packages/hive-ui/src/stores/agentConfigStore.ts +0 -32
  380. package/packages/hive-ui/src/stores/agentStore.ts +0 -5
  381. package/packages/hive-ui/src/stores/bridgeStore.ts +0 -237
  382. package/packages/hive-ui/src/stores/canvasStore.ts +0 -250
  383. package/packages/hive-ui/src/stores/channelStore.ts +0 -5
  384. package/packages/hive-ui/src/stores/chatStore.ts +0 -42
  385. package/packages/hive-ui/src/stores/ethicsStore.ts +0 -141
  386. package/packages/hive-ui/src/stores/mcpStore.ts +0 -5
  387. package/packages/hive-ui/src/stores/modelStore.ts +0 -2
  388. package/packages/hive-ui/src/stores/projectsStore.ts +0 -141
  389. package/packages/hive-ui/src/stores/providerStore.ts +0 -2
  390. package/packages/hive-ui/src/stores/skillStore.ts +0 -5
  391. package/packages/hive-ui/src/stores/toolStore.ts +0 -5
  392. package/packages/hive-ui/src/stores/useGlobalConfigStore.ts +0 -937
  393. package/packages/hive-ui/src/stores/useLoaderStore.ts +0 -21
  394. package/packages/hive-ui/src/stores/useNotesAndCronsStore.ts +0 -144
  395. package/packages/hive-ui/src/stores/useWebSocketStore.ts +0 -152
  396. package/packages/hive-ui/src/stores/useWelcomeStore.ts +0 -37
  397. package/packages/hive-ui/src/stores/userConfigStore.ts +0 -23
  398. package/packages/hive-ui/src/stores/userStore.ts +0 -82
  399. package/packages/hive-ui/src/test/setup.ts +0 -15
  400. package/packages/hive-ui/src/types/agent-config.ts +0 -33
  401. package/packages/hive-ui/src/types/agent.ts +0 -65
  402. package/packages/hive-ui/src/types/bridge.ts +0 -27
  403. package/packages/hive-ui/src/types/canvas.ts +0 -76
  404. package/packages/hive-ui/src/types/channels.ts +0 -109
  405. package/packages/hive-ui/src/types/chat.ts +0 -25
  406. package/packages/hive-ui/src/types/connections.ts +0 -17
  407. package/packages/hive-ui/src/types/ethics.ts +0 -41
  408. package/packages/hive-ui/src/types/index.ts +0 -15
  409. package/packages/hive-ui/src/types/mcp.ts +0 -36
  410. package/packages/hive-ui/src/types/notes-crons.ts +0 -31
  411. package/packages/hive-ui/src/types/providers.ts +0 -145
  412. package/packages/hive-ui/src/types/skill.ts +0 -12
  413. package/packages/hive-ui/src/types/tool.ts +0 -44
  414. package/packages/hive-ui/src/types/user.ts +0 -26
  415. package/packages/hive-ui/src/types/websocket.ts +0 -14
  416. package/packages/hive-ui/src/vite-env.d.ts +0 -1
  417. package/packages/mcp/package.json +0 -26
  418. package/packages/mcp/src/config.ts +0 -13
  419. package/packages/mcp/src/index.ts +0 -1
  420. package/packages/mcp/src/logger.ts +0 -42
  421. package/packages/mcp/src/manager.ts +0 -439
  422. package/packages/mcp/src/transports/index.ts +0 -67
  423. package/packages/mcp/src/transports/sse.ts +0 -241
  424. package/packages/mcp/src/transports/websocket.ts +0 -159
  425. package/packages/skills/package.json +0 -21
  426. package/packages/skills/src/index.ts +0 -1
  427. package/packages/skills/src/loader.ts +0 -346
@@ -1,303 +0,0 @@
1
- import * as React from "react";
2
- import * as RechartsPrimitive from "recharts";
3
-
4
- import { cn } from "@/lib/utils";
5
-
6
- // Format: { THEME_NAME: CSS_SELECTOR }
7
- const THEMES = { light: "", dark: ".dark" } as const;
8
-
9
- export type ChartConfig = {
10
- [k in string]: {
11
- label?: React.ReactNode;
12
- icon?: React.ComponentType;
13
- } & ({ color?: string; theme?: never } | { color?: never; theme: Record<keyof typeof THEMES, string> });
14
- };
15
-
16
- type ChartContextProps = {
17
- config: ChartConfig;
18
- };
19
-
20
- const ChartContext = React.createContext<ChartContextProps | null>(null);
21
-
22
- function useChart() {
23
- const context = React.useContext(ChartContext);
24
-
25
- if (!context) {
26
- throw new Error("useChart must be used within a <ChartContainer />");
27
- }
28
-
29
- return context;
30
- }
31
-
32
- const ChartContainer = React.forwardRef<
33
- HTMLDivElement,
34
- React.ComponentProps<"div"> & {
35
- config: ChartConfig;
36
- children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
37
- }
38
- >(({ id, className, children, config, ...props }, ref) => {
39
- const uniqueId = React.useId();
40
- const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
41
-
42
- return (
43
- <ChartContext.Provider value={{ config }}>
44
- <div
45
- data-chart={chartId}
46
- ref={ref}
47
- className={cn(
48
- "flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",
49
- className,
50
- )}
51
- {...props}
52
- >
53
- <ChartStyle id={chartId} config={config} />
54
- <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>
55
- </div>
56
- </ChartContext.Provider>
57
- );
58
- });
59
- ChartContainer.displayName = "Chart";
60
-
61
- const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
62
- const colorConfig = Object.entries(config).filter(([_, config]) => config.theme || config.color);
63
-
64
- if (!colorConfig.length) {
65
- return null;
66
- }
67
-
68
- return (
69
- <style
70
- dangerouslySetInnerHTML={{
71
- __html: Object.entries(THEMES)
72
- .map(
73
- ([theme, prefix]) => `
74
- ${prefix} [data-chart=${id}] {
75
- ${colorConfig
76
- .map(([key, itemConfig]) => {
77
- const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color;
78
- return color ? ` --color-${key}: ${color};` : null;
79
- })
80
- .join("\n")}
81
- }
82
- `,
83
- )
84
- .join("\n"),
85
- }}
86
- />
87
- );
88
- };
89
-
90
- const ChartTooltip = RechartsPrimitive.Tooltip;
91
-
92
- const ChartTooltipContent = React.forwardRef<
93
- HTMLDivElement,
94
- React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
95
- React.ComponentProps<"div"> & {
96
- hideLabel?: boolean;
97
- hideIndicator?: boolean;
98
- indicator?: "line" | "dot" | "dashed";
99
- nameKey?: string;
100
- labelKey?: string;
101
- }
102
- >(
103
- (
104
- {
105
- active,
106
- payload,
107
- className,
108
- indicator = "dot",
109
- hideLabel = false,
110
- hideIndicator = false,
111
- label,
112
- labelFormatter,
113
- labelClassName,
114
- formatter,
115
- color,
116
- nameKey,
117
- labelKey,
118
- },
119
- ref,
120
- ) => {
121
- const { config } = useChart();
122
-
123
- const tooltipLabel = React.useMemo(() => {
124
- if (hideLabel || !payload?.length) {
125
- return null;
126
- }
127
-
128
- const [item] = payload;
129
- const key = `${labelKey || item.dataKey || item.name || "value"}`;
130
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
131
- const value =
132
- !labelKey && typeof label === "string"
133
- ? config[label as keyof typeof config]?.label || label
134
- : itemConfig?.label;
135
-
136
- if (labelFormatter) {
137
- return <div className={cn("font-medium", labelClassName)}>{labelFormatter(value, payload)}</div>;
138
- }
139
-
140
- if (!value) {
141
- return null;
142
- }
143
-
144
- return <div className={cn("font-medium", labelClassName)}>{value}</div>;
145
- }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
146
-
147
- if (!active || !payload?.length) {
148
- return null;
149
- }
150
-
151
- const nestLabel = payload.length === 1 && indicator !== "dot";
152
-
153
- return (
154
- <div
155
- ref={ref}
156
- className={cn(
157
- "grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
158
- className,
159
- )}
160
- >
161
- {!nestLabel ? tooltipLabel : null}
162
- <div className="grid gap-1.5">
163
- {payload.map((item, index) => {
164
- const key = `${nameKey || item.name || item.dataKey || "value"}`;
165
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
166
- const indicatorColor = color || item.payload.fill || item.color;
167
-
168
- return (
169
- <div
170
- key={item.dataKey}
171
- className={cn(
172
- "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
173
- indicator === "dot" && "items-center",
174
- )}
175
- >
176
- {formatter && item?.value !== undefined && item.name ? (
177
- formatter(item.value, item.name, item, index, item.payload)
178
- ) : (
179
- <>
180
- {itemConfig?.icon ? (
181
- <itemConfig.icon />
182
- ) : (
183
- !hideIndicator && (
184
- <div
185
- className={cn("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]", {
186
- "h-2.5 w-2.5": indicator === "dot",
187
- "w-1": indicator === "line",
188
- "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
189
- "my-0.5": nestLabel && indicator === "dashed",
190
- })}
191
- style={
192
- {
193
- "--color-bg": indicatorColor,
194
- "--color-border": indicatorColor,
195
- } as React.CSSProperties
196
- }
197
- />
198
- )
199
- )}
200
- <div
201
- className={cn(
202
- "flex flex-1 justify-between leading-none",
203
- nestLabel ? "items-end" : "items-center",
204
- )}
205
- >
206
- <div className="grid gap-1.5">
207
- {nestLabel ? tooltipLabel : null}
208
- <span className="text-muted-foreground">{itemConfig?.label || item.name}</span>
209
- </div>
210
- {item.value && (
211
- <span className="font-mono font-medium tabular-nums text-foreground">
212
- {item.value.toLocaleString()}
213
- </span>
214
- )}
215
- </div>
216
- </>
217
- )}
218
- </div>
219
- );
220
- })}
221
- </div>
222
- </div>
223
- );
224
- },
225
- );
226
- ChartTooltipContent.displayName = "ChartTooltip";
227
-
228
- const ChartLegend = RechartsPrimitive.Legend;
229
-
230
- const ChartLegendContent = React.forwardRef<
231
- HTMLDivElement,
232
- React.ComponentProps<"div"> &
233
- Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
234
- hideIcon?: boolean;
235
- nameKey?: string;
236
- }
237
- >(({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
238
- const { config } = useChart();
239
-
240
- if (!payload?.length) {
241
- return null;
242
- }
243
-
244
- return (
245
- <div
246
- ref={ref}
247
- className={cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className)}
248
- >
249
- {payload.map((item) => {
250
- const key = `${nameKey || item.dataKey || "value"}`;
251
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
252
-
253
- return (
254
- <div
255
- key={item.value}
256
- className={cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground")}
257
- >
258
- {itemConfig?.icon && !hideIcon ? (
259
- <itemConfig.icon />
260
- ) : (
261
- <div
262
- className="h-2 w-2 shrink-0 rounded-[2px]"
263
- style={{
264
- backgroundColor: item.color,
265
- }}
266
- />
267
- )}
268
- {itemConfig?.label}
269
- </div>
270
- );
271
- })}
272
- </div>
273
- );
274
- });
275
- ChartLegendContent.displayName = "ChartLegend";
276
-
277
- // Helper to extract item config from a payload.
278
- function getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {
279
- if (typeof payload !== "object" || payload === null) {
280
- return undefined;
281
- }
282
-
283
- const payloadPayload =
284
- "payload" in payload && typeof payload.payload === "object" && payload.payload !== null
285
- ? payload.payload
286
- : undefined;
287
-
288
- let configLabelKey: string = key;
289
-
290
- if (key in payload && typeof payload[key as keyof typeof payload] === "string") {
291
- configLabelKey = payload[key as keyof typeof payload] as string;
292
- } else if (
293
- payloadPayload &&
294
- key in payloadPayload &&
295
- typeof payloadPayload[key as keyof typeof payloadPayload] === "string"
296
- ) {
297
- configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;
298
- }
299
-
300
- return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];
301
- }
302
-
303
- export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle };
@@ -1,26 +0,0 @@
1
- import * as React from "react";
2
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
- import { Check } from "lucide-react";
4
-
5
- import { cn } from "@/lib/utils";
6
-
7
- const Checkbox = React.forwardRef<
8
- React.ElementRef<typeof CheckboxPrimitive.Root>,
9
- React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
10
- >(({ className, ...props }, ref) => (
11
- <CheckboxPrimitive.Root
12
- ref={ref}
13
- className={cn(
14
- "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
15
- className,
16
- )}
17
- {...props}
18
- >
19
- <CheckboxPrimitive.Indicator className={cn("flex items-center justify-center text-current")}>
20
- <Check className="h-4 w-4" />
21
- </CheckboxPrimitive.Indicator>
22
- </CheckboxPrimitive.Root>
23
- ));
24
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
25
-
26
- export { Checkbox };
@@ -1,9 +0,0 @@
1
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
-
3
- const Collapsible = CollapsiblePrimitive.Root;
4
-
5
- const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
6
-
7
- const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
8
-
9
- export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -1,133 +0,0 @@
1
- import * as React from "react";
2
- import { type DialogProps } from "@radix-ui/react-dialog";
3
- import { Command as CommandPrimitive } from "cmdk";
4
- import { Search } from "lucide-react";
5
-
6
- import { cn } from "@/lib/utils";
7
- import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
8
-
9
- const Command = React.forwardRef<
10
- React.ElementRef<typeof CommandPrimitive>,
11
- React.ComponentPropsWithoutRef<typeof CommandPrimitive>
12
- >(({ className, ...props }, ref) => (
13
- <CommandPrimitive
14
- ref={ref}
15
- className={cn(
16
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
17
- className,
18
- )}
19
- {...props}
20
- />
21
- ));
22
- Command.displayName = CommandPrimitive.displayName;
23
-
24
- interface CommandDialogProps extends DialogProps { }
25
-
26
- const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
27
- return (
28
- <Dialog {...props}>
29
- <DialogContent className="overflow-hidden p-0 shadow-lg">
30
- <DialogTitle className="sr-only">Command</DialogTitle>
31
- <Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[data-cmdk-input-wrapper]_svg]:h-5 [&_[data-cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
32
- {children}
33
- </Command>
34
- </DialogContent>
35
- </Dialog>
36
- );
37
- };
38
-
39
- const CommandInput = React.forwardRef<
40
- React.ElementRef<typeof CommandPrimitive.Input>,
41
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
42
- >(({ className, ...props }, ref) => (
43
- <div className="flex items-center border-b px-3" data-cmdk-input-wrapper="">
44
- <Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
45
- <CommandPrimitive.Input
46
- ref={ref}
47
- className={cn(
48
- "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
49
- className,
50
- )}
51
- {...props}
52
- />
53
- </div>
54
- ));
55
-
56
- CommandInput.displayName = CommandPrimitive.Input.displayName;
57
-
58
- const CommandList = React.forwardRef<
59
- React.ElementRef<typeof CommandPrimitive.List>,
60
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
61
- >(({ className, ...props }, ref) => (
62
- <CommandPrimitive.List
63
- ref={ref}
64
- className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
65
- {...props}
66
- />
67
- ));
68
-
69
- CommandList.displayName = CommandPrimitive.List.displayName;
70
-
71
- const CommandEmpty = React.forwardRef<
72
- React.ElementRef<typeof CommandPrimitive.Empty>,
73
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
74
- >((props, ref) => <CommandPrimitive.Empty ref={ref} className="py-6 text-center text-sm" {...props} />);
75
-
76
- CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
77
-
78
- const CommandGroup = React.forwardRef<
79
- React.ElementRef<typeof CommandPrimitive.Group>,
80
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
81
- >(({ className, ...props }, ref) => (
82
- <CommandPrimitive.Group
83
- ref={ref}
84
- className={cn(
85
- "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
86
- className,
87
- )}
88
- {...props}
89
- />
90
- ));
91
-
92
- CommandGroup.displayName = CommandPrimitive.Group.displayName;
93
-
94
- const CommandSeparator = React.forwardRef<
95
- React.ElementRef<typeof CommandPrimitive.Separator>,
96
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
97
- >(({ className, ...props }, ref) => (
98
- <CommandPrimitive.Separator ref={ref} className={cn("-mx-1 h-px bg-border", className)} {...props} />
99
- ));
100
- CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
101
-
102
- const CommandItem = React.forwardRef<
103
- React.ElementRef<typeof CommandPrimitive.Item>,
104
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
105
- >(({ className, ...props }, ref) => (
106
- <CommandPrimitive.Item
107
- ref={ref}
108
- className={cn(
109
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",
110
- className,
111
- )}
112
- {...props}
113
- />
114
- ));
115
-
116
- CommandItem.displayName = CommandPrimitive.Item.displayName;
117
-
118
- const CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
119
- return <span className={cn("ml-auto text-xs tracking-widest text-muted-foreground", className)} {...props} />;
120
- };
121
- CommandShortcut.displayName = "CommandShortcut";
122
-
123
- export {
124
- Command,
125
- CommandDialog,
126
- CommandInput,
127
- CommandList,
128
- CommandEmpty,
129
- CommandGroup,
130
- CommandItem,
131
- CommandShortcut,
132
- CommandSeparator,
133
- };
@@ -1,178 +0,0 @@
1
- import * as React from "react";
2
- import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
3
- import { Check, ChevronRight, Circle } from "lucide-react";
4
-
5
- import { cn } from "@/lib/utils";
6
-
7
- const ContextMenu = ContextMenuPrimitive.Root;
8
-
9
- const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
10
-
11
- const ContextMenuGroup = ContextMenuPrimitive.Group;
12
-
13
- const ContextMenuPortal = ContextMenuPrimitive.Portal;
14
-
15
- const ContextMenuSub = ContextMenuPrimitive.Sub;
16
-
17
- const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
18
-
19
- const ContextMenuSubTrigger = React.forwardRef<
20
- React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,
21
- React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {
22
- inset?: boolean;
23
- }
24
- >(({ className, inset, children, ...props }, ref) => (
25
- <ContextMenuPrimitive.SubTrigger
26
- ref={ref}
27
- className={cn(
28
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
29
- inset && "pl-8",
30
- className,
31
- )}
32
- {...props}
33
- >
34
- {children}
35
- <ChevronRight className="ml-auto h-4 w-4" />
36
- </ContextMenuPrimitive.SubTrigger>
37
- ));
38
- ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
39
-
40
- const ContextMenuSubContent = React.forwardRef<
41
- React.ElementRef<typeof ContextMenuPrimitive.SubContent>,
42
- React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>
43
- >(({ className, ...props }, ref) => (
44
- <ContextMenuPrimitive.SubContent
45
- ref={ref}
46
- className={cn(
47
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
48
- className,
49
- )}
50
- {...props}
51
- />
52
- ));
53
- ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
54
-
55
- const ContextMenuContent = React.forwardRef<
56
- React.ElementRef<typeof ContextMenuPrimitive.Content>,
57
- React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>
58
- >(({ className, ...props }, ref) => (
59
- <ContextMenuPrimitive.Portal>
60
- <ContextMenuPrimitive.Content
61
- ref={ref}
62
- className={cn(
63
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
64
- className,
65
- )}
66
- {...props}
67
- />
68
- </ContextMenuPrimitive.Portal>
69
- ));
70
- ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
71
-
72
- const ContextMenuItem = React.forwardRef<
73
- React.ElementRef<typeof ContextMenuPrimitive.Item>,
74
- React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {
75
- inset?: boolean;
76
- }
77
- >(({ className, inset, ...props }, ref) => (
78
- <ContextMenuPrimitive.Item
79
- ref={ref}
80
- className={cn(
81
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
82
- inset && "pl-8",
83
- className,
84
- )}
85
- {...props}
86
- />
87
- ));
88
- ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
89
-
90
- const ContextMenuCheckboxItem = React.forwardRef<
91
- React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,
92
- React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>
93
- >(({ className, children, checked, ...props }, ref) => (
94
- <ContextMenuPrimitive.CheckboxItem
95
- ref={ref}
96
- className={cn(
97
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
98
- className,
99
- )}
100
- checked={checked}
101
- {...props}
102
- >
103
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
104
- <ContextMenuPrimitive.ItemIndicator>
105
- <Check className="h-4 w-4" />
106
- </ContextMenuPrimitive.ItemIndicator>
107
- </span>
108
- {children}
109
- </ContextMenuPrimitive.CheckboxItem>
110
- ));
111
- ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
112
-
113
- const ContextMenuRadioItem = React.forwardRef<
114
- React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,
115
- React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>
116
- >(({ className, children, ...props }, ref) => (
117
- <ContextMenuPrimitive.RadioItem
118
- ref={ref}
119
- className={cn(
120
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
121
- className,
122
- )}
123
- {...props}
124
- >
125
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
126
- <ContextMenuPrimitive.ItemIndicator>
127
- <Circle className="h-2 w-2 fill-current" />
128
- </ContextMenuPrimitive.ItemIndicator>
129
- </span>
130
- {children}
131
- </ContextMenuPrimitive.RadioItem>
132
- ));
133
- ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
134
-
135
- const ContextMenuLabel = React.forwardRef<
136
- React.ElementRef<typeof ContextMenuPrimitive.Label>,
137
- React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {
138
- inset?: boolean;
139
- }
140
- >(({ className, inset, ...props }, ref) => (
141
- <ContextMenuPrimitive.Label
142
- ref={ref}
143
- className={cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className)}
144
- {...props}
145
- />
146
- ));
147
- ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
148
-
149
- const ContextMenuSeparator = React.forwardRef<
150
- React.ElementRef<typeof ContextMenuPrimitive.Separator>,
151
- React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>
152
- >(({ className, ...props }, ref) => (
153
- <ContextMenuPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-border", className)} {...props} />
154
- ));
155
- ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
156
-
157
- const ContextMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
158
- return <span className={cn("ml-auto text-xs tracking-widest text-muted-foreground", className)} {...props} />;
159
- };
160
- ContextMenuShortcut.displayName = "ContextMenuShortcut";
161
-
162
- export {
163
- ContextMenu,
164
- ContextMenuTrigger,
165
- ContextMenuContent,
166
- ContextMenuItem,
167
- ContextMenuCheckboxItem,
168
- ContextMenuRadioItem,
169
- ContextMenuLabel,
170
- ContextMenuSeparator,
171
- ContextMenuShortcut,
172
- ContextMenuGroup,
173
- ContextMenuPortal,
174
- ContextMenuSub,
175
- ContextMenuSubContent,
176
- ContextMenuSubTrigger,
177
- ContextMenuRadioGroup,
178
- };