@maincode-ai/matilda-code 0.21.12 → 0.21.13-nightly.20261027.e00306cd3

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 (269) hide show
  1. package/chunks/agent-H5JE3RJQ.js +3 -0
  2. package/chunks/agent-headless-H2JZZ7UV.js +3 -0
  3. package/chunks/{askUserQuestion-2QI4NSFJ.js → askUserQuestion-L3WDL2T4.js} +3 -3
  4. package/chunks/ca-UBWUTZVZ.js +25 -0
  5. package/chunks/chunk-4CVGYUEL.js +3 -0
  6. package/chunks/{chunk-RNKDFE2S.js → chunk-5B2QERWR.js} +1 -1
  7. package/chunks/chunk-62GTGPTP.js +8 -0
  8. package/chunks/chunk-6365AZBW.js +56 -0
  9. package/chunks/chunk-6PFK4XTH.js +207 -0
  10. package/chunks/chunk-7ZODGQO6.js +4 -0
  11. package/chunks/chunk-DB5LMKXU.js +31 -0
  12. package/chunks/chunk-EYZPVR7N.js +13 -0
  13. package/chunks/chunk-FKHUEFMK.js +8 -0
  14. package/chunks/{chunk-6T2GIM76.js → chunk-GILXFDEG.js} +1 -1
  15. package/chunks/{chunk-VTGICC67.js → chunk-GKEUZTOB.js} +1 -1
  16. package/chunks/chunk-GSRXW64P.js +120 -0
  17. package/chunks/chunk-GT6MSEK4.js +3 -0
  18. package/chunks/chunk-HEJO7OBH.js +3 -0
  19. package/chunks/chunk-HPO2YWG4.js +78 -0
  20. package/chunks/chunk-I3CV4LOD.js +8 -0
  21. package/chunks/{chunk-DOOFGSRV.js → chunk-J3AMKDX6.js} +1 -1
  22. package/chunks/chunk-JU7QTSKS.js +14 -0
  23. package/chunks/chunk-LBQNFSZ2.js +9 -0
  24. package/chunks/chunk-LOB42ODE.js +9 -0
  25. package/chunks/chunk-LVDDFAK4.js +89 -0
  26. package/chunks/{chunk-27Q5KW3A.js → chunk-NK2QMGCC.js} +13 -13
  27. package/chunks/{chunk-YRQP3SLC.js → chunk-O7VPFJ3R.js} +1 -1
  28. package/chunks/chunk-OBE5S4GG.js +9 -0
  29. package/chunks/{chunk-CZGZ3KK7.js → chunk-ONANBLIE.js} +1 -1
  30. package/chunks/chunk-QXSBPCBA.js +8 -0
  31. package/chunks/chunk-TUKNB5CQ.js +33 -0
  32. package/chunks/chunk-UM6CLO7D.js +7 -0
  33. package/chunks/chunk-V4D3LER3.js +2615 -0
  34. package/chunks/{chunk-HYVP4472.js → chunk-V6UPUMP3.js} +1 -1
  35. package/chunks/chunk-VUJRLLGL.js +8 -0
  36. package/chunks/{chunk-MCQUPLRE.js → chunk-WTU6GSZH.js} +1 -1
  37. package/chunks/chunk-XBTBZHRC.js +8 -0
  38. package/chunks/{chunk-WV3IUPZS.js → chunk-YTB3OFTT.js} +1 -1
  39. package/chunks/chunk-ZQKABJBB.js +8 -0
  40. package/chunks/chunk-ZSGBDQXU.js +11 -0
  41. package/chunks/{computer-use-WKDNUTLD.js → computer-use-N6KGNST6.js} +1 -1
  42. package/chunks/{cron-create-F2LXM2OA.js → cron-create-4XBY5RVI.js} +1 -1
  43. package/chunks/cron-delete-BH4VP3LX.js +3 -0
  44. package/chunks/cron-list-XXRFKNGM.js +5 -0
  45. package/chunks/de-LEEHWWJ2.js +25 -0
  46. package/chunks/{devtools-5JRKK3E7.js → devtools-7YNCRYZV.js} +1 -1
  47. package/chunks/{chunk-OOEH6ZSV.js → dist-UWUWLWTO.js} +2 -2
  48. package/chunks/{edit-QQNJZ55P.js → edit-6ULTLTJQ.js} +1 -1
  49. package/chunks/{en-EJLDYIBM.js → en-LNOIHFSQ.js} +4 -4
  50. package/chunks/{enter-worktree-5X5SAMBJ.js → enter-worktree-V2VANZYJ.js} +1 -1
  51. package/chunks/enterPlanMode-75H54S3Z.js +18 -0
  52. package/chunks/{exit-worktree-SRKZBEYF.js → exit-worktree-KPB32K6P.js} +1 -1
  53. package/chunks/{exitPlanMode-WSPTGGVN.js → exitPlanMode-K7JRP22Y.js} +2 -2
  54. package/chunks/fr-4TA2AIU6.js +25 -0
  55. package/chunks/{getMachineId-bsd-ZYBNK2JG.js → getMachineId-bsd-ETKQTB6C.js} +1 -1
  56. package/chunks/{getMachineId-darwin-CM2MQGUI.js → getMachineId-darwin-AKNRWOWB.js} +1 -1
  57. package/chunks/{getMachineId-linux-SYE2KMCW.js → getMachineId-linux-2QSD7FTP.js} +1 -1
  58. package/chunks/{getMachineId-unsupported-6IHVG2XO.js → getMachineId-unsupported-UXSV7I24.js} +1 -1
  59. package/chunks/{getMachineId-win-S3J3JSUM.js → getMachineId-win-4MTFXGP3.js} +1 -1
  60. package/chunks/glob-ACAIHWST.js +22 -0
  61. package/chunks/{goal-tools-C6BSBHCF.js → goal-tools-VPFXBI6M.js} +3 -3
  62. package/chunks/{grep-MVCOBUYW.js → grep-R4K75RXS.js} +1 -1
  63. package/chunks/{ja-GGNJR7AR.js → ja-VXDMQKRW.js} +5 -5
  64. package/chunks/keychain-token-storage-7VYNARRB.js +3 -0
  65. package/chunks/ls-4ZEICYPK.js +15 -0
  66. package/chunks/{lsp-DYDK6XCS.js → lsp-4US2RIIV.js} +1 -1
  67. package/chunks/mcp-client-ZKQFYCFN.js +3 -0
  68. package/chunks/monitor-KSNFIY54.js +32 -0
  69. package/chunks/{multipart-parser-JI75T2O5.js → multipart-parser-FKHYAVGR.js} +1 -1
  70. package/chunks/notebook-edit-655ZNV6Q.js +17 -0
  71. package/chunks/openaiContentGenerator-BG3OM453.js +52 -0
  72. package/chunks/pt-WEIMCOKI.js +25 -0
  73. package/chunks/read-file-4VSUKSRB.js +3 -0
  74. package/chunks/ripGrep-PNALN2GG.js +3 -0
  75. package/chunks/ru-WFLK34ZL.js +25 -0
  76. package/chunks/scheduler-AVYCIBEK.js +8 -0
  77. package/chunks/send-message-ND2SRKX5.js +8 -0
  78. package/chunks/shell-GUHQNOMZ.js +3 -0
  79. package/chunks/{skill-HZPFEAPF.js → skill-AB2X2DTC.js} +1 -1
  80. package/chunks/src-LZEU4AYF.js +5 -0
  81. package/chunks/symbol-search-VICSUEZH.js +19 -0
  82. package/chunks/{syntheticOutput-432LXITX.js → syntheticOutput-Z7DQKMRI.js} +1 -1
  83. package/chunks/task-create-BQ73FRTH.js +3 -0
  84. package/chunks/{task-detach-XMSJ3HBM.js → task-detach-JCHSLUOR.js} +1 -1
  85. package/chunks/task-list-6ESRFO5F.js +9 -0
  86. package/chunks/{task-stop-NTS62FLG.js → task-stop-74H2CPAJ.js} +1 -1
  87. package/chunks/{task-update-AR26UFYZ.js → task-update-R3BN6KPQ.js} +1 -1
  88. package/chunks/{team-create-PYXFVIR5.js → team-create-UTKRPUPZ.js} +3 -3
  89. package/chunks/team-delete-PCCGTLGL.js +8 -0
  90. package/chunks/todoWrite-BZI75DFV.js +3 -0
  91. package/chunks/{tool-search-RKZDSRYS.js → tool-search-FJ5MAPQ6.js} +1 -1
  92. package/chunks/{web-fetch-VW3SVDQ6.js → web-fetch-DEUGZQZS.js} +17 -17
  93. package/chunks/{web-search-XQUIZARL.js → web-search-PUUIEFJO.js} +3 -3
  94. package/chunks/{workflow-YXNXDRWZ.js → workflow-CBADL3IM.js} +2 -2
  95. package/chunks/write-file-QGCL2AJL.js +15 -0
  96. package/cli.js +644 -679
  97. package/examples/starter/README.md +0 -3
  98. package/locales/ca.js +1 -37
  99. package/locales/de.js +1 -42
  100. package/locales/en.js +1 -43
  101. package/locales/fr.js +1 -39
  102. package/locales/ja.js +1 -42
  103. package/locales/pt.js +1 -42
  104. package/locales/ru.js +1 -42
  105. package/package.json +2 -2
  106. package/sandbox-macos-permissive-closed.sb +0 -1
  107. package/sandbox-macos-permissive-open.sb +0 -1
  108. package/sandbox-macos-permissive-proxied.sb +1 -2
  109. package/sandbox-macos-restrictive-closed.sb +14 -2
  110. package/sandbox-macos-restrictive-open.sb +14 -2
  111. package/sandbox-macos-restrictive-proxied.sb +15 -3
  112. package/bundled/mainy/SKILL.md +0 -157
  113. package/bundled/mainy/docs/_meta.ts +0 -32
  114. package/bundled/mainy/docs/common-workflow.md +0 -571
  115. package/bundled/mainy/docs/configuration/_meta.ts +0 -7
  116. package/bundled/mainy/docs/configuration/auth.md +0 -82
  117. package/bundled/mainy/docs/configuration/matilda-ignore.md +0 -55
  118. package/bundled/mainy/docs/configuration/model-providers.md +0 -598
  119. package/bundled/mainy/docs/configuration/settings.md +0 -790
  120. package/bundled/mainy/docs/configuration/themes.md +0 -199
  121. package/bundled/mainy/docs/configuration/trusted-folders.md +0 -67
  122. package/bundled/mainy/docs/extension/_meta.ts +0 -9
  123. package/bundled/mainy/docs/extension/extension-releasing.md +0 -204
  124. package/bundled/mainy/docs/extension/getting-started-extensions.md +0 -299
  125. package/bundled/mainy/docs/extension/introduction.md +0 -338
  126. package/bundled/mainy/docs/features/_meta.ts +0 -27
  127. package/bundled/mainy/docs/features/approval-mode.md +0 -388
  128. package/bundled/mainy/docs/features/arena.md +0 -219
  129. package/bundled/mainy/docs/features/auto-mode.md +0 -308
  130. package/bundled/mainy/docs/features/channels/_meta.ts +0 -8
  131. package/bundled/mainy/docs/features/channels/dingtalk.md +0 -134
  132. package/bundled/mainy/docs/features/channels/feishu.md +0 -186
  133. package/bundled/mainy/docs/features/channels/overview.md +0 -336
  134. package/bundled/mainy/docs/features/channels/plugins.md +0 -87
  135. package/bundled/mainy/docs/features/channels/telegram.md +0 -120
  136. package/bundled/mainy/docs/features/channels/weixin.md +0 -106
  137. package/bundled/mainy/docs/features/code-review.md +0 -291
  138. package/bundled/mainy/docs/features/commands.md +0 -528
  139. package/bundled/mainy/docs/features/dual-output.md +0 -627
  140. package/bundled/mainy/docs/features/followup-suggestions.md +0 -109
  141. package/bundled/mainy/docs/features/headless.md +0 -448
  142. package/bundled/mainy/docs/features/hooks.md +0 -1306
  143. package/bundled/mainy/docs/features/language.md +0 -171
  144. package/bundled/mainy/docs/features/lsp.md +0 -496
  145. package/bundled/mainy/docs/features/markdown-rendering.md +0 -183
  146. package/bundled/mainy/docs/features/mcp.md +0 -423
  147. package/bundled/mainy/docs/features/memory.md +0 -185
  148. package/bundled/mainy/docs/features/sandbox.md +0 -249
  149. package/bundled/mainy/docs/features/scheduled-tasks.md +0 -139
  150. package/bundled/mainy/docs/features/skills.md +0 -347
  151. package/bundled/mainy/docs/features/status-line.md +0 -397
  152. package/bundled/mainy/docs/features/structured-output.md +0 -309
  153. package/bundled/mainy/docs/features/sub-agents.md +0 -737
  154. package/bundled/mainy/docs/features/tips.md +0 -54
  155. package/bundled/mainy/docs/features/token-caching.md +0 -29
  156. package/bundled/mainy/docs/features/tool-use-summaries.md +0 -178
  157. package/bundled/mainy/docs/features/worktree.md +0 -345
  158. package/bundled/mainy/docs/ide-integration/_meta.ts +0 -4
  159. package/bundled/mainy/docs/ide-integration/ide-companion-spec.md +0 -182
  160. package/bundled/mainy/docs/ide-integration/ide-integration.md +0 -144
  161. package/bundled/mainy/docs/integration-github-action.md +0 -241
  162. package/bundled/mainy/docs/integration-jetbrains.md +0 -81
  163. package/bundled/mainy/docs/integration-vscode.md +0 -39
  164. package/bundled/mainy/docs/integration-zed.md +0 -72
  165. package/bundled/mainy/docs/matilda-serve-deploy-local.md +0 -221
  166. package/bundled/mainy/docs/matilda-serve.md +0 -661
  167. package/bundled/mainy/docs/overview.md +0 -64
  168. package/bundled/mainy/docs/quickstart.md +0 -234
  169. package/bundled/mainy/docs/reference/_meta.ts +0 -3
  170. package/bundled/mainy/docs/reference/keyboard-shortcuts.md +0 -91
  171. package/bundled/mainy/docs/support/Uninstall.md +0 -65
  172. package/bundled/mainy/docs/support/_meta.ts +0 -6
  173. package/bundled/mainy/docs/support/tos-privacy.md +0 -94
  174. package/bundled/mainy/docs/support/troubleshooting.md +0 -127
  175. package/chunks/agent-WM63A6NK.js +0 -3
  176. package/chunks/agent-headless-QIUBDKPW.js +0 -3
  177. package/chunks/anthropicContentGenerator-VKFTAIU3.js +0 -39
  178. package/chunks/ca-I2HEEIL7.js +0 -25
  179. package/chunks/chunk-2HTPVSGT.js +0 -3
  180. package/chunks/chunk-2MOGYHWM.js +0 -8
  181. package/chunks/chunk-3IRGBRSP.js +0 -113
  182. package/chunks/chunk-3YLXGE6T.js +0 -8
  183. package/chunks/chunk-47XR7IMP.js +0 -8
  184. package/chunks/chunk-4F4DA5UI.js +0 -8
  185. package/chunks/chunk-4J6DC24J.js +0 -59
  186. package/chunks/chunk-4Q2SNBUH.js +0 -18
  187. package/chunks/chunk-5C2RJ5RR.js +0 -37
  188. package/chunks/chunk-6E766NPX.js +0 -31
  189. package/chunks/chunk-6EQMZNIY.js +0 -8
  190. package/chunks/chunk-6GBNB5Z2.js +0 -3
  191. package/chunks/chunk-6Z2MV7ZY.js +0 -186
  192. package/chunks/chunk-BVOCFLC4.js +0 -56
  193. package/chunks/chunk-CSJTA7NE.js +0 -101
  194. package/chunks/chunk-DC7LAFZZ.js +0 -8
  195. package/chunks/chunk-DE3HKC2W.js +0 -9
  196. package/chunks/chunk-EQGA7LH7.js +0 -30
  197. package/chunks/chunk-FPO57O66.js +0 -39
  198. package/chunks/chunk-FWDMPRKU.js +0 -3
  199. package/chunks/chunk-G7R2XEEF.js +0 -7
  200. package/chunks/chunk-GOJCMVJJ.js +0 -8
  201. package/chunks/chunk-GTVCJCHR.js +0 -8
  202. package/chunks/chunk-JCE3JAVC.js +0 -25
  203. package/chunks/chunk-JRECUFB3.js +0 -2630
  204. package/chunks/chunk-KHHJYBR5.js +0 -9
  205. package/chunks/chunk-LJR4RZZ2.js +0 -3
  206. package/chunks/chunk-LUNDTQ3G.js +0 -8
  207. package/chunks/chunk-M53RP3YP.js +0 -31
  208. package/chunks/chunk-MO2HXJG5.js +0 -9
  209. package/chunks/chunk-MTMU7JYZ.js +0 -11
  210. package/chunks/chunk-O44XK65C.js +0 -8
  211. package/chunks/chunk-OA56BXPD.js +0 -3
  212. package/chunks/chunk-PA6532AY.js +0 -6
  213. package/chunks/chunk-PGXQZVLX.js +0 -8
  214. package/chunks/chunk-QKYGQLWC.js +0 -8
  215. package/chunks/chunk-QN6Y6NPA.js +0 -3
  216. package/chunks/chunk-QVCGLQCI.js +0 -32
  217. package/chunks/chunk-S3CWEVTS.js +0 -15
  218. package/chunks/chunk-SDTWBD62.js +0 -8
  219. package/chunks/chunk-T2T2UEPY.js +0 -4
  220. package/chunks/chunk-TISQNFB5.js +0 -3
  221. package/chunks/chunk-U347OO7S.js +0 -9
  222. package/chunks/chunk-UIRBHC5X.js +0 -3
  223. package/chunks/chunk-VI74YQQO.js +0 -8
  224. package/chunks/chunk-VYZOOSMP.js +0 -30
  225. package/chunks/chunk-WC2VTVCE.js +0 -27
  226. package/chunks/chunk-WVY2P6WH.js +0 -26
  227. package/chunks/chunk-WZ75OGYY.js +0 -14
  228. package/chunks/chunk-XMZIY7XX.js +0 -13
  229. package/chunks/chunk-YJAKOETP.js +0 -22
  230. package/chunks/chunk-YV3PUOBU.js +0 -65
  231. package/chunks/contextCommand-DAB3HOHY.js +0 -3
  232. package/chunks/cron-delete-DE6Q2S2L.js +0 -3
  233. package/chunks/cron-list-IAQEJVV7.js +0 -5
  234. package/chunks/de-AQXFJYZI.js +0 -25
  235. package/chunks/dist-7UYRLSLE.js +0 -3
  236. package/chunks/dist-ME6647DQ.js +0 -195
  237. package/chunks/dist-P6SLWL5V.js +0 -42
  238. package/chunks/dist-VG3ZDJ2A.js +0 -28
  239. package/chunks/dist-YTCHM57U.js +0 -23
  240. package/chunks/enterPlanMode-HP35SPLN.js +0 -18
  241. package/chunks/fileFromPath-7UCWPD4W.js +0 -3
  242. package/chunks/fr-6TDHK7F2.js +0 -25
  243. package/chunks/geminiContentGenerator-RJ73DQAP.js +0 -8
  244. package/chunks/glob-QQ6LGKDX.js +0 -22
  245. package/chunks/keychain-token-storage-KQK6MNOJ.js +0 -3
  246. package/chunks/ls-JYJXFSXN.js +0 -15
  247. package/chunks/matildaAgentContentGenerator-YUYS4336.js +0 -8
  248. package/chunks/matildaContentGenerator-O4Z2QPCP.js +0 -8
  249. package/chunks/matildaOAuth2-7COTQQR2.js +0 -3
  250. package/chunks/mcp-client-RXVQU5VI.js +0 -3
  251. package/chunks/monitor-77KXDXPR.js +0 -32
  252. package/chunks/notebook-edit-TKJD2EQZ.js +0 -17
  253. package/chunks/openaiContentGenerator-2EALAM3U.js +0 -3
  254. package/chunks/pt-D6L2QTDM.js +0 -25
  255. package/chunks/read-file-3KUAH6ND.js +0 -3
  256. package/chunks/ripGrep-U2PLKXMY.js +0 -3
  257. package/chunks/ru-BNJCHDYO.js +0 -25
  258. package/chunks/scheduler-J7VU2V5Y.js +0 -8
  259. package/chunks/send-message-P3SMWNEE.js +0 -8
  260. package/chunks/serve-FXH6EBQ6.js +0 -1015
  261. package/chunks/shell-PXR2AXDD.js +0 -3
  262. package/chunks/src-RFAEPLY7.js +0 -3
  263. package/chunks/src-WZTRMETQ.js +0 -5
  264. package/chunks/symbol-search-EAIZPWN7.js +0 -19
  265. package/chunks/task-create-Z3QRCMX4.js +0 -3
  266. package/chunks/task-list-GXAJW3JP.js +0 -9
  267. package/chunks/team-delete-OMYVUAQU.js +0 -8
  268. package/chunks/todoWrite-5NZ7CHTC.js +0 -3
  269. package/chunks/write-file-XDDLTGSG.js +0 -15
