reasonix 0.40.0 → 0.43.0

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 (194) hide show
  1. package/README.md +47 -16
  2. package/README.zh-CN.md +19 -13
  3. package/dashboard/app.css +8 -4
  4. package/dashboard/dist/app.js +377 -227
  5. package/dashboard/dist/app.js.map +1 -1
  6. package/dist/cli/acp-DAGPCVFZ.js +713 -0
  7. package/dist/cli/acp-DAGPCVFZ.js.map +1 -0
  8. package/dist/cli/chat-7ES4IBNH.js +50 -0
  9. package/dist/cli/{chunk-E46ECXJD.js → chunk-2425HK6U.js} +2 -1
  10. package/dist/cli/{chunk-E46ECXJD.js.map → chunk-2425HK6U.js.map} +1 -1
  11. package/dist/cli/chunk-25T6CVUP.js +172 -0
  12. package/dist/cli/chunk-25T6CVUP.js.map +1 -0
  13. package/dist/cli/{chunk-7DLHHBGN.js → chunk-2K65GZBT.js} +16 -5
  14. package/dist/cli/chunk-2K65GZBT.js.map +1 -0
  15. package/dist/cli/{chunk-KMWKGPFZ.js → chunk-2KDUS647.js} +14 -4
  16. package/dist/cli/chunk-2KDUS647.js.map +1 -0
  17. package/dist/cli/chunk-2R4QCDOZ.js +11392 -0
  18. package/dist/cli/chunk-2R4QCDOZ.js.map +1 -0
  19. package/dist/cli/{chunk-3Q3C4W66.js → chunk-2UQP6H6T.js} +2 -1
  20. package/dist/cli/{chunk-3Q3C4W66.js.map → chunk-2UQP6H6T.js.map} +1 -1
  21. package/dist/cli/chunk-2Z35JOA4.js +96 -0
  22. package/dist/cli/chunk-2Z35JOA4.js.map +1 -0
  23. package/dist/cli/chunk-32TIKD5U.js +54 -0
  24. package/dist/cli/{chunk-JWCTX5S4.js.map → chunk-32TIKD5U.js.map} +1 -1
  25. package/dist/cli/{chunk-UVRXTSK3.js → chunk-3BXRZFWS.js} +65 -3
  26. package/dist/cli/chunk-3BXRZFWS.js.map +1 -0
  27. package/dist/cli/chunk-3Z6IBU3D.js +249 -0
  28. package/dist/cli/chunk-3Z6IBU3D.js.map +1 -0
  29. package/dist/cli/{chunk-VLNRQMCI.js → chunk-45U62RI3.js} +12 -5
  30. package/dist/cli/chunk-45U62RI3.js.map +1 -0
  31. package/dist/cli/{chunk-5GKJLNP2.js → chunk-4QUNBQQ2.js} +3 -2
  32. package/dist/cli/{chunk-5GKJLNP2.js.map → chunk-4QUNBQQ2.js.map} +1 -1
  33. package/dist/cli/{chunk-R4YTW7PR.js → chunk-5JJRUIPA.js} +57 -12
  34. package/dist/cli/chunk-5JJRUIPA.js.map +1 -0
  35. package/dist/cli/{chunk-HCC42PEI.js → chunk-6AK4EY3D.js} +12 -6
  36. package/dist/cli/chunk-6AK4EY3D.js.map +1 -0
  37. package/dist/cli/chunk-6G3CUUFG.js +34320 -0
  38. package/dist/cli/chunk-6G3CUUFG.js.map +1 -0
  39. package/dist/cli/{chunk-XST7BSZJ.js → chunk-6PBZN4VI.js} +21 -3
  40. package/dist/cli/chunk-6PBZN4VI.js.map +1 -0
  41. package/dist/cli/{chunk-A5LSGEEK.js → chunk-6PZ3CXBP.js} +88 -66
  42. package/dist/cli/chunk-6PZ3CXBP.js.map +1 -0
  43. package/dist/cli/chunk-74EX7SUH.js +25293 -0
  44. package/dist/cli/chunk-74EX7SUH.js.map +1 -0
  45. package/dist/cli/{chunk-FFNOMR32.js → chunk-7O5ALB4C.js} +3 -2
  46. package/dist/cli/{chunk-FFNOMR32.js.map → chunk-7O5ALB4C.js.map} +1 -1
  47. package/dist/cli/{chunk-UCMTWZKU.js → chunk-DOYHN4KB.js} +3 -2
  48. package/dist/cli/{chunk-UCMTWZKU.js.map → chunk-DOYHN4KB.js.map} +1 -1
  49. package/dist/cli/{chunk-XJLZ4HKU.js → chunk-F3PXYSNN.js} +3 -2
  50. package/dist/cli/{chunk-XJLZ4HKU.js.map → chunk-F3PXYSNN.js.map} +1 -1
  51. package/dist/cli/{chunk-XHQIK7B6.js → chunk-FHOGSSCH.js} +4 -3
  52. package/dist/cli/{chunk-XHQIK7B6.js.map → chunk-FHOGSSCH.js.map} +1 -1
  53. package/dist/cli/{chunk-IYF36OCJ.js → chunk-H6PS7IUE.js} +3 -2
  54. package/dist/cli/{chunk-IYF36OCJ.js.map → chunk-H6PS7IUE.js.map} +1 -1
  55. package/dist/cli/{chunk-ZTLZO42A.js → chunk-HFEAY5DT.js} +3 -2
  56. package/dist/cli/{chunk-ZTLZO42A.js.map → chunk-HFEAY5DT.js.map} +1 -1
  57. package/dist/cli/{chunk-FWGEHRB7.js → chunk-J5XJHLWM.js} +2 -1
  58. package/dist/cli/{chunk-FWGEHRB7.js.map → chunk-J5XJHLWM.js.map} +1 -1
  59. package/dist/cli/chunk-JMBMLOBP.js +26 -0
  60. package/dist/cli/chunk-JMBMLOBP.js.map +1 -0
  61. package/dist/cli/{chunk-SZH34P45.js → chunk-O52OLQL3.js} +52 -18
  62. package/dist/cli/chunk-O52OLQL3.js.map +1 -0
  63. package/dist/cli/{chunk-4DCHFFEY.js → chunk-OSZC7C6F.js} +3 -2
  64. package/dist/cli/{chunk-4DCHFFEY.js.map → chunk-OSZC7C6F.js.map} +1 -1
  65. package/dist/cli/chunk-P7EKE5ZQ.js +60641 -0
  66. package/dist/cli/chunk-P7EKE5ZQ.js.map +1 -0
  67. package/dist/cli/{chunk-FM57FNPJ.js → chunk-PLHAZOLZ.js} +2 -1
  68. package/dist/cli/{chunk-FM57FNPJ.js.map → chunk-PLHAZOLZ.js.map} +1 -1
  69. package/dist/cli/{chunk-RFX7TYVV.js → chunk-PQXPXJBJ.js} +16 -2
  70. package/dist/cli/chunk-PQXPXJBJ.js.map +1 -0
  71. package/dist/cli/{chunk-DAEAAVDF.js → chunk-PV55UMTO.js} +2 -1
  72. package/dist/cli/{chunk-DAEAAVDF.js.map → chunk-PV55UMTO.js.map} +1 -1
  73. package/dist/cli/{chunk-H7PHYVPM.js → chunk-RE4RAVFF.js} +85 -14
  74. package/dist/cli/chunk-RE4RAVFF.js.map +1 -0
  75. package/dist/cli/chunk-S4XVGLRW.js +499 -0
  76. package/dist/cli/chunk-S4XVGLRW.js.map +1 -0
  77. package/dist/cli/{chunk-WJ3YX4PZ.js → chunk-SZ5XES2N.js} +3 -2
  78. package/dist/cli/{chunk-WJ3YX4PZ.js.map → chunk-SZ5XES2N.js.map} +1 -1
  79. package/dist/cli/{chunk-4X3NY5ZM.js → chunk-TJX6BFZZ.js} +16 -9
  80. package/dist/cli/{chunk-4X3NY5ZM.js.map → chunk-TJX6BFZZ.js.map} +1 -1
  81. package/dist/cli/chunk-TUK7OWJA.js +51 -0
  82. package/dist/cli/{chunk-WKOMCPXP.js → chunk-VK5HG73G.js} +26 -17
  83. package/dist/cli/chunk-VK5HG73G.js.map +1 -0
  84. package/dist/cli/{chunk-CLAN6PVH.js → chunk-XCGGEJTI.js} +21 -8
  85. package/dist/cli/chunk-XCGGEJTI.js.map +1 -0
  86. package/dist/cli/{chunk-SOZE7V7V.js → chunk-XJXDHAES.js} +3 -2
  87. package/dist/cli/{chunk-SOZE7V7V.js.map → chunk-XJXDHAES.js.map} +1 -1
  88. package/dist/cli/chunk-XPDVG52A.js +2648 -0
  89. package/dist/cli/chunk-XPDVG52A.js.map +1 -0
  90. package/dist/cli/{chunk-CRPQUBP6.js → chunk-XXC2BYTV.js} +2 -1
  91. package/dist/cli/{chunk-CRPQUBP6.js.map → chunk-XXC2BYTV.js.map} +1 -1
  92. package/dist/cli/{chunk-AVB3WZWU.js → chunk-YFGF5NKA.js} +17 -14
  93. package/dist/cli/{chunk-AVB3WZWU.js.map → chunk-YFGF5NKA.js.map} +1 -1
  94. package/dist/cli/{chunk-ORM6PK57.js → chunk-YQ6NTIIE.js} +2 -1
  95. package/dist/cli/{chunk-ORM6PK57.js.map → chunk-YQ6NTIIE.js.map} +1 -1
  96. package/dist/cli/{chunk-ULBW7DYL.js → chunk-YYQAUTTN.js} +3 -2
  97. package/dist/cli/{chunk-ULBW7DYL.js.map → chunk-YYQAUTTN.js.map} +1 -1
  98. package/dist/cli/chunk-ZZM6QJ4W.js +109 -0
  99. package/dist/cli/chunk-ZZM6QJ4W.js.map +1 -0
  100. package/dist/cli/code-SMKEW6CD.js +154 -0
  101. package/dist/cli/code-SMKEW6CD.js.map +1 -0
  102. package/dist/cli/{commands-FQZOBLLZ.js → commands-FVVB5FZF.js} +7 -5
  103. package/dist/cli/{commands-FQZOBLLZ.js.map → commands-FVVB5FZF.js.map} +1 -1
  104. package/dist/cli/{commit-ZS24SHPG.js → commit-HE4VSPZ7.js} +7 -4
  105. package/dist/cli/{commit-ZS24SHPG.js.map → commit-HE4VSPZ7.js.map} +1 -1
  106. package/dist/cli/{desktop-6OLENOOO.js → desktop-Q7NDXCON.js} +379 -72
  107. package/dist/cli/desktop-Q7NDXCON.js.map +1 -0
  108. package/dist/cli/devtools-YECO25QO.js +3719 -0
  109. package/dist/cli/devtools-YECO25QO.js.map +1 -0
  110. package/dist/cli/diff-435UTPC5.js +165 -0
  111. package/dist/cli/{diff-2VUKNGEI.js.map → diff-435UTPC5.js.map} +1 -1
  112. package/dist/cli/doctor-OT7KH75K.js +27 -0
  113. package/dist/cli/{events-APSVNROZ.js → events-XEFAD5VX.js} +6 -4
  114. package/dist/cli/{events-APSVNROZ.js.map → events-XEFAD5VX.js.map} +1 -1
  115. package/dist/cli/index.js +3233 -123
  116. package/dist/cli/index.js.map +1 -1
  117. package/dist/cli/{mcp-DCKOE5RF.js → mcp-WUL2WO75.js} +6 -4
  118. package/dist/cli/{mcp-DCKOE5RF.js.map → mcp-WUL2WO75.js.map} +1 -1
  119. package/dist/cli/{mcp-browse-D6GBP5RQ.js → mcp-browse-RR7R4XET.js} +34 -19
  120. package/dist/cli/mcp-browse-RR7R4XET.js.map +1 -0
  121. package/dist/cli/{mcp-inspect-KFGFPJ3E.js → mcp-inspect-REGLYBWT.js} +9 -8
  122. package/dist/cli/{mcp-inspect-KFGFPJ3E.js.map → mcp-inspect-REGLYBWT.js.map} +1 -1
  123. package/dist/cli/package.json +3 -0
  124. package/dist/cli/prompt-UW6EFLVR.js +16 -0
  125. package/dist/cli/{prune-sessions-LV33R47N.js → prune-sessions-3RWUBYRS.js} +4 -2
  126. package/dist/cli/{prune-sessions-LV33R47N.js.map → prune-sessions-3RWUBYRS.js.map} +1 -1
  127. package/dist/cli/{replay-WFCYX7XF.js → replay-YOURXV4C.js} +42 -30
  128. package/dist/cli/{replay-WFCYX7XF.js.map → replay-YOURXV4C.js.map} +1 -1
  129. package/dist/cli/{run-IUJYEPMT.js → run-Q6BUXV66.js} +28 -27
  130. package/dist/cli/{run-IUJYEPMT.js.map → run-Q6BUXV66.js.map} +1 -1
  131. package/dist/cli/{server-CN4QPPVJ.js → server-XGDBRWMB.js} +44 -43
  132. package/dist/cli/server-XGDBRWMB.js.map +1 -0
  133. package/dist/cli/{sessions-F5GPGTJN.js → sessions-FH7QVYSY.js} +22 -19
  134. package/dist/cli/{sessions-F5GPGTJN.js.map → sessions-FH7QVYSY.js.map} +1 -1
  135. package/dist/cli/setup-VDS6SVEP.js +618 -0
  136. package/dist/cli/setup-VDS6SVEP.js.map +1 -0
  137. package/dist/cli/stats-MQVI2XQH.js +14 -0
  138. package/dist/cli/update-6ITLPRDV.js +15 -0
  139. package/dist/cli/update-6ITLPRDV.js.map +1 -0
  140. package/dist/cli/version-DAHGZY5N.js +33 -0
  141. package/dist/cli/{version-KQUPV6T5.js.map → version-DAHGZY5N.js.map} +1 -1
  142. package/dist/index.d.ts +157 -103
  143. package/dist/index.js +597 -178
  144. package/dist/index.js.map +1 -1
  145. package/package.json +2 -1
  146. package/dist/cli/chat-G7CUW4ZI.js +0 -45
  147. package/dist/cli/chunk-26UDIXLD.js +0 -16481
  148. package/dist/cli/chunk-26UDIXLD.js.map +0 -1
  149. package/dist/cli/chunk-4YV2GBYG.js +0 -5237
  150. package/dist/cli/chunk-4YV2GBYG.js.map +0 -1
  151. package/dist/cli/chunk-5X7LZJDE.js +0 -36
  152. package/dist/cli/chunk-5X7LZJDE.js.map +0 -1
  153. package/dist/cli/chunk-7DLHHBGN.js.map +0 -1
  154. package/dist/cli/chunk-A5LSGEEK.js.map +0 -1
  155. package/dist/cli/chunk-AFFZF3MW.js +0 -36
  156. package/dist/cli/chunk-AFFZF3MW.js.map +0 -1
  157. package/dist/cli/chunk-CLAN6PVH.js.map +0 -1
  158. package/dist/cli/chunk-CPOV2O73.js +0 -39
  159. package/dist/cli/chunk-CPOV2O73.js.map +0 -1
  160. package/dist/cli/chunk-CPTZ5OHX.js +0 -18
  161. package/dist/cli/chunk-CPTZ5OHX.js.map +0 -1
  162. package/dist/cli/chunk-CZSJILQP.js +0 -854
  163. package/dist/cli/chunk-CZSJILQP.js.map +0 -1
  164. package/dist/cli/chunk-H7PHYVPM.js.map +0 -1
  165. package/dist/cli/chunk-HCC42PEI.js.map +0 -1
  166. package/dist/cli/chunk-JWCTX5S4.js +0 -46
  167. package/dist/cli/chunk-KMWKGPFZ.js.map +0 -1
  168. package/dist/cli/chunk-MRLXEMZ7.js +0 -26
  169. package/dist/cli/chunk-MRLXEMZ7.js.map +0 -1
  170. package/dist/cli/chunk-R4YTW7PR.js.map +0 -1
  171. package/dist/cli/chunk-RFX7TYVV.js.map +0 -1
  172. package/dist/cli/chunk-SZH34P45.js.map +0 -1
  173. package/dist/cli/chunk-UVRXTSK3.js.map +0 -1
  174. package/dist/cli/chunk-VLNRQMCI.js.map +0 -1
  175. package/dist/cli/chunk-WKOMCPXP.js.map +0 -1
  176. package/dist/cli/chunk-XST7BSZJ.js.map +0 -1
  177. package/dist/cli/code-YQGVLIT2.js +0 -147
  178. package/dist/cli/code-YQGVLIT2.js.map +0 -1
  179. package/dist/cli/desktop-6OLENOOO.js.map +0 -1
  180. package/dist/cli/diff-2VUKNGEI.js +0 -153
  181. package/dist/cli/doctor-JO2WNN6C.js +0 -24
  182. package/dist/cli/mcp-browse-D6GBP5RQ.js.map +0 -1
  183. package/dist/cli/prompt-PKCCLLAD.js +0 -13
  184. package/dist/cli/server-CN4QPPVJ.js.map +0 -1
  185. package/dist/cli/setup-WWMDBPSB.js +0 -516
  186. package/dist/cli/setup-WWMDBPSB.js.map +0 -1
  187. package/dist/cli/stats-5RJCATCE.js +0 -12
  188. package/dist/cli/update-GUCWB4UN.js +0 -13
  189. package/dist/cli/version-KQUPV6T5.js +0 -30
  190. /package/dist/cli/{chat-G7CUW4ZI.js.map → chat-7ES4IBNH.js.map} +0 -0
  191. /package/dist/cli/{doctor-JO2WNN6C.js.map → chunk-TUK7OWJA.js.map} +0 -0
  192. /package/dist/cli/{prompt-PKCCLLAD.js.map → doctor-OT7KH75K.js.map} +0 -0
  193. /package/dist/cli/{stats-5RJCATCE.js.map → prompt-UW6EFLVR.js.map} +0 -0
  194. /package/dist/cli/{update-GUCWB4UN.js.map → stats-MQVI2XQH.js.map} +0 -0
