tianxincode 1.0.47 → 1.0.49

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 (302) hide show
  1. package/README.md +200 -200
  2. package/dist/cli/commands.js +18 -18
  3. package/dist/core/ai/agents/caller/prompts/role.txt +50 -50
  4. package/dist/core/ai/agents/chat/chat.agent.js +30 -30
  5. package/dist/core/ai/agents/chat/prompts/role.txt +30 -30
  6. package/dist/core/ai/agents/code/code.agent.js +6 -6
  7. package/dist/core/ai/agents/code/prompts/role.txt +50 -50
  8. package/dist/core/ai/agents/common/prompt/role.txt +51 -51
  9. package/dist/core/ai/agents/common/prompts.js +26 -26
  10. package/dist/core/ai/agents/design/design.agent.js +6 -6
  11. package/dist/core/ai/agents/design/prompts/role.txt +36 -36
  12. package/dist/core/ai/agents/dream/prompts/init.txt +20 -20
  13. package/dist/core/ai/agents/mem/mem.agent.js +5 -5
  14. package/dist/core/ai/agents/mem/prompts/role.txt +35 -35
  15. package/dist/core/ai/agents/skill/prompts/role.txt +61 -61
  16. package/dist/core/ai/agents/skill/skill.agent.js +26 -26
  17. package/dist/core/ai/agents/summarizer/prompts/role.txt +30 -30
  18. package/dist/core/ai/agents/task/prompts/role.txt +50 -50
  19. package/dist/core/ai/agents/task/task.agent.js +30 -30
  20. package/dist/core/ai/provider/deepseek.provider.js +1 -1
  21. package/dist/core/ai/provider/deepseek.provider.js.map +1 -1
  22. package/dist/core/ai/provider/openai.provider.js +1 -1
  23. package/dist/core/ai/provider/openai.provider.js.map +1 -1
  24. package/dist/core/db/db.service.d.ts.map +1 -1
  25. package/dist/core/db/db.service.js +3 -1
  26. package/dist/core/db/db.service.js.map +1 -1
  27. package/dist/core/db/init_sql/ai_log.init.js +15 -15
  28. package/dist/core/db/init_sql/code_snippet.init.js +11 -11
  29. package/dist/core/db/init_sql/config.init.js +15 -15
  30. package/dist/core/db/init_sql/custom_action.init.js +10 -10
  31. package/dist/core/db/init_sql/dingding.init.js +9 -9
  32. package/dist/core/db/init_sql/email.init.js +14 -14
  33. package/dist/core/db/init_sql/lsp.init.js +8 -8
  34. package/dist/core/db/init_sql/message_file.init.js +11 -11
  35. package/dist/core/db/init_sql/project.init.js +20 -20
  36. package/dist/core/db/init_sql/provider.init.js +35 -35
  37. package/dist/core/db/init_sql/scheduler.init.js +32 -32
  38. package/dist/core/db/init_sql/session.init.js +23 -23
  39. package/dist/core/db/init_sql/spec.init.js +15 -15
  40. package/dist/core/db/init_sql/waf_gateway.init.js +9 -9
  41. package/dist/core/db/init_sql/zihao.init.js +11 -11
  42. package/dist/core/lsp/sql.js +11 -11
  43. package/dist/core/tools/provider/bash.txt +47 -47
  44. package/dist/core/tools/provider/code_search.txt +20 -20
  45. package/dist/core/tools/provider/edit_file.txt +13 -13
  46. package/dist/core/tools/provider/glob.txt +12 -12
  47. package/dist/core/tools/provider/grep.txt +14 -14
  48. package/dist/core/tools/provider/lsp.txt +19 -19
  49. package/dist/core/tools/provider/memory.txt +21 -21
  50. package/dist/core/tools/provider/read_file.txt +17 -17
  51. package/dist/core/tools/provider/todo_read.txt +16 -16
  52. package/dist/core/tools/provider/todo_write.txt +48 -48
  53. package/dist/core/tools/provider/web_fetch.txt +17 -17
  54. package/dist/core/tools/provider/web_search.txt +18 -18
  55. package/dist/core/tools/provider/write_file.txt +11 -11
  56. package/dist/gateway/api/skill/detail_skill.d.ts.map +1 -1
  57. package/dist/gateway/api/skill/detail_skill.js +7 -5
  58. package/dist/gateway/api/skill/detail_skill.js.map +1 -1
  59. package/dist/gateway/cli/commands.js +18 -18
  60. package/dist/modules/ai/agents/chat/prompts/role.txt +30 -30
  61. package/dist/modules/ai/agents/code/prompts/role.txt +50 -50
  62. package/dist/modules/ai/agents/mem/prompts/role.txt +35 -35
  63. package/dist/modules/ai/agents/skill/prompts/role.txt +61 -61
  64. package/dist/modules/ai/agents/task/prompts/role.txt +50 -50
  65. package/dist/modules/ai/ai-log.service.js +10 -10
  66. package/dist/modules/ai/provider/openai/prompt/role.txt +51 -51
  67. package/dist/modules/ai/summarizer/summarizer.prompts.js +30 -30
  68. package/dist/modules/config/config.service.js +5 -5
  69. package/dist/modules/db/db.service.js +252 -252
  70. package/dist/modules/email/email.config.repository.js +1 -1
  71. package/dist/modules/repositories/project.repository.d.ts +28 -0
  72. package/dist/modules/repositories/project.repository.d.ts.map +1 -0
  73. package/dist/modules/repositories/project.repository.js +47 -0
  74. package/dist/modules/repositories/project.repository.js.map +1 -0
  75. package/dist/modules/scheduler/task-log.service.js +1 -1
  76. package/dist/modules/services/project/project.service.d.ts +14 -0
  77. package/dist/modules/services/project/project.service.d.ts.map +1 -0
  78. package/dist/modules/services/project/project.service.js +47 -0
  79. package/dist/modules/services/project/project.service.js.map +1 -0
  80. package/dist/modules/skill/skill.txt +36 -36
  81. package/dist/modules/spec/spec.injector.js +24 -24
  82. package/dist/modules/tools/provider/bash.txt +47 -47
  83. package/dist/modules/tools/provider/code_search.txt +20 -20
  84. package/dist/modules/tools/provider/edit_file.txt +13 -13
  85. package/dist/modules/tools/provider/glob.txt +12 -12
  86. package/dist/modules/tools/provider/grep.txt +14 -14
  87. package/dist/modules/tools/provider/lsp.txt +19 -19
  88. package/dist/modules/tools/provider/memory.txt +21 -21
  89. package/dist/modules/tools/provider/read_file.txt +17 -17
  90. package/dist/modules/tools/provider/todo_read.txt +16 -16
  91. package/dist/modules/tools/provider/todo_write.txt +48 -48
  92. package/dist/modules/tools/provider/web_fetch.txt +17 -17
  93. package/dist/modules/tools/provider/web_search.txt +18 -18
  94. package/dist/modules/tools/provider/write_file.txt +11 -11
  95. package/dist/modules/waf-gateway/waf-gateway.module.js +8 -8
  96. package/dist/modules/waf-gateway/waf-gateway.service.js +12 -12
  97. package/dist/repositories/project.repository.d.ts +28 -0
  98. package/dist/repositories/project.repository.d.ts.map +1 -0
  99. package/dist/repositories/project.repository.js +47 -0
  100. package/dist/repositories/project.repository.js.map +1 -0
  101. package/dist/repository/ai_log.repository.js +1 -1
  102. package/dist/repository/config.repository.js +5 -5
  103. package/dist/repository/email.repository.js +1 -1
  104. package/dist/repository/memory.repository.js +1 -1
  105. package/dist/repository/project.repository.js +3 -3
  106. package/dist/repository/scheduler.repository.js +2 -2
  107. package/dist/repository/session.repository.js +1 -1
  108. package/dist/repository/zihao-config.repository.js +1 -1
  109. package/dist/services/skill/skill.tool.d.ts.map +1 -1
  110. package/dist/services/skill/skill.tool.js +6 -1
  111. package/dist/services/skill/skill.tool.js.map +1 -1
  112. package/dist/services/skill/skill.txt +36 -36
  113. package/package.json +76 -76
  114. package/scripts/copy-txt.js +31 -31
  115. package/scripts/ink-scroll-demo.tsx +147 -147
  116. package/tsconfig.test.json +9 -9
  117. package/web/dist/assets/{ConfirmDialog-B2bVsPFI.js → ConfirmDialog-B03GcCHQ.js} +1 -1
  118. package/web/dist/assets/PcLayout-CYW3zqcs.css +1 -0
  119. package/web/dist/assets/{PcLayout-DeXNBHu2.js → PcLayout-ZTdJNg7G.js} +1 -1
  120. package/web/dist/assets/{aiLogsView-JvjhLmyo.js → aiLogsView-Bt8Xg1Qx.js} +1 -1
  121. package/web/dist/assets/{cssMode-sYHhwUZh.js → cssMode-CBb6D87U.js} +1 -1
  122. package/web/dist/assets/{customActionsView-Cvmzxvl4.js → customActionsView-DdjnHzwm.js} +1 -1
  123. package/web/dist/assets/deployView-CD7ji9IS.css +1 -0
  124. package/web/dist/assets/{deployView-CjV4ySrf.js → deployView-Cj51_Job.js} +1 -1
  125. package/web/dist/assets/designView-C3pSX4nP.css +1 -0
  126. package/web/dist/assets/designView-RT8tKEN9.js +18 -0
  127. package/web/dist/assets/devWorkflowView-BTozmaiN.js +36 -0
  128. package/web/dist/assets/devWorkflowView-DYhIfbCB.css +1 -0
  129. package/web/dist/assets/devWorkflowViewApp-CErbhC2s.css +1 -0
  130. package/web/dist/assets/{devWorkflowViewApp-DPlFgiS_.js → devWorkflowViewApp-DLslXEq9.js} +3 -3
  131. package/web/dist/assets/{fileZihao-DvZmuTYu.js → fileZihao-CtZ4bUIH.js} +1 -1
  132. package/web/dist/assets/{freemarker2-DTyAQBBj.js → freemarker2-CX3jc3l2.js} +1 -1
  133. package/web/dist/assets/gitChanges-D6QxPcii.css +1 -0
  134. package/web/dist/assets/{gitChanges-Cpf4HHoF.js → gitChanges-DFRvzL5I.js} +1 -1
  135. package/web/dist/assets/gitChangesApp-Bjn-MCmr.css +1 -0
  136. package/web/dist/assets/{gitChangesApp-BOURDd_l.js → gitChangesApp-ZI7-V8oB.js} +2 -2
  137. package/web/dist/assets/{handlebars-DiWIXxOG.js → handlebars-CTaQD6FN.js} +1 -1
  138. package/web/dist/assets/{html-BCQWkFzH.js → html-BruJsfYv.js} +1 -1
  139. package/web/dist/assets/{htmlMode-BbMA34cR.js → htmlMode-wewroXLr.js} +1 -1
  140. package/web/dist/assets/{index-C_tz4Wda.css → index-C0xmVTIn.css} +1 -1
  141. package/web/dist/assets/{index-C7axH05o.js → index-Cn73hS12.js} +9 -9
  142. package/web/dist/assets/{javascript-By4MYHaO.js → javascript-B4ku8P1-.js} +1 -1
  143. package/web/dist/assets/{jsonMode-5JIz7tDN.js → jsonMode-BIvVuBMG.js} +1 -1
  144. package/web/dist/assets/{liquid-BQBVii4f.js → liquid-Bo3G0Ep7.js} +1 -1
  145. package/web/dist/assets/{mdx-Cwk7nqzM.js → mdx-Duv0ylZz.js} +1 -1
  146. package/web/dist/assets/{mediaChat-DivTDoIv.js → mediaChat-RT7iqqYb.js} +1 -1
  147. package/web/dist/assets/{python-L_kGfe1T.js → python-CEhCctGm.js} +1 -1
  148. package/web/dist/assets/{razor-XGuHliMI.js → razor-DPK8nTD7.js} +1 -1
  149. package/web/dist/assets/{taskView-BcJ3LAxp.js → taskView-sOyebRqn.js} +1 -1
  150. package/web/dist/assets/{terminalView-q-UKzK0M.js → terminalView-GTYtDlus.js} +2 -2
  151. package/web/dist/assets/{terminalView-CQVYh6D3.css → terminalView-eZ0agsPP.css} +1 -1
  152. package/web/dist/assets/{tsMode-SuiD3mJa.js → tsMode-BZvUU1nf.js} +1 -1
  153. package/web/dist/assets/{typescript-DJcyqRjT.js → typescript-CmEn-k1B.js} +1 -1
  154. package/web/dist/assets/{wikiView-ygHSGyPp.css → wikiView-C-oqMnJM.css} +1 -1
  155. package/web/dist/assets/{wikiView-B3GIPUlD.js → wikiView-CRjg-cZ8.js} +1 -1
  156. package/web/dist/assets/{xml-DQgCzk55.js → xml-bjvdKeyy.js} +1 -1
  157. package/web/dist/assets/{yaml-DBdEYBPA.js → yaml-N5RXWxJk.js} +1 -1
  158. package/web/dist/index.html +2 -2
  159. package/web/package.json +28 -28
  160. package/dist/modules/ai/react/index.d.ts +0 -5
  161. package/dist/modules/ai/react/index.d.ts.map +0 -1
  162. package/dist/modules/ai/react/index.js +0 -4
  163. package/dist/modules/ai/react/index.js.map +0 -1
  164. package/dist/modules/ai/react/prompt/role.txt +0 -51
  165. package/dist/modules/ai/react/provider.parser.d.ts +0 -20
  166. package/dist/modules/ai/react/provider.parser.d.ts.map +0 -1
  167. package/dist/modules/ai/react/provider.parser.js +0 -88
  168. package/dist/modules/ai/react/provider.parser.js.map +0 -1
  169. package/dist/modules/ai/react/react.parser.d.ts +0 -80
  170. package/dist/modules/ai/react/react.parser.d.ts.map +0 -1
  171. package/dist/modules/ai/react/react.parser.js +0 -365
  172. package/dist/modules/ai/react/react.parser.js.map +0 -1
  173. package/dist/modules/ai/react/react.prompts.d.ts +0 -26
  174. package/dist/modules/ai/react/react.prompts.d.ts.map +0 -1
  175. package/dist/modules/ai/react/react.prompts.js +0 -170
  176. package/dist/modules/ai/react/react.prompts.js.map +0 -1
  177. package/dist/modules/ai/react/react.types.d.ts +0 -50
  178. package/dist/modules/ai/react/react.types.d.ts.map +0 -1
  179. package/dist/modules/ai/react/react.types.js +0 -2
  180. package/dist/modules/ai/react/react.types.js.map +0 -1
  181. package/dist/modules/ai/react/react.validator.d.ts +0 -14
  182. package/dist/modules/ai/react/react.validator.d.ts.map +0 -1
  183. package/dist/modules/ai/react/react.validator.js +0 -53
  184. package/dist/modules/ai/react/react.validator.js.map +0 -1
  185. package/dist/modules/ai/react.agent.d.ts +0 -82
  186. package/dist/modules/ai/react.agent.d.ts.map +0 -1
  187. package/dist/modules/ai/react.agent.js +0 -220
  188. package/dist/modules/ai/react.agent.js.map +0 -1
  189. package/dist/modules/skill/skill.service.d.ts +0 -72
  190. package/dist/modules/skill/skill.service.d.ts.map +0 -1
  191. package/dist/modules/skill/skill.service.js +0 -283
  192. package/dist/modules/skill/skill.service.js.map +0 -1
  193. package/dist/modules/tools/builtin/bash.d.ts +0 -3
  194. package/dist/modules/tools/builtin/bash.d.ts.map +0 -1
  195. package/dist/modules/tools/builtin/bash.js +0 -126
  196. package/dist/modules/tools/builtin/bash.js.map +0 -1
  197. package/dist/modules/tools/builtin/bash.tool.d.ts +0 -6
  198. package/dist/modules/tools/builtin/bash.tool.d.ts.map +0 -1
  199. package/dist/modules/tools/builtin/bash.tool.js +0 -52
  200. package/dist/modules/tools/builtin/bash.tool.js.map +0 -1
  201. package/dist/modules/tools/builtin/bash.txt +0 -69
  202. package/dist/modules/tools/builtin/code_search.d.ts +0 -3
  203. package/dist/modules/tools/builtin/code_search.d.ts.map +0 -1
  204. package/dist/modules/tools/builtin/code_search.js +0 -86
  205. package/dist/modules/tools/builtin/code_search.js.map +0 -1
  206. package/dist/modules/tools/builtin/code_search.txt +0 -41
  207. package/dist/modules/tools/builtin/edit-file.tool.d.ts +0 -6
  208. package/dist/modules/tools/builtin/edit-file.tool.d.ts.map +0 -1
  209. package/dist/modules/tools/builtin/edit-file.tool.js +0 -58
  210. package/dist/modules/tools/builtin/edit-file.tool.js.map +0 -1
  211. package/dist/modules/tools/builtin/edit_file.d.ts +0 -3
  212. package/dist/modules/tools/builtin/edit_file.d.ts.map +0 -1
  213. package/dist/modules/tools/builtin/edit_file.js +0 -105
  214. package/dist/modules/tools/builtin/edit_file.js.map +0 -1
  215. package/dist/modules/tools/builtin/edit_file.txt +0 -61
  216. package/dist/modules/tools/builtin/glob.d.ts +0 -3
  217. package/dist/modules/tools/builtin/glob.d.ts.map +0 -1
  218. package/dist/modules/tools/builtin/glob.js +0 -85
  219. package/dist/modules/tools/builtin/glob.js.map +0 -1
  220. package/dist/modules/tools/builtin/glob.tool.d.ts +0 -6
  221. package/dist/modules/tools/builtin/glob.tool.d.ts.map +0 -1
  222. package/dist/modules/tools/builtin/glob.tool.js +0 -81
  223. package/dist/modules/tools/builtin/glob.tool.js.map +0 -1
  224. package/dist/modules/tools/builtin/glob.txt +0 -33
  225. package/dist/modules/tools/builtin/grep.d.ts +0 -3
  226. package/dist/modules/tools/builtin/grep.d.ts.map +0 -1
  227. package/dist/modules/tools/builtin/grep.js +0 -94
  228. package/dist/modules/tools/builtin/grep.js.map +0 -1
  229. package/dist/modules/tools/builtin/grep.tool.d.ts +0 -6
  230. package/dist/modules/tools/builtin/grep.tool.d.ts.map +0 -1
  231. package/dist/modules/tools/builtin/grep.tool.js +0 -96
  232. package/dist/modules/tools/builtin/grep.tool.js.map +0 -1
  233. package/dist/modules/tools/builtin/grep.txt +0 -37
  234. package/dist/modules/tools/builtin/index.d.ts +0 -8
  235. package/dist/modules/tools/builtin/index.d.ts.map +0 -1
  236. package/dist/modules/tools/builtin/index.js +0 -80
  237. package/dist/modules/tools/builtin/index.js.map +0 -1
  238. package/dist/modules/tools/builtin/lsp.d.ts +0 -7
  239. package/dist/modules/tools/builtin/lsp.d.ts.map +0 -1
  240. package/dist/modules/tools/builtin/lsp.js +0 -126
  241. package/dist/modules/tools/builtin/lsp.js.map +0 -1
  242. package/dist/modules/tools/builtin/lsp.txt +0 -45
  243. package/dist/modules/tools/builtin/memory.d.ts +0 -3
  244. package/dist/modules/tools/builtin/memory.d.ts.map +0 -1
  245. package/dist/modules/tools/builtin/memory.js +0 -77
  246. package/dist/modules/tools/builtin/memory.js.map +0 -1
  247. package/dist/modules/tools/builtin/memory.txt +0 -58
  248. package/dist/modules/tools/builtin/read-file.tool.d.ts +0 -6
  249. package/dist/modules/tools/builtin/read-file.tool.d.ts.map +0 -1
  250. package/dist/modules/tools/builtin/read-file.tool.js +0 -46
  251. package/dist/modules/tools/builtin/read-file.tool.js.map +0 -1
  252. package/dist/modules/tools/builtin/read_file.d.ts +0 -3
  253. package/dist/modules/tools/builtin/read_file.d.ts.map +0 -1
  254. package/dist/modules/tools/builtin/read_file.js +0 -107
  255. package/dist/modules/tools/builtin/read_file.js.map +0 -1
  256. package/dist/modules/tools/builtin/read_file.txt +0 -38
  257. package/dist/modules/tools/builtin/todo_read.d.ts +0 -6
  258. package/dist/modules/tools/builtin/todo_read.d.ts.map +0 -1
  259. package/dist/modules/tools/builtin/todo_read.js +0 -25
  260. package/dist/modules/tools/builtin/todo_read.js.map +0 -1
  261. package/dist/modules/tools/builtin/todo_read.txt +0 -34
  262. package/dist/modules/tools/builtin/todo_write.d.ts +0 -6
  263. package/dist/modules/tools/builtin/todo_write.d.ts.map +0 -1
  264. package/dist/modules/tools/builtin/todo_write.js +0 -46
  265. package/dist/modules/tools/builtin/todo_write.js.map +0 -1
  266. package/dist/modules/tools/builtin/todo_write.txt +0 -67
  267. package/dist/modules/tools/builtin/web_fetch.d.ts +0 -3
  268. package/dist/modules/tools/builtin/web_fetch.d.ts.map +0 -1
  269. package/dist/modules/tools/builtin/web_fetch.js +0 -52
  270. package/dist/modules/tools/builtin/web_fetch.js.map +0 -1
  271. package/dist/modules/tools/builtin/web_fetch.txt +0 -38
  272. package/dist/modules/tools/builtin/web_search.d.ts +0 -3
  273. package/dist/modules/tools/builtin/web_search.d.ts.map +0 -1
  274. package/dist/modules/tools/builtin/web_search.js +0 -100
  275. package/dist/modules/tools/builtin/web_search.js.map +0 -1
  276. package/dist/modules/tools/builtin/web_search.txt +0 -43
  277. package/dist/modules/tools/builtin/write-file.tool.d.ts +0 -6
  278. package/dist/modules/tools/builtin/write-file.tool.d.ts.map +0 -1
  279. package/dist/modules/tools/builtin/write-file.tool.js +0 -38
  280. package/dist/modules/tools/builtin/write-file.tool.js.map +0 -1
  281. package/dist/modules/tools/builtin/write_file.d.ts +0 -3
  282. package/dist/modules/tools/builtin/write_file.d.ts.map +0 -1
  283. package/dist/modules/tools/builtin/write_file.js +0 -61
  284. package/dist/modules/tools/builtin/write_file.js.map +0 -1
  285. package/dist/modules/tools/builtin/write_file.txt +0 -58
  286. package/dist/modules/tools/provider/openai/tools.d.ts +0 -3
  287. package/dist/modules/tools/provider/openai/tools.d.ts.map +0 -1
  288. package/dist/modules/tools/provider/openai/tools.js +0 -212
  289. package/dist/modules/tools/provider/openai/tools.js.map +0 -1
  290. package/dist/modules/tools/provider/skill.d.ts +0 -6
  291. package/dist/modules/tools/provider/skill.d.ts.map +0 -1
  292. package/dist/modules/tools/provider/skill.js +0 -64
  293. package/dist/modules/tools/provider/skill.js.map +0 -1
  294. package/web/dist/assets/PcLayout-L-XuK1oQ.css +0 -1
  295. package/web/dist/assets/deployView-hCh3_M8H.css +0 -1
  296. package/web/dist/assets/designView-CqZ75hOS.css +0 -1
  297. package/web/dist/assets/designView-DrUNRVEE.js +0 -18
  298. package/web/dist/assets/devWorkflowView-BpdJTMEb.js +0 -36
  299. package/web/dist/assets/devWorkflowView-D7EKjoLj.css +0 -1
  300. package/web/dist/assets/devWorkflowViewApp-BYYMIdCm.css +0 -1
  301. package/web/dist/assets/gitChanges-BYj-Y2K-.css +0 -1
  302. package/web/dist/assets/gitChangesApp-Btw-XKcP.css +0 -1
