@sunub/obsidian-mcp-server 0.3.19 → 0.3.21

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 (527) hide show
  1. package/README.md +1 -24
  2. package/build/cli/App.d.ts +1 -0
  3. package/build/cli/App.js +273 -0
  4. package/build/cli/App.js.map +1 -0
  5. package/build/cli/AppContainer.d.ts +1 -0
  6. package/build/cli/AppContainer.js +19 -0
  7. package/build/cli/AppContainer.js.map +1 -0
  8. package/build/cli/colors.d.ts +15 -0
  9. package/build/cli/colors.js +15 -0
  10. package/build/cli/colors.js.map +1 -0
  11. package/build/cli/commands/types.d.ts +19 -0
  12. package/build/cli/commands/types.js +11 -0
  13. package/build/cli/commands/types.js.map +1 -0
  14. package/build/cli/config/SettingContext.d.ts +1 -0
  15. package/build/cli/config/SettingContext.js +2 -0
  16. package/build/cli/config/SettingContext.js.map +1 -0
  17. package/build/cli/config/mcpServersConfig.d.ts +30 -0
  18. package/build/cli/config/mcpServersConfig.js +119 -0
  19. package/build/cli/config/mcpServersConfig.js.map +1 -0
  20. package/build/cli/config/settingSchema.d.ts +162 -0
  21. package/build/cli/config/settingSchema.js +110 -0
  22. package/build/cli/config/settingSchema.js.map +1 -0
  23. package/build/cli/constants.d.ts +47 -0
  24. package/build/cli/constants.js +101 -0
  25. package/build/cli/constants.js.map +1 -0
  26. package/build/cli/context/InputContext.d.ts +12 -0
  27. package/build/cli/context/InputContext.js +10 -0
  28. package/build/cli/context/InputContext.js.map +1 -0
  29. package/build/cli/context/KeypressContext.d.ts +30 -0
  30. package/build/cli/context/KeypressContext.js +200 -0
  31. package/build/cli/context/KeypressContext.js.map +1 -0
  32. package/build/cli/context/KeypressContext.util.d.ts +7 -0
  33. package/build/cli/context/KeypressContext.util.js +476 -0
  34. package/build/cli/context/KeypressContext.util.js.map +1 -0
  35. package/build/cli/errors/index.d.ts +3 -0
  36. package/build/cli/errors/index.js +7 -0
  37. package/build/cli/errors/index.js.map +1 -0
  38. package/build/cli/hooks/useAtCompletion.d.ts +12 -0
  39. package/build/cli/hooks/useAtCompletion.js +5 -0
  40. package/build/cli/hooks/useAtCompletion.js.map +1 -0
  41. package/build/cli/hooks/useCommandCompletion.d.ts +59 -0
  42. package/build/cli/hooks/useCommandCompletion.js +344 -0
  43. package/build/cli/hooks/useCommandCompletion.js.map +1 -0
  44. package/build/cli/hooks/useCompletion.d.ts +22 -0
  45. package/build/cli/hooks/useCompletion.js +84 -0
  46. package/build/cli/hooks/useCompletion.js.map +1 -0
  47. package/build/cli/hooks/useDispatcher.d.ts +6 -0
  48. package/build/cli/hooks/useDispatcher.js +286 -0
  49. package/build/cli/hooks/useDispatcher.js.map +1 -0
  50. package/build/cli/hooks/useFocus.d.ts +2 -0
  51. package/build/cli/hooks/useFocus.js +3 -0
  52. package/build/cli/hooks/useFocus.js.map +1 -0
  53. package/build/cli/hooks/useHistoryManager.d.ts +32 -0
  54. package/build/cli/hooks/useHistoryManager.js +78 -0
  55. package/build/cli/hooks/useHistoryManager.js.map +1 -0
  56. package/build/cli/hooks/useInputHistory.d.ts +24 -0
  57. package/build/cli/hooks/useInputHistory.js +159 -0
  58. package/build/cli/hooks/useInputHistory.js.map +1 -0
  59. package/build/cli/hooks/useKeyMatchers.d.ts +17 -0
  60. package/build/cli/hooks/useKeyMatchers.js +18 -0
  61. package/build/cli/hooks/useKeyMatchers.js.map +1 -0
  62. package/build/cli/hooks/useKeypress.d.ts +19 -0
  63. package/build/cli/hooks/useKeypress.js +28 -0
  64. package/build/cli/hooks/useKeypress.js.map +1 -0
  65. package/build/cli/hooks/useLlmStream/constants.d.ts +4 -0
  66. package/build/cli/hooks/useLlmStream/constants.js +5 -0
  67. package/build/cli/hooks/useLlmStream/constants.js.map +1 -0
  68. package/build/cli/hooks/useLlmStream/index.d.ts +2 -0
  69. package/build/cli/hooks/useLlmStream/index.js +2 -0
  70. package/build/cli/hooks/useLlmStream/index.js.map +1 -0
  71. package/build/cli/hooks/useLlmStream/llmService.d.ts +2 -0
  72. package/build/cli/hooks/useLlmStream/llmService.js +111 -0
  73. package/build/cli/hooks/useLlmStream/llmService.js.map +1 -0
  74. package/build/cli/hooks/useLlmStream/types.d.ts +38 -0
  75. package/build/cli/hooks/useLlmStream/types.js.map +1 -0
  76. package/build/cli/hooks/useLlmStream/useLlmStream.d.ts +12 -0
  77. package/build/cli/hooks/useLlmStream/useLlmStream.js +176 -0
  78. package/build/cli/hooks/useLlmStream/useLlmStream.js.map +1 -0
  79. package/build/cli/hooks/useLlmStream/utils.d.ts +17 -0
  80. package/build/cli/hooks/useLlmStream/utils.js +142 -0
  81. package/build/cli/hooks/useLlmStream/utils.js.map +1 -0
  82. package/build/cli/hooks/useMcpClient.d.ts +10 -0
  83. package/build/cli/hooks/useMcpClient.js +98 -0
  84. package/build/cli/hooks/useMcpClient.js.map +1 -0
  85. package/build/cli/hooks/useMcpManager.d.ts +26 -0
  86. package/build/cli/hooks/useMcpManager.js +89 -0
  87. package/build/cli/hooks/useMcpManager.js.map +1 -0
  88. package/build/cli/hooks/usePromptCompletion.d.ts +19 -0
  89. package/build/cli/hooks/usePromptCompletion.js +13 -0
  90. package/build/cli/hooks/usePromptCompletion.js.map +1 -0
  91. package/build/cli/hooks/useRagContext.d.ts +6 -0
  92. package/build/cli/hooks/useRagContext.js +84 -0
  93. package/build/cli/hooks/useRagContext.js.map +1 -0
  94. package/build/cli/hooks/useShellCompletion.d.ts +18 -0
  95. package/build/cli/hooks/useShellCompletion.js +10 -0
  96. package/build/cli/hooks/useShellCompletion.js.map +1 -0
  97. package/build/cli/hooks/useSlashCompletion.d.ts +21 -0
  98. package/build/cli/hooks/useSlashCompletion.js +11 -0
  99. package/build/cli/hooks/useSlashCompletion.js.map +1 -0
  100. package/build/cli/hooks/useTerminalSize.d.ts +4 -0
  101. package/build/cli/hooks/useTerminalSize.js +21 -0
  102. package/build/cli/hooks/useTerminalSize.js.map +1 -0
  103. package/build/cli/index.d.ts +1 -0
  104. package/build/cli/index.js +27 -0
  105. package/build/cli/index.js.map +1 -0
  106. package/build/cli/key/input.d.ts +5 -0
  107. package/build/cli/key/input.js +9 -0
  108. package/build/cli/key/input.js.map +1 -0
  109. package/build/cli/key/keyBindings.d.ts +152 -0
  110. package/build/cli/key/keyBindings.js +630 -0
  111. package/build/cli/key/keyBindings.js.map +1 -0
  112. package/build/cli/key/keyMatchers.d.ts +19 -0
  113. package/build/cli/key/keyMatchers.js +25 -0
  114. package/build/cli/key/keyMatchers.js.map +1 -0
  115. package/build/cli/key/mouse.d.ts +23 -0
  116. package/build/cli/key/mouse.js +155 -0
  117. package/build/cli/key/mouse.js.map +1 -0
  118. package/build/cli/key/text-buffer.d.ts +156 -0
  119. package/build/cli/key/text-buffer.js +937 -0
  120. package/build/cli/key/text-buffer.js.map +1 -0
  121. package/build/cli/main.d.ts +1 -0
  122. package/build/cli/main.js +20 -0
  123. package/build/cli/main.js.map +1 -0
  124. package/build/cli/services/McpClientService.d.ts +32 -0
  125. package/build/cli/services/McpClientService.js +123 -0
  126. package/build/cli/services/McpClientService.js.map +1 -0
  127. package/build/cli/services/McpManager.d.ts +28 -0
  128. package/build/cli/services/McpManager.js +146 -0
  129. package/build/cli/services/McpManager.js.map +1 -0
  130. package/build/cli/theme/builtin/default-dark.d.ts +7 -0
  131. package/build/cli/theme/builtin/default-dark.js +143 -0
  132. package/build/cli/theme/builtin/default-dark.js.map +1 -0
  133. package/build/cli/theme/builtin/no-color.d.ts +7 -0
  134. package/build/cli/theme/builtin/no-color.js +125 -0
  135. package/build/cli/theme/builtin/no-color.js.map +1 -0
  136. package/build/cli/theme/builtin/tokyonight-dark.d.ts +7 -0
  137. package/build/cli/theme/builtin/tokyonight-dark.js +146 -0
  138. package/build/cli/theme/builtin/tokyonight-dark.js.map +1 -0
  139. package/build/cli/theme/semantic-colors.d.ts +2 -0
  140. package/build/cli/theme/semantic-colors.js +19 -0
  141. package/build/cli/theme/semantic-colors.js.map +1 -0
  142. package/build/cli/theme/semantic-tokens.d.ts +42 -0
  143. package/build/cli/theme/semantic-tokens.js +77 -0
  144. package/build/cli/theme/semantic-tokens.js.map +1 -0
  145. package/build/cli/theme/theme-manager.d.ts +32 -0
  146. package/build/cli/theme/theme-manager.js +150 -0
  147. package/build/cli/theme/theme-manager.js.map +1 -0
  148. package/build/cli/theme/theme.d.ts +107 -0
  149. package/build/cli/theme/theme.js +333 -0
  150. package/build/cli/theme/theme.js.map +1 -0
  151. package/build/cli/tmp.d.ts +1 -0
  152. package/build/cli/tmp.js +27 -0
  153. package/build/cli/tmp.js.map +1 -0
  154. package/build/cli/types.d.ts +97 -0
  155. package/build/cli/types.js +2 -0
  156. package/build/cli/types.js.map +1 -0
  157. package/build/cli/ui/ConnectionStatus.d.ts +13 -0
  158. package/build/cli/ui/ConnectionStatus.js +19 -0
  159. package/build/cli/ui/ConnectionStatus.js.map +1 -0
  160. package/build/cli/ui/HalfPaddingBox.d.ts +13 -0
  161. package/build/cli/ui/HalfPaddingBox.js +11 -0
  162. package/build/cli/ui/HalfPaddingBox.js.map +1 -0
  163. package/build/cli/ui/HelpCommands.d.ts +5 -0
  164. package/build/cli/ui/HelpCommands.js +11 -0
  165. package/build/cli/ui/HelpCommands.js.map +1 -0
  166. package/build/cli/ui/HistoryItemDisplay.d.ts +9 -0
  167. package/build/cli/ui/HistoryItemDisplay.js +34 -0
  168. package/build/cli/ui/HistoryItemDisplay.js.map +1 -0
  169. package/build/cli/ui/InputPrompt.d.ts +13 -0
  170. package/build/cli/ui/InputPrompt.js +138 -0
  171. package/build/cli/ui/InputPrompt.js.map +1 -0
  172. package/build/cli/ui/LLMErrorComponent.d.ts +6 -0
  173. package/build/cli/ui/LLMErrorComponent.js +18 -0
  174. package/build/cli/ui/LLMErrorComponent.js.map +1 -0
  175. package/build/cli/ui/LLMHealthChecker.d.ts +8 -0
  176. package/build/cli/ui/LLMHealthChecker.js +22 -0
  177. package/build/cli/ui/LLMHealthChecker.js.map +1 -0
  178. package/build/cli/ui/MCPServers.d.ts +11 -0
  179. package/build/cli/ui/MCPServers.js +15 -0
  180. package/build/cli/ui/MCPServers.js.map +1 -0
  181. package/build/cli/ui/MainContent.d.ts +12 -0
  182. package/build/cli/ui/MainContent.js +28 -0
  183. package/build/cli/ui/MainContent.js.map +1 -0
  184. package/build/cli/ui/MarkdownDisplay.d.ts +8 -0
  185. package/build/cli/ui/MarkdownDisplay.js +6 -0
  186. package/build/cli/ui/MarkdownDisplay.js.map +1 -0
  187. package/build/cli/ui/MouseContext.d.ts +1 -0
  188. package/build/cli/ui/MouseContext.js +2 -0
  189. package/build/cli/ui/MouseContext.js.map +1 -0
  190. package/build/cli/ui/SuggestionsDisplay.d.ts +25 -0
  191. package/build/cli/ui/SuggestionsDisplay.js +45 -0
  192. package/build/cli/ui/SuggestionsDisplay.js.map +1 -0
  193. package/build/cli/ui/SystemInfoSummaryBox.d.ts +6 -0
  194. package/build/cli/ui/SystemInfoSummaryBox.js +6 -0
  195. package/build/cli/ui/SystemInfoSummaryBox.js.map +1 -0
  196. package/build/cli/ui/ThinkingIndicator.d.ts +2 -0
  197. package/build/cli/ui/ThinkingIndicator.js +16 -0
  198. package/build/cli/ui/ThinkingIndicator.js.map +1 -0
  199. package/build/cli/ui/layout/DefaultAppLayout.d.ts +2 -0
  200. package/build/cli/ui/layout/DefaultAppLayout.js +6 -0
  201. package/build/cli/ui/layout/DefaultAppLayout.js.map +1 -0
  202. package/build/cli/ui/shared/ExpandableText.d.ts +14 -0
  203. package/build/cli/ui/shared/ExpandableText.js +19 -0
  204. package/build/cli/ui/shared/ExpandableText.js.map +1 -0
  205. package/build/cli/utils/cache.d.ts +21 -0
  206. package/build/cli/utils/cache.js +56 -0
  207. package/build/cli/utils/cache.js.map +1 -0
  208. package/build/cli/utils/cleanup.d.ts +1 -0
  209. package/build/cli/utils/cleanup.js +5 -0
  210. package/build/cli/utils/cleanup.js.map +1 -0
  211. package/build/cli/utils/commandUtils.d.ts +11 -0
  212. package/build/cli/utils/commandUtils.js +16 -0
  213. package/build/cli/utils/commandUtils.js.map +1 -0
  214. package/build/cli/utils/historyStorage.d.ts +13 -0
  215. package/build/cli/utils/historyStorage.js +64 -0
  216. package/build/cli/utils/historyStorage.js.map +1 -0
  217. package/build/cli/utils/stdio.d.ts +18 -0
  218. package/build/cli/utils/stdio.js +58 -0
  219. package/build/cli/utils/stdio.js.map +1 -0
  220. package/build/cli/utils/terminal.d.ts +15 -0
  221. package/build/cli/utils/terminal.js +51 -0
  222. package/build/cli/utils/terminal.js.map +1 -0
  223. package/build/cli/utils/textUtil.d.ts +63 -0
  224. package/build/cli/utils/textUtil.js +231 -0
  225. package/build/cli/utils/textUtil.js.map +1 -0
  226. package/build/config.d.ts +25 -0
  227. package/{dist/src → build}/config.js +29 -8
  228. package/build/config.js.map +1 -0
  229. package/build/index.d.ts +2 -0
  230. package/{dist/src → build}/index.js +0 -3
  231. package/build/index.js.map +1 -0
  232. package/{dist/src → build}/server.d.ts +0 -1
  233. package/{dist/src → build}/server.js +1 -2
  234. package/build/server.js.map +1 -0
  235. package/{dist/src → build}/setup.d.ts +0 -2
  236. package/{dist/src → build}/setup.js +2 -4
  237. package/build/setup.js.map +1 -0
  238. package/build/shared/configSchema.d.ts +27 -0
  239. package/build/shared/configSchema.js +31 -0
  240. package/build/shared/configSchema.js.map +1 -0
  241. package/build/shared/index.d.ts +3 -0
  242. package/build/shared/index.js +4 -0
  243. package/build/shared/index.js.map +1 -0
  244. package/build/shared/types.d.ts +20 -0
  245. package/build/shared/types.js +2 -0
  246. package/build/shared/types.js.map +1 -0
  247. package/build/shared/utils/debugLogger.d.ts +12 -0
  248. package/build/shared/utils/debugLogger.js +54 -0
  249. package/build/shared/utils/debugLogger.js.map +1 -0
  250. package/{dist/src → build}/tools/create_document_with_properties/index.d.ts +22 -5
  251. package/{dist/src → build}/tools/create_document_with_properties/index.js +2 -2
  252. package/build/tools/create_document_with_properties/index.js.map +1 -0
  253. package/build/tools/create_document_with_properties/params.d.ts +66 -0
  254. package/{dist/src → build}/tools/create_document_with_properties/params.js +1 -1
  255. package/build/tools/create_document_with_properties/params.js.map +1 -0
  256. package/{dist/src → build}/tools/generate_property/index.d.ts +1 -2
  257. package/{dist/src → build}/tools/generate_property/index.js +1 -1
  258. package/build/tools/generate_property/index.js.map +1 -0
  259. package/{dist/src → build}/tools/generate_property/params.d.ts +30 -7
  260. package/build/tools/generate_property/params.js.map +1 -0
  261. package/{dist/src → build}/tools/index.d.ts +51 -36
  262. package/build/tools/index.js +13 -0
  263. package/build/tools/index.js.map +1 -0
  264. package/{dist/src → build}/tools/organize_attachments/index.d.ts +1 -2
  265. package/{dist/src → build}/tools/organize_attachments/index.js +2 -2
  266. package/build/tools/organize_attachments/index.js.map +1 -0
  267. package/build/tools/organize_attachments/params.d.ts +122 -0
  268. package/{dist/src → build}/tools/organize_attachments/params.js +3 -3
  269. package/build/tools/organize_attachments/params.js.map +1 -0
  270. package/{dist/src → build}/tools/organize_attachments/utils.d.ts +0 -1
  271. package/build/tools/organize_attachments/utils.js.map +1 -0
  272. package/{dist/src → build}/tools/vault/index.d.ts +5 -26
  273. package/{dist/src → build}/tools/vault/index.js +3 -3
  274. package/build/tools/vault/index.js.map +1 -0
  275. package/{dist/src → build}/tools/vault/metrics.d.ts +0 -1
  276. package/build/tools/vault/metrics.js.map +1 -0
  277. package/build/tools/vault/params.d.ts +115 -0
  278. package/{dist/src → build}/tools/vault/params.js +0 -1
  279. package/build/tools/vault/params.js.map +1 -0
  280. package/build/tools/vault/types/collect_context.d.ts +1340 -0
  281. package/{dist/src → build}/tools/vault/types/collect_context.js +1 -1
  282. package/build/tools/vault/types/collect_context.js.map +1 -0
  283. package/build/tools/vault/types/list_all.d.ts +387 -0
  284. package/{dist/src → build}/tools/vault/types/list_all.js +4 -9
  285. package/build/tools/vault/types/list_all.js.map +1 -0
  286. package/build/tools/vault/types/read_specific.d.ts +297 -0
  287. package/{dist/src → build}/tools/vault/types/read_specific.js +1 -3
  288. package/build/tools/vault/types/read_specific.js.map +1 -0
  289. package/build/tools/vault/types/search.d.ts +598 -0
  290. package/{dist/src → build}/tools/vault/types/search.js +8 -16
  291. package/build/tools/vault/types/search.js.map +1 -0
  292. package/{dist/src → build}/tools/vault/utils/actions/collect_context.d.ts +1 -2
  293. package/{dist/src → build}/tools/vault/utils/actions/collect_context.js +4 -4
  294. package/build/tools/vault/utils/actions/collect_context.js.map +1 -0
  295. package/{dist/src → build}/tools/vault/utils/actions/index_rag.d.ts +0 -1
  296. package/build/tools/vault/utils/actions/index_rag.js.map +1 -0
  297. package/{dist/src → build}/tools/vault/utils/actions/list_all.d.ts +1 -2
  298. package/{dist/src → build}/tools/vault/utils/actions/list_all.js +1 -1
  299. package/build/tools/vault/utils/actions/list_all.js.map +1 -0
  300. package/{dist/src → build}/tools/vault/utils/actions/load_memory.d.ts +1 -2
  301. package/{dist/src → build}/tools/vault/utils/actions/load_memory.js +3 -3
  302. package/build/tools/vault/utils/actions/load_memory.js.map +1 -0
  303. package/{dist/src → build}/tools/vault/utils/actions/read.d.ts +1 -2
  304. package/{dist/src → build}/tools/vault/utils/actions/read.js +1 -1
  305. package/build/tools/vault/utils/actions/read.js.map +1 -0
  306. package/{dist/src → build}/tools/vault/utils/actions/search.d.ts +1 -2
  307. package/{dist/src → build}/tools/vault/utils/actions/search.js +2 -2
  308. package/build/tools/vault/utils/actions/search.js.map +1 -0
  309. package/{dist/src → build}/tools/vault/utils/actions/stats.d.ts +0 -1
  310. package/build/tools/vault/utils/actions/stats.js.map +1 -0
  311. package/{dist/src → build}/tools/vault/utils/constants.d.ts +0 -1
  312. package/build/tools/vault/utils/constants.js.map +1 -0
  313. package/{dist/src → build}/tools/vault/utils/document.d.ts +0 -6
  314. package/{dist/src → build}/tools/vault/utils/document.js +0 -1
  315. package/build/tools/vault/utils/document.js.map +1 -0
  316. package/{dist/src → build}/tools/vault/utils/shared.d.ts +1 -2
  317. package/build/tools/vault/utils/shared.js.map +1 -0
  318. package/build/tools/vault/utils.d.ts +7 -0
  319. package/build/tools/vault/utils.js +8 -0
  320. package/build/tools/vault/utils.js.map +1 -0
  321. package/{dist/src → build}/tools/write_property/index.d.ts +22 -5
  322. package/{dist/src → build}/tools/write_property/index.js +1 -1
  323. package/build/tools/write_property/index.js.map +1 -0
  324. package/build/tools/write_property/params.d.ts +60 -0
  325. package/build/tools/write_property/params.js.map +1 -0
  326. package/{dist/src → build}/utils/DirectoryWalker.d.ts +1 -2
  327. package/build/utils/DirectoryWalker.js.map +1 -0
  328. package/{dist/src → build}/utils/Embedder.d.ts +0 -1
  329. package/{dist/src → build}/utils/Embedder.js +1 -1
  330. package/build/utils/Embedder.js.map +1 -0
  331. package/{dist/src → build}/utils/Indexer.d.ts +2 -3
  332. package/{dist/src → build}/utils/Indexer.js +2 -2
  333. package/build/utils/Indexer.js.map +1 -0
  334. package/{dist/src → build}/utils/LLMClient.d.ts +0 -5
  335. package/build/utils/LLMClient.js +53 -0
  336. package/build/utils/LLMClient.js.map +1 -0
  337. package/{dist/src → build}/utils/LocalReranker.d.ts +0 -1
  338. package/{dist/src → build}/utils/LocalReranker.js +1 -1
  339. package/build/utils/LocalReranker.js.map +1 -0
  340. package/{dist/src → build}/utils/RAGIndexer.d.ts +1 -2
  341. package/{dist/src → build}/utils/RAGIndexer.js +8 -11
  342. package/build/utils/RAGIndexer.js.map +1 -0
  343. package/build/utils/RerankerClient.d.ts +61 -0
  344. package/{dist/src → build}/utils/RerankerClient.js +1 -20
  345. package/build/utils/RerankerClient.js.map +1 -0
  346. package/{dist/src → build}/utils/VaultManger/VaultManager.d.ts +3 -7
  347. package/{dist/src → build}/utils/VaultManger/VaultManager.js +17 -20
  348. package/build/utils/VaultManger/VaultManager.js.map +1 -0
  349. package/{dist/src → build}/utils/VaultManger/VaultPathError.d.ts +0 -1
  350. package/build/utils/VaultManger/VaultPathError.js.map +1 -0
  351. package/build/utils/VaultManger/index.d.ts +3 -0
  352. package/build/utils/VaultManger/index.js +3 -0
  353. package/build/utils/VaultManger/index.js.map +1 -0
  354. package/{dist/src → build}/utils/VaultManger/types.d.ts +1 -2
  355. package/build/utils/VaultManger/types.js +2 -0
  356. package/build/utils/VaultManger/types.js.map +1 -0
  357. package/{dist/src → build}/utils/VaultWatcher.d.ts +0 -1
  358. package/{dist/src → build}/utils/VaultWatcher.js +1 -1
  359. package/build/utils/VaultWatcher.js.map +1 -0
  360. package/{dist/src → build}/utils/VectorDB.d.ts +0 -1
  361. package/build/utils/VectorDB.js +241 -0
  362. package/build/utils/VectorDB.js.map +1 -0
  363. package/{dist/src → build}/utils/constants.d.ts +0 -1
  364. package/build/utils/constants.js.map +1 -0
  365. package/{dist/src → build}/utils/createToolError.d.ts +0 -1
  366. package/build/utils/createToolError.js.map +1 -0
  367. package/build/utils/getVaultManager.d.ts +2 -0
  368. package/{dist/src → build}/utils/getVaultManager.js +1 -7
  369. package/build/utils/getVaultManager.js.map +1 -0
  370. package/{dist/src → build}/utils/processor/LinkExtractor.d.ts +0 -1
  371. package/build/utils/processor/LinkExtractor.js.map +1 -0
  372. package/build/utils/processor/MatterParser.d.ts +2 -0
  373. package/build/utils/processor/MatterParser.js +28 -0
  374. package/build/utils/processor/MatterParser.js.map +1 -0
  375. package/build/utils/processor/types.d.ts +104 -0
  376. package/{dist/src → build}/utils/processor/types.js +2 -10
  377. package/build/utils/processor/types.js.map +1 -0
  378. package/{dist/src → build}/utils/semaphore.d.ts +0 -1
  379. package/build/utils/semaphore.js.map +1 -0
  380. package/package.json +84 -72
  381. package/dist/package.json +0 -74
  382. package/dist/src/config.d.ts +0 -6
  383. package/dist/src/config.d.ts.map +0 -1
  384. package/dist/src/config.js.map +0 -1
  385. package/dist/src/db.d.ts +0 -2
  386. package/dist/src/db.d.ts.map +0 -1
  387. package/dist/src/db.js +0 -58
  388. package/dist/src/db.js.map +0 -1
  389. package/dist/src/index.d.ts +0 -3
  390. package/dist/src/index.d.ts.map +0 -1
  391. package/dist/src/index.js.map +0 -1
  392. package/dist/src/server.d.ts.map +0 -1
  393. package/dist/src/server.js.map +0 -1
  394. package/dist/src/setup.d.ts.map +0 -1
  395. package/dist/src/setup.js.map +0 -1
  396. package/dist/src/tools/create_document_with_properties/index.d.ts.map +0 -1
  397. package/dist/src/tools/create_document_with_properties/index.js.map +0 -1
  398. package/dist/src/tools/create_document_with_properties/params.d.ts +0 -19
  399. package/dist/src/tools/create_document_with_properties/params.d.ts.map +0 -1
  400. package/dist/src/tools/create_document_with_properties/params.js.map +0 -1
  401. package/dist/src/tools/generate_property/index.d.ts.map +0 -1
  402. package/dist/src/tools/generate_property/index.js.map +0 -1
  403. package/dist/src/tools/generate_property/params.d.ts.map +0 -1
  404. package/dist/src/tools/generate_property/params.js.map +0 -1
  405. package/dist/src/tools/index.d.ts.map +0 -1
  406. package/dist/src/tools/index.js +0 -13
  407. package/dist/src/tools/index.js.map +0 -1
  408. package/dist/src/tools/organize_attachments/index.d.ts.map +0 -1
  409. package/dist/src/tools/organize_attachments/index.js.map +0 -1
  410. package/dist/src/tools/organize_attachments/params.d.ts +0 -47
  411. package/dist/src/tools/organize_attachments/params.d.ts.map +0 -1
  412. package/dist/src/tools/organize_attachments/params.js.map +0 -1
  413. package/dist/src/tools/organize_attachments/utils.d.ts.map +0 -1
  414. package/dist/src/tools/organize_attachments/utils.js.map +0 -1
  415. package/dist/src/tools/vault/index.d.ts.map +0 -1
  416. package/dist/src/tools/vault/index.js.map +0 -1
  417. package/dist/src/tools/vault/metrics.d.ts.map +0 -1
  418. package/dist/src/tools/vault/metrics.js.map +0 -1
  419. package/dist/src/tools/vault/params.d.ts +0 -100
  420. package/dist/src/tools/vault/params.d.ts.map +0 -1
  421. package/dist/src/tools/vault/params.js.map +0 -1
  422. package/dist/src/tools/vault/types/collect_context.d.ts +0 -388
  423. package/dist/src/tools/vault/types/collect_context.d.ts.map +0 -1
  424. package/dist/src/tools/vault/types/collect_context.js.map +0 -1
  425. package/dist/src/tools/vault/types/list_all.d.ts +0 -89
  426. package/dist/src/tools/vault/types/list_all.d.ts.map +0 -1
  427. package/dist/src/tools/vault/types/list_all.js.map +0 -1
  428. package/dist/src/tools/vault/types/read_specific.d.ts +0 -68
  429. package/dist/src/tools/vault/types/read_specific.d.ts.map +0 -1
  430. package/dist/src/tools/vault/types/read_specific.js.map +0 -1
  431. package/dist/src/tools/vault/types/search.d.ts +0 -151
  432. package/dist/src/tools/vault/types/search.d.ts.map +0 -1
  433. package/dist/src/tools/vault/types/search.js.map +0 -1
  434. package/dist/src/tools/vault/utils/actions/collect_context.d.ts.map +0 -1
  435. package/dist/src/tools/vault/utils/actions/collect_context.js.map +0 -1
  436. package/dist/src/tools/vault/utils/actions/index_rag.d.ts.map +0 -1
  437. package/dist/src/tools/vault/utils/actions/index_rag.js.map +0 -1
  438. package/dist/src/tools/vault/utils/actions/list_all.d.ts.map +0 -1
  439. package/dist/src/tools/vault/utils/actions/list_all.js.map +0 -1
  440. package/dist/src/tools/vault/utils/actions/load_memory.d.ts.map +0 -1
  441. package/dist/src/tools/vault/utils/actions/load_memory.js.map +0 -1
  442. package/dist/src/tools/vault/utils/actions/read.d.ts.map +0 -1
  443. package/dist/src/tools/vault/utils/actions/read.js.map +0 -1
  444. package/dist/src/tools/vault/utils/actions/search.d.ts.map +0 -1
  445. package/dist/src/tools/vault/utils/actions/search.js.map +0 -1
  446. package/dist/src/tools/vault/utils/actions/stats.d.ts.map +0 -1
  447. package/dist/src/tools/vault/utils/actions/stats.js.map +0 -1
  448. package/dist/src/tools/vault/utils/constants.d.ts.map +0 -1
  449. package/dist/src/tools/vault/utils/constants.js.map +0 -1
  450. package/dist/src/tools/vault/utils/document.d.ts.map +0 -1
  451. package/dist/src/tools/vault/utils/document.js.map +0 -1
  452. package/dist/src/tools/vault/utils/shared.d.ts.map +0 -1
  453. package/dist/src/tools/vault/utils/shared.js.map +0 -1
  454. package/dist/src/tools/vault/utils.d.ts +0 -8
  455. package/dist/src/tools/vault/utils.d.ts.map +0 -1
  456. package/dist/src/tools/vault/utils.js +0 -8
  457. package/dist/src/tools/vault/utils.js.map +0 -1
  458. package/dist/src/tools/write_property/index.d.ts.map +0 -1
  459. package/dist/src/tools/write_property/index.js.map +0 -1
  460. package/dist/src/tools/write_property/params.d.ts +0 -17
  461. package/dist/src/tools/write_property/params.d.ts.map +0 -1
  462. package/dist/src/tools/write_property/params.js.map +0 -1
  463. package/dist/src/utils/DirectoryWalker.d.ts.map +0 -1
  464. package/dist/src/utils/DirectoryWalker.js.map +0 -1
  465. package/dist/src/utils/Embedder.d.ts.map +0 -1
  466. package/dist/src/utils/Embedder.js.map +0 -1
  467. package/dist/src/utils/Indexer.d.ts.map +0 -1
  468. package/dist/src/utils/Indexer.js.map +0 -1
  469. package/dist/src/utils/LLMClient.d.ts.map +0 -1
  470. package/dist/src/utils/LLMClient.js +0 -112
  471. package/dist/src/utils/LLMClient.js.map +0 -1
  472. package/dist/src/utils/LocalReranker.d.ts.map +0 -1
  473. package/dist/src/utils/LocalReranker.js.map +0 -1
  474. package/dist/src/utils/RAGIndexer.d.ts.map +0 -1
  475. package/dist/src/utils/RAGIndexer.js.map +0 -1
  476. package/dist/src/utils/RerankerClient.d.ts +0 -28
  477. package/dist/src/utils/RerankerClient.d.ts.map +0 -1
  478. package/dist/src/utils/RerankerClient.js.map +0 -1
  479. package/dist/src/utils/VaultManger/VaultManager.d.ts.map +0 -1
  480. package/dist/src/utils/VaultManger/VaultManager.js.map +0 -1
  481. package/dist/src/utils/VaultManger/VaultPathError.d.ts.map +0 -1
  482. package/dist/src/utils/VaultManger/VaultPathError.js.map +0 -1
  483. package/dist/src/utils/VaultManger/index.d.ts +0 -4
  484. package/dist/src/utils/VaultManger/index.d.ts.map +0 -1
  485. package/dist/src/utils/VaultManger/index.js +0 -3
  486. package/dist/src/utils/VaultManger/index.js.map +0 -1
  487. package/dist/src/utils/VaultManger/types.d.ts.map +0 -1
  488. package/dist/src/utils/VaultManger/types.js.map +0 -1
  489. package/dist/src/utils/VaultWatcher.d.ts.map +0 -1
  490. package/dist/src/utils/VaultWatcher.js.map +0 -1
  491. package/dist/src/utils/VectorDB.d.ts.map +0 -1
  492. package/dist/src/utils/VectorDB.js +0 -305
  493. package/dist/src/utils/VectorDB.js.map +0 -1
  494. package/dist/src/utils/constants.d.ts.map +0 -1
  495. package/dist/src/utils/constants.js.map +0 -1
  496. package/dist/src/utils/createToolError.d.ts.map +0 -1
  497. package/dist/src/utils/createToolError.js.map +0 -1
  498. package/dist/src/utils/getVaultManager.d.ts +0 -7
  499. package/dist/src/utils/getVaultManager.d.ts.map +0 -1
  500. package/dist/src/utils/getVaultManager.js.map +0 -1
  501. package/dist/src/utils/processor/LinkExtractor.d.ts.map +0 -1
  502. package/dist/src/utils/processor/LinkExtractor.js.map +0 -1
  503. package/dist/src/utils/processor/MatterParser.d.ts +0 -3
  504. package/dist/src/utils/processor/MatterParser.d.ts.map +0 -1
  505. package/dist/src/utils/processor/MatterParser.js +0 -27
  506. package/dist/src/utils/processor/MatterParser.js.map +0 -1
  507. package/dist/src/utils/processor/types.d.ts +0 -53
  508. package/dist/src/utils/processor/types.d.ts.map +0 -1
  509. package/dist/src/utils/processor/types.js.map +0 -1
  510. package/dist/src/utils/semaphore.d.ts.map +0 -1
  511. package/dist/src/utils/semaphore.js.map +0 -1
  512. package/dist/tsconfig.build.tsbuildinfo +0 -1
  513. /package/{dist/src/utils/VaultManger → build/cli/hooks/useLlmStream}/types.js +0 -0
  514. /package/{dist/src → build}/tools/generate_property/params.js +0 -0
  515. /package/{dist/src → build}/tools/organize_attachments/utils.js +0 -0
  516. /package/{dist/src → build}/tools/vault/metrics.js +0 -0
  517. /package/{dist/src → build}/tools/vault/utils/actions/index_rag.js +0 -0
  518. /package/{dist/src → build}/tools/vault/utils/actions/stats.js +0 -0
  519. /package/{dist/src → build}/tools/vault/utils/constants.js +0 -0
  520. /package/{dist/src → build}/tools/vault/utils/shared.js +0 -0
  521. /package/{dist/src → build}/tools/write_property/params.js +0 -0
  522. /package/{dist/src → build}/utils/DirectoryWalker.js +0 -0
  523. /package/{dist/src → build}/utils/VaultManger/VaultPathError.js +0 -0
  524. /package/{dist/src → build}/utils/constants.js +0 -0
  525. /package/{dist/src → build}/utils/createToolError.js +0 -0
  526. /package/{dist/src → build}/utils/processor/LinkExtractor.js +0 -0
  527. /package/{dist/src → build}/utils/semaphore.js +0 -0