@@ -1,171 +0,0 @@
1
- # Internationalization (i18n) & Language
2
-
3
- Matilda Code is built for multilingual workflows: it supports UI localization (i18n/l10n) in the CLI, lets you choose the assistant output language, and allows custom UI language packs.
4
-
5
- ## Overview
6
-
7
- From a user point of view, Matilda Code’s “internationalization” spans multiple layers:
8
-
9
- | Capability / Setting | What it controls | Where stored |
10
- | ------------------------ | ---------------------------------------------------------------------- | ------------------------------- |
11
- | `/language ui` | Terminal UI text (menus, system messages, prompts) | `~/.matilda/settings.json` |
12
- | `/language output` | Language the AI responds in (an output preference, not UI translation) | `~/.matilda/output-language.md` |
13
- | Custom UI language packs | Overrides/extends built-in UI translations | `~/.matilda/locales/*.js` |
14
-
15
- ## UI Language
16
-
17
- This is the CLI’s UI localization layer (i18n/l10n): it controls the language of menus, prompts, and system messages.
18
-
19
- ### Setting the UI Language
20
-
21
- Use the `/language ui` command:
22
-
23
- ```bash
24
- /language ui zh-CN # Chinese
25
- /language ui en-US # English
26
- /language ui ru-RU # Russian
27
- /language ui de-DE # German
28
- /language ui ja-JP # Japanese
29
- /language ui pt-BR # Portuguese (Brazil)
30
- /language ui fr-FR # French
31
- /language ui ca-ES # Catalan
32
- ```
33
-
34
- Aliases are also supported:
35
-
36
- ```bash
37
- /language ui zh # Chinese
38
- /language ui en # English
39
- /language ui ru # Russian
40
- /language ui de # German
41
- /language ui ja # Japanese
42
- /language ui pt # Portuguese
43
- /language ui fr # French
44
- /language ui ca # Catalan
45
- ```
46
-
47
- ### Auto-detection
48
-
49
- On first startup, Matilda Code detects your system locale and sets the UI language automatically.
50
-
51
- Detection priority:
52
-
53
- 1. `MATILDA_CODE_LANG` environment variable
54
- 2. `LANG` environment variable
55
- 3. System locale via JavaScript Intl API
56
- 4. Default: English
57
-
58
- ## LLM Output Language
59
-
60
- The LLM output language controls what language the AI assistant responds in, regardless of what language you type your questions in.
61
-
62
- ### How It Works
63
-
64
- The LLM output language is controlled by a rule file at `~/.matilda/output-language.md`. This file is automatically included in the LLM's context during startup, instructing it to respond in the specified language.
65
-
66
- ### Auto-detection
67
-
68
- On first startup, if no `output-language.md` file exists, Matilda Code automatically creates one based on your system locale. For example:
69
-
70
- - System locale `zh` creates a rule for Chinese responses
71
- - System locale `en` creates a rule for English responses
72
- - System locale `ru` creates a rule for Russian responses
73
- - System locale `de` creates a rule for German responses
74
- - System locale `ja` creates a rule for Japanese responses
75
- - System locale `pt` creates a rule for Portuguese responses
76
- - System locale `fr` creates a rule for French responses
77
- - System locale `ca` creates a rule for Catalan responses
78
-
79
- ### Manual Setting
80
-
81
- Use `/language output <language>` to change:
82
-
83
- ```bash
84
- /language output Chinese
85
- /language output English
86
- /language output Japanese
87
- /language output German
88
- ```
89
-
90
- Any language name works. The LLM will be instructed to respond in that language.
91
-
92
- > [!note]
93
- >
94
- > After changing the output language, restart Matilda Code for the change to take effect.
95
-
96
- ### File Location
97
-
98
- ```
99
- ~/.matilda/output-language.md
100
- ```
101
-
102
- ## Configuration
103
-
104
- ### Via Settings Dialog
105
-
106
- 1. Run `/settings`
107
- 2. Find "Language" under General
108
- 3. Select your preferred UI language
109
-
110
- ### Via Environment Variable
111
-
112
- ```bash
113
- export MATILDA_CODE_LANG=zh
114
- ```
115
-
116
- This influences auto-detection on first startup (if you haven’t set a UI language and no `output-language.md` file exists yet).
117
-
118
- ## Custom Language Packs
119
-
120
- For UI translations, you can create custom language packs in `~/.matilda/locales/`:
121
-
122
- - Example: `~/.matilda/locales/es.js` for Spanish
123
- - Example: `~/.matilda/locales/fr.js` for French
124
-
125
- User directory takes precedence over built-in translations.
126
-
127
- > [!tip]
128
- >
129
- > Contributions are welcome! If you’d like to improve built-in translations or add new languages.
130
- > For a concrete example, see [PR #1238: feat(i18n): add Russian language support](https://github.com/MaincodeHQ/matilda-code/pull/1238).
131
-
132
- ### Maintaining `zh-TW` (Traditional Chinese for Taiwan)
133
-
134
- `zh-TW` is **not** an automatic OpenCC s2t conversion of `zh.js` — it is a hand-maintained Taiwan-vocabulary translation. When adding or updating keys, please follow the conventions below.
135
-
136
- The "CI enforced?" column indicates whether `npm run check-i18n` will fail the build on a violation. Rows marked **No** are style guidance enforced by review only — typically because the offending form has a legitimate non-UI meaning (`文件` can mean "document", `打開` is colloquially fine in Taiwan).
137
-
138
- | Avoid | Use instead | CI enforced? | Reason |
139
- | --------------------- | --------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
140
- | 文件 (file) | 檔案 | No | Taiwan term for filesystem files (but `文件` can legitimately mean "document") |
141
- | 服務器 / 服务器 | 伺服器 | Yes | Taiwan term for "server" |
142
- | 菜單 / 菜单 | 選單 | Yes | Taiwan term for "menu" |
143
- | 鏈接 / 链接 | 連結 | Yes | Taiwan term for "link" (bare `鏈` is fine — e.g. 區塊鏈) |
144
- | 打開 | 開啟 | No | Taiwan-preferred verb for "open" (UI); `打開` is colloquially common |
145
- | 爲 / 啓 / 曆史 / 鏈接 | 為 / 啟 / 歷史 / 連結 | Yes | Variant Traditional forms from raw OpenCC s2t. Note: `曆` is context-dependent and correct in calendar terms (日曆, 農曆, 西曆); CI only flags the bigram `曆史`, not bare `曆`. |
146
-
147
- If you are not a Traditional Chinese speaker and need to bootstrap a value, **do not paste raw OpenCC `s2t` output**: the default s2t profile emits variant Traditional characters (e.g. 爲, 啓) that Taiwan does not use, and never rewrites Mainland-Chinese vocabulary (服務器, 菜單). Prefer `s2twp.json` (Simplified → Taiwan with phrase mapping) as a starting point and then ask a Taiwan-Chinese speaker to review.
148
-
149
- The `check-i18n` script (run in CI via `npm run check-i18n`) will fail the build if any of the CI-enforced substrings above end up in a `zh-TW` value. See `scripts/check-i18n.ts → ZH_TW_FORBIDDEN_PATTERNS` for the full list. If a translation legitimately needs to contain a CI-forbidden substring, add its key to `ZH_TW_ALLOWED_EXCEPTIONS` in the same file with a brief justification.
150
-
151
- > [!note]
152
- >
153
- > The check uses plain substring matching, which does not understand Chinese word boundaries. A bigram pattern can therefore false-positive across compound-word boundaries — for example, `區塊鏈接口` (= `區塊鏈` + `接口`) contains the substring `鏈接` even though neither word is incorrect. If you hit a surprising CI failure of this kind, add the translation key to `ZH_TW_ALLOWED_EXCEPTIONS` rather than removing the pattern.
154
-
155
- ### Language Pack Format
156
-
157
- ```javascript
158
- // ~/.matilda/locales/es.js
159
- export default {
160
- Hello: 'Hola',
161
- Settings: 'Configuracion',
162
- // ... more translations
163
- };
164
- ```
165
-
166
- ## Related Commands
167
-
168
- - `/language` - Show current language settings
169
- - `/language ui [lang]` - Set UI language
170
- - `/language output <language>` - Set LLM output language
171
- - `/settings` - Open settings dialog
@@ -1,496 +0,0 @@
1
- # Language Server Protocol (LSP) Support
2
-
3
- Matilda Code provides native Language Server Protocol (LSP) support, enabling advanced code intelligence features like go-to-definition, find references, diagnostics, and code actions. This integration allows the AI agent to understand your code more deeply and provide more accurate assistance.
4
-
5
- ## Overview
6
-
7
- LSP support in Matilda Code works by connecting to language servers that understand your code. Once you configure servers via `.lsp.json` (or extensions), Matilda Code can start them and use them to:
8
-
9
- - Navigate to symbol definitions
10
- - Find all references to a symbol
11
- - Get hover information (documentation, type info)
12
- - View diagnostic messages (errors, warnings)
13
- - Access code actions (quick fixes, refactorings)
14
- - Analyze call hierarchies
15
-
16
- ## Quick Start
17
-
18
- LSP is an experimental feature in Matilda Code. To enable it, use the `--experimental-lsp` command line flag:
19
-
20
- ```bash
21
- matilda --experimental-lsp
22
- ```
23
-
24
- LSP servers are configuration-driven. You must define them in `.lsp.json` (or via extensions) for Matilda Code to start them.
25
-
26
- ### Prerequisites
27
-
28
- You need to have the language server for your programming language installed:
29
-
30
- | Language | Language Server | Install Command |
31
- | --------------------- | -------------------------- | ------------------------------------------------------------------------------ |
32
- | TypeScript/JavaScript | typescript-language-server | `npm install -g typescript-language-server typescript` |
33
- | Python | pylsp | `pip install python-lsp-server` |
34
- | Go | gopls | `go install golang.org/x/tools/gopls@latest` |
35
- | Rust | rust-analyzer | [Installation guide](https://rust-analyzer.github.io/manual.html#installation) |
36
- | C/C++ | clangd | Install LLVM/clangd via your package manager |
37
- | Java | jdtls | Install JDTLS and a JDK |
38
-
39
- ## Configuration
40
-
41
- ### .lsp.json File
42
-
43
- You can configure language servers using a `.lsp.json` file in your project root. Each top-level key is a language identifier, and its value is the server configuration object.
44
-
45
- **Basic format:**
46
-
47
- ```json
48
- {
49
- "typescript": {
50
- "command": "typescript-language-server",
51
- "args": ["--stdio"],
52
- "extensionToLanguage": {
53
- ".ts": "typescript",
54
- ".tsx": "typescriptreact",
55
- ".js": "javascript",
56
- ".jsx": "javascriptreact"
57
- }
58
- }
59
- }
60
- ```
61
-
62
- ### C/C++ (clangd) configuration
63
-
64
- Dependencies:
65
-
66
- - clangd (LLVM) must be installed and available in PATH.
67
- - A compile database (`compile_commands.json`) or `compile_flags.txt` is required for accurate results.
68
-
69
- Example:
70
-
71
- ```json
72
- {
73
- "cpp": {
74
- "command": "clangd",
75
- "args": [
76
- "--background-index",
77
- "--clang-tidy",
78
- "--header-insertion=iwyu",
79
- "--completion-style=detailed"
80
- ]
81
- }
82
- }
83
- ```
84
-
85
- ### Java (jdtls) configuration
86
-
87
- Dependencies:
88
-
89
- - JDK installed and available in PATH (`java`).
90
- - JDTLS installed and available in PATH (`jdtls`).
91
-
92
- Example:
93
-
94
- ```json
95
- {
96
- "java": {
97
- "command": "jdtls",
98
- "args": ["-configuration", ".jdtls-config", "-data", ".jdtls-workspace"]
99
- }
100
- }
101
- ```
102
-
103
- ### Configuration Options
104
-
105
- #### Required Fields
106
-
107
- | Option | Type | Description |
108
- | --------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
109
- | `command` | string | Command to start the LSP server. Supports bare command names resolved via `PATH` (e.g. `clangd`) and absolute paths (e.g. `/opt/llvm/bin/clangd`) |
110
-
111
- #### Optional Fields
112
-
113
- | Option | Type | Default | Description |
114
- | ----------------------- | -------- | --------- | ------------------------------------------------------- |
115
- | `args` | string[] | `[]` | Command line arguments |
116
- | `transport` | string | `"stdio"` | Transport type: `stdio`, `tcp`, or `socket` |
117
- | `env` | object | - | Environment variables |
118
- | `initializationOptions` | object | - | LSP initialization options |
119
- | `settings` | object | - | Server settings via `workspace/didChangeConfiguration` |
120
- | `extensionToLanguage` | object | - | Maps file extensions to language identifiers |
121
- | `workspaceFolder` | string | - | Override workspace folder (must be within project root) |
122
- | `startupTimeout` | number | `10000` | Startup timeout in milliseconds |
123
- | `shutdownTimeout` | number | `5000` | Shutdown timeout in milliseconds |
124
- | `restartOnCrash` | boolean | `false` | Auto-restart on crash |
125
- | `maxRestarts` | number | `3` | Maximum restart attempts |
126
- | `trustRequired` | boolean | `true` | Require trusted workspace |
127
-
128
- ### TCP/Socket Transport
129
-
130
- For servers that use TCP or Unix socket transport:
131
-
132
- ```json
133
- {
134
- "remote-lsp": {
135
- "transport": "tcp",
136
- "socket": {
137
- "host": "127.0.0.1",
138
- "port": 9999
139
- },
140
- "extensionToLanguage": {
141
- ".custom": "custom"
142
- }
143
- }
144
- }
145
- ```
146
-
147
- ## Available LSP Operations
148
-
149
- Matilda Code exposes LSP functionality through the unified `lsp` tool. Here are the available operations:
150
-
151
- Location-based operations (`goToDefinition`, `findReferences`, `hover`, `goToImplementation`, and `prepareCallHierarchy`) require an exact `filePath` + `line` + `character` position. If you do not know the exact position, use `workspaceSymbol` or `documentSymbol` first to locate the symbol.
152
-
153
- ### Code Navigation
154
-
155
- #### Go to Definition
156
-
157
- Find where a symbol is defined.
158
-
159
- ```
160
- Operation: goToDefinition
161
- Parameters:
162
- - filePath: Path to the file
163
- - line: Line number (1-based)
164
- - character: Column number (1-based)
165
- ```
166
-
167
- #### Find References
168
-
169
- Find all references to a symbol.
170
-
171
- ```
172
- Operation: findReferences
173
- Parameters:
174
- - filePath: Path to the file
175
- - line: Line number (1-based)
176
- - character: Column number (1-based)
177
- - includeDeclaration: Include the declaration itself (optional)
178
- ```
179
-
180
- #### Go to Implementation
181
-
182
- Find implementations of an interface or abstract method.
183
-
184
- ```
185
- Operation: goToImplementation
186
- Parameters:
187
- - filePath: Path to the file
188
- - line: Line number (1-based)
189
- - character: Column number (1-based)
190
- ```
191
-
192
- ### Symbol Information
193
-
194
- #### Hover
195
-
196
- Get documentation and type information for a symbol.
197
-
198
- ```
199
- Operation: hover
200
- Parameters:
201
- - filePath: Path to the file
202
- - line: Line number (1-based)
203
- - character: Column number (1-based)
204
- ```
205
-
206
- #### Document Symbols
207
-
208
- Get all symbols in a document.
209
-
210
- ```
211
- Operation: documentSymbol
212
- Parameters:
213
- - filePath: Path to the file
214
- ```
215
-
216
- #### Workspace Symbol Search
217
-
218
- Search for symbols across the workspace.
219
-
220
- ```
221
- Operation: workspaceSymbol
222
- Parameters:
223
- - query: Search query string
224
- - limit: Maximum results (optional)
225
- ```
226
-
227
- ### Call Hierarchy
228
-
229
- #### Prepare Call Hierarchy
230
-
231
- Get the call hierarchy item at a position.
232
-
233
- ```
234
- Operation: prepareCallHierarchy
235
- Parameters:
236
- - filePath: Path to the file
237
- - line: Line number (1-based)
238
- - character: Column number (1-based)
239
- ```
240
-
241
- #### Incoming Calls
242
-
243
- Find all functions that call the given function.
244
-
245
- ```
246
- Operation: incomingCalls
247
- Parameters:
248
- - callHierarchyItem: Item from prepareCallHierarchy
249
- ```
250
-
251
- #### Outgoing Calls
252
-
253
- Find all functions called by the given function.
254
-
255
- ```
256
- Operation: outgoingCalls
257
- Parameters:
258
- - callHierarchyItem: Item from prepareCallHierarchy
259
- ```
260
-
261
- ### Diagnostics
262
-
263
- #### File Diagnostics
264
-
265
- Get diagnostic messages (errors, warnings) for a file.
266
-
267
- ```
268
- Operation: diagnostics
269
- Parameters:
270
- - filePath: Path to the file
271
- ```
272
-
273
- #### Workspace Diagnostics
274
-
275
- Get all diagnostic messages across the workspace.
276
-
277
- ```
278
- Operation: workspaceDiagnostics
279
- Parameters:
280
- - limit: Maximum results (optional)
281
- ```
282
-
283
- #### Automatic diagnostics after edits
284
-
285
- When LSP is enabled, the agent does not need to ask for diagnostics explicitly after changing a file. Immediately after a successful file edit or write, the configured language servers are queried for that file and any errors and warnings are appended to the tool result, so the agent can correct mistakes in the same turn.
286
-
287
- This is best-effort: it only runs while LSP is enabled, it is bounded by a short timeout so a slow server never stalls the turn, it reports errors and warnings only (capped in volume), and a failure to fetch diagnostics never affects the edit itself. Servers that do not implement pull diagnostics contribute nothing to this feedback.
288
-
289
- ### Code Actions
290
-
291
- #### Get Code Actions
292
-
293
- Get available code actions (quick fixes, refactorings) at a location.
294
-
295
- ```
296
- Operation: codeActions
297
- Parameters:
298
- - filePath: Path to the file
299
- - line: Start line number (1-based)
300
- - character: Start column number (1-based)
301
- - endLine: End line number (optional, defaults to line)
302
- - endCharacter: End column (optional, defaults to character)
303
- - diagnostics: Diagnostics to get actions for (optional)
304
- - codeActionKinds: Filter by action kind (optional)
305
- ```
306
-
307
- Code action kinds:
308
-
309
- - `quickfix` - Quick fixes for errors/warnings
310
- - `refactor` - Refactoring operations
311
- - `refactor.extract` - Extract to function/variable
312
- - `refactor.inline` - Inline function/variable
313
- - `source` - Source code actions
314
- - `source.organizeImports` - Organize imports
315
- - `source.fixAll` - Fix all auto-fixable issues
316
-
317
- ## Security
318
-
319
- LSP servers are only started in trusted workspaces by default. This is because language servers run with your user permissions and can execute code.
320
-
321
- ### Trust Controls
322
-
323
- - **Trusted Workspace**: LSP servers start if configured
324
- - **Untrusted Workspace**: LSP servers won't start unless `trustRequired: false` is set in the server configuration
325
-
326
- To mark a workspace as trusted, use the `/trust` command.
327
-
328
- ### Per-Server Trust Override
329
-
330
- You can override trust requirements for specific servers in their configuration:
331
-
332
- ```json
333
- {
334
- "safe-server": {
335
- "command": "safe-language-server",
336
- "args": ["--stdio"],
337
- "trustRequired": false,
338
- "extensionToLanguage": {
339
- ".safe": "safe"
340
- }
341
- }
342
- }
343
- ```
344
-
345
- ## Troubleshooting
346
-
347
- ### Server Not Starting
348
-
349
- 1. **Verify `--experimental-lsp` flag**: Make sure you're using the flag when starting Matilda Code
350
- 2. **Check if the server is installed**: Run the command manually (e.g. `clangd --version`) to verify
351
- 3. **Check the command**: The server binary must be in your system `PATH`, or specified as an absolute path (e.g. `/opt/llvm/bin/clangd`). Relative paths that escape the workspace are blocked
352
- 4. **Check workspace trust**: The workspace must be trusted for LSP (use `/trust`)
353
- 5. **Check logs**: Start Matilda Code with `--debug`, then search for LSP-related entries in the debug log (see Debugging section below)
354
- 6. **Check the process**: Run `ps aux | grep <server-name>` to verify the server process is running
355
-
356
- ### Slow Performance
357
-
358
- 1. **Large projects**: Consider excluding `node_modules` and other large directories
359
- 2. **Server timeout**: Increase `startupTimeout` in server configuration for slow servers
360
-
361
- ### No Results
362
-
363
- 1. **Server not ready**: The server may still be indexing. For C/C++ projects with clangd, ensure `--background-index` is in the args and a `compile_commands.json` (or `compile_flags.txt`) exists in the project root or a parent directory. Use `--compile-commands-dir=<path>` if it is in a build subdirectory
364
- 2. **File not saved**: Save your file for the server to pick up changes
365
- 3. **Wrong language**: Check if the correct server is running for your language
366
- 4. **Check the process**: Run `ps aux | grep <server-name>` to verify the server is actually running
367
-
368
- ### Debugging
369
-
370
- LSP does not have a separate debug flag. Use Matilda Code's normal debug mode together with the LSP feature flag:
371
-
372
- ```bash
373
- matilda --experimental-lsp --debug
374
- ```
375
-
376
- Debug logs are written to the session debug log directory. To check LSP-related entries:
377
-
378
- ```bash
379
- # Default runtime directory
380
- rg "LSP|Native LSP|clangd|connection closed" ~/.matilda/debug/latest
381
- # Or, without ripgrep:
382
- grep -E "LSP|Native LSP|clangd|connection closed" ~/.matilda/debug/latest
383
-
384
- # If MATILDA_RUNTIME_DIR is configured
385
- rg "LSP|Native LSP|clangd|connection closed" "$MATILDA_RUNTIME_DIR/debug/latest"
386
- ```
387
-
388
- Useful entries include:
389
-
390
- - `[LSP] ...`: Logs emitted by the native LSP service and server manager.
391
- - `[CONFIG] Native LSP status after discovery: ...`: LSP server configuration discovered for the session.
392
- - `[CONFIG] Native LSP status after startup: ...`: Server startup result, including ready/failed counts.
393
- - `[STATUS] LSP status snapshot for /status: ...`: Status snapshot printed when running `/status` in debug mode.
394
-
395
- You can also run `/status` in the CLI to see a short LSP summary:
396
-
397
- ```text
398
- LSP: disabled
399
- LSP: enabled, 1/1 ready
400
- LSP: enabled, 0/1 ready (1 failed)
401
- LSP: enabled, no servers configured
402
- LSP: enabled, status unavailable
403
- ```
404
-
405
- For per-server details, run `/lsp`:
406
-
407
- ```text
408
- **LSP Server Status**
409
-
410
- | Server | Command | Languages | Status |
411
- |--------|---------|-----------|--------|
412
- | clangd | `clangd` | c, cpp | READY |
413
- | pyright | `pyright-langserver` | python | FAILED - startup failed |
414
- ```
415
-
416
- Common error messages to look for:
417
-
418
- ```text
419
- command path is unsafe -> relative path escapes workspace, use absolute path or add to PATH
420
- command not found -> server binary not installed or not in PATH
421
- requires trusted workspace -> run /trust first
422
- LSP connection closed -> server started but exited or closed stdio before replying to initialize
423
- ```
424
-
425
- For clangd startup failures, verify the server directly from the project root:
426
-
427
- ```bash
428
- clangd --version
429
- clangd --check=/path/to/file.cpp --log=verbose
430
- ```
431
-
432
- C/C++ projects should usually provide a `compile_commands.json` or `compile_flags.txt`. If the compile database is in a build directory, pass it to clangd:
433
-
434
- ```json
435
- {
436
- "cpp": {
437
- "command": "clangd",
438
- "args": ["--background-index", "--compile-commands-dir=build"]
439
- }
440
- }
441
- ```
442
-
443
- ```bash
444
- ps aux | grep clangd # or typescript-language-server, jdtls, etc.
445
- ```
446
-
447
- ## Extension LSP Configuration
448
-
449
- Extensions can provide LSP server configurations through the `lspServers` field in their `plugin.json`. This can be either an inline object or a path to a `.lsp.json` file. Matilda Code loads these configs when the extension is enabled. The format is the same language-keyed layout used in project `.lsp.json` files.
450
-
451
- ## Best Practices
452
-
453
- 1. **Install language servers globally**: This ensures they're available in all projects
454
- 2. **Use project-specific settings**: Configure server options per project when needed via `.lsp.json`
455
- 3. **Keep servers updated**: Update your language servers regularly for best results
456
- 4. **Trust wisely**: Only trust workspaces from trusted sources
457
-
458
- ## FAQ
459
-
460
- ### Q: How do I enable LSP?
461
-
462
- Use the `--experimental-lsp` flag when starting Matilda Code:
463
-
464
- ```bash
465
- matilda --experimental-lsp
466
- ```
467
-
468
- ### Q: How do I know which language servers are running?
469
-
470
- Start Matilda Code with LSP and debug mode enabled:
471
-
472
- ```bash
473
- matilda --experimental-lsp --debug
474
- ```
475
-
476
- Then run `/status` for a short summary, `/lsp` for per-server status, or inspect the debug log:
477
-
478
- ```bash
479
- # Default runtime directory
480
- rg "LSP|Native LSP|<server-name>" ~/.matilda/debug/latest
481
- # Or:
482
- grep -E "LSP|Native LSP|<server-name>" ~/.matilda/debug/latest
483
-
484
- # If MATILDA_RUNTIME_DIR is configured
485
- rg "LSP|Native LSP|<server-name>" "$MATILDA_RUNTIME_DIR/debug/latest"
486
- ```
487
-
488
- LSP uses Matilda Code's normal `--debug` mode; there is no separate LSP debug flag.
489
-
490
- ### Q: Can I use multiple language servers for the same file type?
491
-
492
- Yes, but only one will be used for each operation. The first server that returns results wins.
493
-
494
- ### Q: Does LSP work in sandbox mode?
495
-
496
- LSP servers run outside the sandbox to access your code. They're subject to workspace trust controls.