package/package.json CHANGED
@@ -1,76 +1,76 @@
1
- {
2
- "name": "tianxincode",
3
- "version": "1.0.47",
4
- "type": "module",
5
- "description": "AI Coding Assistant",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "bin": {
9
- "txcode": "dist/index.js"
10
- },
11
- "scripts": {
12
- "build": "tsc && tsc-alias && npm run copy-txt",
13
- "copy-txt": "node scripts/copy-txt.js",
14
- "dev": "tsx src/index.ts",
15
- "demo:ink-scroll": "tsx scripts/ink-scroll-demo.tsx",
16
- "start": "node dist/index.js",
17
- "start:web": "node dist/index.js web",
18
- "web:dev": "cd web && npm run dev",
19
- "web:build": "cd web && npm install && npm run build",
20
- "test": "jest",
21
- "test:coverage": "jest --coverage"
22
- },
23
- "keywords": [
24
- "ai",
25
- "coding",
26
- "assistant"
27
- ],
28
- "author": "",
29
- "license": "ISC",
30
- "dependencies": {
31
- "@lydell/node-pty": "^1.0.0",
32
- "@types/diff": "^7.0.2",
33
- "@types/nodemailer": "^7.0.11",
34
- "cors": "^2.8.6",
35
- "diff": "^7.0.0",
36
- "dingtalk-stream-sdk-nodejs": "^2.0.4",
37
- "express": "^5.2.1",
38
- "ink": "^6.8.0",
39
- "js-yaml": "^4.1.1",
40
- "multer": "^2.1.1",
41
- "node-cron": "^4.2.1",
42
- "nodemailer": "^8.0.4",
43
- "openai": "^5.5.1",
44
- "react": "^19.2.4",
45
- "react-dom": "^19.2.4",
46
- "sql.js": "^1.12.0",
47
- "undici": "^7.25.0",
48
- "uuid": "^9.0.1",
49
- "which": "^6.0.1",
50
- "ws": "^8.20.0",
51
- "xml2js": "^0.6.2",
52
- "yaml": "^2.8.3"
53
- },
54
- "devDependencies": {
55
- "@types/cors": "^2.8.19",
56
- "@types/express": "^5.0.6",
57
- "@types/jest": "^30.0.0",
58
- "@types/js-yaml": "^4.0.9",
59
- "@types/multer": "^2.1.0",
60
- "@types/node": "^25.5.0",
61
- "@types/node-cron": "^3.0.11",
62
- "@types/react": "^19.2.14",
63
- "@types/react-dom": "^19.2.3",
64
- "@types/sql.js": "^1.4.9",
65
- "@types/uuid": "^10.0.0",
66
- "@types/which": "^3.0.4",
67
- "@types/ws": "^8.18.1",
68
- "@types/xml2js": "^0.4.14",
69
- "jest": "^30.3.0",
70
- "ts-jest": "^29.4.6",
71
- "ts-node": "^10.9.2",
72
- "tsc-alias": "^1.8.10",
73
- "tsx": "^4.21.0",
74
- "typescript": "^5.9.3"
75
- }
76
- }
1
+ {
2
+ "name": "tianxincode",
3
+ "version": "1.0.49",
4
+ "type": "module",
5
+ "description": "AI Coding Assistant",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "txcode": "dist/index.js"
10
+ },
11
+ "scripts": {
12
+ "build": "tsc && tsc-alias && npm run copy-txt",
13
+ "copy-txt": "node scripts/copy-txt.js",
14
+ "dev": "tsx src/index.ts",
15
+ "demo:ink-scroll": "tsx scripts/ink-scroll-demo.tsx",
16
+ "start": "node dist/index.js",
17
+ "start:web": "node dist/index.js web",
18
+ "web:dev": "cd web && npm run dev",
19
+ "web:build": "cd web && npm install && npm run build",
20
+ "test": "jest",
21
+ "test:coverage": "jest --coverage"
22
+ },
23
+ "keywords": [
24
+ "ai",
25
+ "coding",
26
+ "assistant"
27
+ ],
28
+ "author": "",
29
+ "license": "ISC",
30
+ "dependencies": {
31
+ "@lydell/node-pty": "^1.0.0",
32
+ "@types/diff": "^7.0.2",
33
+ "@types/nodemailer": "^7.0.11",
34
+ "cors": "^2.8.6",
35
+ "diff": "^7.0.0",
36
+ "dingtalk-stream-sdk-nodejs": "^2.0.4",
37
+ "express": "^5.2.1",
38
+ "ink": "^6.8.0",
39
+ "js-yaml": "^4.1.1",
40
+ "multer": "^2.1.1",
41
+ "node-cron": "^4.2.1",
42
+ "nodemailer": "^8.0.4",
43
+ "openai": "^5.5.1",
44
+ "react": "^19.2.4",
45
+ "react-dom": "^19.2.4",
46
+ "sql.js": "^1.12.0",
47
+ "undici": "^7.25.0",
48
+ "uuid": "^9.0.1",
49
+ "which": "^6.0.1",
50
+ "ws": "^8.20.0",
51
+ "xml2js": "^0.6.2",
52
+ "yaml": "^2.8.3"
53
+ },
54
+ "devDependencies": {
55
+ "@types/cors": "^2.8.19",
56
+ "@types/express": "^5.0.6",
57
+ "@types/jest": "^30.0.0",
58
+ "@types/js-yaml": "^4.0.9",
59
+ "@types/multer": "^2.1.0",
60
+ "@types/node": "^25.5.0",
61
+ "@types/node-cron": "^3.0.11",
62
+ "@types/react": "^19.2.14",
63
+ "@types/react-dom": "^19.2.3",
64
+ "@types/sql.js": "^1.4.9",
65
+ "@types/uuid": "^10.0.0",
66
+ "@types/which": "^3.0.4",
67
+ "@types/ws": "^8.18.1",
68
+ "@types/xml2js": "^0.4.14",
69
+ "jest": "^30.3.0",
70
+ "ts-jest": "^29.4.6",
71
+ "ts-node": "^10.9.2",
72
+ "tsc-alias": "^1.8.10",
73
+ "tsx": "^4.21.0",
74
+ "typescript": "^5.9.3"
75
+ }
76
+ }
@@ -1,31 +1,31 @@
1
- import { readdirSync, mkdirSync, copyFileSync } from 'fs';
2
- import { join } from 'path';
3
-
4
- function copyDirFiles(srcDir, dstDir, filter) {
5
- readdirSync(srcDir).filter(filter).forEach(f => {
6
- mkdirSync(dstDir, { recursive: true });
7
- copyFileSync(join(srcDir, f), join(dstDir, f));
8
- });
9
- }
10
-
11
- function copyFile(srcPath, dstPath) {
12
- const dstDir = dstPath.substring(0, dstPath.lastIndexOf('/'));
13
- mkdirSync(dstDir, { recursive: true });
14
- copyFileSync(srcPath, dstPath);
15
- }
16
-
17
- copyDirFiles('src/core/tools/provider', 'dist/core/tools/provider', f => f.endsWith('.txt'));
18
- copyFile('src/services/skill/skill.txt', 'dist/services/skill/skill.txt');
19
- copyFile('src/core/ai/agents/common/prompt/role.txt', 'dist/core/ai/agents/common/prompt/role.txt');
20
-
21
- const agents = ['code', 'chat', 'task', 'mem', 'skill', 'caller', 'summarizer', 'design'];
22
- agents.forEach(agent => {
23
- copyFile(
24
- `src/core/ai/agents/${agent}/prompts/role.txt`,
25
- `dist/core/ai/agents/${agent}/prompts/role.txt`
26
- );
27
- });
28
-
29
- copyFile('src/core/ai/agents/dream/prompts/init.txt', 'dist/core/ai/agents/dream/prompts/init.txt');
30
-
31
- console.log('Copied .txt files to dist');
1
+ import { readdirSync, mkdirSync, copyFileSync } from 'fs';
2
+ import { join } from 'path';
3
+
4
+ function copyDirFiles(srcDir, dstDir, filter) {
5
+ readdirSync(srcDir).filter(filter).forEach(f => {
6
+ mkdirSync(dstDir, { recursive: true });
7
+ copyFileSync(join(srcDir, f), join(dstDir, f));
8
+ });
9
+ }
10
+
11
+ function copyFile(srcPath, dstPath) {
12
+ const dstDir = dstPath.substring(0, dstPath.lastIndexOf('/'));
13
+ mkdirSync(dstDir, { recursive: true });
14
+ copyFileSync(srcPath, dstPath);
15
+ }
16
+
17
+ copyDirFiles('src/core/tools/provider', 'dist/core/tools/provider', f => f.endsWith('.txt'));
18
+ copyFile('src/services/skill/skill.txt', 'dist/services/skill/skill.txt');
19
+ copyFile('src/core/ai/agents/common/prompt/role.txt', 'dist/core/ai/agents/common/prompt/role.txt');
20
+
21
+ const agents = ['code', 'chat', 'task', 'mem', 'skill', 'caller', 'summarizer', 'design'];
22
+ agents.forEach(agent => {
23
+ copyFile(
24
+ `src/core/ai/agents/${agent}/prompts/role.txt`,
25
+ `dist/core/ai/agents/${agent}/prompts/role.txt`
26
+ );
27
+ });
28
+
29
+ copyFile('src/core/ai/agents/dream/prompts/init.txt', 'dist/core/ai/agents/dream/prompts/init.txt');
30
+
31
+ console.log('Copied .txt files to dist');
@@ -1,147 +1,147 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Ink Static 模式 demo:上 Logo / 中历史消息(Static) / 下输入框
4
- *
5
- * - 历史消息使用 Ink 的 Static 渲染。
6
- * - 回车:输入追加到历史区(Static 仅新增这一条)。
7
- * - q / Esc:退出
8
- *
9
- * 运行:npm run demo:ink-scroll
10
- */
11
-
12
- import React, { useEffect, useState } from 'react';
13
- import { Box, Static, Text, render, useApp, useInput, useStdout } from 'ink';
14
-
15
- const LOGO_LINES = 6;
16
- const FOOTER_LINES = 3;
17
-
18
- interface HistoryItem {
19
- id: string;
20
- text: string;
21
- }
22
-
23
- export function InkScrollDemoApp() {
24
- const { exit } = useApp();
25
- const { stdout } = useStdout();
26
-
27
- const [terminalSize, setTerminalSize] = useState(() => ({
28
- rows: stdout.rows || 24,
29
- cols: stdout.columns || 80,
30
- }));
31
-
32
- useEffect(() => {
33
- const onResize = () => {
34
- setTerminalSize({
35
- rows: stdout.rows || 24,
36
- cols: stdout.columns || 80,
37
- });
38
- };
39
- stdout.on('resize', onResize);
40
- return () => {
41
- stdout.off('resize', onResize);
42
- };
43
- }, [stdout]);
44
-
45
- const terminalRows = terminalSize.rows;
46
- const terminalCols = terminalSize.cols;
47
- const historyViewportLines = 30;
48
-
49
- const [history, setHistory] = useState<HistoryItem[]>(() => [
50
- { id: 'boot-1', text: '欢迎使用 Static demo:回车会把输入追加到历史。' },
51
- { id: 'boot-2', text: '你可以持续输入,观察输入框更新时历史不重绘。' },
52
- ]);
53
- const logoStaticItems: HistoryItem[] = [
54
- { id: 'logo-1', text: '╔══════════════════════════════════╗' },
55
- { id: 'logo-2', text: '║ INK LAYOUT DEMO ║' },
56
- { id: 'logo-3', text: '║ Logo / History / Input ║' },
57
- { id: 'logo-4', text: '╚══════════════════════════════════╝' },
58
- ];
59
- const [input, setInput] = useState('');
60
- const [cursorPosition, setCursorPosition] = useState(0);
61
-
62
- useInput((chunk, key) => {
63
- const text = typeof chunk === 'string' ? chunk : '';
64
- const keyAny = key as { leftArrow?: boolean; rightArrow?: boolean };
65
-
66
- if (key.escape || (text === 'q' && !key.ctrl && !key.meta)) {
67
- exit();
68
- return;
69
- }
70
-
71
- if (key.return) {
72
- const line = input.trim();
73
- if (line) {
74
- const id = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
75
- setHistory(prev => [...prev, { id, text: line }]);
76
- }
77
- setInput('');
78
- setCursorPosition(0);
79
- return;
80
- }
81
-
82
- if (key.backspace || key.delete) {
83
- if (cursorPosition > 0) {
84
- const next = input.slice(0, cursorPosition - 1) + input.slice(cursorPosition);
85
- setInput(next);
86
- setCursorPosition(c => c - 1);
87
- }
88
- return;
89
- }
90
-
91
- if (keyAny.leftArrow) {
92
- setCursorPosition(c => Math.max(0, c - 1));
93
- return;
94
- }
95
- if (keyAny.rightArrow) {
96
- setCursorPosition(c => Math.min(input.length, c + 1));
97
- return;
98
- }
99
-
100
- if (text && !key.ctrl && !key.meta) {
101
- const next = input.slice(0, cursorPosition) + text + input.slice(cursorPosition);
102
- setInput(next);
103
- setCursorPosition(cursorPosition + text.length);
104
- }
105
- });
106
-
107
- return (
108
- <Box flexDirection="column" width={terminalCols} height={5}>
109
- {/* 顶部 Logo */}
110
-
111
-
112
- {/* 中间历史(Static) */}
113
- <Box flexDirection="column" flexGrow={1} minHeight={0}>
114
- <Static items={logoStaticItems}>
115
- {item => (
116
- <Text key={item.id} bold color="cyan">
117
- {item.text}
118
- </Text>
119
- )}
120
- </Static>
121
- <Static items={history}>
122
- {(item, index) => (
123
- <Text key={item.id}>
124
- <Text dimColor>{String(index + 1).padStart(3, ' ')}. </Text>
125
- <Text>{item.text}</Text>
126
- </Text>
127
- )}
128
- </Static>
129
- </Box>
130
-
131
- {/* 底部输入框 */}
132
- <Box flexDirection="column" flexShrink={0} marginTop={0}>
133
- <Box borderStyle="single" borderColor="gray" paddingX={1}>
134
- <Text dimColor>{'> '}</Text>
135
- <Text>{input.slice(0, cursorPosition)}</Text>
136
- <Text color="cyan">▋</Text>
137
- <Text>{input.slice(cursorPosition)}</Text>
138
- </Box>
139
- <Text dimColor>
140
- Static 历史模式 | 回车追加历史 | q / Esc 退出
141
- </Text>
142
- </Box>
143
- </Box>
144
- );
145
- }
146
-
147
- render(<InkScrollDemoApp />);
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Ink Static 模式 demo:上 Logo / 中历史消息(Static) / 下输入框
4
+ *
5
+ * - 历史消息使用 Ink 的 Static 渲染。
6
+ * - 回车:输入追加到历史区(Static 仅新增这一条)。
7
+ * - q / Esc:退出
8
+ *
9
+ * 运行:npm run demo:ink-scroll
10
+ */
11
+
12
+ import React, { useEffect, useState } from 'react';
13
+ import { Box, Static, Text, render, useApp, useInput, useStdout } from 'ink';
14
+
15
+ const LOGO_LINES = 6;
16
+ const FOOTER_LINES = 3;
17
+
18
+ interface HistoryItem {
19
+ id: string;
20
+ text: string;
21
+ }
22
+
23
+ export function InkScrollDemoApp() {
24
+ const { exit } = useApp();
25
+ const { stdout } = useStdout();
26
+
27
+ const [terminalSize, setTerminalSize] = useState(() => ({
28
+ rows: stdout.rows || 24,
29
+ cols: stdout.columns || 80,
30
+ }));
31
+
32
+ useEffect(() => {
33
+ const onResize = () => {
34
+ setTerminalSize({
35
+ rows: stdout.rows || 24,
36
+ cols: stdout.columns || 80,
37
+ });
38
+ };
39
+ stdout.on('resize', onResize);
40
+ return () => {
41
+ stdout.off('resize', onResize);
42
+ };
43
+ }, [stdout]);
44
+
45
+ const terminalRows = terminalSize.rows;
46
+ const terminalCols = terminalSize.cols;
47
+ const historyViewportLines = 30;
48
+
49
+ const [history, setHistory] = useState<HistoryItem[]>(() => [
50
+ { id: 'boot-1', text: '欢迎使用 Static demo:回车会把输入追加到历史。' },
51
+ { id: 'boot-2', text: '你可以持续输入,观察输入框更新时历史不重绘。' },
52
+ ]);
53
+ const logoStaticItems: HistoryItem[] = [
54
+ { id: 'logo-1', text: '╔══════════════════════════════════╗' },
55
+ { id: 'logo-2', text: '║ INK LAYOUT DEMO ║' },
56
+ { id: 'logo-3', text: '║ Logo / History / Input ║' },
57
+ { id: 'logo-4', text: '╚══════════════════════════════════╝' },
58
+ ];
59
+ const [input, setInput] = useState('');
60
+ const [cursorPosition, setCursorPosition] = useState(0);
61
+
62
+ useInput((chunk, key) => {
63
+ const text = typeof chunk === 'string' ? chunk : '';
64
+ const keyAny = key as { leftArrow?: boolean; rightArrow?: boolean };
65
+
66
+ if (key.escape || (text === 'q' && !key.ctrl && !key.meta)) {
67
+ exit();
68
+ return;
69
+ }
70
+
71
+ if (key.return) {
72
+ const line = input.trim();
73
+ if (line) {
74
+ const id = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
75
+ setHistory(prev => [...prev, { id, text: line }]);
76
+ }
77
+ setInput('');
78
+ setCursorPosition(0);
79
+ return;
80
+ }
81
+
82
+ if (key.backspace || key.delete) {
83
+ if (cursorPosition > 0) {
84
+ const next = input.slice(0, cursorPosition - 1) + input.slice(cursorPosition);
85
+ setInput(next);
86
+ setCursorPosition(c => c - 1);
87
+ }
88
+ return;
89
+ }
90
+
91
+ if (keyAny.leftArrow) {
92
+ setCursorPosition(c => Math.max(0, c - 1));
93
+ return;
94
+ }
95
+ if (keyAny.rightArrow) {
96
+ setCursorPosition(c => Math.min(input.length, c + 1));
97
+ return;
98
+ }
99
+
100
+ if (text && !key.ctrl && !key.meta) {
101
+ const next = input.slice(0, cursorPosition) + text + input.slice(cursorPosition);
102
+ setInput(next);
103
+ setCursorPosition(cursorPosition + text.length);
104
+ }
105
+ });
106
+
107
+ return (
108
+ <Box flexDirection="column" width={terminalCols} height={5}>
109
+ {/* 顶部 Logo */}
110
+
111
+
112
+ {/* 中间历史(Static) */}
113
+ <Box flexDirection="column" flexGrow={1} minHeight={0}>
114
+ <Static items={logoStaticItems}>
115
+ {item => (
116
+ <Text key={item.id} bold color="cyan">
117
+ {item.text}
118
+ </Text>
119
+ )}
120
+ </Static>
121
+ <Static items={history}>
122
+ {(item, index) => (
123
+ <Text key={item.id}>
124
+ <Text dimColor>{String(index + 1).padStart(3, ' ')}. </Text>
125
+ <Text>{item.text}</Text>
126
+ </Text>
127
+ )}
128
+ </Static>
129
+ </Box>
130
+
131
+ {/* 底部输入框 */}
132
+ <Box flexDirection="column" flexShrink={0} marginTop={0}>
133
+ <Box borderStyle="single" borderColor="gray" paddingX={1}>
134
+ <Text dimColor>{'> '}</Text>
135
+ <Text>{input.slice(0, cursorPosition)}</Text>
136
+ <Text color="cyan">▋</Text>
137
+ <Text>{input.slice(cursorPosition)}</Text>
138
+ </Box>
139
+ <Text dimColor>
140
+ Static 历史模式 | 回车追加历史 | q / Esc 退出
141
+ </Text>
142
+ </Box>
143
+ </Box>
144
+ );
145
+ }
146
+
147
+ render(<InkScrollDemoApp />);
@@ -1,9 +1,9 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "module": "esnext",
5
- "moduleResolution": "bundler",
6
- "isolatedModules": true
7
- },
8
- "include": ["src/**/*", "tests/**/*"]
9
- }
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "module": "esnext",
5
+ "moduleResolution": "bundler",
6
+ "isolatedModules": true
7
+ },
8
+ "include": ["src/**/*", "tests/**/*"]
9
+ }
@@ -1 +1 @@
1
- import{n}from"./index-C7axH05o.js";const r={name:"ConfirmDialog",props:{visible:{type:Boolean,default:!1},message:{type:String,default:""}}};var i=function(){var e=this,t=e._self._c;return e.visible?t("div",{staticClass:"fixed inset-0 bg-black/50 flex items-center justify-center z-50"},[t("div",{staticClass:"bg-sidebar border border-border rounded p-4 w-96"},[t("p",{staticClass:"text-gray-200 text-sm mb-4"},[e._v(e._s(e.message))]),t("div",{staticClass:"flex justify-end gap-2"},[t("button",{staticClass:"px-3 py-1 text-xs text-gray-400 hover:text-white",on:{click:function(s){return e.$emit("cancel")}}},[e._v("取消")]),t("button",{staticClass:"px-3 py-1 text-xs bg-red-600 text-white rounded hover:bg-red-700",on:{click:function(s){return e.$emit("confirm")}}},[e._v("确定")])])])]):e._e()},a=[],o=n(r,i,a,!1,null,null);const d=o.exports;export{d as C};
1
+ import{n}from"./index-Cn73hS12.js";const r={name:"ConfirmDialog",props:{visible:{type:Boolean,default:!1},message:{type:String,default:""}}};var i=function(){var e=this,t=e._self._c;return e.visible?t("div",{staticClass:"fixed inset-0 bg-black/50 flex items-center justify-center z-50"},[t("div",{staticClass:"bg-sidebar border border-border rounded p-4 w-96"},[t("p",{staticClass:"text-gray-200 text-sm mb-4"},[e._v(e._s(e.message))]),t("div",{staticClass:"flex justify-end gap-2"},[t("button",{staticClass:"px-3 py-1 text-xs text-gray-400 hover:text-white",on:{click:function(s){return e.$emit("cancel")}}},[e._v("取消")]),t("button",{staticClass:"px-3 py-1 text-xs bg-red-600 text-white rounded hover:bg-red-700",on:{click:function(s){return e.$emit("confirm")}}},[e._v("确定")])])])]):e._e()},a=[],o=n(r,i,a,!1,null,null);const d=o.exports;export{d as C};
@@ -0,0 +1 @@
1
+ .select-project-dialog{display:flex;flex-direction:column;gap:12px}.select-project-dialog+.el-dialog{z-index:2003!important}.select-project-dialog[data-v-e90f8022]{display:flex;gap:8px;flex-wrap:wrap}.file-list-container[data-v-e90f8022]{border:1px solid #ddd;border-radius:4px;max-height:300px;overflow:auto}.current-path[data-v-e90f8022]{padding:8px 12px;background:#f5f5f5;border-bottom:1px solid #ddd;font-size:12px}.path-label[data-v-e90f8022]{color:#666}.path-value[data-v-e90f8022]{color:#333;word-break:break-all}.file-list[data-v-e90f8022]{padding:4px}.file-item[data-v-e90f8022]{display:flex;align-items:center;gap:8px;padding:6px 8px;cursor:pointer;border-radius:4px}.file-item[data-v-e90f8022]:hover{background:#f0f0f0}.file-item.selected[data-v-e90f8022]{background:#e6f7ff;border:1px solid #1890ff}.file-item.parent[data-v-e90f8022]{color:#666}.file-name[data-v-e90f8022]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-tip[data-v-e90f8022]{padding:40px;text-align:center;color:#999}.底部状态栏[data-v-e90f8022]{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#f5f5f5;border-radius:4px;font-size:12px}.selected-info[data-v-e90f8022]{color:#333}.project-name-input[data-v-e90f8022]{display:flex;align-items:center;gap:8px}
@@ -1 +1 @@
1
- import{n as l,a as r}from"./index-C7axH05o.js";const n={name:"SelectProjectDialog",props:{visible:{type:Boolean,default:!1}},data(){return{dialogVisible:!1,drives:[],currentPath:"",parentPath:null,items:[],selectedPath:"",projectName:"",loading:!1}},watch:{visible(s){this.dialogVisible=s,s&&this.loadDrives()},dialogVisible(s){this.$emit("update:visible",s)}},methods:{async loadDrives(){console.log("[SelectProjectDialog] loading drives...");try{const s=await r.getDrives();if(console.log("[SelectProjectDialog] drives response:",s),this.drives=s.data.items||[],console.log("[SelectProjectDialog] drives:",this.drives),this.drives.length>0){const e=this.drives[0];console.log("[SelectProjectDialog] firstDrive:",e),await this.browse(e.path||"/")}else await this.browse("/")}catch(s){console.error("加载盘符失败:",s),this.$message.error("加载盘符失败: "+s.message)}},async browse(s){try{const t=(await r.browseFilesystem(s)).data;this.currentPath=t.current_path,this.parentPath=t.parent_path,this.items=t.items||[]}catch(e){console.error("浏览目录失败:",e),this.$message.error("浏览目录失败: "+e.message)}},async selectDrive(s){await this.browse(s)},selectItem(s){if(s.is_directory){this.selectedPath=s.path;const e=s.path.replace(/\\/g,"/").split("/");this.projectName=e.filter(t=>t).pop()||""}},async enterFolder(s){s.is_directory&&await this.browse(s.path)},async goToParent(){this.parentPath&&await this.browse(this.parentPath)},handleClose(){this.dialogVisible=!1,this.resetState()},resetState(){this.selectedPath="",this.projectName="",this.items=[],this.currentPath="",this.parentPath=null},async handleConfirm(){var s;if(!(!this.selectedPath||!this.projectName)){this.loading=!0;try{const e=await r.createProject(this.projectName,this.selectedPath,""),t=(s=e.data)==null?void 0:s.id;t&&(await r.setCurrentProject(t),this.$message.success("项目创建并切换成功"),this.$emit("success",e.data),this.handleClose())}catch(e){console.error("创建项目失败:",e),this.$message.error("创建项目失败: "+e.message)}finally{this.loading=!1}}}}};var c=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"选择项目文件夹",visible:e.dialogVisible,width:"600px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(a){e.dialogVisible=a},close:e.handleClose}},[t("div",{staticClass:"select-project-dialog"},[e.drives.length>0?t("div",{staticClass:"drive-nav"},e._l(e.drives,function(a){return t("el-button",{key:a.path,attrs:{size:"mini",type:e.currentPath.startsWith(a.path)?"primary":""},on:{click:function(i){return e.selectDrive(a.path)}}},[e._v(" "+e._s(a.name)+" ")])}),1):e._e(),t("div",{staticClass:"file-list-container"},[t("div",{staticClass:"current-path"},[t("span",{staticClass:"path-label"},[e._v("当前路径:")]),t("span",{staticClass:"path-value"},[e._v(e._s(e.currentPath))])]),e.items.length>0?t("div",{staticClass:"file-list"},[e.parentPath?t("div",{staticClass:"file-item parent",on:{click:e.goToParent}},[t("i",{staticClass:"fa-solid fa-arrow-up"}),t("span",[e._v("上一级")])]):e._e(),e._l(e.items.filter(a=>a.is_directory),function(a){return t("div",{key:a.path,staticClass:"file-item",class:{selected:e.selectedPath===a.path},on:{click:function(i){return e.selectItem(a)},dblclick:function(i){return e.enterFolder(a)}}},[t("i",{staticClass:"fa-solid fa-folder"}),t("span",{staticClass:"file-name"},[e._v(e._s(a.name))])])})],2):t("div",{staticClass:"empty-tip"},[t("span",[e._v("该目录为空")])])]),t("div",{staticClass:"底部状态栏"},[t("div",{staticClass:"selected-info"},[t("span",[e._v("已选择: "+e._s(e.selectedPath||"未选择"))])]),t("div",{staticClass:"project-name-input"},[t("span",[e._v("项目名称:")]),t("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入项目名称",size:"small"},model:{value:e.projectName,callback:function(a){e.projectName=a},expression:"projectName"}})],1)])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary",disabled:!e.selectedPath||!e.projectName,loading:e.loading},on:{click:e.handleConfirm}},[e._v(" 确 定 ")])],1)])},d=[],h=l(n,c,d,!1,null,"c188f7ba");const f=h.exports,u={name:"Layout",components:{SelectProjectDialog:f},data(){return{sidebarVisible:!0,showSessionDropdown:!1,sessions:[],currentSessionId:null,currentSessionName:"",projects:[],currentProject:null,selectProjectDialogVisible:!1,systemVersion:""}},methods:{toggleSidebar(){this.sidebarVisible=!this.sidebarVisible},toggleSessionDropdown(){this.showSessionDropdown=!this.showSessionDropdown},async switchSession(s){this.currentSessionId=s.id,this.currentSessionName=s.title,this.showSessionDropdown=!1,this.$route.params.id!==s.id&&this.$router.push({name:"chat-session",params:{id:s.id}}).catch(()=>{})},async createNewSession(){try{const s=await r.createSession("新会话");this.sessions.unshift(s.data),this.switchSession(s.data),this.showSessionDropdown=!1}catch(s){this.$message.error("创建会话失败: "+s.message)}},async loadSessions(){try{const s=await r.getSessions();this.sessions=s.data||[],this.sessions.length>0&&!this.currentSessionId&&(this.currentSessionId=this.sessions[0].id,this.currentSessionName=this.sessions[0].title)}catch(s){console.error("加载会话失败:",s)}},async loadProjects(){try{const s=await r.getProjects();this.projects=s.data||[];const e=await r.getCurrentProject();this.currentProject=e.data||null}catch(s){console.error("加载项目失败:",s)}},async handleProjectChange(s){if(s==="__open__"){const e=this.$el.querySelector(".el-dropdown");e&&e.click(),this.selectProjectDialogVisible=!0;return}try{await r.setCurrentProject(s);const e=this.projects.find(t=>t.id===s);e&&(this.currentProject=e),location.reload()}catch(e){this.$message.error("切换项目失败: "+e.message)}},handleProjectDialogSuccess(s){this.currentProject=s,this.loadProjects().then(()=>{location.reload()})},async loadSystemVersion(){var s;try{const e=await r.getSystemInfo();this.systemVersion=((s=e.data)==null?void 0:s.version)||""}catch(e){console.error("获取版本号失败:",e)}}},async created(){await this.loadProjects(),await this.loadSessions(),this.loadSystemVersion(),document.addEventListener("click",s=>{this.$el.contains(s.target)||(this.showSessionDropdown=!1)})}};var b=function(){var a;var e=this,t=e._self._c;return t("div",{staticClass:"flex flex-col h-screen overflow-hidden"},[t("header",{staticClass:"h-10 bg-sidebar border-b border-black flex items-center justify-between px-4 shrink-0 z-20"},[t("div",{staticClass:"flex items-center gap-4"},[e._m(0),t("div",{staticClass:"relative"},[t("a",{staticClass:"hover:text-white px-3 py-1 rounded border border-transparent hover:border-accent transition-colors cursor-pointer",class:e.$route.name==="devWorkflow"?"text-accent border-accent":"text-gray-400",attrs:{href:"/#/views/pc/devWorkflow",target:"_blank"}},[t("i",{staticClass:"fa-solid fa-laptop-code mr-1"}),e._v(" 软件研发 ")])]),t("div",{staticClass:"relative"},[t("a",{staticClass:"hover:text-white px-3 py-1 rounded border border-transparent hover:border-accent transition-colors cursor-pointer",class:e.$route.name==="designView"?"text-accent border-accent":"text-gray-400",attrs:{href:"/#/views/pc/designView",target:"_blank"}},[t("i",{staticClass:"fa-solid fa-pen-ruler mr-1"}),e._v(" 软件设计 ")])]),t("div",{staticClass:"relative"},[t("router-link",{staticClass:"hover:text-white px-3 py-1 rounded border border-transparent hover:border-accent transition-colors cursor-pointer",class:e.$route.name==="deploy"?"text-accent border-accent":"text-gray-400",attrs:{to:"/views/pc/deploy"}},[t("i",{staticClass:"fa-solid fa-rocket mr-1"}),e._v(" 部署 ")])],1)]),t("div",{staticClass:"flex items-center gap-3"},[e.projects.length>0?t("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleProjectChange}},[t("span",{staticClass:"text-white text-sm cursor-pointer hover:text-accent"},[t("i",{staticClass:"fa-solid fa-folder mr-1"}),e._v(" "+e._s(((a=e.currentProject)==null?void 0:a.name)||"选择项目")+" "),t("i",{staticClass:"fa-solid fa-chevron-down ml-1 text-xs"})]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e._l(e.projects,function(i){var o;return t("el-dropdown-item",{key:i.id,attrs:{command:i.id}},[t("span",{class:i.id===((o=e.currentProject)==null?void 0:o.id)?"text-accent":""},[e._v(e._s(i.name))])])}),t("el-dropdown-item",{attrs:{divided:"",command:"__open__"}},[t("i",{staticClass:"fa-solid fa-folder-open mr-1"}),e._v(" 打开项目文件夹 ")])],2)],1):e._e(),t("SelectProjectDialog",{attrs:{visible:e.selectProjectDialogVisible},on:{"update:visible":function(i){e.selectProjectDialogVisible=i},success:e.handleProjectDialogSuccess}}),e.systemVersion?t("span",{staticClass:"text-xs text-textMuted"},[e._v("v"+e._s(e.systemVersion))]):e._e(),e._m(1),t("button",{directives:[{name:"show",rawName:"v-show",value:e.$route.name==="chat",expression:"$route.name === 'chat'"}],staticClass:"hover:text-white",attrs:{title:e.sidebarVisible?"关闭侧栏":"显示侧栏"},on:{click:e.toggleSidebar}},[t("i",{staticClass:"fa-solid fa-columns"})])],1)]),t("div",{staticClass:"flex-1 flex overflow-hidden"},[t("nav",{staticClass:"w-12 bg-activityBar flex flex-col items-center py-2 shrink-0 border-r border-black z-10 justify-between"},[t("div",{staticClass:"flex flex-col items-center w-full"},[t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center relative",class:e.$route.name==="codeView"||e.$route.name==="codeView-session"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/codeView",title:"工作台"}},[t("i",{staticClass:"fa-regular fa-comments text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="files"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/files",title:"文件"}},[t("i",{staticClass:"fa-solid fa-folder-open text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="gitChanges"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/git-changes",title:"Git 变更"}},[t("i",{staticClass:"fa-brands fa-git-alt text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="terminal"||e.$route.name==="terminal-session"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/terminal",title:"终端"}},[t("i",{staticClass:"fa-solid fa-terminal text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center relative",class:e.$route.name==="skills"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/skills",title:"Skill 管理"}},[t("i",{staticClass:"fa-solid fa-shapes text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="db"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/db",title:"数据库"}},[t("i",{staticClass:"fa-solid fa-database text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="tasks"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/tasks",title:"任务"}},[t("i",{staticClass:"fa-solid fa-clock text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="aiLogs"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/aiLogs",title:"AI 日志"}},[t("i",{staticClass:"fa-solid fa-robot text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="wiki"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/wiki",title:"文档"}},[t("i",{staticClass:"fa-solid fa-book text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="fileZihao"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/fileZihao",title:"文件互联"}},[t("i",{staticClass:"fa-solid fa-server text-xl"})])],1),t("div",{staticClass:"flex flex-col items-center w-full mb-2"},[t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="settings"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent hover:bg-white/5",attrs:{to:"/views/pc/settings",title:"设置"}},[t("i",{staticClass:"fa-solid fa-gear text-xl"})])],1)]),t("keep-alive",{attrs:{include:["CodeView","TerminalView","Files"]}},[t("router-view",{staticClass:"flex-1 flex overflow-hidden",attrs:{"sidebar-visible":e.sidebarVisible},on:{"toggle-sidebar":e.toggleSidebar}})],1)],1),e._m(2)])},p=[function(){var s=this,e=s._self._c;return e("div",{staticClass:"font-bold text-white flex items-center gap-2"},[e("i",{staticClass:"fa-solid fa-robot text-accent"}),e("span",[s._v("TXCode Agent")])])},function(){var s=this,e=s._self._c;return e("span",{staticClass:"text-xs text-textMuted mr-2"},[e("i",{staticClass:"fa-solid fa-circle text-green-500 text-[8px]"}),s._v(" Server Connected")])},function(){var s=this,e=s._self._c;return e("footer",{staticClass:"h-6 bg-accent text-white text-xs flex items-center justify-between px-3 shrink-0 z-20"},[e("div",{staticClass:"flex items-center gap-4"},[e("span",[e("i",{staticClass:"fa-solid fa-code-branch"}),s._v(" main")])]),e("div",{staticClass:"flex items-center gap-4"},[e("span",[s._v("TXCode")]),e("span",[s._v("UTF-8")])])])}],m=l(u,b,p,!1,null,null);const x=m.exports;export{x as default};
1
+ import{n as l,a as r}from"./index-Cn73hS12.js";const n={name:"SelectProjectDialog",props:{visible:{type:Boolean,default:!1}},data(){return{dialogVisible:!1,drives:[],currentPath:"",parentPath:null,items:[],selectedPath:"",projectName:"",loading:!1}},watch:{visible(s){this.dialogVisible=s,s&&this.loadDrives()},dialogVisible(s){this.$emit("update:visible",s)}},methods:{async loadDrives(){console.log("[SelectProjectDialog] loading drives...");try{const s=await r.getDrives();if(console.log("[SelectProjectDialog] drives response:",s),this.drives=s.data.items||[],console.log("[SelectProjectDialog] drives:",this.drives),this.drives.length>0){const e=this.drives[0];console.log("[SelectProjectDialog] firstDrive:",e),await this.browse(e.path||"/")}else await this.browse("/")}catch(s){console.error("加载盘符失败:",s),this.$message.error("加载盘符失败: "+s.message)}},async browse(s){try{const t=(await r.browseFilesystem(s)).data;this.currentPath=t.current_path,this.parentPath=t.parent_path,this.items=t.items||[]}catch(e){console.error("浏览目录失败:",e),this.$message.error("浏览目录失败: "+e.message)}},async selectDrive(s){await this.browse(s)},selectItem(s){if(s.is_directory){this.selectedPath=s.path;const e=s.path.replace(/\\/g,"/").split("/");this.projectName=e.filter(t=>t).pop()||""}},async enterFolder(s){s.is_directory&&await this.browse(s.path)},async goToParent(){this.parentPath&&await this.browse(this.parentPath)},handleClose(){this.dialogVisible=!1,this.resetState()},resetState(){this.selectedPath="",this.projectName="",this.items=[],this.currentPath="",this.parentPath=null},async handleConfirm(){var s;if(!(!this.selectedPath||!this.projectName)){this.loading=!0;try{const e=await r.createProject(this.projectName,this.selectedPath,""),t=(s=e.data)==null?void 0:s.id;t&&(await r.setCurrentProject(t),this.$message.success("项目创建并切换成功"),this.$emit("success",e.data),this.handleClose())}catch(e){console.error("创建项目失败:",e),this.$message.error("创建项目失败: "+e.message)}finally{this.loading=!1}}}}};var c=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"选择项目文件夹",visible:e.dialogVisible,width:"600px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(a){e.dialogVisible=a},close:e.handleClose}},[t("div",{staticClass:"select-project-dialog"},[e.drives.length>0?t("div",{staticClass:"drive-nav"},e._l(e.drives,function(a){return t("el-button",{key:a.path,attrs:{size:"mini",type:e.currentPath.startsWith(a.path)?"primary":""},on:{click:function(i){return e.selectDrive(a.path)}}},[e._v(" "+e._s(a.name)+" ")])}),1):e._e(),t("div",{staticClass:"file-list-container"},[t("div",{staticClass:"current-path"},[t("span",{staticClass:"path-label"},[e._v("当前路径:")]),t("span",{staticClass:"path-value"},[e._v(e._s(e.currentPath))])]),e.items.length>0?t("div",{staticClass:"file-list"},[e.parentPath?t("div",{staticClass:"file-item parent",on:{click:e.goToParent}},[t("i",{staticClass:"fa-solid fa-arrow-up"}),t("span",[e._v("上一级")])]):e._e(),e._l(e.items.filter(a=>a.is_directory),function(a){return t("div",{key:a.path,staticClass:"file-item",class:{selected:e.selectedPath===a.path},on:{click:function(i){return e.selectItem(a)},dblclick:function(i){return e.enterFolder(a)}}},[t("i",{staticClass:"fa-solid fa-folder"}),t("span",{staticClass:"file-name"},[e._v(e._s(a.name))])])})],2):t("div",{staticClass:"empty-tip"},[t("span",[e._v("该目录为空")])])]),t("div",{staticClass:"底部状态栏"},[t("div",{staticClass:"selected-info"},[t("span",[e._v("已选择: "+e._s(e.selectedPath||"未选择"))])]),t("div",{staticClass:"project-name-input"},[t("span",[e._v("项目名称:")]),t("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入项目名称",size:"small"},model:{value:e.projectName,callback:function(a){e.projectName=a},expression:"projectName"}})],1)])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary",disabled:!e.selectedPath||!e.projectName,loading:e.loading},on:{click:e.handleConfirm}},[e._v(" 确 定 ")])],1)])},d=[],h=l(n,c,d,!1,null,"e90f8022");const f=h.exports,u={name:"Layout",components:{SelectProjectDialog:f},data(){return{sidebarVisible:!0,showSessionDropdown:!1,sessions:[],currentSessionId:null,currentSessionName:"",projects:[],currentProject:null,selectProjectDialogVisible:!1,systemVersion:""}},methods:{toggleSidebar(){this.sidebarVisible=!this.sidebarVisible},toggleSessionDropdown(){this.showSessionDropdown=!this.showSessionDropdown},async switchSession(s){this.currentSessionId=s.id,this.currentSessionName=s.title,this.showSessionDropdown=!1,this.$route.params.id!==s.id&&this.$router.push({name:"chat-session",params:{id:s.id}}).catch(()=>{})},async createNewSession(){try{const s=await r.createSession("新会话");this.sessions.unshift(s.data),this.switchSession(s.data),this.showSessionDropdown=!1}catch(s){this.$message.error("创建会话失败: "+s.message)}},async loadSessions(){try{const s=await r.getSessions();this.sessions=s.data||[],this.sessions.length>0&&!this.currentSessionId&&(this.currentSessionId=this.sessions[0].id,this.currentSessionName=this.sessions[0].title)}catch(s){console.error("加载会话失败:",s)}},async loadProjects(){try{const s=await r.getProjects();this.projects=s.data||[];const e=await r.getCurrentProject();this.currentProject=e.data||null}catch(s){console.error("加载项目失败:",s)}},async handleProjectChange(s){if(s==="__open__"){const e=this.$el.querySelector(".el-dropdown");e&&e.click(),this.selectProjectDialogVisible=!0;return}try{await r.setCurrentProject(s);const e=this.projects.find(t=>t.id===s);e&&(this.currentProject=e),location.reload()}catch(e){this.$message.error("切换项目失败: "+e.message)}},handleProjectDialogSuccess(s){this.currentProject=s,this.loadProjects().then(()=>{location.reload()})},async loadSystemVersion(){var s;try{const e=await r.getSystemInfo();this.systemVersion=((s=e.data)==null?void 0:s.version)||""}catch(e){console.error("获取版本号失败:",e)}}},async created(){await this.loadProjects(),await this.loadSessions(),this.loadSystemVersion(),document.addEventListener("click",s=>{this.$el.contains(s.target)||(this.showSessionDropdown=!1)})}};var b=function(){var a;var e=this,t=e._self._c;return t("div",{staticClass:"flex flex-col h-screen overflow-hidden"},[t("header",{staticClass:"h-10 bg-sidebar border-b border-black flex items-center justify-between px-4 shrink-0 z-20"},[t("div",{staticClass:"flex items-center gap-4"},[e._m(0),t("div",{staticClass:"relative"},[t("a",{staticClass:"hover:text-white px-3 py-1 rounded border border-transparent hover:border-accent transition-colors cursor-pointer",class:e.$route.name==="devWorkflow"?"text-accent border-accent":"text-gray-400",attrs:{href:"/#/views/pc/devWorkflow",target:"_blank"}},[t("i",{staticClass:"fa-solid fa-laptop-code mr-1"}),e._v(" 软件研发 ")])]),t("div",{staticClass:"relative"},[t("a",{staticClass:"hover:text-white px-3 py-1 rounded border border-transparent hover:border-accent transition-colors cursor-pointer",class:e.$route.name==="designView"?"text-accent border-accent":"text-gray-400",attrs:{href:"/#/views/pc/designView",target:"_blank"}},[t("i",{staticClass:"fa-solid fa-pen-ruler mr-1"}),e._v(" 软件设计 ")])]),t("div",{staticClass:"relative"},[t("router-link",{staticClass:"hover:text-white px-3 py-1 rounded border border-transparent hover:border-accent transition-colors cursor-pointer",class:e.$route.name==="deploy"?"text-accent border-accent":"text-gray-400",attrs:{to:"/views/pc/deploy"}},[t("i",{staticClass:"fa-solid fa-rocket mr-1"}),e._v(" 部署 ")])],1)]),t("div",{staticClass:"flex items-center gap-3"},[t("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleProjectChange}},[t("span",{staticClass:"text-white text-sm cursor-pointer hover:text-accent"},[t("i",{staticClass:"fa-solid fa-folder mr-1"}),e._v(" "+e._s(((a=e.currentProject)==null?void 0:a.name)||"选择项目")+" "),t("i",{staticClass:"fa-solid fa-chevron-down ml-1 text-xs"})]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e._l(e.projects,function(i){var o;return t("el-dropdown-item",{key:i.id,attrs:{command:i.id}},[t("span",{class:i.id===((o=e.currentProject)==null?void 0:o.id)?"text-accent":""},[e._v(e._s(i.name))])])}),t("el-dropdown-item",{attrs:{divided:"",command:"__open__"}},[t("i",{staticClass:"fa-solid fa-folder-open mr-1"}),e._v(" 打开项目文件夹 ")])],2)],1),t("SelectProjectDialog",{attrs:{visible:e.selectProjectDialogVisible},on:{"update:visible":function(i){e.selectProjectDialogVisible=i},success:e.handleProjectDialogSuccess}}),e.systemVersion?t("span",{staticClass:"text-xs text-textMuted"},[e._v("v"+e._s(e.systemVersion))]):e._e(),e._m(1),t("button",{directives:[{name:"show",rawName:"v-show",value:e.$route.name==="chat",expression:"$route.name === 'chat'"}],staticClass:"hover:text-white",attrs:{title:e.sidebarVisible?"关闭侧栏":"显示侧栏"},on:{click:e.toggleSidebar}},[t("i",{staticClass:"fa-solid fa-columns"})])],1)]),t("div",{staticClass:"flex-1 flex overflow-hidden"},[t("nav",{staticClass:"w-12 bg-activityBar flex flex-col items-center py-2 shrink-0 border-r border-black z-10 justify-between"},[t("div",{staticClass:"flex flex-col items-center w-full"},[t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center relative",class:e.$route.name==="codeView"||e.$route.name==="codeView-session"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/codeView",title:"工作台"}},[t("i",{staticClass:"fa-regular fa-comments text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="files"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/files",title:"文件"}},[t("i",{staticClass:"fa-solid fa-folder-open text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="gitChanges"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/git-changes",title:"Git 变更"}},[t("i",{staticClass:"fa-brands fa-git-alt text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="terminal"||e.$route.name==="terminal-session"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/terminal",title:"终端"}},[t("i",{staticClass:"fa-solid fa-terminal text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center relative",class:e.$route.name==="skills"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/skills",title:"Skill 管理"}},[t("i",{staticClass:"fa-solid fa-shapes text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="db"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/db",title:"数据库"}},[t("i",{staticClass:"fa-solid fa-database text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="tasks"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/tasks",title:"任务"}},[t("i",{staticClass:"fa-solid fa-clock text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="aiLogs"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/aiLogs",title:"AI 日志"}},[t("i",{staticClass:"fa-solid fa-robot text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="wiki"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/wiki",title:"文档"}},[t("i",{staticClass:"fa-solid fa-book text-xl"})]),t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="fileZihao"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent",attrs:{to:"/views/pc/fileZihao",title:"文件互联"}},[t("i",{staticClass:"fa-solid fa-server text-xl"})])],1),t("div",{staticClass:"flex flex-col items-center w-full mb-2"},[t("router-link",{staticClass:"w-10 h-10 mb-2 rounded flex items-center justify-center",class:e.$route.name==="settings"?"text-white border-l-2 border-accent bg-sidebar":"text-textMuted hover:text-white border-l-2 border-transparent hover:bg-white/5",attrs:{to:"/views/pc/settings",title:"设置"}},[t("i",{staticClass:"fa-solid fa-gear text-xl"})])],1)]),t("keep-alive",{attrs:{include:["CodeView","TerminalView","Files"]}},[t("router-view",{staticClass:"flex-1 flex overflow-hidden",attrs:{"sidebar-visible":e.sidebarVisible},on:{"toggle-sidebar":e.toggleSidebar}})],1)],1),e._m(2)])},p=[function(){var s=this,e=s._self._c;return e("div",{staticClass:"font-bold text-white flex items-center gap-2"},[e("i",{staticClass:"fa-solid fa-robot text-accent"}),e("span",[s._v("TXCode Agent")])])},function(){var s=this,e=s._self._c;return e("span",{staticClass:"text-xs text-textMuted mr-2"},[e("i",{staticClass:"fa-solid fa-circle text-green-500 text-[8px]"}),s._v(" Server Connected")])},function(){var s=this,e=s._self._c;return e("footer",{staticClass:"h-6 bg-accent text-white text-xs flex items-center justify-between px-3 shrink-0 z-20"},[e("div",{staticClass:"flex items-center gap-4"},[e("span",[e("i",{staticClass:"fa-solid fa-code-branch"}),s._v(" main")])]),e("div",{staticClass:"flex items-center gap-4"},[e("span",[s._v("TXCode")]),e("span",[s._v("UTF-8")])])])}],m=l(u,b,p,!1,null,null);const x=m.exports;export{x as default};