@@ -0,0 +1,5 @@
1
+ interface HelpCommandsProps {
2
+ width?: number;
3
+ }
4
+ export declare function HelpCommands({ width }: HelpCommandsProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SLASH_COMMANDS } from "../constants.js";
3
+ import { Box, Text } from "ink";
4
+ import tools from "../../tools/index.js";
5
+ export function HelpCommands({ width }) {
6
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "gray", width: width ? width - 2 : undefined, children: [_jsx(Text, { bold: true, color: "yellow", children: "\uD83D\uDCA1 Slash Commands:" }), SLASH_COMMANDS.map((item) => (_jsxs(Box, { marginLeft: 2, children: [_jsx(Box, { width: 20, children: _jsx(Text, { color: "cyan", children: item.command }) }), _jsxs(Text, { children: ["\u2014 ", item.desc] })] }, item.command))), _jsx(Box, { marginTop: 1, children: _jsx(Text, { bold: true, color: "yellow", children: "\uD83D\uDEE0 MCP Tools (Internal):" }) }), Object.entries(tools).map(([name, info]) => {
7
+ const tool = info;
8
+ return (_jsxs(Box, { flexDirection: "column", marginLeft: 2, marginTop: 0, children: [_jsx(Text, { color: "magenta", children: tool.name }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { color: "gray", italic: true, children: tool.shorthandDescription.en }) })] }, name));
9
+ }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "\uC790\uC5F0\uC5B4 \uC9C8\uBB38\uC740 \uC2AC\uB798\uC2DC \uC5C6\uC774 \uC785\uB825\uD558\uBA74 RAG \uAE30\uBC18\uC73C\uB85C \uB2F5\uBCC0\uD569\uB2C8\uB2E4." }) })] }));
10
+ }
11
+ //# sourceMappingURL=HelpCommands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelpCommands.js","sourceRoot":"","sources":["../../../src/cli/ui/HelpCommands.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,KAAK,MAAM,kBAAkB,CAAC;AAcrC,MAAM,UAAU,YAAY,CAAC,EAAE,KAAK,EAAqB;IACxD,OAAO,CACN,MAAC,GAAG,IACH,aAAa,EAAC,QAAQ,EACtB,OAAO,EAAE,CAAC,EACV,WAAW,EAAC,OAAO,EACnB,WAAW,EAAC,MAAM,EAClB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,aAEpC,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,QAAQ,6CAElB,EACN,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC7B,MAAC,GAAG,IAAoB,UAAU,EAAE,CAAC,aACpC,KAAC,GAAG,IAAC,KAAK,EAAE,EAAE,YACb,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YAAE,IAAI,CAAC,OAAO,GAAQ,GACnC,EACN,MAAC,IAAI,0BAAI,IAAI,CAAC,IAAI,IAAQ,KAJjB,IAAI,CAAC,OAAO,CAKhB,CACN,CAAC,EAEF,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YAChB,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,QAAQ,mDAElB,GACF,EACL,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;gBAC3C,MAAM,IAAI,GAAG,IAA2B,CAAC;gBACzC,OAAO,CACN,MAAC,GAAG,IAAY,aAAa,EAAC,QAAQ,EAAC,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,aACjE,KAAC,IAAI,IAAC,KAAK,EAAC,SAAS,YAAE,IAAI,CAAC,IAAI,GAAQ,EACxC,KAAC,GAAG,IAAC,UAAU,EAAE,CAAC,YACjB,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,MAAM,kBACvB,IAAI,CAAC,oBAAoB,CAAC,EAAE,GACvB,GACF,KANG,IAAI,CAOR,CACN,CAAC;YACH,CAAC,CAAC,EAEF,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YAChB,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,4KAEX,GACF,IACD,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { ContentRenderer, HistoryItem } from "../types.js";
2
+ import type React from "react";
3
+ interface HistoryItemDisplayProps {
4
+ item: HistoryItem;
5
+ width: number;
6
+ contentRenderer?: ContentRenderer;
7
+ }
8
+ export declare const HistoryItemDisplay: React.FC<HistoryItemDisplayProps>;
9
+ export {};
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ const renderPlainText = (content, _width) => content;
4
+ const LABEL_MAP = {
5
+ user: {
6
+ type: "user",
7
+ label: "▶ You",
8
+ fontColor: "#F1F5F9",
9
+ highlightColor: "#F1F5F9",
10
+ },
11
+ assistant: {
12
+ type: "assistant",
13
+ label: "◀ Assistant",
14
+ fontColor: "white",
15
+ highlightColor: "magenta",
16
+ },
17
+ error: {
18
+ type: "error",
19
+ label: "✖ Error",
20
+ highlightColor: "red",
21
+ fontColor: "white",
22
+ },
23
+ info: {
24
+ type: "info",
25
+ label: "ℹ Info",
26
+ highlightColor: "yellow",
27
+ fontColor: "white",
28
+ },
29
+ };
30
+ export const HistoryItemDisplay = ({ item, width, contentRenderer = renderPlainText, }) => {
31
+ const { label, fontColor, highlightColor, type } = LABEL_MAP[item.type];
32
+ return (_jsx(Box, { width: width, flexDirection: "column", paddingLeft: 1, paddingRight: 1, marginTop: 1, marginBottom: 1, children: type === "user" ? (_jsxs(_Fragment, { children: [_jsx(Text, { bold: true, color: highlightColor, children: label }), _jsx(Text, { color: fontColor, children: contentRenderer(item.content, width) })] })) : (_jsxs(_Fragment, { children: [_jsx(Box, { paddingBottom: 1, children: _jsx(Text, { bold: true, color: highlightColor, children: label }) }), _jsx(Text, { color: fontColor, children: contentRenderer(item.content, width) })] })) }));
33
+ };
34
+ //# sourceMappingURL=HistoryItemDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HistoryItemDisplay.js","sourceRoot":"","sources":["../../../src/cli/ui/HistoryItemDisplay.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAKhC,MAAM,eAAe,GAAoB,CAAC,OAAe,EAAE,MAAc,EAAE,EAAE,CAC5E,OAAO,CAAC;AAQT,MAAM,SAAS,GAQX;IACH,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,SAAS;QACpB,cAAc,EAAE,SAAS;KACzB;IACD,SAAS,EAAE;QACV,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,aAAa;QACpB,SAAS,EAAE,OAAO;QAClB,cAAc,EAAE,SAAS;KACzB;IACD,KAAK,EAAE;QACN,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,SAAS;QAChB,cAAc,EAAE,KAAK;QACrB,SAAS,EAAE,OAAO;KAClB;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,QAAQ;QACf,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,OAAO;KAClB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAsC,CAAC,EACrE,IAAI,EACJ,KAAK,EACL,eAAe,GAAG,eAAe,GACjC,EAAE,EAAE;IACJ,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAExE,OAAO,CACN,KAAC,GAAG,IACH,KAAK,EAAE,KAAK,EACZ,aAAa,EAAC,QAAQ,EACtB,WAAW,EAAE,CAAC,EACd,YAAY,EAAE,CAAC,EACf,SAAS,EAAE,CAAC,EACZ,YAAY,EAAE,CAAC,YAEd,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAClB,8BACC,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,cAAc,YAC9B,KAAK,GACA,EACP,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,YAAG,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,GAAQ,IACnE,CACH,CAAC,CAAC,CAAC,CACH,8BACC,KAAC,GAAG,IAAC,aAAa,EAAE,CAAC,YACpB,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,cAAc,YAC9B,KAAK,GACA,GACF,EACN,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,YAAG,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,GAAQ,IACnE,CACH,GACI,CACN,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type React from "react";
2
+ export interface InputPromptProps {
3
+ onSubmit: (value: string) => void;
4
+ placeholder?: string;
5
+ focus?: boolean;
6
+ }
7
+ export declare const calculatePromptWidths: (mainContentWidth: number) => {
8
+ readonly inputWidth: number;
9
+ readonly containerWidth: number;
10
+ readonly suggestionsWidth: number;
11
+ readonly frameOverhead: number;
12
+ };
13
+ export declare const InputPrompt: React.FC<InputPromptProps>;
@@ -0,0 +1,138 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useInputState } from "../context/InputContext.js";
3
+ import { useInputHistory } from "../hooks/useInputHistory.js";
4
+ import { useKeyMatchers } from "../hooks/useKeyMatchers.js";
5
+ import { useKeypress } from "../hooks/useKeypress.js";
6
+ import { Command } from "../key/keyMatchers.js";
7
+ import { theme } from "../theme/semantic-colors.js";
8
+ import { cpIndexToOffset, cpSlice } from "../utils/textUtil.js";
9
+ import chalk from "chalk";
10
+ import { Box, Text } from "ink";
11
+ import { useCallback, useRef } from "react";
12
+ export const calculatePromptWidths = (mainContentWidth) => {
13
+ const FRAME_PADDING_AND_BORDER = 4; // Border (2) + padding (2)
14
+ const PROMPT_PREFIX_WIDTH = 2; // '> ' or '! '
15
+ const FRAME_OVERHEAD = FRAME_PADDING_AND_BORDER + PROMPT_PREFIX_WIDTH;
16
+ const suggestionsWidth = Math.max(20, mainContentWidth);
17
+ return {
18
+ inputWidth: Math.max(mainContentWidth - FRAME_OVERHEAD, 1),
19
+ containerWidth: mainContentWidth,
20
+ suggestionsWidth,
21
+ frameOverhead: FRAME_OVERHEAD,
22
+ };
23
+ };
24
+ export const InputPrompt = ({ onSubmit, placeholder = " Type your message...", focus = true, }) => {
25
+ const { buffer, userMessages } = useInputState();
26
+ const keyMatchers = useKeyMatchers();
27
+ const innerBoxRef = useRef(null);
28
+ const handleSubmitAndClear = useCallback((submittedValue) => {
29
+ buffer.setText("");
30
+ onSubmit(submittedValue);
31
+ }, [buffer, onSubmit]);
32
+ const customSetText = useCallback((newText, cursorPosition) => {
33
+ buffer.setText(newText, cursorPosition);
34
+ }, [buffer]);
35
+ const inputHistory = useInputHistory({
36
+ userMessages,
37
+ onSubmit: handleSubmitAndClear,
38
+ isActive: true,
39
+ currentQuery: buffer.text,
40
+ currentCursorOffset: buffer.getOffset(),
41
+ onChange: customSetText,
42
+ });
43
+ const handleInput = useCallback((key) => {
44
+ if (!focus) {
45
+ return false;
46
+ }
47
+ // History Navigation
48
+ if (keyMatchers[Command.HISTORY_UP](key) ||
49
+ keyMatchers[Command.NAVIGATION_UP](key)) {
50
+ if (buffer.visualCursor[0] > 0) {
51
+ buffer.move("up");
52
+ return true;
53
+ }
54
+ inputHistory.navigateUp();
55
+ return true;
56
+ }
57
+ if (keyMatchers[Command.HISTORY_DOWN](key) ||
58
+ keyMatchers[Command.NAVIGATION_DOWN](key)) {
59
+ if (buffer.visualCursor[0] < buffer.allVisualLines.length - 1) {
60
+ buffer.move("down");
61
+ return true;
62
+ }
63
+ inputHistory.navigateDown();
64
+ return true;
65
+ }
66
+ // Submit
67
+ if (keyMatchers[Command.SUBMIT](key)) {
68
+ if (buffer.text.trim()) {
69
+ const [row, col] = buffer.cursor;
70
+ const line = buffer.lines[row] || "";
71
+ const charBefore = col > 0 ? cpSlice(line, col - 1, col) : "";
72
+ if (charBefore === "\\") {
73
+ buffer.backspace();
74
+ buffer.newline();
75
+ }
76
+ else {
77
+ inputHistory.handleSubmit(buffer.text.trim());
78
+ }
79
+ }
80
+ return true;
81
+ }
82
+ // Cursor Movement
83
+ if (keyMatchers[Command.HOME](key)) {
84
+ buffer.move("home");
85
+ return true;
86
+ }
87
+ if (keyMatchers[Command.END](key)) {
88
+ buffer.move("end");
89
+ return true;
90
+ }
91
+ if (keyMatchers[Command.KILL_LINE_RIGHT](key)) {
92
+ buffer.killLineRight();
93
+ return true;
94
+ }
95
+ if (keyMatchers[Command.KILL_LINE_LEFT](key)) {
96
+ buffer.killLineLeft();
97
+ return true;
98
+ }
99
+ if (keyMatchers[Command.DELETE_WORD_BACKWARD](key)) {
100
+ buffer.deleteWordLeft();
101
+ return true;
102
+ }
103
+ if (keyMatchers[Command.MOVE_LEFT](key)) {
104
+ buffer.move("left");
105
+ return true;
106
+ }
107
+ // Default Buffer Handling
108
+ return buffer.handleInput(key);
109
+ }, [focus, buffer, keyMatchers, inputHistory]);
110
+ useKeypress(handleInput, { isActive: true, priority: true });
111
+ const [cursorVisualRowAbsolute] = buffer.visualCursor;
112
+ const cursorVisualColIndex = buffer.visualCursorColIndex;
113
+ const showCursor = focus;
114
+ const renderItem = useCallback((lineText, absoluteVisualIdx) => {
115
+ const mapEntry = buffer.visualToLogicalMap[absoluteVisualIdx];
116
+ if (!mapEntry)
117
+ return _jsx(Text, { children: " " }, absoluteVisualIdx);
118
+ const isOnCursorLine = focus && absoluteVisualIdx === cursorVisualRowAbsolute;
119
+ if (!isOnCursorLine) {
120
+ return (_jsx(Box, { height: 1, children: _jsx(Text, { color: theme.text.primary, children: lineText }) }, `line-${absoluteVisualIdx}`));
121
+ }
122
+ // Cursor Line: Declarative split for hardware cursor alignment
123
+ const before = cpSlice(lineText, 0, cursorVisualColIndex);
124
+ const at = cpSlice(lineText, cursorVisualColIndex, cursorVisualColIndex + 1) ||
125
+ " ";
126
+ const after = cpSlice(lineText, cursorVisualColIndex + 1);
127
+ return (_jsx(Box, { height: 1, children: _jsxs(Text, { terminalCursorFocus: showCursor && isOnCursorLine, terminalCursorPosition: cpIndexToOffset(lineText, cursorVisualColIndex), children: [_jsx(Text, { color: theme.text.primary, children: before }), _jsx(Text, { inverse: showCursor, children: at }), _jsx(Text, { color: theme.text.primary, children: after })] }) }, `line-${absoluteVisualIdx}`));
128
+ }, [
129
+ buffer.visualToLogicalMap,
130
+ focus,
131
+ cursorVisualRowAbsolute,
132
+ cursorVisualColIndex,
133
+ showCursor,
134
+ ]);
135
+ const scrollableData = buffer.viewportVisualLines;
136
+ return (_jsxs(Box, { flexGrow: 1, flexDirection: "row", paddingX: 1, borderStyle: "bold", borderTop: true, borderBottom: true, borderLeft: false, borderRight: false, borderTopColor: theme.text.accent, borderBottomColor: theme.text.accent, children: [_jsxs(Text, { color: theme.text.accent, children: ["> ", " "] }), _jsx(Box, { flexGrow: 1, flexDirection: "column", ref: innerBoxRef, children: buffer.text.length === 0 && placeholder ? (showCursor ? (_jsxs(Text, { terminalCursorFocus: showCursor, terminalCursorPosition: 0, children: [chalk.inverse(placeholder.slice(0, 1)), _jsx(Text, { color: theme.text.secondary, children: placeholder.slice(1) })] })) : (_jsx(Text, { color: theme.text.secondary, children: placeholder }))) : (_jsx(Box, { flexDirection: "column", width: "100%", children: scrollableData.map((lineText, index) => renderItem(lineText, index + buffer.visualScrollRow)) })) })] }));
137
+ };
138
+ //# sourceMappingURL=InputPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputPrompt.js","sourceRoot":"","sources":["../../../src/cli/ui/InputPrompt.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAY,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAQ5C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,gBAAwB,EAAE,EAAE;IACjE,MAAM,wBAAwB,GAAG,CAAC,CAAC,CAAC,2BAA2B;IAC/D,MAAM,mBAAmB,GAAG,CAAC,CAAC,CAAC,eAAe;IAE9C,MAAM,cAAc,GAAG,wBAAwB,GAAG,mBAAmB,CAAC;IACtE,MAAM,gBAAgB,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC;IAExD,OAAO;QACN,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,gBAAgB,GAAG,cAAc,EAAE,CAAC,CAAC;QAC1D,cAAc,EAAE,gBAAgB;QAChC,gBAAgB;QAChB,aAAa,EAAE,cAAc;KACpB,CAAC;AACZ,CAAC,CA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,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,GAAQ,IAC1D,CACP,CAAC,CAAC,CAAC,CACH,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,YAAG,WAAW,GAAQ,CACvD,CACD,CAAC,CAAC,CAAC,CACH,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,YACtC,cAAc,CAAC,GAAG,CAAC,CAAC,QAAgB,EAAE,KAAa,EAAE,EAAE,CACvD,UAAU,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC,CACpD,GACI,CACN,GACI,IACD,CACN,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface LLMErrorComponentProps {
2
+ apiUrl: string;
3
+ errorMessage: string;
4
+ }
5
+ export declare function LLMErrorComponent({ apiUrl, errorMessage, }: LLMErrorComponentProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import { useEffect } from "react";
4
+ export function LLMErrorComponent({ apiUrl, errorMessage, }) {
5
+ const suggestions = [
6
+ "[CLI] LLM Server Connection Failed",
7
+ "To use semantic search and RAG features, a local LLM server (such as llama.cpp) must be running.",
8
+ "[Action Required]",
9
+ "1. Start your local LLM server.",
10
+ "2. Ensure the environment variables (LLM_API_URL) correctly match the running server's URL.",
11
+ "3. Restart the service with the synchronized settings.",
12
+ ];
13
+ useEffect(() => {
14
+ process.exit(1);
15
+ }, []);
16
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "red", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "red", bold: true, children: `[ERROR] Could not connect to LLM API at ${apiUrl}. Make sure your server is running.` }) }), suggestions.map((line) => (_jsx(Text, { color: "white", children: line }, `suggestion-${line}`))), _jsx(Text, { children: `[Debug Info] ${errorMessage}` })] }));
17
+ }
18
+ //# sourceMappingURL=LLMErrorComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LLMErrorComponent.js","sourceRoot":"","sources":["../../../src/cli/ui/LLMErrorComponent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlC,MAAM,UAAU,iBAAiB,CAAC,EACjC,MAAM,EACN,YAAY,GACY;IACxB,MAAM,WAAW,GAAG;QACnB,oCAAoC;QACpC,kGAAkG;QAClG,mBAAmB;QACnB,iCAAiC;QACjC,6FAA6F;QAC7F,wDAAwD;KACxD,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACN,MAAC,GAAG,IACH,aAAa,EAAC,QAAQ,EACtB,OAAO,EAAE,CAAC,EACV,WAAW,EAAC,OAAO,EACnB,WAAW,EAAC,KAAK,aAEjB,KAAC,GAAG,IAAC,YAAY,EAAE,CAAC,YACnB,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,kBACpB,2CAA2C,MAAM,qCAAqC,GACjF,GACF,EAEL,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC1B,KAAC,IAAI,IAAC,KAAK,EAAE,OAAO,YAClB,IAAI,IADqB,cAAc,IAAI,EAAE,CAExC,CACP,CAAC,EACF,KAAC,IAAI,cAAE,gBAAgB,YAAY,EAAE,GAAQ,IACxC,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { LLMHealthStatus } from "../types.js";
2
+ interface LLMHealthCheckerProps {
3
+ llmApi_URL: string;
4
+ setLLMStatus: (status: LLMHealthStatus) => void;
5
+ setErrorMessage: (message: string) => void;
6
+ }
7
+ export declare const LLMHealthChecker: ({ llmApi_URL, setLLMStatus, setErrorMessage, }: LLMHealthCheckerProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import { useEffect } from "react";
4
+ export const LLMHealthChecker = ({ llmApi_URL, setLLMStatus, setErrorMessage, }) => {
5
+ useEffect(() => {
6
+ async function checkLLMHealth() {
7
+ try {
8
+ const response = await fetch(`${llmApi_URL}/v1/models`);
9
+ if (!response.ok) {
10
+ setErrorMessage(`[CLI] LLM endpoint ${llmApi_URL} returned ${response.status}. Continuing anyway...`);
11
+ }
12
+ setLLMStatus("success");
13
+ }
14
+ catch (_error) {
15
+ setLLMStatus("error");
16
+ }
17
+ }
18
+ checkLLMHealth();
19
+ }, [llmApi_URL, setLLMStatus, setErrorMessage]);
20
+ return (_jsx(Box, { children: _jsx(Text, { color: "yellow", children: "App starting - verifying environment." }) }));
21
+ };
22
+ //# sourceMappingURL=LLMHealthChecker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LLMHealthChecker.js","sourceRoot":"","sources":["../../../src/cli/ui/LLMHealthChecker.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQlC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAChC,UAAU,EACV,YAAY,EACZ,eAAe,GACQ,EAAE,EAAE;IAC3B,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,UAAU,cAAc;YAC5B,IAAI,CAAC;gBACJ,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,UAAU,YAAY,CAAC,CAAC;gBACxD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;oBAClB,eAAe,CACd,sBAAsB,UAAU,aAAa,QAAQ,CAAC,MAAM,wBAAwB,CACpF,CAAC;gBACH,CAAC;gBACD,YAAY,CAAC,SAAS,CAAC,CAAC;YACzB,CAAC;YAAC,OAAO,MAAM,EAAE,CAAC;gBACjB,YAAY,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;QACF,CAAC;QAED,cAAc,EAAE,CAAC;IAClB,CAAC,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;IAEhD,OAAO,CACN,KAAC,GAAG,cACH,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,sDAA6C,GAC5D,CACN,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ServerConnectionInfo } from "../services/McpManager.js";
2
+ import type React from "react";
3
+ interface MCPServersProps {
4
+ isConnected: boolean;
5
+ connections: Map<string, ServerConnectionInfo>;
6
+ serverCount: number;
7
+ connectedCount: number;
8
+ errors: Map<string, Error>;
9
+ }
10
+ export declare const MCPServers: React.FC<MCPServersProps>;
11
+ export {};
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { theme } from "../theme/semantic-colors.js";
3
+ import { Box, Text } from "ink";
4
+ import { useMemo } from "react";
5
+ export const MCPServers = ({ isConnected, serverCount, connectedCount, errors, }) => {
6
+ const summaryMessage = useMemo(() => {
7
+ if (serverCount === 0)
8
+ return "설정된 MCP 서버가 없습니다.";
9
+ return `${connectedCount} MCP`;
10
+ }, [serverCount, connectedCount]);
11
+ if (serverCount === 0)
12
+ return null;
13
+ return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { children: _jsx(Text, { color: isConnected ? theme.text.primary : "yellow", bold: true, children: summaryMessage }) }), errors.size > 0 && (_jsx(Box, { flexDirection: "column", marginTop: 0, children: Array.from(errors.entries()).map(([serverName, error]) => (_jsxs(Text, { color: "red", children: ["\u2514 \u26A0 ", serverName, ": ", error.message] }, serverName))) }))] }));
14
+ };
15
+ //# sourceMapp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AAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { HistoryItem, PendingItem, StreamingState } from "../types.js";
2
+ import type React from "react";
3
+ interface MainContentProps {
4
+ history: HistoryItem[];
5
+ pendingItem: PendingItem | null;
6
+ streamingState: StreamingState;
7
+ isRagFetching?: boolean;
8
+ isCommandProcessing?: boolean;
9
+ width: number;
10
+ }
11
+ export declare const MainContent: React.FC<MainContentProps>;
12
+ export {};
@@ -0,0 +1,28 @@
1
+ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { HELP_COMMAND_MARKER } from "../constants.js";
3
+ import { HelpCommands } from "../ui/HelpCommands.js";
4
+ import { HistoryItemDisplay } from "../ui/HistoryItemDisplay.js";
5
+ import { ThinkingIndicator } from "../ui/ThinkingIndicator.js";
6
+ import { Box, Static, Text } from "ink";
7
+ const MAX_THINKING_LINES = 6;
8
+ function ThinkingBlock({ content, isActive, }) {
9
+ const lines = content.split("\n").filter((l) => l.trim());
10
+ const displayLines = isActive ? lines : lines.slice(0, MAX_THINKING_LINES);
11
+ const truncated = !isActive && lines.length > MAX_THINKING_LINES;
12
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, marginBottom: isActive ? 0 : 1, children: [_jsxs(Text, { color: "gray", dimColor: true, bold: true, children: ["\uD83D\uDCAD ", isActive ? "thinking..." : `thought (${lines.length} lines)`] }), displayLines.map((line, i) => (_jsx(Text
13
+ // biome-ignore lint/suspicious/noArrayIndexKey: static display lines
14
+ , { color: "gray", dimColor: true, wrap: "wrap", children: line }, i))), truncated && (_jsxs(Text, { color: "gray", dimColor: true, children: ["... (", lines.length - MAX_THINKING_LINES, " more lines)"] }))] }));
15
+ }
16
+ export const MainContent = ({ history, pendingItem, streamingState, isRagFetching, isCommandProcessing, width, }) => {
17
+ const isBusy = isRagFetching ||
18
+ isCommandProcessing ||
19
+ streamingState === "thinking" ||
20
+ streamingState === "executing";
21
+ return (_jsxs(_Fragment, { children: [_jsx(Static, { items: history, children: (item) => {
22
+ if (item.content === HELP_COMMAND_MARKER) {
23
+ return _jsx(HelpCommands, { width: width }, item.id);
24
+ }
25
+ return _jsx(HistoryItemDisplay, { item: item, width: width }, item.id);
26
+ } }), isBusy && _jsx(ThinkingIndicator, {}), pendingItem && (_jsxs(Box, { flexDirection: "column", width: width, paddingX: 1, marginBottom: 1, children: [pendingItem.thinkingContent && (_jsx(ThinkingBlock, { content: pendingItem.thinkingContent, isActive: pendingItem.isThinking === true })), pendingItem.content.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "cyan", bold: true, children: "\u25C0 Assistant" }), _jsx(Text, { wrap: "wrap", children: pendingItem.content })] }))] }))] }));
27
+ };
28
+ //# sourceMappingURL=MainContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MainContent.js","sourceRoot":"","sources":["../../../src/cli/ui/MainContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAYxC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAE7B,SAAS,aAAa,CAAC,EACtB,OAAO,EACP,QAAQ,GAIR;IACA,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1D,MAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAk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AAE,KAAK,IAArB,IAAI,CAAC,EAAE,CAAkB,CAAC;oBACrD,CAAC;oBACD,OAAO,KAAC,kBAAkB,IAAe,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,IAAjC,IAAI,CAAC,EAAE,CAA8B,CAAC;gBACvE,CAAC,GACO,EAER,MAAM,IAAI,KAAC,iBAAiB,KAAG,EAE/B,WAAW,IAAI,CACf,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,aACpE,WAAW,CAAC,eAAe,IAAI,CAC/B,KAAC,aAAa,IACb,OAAO,EAAE,WAAW,CAAC,eAAe,EACpC,QAAQ,EAAE,WAAW,CAAC,UAAU,KAAK,IAAI,GACxC,CACF,EAEA,WAAW,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAClC,8BACC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,uCAEhB,EACP,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,YAAE,WAAW,CAAC,OAAO,GAAQ,IAC5C,CACH,IACI,CACN,IACC,CACH,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export interface MarkdownDisplayProps {
2
+ text: string;
3
+ isPending: boolean;
4
+ availableTerminalHeight?: number;
5
+ terminalWidth: number;
6
+ renderMarkdown?: boolean;
7
+ }
8
+ export declare function MarkdownDisplay(_props: MarkdownDisplayProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from "ink";
3
+ export function MarkdownDisplay(_props) {
4
+ return _jsx(Box, {});
5
+ }
6
+ //# sourceMappingURL=MarkdownDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownDisplay.js","sourceRoot":"","sources":["../../../src/cli/ui/MarkdownDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAU1B,MAAM,UAAU,eAAe,CAAC,MAA4B;IAC3D,OAAO,KAAC,GAAG,KAAO,CAAC;AACpB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=MouseContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MouseContext.js","sourceRoot":"","sources":["../../../src/cli/ui/MouseContext.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import { CommandKind } from "../commands/types.js";
2
+ import { MAX_WIDTH } from "../ui/shared/ExpandableText.js";
3
+ export interface Suggestion {
4
+ label: string;
5
+ value: string;
6
+ insertValue?: string;
7
+ description?: string;
8
+ matchedIndex?: number;
9
+ commandKind?: CommandKind;
10
+ sectionTitle?: string;
11
+ submitValue?: string;
12
+ }
13
+ interface SuggestionsDisplayProps {
14
+ suggestions: Suggestion[];
15
+ activeIndex: number;
16
+ isLoading: boolean;
17
+ width: number;
18
+ scrollOffset: number;
19
+ userInput: string;
20
+ mode: "reverse" | "slash";
21
+ expandedIndex?: number;
22
+ }
23
+ export declare const MAX_SUGGESTIONS_TO_SHOW = 8;
24
+ export { MAX_WIDTH };
25
+ export declare function SuggestionsDisplay({ suggestions, activeIndex, isLoading, width, scrollOffset, userInput, mode, expandedIndex, }: SuggestionsDisplayProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Colors } from "../colors.js";
3
+ import { CommandKind } from "../commands/types.js";
4
+ import { theme } from "../theme/semantic-colors.js";
5
+ import { ExpandableText, MAX_WIDTH } from "../ui/shared/ExpandableText.js";
6
+ import { sanitizeForDisplay } from "../utils/textUtil.js";
7
+ import { Box, Text } from "ink";
8
+ export const MAX_SUGGESTIONS_TO_SHOW = 8;
9
+ export { MAX_WIDTH };
10
+ export function SuggestionsDisplay({ suggestions, activeIndex, isLoading, width, scrollOffset, userInput, mode, expandedIndex, }) {
11
+ if (isLoading) {
12
+ return (_jsx(Box, { paddingX: 1, width: width, children: _jsx(Text, { color: "gray", children: "Loading suggestions..." }) }));
13
+ }
14
+ if (suggestions.length === 0) {
15
+ return null; // Don't render anything if there are no suggestions
16
+ }
17
+ // Calculate the visible slice based on scrollOffset
18
+ const startIndex = scrollOffset;
19
+ const endIndex = Math.min(scrollOffset + MAX_SUGGESTIONS_TO_SHOW, suggestions.length);
20
+ const visibleSuggestions = suggestions.slice(startIndex, endIndex);
21
+ const COMMAND_KIND_SUFFIX = {
22
+ [CommandKind.MCP_PROMPT]: " [MCP]",
23
+ [CommandKind.AGENT]: " [Agent]",
24
+ };
25
+ const getFullLabel = (s) => s.label + (s.commandKind ? (COMMAND_KIND_SUFFIX[s.commandKind] ?? "") : "");
26
+ const maxLabelLength = Math.max(...suggestions.map((s) => getFullLabel(s).length));
27
+ const commandColumnWidth = mode === "slash" ? Math.min(maxLabelLength, Math.floor(width * 0.5)) : 0;
28
+ return (_jsxs(Box, { flexDirection: "column", paddingX: 1, width: width, children: [scrollOffset > 0 && _jsx(Text, { color: theme.text.primary, children: "\u25B2" }), visibleSuggestions.map((suggestion, index) => {
29
+ const originalIndex = startIndex + index;
30
+ const isActive = originalIndex === activeIndex;
31
+ const isExpanded = originalIndex === expandedIndex;
32
+ const textColor = isActive ? theme.ui.focus : theme.text.secondary;
33
+ const isLong = suggestion.value.length >= MAX_WIDTH;
34
+ const previousSectionTitle = suggestions[originalIndex - 1]?.sectionTitle;
35
+ const shouldRenderSectionHeader = mode === "slash" &&
36
+ !!suggestion.sectionTitle &&
37
+ suggestion.sectionTitle !== previousSectionTitle;
38
+ const labelElement = (_jsx(ExpandableText, { label: suggestion.value, matchedIndex: suggestion.matchedIndex, userInput: userInput, textColor: textColor, isExpanded: isExpanded }));
39
+ return (_jsxs(Box, { flexDirection: "column", children: [shouldRenderSectionHeader && (_jsxs(Text, { color: theme.text.secondary, children: ["-- ", suggestion.sectionTitle, " --"] })), _jsxs(Box, { flexDirection: "row", backgroundColor: isActive ? theme.background.focus : undefined, children: [_jsx(Box, { ...(mode === "slash"
40
+ ? { width: commandColumnWidth, flexShrink: 0 }
41
+ : { flexShrink: 1 }), children: _jsxs(Box, { children: [labelElement, suggestion.commandKind &&
42
+ COMMAND_KIND_SUFFIX[suggestion.commandKind] && (_jsx(Text, { color: textColor, children: COMMAND_KIND_SUFFIX[suggestion.commandKind] }))] }) }), suggestion.description && (_jsx(Box, { flexGrow: 1, paddingLeft: 3, children: _jsx(Text, { color: textColor, wrap: "truncate", children: sanitizeForDisplay(suggestion.description, 100) }) })), isActive && isLong && (_jsx(Box, { width: 3, flexShrink: 0, children: _jsx(Text, { color: Colors.Gray, children: isExpanded ? " ← " : " → " }) }))] })] }, `${suggestion.value}-${originalIndex}`));
43
+ }), endIndex < suggestions.length && _jsx(Text, { color: "gray", children: "\u25BC" }), suggestions.length > MAX_SUGGESTIONS_TO_SHOW && (_jsxs(Text, { color: "gray", children: ["(", activeIndex + 1, "/", suggestions.length, ")"] }))] }));
44
+ }
45
+ //# sourceMappingURL=SuggestionsDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuggestionsDisplay.js","sourceRoot":"","sources":["../../../src/cli/ui/SuggestionsDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAuBhC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,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H,CAAC,CAAC,EACD,QAAQ,GAAG,WAAW,CAAC,MAAM,IAAI,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,uBAAS,EAC5D,WAAW,CAAC,MAAM,GAAG,uBAAuB,IAAI,CAChD,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,kBACf,WAAW,GAAG,CAAC,OAAG,WAAW,CAAC,MAAM,SAChC,CACP,IACI,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type React from "react";
2
+ interface SystemInfoSummaryBoxProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare function SystemInfoSummaryBox({ children }: SystemInfoSummaryBoxProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from "ink";
3
+ export function SystemInfoSummaryBox({ children }) {
4
+ return (_jsx(Box, { width: "100%", justifyContent: "space-between", children: children }));
5
+ }
6
+ //# sourceMappingURL=SystemInfoSummaryBox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SystemInfoSummaryBox.js","sourceRoot":"","sources":["../../../src/cli/ui/SystemInfoSummaryBox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAO1B,MAAM,UAAU,oBAAoB,CAAC,EAAE,QAAQ,EAA6B;IAC3E,OAAO,CACN,KAAC,GAAG,IAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAC,eAAe,YAChD,QAAQ,GACJ,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type React from "react";
2
+ export declare const ThinkingIndicator: React.FC;
@@ -0,0 +1,16 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ import { useEffect, useState } from "react";
4
+ const SPINNER_FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
5
+ const FRAME_INTERVAL_MS = 80;
6
+ export const ThinkingIndicator = () => {
7
+ const [frameIndex, setFrameIndex] = useState(0);
8
+ useEffect(() => {
9
+ const timer = setInterval(() => {
10
+ setFrameIndex((prev) => (prev + 1) % SPINNER_FRAMES.length);
11
+ }, FRAME_INTERVAL_MS);
12
+ return () => clearInterval(timer);
13
+ }, []);
14
+ return (_jsx(Box, { paddingX: 1, marginBottom: 1, marginTop: 1, children: _jsxs(Text, { color: "cyan", children: [SPINNER_FRAMES[frameIndex], " Thinking..."] }) }));
15
+ };
16
+ //# sourceMappingURL=ThinkingIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThinkingIndicator.js","sourceRoot":"","sources":["../../../src/cli/ui/ThinkingIndicator.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC1E,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,MAAM,CAAC,MAAM,iBAAiB,GAAa,GAAG,EAAE;IAC/C,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;YAC9B,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QAC7D,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAEtB,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACN,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,YAC9C,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,aAAE,cAAc,CAAC,UAAU,CAAC,oBAAoB,GAC7D,CACN,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type React from "react";
2
+ export declare const DefaultAppLayout: React.FC;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from "ink";
3
+ export const DefaultAppLayout = () => {
4
+ return _jsx(Box, { flexDirection: "column", flexGrow: 0, flexShrink: 0 });
5
+ };
6
+ //# sourceMappingURL=DefaultAppLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultAppLayout.js","sourceRoot":"","sources":["../../../../src/cli/ui/layout/DefaultAppLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG1B,MAAM,CAAC,MAAM,gBAAgB,GAAa,GAAG,EAAE;IAC9C,OAAO,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,GAAQ,CAAC;AACvE,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from "react";
2
+ export declare const MAX_WIDTH = 120;
3
+ interface ExpandableTextProps {
4
+ label: string;
5
+ matchedIndex?: number;
6
+ userInput?: string;
7
+ textColor?: string;
8
+ isExpanded?: boolean;
9
+ }
10
+ /**
11
+ * Renders a suggestion label, highlighting the matched portion if provided.
12
+ */
13
+ export declare function ExpandableText({ label, matchedIndex, userInput, textColor, isExpanded: _isExpanded, }: ExpandableTextProps): ReactElement;
14
+ export {};