@@ -1,854 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // src/config.ts
4
- import { chmodSync, mkdirSync, readFileSync, writeFileSync } from "fs";
5
- import { homedir } from "os";
6
- import { dirname, join } from "path";
7
-
8
- // src/cli/ui/theme/tokens.ts
9
- function card(fg, tone) {
10
- return {
11
- user: { color: fg.meta, glyph: "\u25C7" },
12
- reasoning: { color: tone.accent, glyph: "\u25C6" },
13
- streaming: { color: tone.brand, glyph: "\u25C8" },
14
- task: { color: tone.warn, glyph: "\u25B6" },
15
- tool: { color: tone.info, glyph: "\u25A3" },
16
- plan: { color: tone.accent, glyph: "\u229E" },
17
- diff: { color: tone.ok, glyph: "\xB1" },
18
- error: { color: tone.err, glyph: "\u2716" },
19
- warn: { color: tone.warn, glyph: "\u26A0" },
20
- usage: { color: fg.meta, glyph: "\u03A3" },
21
- subagent: { color: tone.violet, glyph: "\u232C" },
22
- approval: { color: tone.warn, glyph: "?" },
23
- search: { color: tone.info, glyph: "\u2299" },
24
- memory: { color: fg.meta, glyph: "\u2311" },
25
- ctx: { color: tone.brand, glyph: "\u25D4" },
26
- doctor: { color: fg.meta, glyph: "\u2695" },
27
- branch: { color: tone.violet, glyph: "\u2387" }
28
- };
29
- }
30
- function defineTheme(base) {
31
- return { ...base, card: card(base.fg, base.tone) };
32
- }
33
- var githubDark = defineTheme({
34
- fg: {
35
- strong: "#e6edf3",
36
- body: "#c9d1d9",
37
- sub: "#8b949e",
38
- meta: "#6e7681",
39
- faint: "#484f58"
40
- },
41
- tone: {
42
- brand: "#79c0ff",
43
- accent: "#d2a8ff",
44
- violet: "#b395f5",
45
- ok: "#7ee787",
46
- warn: "#f0b07d",
47
- err: "#ff8b81",
48
- info: "#79c0ff"
49
- },
50
- toneActive: {
51
- brand: "#a5d6ff",
52
- accent: "#e2c5ff",
53
- violet: "#c8aaff",
54
- ok: "#a8f5ad",
55
- warn: "#ffc99e",
56
- err: "#ffaba3",
57
- info: "#a5d6ff"
58
- },
59
- surface: {
60
- bg: "#0a0c10",
61
- bgInput: "#0d1015",
62
- bgCode: "#06080c",
63
- bgElev: "#11141a"
64
- }
65
- });
66
- var dark = defineTheme({
67
- fg: {
68
- strong: "#f4f7fb",
69
- body: "#d8dee9",
70
- sub: "#a7b1c2",
71
- meta: "#778294",
72
- faint: "#4d5666"
73
- },
74
- tone: {
75
- brand: "#7dd3fc",
76
- accent: "#c084fc",
77
- violet: "#a78bfa",
78
- ok: "#86efac",
79
- warn: "#fbbf24",
80
- err: "#f87171",
81
- info: "#60a5fa"
82
- },
83
- toneActive: {
84
- brand: "#bae6fd",
85
- accent: "#e9d5ff",
86
- violet: "#ddd6fe",
87
- ok: "#bbf7d0",
88
- warn: "#fde68a",
89
- err: "#fecaca",
90
- info: "#bfdbfe"
91
- },
92
- surface: {
93
- bg: "#0b1020",
94
- bgInput: "#111827",
95
- bgCode: "#080c16",
96
- bgElev: "#151d2f"
97
- }
98
- });
99
- var light = defineTheme({
100
- fg: {
101
- strong: "#111827",
102
- body: "#1f2937",
103
- sub: "#4b5563",
104
- meta: "#6b7280",
105
- faint: "#9ca3af"
106
- },
107
- tone: {
108
- brand: "#2563eb",
109
- accent: "#7c3aed",
110
- violet: "#6d28d9",
111
- ok: "#15803d",
112
- warn: "#b45309",
113
- err: "#dc2626",
114
- info: "#0369a1"
115
- },
116
- toneActive: {
117
- brand: "#1d4ed8",
118
- accent: "#6d28d9",
119
- violet: "#5b21b6",
120
- ok: "#166534",
121
- warn: "#92400e",
122
- err: "#b91c1c",
123
- info: "#075985"
124
- },
125
- surface: {
126
- bg: "#ffffff",
127
- bgInput: "#f8fafc",
128
- bgCode: "#f3f4f6",
129
- bgElev: "#eef2f7"
130
- }
131
- });
132
- var tokyoNight = defineTheme({
133
- fg: {
134
- strong: "#c0caf5",
135
- body: "#a9b1d6",
136
- sub: "#9aa5ce",
137
- meta: "#565f89",
138
- faint: "#414868"
139
- },
140
- tone: {
141
- brand: "#7aa2f7",
142
- accent: "#bb9af7",
143
- violet: "#9d7cd8",
144
- ok: "#9ece6a",
145
- warn: "#e0af68",
146
- err: "#f7768e",
147
- info: "#2ac3de"
148
- },
149
- toneActive: {
150
- brand: "#a9c7ff",
151
- accent: "#d7b9ff",
152
- violet: "#c6a0f6",
153
- ok: "#b9f27c",
154
- warn: "#ffd089",
155
- err: "#ff9cac",
156
- info: "#7dcfff"
157
- },
158
- surface: {
159
- bg: "#1a1b26",
160
- bgInput: "#1f2335",
161
- bgCode: "#16161e",
162
- bgElev: "#24283b"
163
- }
164
- });
165
- var githubLight = defineTheme({
166
- fg: {
167
- strong: "#1f2328",
168
- body: "#24292f",
169
- sub: "#57606a",
170
- meta: "#6e7781",
171
- faint: "#8c959f"
172
- },
173
- tone: {
174
- brand: "#0969da",
175
- accent: "#8250df",
176
- violet: "#6639ba",
177
- ok: "#1a7f37",
178
- warn: "#9a6700",
179
- err: "#cf222e",
180
- info: "#0969da"
181
- },
182
- toneActive: {
183
- brand: "#0550ae",
184
- accent: "#6639ba",
185
- violet: "#512a97",
186
- ok: "#116329",
187
- warn: "#7d4e00",
188
- err: "#a40e26",
189
- info: "#0550ae"
190
- },
191
- surface: {
192
- bg: "#ffffff",
193
- bgInput: "#f6f8fa",
194
- bgCode: "#f6f8fa",
195
- bgElev: "#eaeef2"
196
- }
197
- });
198
- var highContrast = defineTheme({
199
- fg: {
200
- strong: "#ffffff",
201
- body: "#f5f5f5",
202
- sub: "#d4d4d4",
203
- meta: "#bdbdbd",
204
- faint: "#8a8a8a"
205
- },
206
- tone: {
207
- brand: "#00e5ff",
208
- accent: "#ff4dff",
209
- violet: "#b388ff",
210
- ok: "#00ff66",
211
- warn: "#ffdd00",
212
- err: "#ff4d4d",
213
- info: "#4da3ff"
214
- },
215
- toneActive: {
216
- brand: "#80f2ff",
217
- accent: "#ff99ff",
218
- violet: "#d0b3ff",
219
- ok: "#80ffb3",
220
- warn: "#ffee80",
221
- err: "#ff9999",
222
- info: "#99c9ff"
223
- },
224
- surface: {
225
- bg: "#000000",
226
- bgInput: "#0a0a0a",
227
- bgCode: "#050505",
228
- bgElev: "#141414"
229
- }
230
- });
231
- var THEMES = {
232
- default: githubDark,
233
- dark,
234
- light,
235
- "tokyo-night": tokyoNight,
236
- "github-dark": githubDark,
237
- "github-light": githubLight,
238
- "high-contrast": highContrast
239
- };
240
- var DEFAULT_THEME_NAME = "default";
241
- function isThemeName(value) {
242
- return Object.prototype.hasOwnProperty.call(THEMES, value);
243
- }
244
- function resolveThemeName(value) {
245
- if (!value || value === "auto") return DEFAULT_THEME_NAME;
246
- return isThemeName(value) ? value : DEFAULT_THEME_NAME;
247
- }
248
- function listThemeNames() {
249
- return Object.keys(THEMES);
250
- }
251
- var DEFAULT_THEME = THEMES[DEFAULT_THEME_NAME];
252
- var activeTheme = DEFAULT_THEME;
253
- var activeThemeVersion = 0;
254
- function setActiveTheme(theme) {
255
- const previousTheme = activeTheme;
256
- activeTheme = theme;
257
- activeThemeVersion += 1;
258
- const version = activeThemeVersion;
259
- return () => {
260
- if (activeThemeVersion !== version || activeTheme !== theme) return;
261
- activeTheme = previousTheme;
262
- activeThemeVersion += 1;
263
- };
264
- }
265
- function proxyTokens(select) {
266
- const target = select(DEFAULT_THEME);
267
- return new Proxy(target, {
268
- get(_target, prop) {
269
- return select(activeTheme)[prop];
270
- },
271
- getOwnPropertyDescriptor(_target, prop) {
272
- return Reflect.getOwnPropertyDescriptor(select(activeTheme), prop);
273
- },
274
- has(_target, prop) {
275
- return prop in select(activeTheme);
276
- },
277
- ownKeys() {
278
- return Reflect.ownKeys(select(activeTheme));
279
- }
280
- });
281
- }
282
- var FG = proxyTokens((theme) => theme.fg);
283
- var TONE = proxyTokens((theme) => theme.tone);
284
- var TONE_ACTIVE = proxyTokens((theme) => theme.toneActive);
285
- var SURFACE = proxyTokens((theme) => theme.surface);
286
- var CARD = proxyTokens((theme) => theme.card);
287
- var USD_TO_CNY = 7.2;
288
- var SYMBOL = { USD: "$", CNY: "\xA5" };
289
- function formatBalance(amount, currency, opts) {
290
- const cur = currency ?? "CNY";
291
- const sym = SYMBOL[cur];
292
- const digits = opts?.fractionDigits ?? 2;
293
- const body = sym ? `${sym}${amount.toFixed(digits)}` : `${cur} ${amount.toFixed(digits)}`;
294
- return opts?.label ? `w ${body}` : body;
295
- }
296
- function formatCost(costUsd, currency, fractionDigits = 4) {
297
- const cur = currency ?? "CNY";
298
- const amount = cur === "CNY" ? costUsd * USD_TO_CNY : costUsd;
299
- return formatBalance(amount, cur, { fractionDigits });
300
- }
301
- function balanceColor(amount, currency) {
302
- const cny = (currency ?? "CNY") === "USD" ? amount * USD_TO_CNY : amount;
303
- if (cny < 5) return TONE.err;
304
- if (cny < 20) return TONE.warn;
305
- return TONE.brand;
306
- }
307
-
308
- // src/index/config.ts
309
- import picomatch from "picomatch";
310
- var DEFAULT_INDEX_EXCLUDES = {
311
- dirs: [
312
- "node_modules",
313
- ".git",
314
- ".hg",
315
- ".svn",
316
- "dist",
317
- "build",
318
- "out",
319
- ".next",
320
- ".nuxt",
321
- "target",
322
- ".venv",
323
- "venv",
324
- "__pycache__",
325
- ".pytest_cache",
326
- ".mypy_cache",
327
- ".cache",
328
- "coverage",
329
- ".turbo",
330
- ".vercel",
331
- ".reasonix"
332
- ],
333
- files: [
334
- "package-lock.json",
335
- "yarn.lock",
336
- "pnpm-lock.yaml",
337
- "Cargo.lock",
338
- "poetry.lock",
339
- "Pipfile.lock",
340
- "go.sum",
341
- ".DS_Store"
342
- ],
343
- exts: [
344
- ".png",
345
- ".jpg",
346
- ".jpeg",
347
- ".gif",
348
- ".webp",
349
- ".bmp",
350
- ".ico",
351
- ".tiff",
352
- ".woff",
353
- ".woff2",
354
- ".ttf",
355
- ".otf",
356
- ".eot",
357
- ".zip",
358
- ".tar",
359
- ".gz",
360
- ".bz2",
361
- ".xz",
362
- ".rar",
363
- ".7z",
364
- ".exe",
365
- ".dll",
366
- ".so",
367
- ".dylib",
368
- ".bin",
369
- ".class",
370
- ".jar",
371
- ".war",
372
- ".wasm",
373
- ".o",
374
- ".obj",
375
- ".lib",
376
- ".a",
377
- ".pyc",
378
- ".pyo",
379
- ".mp3",
380
- ".mp4",
381
- ".wav",
382
- ".ogg",
383
- ".webm",
384
- ".mov",
385
- ".avi",
386
- ".pdf",
387
- ".sqlite",
388
- ".db"
389
- ]
390
- };
391
- var DEFAULT_MAX_FILE_BYTES = 256 * 1024;
392
- var DEFAULT_RESPECT_GITIGNORE = true;
393
- function defaultIndexConfig() {
394
- return {
395
- excludeDirs: [...DEFAULT_INDEX_EXCLUDES.dirs],
396
- excludeFiles: [...DEFAULT_INDEX_EXCLUDES.files],
397
- excludeExts: [...DEFAULT_INDEX_EXCLUDES.exts],
398
- excludePatterns: [],
399
- respectGitignore: DEFAULT_RESPECT_GITIGNORE,
400
- maxFileBytes: DEFAULT_MAX_FILE_BYTES
401
- };
402
- }
403
- function resolveIndexConfig(user) {
404
- const d = defaultIndexConfig();
405
- if (!user) return d;
406
- return {
407
- excludeDirs: Array.isArray(user.excludeDirs) ? [...user.excludeDirs] : d.excludeDirs,
408
- excludeFiles: Array.isArray(user.excludeFiles) ? [...user.excludeFiles] : d.excludeFiles,
409
- excludeExts: Array.isArray(user.excludeExts) ? user.excludeExts.map((e) => e.toLowerCase()) : d.excludeExts,
410
- excludePatterns: Array.isArray(user.excludePatterns) ? [...user.excludePatterns] : [],
411
- respectGitignore: typeof user.respectGitignore === "boolean" ? user.respectGitignore : d.respectGitignore,
412
- maxFileBytes: typeof user.maxFileBytes === "number" && user.maxFileBytes > 0 ? user.maxFileBytes : d.maxFileBytes
413
- };
414
- }
415
- function compileFilters(cfg) {
416
- const matcher = cfg.excludePatterns.length === 0 ? () => false : picomatch(cfg.excludePatterns, { dot: true });
417
- return {
418
- dirSet: new Set(cfg.excludeDirs),
419
- fileSet: new Set(cfg.excludeFiles),
420
- extSet: new Set(cfg.excludeExts.map((e) => e.toLowerCase())),
421
- patternMatch: matcher,
422
- respectGitignore: cfg.respectGitignore,
423
- maxFileBytes: cfg.maxFileBytes
424
- };
425
- }
426
-
427
- // src/config.ts
428
- var DEFAULT_OLLAMA_URL = "http://localhost:11434";
429
- var DEFAULT_EMBED_MODEL = "nomic-embed-text";
430
- var DEFAULT_TIMEOUT_MS = 3e4;
431
- function defaultConfigPath() {
432
- return join(homedir(), ".reasonix", "config.json");
433
- }
434
- function readConfig(path = defaultConfigPath()) {
435
- try {
436
- const raw = readFileSync(path, "utf8");
437
- const parsed = JSON.parse(raw);
438
- if (parsed && typeof parsed === "object") return parsed;
439
- } catch {
440
- }
441
- return {};
442
- }
443
- function writeConfig(cfg, path = defaultConfigPath()) {
444
- mkdirSync(dirname(path), { recursive: true });
445
- writeFileSync(path, JSON.stringify(cfg, null, 2), "utf8");
446
- try {
447
- chmodSync(path, 384);
448
- } catch {
449
- }
450
- }
451
- function loadLanguage(path = defaultConfigPath()) {
452
- return readConfig(path).lang;
453
- }
454
- function mcpEnvFor(serverName, cfg) {
455
- if (!serverName) return void 0;
456
- const entry = cfg.mcpEnv?.[serverName];
457
- if (!entry) return void 0;
458
- const filtered = {};
459
- for (const [k, v] of Object.entries(entry)) {
460
- if (typeof v === "string" && v.length > 0) filtered[k] = v;
461
- }
462
- return Object.keys(filtered).length > 0 ? filtered : void 0;
463
- }
464
- function saveLanguage(lang, path = defaultConfigPath()) {
465
- const cfg = readConfig(path);
466
- cfg.lang = lang;
467
- writeConfig(cfg, path);
468
- }
469
- function loadApiKey(path = defaultConfigPath()) {
470
- if (process.env.DEEPSEEK_API_KEY) return process.env.DEEPSEEK_API_KEY;
471
- return readConfig(path).apiKey;
472
- }
473
- function loadBaseUrl(path = defaultConfigPath()) {
474
- if (process.env.DEEPSEEK_BASE_URL) return process.env.DEEPSEEK_BASE_URL;
475
- return readConfig(path).baseUrl;
476
- }
477
- function saveBaseUrl(url, path = defaultConfigPath()) {
478
- const cfg = readConfig(path);
479
- const trimmed = url.trim();
480
- if (trimmed) {
481
- cfg.baseUrl = trimmed;
482
- } else {
483
- cfg.baseUrl = void 0;
484
- }
485
- writeConfig(cfg, path);
486
- }
487
- function searchEnabled(path = defaultConfigPath()) {
488
- const env = process.env.REASONIX_SEARCH;
489
- if (env === "off" || env === "false" || env === "0") return false;
490
- const cfg = readConfig(path).search;
491
- if (cfg === false) return false;
492
- return true;
493
- }
494
- function webSearchEngine(path = defaultConfigPath()) {
495
- const cfg = readConfig(path).webSearchEngine;
496
- if (cfg === "searxng") return "searxng";
497
- return "mojeek";
498
- }
499
- function webSearchEndpoint(path = defaultConfigPath()) {
500
- const cfg = readConfig(path).webSearchEndpoint;
501
- if (cfg && typeof cfg === "string") return cfg;
502
- return "http://localhost:8080";
503
- }
504
- function saveApiKey(key, path = defaultConfigPath()) {
505
- const cfg = readConfig(path);
506
- cfg.apiKey = key.trim();
507
- writeConfig(cfg, path);
508
- }
509
- function findProjectKey(cfg, rootDir) {
510
- const projects = cfg.projects;
511
- if (!projects) return void 0;
512
- if (Object.hasOwn(projects, rootDir)) return rootDir;
513
- if (process.platform !== "win32") return void 0;
514
- const lower = rootDir.toLowerCase();
515
- for (const k of Object.keys(projects)) {
516
- if (k.toLowerCase() === lower) return k;
517
- }
518
- return void 0;
519
- }
520
- function loadProjectShellAllowed(rootDir, path = defaultConfigPath()) {
521
- const cfg = readConfig(path);
522
- const key = findProjectKey(cfg, rootDir);
523
- if (key === void 0) return [];
524
- return cfg.projects?.[key]?.shellAllowed ?? [];
525
- }
526
- function addProjectShellAllowed(rootDir, prefix, path = defaultConfigPath()) {
527
- const trimmed = prefix.trim();
528
- if (!trimmed) return;
529
- const cfg = readConfig(path);
530
- if (!cfg.projects) cfg.projects = {};
531
- const key = findProjectKey(cfg, rootDir) ?? rootDir;
532
- if (!cfg.projects[key]) cfg.projects[key] = {};
533
- const existing = cfg.projects[key].shellAllowed ?? [];
534
- if (existing.includes(trimmed)) return;
535
- cfg.projects[key].shellAllowed = [...existing, trimmed];
536
- writeConfig(cfg, path);
537
- }
538
- function removeProjectShellAllowed(rootDir, prefix, path = defaultConfigPath()) {
539
- const trimmed = prefix.trim();
540
- if (!trimmed) return false;
541
- const cfg = readConfig(path);
542
- const key = findProjectKey(cfg, rootDir);
543
- if (key === void 0) return false;
544
- const existing = cfg.projects?.[key]?.shellAllowed ?? [];
545
- if (!existing.includes(trimmed)) return false;
546
- const next = existing.filter((p) => p !== trimmed);
547
- if (!cfg.projects) cfg.projects = {};
548
- if (!cfg.projects[key]) cfg.projects[key] = {};
549
- cfg.projects[key].shellAllowed = next;
550
- writeConfig(cfg, path);
551
- return true;
552
- }
553
- function clearProjectShellAllowed(rootDir, path = defaultConfigPath()) {
554
- const cfg = readConfig(path);
555
- const key = findProjectKey(cfg, rootDir);
556
- if (key === void 0) return 0;
557
- const existing = cfg.projects?.[key]?.shellAllowed ?? [];
558
- if (existing.length === 0) return 0;
559
- if (!cfg.projects) cfg.projects = {};
560
- if (!cfg.projects[key]) cfg.projects[key] = {};
561
- cfg.projects[key].shellAllowed = [];
562
- writeConfig(cfg, path);
563
- return existing.length;
564
- }
565
- function loadProjectPathAllowed(rootDir, path = defaultConfigPath()) {
566
- const cfg = readConfig(path);
567
- const key = findProjectKey(cfg, rootDir);
568
- if (key === void 0) return [];
569
- return cfg.projects?.[key]?.pathAllowed ?? [];
570
- }
571
- function addProjectPathAllowed(rootDir, prefix, path = defaultConfigPath()) {
572
- const trimmed = prefix.trim();
573
- if (!trimmed) return;
574
- const cfg = readConfig(path);
575
- if (!cfg.projects) cfg.projects = {};
576
- const key = findProjectKey(cfg, rootDir) ?? rootDir;
577
- if (!cfg.projects[key]) cfg.projects[key] = {};
578
- const existing = cfg.projects[key].pathAllowed ?? [];
579
- if (existing.includes(trimmed)) return;
580
- cfg.projects[key].pathAllowed = [...existing, trimmed];
581
- writeConfig(cfg, path);
582
- }
583
- function loadEditMode(path = defaultConfigPath()) {
584
- const v = readConfig(path).editMode;
585
- if (v === "auto" || v === "yolo") return v;
586
- return "review";
587
- }
588
- function saveEditMode(mode, path = defaultConfigPath()) {
589
- const cfg = readConfig(path);
590
- cfg.editMode = mode;
591
- writeConfig(cfg, path);
592
- }
593
- function editModeHintShown(path = defaultConfigPath()) {
594
- return readConfig(path).editModeHintShown === true;
595
- }
596
- function mouseClipboardHintShown(path = defaultConfigPath()) {
597
- return readConfig(path).mouseClipboardHintShown === true;
598
- }
599
- function loadReasoningEffort(path = defaultConfigPath()) {
600
- const v = readConfig(path).reasoningEffort;
601
- return v === "high" ? "high" : "max";
602
- }
603
- function loadTheme(path = defaultConfigPath()) {
604
- const value = readConfig(path).theme;
605
- if (value === "auto") return "auto";
606
- if (typeof value === "string" && isThemeName(value)) return value;
607
- return void 0;
608
- }
609
- function resolveThemePreference(configTheme, envTheme) {
610
- if (configTheme && configTheme !== "auto") return configTheme;
611
- return resolveThemeName(envTheme);
612
- }
613
- function saveTheme(theme, path = defaultConfigPath()) {
614
- const cfg = readConfig(path);
615
- cfg.theme = theme;
616
- writeConfig(cfg, path);
617
- }
618
- function saveReasoningEffort(effort, path = defaultConfigPath()) {
619
- const cfg = readConfig(path);
620
- cfg.reasoningEffort = effort;
621
- writeConfig(cfg, path);
622
- }
623
- function loadWorkspaceDir(path = defaultConfigPath()) {
624
- const v = readConfig(path).workspaceDir;
625
- return typeof v === "string" && v.trim() ? v : void 0;
626
- }
627
- function saveWorkspaceDir(dir, path = defaultConfigPath()) {
628
- const cfg = readConfig(path);
629
- const trimmed = dir.trim();
630
- if (trimmed) cfg.workspaceDir = trimmed;
631
- else cfg.workspaceDir = void 0;
632
- writeConfig(cfg, path);
633
- }
634
- function loadEditor(path = defaultConfigPath()) {
635
- const v = readConfig(path).editor;
636
- return typeof v === "string" && v.trim() ? v : void 0;
637
- }
638
- function saveEditor(editor, path = defaultConfigPath()) {
639
- const cfg = readConfig(path);
640
- const trimmed = editor.trim();
641
- if (trimmed) cfg.editor = trimmed;
642
- else cfg.editor = void 0;
643
- writeConfig(cfg, path);
644
- }
645
- function loadRecentWorkspaces(path = defaultConfigPath()) {
646
- const v = readConfig(path).recentWorkspaces;
647
- return Array.isArray(v) ? v.filter((s) => typeof s === "string") : [];
648
- }
649
- var MAX_RECENT_WORKSPACES = 8;
650
- function pushRecentWorkspace(dir, path = defaultConfigPath()) {
651
- const trimmed = dir.trim();
652
- if (!trimmed) return;
653
- const cfg = readConfig(path);
654
- const list = (cfg.recentWorkspaces ?? []).filter((s) => s !== trimmed);
655
- list.unshift(trimmed);
656
- cfg.recentWorkspaces = list.slice(0, MAX_RECENT_WORKSPACES);
657
- writeConfig(cfg, path);
658
- }
659
- function loadPreset(path = defaultConfigPath()) {
660
- return readConfig(path).preset;
661
- }
662
- function savePreset(preset, path = defaultConfigPath()) {
663
- const cfg = readConfig(path);
664
- cfg.preset = preset;
665
- writeConfig(cfg, path);
666
- }
667
- function loadIndexUserConfig(path = defaultConfigPath()) {
668
- return readConfig(path).index ?? {};
669
- }
670
- function loadIndexConfig(path = defaultConfigPath()) {
671
- return resolveIndexConfig(readConfig(path).index);
672
- }
673
- function loadSemanticEmbeddingUserConfig(path = defaultConfigPath()) {
674
- return normalizeSemanticEmbeddingUserConfig(readConfig(path).semantic);
675
- }
676
- function saveSemanticEmbeddingConfig(user, path = defaultConfigPath()) {
677
- const cfg = readConfig(path);
678
- cfg.semantic = normalizeSemanticEmbeddingUserConfig(user);
679
- writeConfig(cfg, path);
680
- }
681
- function resolveSemanticEmbeddingConfig(path = defaultConfigPath()) {
682
- const user = loadSemanticEmbeddingUserConfig(path);
683
- const provider = user.provider ?? "ollama";
684
- if (provider === "openai-compat") {
685
- const baseUrl = user.openaiCompat?.baseUrl?.trim() ?? "";
686
- const apiKey = user.openaiCompat?.apiKey?.trim() ?? "";
687
- const model = user.openaiCompat?.model?.trim() ?? "";
688
- if (!baseUrl) throw new Error("OpenAI-compatible embeddings require an API URL.");
689
- requireValidUrl(baseUrl, "OpenAI-compatible API URL");
690
- if (!apiKey) throw new Error("OpenAI-compatible embeddings require an API key.");
691
- if (!model) throw new Error("OpenAI-compatible embeddings require a model.");
692
- return {
693
- provider,
694
- baseUrl,
695
- apiKey,
696
- model,
697
- extraBody: normalizeExtraBody(user.openaiCompat?.extraBody),
698
- timeoutMs: DEFAULT_TIMEOUT_MS
699
- };
700
- }
701
- return {
702
- provider: "ollama",
703
- baseUrl: user.ollama?.baseUrl?.trim() || process.env.OLLAMA_URL || DEFAULT_OLLAMA_URL,
704
- model: user.ollama?.model?.trim() || process.env.REASONIX_EMBED_MODEL || DEFAULT_EMBED_MODEL,
705
- timeoutMs: DEFAULT_TIMEOUT_MS
706
- };
707
- }
708
- function redactSemanticEmbeddingConfig(user) {
709
- const normalized = normalizeSemanticEmbeddingUserConfig(user);
710
- return {
711
- provider: normalized.provider ?? "ollama",
712
- ollama: {
713
- baseUrl: normalized.ollama?.baseUrl?.trim() || process.env.OLLAMA_URL || DEFAULT_OLLAMA_URL,
714
- model: normalized.ollama?.model?.trim() || process.env.REASONIX_EMBED_MODEL || DEFAULT_EMBED_MODEL
715
- },
716
- openaiCompat: {
717
- baseUrl: normalized.openaiCompat?.baseUrl?.trim() ?? "",
718
- apiKey: normalized.openaiCompat?.apiKey ? redactKey(normalized.openaiCompat.apiKey) : "",
719
- apiKeySet: Boolean(normalized.openaiCompat?.apiKey?.trim()),
720
- model: normalized.openaiCompat?.model?.trim() ?? "",
721
- extraBody: normalizeExtraBody(normalized.openaiCompat?.extraBody)
722
- }
723
- };
724
- }
725
- function markEditModeHintShown(path = defaultConfigPath()) {
726
- const cfg = readConfig(path);
727
- if (cfg.editModeHintShown === true) return;
728
- cfg.editModeHintShown = true;
729
- writeConfig(cfg, path);
730
- }
731
- function markMouseClipboardHintShown(path = defaultConfigPath()) {
732
- const cfg = readConfig(path);
733
- if (cfg.mouseClipboardHintShown === true) return;
734
- cfg.mouseClipboardHintShown = true;
735
- writeConfig(cfg, path);
736
- }
737
- function isPlausibleKey(key) {
738
- const trimmed = key.trim();
739
- if (trimmed.length < 16) return false;
740
- return !/\s/.test(trimmed);
741
- }
742
- function redactKey(key) {
743
- if (!key) return "";
744
- if (key.length <= 12) return "****";
745
- return `${key.slice(0, 6)}\u2026${key.slice(-4)}`;
746
- }
747
- function normalizeSemanticEmbeddingUserConfig(cfg) {
748
- return {
749
- provider: cfg?.provider === "openai-compat" ? "openai-compat" : "ollama",
750
- ollama: {
751
- baseUrl: normalizeOptionalString(cfg?.ollama?.baseUrl),
752
- model: normalizeOptionalString(cfg?.ollama?.model)
753
- },
754
- openaiCompat: {
755
- baseUrl: normalizeOptionalString(cfg?.openaiCompat?.baseUrl),
756
- apiKey: normalizeOptionalString(cfg?.openaiCompat?.apiKey),
757
- model: normalizeOptionalString(cfg?.openaiCompat?.model),
758
- extraBody: normalizeExtraBody(cfg?.openaiCompat?.extraBody)
759
- }
760
- };
761
- }
762
- function normalizeOptionalString(value) {
763
- const trimmed = value?.trim();
764
- return trimmed ? trimmed : void 0;
765
- }
766
- function normalizeExtraBody(value) {
767
- if (value === void 0) return {};
768
- if (!isPlainObject(value)) {
769
- throw new Error("Semantic embedding extraBody must be a JSON object.");
770
- }
771
- return { ...value };
772
- }
773
- function requireValidUrl(value, label) {
774
- try {
775
- new URL(value);
776
- } catch {
777
- throw new Error(`${label} must be a valid URL.`);
778
- }
779
- }
780
- function isPlainObject(value) {
781
- if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
782
- const proto = Object.getPrototypeOf(value);
783
- return proto === Object.prototype || proto === null;
784
- }
785
-
786
- export {
787
- THEMES,
788
- DEFAULT_THEME_NAME,
789
- isThemeName,
790
- resolveThemeName,
791
- listThemeNames,
792
- setActiveTheme,
793
- FG,
794
- TONE,
795
- TONE_ACTIVE,
796
- SURFACE,
797
- CARD,
798
- formatBalance,
799
- formatCost,
800
- balanceColor,
801
- DEFAULT_INDEX_EXCLUDES,
802
- DEFAULT_MAX_FILE_BYTES,
803
- DEFAULT_RESPECT_GITIGNORE,
804
- defaultIndexConfig,
805
- resolveIndexConfig,
806
- compileFilters,
807
- defaultConfigPath,
808
- readConfig,
809
- writeConfig,
810
- loadLanguage,
811
- mcpEnvFor,
812
- saveLanguage,
813
- loadApiKey,
814
- loadBaseUrl,
815
- saveBaseUrl,
816
- searchEnabled,
817
- webSearchEngine,
818
- webSearchEndpoint,
819
- saveApiKey,
820
- loadProjectShellAllowed,
821
- addProjectShellAllowed,
822
- removeProjectShellAllowed,
823
- clearProjectShellAllowed,
824
- loadProjectPathAllowed,
825
- addProjectPathAllowed,
826
- loadEditMode,
827
- saveEditMode,
828
- editModeHintShown,
829
- mouseClipboardHintShown,
830
- loadReasoningEffort,
831
- loadTheme,
832
- resolveThemePreference,
833
- saveTheme,
834
- saveReasoningEffort,
835
- loadWorkspaceDir,
836
- saveWorkspaceDir,
837
- loadEditor,
838
- saveEditor,
839
- loadRecentWorkspaces,
840
- pushRecentWorkspace,
841
- loadPreset,
842
- savePreset,
843
- loadIndexUserConfig,
844
- loadIndexConfig,
845
- loadSemanticEmbeddingUserConfig,
846
- saveSemanticEmbeddingConfig,
847
- resolveSemanticEmbeddingConfig,
848
- redactSemanticEmbeddingConfig,
849
- markEditModeHintShown,
850
- markMouseClipboardHintShown,
851
- isPlausibleKey,
852
- redactKey
853
- };
854
- //# sourceMappingURL=chunk-CZSJILQP.js.map