ompchamber 2.0.2 → 3.0.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 (329) hide show
  1. package/README.md +7 -6
  2. package/bunfig.toml +11 -0
  3. package/dist/client/index.html +16 -5
  4. package/dist/client/index.js +1393 -0
  5. package/dist/client/static/js/index-prbmx3yj.js +5123 -0
  6. package/dist/client/static/js/index-ranztes9.css +1 -0
  7. package/index.html +54 -0
  8. package/package.json +9 -10
  9. package/public/apple-touch-icon.png +0 -0
  10. package/public/icon-192x192.png +0 -0
  11. package/public/icon.svg +60 -0
  12. package/public/manifest.webmanifest +38 -0
  13. package/src/cli/lib/commands/serve.js +9 -5
  14. package/src/cli/lib/runtime.js +18 -7
  15. package/src/client/components/common/provider-icon/glyphs.ts +118 -0
  16. package/src/client/components/common/provider-icon/index.tsx +85 -0
  17. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +4 -0
  18. package/src/client/components/layout/desktop-layout/index.tsx +2 -0
  19. package/src/client/components/mobile/LayoutWrapper.tsx +16 -0
  20. package/src/client/components/mobile/SessionSidebar.tsx +10 -0
  21. package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +0 -1
  22. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +16 -1
  23. package/src/client/components/mobile/mobile-session-sidebar/List.tsx +3 -0
  24. package/src/client/components/settings/categories/ProviderSettings.tsx +45 -4
  25. package/src/client/components/settings/categories/UsageSettings.tsx +22 -7
  26. package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +322 -0
  27. package/src/client/components/settings/categories/provider-settings/AddProviderModal.tsx +152 -56
  28. package/src/client/components/settings/categories/provider-settings/AuthSection.tsx +52 -1
  29. package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +133 -0
  30. package/src/client/components/settings/categories/provider-settings/DialectFields.tsx +136 -0
  31. package/src/client/components/settings/categories/provider-settings/EffortLadder.tsx +89 -0
  32. package/src/client/components/settings/categories/provider-settings/Header.tsx +2 -2
  33. package/src/client/components/settings/categories/provider-settings/LoginModal.tsx +2 -2
  34. package/src/client/components/settings/categories/provider-settings/ModelsList.tsx +22 -2
  35. package/src/client/components/settings/categories/provider-settings/PresetPicker.tsx +82 -0
  36. package/src/client/components/settings/categories/provider-settings/PriceFields.tsx +107 -0
  37. package/src/client/components/settings/categories/provider-settings/ReconnectModal.tsx +43 -22
  38. package/src/client/components/settings/categories/provider-settings/SidebarList.tsx +2 -2
  39. package/src/client/components/settings/categories/usage-settings/LimitsSection.tsx +115 -0
  40. package/src/client/components/settings/categories/usage-settings/ProviderCard.tsx +19 -26
  41. package/src/client/components/settings/categories/usage-settings/ProviderDetail.tsx +29 -22
  42. package/src/client/components/settings/categories/usage-settings/SidebarList.tsx +60 -48
  43. package/src/client/components/settings/categories/usage-settings/format.ts +36 -0
  44. package/src/client/components/settings/categories/usage-settings/providers.ts +52 -28
  45. package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +1 -1
  46. package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +1 -1
  47. package/src/client/components/workspace/diff-panel/Toolbar.tsx +71 -38
  48. package/src/client/components/workspace/diff-panel/index.tsx +139 -53
  49. package/src/client/components/workspace/editor/Tabs.tsx +2 -2
  50. package/src/client/components/workspace/editor/Toolbar.tsx +111 -26
  51. package/src/client/components/workspace/editor/index.tsx +27 -9
  52. package/src/client/components/workspace/model-dropdown/Item.tsx +13 -23
  53. package/src/client/components/workspace/model-dropdown/Panel.tsx +1 -1
  54. package/src/client/components/workspace/model-dropdown/Section.tsx +13 -4
  55. package/src/client/components/workspace/model-dropdown/index.tsx +7 -3
  56. package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +10 -5
  57. package/src/client/components/workspace/usage-panel/index.tsx +36 -18
  58. package/src/client/data/samples/dialogue-session.ts +1 -1
  59. package/src/client/data/samples/sample-tools/other.ts +1 -1
  60. package/src/client/data/settings/provider.ts +141 -9
  61. package/src/client/hooks/editor/use-file-editor.ts +24 -27
  62. package/src/client/hooks/models/use-provider-names.ts +1 -1
  63. package/src/client/hooks/settings/providers/actions.ts +337 -0
  64. package/src/client/hooks/settings/providers/api.ts +69 -0
  65. package/src/client/hooks/settings/providers/index.ts +138 -0
  66. package/src/client/hooks/settings/providers/messages.ts +77 -0
  67. package/src/client/hooks/settings/useUsageReport.ts +8 -3
  68. package/src/client/hooks/ui/theme.ts +3 -3
  69. package/src/client/hooks/workspace/file-tabs.ts +62 -11
  70. package/src/client/stubs/elkjs.ts +6 -1
  71. package/src/server/index.ts +20 -2
  72. package/src/server/lib/assets/font-css.server.ts +86 -0
  73. package/src/server/lib/assets/fonts.server.ts +117 -0
  74. package/src/server/lib/bundler/css.ts +116 -0
  75. package/src/server/lib/lifecycle/shell-route.ts +17 -0
  76. package/src/server/lib/models/provider-listing.server.ts +257 -0
  77. package/src/server/lib/models/provider-registry.server.test.ts +122 -0
  78. package/src/server/lib/models/provider-registry.server.ts +76 -25
  79. package/src/server/lib/omp/config/models-config.ts +11 -0
  80. package/src/server/lib/omp/config/models-validation.test.ts +137 -0
  81. package/src/server/lib/omp/config/models-validation.ts +111 -2
  82. package/src/server/lib/omp/config/provider-seeds.test.ts +167 -0
  83. package/src/server/lib/omp/config/provider-seeds.ts +176 -0
  84. package/src/server/lib/omp/config/providers.ts +94 -100
  85. package/src/server/lib/omp/core/auth-credentials.ts +45 -0
  86. package/src/server/lib/omp/session/{usage.ts → usage/aggregate.ts} +1 -118
  87. package/src/server/lib/omp/session/usage/shaping.ts +130 -0
  88. package/src/server/lib/usage/deepseek.ts +4 -5
  89. package/src/server/lib/usage/kenari.ts +7 -6
  90. package/src/server/lib/usage/omp-usage.server.test.ts +126 -0
  91. package/src/server/lib/usage/omp-usage.server.ts +194 -0
  92. package/src/server/lib/usage/provider-key.ts +81 -3
  93. package/src/server/lib/usage/providers.server.test.ts +47 -0
  94. package/src/server/lib/usage/providers.server.ts +208 -0
  95. package/src/server/lib/usage/vendor-balance.server.test.ts +104 -0
  96. package/src/server/lib/usage/vendor-balance.server.ts +284 -0
  97. package/src/server/plugins/shell.server.ts +56 -0
  98. package/src/server/plugins/ssr.ts +24 -36
  99. package/src/server/plugins/static.test.ts +26 -29
  100. package/src/server/plugins/static.ts +40 -19
  101. package/src/server/routes/settings/index.ts +2 -0
  102. package/src/server/routes/settings/provider-model.ts +107 -0
  103. package/src/server/routes/settings/provider-models.ts +65 -202
  104. package/src/server/routes/settings/providers.ts +22 -7
  105. package/src/server/routes/settings/usage.ts +125 -45
  106. package/src/server/routes/telemetry/tokens.ts +2 -1
  107. package/src/shared/lib/fs/diff-parser.test.ts +116 -0
  108. package/src/shared/lib/fs/diff-parser.ts +86 -33
  109. package/src/shared/lib/models/{provider-connection.ts → provider/connection.ts} +37 -0
  110. package/src/shared/lib/models/provider/dialect.ts +179 -0
  111. package/src/shared/lib/models/provider/glyph.test.ts +116 -0
  112. package/src/shared/lib/models/provider/glyph.ts +200 -0
  113. package/src/shared/lib/models/{provider-models.ts → provider/models.ts} +91 -6
  114. package/src/shared/lib/models/provider/presets.test.ts +172 -0
  115. package/src/shared/lib/models/provider/presets.ts +83 -0
  116. package/src/shared/lib/workspace/file-tab-id.ts +29 -0
  117. package/src/shared/types/settings/provider.ts +81 -0
  118. package/src/shared/types/settings/usage.ts +88 -14
  119. package/tsconfig.json +3 -1
  120. package/dist/client/static/css/index.5f630421b7.css +0 -2
  121. package/dist/client/static/font/KaTeX_AMS-Regular.a79f1c3119.woff2 +0 -0
  122. package/dist/client/static/font/KaTeX_Caligraphic-Bold.ec17d13264.woff2 +0 -0
  123. package/dist/client/static/font/KaTeX_Caligraphic-Regular.55fac25845.woff2 +0 -0
  124. package/dist/client/static/font/KaTeX_Fraktur-Bold.d42a5579b0.woff2 +0 -0
  125. package/dist/client/static/font/KaTeX_Fraktur-Regular.d3c882a649.woff2 +0 -0
  126. package/dist/client/static/font/KaTeX_Main-Bold.c3fb5ac22f.woff2 +0 -0
  127. package/dist/client/static/font/KaTeX_Main-BoldItalic.6f2bb1dff2.woff2 +0 -0
  128. package/dist/client/static/font/KaTeX_Main-Italic.8916142bec.woff2 +0 -0
  129. package/dist/client/static/font/KaTeX_Main-Regular.0462f03bdf.woff2 +0 -0
  130. package/dist/client/static/font/KaTeX_Math-BoldItalic.572d331f69.woff2 +0 -0
  131. package/dist/client/static/font/KaTeX_Math-Italic.f28c23acad.woff2 +0 -0
  132. package/dist/client/static/font/KaTeX_SansSerif-Bold.8c5b5494b6.woff2 +0 -0
  133. package/dist/client/static/font/KaTeX_SansSerif-Italic.3b1e59b3ba.woff2 +0 -0
  134. package/dist/client/static/font/KaTeX_SansSerif-Regular.ba21ed5f84.woff2 +0 -0
  135. package/dist/client/static/font/KaTeX_Script-Regular.03e9641d6f.woff2 +0 -0
  136. package/dist/client/static/font/KaTeX_Size1-Regular.eae34984b3.woff2 +0 -0
  137. package/dist/client/static/font/KaTeX_Size2-Regular.5916a24fa3.woff2 +0 -0
  138. package/dist/client/static/font/KaTeX_Size4-Regular.10d95fd3a2.woff2 +0 -0
  139. package/dist/client/static/font/KaTeX_Typewriter-Regular.a8709e3622.woff2 +0 -0
  140. package/dist/client/static/font/fira-code-latin-400-normal.2655b10c55.woff2 +0 -0
  141. package/dist/client/static/font/fira-code-latin-500-normal.92a991f204.woff2 +0 -0
  142. package/dist/client/static/font/fira-code-latin-600-normal.43788eb7f1.woff2 +0 -0
  143. package/dist/client/static/font/fira-code-latin-700-normal.2667215d33.woff2 +0 -0
  144. package/dist/client/static/js/77.0d81c74cf0.js +0 -139
  145. package/dist/client/static/js/77.0d81c74cf0.js.LICENSE.txt +0 -8
  146. package/dist/client/static/js/async/0.8e59f2eb5b.js +0 -1
  147. package/dist/client/static/js/async/0k.5852e6b4fa.js +0 -1
  148. package/dist/client/static/js/async/0w.9ed36d5860.js +0 -1
  149. package/dist/client/static/js/async/1.f387c12b63.js +0 -1
  150. package/dist/client/static/js/async/12.d091f91c99.js +0 -1
  151. package/dist/client/static/js/async/13.8f810a8a6c.js +0 -1
  152. package/dist/client/static/js/async/19.6fe909d55a.js +0 -160
  153. package/dist/client/static/js/async/1b.23f1141a38.js +0 -1
  154. package/dist/client/static/js/async/1k.973e8e21fc.js +0 -2
  155. package/dist/client/static/js/async/1k.973e8e21fc.js.LICENSE.txt +0 -11
  156. package/dist/client/static/js/async/1p.0d5cddda96.js +0 -1
  157. package/dist/client/static/js/async/2.b589f1733b.js +0 -1
  158. package/dist/client/static/js/async/2v.96165101de.js +0 -1
  159. package/dist/client/static/js/async/3.0cacc08423.js +0 -1
  160. package/dist/client/static/js/async/37.b28b2f61cd.js +0 -1
  161. package/dist/client/static/js/async/3d.5085fb913f.js +0 -1
  162. package/dist/client/static/js/async/3j.357c80ff38.js +0 -2
  163. package/dist/client/static/js/async/3j.357c80ff38.js.LICENSE.txt +0 -11
  164. package/dist/client/static/js/async/3p.bcf32a0983.js +0 -1
  165. package/dist/client/static/js/async/3r.3a69e98ee0.js +0 -64
  166. package/dist/client/static/js/async/3u.1228460e2a.js +0 -1
  167. package/dist/client/static/js/async/3y.3530b824ad.js +0 -198
  168. package/dist/client/static/js/async/3y.3530b824ad.js.LICENSE.txt +0 -5
  169. package/dist/client/static/js/async/4.9442eeb472.js +0 -1
  170. package/dist/client/static/js/async/4e.678285ca55.js +0 -1
  171. package/dist/client/static/js/async/4k.33a0c7eeb4.js +0 -1
  172. package/dist/client/static/js/async/4m.928a1dde85.js +0 -31
  173. package/dist/client/static/js/async/4m.928a1dde85.js.LICENSE.txt +0 -11
  174. package/dist/client/static/js/async/4q.aad20dab25.js +0 -1
  175. package/dist/client/static/js/async/5.ebaf8b89cc.js +0 -36
  176. package/dist/client/static/js/async/51.95bcae98af.js +0 -2
  177. package/dist/client/static/js/async/51.95bcae98af.js.LICENSE.txt +0 -6
  178. package/dist/client/static/js/async/5b.d88304bc13.js +0 -1
  179. package/dist/client/static/js/async/5j.d6407c4248.js +0 -287
  180. package/dist/client/static/js/async/5o.88316d4460.js +0 -62
  181. package/dist/client/static/js/async/6.f034c9b528.js +0 -1
  182. package/dist/client/static/js/async/66.5dfa29f957.js +0 -93
  183. package/dist/client/static/js/async/6o.5b1a06a382.js +0 -1
  184. package/dist/client/static/js/async/7.e4a9288dd0.js +0 -1
  185. package/dist/client/static/js/async/73.308dff4da8.js +0 -1
  186. package/dist/client/static/js/async/7e.a1cc9bfd88.js +0 -1
  187. package/dist/client/static/js/async/7g.a7814350c3.js +0 -1
  188. package/dist/client/static/js/async/7l.fadbbc0583.js +0 -1
  189. package/dist/client/static/js/async/8.5067439d8c.js +0 -1
  190. package/dist/client/static/js/async/8j.ea110663fb.js +0 -1
  191. package/dist/client/static/js/async/a.bce4542392.js +0 -1
  192. package/dist/client/static/js/async/aa.65d3852576.js +0 -1
  193. package/dist/client/static/js/async/ar.9303e5f2e8.js +0 -2
  194. package/dist/client/static/js/async/ar.9303e5f2e8.js.LICENSE.txt +0 -11
  195. package/dist/client/static/js/async/az.d656062b0f.js +0 -1
  196. package/dist/client/static/js/async/b.b4f6f06515.js +0 -1
  197. package/dist/client/static/js/async/bi.09688ba75c.js +0 -1
  198. package/dist/client/static/js/async/bq.586bc738d1.js +0 -1
  199. package/dist/client/static/js/async/c.797d933882.js +0 -1
  200. package/dist/client/static/js/async/c0.0af1e640d3.js +0 -24
  201. package/dist/client/static/js/async/ca.8a52cfd447.js +0 -1
  202. package/dist/client/static/js/async/cf.d34fff5d67.js +0 -1
  203. package/dist/client/static/js/async/ct.b74928f7a3.js +0 -1
  204. package/dist/client/static/js/async/cx.3cb0242a3a.js +0 -226
  205. package/dist/client/static/js/async/d.a5fc8fe1b3.js +0 -1
  206. package/dist/client/static/js/async/da.f62c70f6c8.js +0 -1
  207. package/dist/client/static/js/async/dp.1725d6432c.js +0 -1
  208. package/dist/client/static/js/async/e.93214d622b.js +0 -79
  209. package/dist/client/static/js/async/f.ab50467719.js +0 -19
  210. package/dist/client/static/js/async/f.ab50467719.js.LICENSE.txt +0 -12
  211. package/dist/client/static/js/async/f7.46971e9d6d.js +0 -2
  212. package/dist/client/static/js/async/f7.46971e9d6d.js.LICENSE.txt +0 -6
  213. package/dist/client/static/js/async/f8.bbf0dbae70.js +0 -1
  214. package/dist/client/static/js/async/g.cb81980498.js +0 -2
  215. package/dist/client/static/js/async/g.cb81980498.js.LICENSE.txt +0 -11
  216. package/dist/client/static/js/async/h.4e790471e4.js +0 -27
  217. package/dist/client/static/js/async/h1.393f066d09.js +0 -1
  218. package/dist/client/static/js/async/h3.216e9798ab.js +0 -148
  219. package/dist/client/static/js/async/hd.0da931b622.js +0 -1
  220. package/dist/client/static/js/async/hk.ba7fb04d41.js +0 -1
  221. package/dist/client/static/js/async/hn.b645041e00.js +0 -1
  222. package/dist/client/static/js/async/ho.475a5e1ae4.js +0 -1
  223. package/dist/client/static/js/async/hp.e9fe2e395a.js +0 -2
  224. package/dist/client/static/js/async/hp.e9fe2e395a.js.LICENSE.txt +0 -17
  225. package/dist/client/static/js/async/hs.e7c59d8090.js +0 -41
  226. package/dist/client/static/js/async/i.7c148e8440.js +0 -1
  227. package/dist/client/static/js/async/id.573df20f29.js +0 -1
  228. package/dist/client/static/js/async/j.ab925882d8.js +0 -1
  229. package/dist/client/static/js/async/jd.63886a1f09.js +0 -1
  230. package/dist/client/static/js/async/jg.d86ebd4013.js +0 -86
  231. package/dist/client/static/js/async/jl.874d352278.js +0 -1
  232. package/dist/client/static/js/async/jll.11313b455a.js +0 -1
  233. package/dist/client/static/js/async/js.67182759ef.js +0 -1
  234. package/dist/client/static/js/async/jsc.23b70d6f40.js +0 -1
  235. package/dist/client/static/js/async/jse.334588ff5d.js +0 -1
  236. package/dist/client/static/js/async/jz.72eb929106.js +0 -77
  237. package/dist/client/static/js/async/k.3210286401.js +0 -217
  238. package/dist/client/static/js/async/ka.c1990ecaa3.js +0 -115
  239. package/dist/client/static/js/async/katex-vendor.de6a87c308.js +0 -1
  240. package/dist/client/static/js/async/ku.29c8a59d0c.js +0 -1
  241. package/dist/client/static/js/async/ky.8dab1dade0.js +0 -1
  242. package/dist/client/static/js/async/l.12dd34e1be.js +0 -1
  243. package/dist/client/static/js/async/l9.949710adaf.js +0 -83
  244. package/dist/client/static/js/async/l9.949710adaf.js.LICENSE.txt +0 -13
  245. package/dist/client/static/js/async/ls.9d9a01026c.js +0 -104
  246. package/dist/client/static/js/async/m.eb2e6752e2.js +0 -28
  247. package/dist/client/static/js/async/m.eb2e6752e2.js.LICENSE.txt +0 -11
  248. package/dist/client/static/js/async/m3.d2b05f9604.js +0 -2
  249. package/dist/client/static/js/async/m3.d2b05f9604.js.LICENSE.txt +0 -6
  250. package/dist/client/static/js/async/ma.2c261b04dd.js +0 -2
  251. package/dist/client/static/js/async/ma.2c261b04dd.js.LICENSE.txt +0 -6
  252. package/dist/client/static/js/async/me.8ace414f80.js +0 -23
  253. package/dist/client/static/js/async/ms.98960af4eb.js +0 -67
  254. package/dist/client/static/js/async/ms.98960af4eb.js.LICENSE.txt +0 -12
  255. package/dist/client/static/js/async/mt.0352e976d8.js +0 -1
  256. package/dist/client/static/js/async/n.a9f1c51701.js +0 -1
  257. package/dist/client/static/js/async/na.a36cd532d6.js +0 -1
  258. package/dist/client/static/js/async/nk.fc7e58325e.js +0 -1
  259. package/dist/client/static/js/async/o.36353dfb88.js +0 -1
  260. package/dist/client/static/js/async/oc.b73042e8bd.js +0 -8
  261. package/dist/client/static/js/async/og.8eb577893a.js +0 -193
  262. package/dist/client/static/js/async/p.48ecfcd14e.js +0 -1
  263. package/dist/client/static/js/async/px.fc6877924b.js +0 -1
  264. package/dist/client/static/js/async/q.22588845a9.js +0 -21
  265. package/dist/client/static/js/async/q.22588845a9.js.LICENSE.txt +0 -6
  266. package/dist/client/static/js/async/q5.97dc1481b6.js +0 -286
  267. package/dist/client/static/js/async/qs.2a9ddb3c72.js +0 -1
  268. package/dist/client/static/js/async/r.51010ad87c.js +0 -1
  269. package/dist/client/static/js/async/rd.cb6bf495bb.js +0 -2
  270. package/dist/client/static/js/async/rd.cb6bf495bb.js.LICENSE.txt +0 -4
  271. package/dist/client/static/js/async/s.0f395cdda5.js +0 -94
  272. package/dist/client/static/js/async/t.4dca0e2ba8.js +0 -1
  273. package/dist/client/static/js/async/t9.d44f57d518.js +0 -1
  274. package/dist/client/static/js/async/ta.973534bbec.js +0 -1
  275. package/dist/client/static/js/async/tr.e878658140.js +0 -309
  276. package/dist/client/static/js/async/u.0871ac5b22.js +0 -1
  277. package/dist/client/static/js/async/ud.3065bfee31.js +0 -2
  278. package/dist/client/static/js/async/ud.3065bfee31.js.LICENSE.txt +0 -4
  279. package/dist/client/static/js/async/up.ea990da0ff.js +0 -32
  280. package/dist/client/static/js/async/uw.8890abbabc.js +0 -1
  281. package/dist/client/static/js/async/v.7d28d3c241.js +0 -34
  282. package/dist/client/static/js/async/vp.9b13bf8610.js +0 -1
  283. package/dist/client/static/js/async/vt.42416b707d.js +0 -1
  284. package/dist/client/static/js/async/w.08ac210f60.js +0 -1
  285. package/dist/client/static/js/async/wt.ad92393a90.js +0 -1
  286. package/dist/client/static/js/async/x.563f72ca6b.js +0 -1
  287. package/dist/client/static/js/async/x0.475516418f.js +0 -1
  288. package/dist/client/static/js/async/x1.da8687159b.js +0 -90
  289. package/dist/client/static/js/async/xe.da8dcc2015.js +0 -2
  290. package/dist/client/static/js/async/xe.da8dcc2015.js.LICENSE.txt +0 -11
  291. package/dist/client/static/js/async/xl.a3c562a58c.js +0 -1
  292. package/dist/client/static/js/async/xn.6510c0abe2.js +0 -2
  293. package/dist/client/static/js/async/xn.6510c0abe2.js.LICENSE.txt +0 -6
  294. package/dist/client/static/js/async/xn1.83a7784fe1.js +0 -10
  295. package/dist/client/static/js/async/xn1.83a7784fe1.js.LICENSE.txt +0 -11
  296. package/dist/client/static/js/async/xnl.feb0021e50.js +0 -2
  297. package/dist/client/static/js/async/xnl.feb0021e50.js.LICENSE.txt +0 -12
  298. package/dist/client/static/js/async/y.1a9ed7a5d8.js +0 -1
  299. package/dist/client/static/js/async/y6.43c57defe4.js +0 -1
  300. package/dist/client/static/js/async/yb.8c1342401d.js +0 -1
  301. package/dist/client/static/js/async/ybq.4491f2f2dc.js +0 -1
  302. package/dist/client/static/js/async/yg.35bebd6d0c.js +0 -149
  303. package/dist/client/static/js/async/yq.917ddd7ba2.js +0 -1
  304. package/dist/client/static/js/async/ys.00687cf82d.js +0 -38
  305. package/dist/client/static/js/async/yv.d99d829136.js +0 -1
  306. package/dist/client/static/js/async/z.56f61a4374.js +0 -1
  307. package/dist/client/static/js/async/zi.5fdb07b86a.js +0 -24
  308. package/dist/client/static/js/async/zj.654f37e8ff.js +0 -1
  309. package/dist/client/static/js/async/zn.966d6f1cc6.js +0 -1
  310. package/dist/client/static/js/async/zo.26213b40c0.js +0 -1
  311. package/dist/client/static/js/async/zx.e9f4105e00.js +0 -1
  312. package/dist/client/static/js/index.e6a257402a.js +0 -38
  313. package/dist/client/static/js/index.e6a257402a.js.LICENSE.txt +0 -4
  314. package/dist/client/static/js/markdown-vendor.71e43278b3.js +0 -144
  315. package/dist/client/static/js/shiki-vendor.cb8452ddcd.js +0 -1
  316. package/src/client/components/settings/categories/provider-settings/Icons.tsx +0 -35
  317. package/src/client/hooks/settings/providers.ts +0 -326
  318. package/src/server/plugins/dev-assets.ts +0 -49
  319. package/src/shared/lib/code/editor-utils.ts +0 -16
  320. package/src/shared/lib/models/provider-presets.ts +0 -29
  321. /package/dist/client/{apple-touch-icon.png → static/apple-touch-icon-dskx5sr3.png} +0 -0
  322. /package/dist/client/{icon-192x192.png → static/icon-192x192-6gn5cr2f.png} +0 -0
  323. /package/dist/client/{icon.svg → static/icon-d07z9dtz.svg} +0 -0
  324. /package/dist/client/{manifest.webmanifest → static/manifest-bnyy75kt.webmanifest} +0 -0
  325. /package/{dist/client → public}/icon-512x512.png +0 -0
  326. /package/{dist/client → public}/icon-maskable-512x512.png +0 -0
  327. /package/{dist/client → public}/sw.js +0 -0
  328. /package/src/shared/lib/models/{provider-cleanup.ts → provider/cleanup.ts} +0 -0
  329. /package/src/shared/lib/models/{provider-label.ts → provider/label.ts} +0 -0
@@ -1,31 +0,0 @@
1
- /*! LICENSE: 4m.928a1dde85.js.LICENSE.txt */
2
- "use strict";(self.rspackChunkompchamber=self.rspackChunkompchamber||[]).push([["4m"],{mk(e,t,i){i.d(t,{SettingsModal:()=>iC});var a=i("j"),n=i("H"),o=i("qp"),l=i("S"),r=i("z"),s=i("So"),d=i("C7q"),c=i("zm"),p=i("XS"),u=i("NO"),m=i("HJ"),b=i("qn"),h=i("s0"),f=i("SJ"),g=i("kk"),v=i("y");let x=(0,v.A)({name:"folder-git",size:24,node:[["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M14 13h3",key:"1dgedf"}],["path",{d:"M7 13h3",key:"1pygq7"}]]});var k=i("uV");let y=(0,v.A)({name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]});var w=i("lW");let N=(0,v.A)({name:"sliders-vertical",size:24,node:[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],aliases:["sliders"]});var A=i("N"),Y=i("C7");let S=(0,v.A)({name:"library",size:24,node:[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]});var C=i("YO"),D=i("t3"),F=i("n");let T=[{id:"appearance",label:"Appearance",icon:m.A,section:"OMPCHAMBER",description:"Custom themes, typography scale, and layout density."},{id:"chats",label:"Chats",icon:b.A,section:"OMPCHAMBER",description:"Message streaming, thinking blocks, and tool view modes."},{id:"notifications",label:"Notifications",icon:h.A,section:"OMPCHAMBER",description:"Build failure alerts, sounds, and system popups."},{id:"usage",label:"Usage",icon:f.A,section:"OMPCHAMBER",description:"Build minutes quota, storage, and general usage."},{id:"token-usage",label:"Token Usage",icon:g.A,section:"OMPCHAMBER",description:"Token telemetry, cache, and cost breakdown."},{id:"projects",label:"Projects",icon:x,section:"WORKSPACE",description:"Workspace directories, roots, and ignored paths."},{id:"omp",label:"OMP Engine",icon:k.A,section:"OMP",description:"Live agent state and native omp config keys."},{id:"providers",label:"Providers",icon:y,section:"OMP",description:"AI model engines, endpoints, and credentials."},{id:"agents",label:"Agents",icon:w.A,section:"OMP",description:"Autonomous agent persona, self-healing, and reasoning."},{id:"behavior",label:"Behavior",icon:N,section:"OMP",description:"Native AGENTS.md and RULES.md — global instructions, permission gates, and safety filters."},{id:"commands",label:"Commands",icon:A.A,section:"OMP",description:"Slash command macros and terminal shortcuts."},{id:"mcp",label:"MCP",icon:Y.A,section:"OMP",description:"Model Context Protocol servers and dynamic tools."},{id:"skills",label:"Skills",icon:S,section:"LIBRARY",description:"Manage downloaded skills and scripts."},{id:"skills-catalog",label:"Skills Catalog",icon:C.A,section:"LIBRARY",description:"Browse and install new skills."}];function M(e){let{activeCategory:t,onSelectCategory:i,searchQuery:n,onSearchChange:o,onReloadOmpEngine:r,isReloading:s,className:d=""}=e,c=T.filter(e=>{if(!n.trim())return!0;let t=n.toLowerCase();return e.label.toLowerCase().includes(t)||e.section.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)});return(0,a.FD)("div",{className:`flex flex-col h-full bg-canvas border-r border-ink/10 text-ink select-none ${d}`,children:[(0,a.Y)("div",{className:"p-3 border-b border-ink/10 flex-shrink-0",children:(0,a.FD)("div",{className:"relative flex items-center",children:[(0,a.Y)(D.A,{size:14,className:"absolute left-2.5 text-ink/40 pointer-events-none"}),(0,a.Y)("input",{type:"text",placeholder:"Search settings",value:n,onChange:e=>o(e.currentTarget.value),className:"w-full bg-paper border border-ink/15 rounded-lg pl-8 pr-7 py-1.5 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors"}),n&&(0,a.Y)("button",{type:"button",onClick:()=>o(""),className:"absolute right-2 text-ink/40 hover:text-ink p-0.5",children:(0,a.Y)(l.A,{size:12})})]})}),(0,a.Y)("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static p-2 space-y-4",children:0===c.length?(0,a.Y)("div",{className:"text-center py-8 text-xs text-ink/50 italic",children:"No matching settings found"}):["OMPCHAMBER","WORKSPACE","OMP","LIBRARY"].map(e=>{let n=c.filter(t=>t.section===e);return 0===n.length?null:(0,a.FD)("div",{className:"space-y-1",children:[(0,a.Y)("div",{className:"px-2.5 py-1 text-[10px] font-bold text-ink/40 tracking-wider font-mono uppercase",children:e}),(0,a.Y)("div",{className:"space-y-0.5",children:n.map(e=>{let n=e.icon,o=t===e.id;return(0,a.FD)("button",{type:"button",onClick:()=>i(e.id),className:`w-full flex items-center justify-between px-2.5 py-1.5 rounded-lg text-xs transition-all text-left ${o?"bg-ink/10 font-semibold text-ink shadow-2xs":"text-ink/75 hover:bg-ink/5 hover:text-ink"}`,children:[(0,a.FD)("div",{className:"flex items-center space-x-2.5 truncate",children:[(0,a.Y)(n,{size:14,className:o?"text-ink":"text-ink/60"}),(0,a.Y)("span",{className:"truncate",children:e.label})]}),e.badge&&(0,a.Y)("span",{className:"px-1.5 py-0.2 text-[9px] font-mono font-medium rounded bg-amber-500/15 text-amber-900 border border-amber-500/20",children:e.badge})]},e.id)})})]},e)})}),(0,a.Y)("div",{className:"p-2 border-t border-ink/10 flex-shrink-0 bg-canvas",children:(0,a.FD)("button",{type:"button",onClick:r,disabled:s,className:"w-full flex items-center space-x-2 px-2.5 py-1.5 text-xs text-ink/75 hover:text-ink hover:bg-ink/5 rounded-lg transition-colors font-medium cursor-pointer",children:[(0,a.Y)(F.A,{size:13,className:`${s?"animate-spin text-warning":"text-ink/60"}`}),(0,a.Y)("span",{children:s?"Reloading OMP Engine...":"Reload OMP Engine"})]})})]})}let P=(0,v.A)({name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]}),I=(0,v.A)({name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]});function R(e){let{theme:t,selected:i,onSelect:n}=e;return(0,a.FD)("button",{type:"button",onClick:()=>n(t.id),"aria-pressed":i,className:`group flex w-full flex-col gap-2.5 rounded-lg border p-2.5 text-left transition-all cursor-pointer ${i?"border-ink bg-ink/5 ring-1 ring-ink/20":"border-ink/20 bg-paper hover:border-ink/40 hover:bg-ink/5"}`,children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)("span",{className:"truncate font-semibold text-ink",title:t.name,children:t.name}),(0,a.Y)("span",{className:"shrink-0 rounded-full border border-ink/15 px-1.5 py-px text-[9px] font-semibold uppercase tracking-wider text-ink/50",children:t.variant}),i&&(0,a.Y)(r.A,{size:14,className:"ml-auto shrink-0 text-ink"})]}),(0,a.Y)("div",{className:"flex items-center gap-1",children:p.$q.map(e=>(0,a.Y)("span",{title:`${e.label} \xb7 ${t[e.key]}`,style:{backgroundColor:t[e.key]},className:"h-5 flex-1 rounded-[3px] border border-ink/10"},e.key))})]})}let E=[{id:"all",label:"All"},{id:"light",label:"Light"},{id:"dark",label:"Dark"}];function L(e){let{selectedId:t,onSelect:i}=e,[o,l]=(0,n.J0)("all"),r=(0,n.Kr)(()=>"all"===o?p.zG:p.zG.filter(e=>e.variant===o),[o]);return(0,a.FD)("div",{className:"space-y-3 pb-6",children:[(0,a.FD)("div",{className:"flex items-center gap-1.5",children:[E.map(e=>(0,a.FD)("button",{type:"button",onClick:()=>l(e.id),className:`rounded-full border px-2.5 py-1 text-[11px] font-medium transition-colors cursor-pointer ${o===e.id?"border-ink bg-ink text-paper":"border-ink/20 bg-paper text-ink/70 hover:border-ink/40 hover:text-ink"}`,children:["light"===e.id&&(0,a.Y)(P,{size:11,className:"mr-1 inline align-[-1px]"}),"dark"===e.id&&(0,a.Y)(I,{size:11,className:"mr-1 inline align-[-1px]"}),e.label]},e.id)),(0,a.FD)("span",{className:"ml-auto font-mono text-[11px] text-ink/50",children:[r.length," themes"]})]}),(0,a.Y)("div",{className:"grid grid-cols-1 gap-2.5 sm:grid-cols-2 lg:grid-cols-3",children:r.map(e=>(0,a.Y)(R,{theme:e,selected:e.id===t,onSelect:i},e.id))})]})}function O(e){let{settings:t,onUpdate:i}=e;return(0,a.Y)("div",{className:"w-full space-y-8 text-xs text-ink",children:(0,a.FD)("section",{className:"space-y-4",children:[(0,a.FD)("div",{className:"flex items-center space-x-2 border-b border-ink/10 pb-2",children:[(0,a.Y)(m.A,{size:16,className:"text-ink/60"}),(0,a.Y)("h3",{className:"font-semibold text-sm uppercase tracking-wider text-ink/80",children:"Theme Preferences"})]}),(0,a.Y)(L,{selectedId:t.theme,onSelect:e=>i({theme:(0,p.Rm)(e)})})]})})}let j=(0,v.A)({name:"list-ordered",size:24,node:[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]}),z=(0,v.A)({name:"compass",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]});function U(e){let{settings:t,onUpdate:i}=e;return(0,a.FD)("section",{className:"space-y-3",children:[(0,a.FD)("div",{children:[(0,a.Y)("h4",{className:"text-sm font-semibold text-ink",children:"Follow-up Dispatch"}),(0,a.Y)("p",{className:"text-[11px] text-ink/60 mt-0.5",children:"Choose how new user prompts are handled while the AI agent is actively executing."})]}),(0,a.FD)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,a.FD)("div",{onClick:()=>i({followUpBehavior:"queue"}),role:"button",tabIndex:0,onKeyDown:e=>"Enter"===e.key&&i({followUpBehavior:"queue"}),className:`p-3.5 rounded-lg border text-left transition-all cursor-pointer flex flex-col justify-between select-none ${"queue"===t.followUpBehavior?"border-ink bg-ink/5 ring-1 ring-ink/20 shadow-xs":"border-ink/15 bg-paper hover:border-ink/30 hover:bg-ink/[0.02]"}`,children:[(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)("div",{className:`w-7 h-7 rounded-md flex items-center justify-center ${"queue"===t.followUpBehavior?"bg-ink text-paper":"bg-ink/5 text-ink/70"}`,children:(0,a.Y)(j,{size:15})}),(0,a.Y)("span",{className:"font-semibold text-xs text-ink",children:"Queue Mode"})]}),(0,a.Y)("span",{className:"text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-ink/10 text-ink/70 font-medium",children:"Sequential"})]}),(0,a.Y)("p",{className:"text-[11px] text-ink/65 leading-relaxed",children:"Messages wait in an execution queue and run in succession once current inference completes."})]}),(0,a.FD)("div",{className:"mt-3 pt-2.5 border-t border-ink/10 flex items-center justify-between text-[11px]",children:[(0,a.Y)("span",{className:"text-ink/50 text-[10px]",children:"Recommended for batch operations"}),(0,a.Y)("div",{className:`w-4 h-4 rounded-full border flex items-center justify-center ${"queue"===t.followUpBehavior?"border-ink bg-ink text-paper":"border-ink/30 bg-transparent"}`,children:"queue"===t.followUpBehavior&&(0,a.Y)(r.A,{size:10,strokeWidth:3})})]})]}),(0,a.FD)("div",{onClick:()=>i({followUpBehavior:"steering"}),role:"button",tabIndex:0,onKeyDown:e=>"Enter"===e.key&&i({followUpBehavior:"steering"}),className:`p-3.5 rounded-lg border text-left transition-all cursor-pointer flex flex-col justify-between select-none ${"steering"===t.followUpBehavior?"border-ink bg-ink/5 ring-1 ring-ink/20 shadow-xs":"border-ink/15 bg-paper hover:border-ink/30 hover:bg-ink/[0.02]"}`,children:[(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)("div",{className:`w-7 h-7 rounded-md flex items-center justify-center ${"steering"===t.followUpBehavior?"bg-ink text-paper":"bg-ink/5 text-ink/70"}`,children:(0,a.Y)(z,{size:15})}),(0,a.Y)("span",{className:"font-semibold text-xs text-ink",children:"Steering Mode"})]}),(0,a.Y)("span",{className:"text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-ink/10 text-ink/70 font-medium",children:"Intervention"})]}),(0,a.Y)("p",{className:"text-[11px] text-ink/65 leading-relaxed",children:"Immediately redirects current agent trajectory and focuses runtime resources onto the new instruction."})]}),(0,a.FD)("div",{className:"mt-3 pt-2.5 border-t border-ink/10 flex items-center justify-between text-[11px]",children:[(0,a.Y)("span",{className:"text-ink/50 text-[10px]",children:"Recommended for active debugging"}),(0,a.Y)("div",{className:`w-4 h-4 rounded-full border flex items-center justify-center ${"steering"===t.followUpBehavior?"border-ink bg-ink text-paper":"border-ink/30 bg-transparent"}`,children:"steering"===t.followUpBehavior&&(0,a.Y)(r.A,{size:10,strokeWidth:3})})]})]})]})]})}var B=i("DTR"),K=i("yh");let $=(0,v.A)({name:"keyboard",size:24,node:[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]});function _(e){let{settings:t,onUpdate:i}=e,n=["Enter","Shift + Enter","Ctrl / Cmd + Enter"],o=[{id:"keybindingSend",label:"Send Message",desc:"Submit prompt and initiate agent reasoning",icon:B.A,value:t.keybindingSend||"Enter"},{id:"keybindingNewLine",label:"Line Break",desc:"Insert newline inside input box without dispatching",icon:K.A,value:t.keybindingNewLine||"Shift + Enter"},{id:"keybindingSteering",label:"Steering Intervention",desc:"Send prompt with steering interruption priority",icon:z,value:t.keybindingSteering||"Ctrl / Cmd + Enter"}];return(0,a.FD)("section",{className:"space-y-3",children:[(0,a.FD)("div",{className:"flex items-center justify-between",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)($,{size:15,className:"text-ink/70"}),(0,a.Y)("h4",{className:"text-sm font-semibold text-ink",children:"Keyboard Shortcuts"})]}),(0,a.Y)("span",{className:"text-[10px] text-ink/50 font-mono",children:"Auto-conflict resolution"})]}),(0,a.Y)("div",{className:"bg-paper border border-ink/15 rounded-lg divide-y divide-ink/10 shadow-xs overflow-hidden",children:o.map(e=>(0,a.FD)("div",{className:"p-3.5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:bg-ink/[0.015] transition-colors",children:[(0,a.FD)("div",{className:"flex items-start gap-3",children:[(0,a.Y)("div",{className:"w-7 h-7 rounded-md bg-ink/5 flex items-center justify-center text-ink/70 flex-shrink-0 mt-0.5",children:(0,a.Y)(e.icon,{size:14})}),(0,a.FD)("div",{children:[(0,a.Y)("div",{className:"font-semibold text-xs text-ink",children:e.label}),(0,a.Y)("div",{className:"text-[11px] text-ink/60 mt-0.5",children:e.desc})]})]}),(0,a.Y)("div",{className:"flex items-center gap-2 self-end sm:self-center",children:(0,a.Y)("select",{value:e.value,onChange:t=>{var a,n;return a=e.id,n=t.currentTarget.value,void i(e=>{let t={[a]:n};for(let i of["keybindingSend","keybindingNewLine","keybindingSteering"].filter(e=>e!==a))e[i]===n&&(t[i]=e[a]);return{...e,...t}})},className:"bg-paper border border-ink/20 rounded-md px-2.5 py-1.5 outline-none focus:border-ink text-[11px] font-medium text-ink cursor-pointer hover:border-ink/40 transition-colors",children:n.map(e=>(0,a.Y)("option",{value:e,children:e},e))})})]},e.id))})]})}var q=i("tN"),J=i("zr");let G=[{enabled:!0,label:"Generate Automatically",badge:"Default",icon:q.A,description:'As soon as your first message lands, the session is named from it using omp\'s own tiny title model — retried once when the run ends if that first attempt came back empty. Sessions stop showing "New Session - <timestamp>" in the sidebar.',note:"One small model call per session"},{enabled:!1,label:"Manual Only",badge:"Opt-out",icon:J.A,description:"Sessions keep their timestamp placeholder until you rename them from the sidebar. Choose this when every title should be deliberate, or to avoid the extra model call.",note:"No background model calls"}];function H(e){let{settings:t,onUpdate:i}=e,n=t.autoSessionTitle??!0;return(0,a.FD)("section",{className:"space-y-3",children:[(0,a.FD)("div",{children:[(0,a.Y)("h4",{className:"text-sm font-semibold text-ink",children:"Session Titles"}),(0,a.Y)("p",{className:"text-[11px] text-ink/60 mt-0.5",children:"How a session gets its display name. A name you set yourself is never replaced."})]}),(0,a.Y)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:G.map(e=>{let{enabled:t,label:o,badge:l,icon:s,description:d,note:c}=e,p=n===t,u=()=>i({autoSessionTitle:t});return(0,a.FD)("div",{onClick:u,role:"button",tabIndex:0,onKeyDown:e=>"Enter"===e.key&&u(),className:`p-3.5 rounded-lg border text-left transition-all cursor-pointer flex flex-col justify-between select-none ${p?"border-ink bg-ink/5 ring-1 ring-ink/20 shadow-xs":"border-ink/15 bg-paper hover:border-ink/30 hover:bg-ink/[0.02]"}`,children:[(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)("div",{className:`w-7 h-7 rounded-md flex items-center justify-center ${p?"bg-ink text-paper":"bg-ink/5 text-ink/70"}`,children:(0,a.Y)(s,{size:15})}),(0,a.Y)("span",{className:"font-semibold text-xs text-ink",children:o})]}),(0,a.Y)("span",{className:"text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-ink/10 text-ink/70 font-medium",children:l})]}),(0,a.Y)("p",{className:"text-[11px] text-ink/70 leading-relaxed",children:d})]}),(0,a.FD)("div",{className:"mt-3 pt-2.5 border-t border-ink/10 flex items-center justify-between text-[11px]",children:[(0,a.Y)("span",{className:"text-ink/50",children:c}),p&&(0,a.FD)("span",{className:"flex items-center gap-1 text-ink font-medium",children:[(0,a.Y)(r.A,{size:12})," Active"]})]})]},o)})})]})}var W=i("XT"),V=i("zH");let X=[{id:"websocket",label:"WebSocket",badge:"Default",icon:W.A,description:"One duplex socket carries every agent frame — no per-event HTTP framing, protocol-level ping keepalive, and capped client backoff on drops.",note:"Lowest overhead per frame"},{id:"sse",label:"Server-Sent Events",badge:"Fallback",icon:V.A,description:"Long-lived HTTP response stream with automatic browser reconnection. Pick this when a proxy or network blocks the WebSocket upgrade.",note:"Works through HTTP-only proxies"}];function Q(e){let{settings:t,onUpdate:i}=e,n=t.streamTransport??"websocket";return(0,a.FD)("section",{className:"space-y-3",children:[(0,a.FD)("div",{children:[(0,a.Y)("h4",{className:"text-sm font-semibold text-ink",children:"Streaming Transport"}),(0,a.Y)("p",{className:"text-[11px] text-ink/60 mt-0.5",children:"Wire protocol for live agent events. Applies to the next connection — reconnect or send a new prompt to switch."})]}),(0,a.Y)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:X.map(e=>{let{id:t,label:o,badge:l,icon:s,description:d,note:c}=e,p=n===t,u=()=>i({streamTransport:t});return(0,a.FD)("div",{onClick:u,role:"button",tabIndex:0,onKeyDown:e=>"Enter"===e.key&&u(),className:`p-3.5 rounded-lg border text-left transition-all cursor-pointer flex flex-col justify-between select-none ${p?"border-ink bg-ink/5 ring-1 ring-ink/20 shadow-xs":"border-ink/15 bg-paper hover:border-ink/30 hover:bg-ink/[0.02]"}`,children:[(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)("div",{className:`w-7 h-7 rounded-md flex items-center justify-center ${p?"bg-ink text-paper":"bg-ink/5 text-ink/70"}`,children:(0,a.Y)(s,{size:15})}),(0,a.Y)("span",{className:"font-semibold text-xs text-ink",children:o})]}),(0,a.Y)("span",{className:"text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-ink/10 text-ink/70 font-medium",children:l})]}),(0,a.Y)("p",{className:"text-[11px] text-ink/65 leading-relaxed",children:d})]}),(0,a.FD)("div",{className:"mt-3 pt-2.5 border-t border-ink/10 flex items-center justify-between text-[11px]",children:[(0,a.Y)("span",{className:"text-ink/50 text-[10px]",children:c}),(0,a.Y)("div",{className:`w-4 h-4 rounded-full border flex items-center justify-center ${p?"border-ink bg-ink text-paper":"border-ink/30 bg-transparent"}`,children:p&&(0,a.Y)(r.A,{size:10,strokeWidth:3})})]})]},t)})})]})}function Z(e){let{settings:t,onUpdate:i}=e;return(0,a.FD)("div",{className:"w-full space-y-7 text-xs text-ink",children:[(0,a.Y)(Q,{settings:t,onUpdate:i}),(0,a.Y)(H,{settings:t,onUpdate:i}),(0,a.Y)(U,{settings:t,onUpdate:i}),(0,a.Y)(_,{settings:t,onUpdate:i})]})}var ee=i("g6"),et=i("AB"),ei=i("h"),ea=i("al"),en=i("nv"),eo=i("nT"),el=i("w"),er=i("Oj"),es=i("Gh"),ed=i("R"),ec=i("DK"),ep=i("f"),eu=i("z9"),em=i("Fx"),eb=i("F9"),eh=i("bt"),ef=i("by"),eg=i("r");let ev={default:ee.A,code:et.A,terminal:A.A,rocket:ei.A,flask:ea.A,gamepad:en.A,briefcase:eo.A,home:el.A,globe:er.A,leaf:es.A,shield:ed.A,palette:m.A,server:ec.A,smartphone:ep.A,database:eu.A,lightbulb:em.A,music:eb.A,camera:eh.A,book:C.A,heart:ef.A};function ex(e){let{projects:t,selectedProjectId:i,onSelectProject:n,onAddProject:o}=e;return(0,a.FD)("div",{className:"w-56 sm:w-64 border-r border-ink/10 h-full flex flex-col bg-paper/50 flex-shrink-0",children:[(0,a.FD)("div",{className:"px-3.5 py-3 border-b border-ink/10 flex items-center justify-between",children:[(0,a.FD)("span",{className:"text-xs font-semibold text-ink",children:["Total ",t.length]}),(0,a.Y)("button",{type:"button",onClick:o,title:"Add New Project",className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(eg.A,{size:15,strokeWidth:2.2})})]}),(0,a.Y)("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static p-1.5 space-y-0.5",children:t.map(e=>{let t=e.id===i,o=ev[e.icon]||ee.A;return(0,a.FD)("button",{type:"button",onClick:()=>n(e.id),className:`w-full flex items-center gap-2 px-2.5 py-1.5 rounded-md text-left transition-colors cursor-pointer group ${t?"bg-ink/10 text-ink font-medium shadow-2xs":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[e.customIconUrl?(0,a.Y)("img",{src:e.customIconUrl,alt:"",className:"w-3.5 h-3.5 rounded-xs object-contain flex-shrink-0",referrerPolicy:"no-referrer"}):(0,a.Y)(o,{size:14,className:"flex-shrink-0",style:{color:e.accentColor||"currentColor"}}),(0,a.Y)("span",{className:"text-[11.5px] truncate flex-1",children:e.name})]},e.id)})})]})}var ek=i("mO");function ey(e){let{project:t,canDelete:i,onDelete:n}=e;return(0,a.FD)("div",{className:"flex items-start justify-between gap-4 pb-4 border-b border-ink/10",children:[(0,a.FD)("div",{className:"min-w-0 flex-1",children:[(0,a.Y)("h2",{className:"text-xl font-bold tracking-tight text-ink truncate",children:t.name}),(0,a.Y)("p",{className:"text-[11px] font-mono text-ink/50 truncate mt-0.5 select-all",children:t.path})]}),i&&(0,a.Y)("button",{type:"button",onClick:n,title:"Delete Project",className:"p-1.5 text-ink/40 hover:text-error hover:bg-error/10 rounded-md transition-colors cursor-pointer",children:(0,a.Y)(ek.A,{size:15})})]})}function ew(e){let{name:t,onChangeName:i}=e;return(0,a.FD)("div",{className:"space-y-2",children:[(0,a.Y)("label",{htmlFor:"project-name-input",className:"block text-xs font-semibold text-ink",children:"Project Name"}),(0,a.Y)("input",{id:"project-name-input",type:"text",value:t,onChange:e=>i(e.currentTarget.value),placeholder:"Enter project name...",className:"w-full bg-paper border border-ink/20 rounded-md px-3 py-2 text-xs font-medium text-ink outline-none focus:border-ink/60 transition-colors shadow-2xs"})]})}var eN=i("wU"),eA=i("Go"),eY=i("oj");let eS=["Not selected","DeepSeek-V3","DeepSeek-R1","Claude 3.5 Sonnet","Claude 3.7 Sonnet","GPT-4o","Gemini 2.5 Pro"];function eC(e){let{model:t,onSelectModel:i,models:o=eS}=e,l=o&&o.length>0?o:eS,[s,d]=(0,n.J0)(!1),[c,p]=(0,n.J0)(!1),u=(0,n.li)(null);return(0,eY.W)(u,()=>d(!1)),(0,a.FD)("div",{className:"space-y-2.5",children:[(0,a.FD)("div",{className:"flex items-center gap-1.5 relative",children:[(0,a.Y)("h4",{className:"text-xs font-semibold text-ink",children:"Defaults for new chats"}),(0,a.FD)("div",{className:"relative inline-block cursor-help",onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[(0,a.Y)(eN.A,{size:12,className:"text-ink/40 hover:text-ink/70 transition-colors"}),c&&(0,a.Y)("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 bg-ink text-canvas text-[10px] rounded px-2 py-1 shadow-lg whitespace-nowrap z-50 pointer-events-none",children:"Default model assigned when starting new sessions in this project"})]})]}),(0,a.FD)("div",{className:"flex items-center justify-between gap-4 p-3 bg-paper border border-ink/15 rounded-lg",children:[(0,a.FD)("div",{children:[(0,a.Y)("div",{className:"text-xs font-medium text-ink",children:"Project Model"}),(0,a.Y)("div",{className:"text-[11px] text-ink/50",children:"Fallback model for agent sessions"})]}),(0,a.FD)("div",{className:"relative",ref:u,children:[(0,a.FD)("button",{type:"button",onClick:()=>d(!s),className:"flex items-center gap-2 px-3 py-1.5 rounded-md border border-ink/20 hover:border-ink/40 bg-paper text-ink text-xs font-medium transition-colors cursor-pointer shadow-2xs",children:[(0,a.Y)(q.A,{size:13,className:"text-ink/70"}),(0,a.Y)("span",{children:t||"Not selected"}),(0,a.Y)(eA.A,{size:13,className:"text-ink/50 ml-1"})]}),s&&(0,a.Y)("div",{className:"absolute right-0 mt-1 w-52 bg-paper border border-ink/15 rounded-lg shadow-xl py-1 z-50 max-h-56 scrollbar-overlay-container scrollbar-overlay-static",children:l.map(e=>(0,a.FD)("button",{type:"button",onClick:()=>{i(e),d(!1)},className:"w-full flex items-center justify-between px-3 py-1.5 text-left text-xs hover:bg-ink/5 transition-colors cursor-pointer",children:[(0,a.Y)("span",{className:e===t?"font-semibold text-ink":"text-ink/80",children:e}),e===t&&(0,a.Y)(r.A,{size:13,className:"text-ink"})]},e))})]})]})]})}let eD=[{label:"None",value:"",bgHex:"transparent"},{label:"Sky Blue",value:"#38bdf8",bgHex:"#38bdf8"},{label:"Light Green",value:"#a3e635",bgHex:"#a3e635"},{label:"Coral",value:"#f87171",bgHex:"#f87171"},{label:"Amber",value:"#fbbf24",bgHex:"#fbbf24"},{label:"Teal",value:"#2dd4bf",bgHex:"#2dd4bf"},{label:"Slate",value:"#94a3b8",bgHex:"#94a3b8"},{label:"Rose",value:"#f43f5e",bgHex:"#f43f5e"},{label:"Vivid Blue",value:"#3b82f6",bgHex:"#3b82f6"},{label:"Lime Green",value:"#84cc16",bgHex:"#84cc16"}];function eF(e){let{accentColor:t,onSelectColor:i,options:n=eD}=e,o=n&&n.length>0?n:eD;return(0,a.FD)("div",{className:"space-y-2.5",children:[(0,a.Y)("h4",{className:"text-xs font-semibold text-ink",children:"Accent Color"}),(0,a.Y)("div",{className:"flex flex-wrap items-center gap-2.5",children:o.map(e=>{let n=t===e.value;return""===e.value?(0,a.Y)("button",{type:"button",onClick:()=>i(""),title:"Default / No Accent",className:`w-7 h-7 rounded-full border flex items-center justify-center transition-all cursor-pointer ${n?"border-ink bg-ink/10 ring-2 ring-ink/30 ring-offset-2 ring-offset-paper":"border-ink/25 bg-paper hover:border-ink/50 text-ink/60"}`,children:(0,a.Y)(l.A,{size:12,strokeWidth:2.2})},"none"):(0,a.Y)("button",{type:"button",onClick:()=>i(e.value),title:e.label,style:{backgroundColor:e.bgHex},className:`w-7 h-7 rounded-full transition-all cursor-pointer shadow-2xs ${n?"ring-2 ring-ink ring-offset-2 ring-offset-paper scale-105":"hover:scale-105 opacity-90 hover:opacity-100"}`},e.value)})})]})}var eT=i("ke");let eM=[{id:"default",label:"Default Folder",icon:l.A},{id:"code",label:"Code",icon:et.A},{id:"terminal",label:"Terminal",icon:A.A},{id:"rocket",label:"Rocket",icon:ei.A},{id:"flask",label:"Flask",icon:ea.A},{id:"gamepad",label:"Gamepad",icon:en.A},{id:"briefcase",label:"Briefcase",icon:eo.A},{id:"home",label:"Home",icon:el.A},{id:"globe",label:"Globe",icon:er.A},{id:"leaf",label:"Leaf",icon:es.A},{id:"shield",label:"Shield",icon:ed.A},{id:"palette",label:"Palette",icon:m.A},{id:"server",label:"Server",icon:ec.A},{id:"smartphone",label:"Smartphone",icon:ep.A},{id:"database",label:"Database",icon:eu.A},{id:"lightbulb",label:"Lightbulb",icon:em.A},{id:"music",label:"Music",icon:eb.A},{id:"camera",label:"Camera",icon:eh.A},{id:"book",label:"Book",icon:C.A},{id:"heart",label:"Heart",icon:ef.A}];function eP(e){let{currentIcon:t,customIconUrl:i,projectName:o,onSelectIcon:l,onSetCustomIcon:r}=e,s=(0,n.li)(null);return(0,a.FD)("div",{className:"space-y-3",children:[(0,a.FD)("div",{className:"flex items-center justify-between",children:[(0,a.Y)("h4",{className:"text-xs font-semibold text-ink",children:"Project Icon"}),i&&(0,a.Y)("button",{type:"button",onClick:()=>r(void 0),className:"text-[11px] text-ink/50 hover:text-error transition-colors cursor-pointer",children:"Reset to standard icon"})]}),(0,a.Y)("div",{className:"flex flex-wrap gap-2",children:eM.map(e=>{let n=!i&&t===e.id,o=e.icon;return(0,a.Y)("button",{type:"button",onClick:()=>{r(void 0),l(e.id)},title:e.label,className:`w-7 h-7 rounded-md flex items-center justify-center transition-all cursor-pointer ${n?"border border-ink/40 bg-ink/5 text-ink shadow-2xs":"text-ink/60 hover:text-ink hover:bg-ink/5"}`,children:(0,a.Y)(o,{size:14,strokeWidth:1.8})},e.id)})}),(0,a.FD)("div",{className:"flex items-center gap-2 pt-1",children:[(0,a.Y)("input",{type:"file",ref:s,onChange:e=>{let t=e.currentTarget.files?.[0];if(!t)return;let i=new FileReader;i.onload=e=>{let t=e.target?.result;t&&(r(t),l("custom"))},i.readAsDataURL(t),e.currentTarget.value=""},accept:"image/*",className:"hidden"}),(0,a.FD)("button",{type:"button",onClick:()=>s.current?.click(),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md border border-ink/20 hover:border-ink/40 bg-paper text-ink text-xs font-medium transition-colors cursor-pointer shadow-2xs",children:[(0,a.Y)(eT.A,{size:13,className:"text-ink/60"}),(0,a.Y)("span",{children:"upload icon"})]}),(0,a.FD)("button",{type:"button",onClick:()=>{let e=o.toLowerCase().replace(/[^a-z0-9]/g,"")||"app";r(`https://api.dicebear.com/7.x/identicon/svg?seed=${e}&radius=50`),l("custom")},className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md border border-ink/20 hover:border-ink/40 bg-paper text-ink text-xs font-medium transition-colors cursor-pointer shadow-2xs",children:[(0,a.Y)(z,{size:13,className:"text-ink/60"}),(0,a.Y)("span",{children:"discover favicon"})]}),i&&(0,a.FD)("div",{className:"flex items-center gap-2 ml-2 pl-2 border-l border-ink/10",children:[(0,a.Y)("img",{src:i,alt:"Custom icon",className:"w-5 h-5 rounded-xs object-contain border border-ink/15",referrerPolicy:"no-referrer"}),(0,a.Y)("span",{className:"text-[11px] text-ink/60",children:"Custom active"})]})]})]})}function eI(e){let{project:t,canDelete:i,onUpdateField:n,onDeleteProject:o,availableModels:l,accentColorOptions:r}=e;return(0,a.FD)("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static p-6 md:p-8 space-y-7",children:[(0,a.Y)(ey,{project:t,canDelete:i,onDelete:o}),(0,a.Y)(ew,{name:t.name,onChangeName:e=>{if(n("name",e),t.path.endsWith(t.name)){let i=t.path.slice(0,-t.name.length);n("path",`${i}${e}`)}}}),(0,a.Y)(eC,{model:t.model,onSelectModel:e=>n("model",e),models:l}),(0,a.Y)(eF,{accentColor:t.accentColor,onSelectColor:e=>n("accentColor",e),options:r}),(0,a.Y)(eP,{currentIcon:t.icon,customIconUrl:t.customIconUrl,projectName:t.name,onSelectIcon:e=>n("icon",e),onSetCustomIcon:e=>n("customIconUrl",e)})]})}let eR={full:"flex h-full w-full items-center justify-center text-xs text-ink/40",fill:"flex-1 flex items-center justify-center text-xs text-ink/40"},eE=e=>{let{variant:t="full",children:i}=e;return(0,a.Y)("div",{className:eR[t],children:i})};function eL(){let[e,t]=(0,n.J0)([]),[i,o]=(0,n.J0)([]),[l,r]=(0,n.J0)([]),[s,d]=(0,n.J0)("proj-workspace"),[c,p]=(0,n.J0)(!0);(0,n.vJ)(()=>{let e=!0;return(async()=>{try{let i=await fetch("/api/settings/projects"),a=await i.json();if(!e)return;Array.isArray(a?.projects)&&(t(a.projects),d(e=>a.projects.some(t=>t.id===e)?e:a.projects[0]?.id||"")),Array.isArray(a?.availableModels)&&o(a.availableModels),Array.isArray(a?.accentColorOptions)&&r(a.accentColorOptions)}catch(e){console.error("Failed to load projects from API:",e)}finally{e&&p(!1)}})(),()=>{e=!1}},[]);let m=async(e,t,i)=>{if(void 0!==e.folderId)try{let a=await fetch("/api/settings/projects",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({project:{folderId:e.folderId,[t]:void 0===i?null:i}})});if(!a.ok)throw Error(`HTTP ${a.status}`);window.dispatchEvent(new CustomEvent("omp:workspace-updated",{detail:{folderId:e.folderId}}))}catch(e){console.error("Failed to save project settings:",e)}},b=e.find(e=>e.id===s)||e[0],h=async()=>{let i=`Project ${e.length+1}`;try{let e=await fetch("/api/folders",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i})}),a=await e.json();if(!e.ok||!a?.success)throw Error(a?.error||`HTTP ${e.status}`);let n=a.folder?.id;if("number"!=typeof n)throw Error("Created workspace has no folder id");let o={id:`folder-${n}`,folderId:n,name:a.folder.name,path:a.folder.project_path||"",model:"Not selected",accentColor:"",icon:"default",isPinned:!1,isExpanded:!0};t(e=>[...e,o]),d(o.id),window.dispatchEvent(new CustomEvent("omp:workspace-updated",{detail:{folderId:n}}))}catch(e){console.error("Failed to add project:",e)}},f=async()=>{if(!(e.length<=1))try{let i=await fetch(`/api/settings/projects?id=${encodeURIComponent(s)}`,{method:"DELETE"});if(!i.ok)throw Error(`HTTP ${i.status}`);let a=e.filter(e=>e.id!==s);t(a),d(a[0]?.id||""),window.dispatchEvent(new CustomEvent("omp:workspace-updated"))}catch(e){console.error("Failed to delete project:",e)}};return((0,u.sY)("omp:workspace-updated",()=>{fetch("/api/settings/projects").then(e=>e.json()).then(e=>{Array.isArray(e?.projects)&&(t(e.projects),d(t=>e.projects.some(e=>e.id===t)?t:e.projects[0]?.id||""))}).catch(e=>{console.error("Failed to refresh projects:",e)})}),c)?(0,a.Y)(eE,{children:"Loading projects from database..."}):(0,a.FD)("div",{className:"w-full h-full flex flex-col md:flex-row overflow-hidden bg-paper text-ink",children:[(0,a.Y)(ex,{projects:e,selectedProjectId:b?.id||"",onSelectProject:d,onAddProject:h}),b&&(0,a.Y)(eI,{project:b,canDelete:e.length>1,onUpdateField:(e,i)=>{b&&(t(t=>t.map(t=>t.id===b.id?{...t,[e]:i}:t)),m(b,e,i))},onDeleteProject:f,availableModels:i,accentColorOptions:l})]})}var eO=i("wu");Array.from({length:41},(e,t)=>{let i=["Command Code Qwen-2.5-Coder-32B-Instruct","Command Code DeepSeek-Coder-V2-0724","Command Code Claude-3.5-Haiku-Fast","Command Code GLM-4-9B-Chat","Command Code Mistral-Codestral-22B","Command Code Llama-3.3-70B-Instruct","Command Code StarCoder-2-15B","Command Code CodeGemma-7B-IT","Command Code Yi-Coder-9B","Command Code DeepSeek-V3-Base","Command Code OpenAI-GPT-4o-Mini","Command Code Gemini-2.5-Flash-Code"],a=t<i.length?i[t]:`Command Code Custom Model-${t+1}`;return{id:`cc-model-${t+1}`,name:a,contextWindow:t%2==0?"1M ctx · 128K out":"128K ctx · 16K out",hasTools:!0,hasVision:t%3==0,hasReasoning:t%4==0,isVisible:!0,temperature:.6,maxTokens:64e3}});let ej=[{id:"openai",name:"OpenAI",slug:"openai",icon:"openai",defaultUrl:"https://api.openai.com/v1"},{id:"anthropic",name:"Anthropic",slug:"anthropic",icon:"claude",defaultUrl:"https://api.anthropic.com/v1"},{id:"google",name:"Google Gemini",slug:"google",icon:"gemini",defaultUrl:"https://generativelanguage.googleapis.com/v1beta"},{id:"groq",name:"Groq Cloud",slug:"groq",icon:"groq",defaultUrl:"https://api.groq.com/openai/v1"},{id:"mistral",name:"Mistral AI",slug:"mistral",icon:"mistral",defaultUrl:"https://api.mistral.ai/v1"},{id:"ollama",name:"Ollama (Local)",slug:"ollama",icon:"ollama",defaultUrl:"http://localhost:11434/v1"},{id:"custom",name:"Custom OpenAI-Compatible",slug:"custom",icon:"custom",defaultUrl:"https://"}];var ez=i("W9");async function eU(e,t,i){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{let n=await fetch("/api/settings/provider-models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:e,apiKey:t,providerSlug:i,persistToOmp:a})}),o=await n.json();if(!n.ok)return{ok:!1,error:o?.error||`Request failed (HTTP ${n.status})`};return o}catch(e){return{ok:!1,error:e instanceof Error?e.message:"Network error while fetching models"}}}async function eB(e,t){try{await Promise.all(t.map(t=>fetch("/api/models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({actionType:"addModel",model:{id:t.id,name:t.name,provider:e,contextWindow:t.contextWindow?.split(" ")[0]||"128K",thinkingLevel:"Default",capabilities:["Tool calling","Reasoning"],inputFormats:["text"],outputFormats:["text"]}})}))),(0,ez.$P)()}catch(e){console.error("Failed to sync provider models to catalog:",e)}}let eK=/^model-\d+-(?:1|2)$/;async function e$(e){let t=await fetch("/api/settings/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),i=await t.json();if(!t.ok)throw Error(i?.error||`Providers request failed (HTTP ${t.status})`);return(0,ez.$P)(),Array.isArray(i.providers)?i.providers:null}var e_=i("oZ");let eq=(0,v.A)({name:"network",size:24,node:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]}),eJ=(0,v.A)({name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]}),eG=(0,v.A)({name:"flame",size:24,node:[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]]});function eH(e){let{icon:t,size:i=16,className:n=""}=e;switch(t){case"deepseek":return(0,a.Y)(q.A,{size:i,className:`text-sky-400 ${n}`});case"agentrouter":return(0,a.Y)(eq,{size:i,className:`text-emerald-400 ${n}`});case"commandcode":return(0,a.Y)(eJ,{size:i,className:`text-amber-400 ${n}`});case"opencode":return(0,a.Y)(W.A,{size:i,className:`text-violet-400 ${n}`});case"claude":return(0,a.Y)(w.A,{size:i,className:`text-orange-400 ${n}`});case"openai":return(0,a.Y)(Y.A,{size:i,className:`text-emerald-400 ${n}`});case"gemini":return(0,a.Y)(q.A,{size:i,className:`text-blue-400 ${n}`});case"groq":return(0,a.Y)(eG,{size:i,className:`text-amber-500 ${n}`});case"ollama":return(0,a.Y)(ec.A,{size:i,className:`text-slate-400 ${n}`});case"mistral":return(0,a.Y)(er.A,{size:i,className:`text-rose-400 ${n}`});default:return(0,a.Y)(y,{size:i,className:`text-ink/60 ${n}`})}}function eW(e){let{providers:t,selectedProviderId:i,onSelectProvider:o,onOpenAddModal:l,projects:s=[{id:"proj-ompchamber",name:"ompchamber"},{id:"proj-workspace",name:"Workspace"},{id:"proj-drrealhandler",name:"drrealhandler"},{id:"proj-opencode-zen",name:"opencode-zen"}],currentProject:d,onSelectProject:c}=e,[p,u]=(0,n.J0)(!1),m=(0,n.li)(null);return(0,eY.W)(m,()=>u(!1)),(0,a.FD)("div",{className:"w-56 sm:w-64 border-r border-ink/10 h-full flex flex-col bg-paper/50 flex-shrink-0",children:[(0,a.FD)("div",{className:"p-3 border-b border-ink/10 relative",ref:m,children:[(0,a.FD)("button",{type:"button",onClick:()=>u(!p),className:"w-full flex items-center justify-between gap-2 px-3 py-1.5 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper text-ink text-xs font-medium transition-colors cursor-pointer shadow-2xs",children:[(0,a.FD)("div",{className:"flex items-center gap-2 truncate",children:[(0,a.Y)(ee.A,{size:14,className:"text-ink/60 flex-shrink-0"}),(0,a.Y)("span",{className:"truncate",children:d})]}),(0,a.Y)(eA.A,{size:14,className:"text-ink/50 flex-shrink-0"})]}),p&&(0,a.Y)("div",{className:"absolute left-3 right-3 mt-1.5 bg-paper border border-ink/15 rounded-lg shadow-xl py-1 z-50 max-h-56 scrollbar-overlay-container scrollbar-overlay",children:s.map(e=>(0,a.FD)("button",{type:"button",onClick:()=>{c(e.name),u(!1)},className:"w-full flex items-center justify-between px-3 py-1.5 text-left text-xs hover:bg-ink/5 transition-colors cursor-pointer",children:[(0,a.Y)("span",{className:e.name===d?"font-semibold text-ink":"text-ink/80",children:e.name}),e.name===d&&(0,a.Y)(r.A,{size:13,className:"text-ink"})]},e.id))})]}),(0,a.FD)("div",{className:"px-3.5 py-2.5 flex items-center justify-between",children:[(0,a.FD)("span",{className:"text-xs font-semibold text-ink/70",children:["Total ",t.length]}),(0,a.Y)("button",{type:"button",onClick:l,title:"Add Provider",className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(eg.A,{size:15,strokeWidth:2.2})})]}),(0,a.Y)("div",{className:"px-3.5 pt-1 pb-1.5",children:(0,a.Y)("span",{className:"text-[10px] font-semibold tracking-wider text-ink/50 uppercase",children:"User Providers"})}),(0,a.Y)("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static p-1.5 space-y-0.5",children:0===t.length?(0,a.Y)("div",{className:"px-2.5 py-4 text-[11px] leading-relaxed text-ink/50",children:"No connected providers yet. Use the plus button above to add one."}):t.map(e=>{let t=e.id===i;return(0,a.FD)("button",{type:"button",onClick:()=>o(e.id),className:`w-full flex items-center justify-between px-2.5 py-2 rounded-md text-left transition-colors cursor-pointer group ${t?"bg-ink/10 text-ink font-medium shadow-2xs":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[(0,a.FD)("div",{className:"flex items-center gap-2.5 min-w-0",children:[(0,a.Y)(eH,{icon:e.icon,size:15,className:"flex-shrink-0"}),(0,a.Y)("span",{className:"text-[12px] truncate",children:e.name})]}),(0,a.Y)("span",{className:`text-[11px] px-1.5 py-0.5 rounded font-mono ${t?"text-ink/90 bg-ink/10":"text-ink/50 group-hover:text-ink/70"}`,children:e.models.length})]},e.id)})})]})}function eV(e){let{provider:t}=e;return(0,a.FD)("div",{className:"flex flex-col gap-1 pb-4",children:[(0,a.FD)("div",{className:"flex items-center gap-2.5",children:[(0,a.Y)(eH,{icon:t.icon,size:22}),(0,a.Y)("h2",{className:"text-xl font-bold tracking-tight text-ink",children:t.name})]}),(0,a.Y)("p",{className:"text-xs font-mono text-ink/50 pl-8",children:t.slug})]})}var eX=i("F"),eQ=i("p");function eZ(e){let{provider:t,onOpenReconnectModal:i,onToggleDisconnect:o,onToggleDisabled:l}=e,[s,d]=(0,n.J0)(!1),c="connected"===t.status,p=!0===t.disabled;return(0,a.FD)("div",{className:"space-y-6",children:[(0,a.FD)("div",{className:"space-y-3",children:[(0,a.Y)("div",{className:"text-xs font-semibold text-ink",children:"Authentication"}),(0,a.FD)("div",{className:"flex items-center justify-between gap-4",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[p?(0,a.FD)(a.FK,{children:[(0,a.Y)(eX.A,{size:15,className:"text-ink/50 flex-shrink-0",strokeWidth:2.4}),(0,a.Y)("span",{className:"text-xs font-medium text-ink/70",children:"Disabled"})]}):c?(0,a.FD)(a.FK,{children:[(0,a.Y)(r.A,{size:15,className:"text-emerald-500 flex-shrink-0",strokeWidth:2.4}),(0,a.Y)("span",{className:"text-xs font-medium text-ink",children:"Connected"})]}):(0,a.FD)(a.FK,{children:[(0,a.Y)(eQ.A,{size:15,className:"text-error flex-shrink-0",strokeWidth:2.4}),(0,a.Y)("span",{className:"text-xs font-medium text-error",children:"Disconnected"})]}),(0,a.FD)("div",{className:"relative inline-block cursor-help ml-0.5",onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[(0,a.Y)(eN.A,{size:13,className:"text-ink/40 hover:text-ink/70 transition-colors"}),s&&(0,a.Y)("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 bg-ink text-canvas text-[10px] rounded px-2.5 py-1.5 shadow-xl whitespace-nowrap z-50 pointer-events-none",children:p?"Provider is disabled — none of its models appear in the chat model list":c?"Endpoint validated and operational for agent inference":"Provider authentication is currently offline or inactive"})]})]}),(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)("button",{type:"button",onClick:l,title:p?"Offer this provider in the model list again":"Remove this provider from the model list",className:"px-3 py-1.5 rounded-md bg-ink/5 hover:bg-ink/10 text-ink text-xs font-medium transition-colors cursor-pointer border border-ink/10",children:p?"enable":"disable"}),(0,a.Y)("button",{type:"button",onClick:i,className:"px-3 py-1.5 rounded-md bg-ink/5 hover:bg-ink/10 text-ink text-xs font-medium transition-colors cursor-pointer border border-ink/10",children:c?"reconnect":"connect"})]})]})]}),(0,a.Y)("div",{className:"border-b border-ink/10"}),(0,a.FD)("div",{className:"space-y-3",children:[(0,a.Y)("div",{className:"text-xs font-semibold text-ink",children:"Connection Details"}),(0,a.FD)("div",{className:"flex items-center justify-between gap-4",children:[(0,a.FD)("div",{className:"text-xs text-ink/70",children:["Configured in: ",(0,a.Y)("span",{className:"font-mono text-ink font-medium",children:t.configuredIn})]}),c?(0,a.Y)("button",{type:"button",onClick:o,className:"text-xs text-error/90 hover:text-error font-medium hover:underline transition-colors cursor-pointer",children:"disconnect"}):(0,a.Y)("span",{className:"text-xs text-ink/40 italic",children:"inactive"})]})]}),(0,a.Y)("div",{className:"border-b border-ink/10"})]})}let e0=(0,v.A)({name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]});var e1=i("W");let e5=(0,v.A)({name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]});var e2=i("bH"),e3=i("Soe"),e4=i("pm"),e6=i("U8");function e8(e){let{models:t,onToggleModelVisibility:i,onHideAll:o,onShowAll:l,onFetchModels:r,canFetchModels:s,isFetchingModels:d,onOpenModelConfig:c,onOpenModelCapabilities:p}=e,[u,m]=(0,n.J0)(""),b=t.filter(e=>e.name.toLowerCase().includes(u.toLowerCase()));return(0,a.FD)("div",{className:"space-y-3.5",children:[(0,a.FD)("div",{className:"flex items-center justify-between gap-4",children:[(0,a.FD)("div",{className:"text-xs font-semibold text-ink",children:["Available Models ",(0,a.FD)("span",{className:"font-normal text-ink/60",children:["(",t.length,")"]})]}),(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.FD)("button",{type:"button",onClick:r,disabled:!s||d,title:s?"Fetch models from provider endpoint":"This provider has no fetchable endpoint",className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded bg-ink text-canvas text-[11px] font-medium hover:opacity-90 transition-opacity cursor-pointer border border-ink disabled:opacity-40 disabled:cursor-not-allowed",children:[(0,a.Y)(F.A,{size:12,className:d?"animate-spin":""}),(0,a.Y)("span",{children:d?"fetching...":"fetch models"})]}),(0,a.Y)("button",{type:"button",onClick:o,className:"px-2.5 py-1 rounded bg-ink/5 hover:bg-ink/10 text-[11px] font-medium text-ink/80 hover:text-ink transition-colors cursor-pointer border border-ink/10",children:"hide all"}),(0,a.Y)("button",{type:"button",onClick:l,className:"px-2.5 py-1 rounded bg-ink/5 hover:bg-ink/10 text-[11px] font-medium text-ink/80 hover:text-ink transition-colors cursor-pointer border border-ink/10",children:"show all"})]})]}),(0,a.FD)("div",{className:"relative flex items-center",children:[(0,a.Y)(D.A,{size:14,className:"absolute left-3 text-ink/40 pointer-events-none"}),(0,a.Y)("input",{type:"text",value:u,onChange:e=>m(e.currentTarget.value),placeholder:"Filter models...",className:"w-full bg-paper border border-ink/15 rounded-lg pl-9 pr-3 py-2 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors shadow-2xs"}),u&&(0,a.Y)("button",{type:"button",onClick:()=>m(""),className:"absolute right-3 text-[11px] text-ink/40 hover:text-ink cursor-pointer",children:"clear"})]}),(0,a.Y)("div",{className:"space-y-1 pt-1",children:0===b.length?(0,a.FD)("div",{className:"py-8 text-center text-xs text-ink/40",children:['No models found matching "',u,'"']}):b.map(e=>(0,a.FD)("div",{className:`flex items-center justify-between gap-3 px-3 py-2.5 rounded-lg hover:bg-ink/5 transition-colors group ${!e.isVisible?"opacity-50":""}`,children:[(0,a.Y)("div",{className:"min-w-0 flex-1",children:(0,a.Y)("span",{className:`text-xs font-medium truncate block ${e.isVisible?"text-ink":"text-ink/60 line-through decoration-ink/40"}`,children:e.name})}),(0,a.FD)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(void 0!==e.priceInput||void 0!==e.priceOutput)&&(0,a.FD)("span",{title:`$${e.priceInput??"?"} in / $${e.priceOutput??"?"} out per 1M tokens`,className:"text-[11px] font-mono px-2 py-0.5 rounded bg-ink/5 text-ink/70 border border-ink/10",children:[(0,e6.$g)(e.priceInput)," / ",(0,e6.$g)(e.priceOutput)]}),e.contextWindow&&(0,a.Y)("span",{className:"text-[11px] font-mono px-2 py-0.5 rounded bg-ink/5 text-ink/70 border border-ink/10",children:(0,e4.F)(e.contextWindow)}),e.hasTools&&(0,a.Y)("button",{type:"button",onClick:()=>p(e),title:"Tool Calling & Steering Capabilities",className:"p-1 rounded text-ink/50 hover:text-ink hover:bg-ink/10 transition-colors cursor-pointer",children:(0,a.Y)(e0,{size:13,strokeWidth:1.8})}),(0,a.Y)("button",{type:"button",onClick:()=>c(e),title:"Configure Model Parameters",className:"p-1 rounded text-ink/50 hover:text-ink hover:bg-ink/10 transition-colors cursor-pointer",children:(0,a.Y)(e1.A,{size:13,strokeWidth:1.8})}),e.hasVision&&(0,a.Y)("div",{title:"Multimodal / Vision inputs enabled",className:"p-1 text-ink/60",children:(0,a.Y)(e5,{size:13,strokeWidth:1.8})}),(0,a.Y)("button",{type:"button",onClick:()=>i(e.id),title:e.isVisible?"Hide model from chat picker":"Show model in chat picker",className:`p-1 rounded transition-colors cursor-pointer ${e.isVisible?"text-ink/60 hover:text-ink hover:bg-ink/10":"text-ink/30 hover:text-ink/70 hover:bg-ink/10"}`,children:e.isVisible?(0,a.Y)(e2.A,{size:14,strokeWidth:1.8}):(0,a.Y)(e3.A,{size:14,strokeWidth:1.8})})]})]},e.id))})]})}var e7=i("oE");let e9=(0,v.A)({name:"cloud-download",size:24,node:[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]],aliases:["download-cloud"]}),te=(0,v.A)({name:"key",size:24,node:[["path",{d:"m2 21 9.6-9.6",key:"9l79m3"}],["path",{d:"m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19",key:"fw8biw"}],["circle",{cx:"15.5",cy:"7.5",r:"5.5",key:"4wxmhb"}]]});function tt(e){let{onClose:t,header:i,children:n,footer:o,form:r,maxWidthClass:s="max-w-md",zClass:d="z-[60]"}=e,c=(0,a.FD)(a.FK,{children:[n,o]});return(0,a.Y)("div",{className:`fixed inset-0 bg-ink/40 backdrop-blur-[2px] ${d} flex items-center justify-center p-4`,onClick:t,children:(0,a.FD)("div",{className:`bg-paper border border-ink/15 rounded-xl shadow-2xl w-full ${s} overflow-hidden text-ink`,onClick:e=>e.stopPropagation(),children:[(0,a.FD)("div",{className:"px-5 py-4 border-b border-ink/10 flex items-center justify-between",children:[i,(0,a.Y)("button",{type:"button",onClick:t,className:"p-1 rounded text-ink/40 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(l.A,{size:16})})]}),r?(0,a.Y)("form",{onSubmit:r.onSubmit,className:r.className,children:c}):c]})})}let ti=/^[a-z0-9][a-z0-9._-]{0,63}$/;function ta(e){let{isOpen:t,onClose:i,onAddProvider:o,presets:l,existingSlugs:s}=e,d=l[0],[c,p]=(0,n.J0)(d?.id||"openai"),[u,m]=(0,n.J0)(d?.name||"OpenAI"),[b,h]=(0,n.J0)(d?.defaultUrl||"https://api.openai.com/v1"),[f,g]=(0,n.J0)(""),[v,x]=(0,n.J0)(!1),k=e=>{p(e.id),m(e.name),h(e.defaultUrl)};if((0,n.vJ)(()=>{!l.find(e=>e.id===c)&&l[0]&&k(l[0])},[l,c]),!t)return null;let y=l.find(e=>e.id===c),w=u.trim(),N=(w&&y&&w===y.name?y.slug:w.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")).toLowerCase(),A=new Set(s.map(e=>e.trim().toLowerCase())),Y=N?ti.test(N)?A.has(N)?`"${N}" is already registered in models.yml — connecting it would overwrite that provider. Pick another name.`:"":"The derived id must start with a letter or digit.":"Enter a provider name to derive an id.",S=async e=>{if(e.preventDefault(),w&&0!==l.length&&!v&&!Y){x(!0);try{let e=Date.now(),t={id:`provider-${e}`,name:w,slug:N,icon:y?.icon||"custom",status:"connected",configuredIn:"auth credentials",baseUrl:b.trim(),apiKey:f.trim()||"sk-custom-••••••••••••••••••••••••",models:[]},a=await eU(b.trim(),f.trim()||void 0,t.slug,!0);a.ok&&a.models?(t.models=a.models,o(t,{fetchedCount:a.models.length})):o(t,{fetchedCount:-1}),i()}finally{x(!1)}}};return(0,a.FD)(tt,{onClose:i,header:(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)(e7.A,{size:16,className:"text-ink/70"}),(0,a.Y)("h3",{className:"text-sm font-semibold text-ink",children:"Add Model Provider"})]}),form:{onSubmit:S,className:"p-5 space-y-4"},footer:(0,a.FD)("div",{className:"pt-2 flex items-center justify-end gap-2 border-t border-ink/10",children:[(0,a.Y)("button",{type:"button",onClick:i,className:"px-3.5 py-1.5 rounded-md border border-ink/20 text-xs font-medium text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:"Cancel"}),(0,a.Y)("button",{type:"submit",disabled:v||0===l.length||!!Y,className:"px-3.5 py-1.5 rounded-md bg-ink text-canvas text-xs font-medium hover:opacity-90 transition-opacity cursor-pointer disabled:opacity-50 flex items-center gap-1.5",children:v?(0,a.FD)(a.FK,{children:[(0,a.Y)(e9,{size:14,className:"animate-pulse"}),(0,a.Y)("span",{children:"Fetching models..."})]}):(0,a.FD)(a.FK,{children:[(0,a.Y)(r.A,{size:14}),(0,a.Y)("span",{children:"Connect Provider"})]})})]}),children:[(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink mb-1.5",children:"Provider Preset"}),(0,a.FD)("div",{className:"grid grid-cols-2 gap-2 max-h-36 scrollbar-overlay-container scrollbar-overlay-static pr-1",children:[0===l.length&&(0,a.Y)("p",{className:"col-span-2 px-2 py-3 text-xs text-ink/50",children:"All known provider types are already connected."}),l.map(e=>{let t=e.id===c;return(0,a.FD)("button",{type:"button",onClick:()=>k(e),className:`flex items-center gap-2 p-2 rounded-lg border text-left text-xs transition-colors cursor-pointer ${t?"border-ink/50 bg-ink/5 font-semibold text-ink shadow-2xs":"border-ink/15 hover:border-ink/30 text-ink/70"}`,children:[(0,a.Y)(eH,{icon:e.icon,size:14}),(0,a.Y)("span",{className:"truncate",children:e.name})]},e.id)})]})]}),(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink mb-1",children:"Display Name"}),(0,a.Y)("input",{type:"text",required:!0,value:u,onChange:e=>m(e.currentTarget.value),placeholder:"e.g. My Provider",className:"w-full bg-paper border border-ink/20 rounded-md px-3 py-1.5 text-xs text-ink outline-none focus:border-ink/60"}),N&&(0,a.FD)("p",{className:"text-[10px] text-ink/40 mt-1 font-mono",children:["models.yml id: ",N]}),Y&&(0,a.Y)("p",{className:"text-[11px] text-error mt-1",children:Y})]}),(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink mb-1",children:"API Base URL"}),(0,a.FD)("div",{className:"relative flex items-center",children:[(0,a.Y)(er.A,{size:13,className:"absolute left-2.5 text-ink/40 pointer-events-none"}),(0,a.Y)("input",{type:"text",required:!0,value:b,onChange:e=>h(e.currentTarget.value),placeholder:"https://api.domain.com/v1",className:"w-full bg-paper border border-ink/20 rounded-md pl-8 pr-3 py-1.5 text-xs text-ink outline-none focus:border-ink/60 font-mono"})]})]}),(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink mb-1",children:"API Key (stored securely)"}),(0,a.FD)("div",{className:"relative flex items-center",children:[(0,a.Y)(te,{size:13,className:"absolute left-2.5 text-ink/40 pointer-events-none"}),(0,a.Y)("input",{type:"password",value:f,onChange:e=>g(e.currentTarget.value),placeholder:"sk-••••••••••••••••",className:"w-full bg-paper border border-ink/20 rounded-md pl-8 pr-3 py-1.5 text-xs text-ink outline-none focus:border-ink/60 font-mono"})]})]})]})}var tn=i("m");function to(e){let{isOpen:t,provider:i,isFetchingModels:o,onClose:l,onReconnect:r,onFetchModels:s}=e,[d,c]=(0,n.J0)(i.apiKey||"sk-••••••••••••••••••••••••"),[p,u]=(0,n.J0)(i.baseUrl||"https://api.openai.com/v1"),[m,b]=(0,n.J0)(!1),[h,f]=(0,n.J0)(null);if(!t)return null;let g={apiKey:d.includes("••••")?void 0:d,baseUrl:p},v=async()=>{b(!0),f(null);let e=await eU(p,g.apiKey);b(!1),f(e.ok?"success":"failed")},x=async e=>{e.preventDefault(),r({apiKey:d,baseUrl:p,status:"connected"}),await s(g),l()};return(0,a.FD)(tt,{onClose:l,header:(0,a.FD)("div",{className:"flex items-center gap-2.5",children:[(0,a.Y)(eH,{icon:i.icon,size:18}),(0,a.FD)("div",{children:[(0,a.Y)("h3",{className:"text-sm font-semibold text-ink",children:"Authentication & Credentials"}),(0,a.Y)("p",{className:"text-[11px] text-ink/50 font-mono",children:i.slug})]})]}),form:{onSubmit:x,className:"p-5 space-y-4"},footer:(0,a.FD)("div",{className:"pt-3 flex items-center justify-end gap-2 border-t border-ink/10",children:[(0,a.Y)("button",{type:"button",onClick:l,className:"px-3.5 py-1.5 rounded-md border border-ink/20 text-xs font-medium text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:"Cancel"}),(0,a.FD)("button",{type:"submit",disabled:o,className:"px-3.5 py-1.5 rounded-md bg-ink text-canvas text-xs font-medium hover:opacity-90 transition-opacity cursor-pointer disabled:opacity-50 flex items-center gap-1.5",children:[(0,a.Y)(F.A,{size:13,className:o?"animate-spin":""}),(0,a.Y)("span",{children:o?"Fetching models...":"Save & Reconnect"})]})]}),children:[(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink mb-1",children:"Endpoint URL"}),(0,a.FD)("div",{className:"relative flex items-center",children:[(0,a.Y)(er.A,{size:13,className:"absolute left-2.5 text-ink/40 pointer-events-none"}),(0,a.Y)("input",{type:"text",value:p,onChange:e=>u(e.currentTarget.value),className:"w-full bg-paper border border-ink/20 rounded-md pl-8 pr-3 py-1.5 text-xs text-ink outline-none focus:border-ink/60 font-mono"})]})]}),(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink mb-1",children:"API Key / Auth Token"}),(0,a.FD)("div",{className:"relative flex items-center",children:[(0,a.Y)(te,{size:13,className:"absolute left-2.5 text-ink/40 pointer-events-none"}),(0,a.Y)("input",{type:"text",value:d,onChange:e=>c(e.currentTarget.value),className:"w-full bg-paper border border-ink/20 rounded-md pl-8 pr-3 py-1.5 text-xs text-ink outline-none focus:border-ink/60 font-mono"})]})]}),(0,a.FD)("div",{className:"flex items-center justify-between pt-1",children:[(0,a.FD)("button",{type:"button",disabled:m||o,onClick:v,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md border border-ink/20 hover:border-ink/40 text-xs font-medium text-ink transition-colors cursor-pointer bg-ink/5 disabled:opacity-50",children:[(0,a.Y)(F.A,{size:13,className:m?"animate-spin":""}),(0,a.Y)("span",{children:m?"Testing endpoint...":"Test Connection"})]}),"success"===h&&(0,a.FD)("span",{className:"inline-flex items-center gap-1 text-xs text-emerald-500 font-medium",children:[(0,a.Y)(tn.A,{size:13}),(0,a.Y)("span",{children:"Models endpoint reachable"})]}),"failed"===h&&(0,a.FD)("span",{className:"inline-flex items-center gap-1 text-xs text-error font-medium",children:[(0,a.Y)(eQ.A,{size:13}),(0,a.Y)("span",{children:"Connection failed"})]})]}),(0,a.FD)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-md bg-ink/5 border border-ink/10 text-[11px] text-ink/60",children:[(0,a.Y)(e9,{size:13,className:"mt-0.5 flex-shrink-0 text-ink/50"}),(0,a.Y)("span",{children:"On save, models are fetched from the endpoint and merged into the list below — existing models are kept, only new ones are added."})]})]})}var tl=i("t");function tr(e){let{isOpen:t,provider:i,onClose:o,onAuthenticated:l}=e,[r,s]=(0,n.J0)("connecting"),[d,c]=(0,n.J0)(null),[p,u]=(0,n.J0)(null),[m,b]=(0,n.J0)(null),[h,f]=(0,n.J0)(""),[g,v]=(0,n.J0)(null),x=(0,n.li)(null),k=(0,n.li)(l);k.current=l,(0,n.vJ)(()=>{if(!t)return;s("connecting"),c(null),u(null),b(null),v(null),f("");let e=new AbortController,a=t=>{fetch("/api/omp/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),signal:e.signal}).catch(()=>{})};return x.current=a,fetch("/api/omp/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerId:i.slug}),signal:e.signal}).then(async t=>{if(!t.body)throw Error("Streaming not supported");let i=t.body.getReader(),n=new TextDecoder,o="";for(;;){let{done:t,value:l}=await i.read();if(t)break;let r=(o+=n.decode(l,{stream:!0})).split("\n\n");for(let t of(o=r.pop()??"",r)){let i=t.split("\n").find(e=>e.startsWith("data: "));if(i)try{let t=JSON.parse(i.slice(6));if("extension_ui_request"===t.type)s("waiting"),"open_url"===t.method&&t.launchUrl?(c(t.launchUrl),window.open(t.launchUrl,"_blank","noopener")):"input"===t.method?u(t):"notify"===t.method?(b(t.title??""),t.title&&a({id:t.id,accepted:!0})):a({id:t.id,cancelled:!0});else if("login_result"===t.type){s(t.success?"success":"failed"),t.success||v(t.error??"Login failed"),t.success&&k.current(),e.abort();return}}catch{}}}}).catch(t=>{e.signal.aborted||(s("failed"),v(t instanceof Error?t.message:String(t)))}),()=>{e.abort(),x.current=null}},[t,i.slug]);let y=e=>{p&&(x.current?.(e?{id:p.id,cancelled:!0}:{id:p.id,value:h}),u(null),s("connecting"))};return t?(0,a.Y)(tt,{onClose:o,header:(0,a.FD)("div",{className:"flex items-center gap-2.5",children:[(0,a.Y)(eH,{icon:i.icon,size:18}),(0,a.FD)("div",{children:[(0,a.FD)("h3",{className:"text-sm font-semibold text-ink",children:["Sign in to ",i.name]}),(0,a.Y)("p",{className:"text-[11px] text-ink/50 font-mono",children:i.slug})]})]}),footer:(0,a.Y)("div",{className:"px-5 py-3 border-t border-ink/10 flex justify-end",children:(0,a.Y)("button",{type:"button",onClick:o,className:"px-3.5 py-1.5 rounded-md border border-ink/20 text-xs font-medium text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:"success"===r?"Done":"Close"})}),children:(0,a.FD)("div",{className:"p-5 space-y-4",children:["connecting"===r&&(0,a.FD)("div",{className:"flex items-center gap-2.5 text-xs text-ink/70",children:[(0,a.Y)(tl.A,{size:14,className:"animate-spin"}),"Starting login flow..."]}),"waiting"===r&&(0,a.FD)("div",{className:"space-y-4",children:[d&&(0,a.FD)("div",{className:"space-y-2",children:[(0,a.FD)("div",{className:"flex items-center gap-2 text-xs font-semibold text-ink",children:[(0,a.Y)(er.A,{size:13,className:"text-ink/50"})," OAuth browser"]}),(0,a.Y)("p",{className:"text-xs text-ink/60",children:"Complete the sign-in in the opened browser tab."}),(0,a.Y)("button",{type:"button",onClick:()=>window.open(d,"_blank","noopener"),className:"text-xs text-ink underline underline-offset-2 break-all text-left",children:d})]}),p&&(0,a.FD)("div",{className:"space-y-2",children:[(0,a.FD)("div",{className:"flex items-center gap-2 text-xs font-semibold text-ink",children:[(0,a.Y)(te,{size:13,className:"text-ink/50"})," ",p.title??"Credential"]}),(0,a.Y)("input",{type:"text",autoFocus:!0,value:h,onChange:e=>f(e.currentTarget.value),onKeyDown:e=>"Enter"===e.key&&y(!1),placeholder:p.placeholder??"Paste your API key",className:"w-full bg-paper border border-ink/20 rounded-md px-3 py-1.5 text-xs text-ink outline-none focus:border-ink/60 font-mono"}),(0,a.FD)("div",{className:"flex justify-end gap-2",children:[(0,a.Y)("button",{type:"button",onClick:()=>y(!0),className:"px-3 py-1.5 rounded-md border border-ink/20 text-xs text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:"Cancel"}),(0,a.Y)("button",{type:"button",onClick:()=>y(!1),className:"px-3.5 py-1.5 rounded-md bg-ink text-canvas text-xs font-medium hover:opacity-90 transition-opacity cursor-pointer",children:"Submit"})]})]}),m&&(0,a.Y)("p",{className:"text-xs text-ink/60",children:m}),!d&&!p&&!m&&(0,a.Y)("p",{className:"text-xs text-ink/50",children:"Waiting for the provider flow..."})]}),"success"===r&&(0,a.FD)("div",{className:"flex items-center gap-2 text-xs text-emerald-500 font-medium",children:[(0,a.Y)(tn.A,{size:14})," Signed in. Credentials stored by omp."]}),"failed"===r&&(0,a.FD)("div",{className:"flex items-start gap-2 text-xs text-error font-medium",children:[(0,a.Y)(eQ.A,{size:14,className:"mt-0.5 shrink-0"}),(0,a.Y)("span",{children:g??"Login failed"})]})]})}):null}let ts=["minimal","low","medium","high","xhigh","max"];function td(e){let{isOpen:t,model:i,onClose:o,onSaveModelConfig:l}=e,[s,d]=(0,n.J0)(i?.maxTokens?String(i.maxTokens):""),[c,p]=(0,n.J0)(i?.reasoningEffort??"");return t&&i?(0,a.FD)(tt,{onClose:o,header:(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)(e1.A,{size:16,className:"text-ink/70"}),(0,a.FD)("div",{children:[(0,a.Y)("h3",{className:"text-sm font-semibold text-ink",children:"Model Configuration"}),(0,a.Y)("p",{className:"text-[11px] text-ink/50 truncate max-w-[280px]",children:i.name})]})]}),form:{onSubmit:e=>{e.preventDefault();let t=Number.parseInt(s,10);l(i.id,{maxTokens:Number.isFinite(t)&&t>0?t:void 0,reasoningEffort:c||void 0}),o()},className:"p-5 space-y-4"},footer:(0,a.FD)("div",{className:"pt-2 flex items-center justify-end gap-2 border-t border-ink/10",children:[(0,a.Y)("button",{type:"button",onClick:o,className:"px-3.5 py-1.5 rounded-md border border-ink/20 text-xs font-medium text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:"Cancel"}),(0,a.FD)("button",{type:"submit",className:"px-3.5 py-1.5 rounded-md bg-ink text-canvas text-xs font-medium hover:opacity-90 transition-opacity cursor-pointer flex items-center gap-1.5",children:[(0,a.Y)(r.A,{size:14}),(0,a.Y)("span",{children:"Save Parameters"})]})]}),children:[(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink mb-1",children:"Max Output Tokens"}),(0,a.Y)("input",{type:"number",min:1,step:1024,value:s,placeholder:"Catalog default",onChange:e=>d(e.currentTarget.value),className:"w-full bg-paper border border-ink/20 rounded-md px-3 py-1.5 text-xs text-ink outline-none focus:border-ink/60 font-mono"}),(0,a.Y)("p",{className:"text-[10px] text-ink/40 mt-0.5",children:"Written to models.yml as this model's output cap. Empty uses the catalog value."})]}),i.hasReasoning&&(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink mb-1.5",children:"Default Reasoning Effort"}),(0,a.FD)("div",{className:"grid grid-cols-3 gap-2",children:[(0,a.Y)("button",{type:"button",onClick:()=>p(""),className:`py-1.5 rounded-md text-xs font-medium border text-center transition-colors cursor-pointer ${""===c?"border-ink/50 bg-ink/10 text-ink":"border-ink/15 text-ink/60 hover:border-ink/30"}`,children:"Auto"}),ts.map(e=>(0,a.Y)("button",{type:"button",onClick:()=>p(e),className:`py-1.5 rounded-md text-xs font-medium border text-center transition-colors cursor-pointer capitalize ${c===e?"border-ink/50 bg-ink/10 text-ink":"border-ink/15 text-ink/60 hover:border-ink/30"}`,children:e},e))]}),(0,a.Y)("p",{className:"text-[10px] text-ink/40 mt-0.5",children:"The level omp starts this model at. Auto leaves the choice to the chat composer."})]}),(0,a.Y)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-md bg-ink/5 border border-ink/10 text-[11px] text-ink/60",children:(0,a.FD)("span",{children:["Sampling temperature and Top P are global omp settings, not per-model — change them in ",(0,a.Y)("span",{className:"font-medium text-ink",children:"Settings → OMP Engine"}),"."]})})]}):null}var tc=i("B5");function tp(e){let{isOpen:t,model:i,onClose:n}=e;if(!t||!i)return null;let o=[{title:"Tool & Function Calling",desc:"Allows autonomous agents to invoke CLI scripts, read files, and manipulate workspace files.",enabled:i.hasTools,icon:A.A},{title:"Multimodal Vision",desc:"Analyzes visual screenshots, terminal diffs, diagrams, and image uploads directly.",enabled:i.hasVision,icon:e2.A},{title:"Extended Reasoning & Thinking Blocks",desc:"Provides deep chain-of-thought scratchpad tokens before outputting code patches.",enabled:!!i.hasReasoning,icon:k.A},{title:"Structured Output (JSON Schema)",desc:"Forces strict conformance to specified JSON schemas for deterministic tool execution.",enabled:!0,icon:tc.A},{title:"Streaming Inference",desc:"Delivers real-time incremental token chunks to the chat timeline with zero latency.",enabled:!0,icon:q.A}];return(0,a.Y)(tt,{onClose:n,header:(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)(e0,{size:16,className:"text-ink/70"}),(0,a.FD)("div",{children:[(0,a.Y)("h3",{className:"text-sm font-semibold text-ink",children:"Model Capabilities & Tools"}),(0,a.Y)("p",{className:"text-[11px] text-ink/50 truncate max-w-[280px]",children:i.name})]})]}),footer:(0,a.Y)("div",{className:"px-5 py-3 border-t border-ink/10 flex justify-end",children:(0,a.Y)("button",{type:"button",onClick:n,className:"px-4 py-1.5 rounded-md bg-ink text-canvas text-xs font-medium hover:opacity-90 transition-opacity cursor-pointer",children:"Close"})}),children:(0,a.Y)("div",{className:"p-5 space-y-3",children:o.map(e=>{let t=e.icon;return(0,a.FD)("div",{className:"flex items-start gap-3 p-2.5 rounded-lg bg-ink/5 border border-ink/10",children:[(0,a.Y)("div",{className:"p-1.5 rounded bg-ink/10 text-ink mt-0.5",children:(0,a.Y)(t,{size:14})}),(0,a.FD)("div",{className:"flex-1 min-w-0",children:[(0,a.FD)("div",{className:"flex items-center justify-between",children:[(0,a.Y)("span",{className:"text-xs font-semibold text-ink",children:e.title}),e.enabled?(0,a.FD)("span",{className:"inline-flex items-center gap-1 text-[10px] text-emerald-500 font-semibold uppercase tracking-wider",children:[(0,a.Y)(r.A,{size:11,strokeWidth:2.5}),"Supported"]}):(0,a.Y)("span",{className:"text-[10px] text-ink/40 font-medium uppercase tracking-wider",children:"Not supported"})]}),(0,a.Y)("p",{className:"text-[11px] text-ink/60 mt-0.5 leading-relaxed",children:e.desc})]})]},e.title)})})})}function tu(e){let{autoOpenAdd:t=!1,onAddModalClose:i}=e,{providers:o,connectedProviders:l,availablePresetProviders:r,selectedProvider:s,currentProject:d,setCurrentProject:c,isFetchingModels:p,toasts:u,dismissToast:m,isAddModalOpen:b,setIsAddModalOpen:h,isReconnectModalOpen:f,setIsReconnectModalOpen:g,isLoginModalOpen:v,setIsLoginModalOpen:x,configModel:k,setConfigModel:y,capabilitiesModel:w,setCapabilitiesModel:N,setSelectedProviderId:A,handleAddProvider:Y,handleReconnect:S,handleFetchModels:C,handleFetchModelsFromList:D,handleOmpAuthSuccess:F,handleToggleDisconnect:T,handleToggleProviderDisabled:M,handleHideAll:P,handleShowAll:I,handleToggleModelVisibility:R,handleSaveModelConfig:E}=function(){let{autoOpenAdd:e=!1,onAddModalClose:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[i,a]=(0,n.J0)([]),[o,l]=(0,n.J0)(ej),[r,s]=(0,n.J0)("provider-deepseek"),[d,c]=(0,n.J0)("ompchamber"),[p,u]=(0,n.J0)(!1),{toasts:m,pushToast:b,dismissToast:h}=(0,e_.Y)(),[f,g]=(0,n.J0)(e),[v,x]=(0,n.J0)(!1),[k,y]=(0,n.J0)(!1),[w,N]=(0,n.J0)(null),[A,Y]=(0,n.J0)(null);(0,n.vJ)(()=>{e&&g(!0)},[e]),(0,n.vJ)(()=>{let e=!0;return fetch("/api/settings/providers").then(e=>e.json()).then(t=>{if(e){if(t?.providers&&Array.isArray(t.providers)){a(t.providers);let e=t.providers.filter(e=>"connected"===e.status);s(e.length>0?e[0].id:"")}t?.presetProviders&&l(t.presetProviders)}}).catch(e=>console.error("Failed to load providers from API:",e)),()=>{e=!1}},[]);let S=(0,n.Kr)(()=>i.filter(e=>"connected"===e.status||!0===e.disabled),[i]),C=(0,n.Kr)(()=>{let e,t;return e=new Set(i.filter(e=>"connected"===e.status).map(e=>e.slug.trim().toLowerCase())),t=new Set,[...o,...i.filter(e=>"connected"!==e.status).map(e=>({id:e.slug,name:e.name,slug:e.slug,icon:e.icon,defaultUrl:e.baseUrl||"https://"}))].filter(i=>{let a=i.slug.trim().toLowerCase();return!(e.has(a)||t.has(a))&&(t.add(a),!0)})},[i,o]),D=S.find(e=>e.id===r)||S[0],F=async e=>{a(e);try{let t=await e$({providers:e});t&&a(t)}catch(e){console.error("Failed to save providers via API:",e),b("Failed to save provider settings.","error")}},T=async(e,t)=>{try{let i=await e$(t?{enableProvider:e}:{disableProvider:e});return i&&a(i),i}catch(e){return console.error("Failed to update provider connection:",e),b("Failed to update the provider connection.","error"),null}},M=async(e,a)=>{await F([...i,e]);let n=await T(e.slug,!0),o=n?.find(t=>t.slug.trim().toLowerCase()===e.slug.trim().toLowerCase());s(o?.id||e.id),g(!1),t?.(),a.fetchedCount>0?b(`Fetched ${a.fetchedCount} new model${1===a.fetchedCount?"":"s"} from the provider.`,"success"):-1===a.fetchedCount&&b("Auto-fetch models failed — provider added with default models.","error"),eB(e.name,e.models)},P=async e=>{D&&(await F(i.map(t=>t.id===D.id?{...t,...e,status:"connected"}:t)),"connected"!==D.status&&await T(D.slug,!0))},I=async e=>{if(!D||p)return;let t=e.baseUrl||D.baseUrl;if(!t)return void b("Base URL is required to fetch models.","error");u(!0);try{var i;let a=await eU(t,e.apiKey||D.apiKey,D.slug,!0);if(!a.ok||!a.models)return void b(a.error||"Failed to fetch models from the provider.","error");let n=(i=D.models,`${D.name} ${D.slug} ${D.baseUrl||""}`.toLowerCase().includes("kenari")?i.filter(e=>{let t=e.name.trim().toLowerCase();return!(eK.test(e.id)&&("kenari default model"===t||"kenari fast / flash"===t))}):i),o=D.models.length-n.length,{merged:l,addedCount:r}=function(e,t){let i=new Set(e.map(e=>e.id)),a=[];for(let e of t)!e.id||i.has(e.id)||(i.add(e.id),a.push({...e}));return{merged:[...e,...a],added:a,addedCount:a.length}}(n,a.models);if((r>0||o>0)&&await P({models:l}),a.omp?.written&&(0,ez.$P)(),r>0?b(`Fetched ${r} new model${1===r?"":"s"} from the provider.`,"success"):o>0?b("Removed legacy fallback models from the provider.","success"):b("No new models found — all fetched models already exist.","success"),a.omp?.written){let e=[];a.omp.addedCount>0&&e.push(`${a.omp.addedCount} new model${1===a.omp.addedCount?"":"s"} registered`),a.omp.backfilledCount>0&&e.push(`${a.omp.backfilledCount} model${1===a.omp.backfilledCount?"":"s"} enriched`),b(`omp models.yml updated${e.length>0?`: ${e.join(", ")}`:""}.`,"success")}else a.omp&&!a.omp.written&&a.omp.reason&&b(`omp models.yml not updated: ${a.omp.reason}`,"error")}finally{u(!1)}},R=async()=>{D&&await I({apiKey:D.apiKey,baseUrl:D.baseUrl})},E=async()=>{if(!D)return;let e="connected"===D.status;e&&s(S.find(e=>e.id!==D.id)?.id||""),await T(D.slug,!e)&&b(e?`${D.name} disconnected — its models are no longer offered in the chat picker.`:`${D.name} reconnected.`,"success")},L=e=>{D&&F(i.map(t=>t.id===D.id?{...t,models:e(t.models)}:t))},O=async()=>{if(!D)return;let e=!0!==D.disabled;await T(D.slug,!e)&&b(e?`${D.name} disabled — it no longer appears in the model list.`:`${D.name} enabled — its models are offered again.`,"success")},j=async(e,t)=>{if(!D)return;L(i=>i.map(i=>i.id===e?{...i,...t}:i));let i={provider:D.slug,modelId:e};if("maxTokens"in t&&(i.maxTokens=t.maxTokens??null),"reasoningEffort"in t&&(i.reasoningEffort=t.reasoningEffort??null),2!==Object.keys(i).length)try{let e=await fetch("/api/settings/model-override",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),t=await e.json();if(!e.ok)return void b(t.error||"Failed to save the model configuration.","error");t.written?(0,ez.$P)():t.reason&&b(t.reason,"error")}catch(e){console.error("Failed to save model override:",e),b("Failed to save the model configuration.","error")}};return{providers:i,connectedProviders:S,availablePresetProviders:C,selectedProvider:D,currentProject:d,setCurrentProject:c,isFetchingModels:p,toasts:m,pushToast:b,dismissToast:h,isAddModalOpen:f,setIsAddModalOpen:g,isReconnectModalOpen:v,setIsReconnectModalOpen:x,isLoginModalOpen:k,setIsLoginModalOpen:y,configModel:w,setConfigModel:N,capabilitiesModel:A,setCapabilitiesModel:Y,setSelectedProviderId:s,handleAddProvider:M,handleReconnect:P,handleFetchModels:I,handleFetchModelsFromList:R,handleOmpAuthSuccess:()=>{D&&(F(i.map(e=>e.id===D.id?{...e,status:"connected"}:e)),T(D.slug,!0))},handleToggleDisconnect:E,handleToggleProviderDisabled:O,handleHideAll:()=>L(e=>e.map(e=>({...e,isVisible:!1}))),handleShowAll:()=>L(e=>e.map(e=>({...e,isVisible:!0}))),handleToggleModelVisibility:e=>L(t=>t.map(t=>t.id===e?{...t,isVisible:!t.isVisible}:t)),handleSaveModelConfig:j}}({autoOpenAdd:t,onAddModalClose:i});return(0,a.FD)("div",{className:"w-full h-full flex flex-col md:flex-row overflow-hidden bg-paper text-ink",children:[(0,a.Y)(eW,{providers:l,selectedProviderId:s?.id||"",onSelectProvider:A,onOpenAddModal:()=>h(!0),currentProject:d,onSelectProject:c}),(0,a.Y)("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static p-6 md:p-8 space-y-6",children:s?(0,a.FD)(a.FK,{children:[(0,a.Y)(eV,{provider:s}),(0,a.Y)(eZ,{provider:s,onOpenReconnectModal:()=>{s.id.startsWith("omp-auth-")?x(!0):g(!0)},onToggleDisconnect:T,onToggleDisabled:M}),(0,a.Y)(e8,{models:s.models,onToggleModelVisibility:R,onHideAll:P,onShowAll:I,onFetchModels:D,canFetchModels:!!s.baseUrl,isFetchingModels:p,onOpenModelConfig:e=>y(e),onOpenModelCapabilities:e=>N(e)})]}):(0,a.Y)("div",{className:"py-12 text-center text-xs text-ink/40",children:"Select a provider from the sidebar to view connection details"})}),(0,a.Y)(eO.y,{toasts:u,onDismiss:m}),(0,a.Y)(ta,{isOpen:b,onClose:()=>{h(!1),i?.()},onAddProvider:Y,presets:r,existingSlugs:o.map(e=>e.slug)}),s&&(0,a.Y)(to,{isOpen:f,provider:s,isFetchingModels:p,onClose:()=>g(!1),onReconnect:S,onFetchModels:C}),s&&(0,a.Y)(tr,{isOpen:v,provider:s,onClose:()=>x(!1),onAuthenticated:F}),(0,a.Y)(td,{isOpen:!!k,model:k,onClose:()=>y(null),onSaveModelConfig:E}),(0,a.Y)(tp,{isOpen:!!w,model:w,onClose:()=>N(null)})]})}let tm=[{id:"ompchamber",name:"ompchamber",label:"ompchamber"},{id:"workspace-edge",name:"workspace-edge",label:"workspace-edge"},{id:"global",name:"global config",label:"Global (All Projects)"}],tb=(e,t)=>t,th=e=>{let{selectedProject:t,onChangeProject:i,options:o=tm,getTriggerLabel:l=tb,variant:s="default"}=e,[d,c]=(0,n.J0)(!1),p=(0,n.li)(null);(0,eY.W)(p,()=>c(!1));let u=l(o,t),m=o.map(e=>{let n=e.value??e.id,o=t===n;return(0,a.Y)("button",{type:"button",onClick:()=>{i(n),c(!1)},className:"compact"===s?`w-full text-left px-3 py-1.5 text-xs flex items-center justify-between hover:bg-ink/5 transition-colors cursor-pointer ${o?"text-ink font-semibold bg-ink/5":"text-ink/70"}`:`w-full px-3 py-1.5 text-left text-xs flex items-center justify-between hover:bg-ink/5 transition-colors cursor-pointer ${o?"font-semibold text-ink bg-ink/5":"text-ink/80"}`,children:"compact"===s?(0,a.FD)(a.FK,{children:[(0,a.Y)("span",{className:"truncate",children:e.label}),o&&(0,a.Y)(r.A,{size:12,className:"text-ink flex-shrink-0"})]}):(0,a.FD)("div",{className:"flex items-center gap-2 truncate",children:[(0,a.Y)(ee.A,{size:13,className:"text-ink/60"}),(0,a.Y)("span",{className:"truncate",children:e.name})]})},e.id)});return"compact"===s?(0,a.FD)("div",{className:"p-2.5 border-b border-ink/10 relative",ref:p,children:[(0,a.FD)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-2.5 py-1.5 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper text-xs text-ink transition-colors cursor-pointer",children:[(0,a.FD)("div",{className:"flex items-center gap-2 truncate",children:[(0,a.Y)(ee.A,{size:14,className:"text-ink/60 flex-shrink-0"}),(0,a.Y)("span",{className:"truncate font-medium",children:u})]}),(0,a.Y)(eA.A,{size:14,className:"text-ink/50 flex-shrink-0"})]}),d&&(0,a.FD)(a.FK,{children:[(0,a.Y)("div",{className:"fixed inset-0 z-20",onClick:()=>c(!1)}),(0,a.Y)("div",{className:"absolute left-2.5 right-2.5 top-12 z-30 bg-paper border border-ink/15 rounded-lg shadow-lg py-1 animate-in fade-in zoom-in-95 duration-100",children:m})]})]}):(0,a.FD)("div",{className:"p-3 border-b border-ink/10 relative",ref:p,children:[(0,a.FD)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between gap-2 px-3 py-1.5 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper text-ink text-xs font-medium transition-colors cursor-pointer shadow-2xs",children:[(0,a.FD)("div",{className:"flex items-center gap-2 truncate",children:[(0,a.Y)(ee.A,{size:14,className:"text-ink/60 flex-shrink-0"}),(0,a.Y)("span",{className:"truncate",children:u})]}),(0,a.Y)(eA.A,{size:14,className:"text-ink/50 flex-shrink-0"})]}),d&&(0,a.Y)("div",{className:"absolute top-12 left-3 right-3 bg-paper border border-ink/20 rounded-lg shadow-lg z-30 py-1 divide-y divide-ink/5 animate-in fade-in zoom-in-95 duration-100",children:m})]})},tf=e=>{let{items:t,selectedId:i,onSelect:n,onAddNew:o,addTitle:l,builtInLabel:r,customLabel:s,formatName:d,nameClassName:c,renderIcon:p,selectedProject:u,onChangeProject:m}=e,b=t.filter(e=>e.isBuiltIn),h=t.filter(e=>!e.isBuiltIn),f=e=>{let t=e.id===i;return(0,a.FD)("button",{type:"button",onClick:()=>n(e.id),className:`w-full text-left px-2.5 py-2 rounded-lg transition-colors cursor-pointer flex flex-col gap-0.5 group ${t?"bg-ink/10 text-ink font-medium shadow-2xs":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[(0,a.FD)("div",{className:"flex items-center justify-between gap-1.5",children:[(0,a.FD)("div",{className:"flex items-center gap-1.5 min-w-0",children:[p(!!e.isBuiltIn),(0,a.Y)("span",{className:c,children:d(e.name)})]}),(0,a.Y)("span",{className:"text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-ink/10 text-ink/70 font-medium",children:e.scope})]}),(0,a.Y)("p",{className:"text-[11px] text-ink/60 line-clamp-1 leading-snug pl-5",children:e.description})]},e.id)};return(0,a.FD)("div",{className:"w-56 sm:w-64 border-r border-ink/10 h-full flex flex-col bg-paper/50 flex-shrink-0 select-none",children:[(0,a.Y)(th,{selectedProject:u,onChangeProject:m}),(0,a.FD)("div",{className:"px-3.5 py-2.5 border-b border-ink/10 flex items-center justify-between",children:[(0,a.FD)("span",{className:"text-xs font-semibold text-ink",children:["Total ",t.length]}),(0,a.Y)("button",{type:"button",onClick:o,title:l,className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(eg.A,{size:15,strokeWidth:2.2})})]}),(0,a.FD)("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static p-1.5 space-y-3 text-xs",children:[(0,a.FD)("div",{children:[(0,a.Y)("div",{className:"px-2.5 pt-1.5 pb-1 text-[10px] font-bold text-ink/50 uppercase tracking-wider",children:r}),(0,a.Y)("div",{className:"space-y-0.5",children:b.map(f)})]}),(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"px-2.5 pt-1.5 pb-1 text-[10px] font-bold text-ink/50 uppercase tracking-wider flex items-center justify-between",children:[(0,a.Y)("span",{children:s}),(0,a.Y)("span",{className:"text-[10px] font-normal",children:h.length})]}),(0,a.Y)("div",{className:"space-y-0.5",children:h.map(f)})]})]})]})},tg=e=>{let{agents:t,selectedAgentId:i,onSelectAgent:n,onAddNewAgent:o,selectedProject:l,onChangeProject:r}=e;return(0,a.Y)(tf,{items:t,selectedId:i,onSelect:n,onAddNew:o,addTitle:"Create new agent",builtInLabel:"Built-in Agents",customLabel:"Custom Agents",formatName:e=>e,nameClassName:"font-semibold text-xs text-ink truncate",selectedProject:l,onChangeProject:r,renderIcon:e=>(0,a.FD)("div",{className:"relative",children:[(0,a.Y)(w.A,{className:`w-3.5 h-3.5 ${e?"text-ink/80":"text-ink/60"} flex-shrink-0`}),e&&(0,a.Y)("span",{className:"absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full bg-ink"})]})})},tv=(0,v.A)({name:"pen-tool",size:24,node:[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]});var tx=i("DV"),tk=i("b0");let ty=["Not selected","claude-3-7-sonnet-20250219","claude-3-5-sonnet-20241022","claude-3-5-haiku-20241022","gpt-4o","gpt-4o-mini","o3-mini","gemini-2.5-pro-preview-03-25","gemini-2.5-flash","deepseek-chat-v3","deepseek-reasoner-r1"],tw=e=>{let{agent:t,isNew:i=!1,onSave:o,onDelete:l}=e,[s,d]=(0,n.J0)(t),[c,p]=(0,n.J0)(!1),[u,m]=(0,n.J0)(!1);(0,n.vJ)(()=>{d(t),p(!1)},[t]);let b=e=>{d(t=>{let i=Math.max(0,Math.min(2,parseFloat(((t.temperature??.7)+e).toFixed(2))));return{...t,temperature:i}})},h=e=>{d(t=>{let i=Math.max(0,Math.min(1,parseFloat(((t.topP??.95)+e).toFixed(2))));return{...t,topP:i}})};return(0,a.FD)("form",{onSubmit:e=>{e.preventDefault(),o(s),p(!0),setTimeout(()=>p(!1),2e3)},className:"flex-1 flex flex-col h-full scrollbar-overlay-container scrollbar-overlay-static bg-paper text-ink p-6 md:p-8 space-y-6",children:[(0,a.FD)("div",{className:"space-y-3",children:[(0,a.FD)("div",{className:"flex items-center justify-between",children:[(0,a.Y)("h2",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Identity & Role"}),s.isBuiltIn&&(0,a.Y)("span",{className:"text-[10px] font-mono px-2 py-0.5 rounded-md bg-ink/5 border border-ink/10 text-ink/60",children:"Built-in System Agent (Read-only System Core)"})]}),(0,a.FD)("div",{className:"flex items-center gap-3",children:[(0,a.FD)("div",{className:"flex-1",children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Agent Name"}),(0,a.FD)("div",{className:"flex items-center border border-ink/20 hover:border-ink/40 focus-within:border-ink rounded-lg bg-paper transition-colors",children:[(0,a.Y)("span",{className:"px-3 py-2 font-mono text-xs text-ink/40 border-r border-ink/15 select-none",children:"@"}),(0,a.Y)("input",{type:"text",value:s.name,onChange:e=>d({...s,name:e.currentTarget.value}),required:!0,placeholder:"agent-name",disabled:s.isBuiltIn,className:"w-full text-xs font-mono px-3 py-2 bg-transparent focus:outline-none disabled:opacity-60 text-ink"})]})]}),(0,a.FD)("div",{className:"w-40",children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Scope"}),(0,a.FD)("select",{value:s.scope,onChange:e=>d({...s,scope:e.currentTarget.value}),disabled:s.isBuiltIn,className:"w-full text-xs py-2 px-3 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink disabled:opacity-60 text-ink transition-colors cursor-pointer",children:[(0,a.Y)("option",{value:"user",children:"user"}),(0,a.Y)("option",{value:"project",children:"project"}),(0,a.Y)("option",{value:"system",children:"system"})]})]})]}),(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Description"}),(0,a.Y)("textarea",{value:s.description,onChange:e=>d({...s,description:e.currentTarget.value}),placeholder:"What does this agent do?",rows:2,className:"w-full text-xs p-3 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink placeholder:text-ink/30 text-ink transition-colors"})]}),(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,a.Y)("label",{className:"text-xs font-semibold text-ink/80",children:"Mode"}),(0,a.Y)("span",{title:"Defines agent delegation context (primary, subagent, or all)",children:(0,a.Y)(eN.A,{className:"w-3.5 h-3.5 text-ink/40"})})]}),(0,a.Y)("div",{className:"inline-flex rounded-lg border border-ink/15 p-0.5 bg-ink/5",children:["primary","subagent","all"].map(e=>(0,a.Y)("button",{type:"button",onClick:()=>d({...s,mode:e}),className:`px-3 py-1 text-xs rounded-md transition-colors cursor-pointer capitalize ${s.mode===e?"bg-paper text-ink shadow-xs font-semibold":"text-ink/60 hover:text-ink"}`,children:e},e))})]})]}),(0,a.Y)("div",{className:"border-t border-ink/10"}),(0,a.FD)("div",{className:"space-y-3",children:[(0,a.Y)("h2",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Model & Parameters"}),(0,a.FD)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Override Model"}),(0,a.FD)("div",{className:"flex items-center border border-ink/20 hover:border-ink/40 focus-within:border-ink rounded-lg bg-paper transition-colors",children:[(0,a.Y)("span",{className:"px-2.5 text-ink/40",children:(0,a.Y)(tv,{className:"w-3.5 h-3.5"})}),(0,a.Y)("select",{value:s.overrideModel||"Not selected",onChange:e=>d({...s,overrideModel:e.currentTarget.value}),className:"w-full text-xs font-mono py-2 pr-3 bg-transparent focus:outline-none cursor-pointer text-ink",children:ty.map(e=>(0,a.Y)("option",{value:e,children:e},e))})]})]}),(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"flex items-center gap-1 mb-1.5",children:[(0,a.Y)("label",{className:"text-xs font-semibold text-ink/80",children:"Thinking Variant"}),(0,a.Y)("span",{title:"Controls chain-of-thought token depth",children:(0,a.Y)(eN.A,{className:"w-3.5 h-3.5 text-ink/40"})})]}),(0,a.Y)("input",{type:"text",value:s.thinkingVariant||"default",onChange:e=>d({...s,thinkingVariant:e.currentTarget.value}),placeholder:"default",className:"w-full text-xs font-mono px-3 py-2 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-ink transition-colors"})]}),(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"flex items-center gap-1 mb-1.5",children:[(0,a.Y)("label",{className:"text-xs font-semibold text-ink/80",children:"Temperature"}),(0,a.Y)("span",{title:"Higher values make output more random, lower values more deterministic",children:(0,a.Y)(eN.A,{className:"w-3.5 h-3.5 text-ink/40"})})]}),(0,a.FD)("div",{className:"flex items-center border border-ink/20 rounded-lg max-w-[150px] bg-paper overflow-hidden",children:[(0,a.Y)("button",{type:"button",onClick:()=>b(-.05),className:"px-3 py-1.5 text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(tx.A,{className:"w-3.5 h-3.5"})}),(0,a.Y)("span",{className:"flex-1 text-center font-mono text-xs font-medium text-ink",children:null!=s.temperature?s.temperature.toFixed(2):"—"}),(0,a.Y)("button",{type:"button",onClick:()=>b(.05),className:"px-3 py-1.5 text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(eg.A,{className:"w-3.5 h-3.5"})})]})]}),(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"flex items-center gap-1 mb-1.5",children:[(0,a.Y)("label",{className:"text-xs font-semibold text-ink/80",children:"Top P"}),(0,a.Y)("span",{title:"Nucleus sampling cutoff",children:(0,a.Y)(eN.A,{className:"w-3.5 h-3.5 text-ink/40"})})]}),(0,a.FD)("div",{className:"flex items-center border border-ink/20 rounded-lg max-w-[150px] bg-paper overflow-hidden",children:[(0,a.Y)("button",{type:"button",onClick:()=>h(-.05),className:"px-3 py-1.5 text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(tx.A,{className:"w-3.5 h-3.5"})}),(0,a.Y)("span",{className:"flex-1 text-center font-mono text-xs font-medium text-ink",children:null!=s.topP?s.topP.toFixed(2):"—"}),(0,a.Y)("button",{type:"button",onClick:()=>h(.05),className:"px-3 py-1.5 text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(eg.A,{className:"w-3.5 h-3.5"})})]})]})]})]}),(0,a.Y)("div",{className:"border-t border-ink/10"}),(0,a.FD)("div",{className:"space-y-2 flex-1 flex flex-col",children:[(0,a.FD)("div",{className:"flex items-center justify-between",children:[(0,a.Y)("label",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"System Prompt"}),(0,a.FD)("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(s.systemPrompt),m(!0),setTimeout(()=>m(!1),1800)},className:"flex items-center gap-1.5 text-xs text-ink/60 hover:text-ink transition-colors cursor-pointer",children:[u?(0,a.Y)(r.A,{className:"w-3.5 h-3.5 text-ink"}):(0,a.Y)(tk.A,{className:"w-3.5 h-3.5"}),(0,a.Y)("span",{children:u?"Copied":"Copy"})]})]}),(0,a.Y)("textarea",{value:s.systemPrompt,onChange:e=>d({...s,systemPrompt:e.currentTarget.value}),rows:7,placeholder:"You are an expert coding assistant...",className:"w-full flex-1 min-h-[140px] text-xs font-mono p-3 rounded-lg border border-ink/20 hover:border-ink/40 bg-ink/5 focus:outline-none focus:border-ink leading-relaxed transition-colors"})]}),(0,a.FD)("div",{className:"pt-3 border-t border-ink/10 flex items-center justify-between",children:[(0,a.Y)("div",{children:!s.isBuiltIn&&!i&&l&&(0,a.FD)("button",{type:"button",onClick:()=>l(s.id),className:"flex items-center gap-1.5 px-3.5 py-2 rounded-lg border border-ink/20 hover:border-error hover:text-error text-ink/70 text-xs font-medium transition-colors cursor-pointer",children:[(0,a.Y)(ek.A,{className:"w-3.5 h-3.5"}),"Delete Agent"]})}),(0,a.FD)("div",{className:"flex items-center gap-3",children:[c&&(0,a.FD)("span",{className:"flex items-center gap-1 text-xs text-ink font-medium",children:[(0,a.Y)(r.A,{className:"w-3.5 h-3.5"}),"Saved successfully"]}),(0,a.Y)("button",{type:"submit",className:"px-4 py-2 rounded-lg bg-ink text-paper text-xs font-medium hover:bg-ink/90 transition-colors shadow-xs cursor-pointer",children:i?"Create Agent":"Save Agent"})]})]})]})};var tN=i("ns");function tA(e){let{endpoint:t,listKey:i,query:a,messages:o,cacheKey:l}=e,[r,s]=(0,n.J0)([]),[d,c]=(0,n.J0)(null),[p,u]=(0,n.J0)(!1),[m,b]=(0,n.J0)(!0),h=e.readList??(e=>{let t=e?.[i];return Array.isArray(t)?t:null});(0,n.vJ)(()=>{let i=!0;return fetch(`${t}${a??""}`).then(e=>e.json()).then(t=>{if(!i)return;let a=h(t)??[];s(a),c(t=>e.resolveOnLoad?e.resolveOnLoad(t,a):a.length>0?a[0].id:null)}).catch(e=>console.error(o.load,e)).finally(()=>{i&&b(!1)}),()=>{i=!1}},[t,a]);let f=!1===e.fallbackToFirst?r.find(e=>e.id===d):r.find(e=>e.id===d)??r[0];return{items:r,selectedId:d,selected:f,isCreatingNew:p,isLoading:m,select:e=>{u(!1),c(e)},startCreate:()=>{u(!0),c(null)},save:i=>{let a=p?e.buildNew(i):e.buildUpdate(i,f,d);fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e.buildBody?e.buildBody(a):{[e.bodyKey]:a})}).then(e=>e.json()).then(t=>{if(e.isSaveError?.(t))return;let i=h(t);i?s(i):e.serverListOnly||s(e=>e.some(e=>e.id===a.id)?e.map(e=>e.id===a.id?a:e):[...e,a]);let n=e.resolveOnSave?e.resolveOnSave(a,i):a.id;void 0!==n&&c(n),u(!1),l&&(0,tN.SA)(l)}).catch(e=>console.error(o.save,e))},remove:i=>{let n=e.buildDeleteQuery?e.buildDeleteQuery(i):`?id=${encodeURIComponent(i)}`;fetch(`${t}${n}`,{method:"DELETE"}).then(e=>e.json()).then(n=>{if(!e.isDeleteError?.(n))if(l&&(0,tN.SA)(l),e.deleteFromResponse){let e=h(n)??r.filter(e=>e.id!==i);s(e),d===i&&c(e[0]?.id??null)}else fetch(`${t}${a??""}`).then(e=>e.json()).then(e=>{let t=h(e)??[];s(t),d===i&&c(t[0]?.id||null)})}).catch(e=>console.error(o.delete,e))}}}let tY=()=>{let[e,t]=(0,n.J0)("ompchamber"),{items:i,selectedId:o,selected:l,isCreatingNew:r,isLoading:s,select:d,startCreate:c,save:p,remove:u}=tA({endpoint:"/api/settings/agents",listKey:"agents",bodyKey:"agent",messages:{load:"Failed to load agents from API:",save:"Failed to save agent via API:",delete:"Failed to delete agent via API:"},cacheKey:"agent",buildNew:e=>({...e,id:`agent-${Date.now()}`,isBuiltIn:!1}),buildUpdate:e=>e,isDeleteError:e=>!!e?.error}),m={id:`new-${Date.now()}`,name:"new-agent",description:"",scope:"user",mode:"subagent",overrideModel:"Not selected",thinkingVariant:"default",temperature:null,topP:null,systemPrompt:"You are a specialized assistant...",isBuiltIn:!1};return s?(0,a.Y)(eE,{children:"Loading agents from database..."}):(0,a.FD)("div",{className:"flex h-full w-full overflow-hidden bg-paper",children:[(0,a.Y)(tg,{agents:i,selectedAgentId:r?null:o,onSelectAgent:d,onAddNewAgent:c,selectedProject:e,onChangeProject:t}),(0,a.Y)("div",{className:"flex-1 h-full overflow-hidden flex flex-col",children:r?(0,a.Y)(tw,{agent:m,isNew:!0,onSave:p}):l?(0,a.Y)(tw,{agent:l,isNew:!1,onSave:p,onDelete:u},l.id):(0,a.Y)("div",{className:"flex-1 flex items-center justify-center text-xs font-mono text-ink/40",children:"Select an agent or click + to create one"})})]})};var tS=i("Ir"),tC=i("ES"),tD=i("uF");let tF={agents:{title:"Global AGENTS.md",badge:"context file",tooltip:"User context file omp loads when a session starts (~/.omp/agent/AGENTS.md, relocated by PI_CODING_AGENT_DIR). It shadows every other user-level context file, so it is the place for long-lived global rules. Recognizable permission directives are also mirrored into config.yml tools.approval. Saving empty content removes the file.",placeholder:"Type instructions in <mandatory_rules> tags..."},rules:{title:"Global RULES.md",badge:"sticky rule",tooltip:"User sticky rule (~/.omp/agent/RULES.md). Its whole body is re-sent on every request and re-read when a session starts or after /clear and /new, so it keeps its hold in long conversations — keep it to a few hard requirements. Saving empty content removes the file.",placeholder:"One hard requirement per line, e.g. Never commit or push unless asked."}},tT=e=>{let{kind:t,content:i,filePath:o,exists:l,isMock:s,onSave:d,onReset:c}=e,[p,u]=(0,n.J0)(i),[m,b]=(0,n.J0)(!1),[h,f]=(0,n.J0)(!1),[g,v]=(0,n.J0)(!1),[x,k]=(0,n.J0)(null),[y,w]=(0,n.J0)(null);(0,n.vJ)(()=>{u(i)},[i]);let N=tF[t],A=p.split("\n").length,Y=p.length,S=Math.round(Y/4),C=s?"Demo preset — MOCK=true, nothing is written to disk":o?`${o}${l?"":" · not created yet"}`:"Native path unavailable",D=async e=>{f(!0),k(null),w(null);try{let t=await e();if(t.error)return void k(t.error);w(t.note??null),v(!0),setTimeout(()=>v(!1),2e3)}finally{f(!1)}},F=async()=>{!c||window.confirm(`Replace ${o??"the stored content"} with the shipped default rules?`)&&await D(c)},T=e=>{u(t=>`${t.trim()}
3
-
4
- ${e}
5
- `)};return(0,a.FD)("div",{className:"flex-1 flex flex-col h-full bg-paper text-ink p-6 md:p-8 overflow-hidden",children:[(0,a.FD)("div",{className:"flex items-center justify-between pb-4 border-b border-ink/10",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.FD)("h2",{className:"text-sm font-bold tracking-tight text-ink flex items-center gap-2",children:[(0,a.Y)("span",{children:N.title}),(0,a.Y)("span",{className:"text-[10px] uppercase tracking-wider px-1.5 py-0.5 rounded border border-ink/15 text-ink/50 font-medium",children:N.badge})]}),(0,a.FD)("div",{className:"group relative",children:[(0,a.Y)(eN.A,{className:"w-4 h-4 text-ink/40 cursor-help"}),(0,a.Y)("div",{className:"absolute left-0 top-6 hidden group-hover:block w-80 p-2.5 rounded-lg bg-ink text-paper text-xs shadow-lg z-20 leading-relaxed pointer-events-none",children:N.tooltip})]})]}),(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.FD)("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(p),b(!0),setTimeout(()=>b(!1),2e3)},title:"Copy to clipboard",className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border border-ink/20 hover:border-ink/40 hover:bg-ink/5 text-ink transition-colors cursor-pointer",children:[m?(0,a.Y)(r.A,{className:"w-3.5 h-3.5 text-ink"}):(0,a.Y)(tk.A,{className:"w-3.5 h-3.5"}),(0,a.Y)("span",{children:m?"Copied":"Copy"})]}),c&&(0,a.FD)("button",{type:"button",onClick:F,disabled:h,title:"Reset to default rules",className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border border-ink/20 hover:border-ink/40 hover:bg-ink/5 text-ink transition-colors cursor-pointer disabled:opacity-50",children:[(0,a.Y)(tS.A,{className:"w-3.5 h-3.5"}),(0,a.Y)("span",{children:"Reset"})]}),(0,a.FD)("button",{type:"button",onClick:()=>D(()=>d(p)),disabled:h,className:"flex items-center gap-1.5 px-4 py-2 text-xs font-medium rounded-lg bg-ink text-paper hover:bg-ink/90 transition-colors shadow-xs cursor-pointer disabled:opacity-50",children:[g?(0,a.Y)(r.A,{className:"w-3.5 h-3.5"}):(0,a.Y)(tC.A,{className:"w-3.5 h-3.5"}),(0,a.Y)("span",{children:h?"Saving…":g?"Saved":"Save Changes"})]})]})]}),(x||y)&&(0,a.Y)("div",{className:`pt-3 text-xs font-mono break-words ${x?"text-error":"text-ink/60"}`,children:x??y}),(0,a.FD)("div",{className:"py-3 flex items-center gap-2 overflow-x-auto text-xs border-b border-ink/10",children:[(0,a.Y)("span",{className:"text-ink/50 uppercase tracking-wider text-[10px] font-bold whitespace-nowrap",children:"Quick Insert:"}),(0,a.FD)("button",{type:"button",onClick:()=>T(`<mandatory_rules>
6
- ALWAY USE CODEGRAPH (codegraph_codegraph_explore) TOOL MCP FIRST BEFORE OTHER TOOL BUILT-IN.
7
- </mandatory_rules>`),className:"px-2.5 py-1 text-xs font-mono rounded-md bg-ink/5 hover:bg-ink/10 border border-ink/15 whitespace-nowrap transition-colors flex items-center gap-1.5 text-ink cursor-pointer",children:[(0,a.Y)(tD.A,{className:"w-3.5 h-3.5 text-ink/60"}),"+ CodeGraph Rule"]}),(0,a.FD)("button",{type:"button",onClick:()=>T(`<mandatory_rules>
8
- IF SUBAGENT NOT DEFINE MODELID, DELEGATE TASK USING INHERIT WITH PARENT MODELID.
9
- </mandatory_rules>`),className:"px-2.5 py-1 text-xs font-mono rounded-md bg-ink/5 hover:bg-ink/10 border border-ink/15 whitespace-nowrap transition-colors flex items-center gap-1.5 text-ink cursor-pointer",children:[(0,a.Y)(tc.A,{className:"w-3.5 h-3.5 text-ink/60"}),"+ Model Inheritance"]}),(0,a.FD)("button",{type:"button",onClick:()=>T(`<mandatory_rules>
10
- WHEN COMMIT, ALWAYS USE CONVENTIONAL COMMIT. JANGAN COMMIT SAMPAI AKU MINTA.
11
- </mandatory_rules>`),className:"px-2.5 py-1 text-xs font-mono rounded-md bg-ink/5 hover:bg-ink/10 border border-ink/15 whitespace-nowrap transition-colors flex items-center gap-1.5 text-ink cursor-pointer",children:[(0,a.Y)(tc.A,{className:"w-3.5 h-3.5 text-ink/60"}),"+ Conventional Commit Guard"]})]}),(0,a.FD)("div",{className:"flex-1 min-h-0 mt-3 rounded-lg border border-ink/20 hover:border-ink/40 bg-ink/5 overflow-hidden flex flex-col font-mono text-xs focus-within:border-ink transition-colors",children:[(0,a.FD)("div",{className:"flex-1 flex overflow-hidden",children:[(0,a.Y)("div",{className:"w-10 py-3 pr-2 select-none text-right font-mono text-xs text-ink/30 border-r border-ink/10 bg-ink/[0.02] overflow-hidden leading-relaxed",children:Array.from({length:Math.max(A,12)}).map((e,t)=>(0,a.Y)("div",{children:t+1},t))}),(0,a.Y)("textarea",{value:p,onChange:e=>u(e.currentTarget.value),spellcheck:!1,className:"flex-1 p-3 bg-transparent text-ink font-mono text-xs leading-relaxed resize-none focus:outline-none overflow-y-auto",placeholder:N.placeholder})]}),(0,a.FD)("div",{className:"p-2.5 border-t border-ink/10 bg-paper flex items-center justify-between gap-4 text-xs font-mono text-ink/60",children:[(0,a.FD)("div",{className:"flex items-center gap-4 shrink-0",children:[(0,a.FD)("span",{children:[A," lines"]}),(0,a.FD)("span",{children:[Y," chars"]}),(0,a.FD)("span",{children:["~",S," tokens"]})]}),(0,a.FD)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.Y)("span",{className:`w-2 h-2 rounded-full shrink-0 ${l&&!s?"bg-ink/60":"bg-ink/25"}`}),(0,a.Y)("span",{className:"truncate",title:C,children:C})]})]})]})]})};function tM(e){let[t,i]=(0,n.J0)(""),[a,o]=(0,n.J0)(null),[l,r]=(0,n.J0)(!1),[s,d]=(0,n.J0)(!1),[c,p]=(0,n.J0)(!0),[u,m]=(0,n.J0)(null),b=(0,n.hb)(e=>{"string"==typeof e.rules&&i(e.rules),o("string"==typeof e.path?e.path:null),r(!0===e.exists),d(!0===e.isMock)},[]);(0,n.vJ)(()=>{let t=!0;return m(null),fetch(`/api/settings/behavior?file=${e}`).then(e=>e.json()).then(e=>{if(t){if(e.error)return void m(e.error);b(e)}}).catch(e=>{t&&m(e instanceof Error?e.message:String(e))}).finally(()=>{t&&p(!1)}),()=>{t=!1}},[b,e]);let h=(0,n.hb)(async t=>{try{let i=await fetch("/api/settings/behavior",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...t,file:e})}),a=await i.json();if(a.error)return{error:a.error};if(b(a),a.nativeError)return{note:`Saved, but the approval mapping was skipped: ${a.nativeError}`};if(a.nativeSynced)return{note:"Saved — recognized permission gates were mirrored into config.yml tools.approval."};return{}}catch(e){return{error:e instanceof Error?e.message:String(e)}}},[b,e]);return{content:t,filePath:a,exists:l,isMock:s,isLoading:c,error:u,save:e=>h({rules:e}),reset:()=>h({action:"reset"})}}let tP=[{kind:"agents",label:"AGENTS.md",hint:"context file"},{kind:"rules",label:"RULES.md",hint:"sticky rule"}],tI=()=>{let[e,t]=(0,n.J0)("agents"),i=tM("agents"),o=tM("rules"),l="agents"===e?i:o,r=tP.find(t=>t.kind===e)??tP[0];return(0,a.FD)("div",{className:"h-full w-full overflow-hidden flex flex-col bg-paper",children:[(0,a.Y)("div",{className:"flex items-center gap-1.5 px-6 md:px-8 pt-5",children:tP.map(i=>(0,a.FD)("button",{type:"button",onClick:()=>t(i.kind),className:`px-3 py-1.5 text-xs font-mono rounded-lg border transition-colors cursor-pointer ${i.kind===e?"border-ink bg-ink text-paper":"border-ink/20 text-ink/60 hover:border-ink/40 hover:bg-ink/5"}`,children:[i.label,(0,a.Y)("span",{className:"ml-2 opacity-60",children:i.hint})]},i.kind))}),l.error&&(0,a.FD)("div",{className:"mx-6 md:mx-8 mt-3 px-3 py-2 text-xs font-mono text-error bg-error/5 border border-error/30 rounded-lg",children:["Failed to load ",l.filePath??r.label,": ",l.error]}),l.isLoading?(0,a.FD)(eE,{variant:"fill",children:["Loading ",r.label," from ",l.filePath??"the preset store","..."]}):(0,a.Y)(tT,{kind:e,content:l.content,filePath:l.filePath,exists:l.exists,isMock:l.isMock,onSave:l.save,onReset:"agents"===e?l.reset:void 0},e)]})},tR=e=>{let{commands:t,selectedCommandId:i,onSelectCommand:n,onAddNewCommand:o,selectedProject:l,onChangeProject:r}=e;return(0,a.Y)(tf,{items:t,selectedId:i,onSelect:n,onAddNew:o,addTitle:"Create new command",builtInLabel:"Built-in Commands",customLabel:"Custom Commands",formatName:e=>`/${e}`,nameClassName:"font-mono font-semibold text-xs text-ink truncate",selectedProject:l,onChangeProject:r,renderIcon:e=>(0,a.Y)(A.A,{className:`w-3.5 h-3.5 ${e?"text-ink/70":"text-ink/60"} flex-shrink-0`})})},tE=["Not selected","claude-3-7-sonnet-20250219","claude-3-5-sonnet-20241022","claude-3-5-haiku-20241022","gpt-4o","gpt-4o-mini","gemini-2.5-pro-preview-03-25","deepseek-chat-v3"],tL=e=>{let{command:t,isNew:i=!1,onSave:o,onDelete:l}=e,[s,d]=(0,n.J0)(t),[c,p]=(0,n.J0)(!1),[u,m]=(0,n.J0)(!1),[b,h]=(0,n.J0)([]);(0,n.vJ)(()=>{fetch("/api/settings/agents").then(e=>e.json()).then(e=>{e?.agents&&h(e.agents)}).catch(console.error)},[]),(0,n.vJ)(()=>{d(t),p(!1)},[t]);let f=e=>{d(t=>({...t,template:t.template?`${t.template} ${e}`:e}))};return(0,a.FD)("form",{onSubmit:e=>{e.preventDefault(),o(s),p(!0),setTimeout(()=>p(!1),2e3)},className:"flex-1 flex flex-col h-full scrollbar-overlay-container scrollbar-overlay-static bg-paper text-ink p-6 md:p-8 space-y-6",children:[(0,a.FD)("div",{className:"space-y-3",children:[(0,a.FD)("div",{className:"flex items-center justify-between",children:[(0,a.Y)("h2",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Identity"}),s.isBuiltIn&&(0,a.Y)("span",{className:"text-[10px] font-mono px-2 py-0.5 rounded-md bg-ink/5 border border-ink/10 text-ink/60",children:"Built-in System Command"})]}),(0,a.FD)("div",{className:"flex items-center gap-3",children:[(0,a.FD)("div",{className:"flex-1",children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Command Name"}),(0,a.FD)("div",{className:"flex items-center border border-ink/20 hover:border-ink/40 focus-within:border-ink rounded-lg bg-paper transition-colors",children:[(0,a.Y)("span",{className:"px-3 py-2 font-mono text-xs text-ink/40 border-r border-ink/15 select-none",children:"/"}),(0,a.Y)("input",{type:"text",value:s.name,onChange:e=>d({...s,name:e.currentTarget.value.replace(/^\/+/,"")}),required:!0,placeholder:"command-name",disabled:s.isBuiltIn,className:"w-full text-xs font-mono px-3 py-2 bg-transparent focus:outline-none disabled:opacity-60 text-ink"})]})]}),(0,a.FD)("div",{className:"w-40",children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Scope"}),(0,a.FD)("select",{value:s.scope,onChange:e=>d({...s,scope:e.currentTarget.value}),disabled:s.isBuiltIn,className:"w-full text-xs py-2 px-3 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink disabled:opacity-60 text-ink transition-colors cursor-pointer",children:[(0,a.Y)("option",{value:"user",children:"user"}),(0,a.Y)("option",{value:"project",children:"project"}),(0,a.Y)("option",{value:"system",children:"system"})]})]})]}),(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Description"}),(0,a.Y)("textarea",{value:s.description,onChange:e=>d({...s,description:e.currentTarget.value}),placeholder:"What does this command do?",rows:2,className:"w-full text-xs p-3 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink placeholder:text-ink/30 text-ink transition-colors"})]})]}),(0,a.Y)("div",{className:"border-t border-ink/10"}),(0,a.FD)("div",{className:"space-y-3",children:[(0,a.Y)("h2",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Execution Context"}),(0,a.FD)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Override Agent"}),(0,a.FD)("div",{className:"flex items-center border border-ink/20 hover:border-ink/40 focus-within:border-ink rounded-lg bg-paper transition-colors",children:[(0,a.Y)("span",{className:"px-2.5 text-ink/40",children:(0,a.Y)(w.A,{className:"w-3.5 h-3.5"})}),(0,a.FD)("select",{value:s.overrideAgent||"Not selected",onChange:e=>d({...s,overrideAgent:e.currentTarget.value}),className:"w-full text-xs py-2 pr-3 bg-transparent focus:outline-none cursor-pointer text-ink",children:[(0,a.Y)("option",{value:"Not selected",children:"Not selected"}),b.map(e=>(0,a.FD)("option",{value:e.name,children:["@",e.name]},e.id))]})]})]}),(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Override Model"}),(0,a.FD)("div",{className:"flex items-center border border-ink/20 hover:border-ink/40 focus-within:border-ink rounded-lg bg-paper transition-colors",children:[(0,a.Y)("span",{className:"px-2.5 text-ink/40",children:(0,a.Y)(tv,{className:"w-3.5 h-3.5"})}),(0,a.Y)("select",{value:s.overrideModel||"Not selected",onChange:e=>d({...s,overrideModel:e.currentTarget.value}),className:"w-full text-xs font-mono py-2 pr-3 bg-transparent focus:outline-none cursor-pointer text-ink",children:tE.map(e=>(0,a.Y)("option",{value:e,children:e},e))})]})]})]})]}),(0,a.Y)("div",{className:"border-t border-ink/10"}),(0,a.FD)("div",{className:"space-y-2 flex-1 flex flex-col",children:[(0,a.FD)("div",{className:"flex items-center justify-between",children:[(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Command Template"}),(0,a.FD)("p",{className:"text-[11px] text-ink/60 mt-0.5",children:["Use ",(0,a.Y)("code",{className:"text-ink font-semibold font-mono",children:"$ARGUMENTS"}),", ",(0,a.Y)("code",{className:"text-ink font-semibold font-mono",children:"!`shell`"}),", or ",(0,a.Y)("code",{className:"text-ink font-semibold font-mono",children:"@filename"}),"."]})]}),(0,a.Y)("div",{className:"flex items-center gap-2",children:(0,a.FD)("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(s.template),m(!0),setTimeout(()=>m(!1),1800)},className:"flex items-center gap-1.5 text-xs text-ink/60 hover:text-ink transition-colors cursor-pointer",children:[u?(0,a.Y)(r.A,{className:"w-3.5 h-3.5 text-ink"}):(0,a.Y)(tk.A,{className:"w-3.5 h-3.5"}),(0,a.Y)("span",{children:u?"Copied":"Copy"})]})})]}),(0,a.FD)("div",{className:"flex items-center gap-2 py-1",children:[(0,a.Y)("button",{type:"button",onClick:()=>f("$ARGUMENTS"),className:"px-2.5 py-1 text-xs font-mono rounded-md bg-ink/5 hover:bg-ink/10 border border-ink/15 text-ink transition-colors cursor-pointer",children:"+$ARGUMENTS"}),(0,a.Y)("button",{type:"button",onClick:()=>f("!`bun test`"),className:"px-2.5 py-1 text-xs font-mono rounded-md bg-ink/5 hover:bg-ink/10 border border-ink/15 text-ink transition-colors cursor-pointer",children:"+!shell"}),(0,a.Y)("button",{type:"button",onClick:()=>f("@src/App.tsx"),className:"px-2.5 py-1 text-xs font-mono rounded-md bg-ink/5 hover:bg-ink/10 border border-ink/15 text-ink transition-colors cursor-pointer",children:"+@filename"})]}),(0,a.Y)("textarea",{value:s.template,onChange:e=>d({...s,template:e.currentTarget.value}),rows:7,placeholder:"Enter command template instructions...",className:"w-full flex-1 min-h-[140px] text-xs font-mono p-3 rounded-lg border border-ink/20 hover:border-ink/40 bg-ink/5 focus:outline-none focus:border-ink leading-relaxed transition-colors"})]}),(0,a.FD)("div",{className:"pt-3 border-t border-ink/10 flex items-center justify-between",children:[(0,a.Y)("div",{children:!s.isBuiltIn&&!i&&l&&(0,a.FD)("button",{type:"button",onClick:()=>l(s.id),className:"flex items-center gap-1.5 px-3.5 py-2 rounded-lg border border-ink/20 hover:border-error hover:text-error text-ink/70 text-xs font-medium transition-colors cursor-pointer",children:[(0,a.Y)(ek.A,{className:"w-3.5 h-3.5"}),"Delete Command"]})}),(0,a.FD)("div",{className:"flex items-center gap-3",children:[c&&(0,a.FD)("span",{className:"flex items-center gap-1 text-xs text-ink font-medium",children:[(0,a.Y)(r.A,{className:"w-3.5 h-3.5"}),"Saved successfully"]}),(0,a.Y)("button",{type:"submit",className:"px-4 py-2 rounded-lg bg-ink text-paper text-xs font-medium hover:bg-ink/90 transition-colors shadow-xs cursor-pointer",children:i?"Create Command":"Save Command"})]})]})]})},tO=()=>{let[e,t]=(0,n.J0)("ompchamber"),{items:i,selectedId:o,selected:l,isCreatingNew:r,isLoading:s,select:d,startCreate:c,save:p,remove:u}=tA({endpoint:"/api/settings/commands",listKey:"commands",bodyKey:"command",messages:{load:"Failed to load commands from API:",save:"Failed to save command via API:",delete:"Failed to delete command via API:"},cacheKey:"command",buildNew:e=>({...e,id:`cmd-${Date.now()}`,isBuiltIn:!1}),buildUpdate:e=>e,isDeleteError:e=>!!e?.error}),m={id:`new-${Date.now()}`,name:"new-command",description:"",scope:"user",overrideAgent:"Not selected",overrideModel:"Not selected",template:"Execute task: $ARGUMENTS",isBuiltIn:!1};return s?(0,a.Y)(eE,{children:"Loading commands from database..."}):(0,a.FD)("div",{className:"flex h-full w-full overflow-hidden bg-paper",children:[(0,a.Y)(tR,{commands:i,selectedCommandId:r?null:o,onSelectCommand:d,onAddNewCommand:c,selectedProject:e,onChangeProject:t}),(0,a.Y)("div",{className:"flex-1 h-full overflow-hidden flex flex-col",children:r?(0,a.Y)(tL,{command:m,isNew:!0,onSave:p}):l?(0,a.Y)(tL,{command:l,isNew:!1,onSave:p,onDelete:u},l.id):(0,a.Y)("div",{className:"flex-1 flex items-center justify-center text-xs font-mono text-ink/40",children:"Select a command or click + to create one"})})]})},tj=e=>{let{servers:t,projects:i,selectedServerId:n,onSelectServer:o,onAddNewServer:l,selectedProject:r,onChangeProject:s}=e,d=i.find(e=>e.path===r)?.name??"Global (all projects)";return(0,a.FD)("div",{className:"w-56 sm:w-64 border-r border-ink/10 h-full flex flex-col bg-paper/50 flex-shrink-0 select-none",children:[(0,a.Y)(th,{selectedProject:r,onChangeProject:s,options:i.map(e=>({id:e.id,name:e.name,label:e.name,value:e.path})),getTriggerLabel:()=>d}),(0,a.FD)("div",{className:"px-3.5 py-2.5 border-b border-ink/10 flex items-center justify-between",children:[(0,a.FD)("span",{className:"text-xs font-semibold text-ink",children:["Total ",t.length]}),(0,a.Y)("button",{type:"button",onClick:l,title:"Add MCP Server",className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(eg.A,{size:15,strokeWidth:2.2})})]}),(0,a.Y)("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static p-1.5 space-y-3 text-xs",children:(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"px-2.5 pt-1.5 pb-1 text-[10px] font-bold text-ink/50 uppercase tracking-wider flex items-center justify-between",children:[(0,a.Y)("span",{children:"User Servers"}),(0,a.Y)("span",{className:"text-[10px] font-normal",children:t.length})]}),(0,a.Y)("div",{className:"space-y-0.5",children:t.map(e=>{let t=e.id===n,i="command"===e.reachType,l=i?e.commandArgs.join(" "):e.linkUrl||"No URL configured";return(0,a.FD)("button",{type:"button",onClick:()=>o(e.id),className:`w-full text-left px-2.5 py-2 rounded-lg transition-colors cursor-pointer flex flex-col gap-0.5 group ${t?"bg-ink/10 text-ink font-medium shadow-2xs":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[(0,a.FD)("div",{className:"flex items-center justify-between gap-1.5",children:[(0,a.FD)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.Y)("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${e.enabled?"bg-ink":"bg-ink/20"}`,title:e.enabled?"Enabled":"Disabled"}),(0,a.Y)("span",{className:"font-semibold text-xs text-ink truncate",children:e.name})]}),(0,a.Y)("div",{className:"flex items-center gap-1 text-ink/40",children:i?(0,a.Y)(A.A,{className:"w-3.5 h-3.5"}):(0,a.Y)(er.A,{className:"w-3.5 h-3.5"})})]}),(0,a.Y)("p",{className:"text-[11px] font-mono text-ink/60 line-clamp-1 leading-snug pl-4",children:l})]},e.id)})})]})})]})};var tz=i("cQ");function tU(e){let{server:t}=e,[i,o]=(0,n.J0)(!1),[l,s]=(0,n.J0)(null),d=async()=>{o(!0),s(null);try{let e=await fetch("/api/settings/mcp-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({server:t})}),i=await e.json();s(i)}catch(e){s({ok:!1,transport:t.reachType,durationMs:0,error:e instanceof Error?e.message:"Request failed"})}finally{o(!1)}};return(0,a.FD)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.FD)("button",{type:"button",onClick:d,disabled:i,className:"flex items-center gap-1.5 px-3.5 py-2 rounded-lg border border-ink/20 hover:border-ink/40 text-xs font-medium text-ink hover:bg-ink/5 transition-colors disabled:opacity-50 cursor-pointer",children:[(0,a.Y)(tz.A,{className:`w-3.5 h-3.5 ${i?"animate-spin":""}`}),i?"Testing...":"Test Connection"]}),l&&!i&&(l.ok?(0,a.FD)("span",{className:"flex items-center gap-1.5 text-xs text-ink font-medium min-w-0",children:[(0,a.Y)(r.A,{className:"w-3.5 h-3.5 shrink-0"}),(0,a.FD)("span",{className:"truncate",children:[l.serverInfo?.name??t.name,l.serverInfo?.version?` v${l.serverInfo.version}`:""]}),l.protocolVersion&&(0,a.FD)("span",{className:"text-ink/50 shrink-0",children:["· ",l.protocolVersion]}),"number"==typeof l.toolCount&&(0,a.FD)("span",{className:"text-ink/50 shrink-0",children:["· ",l.toolCount," tools"]}),(0,a.FD)("span",{className:"text-ink/50 shrink-0",children:["· ",l.durationMs,"ms"]})]}):(0,a.FD)("span",{className:"flex items-center gap-1 text-xs text-error font-medium min-w-0",title:l.error??"Connection failed",children:[(0,a.Y)(eQ.A,{className:"w-3.5 h-3.5 shrink-0"}),(0,a.Y)("span",{className:"truncate max-w-[280px]",children:l.error??"Connection failed"})]}))]})}function tB(e){return e.split("\n").map(e=>e.trim()).filter(Boolean)}let tK=e=>{let{server:t,isNew:i=!1,onSave:o,onDelete:l,onOpenImportModal:s}=e,[d,c]=(0,n.J0)(t),[p,u]=(0,n.J0)(""),[m,b]=(0,n.J0)(!1);(0,n.vJ)(()=>{c(t),u(t.commandArgs.join("\n")),b(!1)},[t]);let h=(e,t,i)=>{c(a=>({...a,envVars:a.envVars.map(a=>a.id===e?{...a,key:t,value:i}:a)}))},f={...d,commandArgs:tB(p)};return(0,a.FD)("form",{onSubmit:e=>{e.preventDefault();let t=tB(p);o({...d,commandArgs:t}),b(!0),setTimeout(()=>b(!1),2e3)},className:"flex-1 flex flex-col h-full scrollbar-overlay-container scrollbar-overlay-static bg-paper text-ink p-6 md:p-8 space-y-6",children:[(0,a.FD)("div",{className:"flex items-center justify-between pb-4 border-b border-ink/10",children:[(0,a.Y)("div",{children:(0,a.Y)("h2",{className:"text-sm font-bold tracking-tight text-ink",children:i?"Configure a new MCP server":`Edit MCP Server: ${d.name}`})}),(0,a.FD)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border border-ink/20 hover:border-ink/40 hover:bg-ink/5 transition-colors cursor-pointer",children:[(0,a.Y)(tD.A,{className:"w-3.5 h-3.5 text-ink/70"}),(0,a.Y)("span",{children:"Import from JSON snippet"})]})]}),(0,a.FD)("div",{className:"space-y-4",children:[(0,a.FD)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Server Name"}),(0,a.Y)("input",{type:"text",value:d.name,onChange:e=>c({...d,name:e.currentTarget.value}),required:!0,placeholder:"new-mcp-server",className:"w-full text-xs font-mono px-3 py-2 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-ink transition-colors"})]}),(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Scope"}),(0,a.FD)("select",{value:d.scope,onChange:e=>c({...d,scope:e.currentTarget.value}),className:"w-full text-xs py-2 px-3 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink cursor-pointer text-ink transition-colors",children:[(0,a.Y)("option",{value:"every-project",children:"Available in every project"}),(0,a.Y)("option",{value:"this-project",children:"This project only"})]})]})]}),(0,a.FD)("div",{className:"flex items-center gap-2 pt-1",children:[(0,a.Y)("input",{type:"checkbox",id:"enable-mcp",checked:d.enabled,onChange:e=>c({...d,enabled:e.currentTarget.checked}),className:"w-4 h-4 rounded border-ink/30 text-ink focus:ring-0 cursor-pointer"}),(0,a.Y)("label",{htmlFor:"enable-mcp",className:"text-xs font-medium text-ink cursor-pointer select-none",children:"Enable Server"})]})]}),(0,a.Y)("div",{className:"border-t border-ink/10"}),(0,a.FD)("div",{className:"space-y-3",children:[(0,a.FD)("div",{children:[(0,a.Y)("h3",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"How to reach it"}),(0,a.Y)("p",{className:"text-[11px] text-ink/60 mt-0.5",children:"Paste the command that starts it, or the link to a hosted server."})]}),(0,a.FD)("div",{className:"inline-flex rounded-lg border border-ink/20 p-0.5 bg-ink/5",children:[(0,a.FD)("button",{type:"button",onClick:()=>c({...d,reachType:"command"}),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md transition-colors cursor-pointer ${"command"===d.reachType?"bg-paper text-ink shadow-2xs font-semibold":"text-ink/60 hover:text-ink"}`,children:[(0,a.Y)(A.A,{className:"w-3.5 h-3.5"}),"Command"]}),(0,a.FD)("button",{type:"button",onClick:()=>c({...d,reachType:"link"}),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md transition-colors cursor-pointer ${"link"===d.reachType?"bg-paper text-ink shadow-2xs font-semibold":"text-ink/60 hover:text-ink"}`,children:[(0,a.Y)(er.A,{className:"w-3.5 h-3.5"}),"Link"]})]}),"command"===d.reachType?(0,a.FD)("div",{children:[(0,a.Y)("textarea",{value:p,onChange:e=>u(e.currentTarget.value),rows:4,placeholder:`bunx
12
- @modelcontextprotocol/server-postgres
13
- postgresql://user:pass@host/db`,className:"w-full text-xs font-mono p-3 rounded-lg border border-ink/20 hover:border-ink/40 bg-ink/5 focus:outline-none focus:border-ink resize-none leading-relaxed text-ink transition-colors"}),(0,a.Y)("p",{className:"text-[11px] text-ink/50 mt-1",children:"Runs on this machine. Paste a whole command and it is split into one argument per line."})]}):(0,a.FD)("div",{children:[(0,a.Y)("input",{type:"url",value:d.linkUrl||"",onChange:e=>c({...d,linkUrl:e.currentTarget.value}),placeholder:"https://needmcp.com/mcp",className:"w-full text-xs font-mono px-3 py-2 rounded-lg border border-ink/20 hover:border-ink/40 bg-ink/5 focus:outline-none focus:border-ink text-ink transition-colors"}),(0,a.Y)("p",{className:"text-[11px] text-ink/50 mt-1",children:"Connect to a hosted MCP SSE or HTTP endpoint."})]})]}),(0,a.Y)("div",{className:"border-t border-ink/10"}),(0,a.FD)("div",{className:"space-y-3",children:[(0,a.FD)("div",{className:"flex items-center justify-between",children:[(0,a.FD)("div",{children:[(0,a.Y)("h3",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Environment Variables"}),(0,a.Y)("p",{className:"text-[11px] text-ink/60 mt-0.5",children:"Values the server needs, such as an API key."})]}),(0,a.FD)("button",{type:"button",onClick:()=>{let e={id:`env-${Date.now()}`,key:"",value:""};c(t=>({...t,envVars:[...t.envVars,e]}))},className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border border-ink/20 hover:border-ink/40 hover:bg-ink/5 text-ink transition-colors cursor-pointer",children:[(0,a.Y)(eg.A,{className:"w-3.5 h-3.5"}),(0,a.Y)("span",{children:"Add variable"})]})]}),0===d.envVars.length?(0,a.Y)("div",{className:"p-4 rounded-lg border border-dashed border-ink/20 text-center text-xs text-ink/50",children:"No environment variables configured."}):(0,a.Y)("div",{className:"space-y-2",children:d.envVars.map(e=>(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)("input",{type:"text",value:e.key,onChange:t=>h(e.id,t.currentTarget.value,e.value),placeholder:"KEY",className:"w-1/3 text-xs font-mono px-3 py-1.5 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-ink transition-colors"}),(0,a.Y)("input",{type:"text",value:e.value,onChange:t=>h(e.id,e.key,t.currentTarget.value),placeholder:"VALUE",className:"flex-1 text-xs font-mono px-3 py-1.5 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-ink transition-colors"}),(0,a.Y)("button",{type:"button",onClick:()=>{var t;return t=e.id,void c(e=>({...e,envVars:e.envVars.filter(e=>e.id!==t)}))},className:"p-1.5 text-ink/40 hover:text-error transition-colors rounded-md cursor-pointer",title:"Remove variable",children:(0,a.Y)(ek.A,{className:"w-4 h-4"})})]},e.id))})]}),(0,a.FD)("div",{className:"pt-3 border-t border-ink/10 flex items-center justify-between",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[!i&&l&&(0,a.FD)("button",{type:"button",onClick:()=>l(d.id),className:"flex items-center gap-1.5 px-3.5 py-2 rounded-lg border border-ink/20 hover:border-error hover:text-error text-ink/70 text-xs font-medium transition-colors cursor-pointer",children:[(0,a.Y)(ek.A,{className:"w-3.5 h-3.5"}),"Delete"]}),(0,a.Y)(tU,{server:f})]}),(0,a.FD)("div",{className:"flex items-center gap-3",children:[m&&(0,a.FD)("span",{className:"flex items-center gap-1 text-xs text-ink font-medium",children:[(0,a.Y)(r.A,{className:"w-3.5 h-3.5"}),"Saved successfully"]}),(0,a.Y)("button",{type:"submit",className:"px-4 py-2 rounded-lg bg-ink text-paper text-xs font-medium hover:bg-ink/90 transition-colors shadow-xs cursor-pointer",children:i?"Create Server":"Save Changes"})]})]})]})},t$=`{
14
- "mcpServers": {
15
- "postgres-db": {
16
- "command": "bunx",
17
- "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost:5432/db"],
18
- "env": {
19
- "DEBUG": "1"
20
- }
21
- }
22
- }
23
- }`,t_=e=>{let{isOpen:t,onClose:i,onImport:o}=e,[r,s]=(0,n.J0)(t$),[d,c]=(0,n.J0)(null);if(!t)return null;let p=(e,t)=>{let a="string"==typeof t.url&&t.url.length>0,n=[];a||0===(n=[..."string"==typeof t.command?[t.command]:[],...Array.isArray(t.args)?t.args.map(String):[]]).length&&(n=["bunx","@modelcontextprotocol/server-everything"]);let l=[];t.env&&"object"==typeof t.env&&Object.entries(t.env).forEach((e,t)=>{let[i,a]=e;l.push({id:`env-${Date.now()}-${t}`,key:i,value:String(a)})}),o({id:`mcp-${Date.now()}`,name:e,scope:"every-project",enabled:!0,reachType:a?"link":"command",commandArgs:n,linkUrl:a?t.url:void 0,envVars:l,status:"active"}),i()};return(0,a.Y)("div",{className:"fixed inset-0 bg-ink/40 backdrop-blur-[2px] z-50 flex items-center justify-center p-4 animate-in fade-in duration-150",children:(0,a.FD)("div",{className:"w-full max-w-lg rounded-lg border border-ink/20 bg-paper text-ink p-5 shadow-2xl space-y-4",children:[(0,a.FD)("div",{className:"flex items-center justify-between pb-3 border-b border-ink/10",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)(tD.A,{className:"w-4 h-4 text-ink/70"}),(0,a.Y)("h2",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Import MCP Server from JSON"})]}),(0,a.Y)("button",{type:"button",onClick:i,className:"p-1 rounded-md text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(l.A,{className:"w-4 h-4"})})]}),(0,a.Y)("p",{className:"text-xs text-ink/70 leading-relaxed",children:"Paste a configuration block from Claude Desktop, VS Code, or Cursor settings."}),(0,a.Y)("textarea",{value:r,onChange:e=>{s(e.currentTarget.value),c(null)},rows:10,className:"w-full text-xs font-mono p-3 rounded-lg border border-ink/20 hover:border-ink/40 bg-ink/5 focus:outline-none focus:border-ink resize-none leading-relaxed text-ink transition-colors",placeholder:"Paste JSON snippet here..."}),d&&(0,a.FD)("div",{className:"flex items-center gap-2 text-xs text-error p-2.5 rounded-lg bg-error/10 border border-error/20",children:[(0,a.Y)(eQ.A,{className:"w-4 h-4 flex-shrink-0"}),(0,a.Y)("span",{className:"font-medium",children:d})]}),(0,a.FD)("div",{className:"pt-3 border-t border-ink/10 flex items-center justify-end gap-2",children:[(0,a.Y)("button",{type:"button",onClick:i,className:"px-3.5 py-2 rounded-lg border border-ink/20 hover:border-ink/40 text-xs font-medium text-ink/80 hover:text-ink transition-colors cursor-pointer",children:"Cancel"}),(0,a.Y)("button",{type:"button",onClick:()=>{c(null);try{let e=JSON.parse(r);if(e.mcpServers&&"object"==typeof e.mcpServers){let t=Object.keys(e.mcpServers);if(0===t.length)throw Error('No servers found inside "mcpServers" object.');let i=t[0],a=e.mcpServers[i];p(i,a);return}let t=e.name||"imported-mcp-server";p(t,e)}catch(e){c(e instanceof Error?e.message:"Invalid JSON format")}},className:"px-4 py-2 rounded-lg bg-ink text-paper text-xs font-medium hover:bg-ink/90 transition-colors shadow-xs cursor-pointer",children:"Import Server"})]})]})})};var tq=i("A9");let tJ={id:"global",name:"Global (all projects)",path:""},tG=()=>{let{folders:e}=(0,tq.k)(),t=(0,n.Kr)(()=>[tJ,...e.flatMap(e=>e.project_path?[{id:String(e.id),name:e.name,path:e.project_path}]:[])],[e]),[i,o]=(0,n.J0)(!1),[l,r]=(0,n.J0)(""),{items:s,selectedId:d,selected:c,isCreatingNew:p,isLoading:u,select:m,startCreate:b,save:h,remove:f}=tA({endpoint:"/api/settings/mcp",listKey:"servers",bodyKey:"server",query:l?`?project=${encodeURIComponent(l)}`:"",messages:{load:"Failed to load MCP servers from API:",save:"Failed to save MCP server via API:",delete:"Failed to delete MCP server via API:"},serverListOnly:!0,deleteFromResponse:!0,buildNew:e=>({...e,id:`mcp-${Date.now()}`}),buildUpdate:e=>e,buildBody:e=>l?{server:e,projectPath:l}:{server:e},buildDeleteQuery:e=>{let t=new URLSearchParams({id:e});return l&&t.set("projectPath",l),`?${t.toString()}`},readList:e=>Array.isArray(e?.servers)?e.servers:null,resolveOnLoad:(e,t)=>e&&t.some(t=>t.id===e)?e:t[0]?.id??null,resolveOnSave:(e,t)=>{if(!t)return;let i=t.find(t=>t.name.toLowerCase()===e.name.toLowerCase());return i?.id??e.id},isSaveError:e=>{let t=e?.error;return!!t&&(console.error("Failed to save MCP server via API:",t),!0)},isDeleteError:e=>{let t=e?.error;return!!t&&(console.error("Failed to delete MCP server via API:",t),!0)}}),g={id:`new-${Date.now()}`,name:"new-mcp-server",scope:"every-project",enabled:!0,reachType:"command",commandArgs:["bunx","@modelcontextprotocol/server-everything"],envVars:[],status:"active"};return u?(0,a.Y)(eE,{children:"Loading MCP servers from database..."}):(0,a.FD)("div",{className:"flex h-full w-full overflow-hidden bg-paper",children:[(0,a.Y)(tj,{servers:s,projects:t,selectedServerId:p?null:d,onSelectServer:m,onAddNewServer:b,selectedProject:l,onChangeProject:r}),(0,a.Y)("div",{className:"flex-1 h-full overflow-hidden flex flex-col",children:p?(0,a.Y)(tK,{server:g,isNew:!0,onSave:h,onOpenImportModal:()=>o(!0)}):c?(0,a.Y)(tK,{server:c,isNew:!1,onSave:h,onDelete:f,onOpenImportModal:()=>o(!0)},c.id):(0,a.Y)("div",{className:"flex-1 flex items-center justify-center text-xs font-mono text-ink/40",children:"Select an MCP server or click + to configure one"})}),(0,a.Y)(t_,{isOpen:i,onClose:()=>o(!1),onImport:e=>{h(e)}})]})};var tH=i("Nf");function tW(e){let{skills:t,selectedSkillId:i,isCreatingNew:o,onSelectSkill:l,onAddNewSkill:r,selectedProject:s,onSelectProject:d}=e,[c,p]=(0,n.J0)({}),u={},m=[];t.forEach(e=>{e.group?(u[e.group]||(u[e.group]=[]),u[e.group].push(e)):m.push(e)});let b=t.length;return(0,a.FD)("div",{className:"w-56 sm:w-64 border-r border-ink/10 h-full flex flex-col bg-paper/50 flex-shrink-0",children:[(0,a.Y)(th,{variant:"compact",selectedProject:s,onChangeProject:d,getTriggerLabel:(e,t)=>e.find(e=>e.id===t)?.label||t}),(0,a.FD)("div",{className:"px-3.5 py-2.5 border-b border-ink/10 flex items-center justify-between",children:[(0,a.FD)("span",{className:"text-xs font-semibold text-ink",children:["Total ",b]}),(0,a.Y)("button",{type:"button",onClick:r,title:"Create New Skill",className:"p-1 rounded-md text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(eg.A,{size:15,strokeWidth:2.2})})]}),(0,a.FD)("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static p-1.5 space-y-2",children:[(0,a.Y)("div",{className:"px-2 pt-1 pb-0.5 text-[10px] font-bold text-ink/50 uppercase tracking-wider",children:"USER SKILLS"}),o&&(0,a.Y)("div",{className:"px-2.5 py-1.5 rounded-lg bg-ink/10 text-ink font-medium text-xs shadow-2xs",children:(0,a.Y)("span",{className:"truncate",children:"new-skill"})}),Object.entries(u).map(e=>{let[t,n]=e,r=!!c[t];return(0,a.FD)("div",{className:"space-y-0.5",children:[(0,a.FD)("button",{type:"button",onClick:()=>{p(e=>({...e,[t]:!e[t]}))},className:"w-full flex items-center justify-between px-2 py-1 rounded-md text-xs font-semibold text-ink/80 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:[(0,a.FD)("div",{className:"flex items-center gap-1.5 truncate",children:[r?(0,a.Y)(tH.A,{size:13,className:"text-ink/60"}):(0,a.Y)(eA.A,{size:13,className:"text-ink/60"}),(0,a.Y)("span",{className:"truncate tracking-tight uppercase text-[11px] font-bold text-ink/90",children:t})]}),(0,a.Y)("span",{className:"text-[10px] font-mono text-ink/50 px-1.5 py-0.2 rounded bg-ink/5",children:n.length})]}),!r&&(0,a.Y)("div",{className:"pl-3 space-y-0.5 border-l border-ink/10 ml-2.5",children:n.map(e=>{let t=!o&&i===e.id;return(0,a.Y)("button",{type:"button",onClick:()=>l(e.id),className:`w-full text-left px-2.5 py-1.5 rounded-lg text-xs transition-colors cursor-pointer truncate block ${t?"bg-ink/10 text-ink font-medium shadow-2xs":"text-ink/70 hover:bg-ink/5 hover:text-ink"}`,children:e.name},e.id)})})]},t)}),(0,a.Y)("div",{className:"space-y-0.5 pt-1",children:m.map(e=>{let t=!o&&i===e.id;return(0,a.Y)("button",{type:"button",onClick:()=>l(e.id),className:`w-full text-left px-2.5 py-1.5 rounded-lg text-xs transition-colors cursor-pointer truncate block ${t?"bg-ink/10 text-ink font-medium shadow-2xs":"text-ink/70 hover:bg-ink/5 hover:text-ink"}`,children:e.name},e.id)})})]})]})}var tV=i("rD");function tX(e){let{skill:t,isCreatingNew:i,onSave:o,onDelete:l,onOpenCatalog:s}=e,[d,c]=(0,n.J0)(""),[p,u]=(0,n.J0)(""),[m,b]=(0,n.J0)("user"),[h,f]=(0,n.J0)("User / OpenCode"),[g,v]=(0,n.J0)(""),[x,k]=(0,n.J0)(!1),[y,w]=(0,n.J0)(!0);(0,n.vJ)(()=>{i||!t?(c("new-skill"),u(""),b("user"),f("User / OpenCode"),v(`---
24
- description: ""
25
- ---
26
- `)):(c(t.name),u(t.description),b(t.location),f(t.locationLabel||"User / OpenCode"),v(t.instructions))},[t,i]);let N=Math.max(g.split("\n").length,6);return(0,a.FD)("div",{className:"flex-1 flex flex-col h-full scrollbar-overlay-container scrollbar-overlay-static bg-paper text-ink p-6 md:p-8 space-y-6",children:[(0,a.FD)("div",{className:"flex items-start justify-between pb-4 border-b border-ink/10 gap-4",children:[(0,a.FD)("div",{children:[(0,a.Y)("h2",{className:"text-sm font-bold tracking-tight text-ink",children:i?"New Skill":d}),(0,a.Y)("p",{className:"text-xs text-ink/60 mt-0.5",children:i?"Configure a new skill":"Configure skill details and prompt rules"})]}),s&&(0,a.FD)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-ink/20 hover:border-ink/40 text-xs font-medium text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:[(0,a.Y)(q.A,{size:14,className:"text-ink/70"}),(0,a.Y)("span",{children:"Browse Catalog"})]})]}),(0,a.FD)("div",{className:"space-y-4",children:[(0,a.Y)("h3",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Basic Information"}),(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,a.Y)("label",{className:"text-xs font-semibold text-ink/80",children:"Skill Name & Location"}),(0,a.FD)("div",{className:"group relative",children:[(0,a.Y)(eN.A,{size:13,className:"text-ink/40 cursor-help"}),(0,a.Y)("div",{className:"absolute left-0 top-5 hidden group-hover:block w-64 p-2 rounded-lg bg-ink text-paper text-[11px] shadow-lg z-20 pointer-events-none leading-relaxed",children:"Unique identifier and runtime execution scope for this skill."})]})]}),(0,a.FD)("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.Y)("input",{type:"text",value:d,onChange:e=>c(e.currentTarget.value),placeholder:"skill-name",className:"flex-1 px-3 py-2 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-xs font-mono text-ink transition-colors"}),(0,a.FD)("div",{className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-ink/20 bg-ink/5 text-xs text-ink/80 flex-shrink-0",children:[(0,a.Y)(tV.A,{size:14,className:"text-ink/60"}),(0,a.Y)("span",{children:h})]})]})]}),(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,a.FD)("label",{className:"text-xs font-semibold text-ink/80",children:["Description ",(0,a.Y)("span",{className:"text-error",children:"*"})]}),(0,a.FD)("div",{className:"group relative",children:[(0,a.Y)(eN.A,{size:13,className:"text-ink/40 cursor-help"}),(0,a.Y)("div",{className:"absolute left-0 top-5 hidden group-hover:block w-64 p-2 rounded-lg bg-ink text-paper text-[11px] shadow-lg z-20 pointer-events-none leading-relaxed",children:"Short description helping autonomous agents decide when to invoke this skill."})]})]}),(0,a.Y)("textarea",{rows:3,value:p,onChange:e=>u(e.currentTarget.value),placeholder:"Brief description of what this skill does...",className:"w-full px-3 py-2 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-xs text-ink transition-colors resize-none leading-relaxed"})]})]}),(0,a.FD)("div",{className:"space-y-2 pt-2 border-t border-ink/10",children:[(0,a.FD)("div",{className:"flex items-center justify-between",children:[(0,a.Y)("h3",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Instructions"}),(0,a.Y)("button",{type:"button",onClick:()=>w(!y),title:y?"Hide Line Numbers":"Show Line Numbers",className:"p-1 rounded-md text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:y?(0,a.Y)(e2.A,{size:15}):(0,a.Y)(e3.A,{size:15})})]}),(0,a.Y)("div",{className:"rounded-lg border border-ink/20 hover:border-ink/40 bg-ink/5 overflow-hidden flex flex-col font-mono text-xs focus-within:border-ink transition-colors",children:(0,a.FD)("div",{className:"flex",children:[y&&(0,a.Y)("div",{className:"w-10 py-3 pr-2 select-none text-right font-mono text-xs text-ink/30 border-r border-ink/10 bg-ink/[0.02] overflow-hidden leading-relaxed",children:Array.from({length:N}).map((e,t)=>(0,a.Y)("div",{children:t+1},t))}),(0,a.Y)("textarea",{rows:Math.max(N,8),value:g,onChange:e=>v(e.currentTarget.value),spellcheck:!1,className:"flex-1 p-3 bg-transparent text-ink font-mono text-xs leading-relaxed resize-none focus:outline-none overflow-y-auto",placeholder:"Type markdown instructions..."})]})})]}),(0,a.FD)("div",{className:"pt-4 border-t border-ink/10 flex items-center justify-between",children:[!i&&t&&l?(0,a.FD)("button",{type:"button",onClick:()=>l(t.id),className:"flex items-center gap-1.5 px-3.5 py-2 rounded-lg border border-ink/20 hover:border-error hover:text-error text-ink/70 text-xs font-medium transition-colors cursor-pointer",children:[(0,a.Y)(ek.A,{size:14}),(0,a.Y)("span",{children:"Delete Skill"})]}):(0,a.Y)("div",{}),(0,a.FD)("button",{type:"button",onClick:()=>{o({name:d.trim()||"unnamed-skill",description:p.trim(),location:m,locationLabel:h,instructions:g}),k(!0),setTimeout(()=>k(!1),2e3)},className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-ink text-paper text-xs font-medium hover:bg-ink/90 transition-colors shadow-xs cursor-pointer",children:[x?(0,a.Y)(r.A,{size:14}):(0,a.Y)(tC.A,{size:14}),(0,a.Y)("span",{children:x?"Saved":i?"Create Skill":"Save Changes"})]})]})]})}function tQ(e){let{onNavigateToCatalog:t}=e,[i,o]=(0,n.J0)("ompchamber"),{items:l,selectedId:r,selected:s,isCreatingNew:d,isLoading:c,select:p,startCreate:u,save:m,remove:b}=tA({endpoint:"/api/settings/skills",listKey:"skills",bodyKey:"skill",messages:{load:"Failed to load skills from API:",save:"Failed to save skill via API:",delete:"Failed to delete skill via API:"},cacheKey:"command",fallbackToFirst:!1,buildNew:e=>({id:`skill-${Date.now()}`,name:e.name||"new-skill",description:e.description||"",location:e.location||"user",locationLabel:e.locationLabel||"User / OpenCode",instructions:e.instructions||"",project:i}),buildUpdate:(e,t,i)=>({...t||{id:i||`skill-${Date.now()}`},...e}),isDeleteError:e=>!!e?.error});return c?(0,a.Y)(eE,{children:"Loading skills from database..."}):(0,a.FD)("div",{className:"flex-1 flex flex-col md:flex-row h-full w-full overflow-hidden bg-paper",children:[(0,a.Y)(tW,{skills:l,selectedSkillId:r,isCreatingNew:d,onSelectSkill:p,onAddNewSkill:u,selectedProject:i,onSelectProject:o}),(0,a.Y)(tX,{skill:s??null,isCreatingNew:d,onSave:m,onDelete:b,onOpenCatalog:t})]})}var tZ=i("HW"),t0=i("vZ"),t1=i("q"),t5=i("tC");function t2(e){let{isOpen:t,onClose:i,onAddSource:o}=e,[r,s]=(0,n.J0)(""),[d,c]=(0,n.J0)(""),[p,u]=(0,n.J0)(null);return t?(0,a.Y)("div",{className:"fixed inset-0 z-50 bg-ink/40 backdrop-blur-[2px] flex items-center justify-center p-4",onClick:i,children:(0,a.FD)("div",{className:"bg-paper border border-ink/20 rounded-xl max-w-md w-full p-6 shadow-2xl space-y-4 text-ink animate-in fade-in zoom-in-95 duration-150",onClick:e=>e.stopPropagation(),children:[(0,a.FD)("div",{className:"flex items-center justify-between pb-3 border-b border-ink/10",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)(t0.A,{className:"w-4 h-4 text-ink/70"}),(0,a.Y)("h2",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Add Custom Skill Source"})]}),(0,a.Y)("button",{type:"button",onClick:i,className:"p-1 rounded-md text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(l.A,{className:"w-4 h-4"})})]}),(0,a.Y)("p",{className:"text-xs text-ink/70 leading-relaxed",children:"Connect any public or private Git repository containing skill definitions and prompt directives."}),(0,a.FD)("form",{onSubmit:e=>{e.preventDefault();let t=r.trim().replace(/^https?:\/\/github\.com\//,"").replace(/\/$/,"");if(!t)return void u("Please provide a valid GitHub repository path (e.g. owner/repo).");let a=d.trim()||t.split("/")[1]||t;o({id:`custom-${Date.now()}`,name:a,repo:t,stars:"1.2K",updatedAt:"Just now",skillCount:3,isCustom:!0}),s(""),c(""),u(null),i()},className:"space-y-4",children:[(0,a.FD)("div",{children:[(0,a.Y)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:"Source Name"}),(0,a.Y)("input",{type:"text",value:d,onChange:e=>c(e.currentTarget.value),placeholder:"e.g. Acme Internal Skills",className:"w-full px-3 py-2 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-xs text-ink transition-colors"})]}),(0,a.FD)("div",{children:[(0,a.FD)("label",{className:"block text-xs font-semibold text-ink/80 mb-1.5",children:["Git Repository ",(0,a.Y)("span",{className:"text-error",children:"*"})]}),(0,a.Y)("input",{type:"text",value:r,onChange:e=>{s(e.currentTarget.value),u(null)},placeholder:"e.g. owner/skills-repo or https://github.com/...",className:"w-full px-3 py-2 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-xs font-mono text-ink transition-colors"})]}),p&&(0,a.FD)("div",{className:"flex items-center gap-2 text-xs text-error p-2.5 rounded-lg bg-error/10 border border-error/20",children:[(0,a.Y)(eQ.A,{className:"w-4 h-4 flex-shrink-0"}),(0,a.Y)("span",{className:"font-medium",children:p})]}),(0,a.FD)("div",{className:"pt-3 border-t border-ink/10 flex items-center justify-end gap-2",children:[(0,a.Y)("button",{type:"button",onClick:i,className:"px-3.5 py-2 rounded-lg border border-ink/20 hover:border-ink/40 text-xs font-medium text-ink/80 hover:text-ink transition-colors cursor-pointer",children:"Cancel"}),(0,a.FD)("button",{type:"submit",className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-ink text-paper text-xs font-medium hover:bg-ink/90 transition-colors shadow-xs cursor-pointer",children:[(0,a.Y)(eg.A,{size:14}),(0,a.Y)("span",{children:"Add Source"})]})]})]})]})}):null}function t3(){let{sources:e,catalogSkills:t,userSkills:i,setSources:o,setUserSkills:l,reload:s}=function(){let[e,t]=(0,n.J0)([]),[i,a]=(0,n.J0)([]),[o,l]=(0,n.J0)([]),r=(0,n.hb)(async()=>{let e=await fetch("/api/settings/skills"),i=await e.json();i?.catalogSources&&t(i.catalogSources),i?.catalogSkills&&a(i.catalogSkills),i?.skills&&l(i.skills)},[]);return(0,n.vJ)(()=>{r().catch(console.error)},[r]),{sources:e,catalogSkills:i,userSkills:o,setSources:t,setUserSkills:l,reload:r}}(),[d,c]=(0,n.J0)("anthropic"),[p,u]=(0,n.J0)(""),[m,b]=(0,n.J0)(!1),[h,f]=(0,n.J0)(!1),[g,v]=(0,n.J0)(null),x=new Set(i.map(e=>e?.name).filter(Boolean)),k=e=>{v(e),setTimeout(()=>v(null),2500)},y=t.filter(e=>{let t=!p.trim()||e.name.toLowerCase().includes(p.toLowerCase())||e.description.toLowerCase().includes(p.toLowerCase())||e.repoTag.toLowerCase().includes(p.toLowerCase());return p.trim()?t:e.sourceId===d}),w=e.find(e=>e.id===d)||e[0]||null;return(0,a.FD)("div",{className:"flex-1 flex flex-col h-full w-full scrollbar-overlay-container scrollbar-overlay-static bg-paper text-ink p-6 md:p-8 space-y-6",children:[(0,a.Y)("div",{children:(0,a.Y)("p",{className:"text-xs text-ink/70 leading-relaxed",children:"Install ready-made skills from curated repositories, or add your own source."})}),(0,a.FD)("div",{className:"relative",children:[(0,a.Y)(D.A,{size:15,className:"absolute left-3 top-2.5 text-ink/40 pointer-events-none"}),(0,a.Y)("input",{type:"text",value:p,onChange:e=>u(e.currentTarget.value),placeholder:"Search skills across all sources...",className:"w-full pl-9 pr-4 py-2 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-xs text-ink transition-colors"})]}),(0,a.FD)("div",{className:"space-y-3",children:[(0,a.Y)("h3",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:"Sources"}),(0,a.FD)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.map(e=>{let t=d===e.id&&!p.trim();return(0,a.FD)("div",{onClick:()=>{c(e.id),u("")},className:`p-3.5 rounded-xl border transition-all cursor-pointer select-none relative ${t?"border-ink bg-ink/5 shadow-xs":"border-ink/20 hover:border-ink/40 bg-paper"}`,children:[(0,a.FD)("div",{className:"flex items-center justify-between",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)("span",{className:"text-xs font-bold text-ink",children:e.name}),(0,a.FD)("span",{className:"text-[10px] text-ink/50 font-mono",children:[e.skillCount," skills"]})]}),(0,a.Y)(F.A,{size:13,className:`text-ink/40 hover:text-ink transition-colors ${m&&t?"animate-spin":""}`})]}),(0,a.Y)("div",{className:"mt-1 font-mono text-[11px] text-ink/60 truncate",children:e.repo}),(0,a.FD)("div",{className:"mt-2.5 flex items-center gap-3 text-[10px] text-ink/50",children:[(0,a.FD)("span",{className:"flex items-center gap-1",children:[(0,a.Y)(tZ.A,{size:11,className:"text-ink/50"}),(0,a.Y)("span",{children:e.stars})]}),(0,a.Y)("span",{children:e.updatedAt})]})]},e.id)}),(0,a.FD)("div",{onClick:()=>f(!0),className:"p-3.5 rounded-xl border border-dashed border-ink/25 hover:border-ink/50 bg-paper hover:bg-ink/[0.02] transition-all cursor-pointer flex items-center gap-3 select-none",children:[(0,a.Y)("div",{className:"w-8 h-8 rounded-lg border border-ink/20 flex items-center justify-center text-ink/60 flex-shrink-0",children:(0,a.Y)(eg.A,{size:16})}),(0,a.FD)("div",{children:[(0,a.Y)("div",{className:"text-xs font-bold text-ink",children:"Add your own source"}),(0,a.Y)("div",{className:"text-[11px] text-ink/60",children:"Any Git repository with skills"})]})]})]})]}),(0,a.FD)("div",{className:"border-t border-ink/10 pt-4",children:[(0,a.FD)("div",{className:"flex items-center justify-between pb-3",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.Y)("span",{className:"text-xs font-bold uppercase tracking-wider text-ink",children:p.trim()?"Search Results":w?.name?w.name.toUpperCase():"SKILL CATALOG"}),(0,a.FD)("span",{className:"text-xs text-ink/50",children:[y.length," skill(s) found"]})]}),(0,a.Y)("button",{type:"button",onClick:()=>{b(!0),s().then(()=>k("Catalog index synchronized")).catch(console.error).finally(()=>b(!1))},title:"Refresh skills",className:"p-1 rounded-md text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",children:(0,a.Y)(F.A,{size:14,className:m?"animate-spin":""})})]}),(0,a.Y)("div",{className:"space-y-3",children:0===y.length?(0,a.Y)("div",{className:"text-center py-10 border border-dashed border-ink/15 rounded-xl",children:(0,a.Y)("p",{className:"text-xs text-ink/60",children:"No skills found matching your query."})}):y.map(e=>{let t=x.has(e.name);return(0,a.FD)("div",{className:"p-4 rounded-xl border border-ink/15 hover:border-ink/30 bg-paper transition-all flex flex-col sm:flex-row sm:items-start justify-between gap-3",children:[(0,a.FD)("div",{className:"space-y-1.5 flex-1 min-w-0",children:[(0,a.Y)("div",{className:"flex items-center gap-2",children:(0,a.Y)("span",{className:"text-xs font-bold text-ink tracking-tight font-mono",children:e.name})}),(0,a.Y)("p",{className:"text-xs text-ink/75 leading-relaxed line-clamp-2",children:e.description}),(0,a.FD)("div",{className:"flex items-center gap-1.5 text-[11px] text-ink/50 font-mono pt-1",children:[(0,a.Y)(t0.A,{size:12,className:"flex-shrink-0"}),(0,a.Y)("span",{className:"truncate",children:e.repoTag})]})]}),(0,a.FD)("div",{className:"flex items-center gap-2 flex-shrink-0 self-end sm:self-center",children:[e.githubUrl&&(0,a.Y)("a",{href:e.githubUrl,target:"_blank",rel:"noreferrer",className:"p-1.5 rounded-lg text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer",title:"View repository",children:(0,a.Y)(t1.A,{size:14})}),(0,a.Y)("button",{type:"button",onClick:()=>(e=>{let t=i.find(t=>t.name===e.name);if(t)fetch(`/api/settings/skills?id=${encodeURIComponent(t.id)}`,{method:"DELETE"}).then(e=>e.json()).then(t=>{t?.error||((0,tN.SA)("command"),fetch("/api/settings/skills").then(e=>e.json()).then(e=>{e?.skills&&l(e.skills)}),k(`Uninstalled skill "${e.name}"`))}).catch(console.error);else{let t={id:`skill-cat-${Date.now()}`,name:e.name,description:e.description,location:"user",locationLabel:"User / OpenCode",instructions:e.instructions||`---
27
- description: "${e.description}"
28
- ---
29
-
30
- ## Instructions
31
- Follow standard prompt protocol for ${e.name}.`,project:"ompchamber",isInstalledFromCatalog:!0,catalogSource:e.sourceId};fetch("/api/settings/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({skill:t})}).then(e=>e.json()).then(i=>{i?.skills?l(i.skills):l(e=>[...e,t]),k(`Installed skill "${e.name}"`),(0,tN.SA)("command")}).catch(console.error)}})(e),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all flex items-center gap-1.5 cursor-pointer ${t?"border border-ink/20 text-ink/80 hover:border-error hover:text-error hover:bg-error/5":"bg-ink text-paper hover:bg-ink/90 shadow-xs"}`,children:t?(0,a.FD)(a.FK,{children:[(0,a.Y)(r.A,{size:12}),(0,a.Y)("span",{children:"Installed"})]}):(0,a.FD)(a.FK,{children:[(0,a.Y)(t5.A,{size:12}),(0,a.Y)("span",{children:"install"})]})})]})]},e.id)})})]}),(0,a.Y)(t2,{isOpen:h,onClose:()=>f(!1),onAddSource:t=>{let i=[...e,t];o(i),c(t.id),fetch("/api/settings/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({catalogSources:i})}).catch(console.error),k(`Added source "${t.name}"`)}}),g&&(0,a.FD)("div",{className:"fixed bottom-6 right-6 z-50 bg-ink text-paper text-xs font-medium px-4 py-2.5 rounded-lg shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-150 flex items-center gap-2",children:[(0,a.Y)(r.A,{size:14}),(0,a.Y)("span",{children:g})]})]})}function t4(e){let{category:t}=e;return(0,a.FD)("div",{className:"space-y-6 text-ink flex flex-col items-center justify-center py-16",children:[(0,a.FD)("div",{className:"text-sm font-semibold capitalize",children:[t.replace("-"," ")," Settings"]}),(0,a.Y)("div",{className:"text-xs text-ink/60 text-center max-w-sm mt-2",children:"This settings category is currently under construction and will be available soon."})]})}var t6=JSON.parse('{"source":"settings-schema.ts","tabs":[{"id":"appearance","label":"Appearance","groups":["Theme","Composer","Status Line","Display","Images"]},{"id":"model","label":"Model","groups":["Thinking","Sampling","Prompt","Retry & Fallback","Advisor","Prewalk","Vision"]},{"id":"interaction","label":"Interaction","groups":["Input","Approvals","Notifications","Speech","Collab","Magic Keywords","Startup & Updates","Power","Agent","Git"]},{"id":"context","label":"Context","groups":["General","Compaction","Rules (TTSR)","Experimental"]},{"id":"memory","label":"Memory","groups":["General","Auto-Learn","Mnemopi","Hindsight","Sharpshooter"]},{"id":"files","label":"Files","groups":["Editing","Reading","Read Summaries","LSP"]},{"id":"shell","label":"Shell","groups":["Bash","Eval & Runtimes"]},{"id":"tools","label":"Tools","groups":["Available Tools","Todos","Grep & Browser","Computer","GitHub","Output Limits","Execution","Discovery & MCP","Extensions","Developer"]},{"id":"tasks","label":"Tasks","groups":["Modes","Subagents","Isolation","Commands & Skills"]},{"id":"providers","label":"Providers","groups":["Services","Fireworks","Tiny Model","Protocol","Timeouts","Privacy"]}],"entries":{"autoResume":{"ui":{"tab":"interaction","group":"Startup & Updates","label":"Auto Resume","description":"Automatically resume the most recent session in the current directory"},"type":"boolean","default":false},"power.sleepPrevention":{"ui":{"tab":"interaction","group":"Power","label":"Sleep Prevention","description":"Prevent the system sleeping during active sessions. Each level is cumulative — it adds the flags of all lower levels.","options":[{"value":"off","label":"Off","description":"Do not prevent any sleep"},{"value":"idle","label":"Prevent Idle Sleep","description":"Keep the system awake while a session is open (macOS `caffeinate -i`)"},{"value":"display","label":"Prevent Display Sleep","description":"Also keep the display from idle-sleeping (macOS `caffeinate -i -d`)"},{"value":"system","label":"Prevent System Sleep","description":"Also block all system sleep on AC and declare the user active (macOS `caffeinate -i -d -s -u`)"}]},"type":"enum","default":"idle","values":["off","idle","display","system"]},"advisor.enabled":{"ui":{"tab":"model","group":"Advisor","label":"Enable Advisor","description":"Pair a second model (assigned to the \'advisor\' role) that passively reviews each turn and injects notes."},"type":"boolean","default":false},"prewalk.enabled":{"ui":{"tab":"model","group":"Prewalk","label":"Enable Prewalk","description":"Start on the active model, then switch to a fast/cheap model (default the \'smol\' role) at the first edit/write after the plan nudge\'s todo list exists — the strong model plans, commits the todos, and starts the implementation before handing off. Overridable per session with --prewalk / --no-prewalk."},"type":"boolean","default":false},"advisor.syncBacklog":{"ui":{"tab":"model","group":"Advisor","label":"Advisor Sync Backlog","description":"Pause the main agent for up to 30 seconds if the advisor falls behind by this many turns. Off disables catch-up delays.","condition":"advisorEnabled"},"type":"enum","default":"off","values":["off","1","3","5"]},"advisor.immuneTurns":{"ui":{"tab":"model","group":"Advisor","label":"Advisor Immune Turns","description":"After an advisor concern or blocker interrupts, route further concerns/blockers non-interruptingly for this many primary turns.","condition":"advisorEnabled","options":[{"value":"0","label":"0 turns","description":"Allow every concern/blocker to interrupt."},{"value":"1","label":"1 turn","description":""},{"value":"2","label":"2 turns","description":""},{"value":"3","label":"3 turns","description":"Default."},{"value":"4","label":"4 turns","description":""},{"value":"5","label":"5 turns","description":""}]},"type":"number","default":3},"advisor.maxNotesPerUpdate":{"ui":{"tab":"model","group":"Advisor","label":"Advisor Max Notes Per Update","description":"Maximum non-blocker advice notes accepted per advisor prompt update (1–32; UI offers 1–5 quick picks). Blockers are exempt.","condition":"advisorEnabled","options":[{"value":"1","label":"1 note","description":"Anti-flood (strict)."},{"value":"2","label":"2 notes","description":""},{"value":"3","label":"3 notes","description":""},{"value":"4","label":"4 notes","description":"Default."},{"value":"5","label":"5 notes","description":""}]},"type":"number","default":4},"git.enabled":{"ui":{"tab":"interaction","group":"Git","label":"Enable Git Integration","description":"Show git branch, status, and PR information in the TUI and watch repository metadata."},"type":"boolean","default":true},"providers.maxInFlightRequests":{"ui":{"tab":"providers","group":"Services","label":"Max In-Flight Requests","description":"Maximum concurrent LLM requests per provider id (for example \\"openai\\" or \\"anthropic\\"), shared across local OMP processes with this config root. Omitted providers are unlimited."},"type":"record","default":{}},"providers.openai-codex.codeMode":{"ui":{"tab":"providers","group":"Services","label":"Codex Code Mode","description":"Route Codex code_mode_only models (GPT-5.6) through eval. The direct tools are eval, ask, todo, yield, think, checkpoint, and rewind. Use eval cells for other session tools. Mirrors codex-rs Code Mode. \'auto\' follows the model catalog flag."},"type":"enum","default":"off","values":["off","on","auto"]},"providers.openai-codex.codeModeDirectTools":{"ui":{"tab":"providers","group":"Services","label":"Codex Code Mode Direct Tools","description":"Extra direct tools for Codex Code Mode. The standard direct tools are eval, ask, todo, yield, think, checkpoint, and rewind."},"type":"array","default":[]},"modelRoleStorage":{"ui":{"tab":"model","group":"Prompt","label":"Model Role Storage","description":"Where model selector role assignments are saved","options":[{"value":"global","label":"Global","description":"Save role models in the active profile config (current behavior)"},{"value":"project","label":"Per-project","description":"Save project role models in .omp/config.yml; missing project roles use global defaults"}]},"type":"enum","default":"global","values":["global","project"]},"theme.dark":{"ui":{"tab":"appearance","group":"Theme","label":"Dark Theme","description":"Theme used when the terminal has a dark background","options":"runtime"},"type":"string","default":"titanium"},"theme.light":{"ui":{"tab":"appearance","group":"Theme","label":"Light Theme","description":"Theme used when the terminal has a light background","options":"runtime"},"type":"string","default":"light"},"symbolPreset":{"ui":{"tab":"appearance","group":"Theme","label":"Symbol Preset","description":"Glyph set for icons and symbols (Unicode, Nerd Font, or ASCII)","options":[{"value":"unicode","label":"Unicode","description":"Standard symbols (default)"},{"value":"nerd","label":"Nerd Font","description":"Requires Nerd Font"},{"value":"ascii","label":"ASCII","description":"Maximum compatibility"}]},"type":"enum","default":"unicode","values":["unicode","nerd","ascii"]},"colorBlindMode":{"ui":{"tab":"appearance","group":"Theme","label":"Color-Blind Mode","description":"Use blue instead of green for diff additions"},"type":"boolean","default":false},"composer.shape":{"ui":{"tab":"appearance","group":"Composer","label":"Composer Shape","description":"Visual layout of the input editor and status line","options":"runtime"},"type":"string","default":"band"},"statusLine.preset":{"ui":{"tab":"appearance","group":"Status Line","label":"Status Line Preset","description":"Pre-built status line configurations","options":[{"value":"default","label":"Default","description":"Model, path, git, context, tokens, cost"},{"value":"minimal","label":"Minimal","description":"Path and git only"},{"value":"compact","label":"Compact","description":"Model, git, cost, context"},{"value":"full","label":"Full","description":"All segments including time"},{"value":"nerd","label":"Nerd","description":"Maximum info with Nerd Font icons"},{"value":"ascii","label":"ASCII","description":"No special characters"},{"value":"custom","label":"Custom","description":"User-defined segments"}]},"type":"enum","default":"default","values":["default","minimal","compact","full","nerd","ascii","custom"]},"statusLine.separator":{"ui":{"tab":"appearance","group":"Status Line","label":"Status Line Separator","description":"Style of separators between segments","options":[{"value":"powerline","label":"Powerline","description":"Solid arrows (Nerd Font)"},{"value":"powerline-thin","label":"Thin chevron","description":"Thin arrows (Nerd Font)"},{"value":"slash","label":"Slash","description":"Forward slashes"},{"value":"pipe","label":"Pipe","description":"Vertical pipes"},{"value":"block","label":"Block","description":"Solid blocks"},{"value":"none","label":"None","description":"Space only"},{"value":"ascii","label":"ASCII","description":"Greater-than signs"}]},"type":"enum","default":"powerline-thin","values":["powerline","powerline-thin","slash","pipe","block","none","ascii"]},"statusLine.contextLine":{"ui":{"tab":"appearance","group":"Status Line","label":"Context-Reactive Line","description":"How the line between the left and right segments reflects context usage (box composer only)","options":[{"value":"off","label":"Off","description":"Solid accent line, no context feedback"},{"value":"percentage","label":"Percentage","description":"Used portion in accent color, remainder dimmed"},{"value":"annotated","label":"Annotated","description":"Percentage plus ticks at the speculative and auto-compaction boundaries"},{"value":"embedded","label":"Embedded","description":"Annotated line with the context percentage and window embedded in the gauge"}]},"type":"enum","default":"embedded","values":["off","percentage","annotated","embedded"]},"statusLine.sessionAccent":{"ui":{"tab":"appearance","group":"Status Line","label":"Session Accent","description":"Use the session name color for the editor border and status line gap"},"type":"boolean","default":true},"statusLine.transparent":{"ui":{"tab":"appearance","group":"Status Line","label":"Transparent Status Line","description":"Use the terminal\'s default background for the status line instead of the theme\'s `statusLineBg`. Powerline end caps are dropped because they need a contrasting fill to bridge into the surrounding terminal."},"type":"boolean","default":false},"statusLine.compactThinkingLevel":{"ui":{"tab":"appearance","group":"Status Line","label":"Compact Thinking Level","description":"Show the thinking level as a single icon on the model name instead of a separate ` · <level>` suffix."},"type":"boolean","default":true},"tools.artifactSpillThreshold":{"ui":{"tab":"tools","group":"Output Limits","label":"Artifact Spill Threshold (KB)","description":"Tool output above this size is saved as an artifact; tail is kept inline","options":[{"value":"1","label":"1 KB","description":"~250 tokens"},{"value":"2.5","label":"2.5 KB","description":"~625 tokens"},{"value":"5","label":"5 KB","description":"~1.25K tokens"},{"value":"10","label":"10 KB","description":"~2.5K tokens"},{"value":"20","label":"20 KB","description":"~5K tokens"},{"value":"30","label":"30 KB","description":"~7.5K tokens"},{"value":"50","label":"50 KB","description":"Default; ~12.5K tokens"},{"value":"75","label":"75 KB","description":"~19K tokens"},{"value":"100","label":"100 KB","description":"~25K tokens"},{"value":"200","label":"200 KB","description":"~50K tokens"},{"value":"500","label":"500 KB","description":"~125K tokens"},{"value":"1000","label":"1 MB","description":"~250K tokens"}]},"type":"number","default":50},"tools.artifactTailBytes":{"ui":{"tab":"tools","group":"Output Limits","label":"Artifact Tail Size (KB)","description":"Amount of tail content kept inline when output spills to artifact","options":[{"value":"1","label":"1 KB","description":"~250 tokens"},{"value":"2.5","label":"2.5 KB","description":"~625 tokens"},{"value":"5","label":"5 KB","description":"~1.25K tokens"},{"value":"10","label":"10 KB","description":"~2.5K tokens"},{"value":"20","label":"20 KB","description":"Default; ~5K tokens"},{"value":"50","label":"50 KB","description":"~12.5K tokens"},{"value":"100","label":"100 KB","description":"~25K tokens"},{"value":"200","label":"200 KB","description":"~50K tokens"}]},"type":"number","default":20},"tools.artifactHeadBytes":{"ui":{"tab":"tools","group":"Output Limits","label":"Artifact Head Size (KB)","description":"Amount of head content kept inline alongside the tail when output spills to artifact (middle elision). 0 disables — keep tail only.","options":[{"value":"0","label":"0 KB","description":"Disabled; tail-only truncation"},{"value":"1","label":"1 KB","description":"~250 tokens"},{"value":"2.5","label":"2.5 KB","description":"~625 tokens"},{"value":"5","label":"5 KB","description":"~1.25K tokens"},{"value":"10","label":"10 KB","description":"~2.5K tokens"},{"value":"20","label":"20 KB","description":"Default; ~5K tokens"},{"value":"50","label":"50 KB","description":"~12.5K tokens"},{"value":"100","label":"100 KB","description":"~25K tokens"},{"value":"200","label":"200 KB","description":"~50K tokens"}]},"type":"number","default":20},"tools.outputMaxColumns":{"ui":{"tab":"tools","group":"Output Limits","label":"Output Column Cap","description":"Per-line byte cap for streaming tool outputs (bash, python, js eval) and `read`. Lines wider than this are ellipsis-truncated; remaining bytes up to the next newline are dropped. 0 disables.","options":[{"value":"0","label":"Off","description":"No per-line cap"},{"value":"256","label":"256","description":"Tight"},{"value":"512","label":"512","description":""},{"value":"768","label":"768","description":"Default"},{"value":"1024","label":"1024","description":""},{"value":"2048","label":"2048","description":""},{"value":"4096","label":"4096","description":"Loose"}]},"type":"number","default":768},"tools.artifactTailLines":{"ui":{"tab":"tools","group":"Output Limits","label":"Artifact Tail Lines","description":"Maximum lines of tail content kept inline when output spills to artifact","options":[{"value":"50","label":"50 lines","description":"~250 tokens"},{"value":"100","label":"100 lines","description":"~500 tokens"},{"value":"250","label":"250 lines","description":"~1.25K tokens"},{"value":"500","label":"500 lines","description":"Default; ~2.5K tokens"},{"value":"1000","label":"1000 lines","description":"~5K tokens"},{"value":"2000","label":"2000 lines","description":"~10K tokens"},{"value":"5000","label":"5000 lines","description":"~25K tokens"}]},"type":"number","default":500},"statusLine.showHookStatus":{"ui":{"tab":"appearance","group":"Status Line","label":"Show Hook Status","description":"Display hook status messages below the status line"},"type":"boolean","default":true},"terminal.showImages":{"ui":{"tab":"appearance","group":"Images","label":"Show Inline Images","description":"Render images inline in the terminal","condition":"hasImageProtocol"},"type":"boolean","default":true},"images.autoResize":{"ui":{"tab":"appearance","group":"Images","label":"Auto-Resize Images","description":"Resize large images to 2000x2000 max for better model compatibility"},"type":"boolean","default":true},"images.blockImages":{"ui":{"tab":"appearance","group":"Images","label":"Block Images","description":"Prevent images from being sent to LLM providers"},"type":"boolean","default":false},"images.describeForTextModels":{"ui":{"tab":"model","group":"Vision","label":"Describe Images for Text Models","description":"When an image is attached to a model without vision support, save it under local:// and inject a description from a vision-capable model instead of dropping it"},"type":"boolean","default":true},"images.urls.enabled":{"ui":{"tab":"model","group":"Vision","label":"Serve Images as URLs","description":"Publish outgoing images through the configured backend chain and send URL-fetching providers short URLs instead of inline base64. Falls back to inline automatically when every backend or a provider fetch fails"},"type":"boolean","default":false},"images.urls.backends":{"ui":{"tab":"model","group":"Vision","label":"Image URL Backends","description":"Ordered destinations tried when publishing images for provider access","ordered":true,"options":[{"value":"imgur","label":"Imgur","description":"Uploads require either an Imgur access token or client ID."},{"value":"imageshack","label":"ImageShack","description":"The API requires a paid subscription."},{"value":"flickr","label":"Flickr","description":"image-host"},{"value":"chevereto","label":"Chevereto","description":"self-hosted"},{"value":"vgyme","label":"vgy.me","description":"image-host"},{"value":"dropbox","label":"Dropbox","description":"cloud-files"},{"value":"ftp","label":"FTP / FTPS / SFTP","description":"file-transfer"},{"value":"onedrive","label":"OneDrive","description":"cloud-files"},{"value":"google-drive","label":"Google Drive","description":"cloud-files"},{"value":"puush","label":"puush-compatible endpoint","description":"The public service is defunct; a replacement endpoint is required."},{"value":"box","label":"Box","description":"cloud-files"},{"value":"amazon-s3","label":"Amazon S3","description":"s3"},{"value":"google-cloud-storage","label":"Google Cloud Storage","description":"object-storage"},{"value":"azure-storage","label":"Azure Blob Storage","description":"object-storage"},{"value":"backblaze-b2","label":"Backblaze B2","description":"Configure either native B2 application keys or S3-compatible access keys."},{"value":"owncloud","label":"ownCloud / Nextcloud","description":"webdav"},{"value":"mediafire","label":"MediaFire-compatible endpoint","description":"The public API is deprecated; a replacement endpoint is required."},{"value":"sendspace","label":"SendSpace-compatible endpoint","description":"The public discovery API is deprecated; a replacement endpoint is required."},{"value":"localhostr","label":"Hostr-compatible endpoint","description":"The public service is offline; a replacement endpoint is required."},{"value":"lambda","label":"Lambda-compatible endpoint","description":"The public service is offline; a replacement endpoint is required."},{"value":"pomf","label":"Pomf","description":"pomf"},{"value":"uguu","label":"Uguu","description":"Public uploads expire after approximately three hours."},{"value":"seafile","label":"Seafile","description":"cloud-files"},{"value":"s-ul","label":"s-ul","description":"file-host"},{"value":"lobfile","label":"LobFile-compatible endpoint","description":"The public service is offline; a replacement endpoint is required."},{"value":"transfer-sh","label":"transfer.sh-compatible endpoint","description":"The defunct public endpoint is blocked; a self-hosted replacement is required."},{"value":"plik","label":"Plik","description":"self-hosted"},{"value":"shared-folder","label":"Shared folder","description":"filesystem"},{"value":"catbox","label":"Catbox","description":"anonymous-host"},{"value":"litterbox","label":"Litterbox","description":"Uploads are temporary."},{"value":"0x0","label":"0x0.st","description":"Public uploads expire after a retention window determined by file size."},{"value":"tmpfiles","label":"tmpfiles.org","description":"Public uploads are temporary."},{"value":"discord","label":"Discord","description":"messaging"},{"value":"provider-files","label":"Model provider files","description":"Provider file references are API-local rather than public image URLs."},{"value":"direct","label":"Direct public URL","description":"local-serving"},{"value":"cloudflared","label":"Cloudflare quick tunnel","description":"tunnel"},{"value":"ngrok","label":"ngrok","description":"tunnel"},{"value":"tailscale","label":"Tailscale Funnel","description":"tunnel"},{"value":"ssh","label":"SSH reverse tunnel","description":"tunnel"},{"value":"command","label":"Uploader command","description":"external-command"},{"value":"localhost-run","label":"localhost.run","description":"tunnel"},{"value":"pinggy","label":"Pinggy","description":"tunnel"},{"value":"devtunnel","label":"Microsoft dev tunnel","description":"The devtunnel CLI must be logged in locally."},{"value":"zrok","label":"zrok","description":"The local zrok environment must be enabled."},{"value":"bore","label":"bore","description":"tunnel"},{"value":"named-cloudflared","label":"Named Cloudflare Tunnel","description":"tunnel"},{"value":"r2","label":"Cloudflare R2","description":"s3"},{"value":"tigris","label":"Tigris","description":"s3"},{"value":"minio","label":"MinIO","description":"s3"},{"value":"garage","label":"Garage","description":"s3"}]},"type":"array","default":["provider-files","tailscale","cloudflared","litterbox"]},"images.urls.command":{"ui":{"tab":"model","group":"Vision","label":"Image Upload Command","description":"Argv template for the command backend; {file} is the image path, {mime}/{ext} optional. The last URL printed on stdout is used (e.g. pasta -b -f {file})"},"type":"string"},"images.urls.publicBaseUrl":{"ui":{"tab":"model","group":"Vision","label":"Image URL Public Base","description":"Externally reachable base URL fronting the blob server (required for ssh, optional for direct)"},"type":"string"},"images.urls.ttlHours":{"ui":{"tab":"model","group":"Vision","label":"Image URL Lifetime (hours)","description":"Serving window for locally hosted image URLs, measured from the last time a conversation sent them; resuming a conversation re-arms the window at the same link. 0 keeps links alive while the broker runs"},"type":"number","default":72},"images.urls.bindHost":{"ui":{"tab":"model","group":"Vision","label":"Image URL Bind Host","description":"Host the blob server binds to; loopback for tunnels, 0.0.0.0 for direct serving"},"type":"string","default":"127.0.0.1"},"images.urls.sshTarget":{"ui":{"tab":"model","group":"Vision","label":"Image URL SSH Target","description":"user@host destination for the ssh reverse forward"},"type":"string"},"images.urls.sshRemotePort":{"ui":{"tab":"model","group":"Vision","label":"Image URL SSH Remote Port","description":"Remote listen port of the ssh reverse forward that your web server proxies to"},"type":"number","default":8787},"tui.resizeScrollback":{"ui":{"tab":"appearance","group":"Display","label":"Resize Scrollback","description":"How a settled terminal resize refreshes transcript rows retained in terminal scrollback","options":[{"value":"append","label":"Append","description":"Replay the transcript at the new width below retained history"},{"value":"rebuild","label":"Rebuild","description":"Erase all terminal scrollback, then replay one current-width transcript"},{"value":"preserve","label":"Preserve","description":"Repaint only the viewport and keep history wrapped at its old width"}]},"type":"enum","default":"rebuild","values":["append","rebuild","preserve"]},"terminal.showProgress":{"ui":{"tab":"appearance","group":"Display","label":"Native Terminal Progress","description":"Emit OSC 9;4 indeterminate progress while the agent or context maintenance is running"},"type":"boolean","default":false},"tui.textSizing":{"ui":{"tab":"appearance","group":"Display","label":"Large Headings (Kitty)","description":"Render Markdown H1 headings at 2x scale using Kitty\'s OSC 66 text-sizing protocol. Only takes effect on Kitty terminals; ignored everywhere else. Off by default."},"type":"boolean","default":false},"tui.renderMermaid":{"ui":{"tab":"appearance","group":"Display","label":"Render Mermaid Diagrams","description":"Render Mermaid fenced code blocks as ASCII diagrams"},"type":"boolean","default":true},"tui.reactions":{"ui":{"tab":"appearance","group":"Display","label":"Agent Reactions","description":"Invite the agent to react to your message with an emoji badge on its bubble"},"type":"boolean","default":true},"tui.codexResetFireworks":{"ui":{"tab":"appearance","group":"Display","label":"Codex Reset Fireworks","description":"Celebrate unscheduled Codex weekly usage resets and newly banked saved resets with a top-third fireworks overlay that remains until Escape"},"type":"boolean","default":false},"tui.titleState":{"ui":{"tab":"appearance","group":"Display","label":"Terminal Title Run State","description":"Show the agent run state in the terminal title\'s separator — an animated spinner while working (a static \':\' under WSL), \'>\' when it\'s your turn, \'!\' when the agent is waiting on you"},"type":"boolean","default":true},"tui.titleSpinner":{"ui":{"tab":"appearance","group":"Display","label":"Terminal Title Spinner","description":"Glyph set for the working-state spinner in the terminal title — braille sweep, filling moon, single-dot cycle, or ASCII-safe line","options":[{"value":"braille","label":"Braille","description":"Classic ⠋⠙⠹ sweep (default)"},{"value":"pulse","label":"Pulse","description":"Moon filling ○◑● then emptying"},{"value":"dots","label":"Dots","description":"Single braille dots cycling"},{"value":"line","label":"Line","description":"ASCII - \\\\ | / for fonts without braille coverage"}]},"type":"enum","default":"braille","values":["braille","pulse","dots","line"]},"tui.hyperlinks":{"ui":{"tab":"appearance","group":"Display","label":"Terminal Hyperlinks","description":"Wrap paths and URLs in OSC 8 hyperlinks for terminal-native click-to-open (auto: detect support; off: never; always: unconditional)"},"type":"enum","default":"auto","values":["off","auto","always"]},"tui.mouse":{"ui":{"tab":"appearance","group":"Display","label":"Mouse Click-to-Focus","description":"Capture mouse clicks in the main session so live subagent cards and HUD rows focus on click, with a hover highlight on the target. Native text selection becomes Shift+drag and wheel scroll becomes Shift+wheel while on"},"type":"boolean","default":false},"tui.tight":{"ui":{"tab":"appearance","group":"Display","label":"Tight Layout","description":"Remove the 1-character horizontal padding from the left and right of the terminal output"},"type":"boolean","default":false},"display.shimmer":{"ui":{"tab":"appearance","group":"Display","label":"Shimmer","description":"Animation style for working/loading messages","options":[{"value":"classic","label":"Classic","description":"Soft cosine wave sweeping across the text"},{"value":"kitt","label":"KITT Scanner","description":"Knight Rider 1982 red light bouncing left-right"},{"value":"disabled","label":"Disabled","description":"No animation; static muted text"}]},"type":"enum","default":"classic","values":["classic","kitt","disabled"]},"display.pinnedAgents":{"ui":{"tab":"appearance","group":"Display","label":"Pinned Agents","description":"Pinned live-agent jump list above the editor (off hides it; collapsed shows a few rows with an expander; full lists all)","options":[{"value":"off","label":"Off","description":"Hide the pinned jump list"},{"value":"collapsed","label":"Collapsed","description":"Show a few rows with an expander"},{"value":"full","label":"Full","description":"Always list every live agent"}]},"type":"enum","default":"collapsed","values":["off","collapsed","full"]},"display.smoothStreaming":{"ui":{"tab":"appearance","group":"Display","label":"Smooth Streaming","description":"Reveal assistant text and streamed tool input smoothly while chunks arrive"},"type":"boolean","default":true},"display.hideToolActivity":{"ui":{"tab":"appearance","group":"Display","label":"Hide Tool Activity","description":"Hide model-initiated tool calls and results from the transcript"},"type":"boolean","default":false},"display.showTokenUsage":{"ui":{"tab":"appearance","group":"Display","label":"Show Token Usage","description":"Show per-turn token usage on assistant messages"},"type":"boolean","default":false},"display.showTurnTime":{"ui":{"tab":"appearance","group":"Display","label":"Show Turn Time","description":"Show the total prompt-to-yield time (including tool calls) on assistant message usage rows"},"type":"boolean","default":false},"display.cacheMissMarker":{"ui":{"tab":"appearance","group":"Display","label":"Cache Miss Marker","description":"Show a divider after an assistant turn whose request lost (missed) the prompt cache"},"type":"boolean","default":false},"display.collapseCompacted":{"ui":{"tab":"appearance","group":"Display","label":"Collapse Compacted History","description":"Collapse pre-compaction history behind the summary divider on the live transcript; disable to keep the full transcript inline with dividers at each compaction point"},"type":"boolean","default":true},"showHardwareCursor":{"ui":{"tab":"appearance","group":"Display","label":"Show Hardware Cursor","description":"Show terminal cursor for IME support"},"type":"boolean","default":true},"tui.imeSafeCursor":{"ui":{"tab":"appearance","group":"Display","label":"IME-Safe Prompt Layout","description":"Move the prompt\'s bottom border to a separate row so macOS IME preedit cannot displace it"},"type":"boolean","default":false},"defaultThinkingLevel":{"ui":{"tab":"model","group":"Thinking","label":"Thinking Level","description":"Reasoning depth for thinking-capable models","options":[{"value":"auto","label":"auto","description":"Auto-detect per prompt"},{"value":"minimal","label":"min","description":"Very brief reasoning (~1k tokens)"},{"value":"low","label":"low","description":"Light reasoning (~2k tokens)"},{"value":"medium","label":"medium","description":"Moderate reasoning (~8k tokens)"},{"value":"high","label":"high","description":"Deep reasoning (~16k tokens)"},{"value":"xhigh","label":"xhigh","description":"Extended reasoning (~32k tokens)"},{"value":"max","label":"max","description":"Maximum reasoning the model supports"}]},"type":"enum","default":"high","values":["minimal","low","medium","high","xhigh","max","auto"]},"hideThinkingBlock":{"ui":{"tab":"model","group":"Thinking","label":"Hide Thinking Blocks","description":"Hide thinking blocks in assistant responses"},"type":"boolean","default":false},"proseOnlyThinking":{"ui":{"tab":"model","group":"Thinking","label":"Prose Only Thinking","description":"Omit code blocks from thinking summaries and replace them with an ellipsis"},"type":"boolean","default":true},"omitThinking":{"ui":{"tab":"model","group":"Thinking","label":"Omit Thinking summaries","description":"Instruct upstream providers to completely omit thinking summaries from responses (where supported)"},"type":"boolean","default":false},"externalThinking":{"ui":{"tab":"model","group":"Thinking","label":"External Thinking","description":"Private scratchpad; not shown to user. Disables supported GPT, Claude, and Gemini reasoning","warning":"At your own risk: providers have flagged this request shape as abuse, up to account-level enforcement"},"type":"boolean","default":false},"model.loopGuard.enabled":{"ui":{"tab":"model","group":"Thinking","label":"Loop Guard","description":"Enable automatic stream loop detection for model reasoning and prose"},"type":"boolean","default":true},"model.loopGuard.checkAssistantContent":{"ui":{"tab":"model","group":"Thinking","label":"Loop Guard Scan Prose","description":"Apply loop guard to assistant prose messages in addition to thinking logs"},"type":"boolean","default":true},"model.loopGuard.toolCallReminder":{"ui":{"tab":"model","group":"Thinking","label":"Loop Guard Tool-Call Reminder","description":"When a Gemini reasoning stream emits many consecutive planning headers without calling a tool, interrupt it and inject a reminder to issue a tool call (requires Loop Guard)"},"type":"boolean","default":true},"model.toolCallLoopGuard.enabled":{"ui":{"tab":"model","group":"Thinking","label":"Tool-Call Loop Guard","description":"Detect consecutive identical tool calls across turns and inject a corrective steer"},"type":"boolean","default":true},"model.toolCallLoopGuard.threshold":{"ui":{"tab":"model","group":"Thinking","label":"Tool-Call Loop Threshold","description":"Consecutive identical tool calls required before the corrective steer is injected"},"type":"number","default":5},"model.toolCallLoopGuard.exemptTools":{"ui":{"tab":"model","group":"Thinking","label":"Tool-Call Loop Exempt Tools","description":"Tool names that may repeat consecutively without triggering the cross-turn loop guard"},"type":"array","default":["hub"]},"inlineToolDescriptors":{"ui":{"tab":"model","group":"Prompt","label":"Inline Tool Descriptors","description":"Render full tool descriptors in the system prompt and strip top-level/nested descriptions from provider tool schemas so descriptor text is sent once. Auto enables this for Gemini models and disables it otherwise","options":[{"value":"auto","label":"Auto","description":"Inline descriptors for Gemini models; keep them in tool schemas otherwise"},{"value":"on","label":"On","description":"Always inline descriptors in the system prompt"},{"value":"off","label":"Off","description":"Keep descriptors in provider tool schemas only"}]},"type":"enum","default":"auto","values":["auto","on","off"]},"includeModelInPrompt":{"ui":{"tab":"model","group":"Prompt","label":"Include Model in Prompt","description":"Surface the active model identifier in the system prompt so the agent knows which model it is"},"type":"boolean","default":true},"includeWorkspaceTree":{"ui":{"tab":"model","group":"Prompt","label":"Include Workspace Tree","description":"Render the workspace directory tree in the system prompt. WARNING: This can bust prompt caching across sessions when files are modified."},"type":"boolean","default":false},"skillful":{"ui":{"tab":"model","group":"Prompt","label":"List Skills in Prompt","description":"List available skills in the system prompt; disable to save context and toggle per-session with /skillful"},"type":"boolean","default":true},"workspace.additionalDirectories":{"ui":{"tab":"context","group":"General","label":"Additional Workspace Dirs","description":"Extra workspace directories added to every session as additional roots (multi-root workspace). Managed live via /add-dir and /remove-dir. Paths resolve relative to cwd; absolute paths recommended. The agent is told these roots exist and can read/grep/glob them."},"type":"array","default":[]},"personality":{"ui":{"tab":"model","group":"Prompt","label":"Personality","description":"Communication style rendered into the system prompt\'s personality block","options":[{"value":"default","label":"Default","description":"Terse, evidence-first engineer; dense, action-oriented replies"},{"value":"friendly","label":"Friendly","description":"Warm, encouraging collaborator focused on momentum and morale"},{"value":"pragmatic","label":"Pragmatic","description":"Direct, efficient engineer focused on clarity and rigor"},{"value":"none","label":"None","description":"Omit the personality block entirely"}]},"type":"enum","default":"default","values":["default","friendly","pragmatic","none"]},"temperature":{"ui":{"tab":"model","group":"Sampling","label":"Temperature","description":"Sampling temperature (0 = deterministic, 1 = creative, -1 = provider default)","options":[{"value":"-1","label":"Default","description":"Use provider default"},{"value":"0","label":"0","description":"Deterministic"},{"value":"0.2","label":"0.2","description":"Focused"},{"value":"0.5","label":"0.5","description":"Balanced"},{"value":"0.7","label":"0.7","description":"Creative"},{"value":"1","label":"1","description":"Maximum variety"}]},"type":"number","default":-1},"topP":{"ui":{"tab":"model","group":"Sampling","label":"Top P","description":"Nucleus sampling cutoff (0-1, -1 = provider default)","options":[{"value":"-1","label":"Default","description":"Use provider default"},{"value":"0.1","label":"0.1","description":"Very focused"},{"value":"0.3","label":"0.3","description":"Focused"},{"value":"0.5","label":"0.5","description":"Balanced"},{"value":"0.9","label":"0.9","description":"Broad"},{"value":"1","label":"1","description":"No nucleus filtering"}]},"type":"number","default":-1},"topK":{"ui":{"tab":"model","group":"Sampling","label":"Top K","description":"Sample from top-K tokens (-1 = provider default)","options":[{"value":"-1","label":"Default","description":"Use provider default"},{"value":"1","label":"1","description":"Greedy top token"},{"value":"20","label":"20","description":"Focused"},{"value":"40","label":"40","description":"Balanced"},{"value":"100","label":"100","description":"Broad"}]},"type":"number","default":-1},"minP":{"ui":{"tab":"model","group":"Sampling","label":"Min P","description":"Minimum probability threshold (0-1, -1 = provider default)","options":[{"value":"-1","label":"Default","description":"Use provider default"},{"value":"0.01","label":"0.01","description":"Very permissive"},{"value":"0.05","label":"0.05","description":"Balanced"},{"value":"0.1","label":"0.1","description":"Strict"}]},"type":"number","default":-1},"presencePenalty":{"ui":{"tab":"model","group":"Sampling","label":"Presence Penalty","description":"Penalty for introducing already-present tokens (-1 = provider default)","options":[{"value":"-1","label":"Default","description":"Use provider default"},{"value":"0","label":"0","description":"No penalty"},{"value":"0.5","label":"0.5","description":"Mild novelty"},{"value":"1","label":"1","description":"Encourage novelty"},{"value":"2","label":"2","description":"Strong novelty"}]},"type":"number","default":-1},"repetitionPenalty":{"ui":{"tab":"model","group":"Sampling","label":"Repetition Penalty","description":"Penalty for repeated tokens (-1 = provider default)","options":[{"value":"-1","label":"Default","description":"Use provider default"},{"value":"0.8","label":"0.8","description":"Allow repetition"},{"value":"1","label":"1","description":"No penalty"},{"value":"1.1","label":"1.1","description":"Mild penalty"},{"value":"1.2","label":"1.2","description":"Balanced"},{"value":"1.5","label":"1.5","description":"Strong penalty"}]},"type":"number","default":-1},"textVerbosity":{"ui":{"tab":"model","group":"Sampling","label":"Text Verbosity","description":"OpenAI Responses and Codex response verbosity (low, medium, or high)","options":[{"value":"low","label":"Low","description":"Prefer concise responses"},{"value":"medium","label":"Medium","description":"Balance brevity and detail (default)"},{"value":"high","label":"High","description":"Prefer detailed responses"}]},"type":"enum","default":"medium","values":["low","medium","high"]},"tier.openai":{"ui":{"tab":"model","group":"Sampling","label":"Service Tier — OpenAI","description":"Processing tier for OpenAI / OpenAI-Codex requests, and OpenAI-family models routed via OpenRouter (none = omit). Sent as `service_tier`.","options":[{"value":"none","label":"None","description":"Omit service_tier (standard processing)"},{"value":"auto","label":"Auto","description":"Provider default tier selection"},{"value":"default","label":"Default","description":"Standard priority processing"},{"value":"flex","label":"Flex","description":"Lower cost, higher latency when available"},{"value":"scale","label":"Scale","description":"Scale Tier credits when available"},{"value":"priority","label":"Priority","description":"Faster, higher cost (premium request)"}]},"type":"enum","default":"none","values":["none","auto","default","flex","scale","priority"]},"tier.anthropic":{"ui":{"tab":"model","group":"Sampling","label":"Service Tier — Anthropic","description":"Processing tier for Claude requests. `priority` realizes fast mode (`speed: \\"fast\\"`) on supported direct Anthropic models; ignored on Bedrock/Vertex Claude and via OpenRouter.","options":[{"value":"none","label":"None","description":"Standard processing"},{"value":"priority","label":"Priority","description":"Fast mode (`speed: \\"fast\\"`) on supported direct Claude models; ignored on Bedrock/Vertex"}]},"type":"enum","default":"none","values":["none","priority"]},"tier.google":{"ui":{"tab":"model","group":"Sampling","label":"Service Tier — Google","description":"Processing tier for Gemini (Google AI Studio + Vertex) requests, and Google-family models routed via OpenRouter (none = omit). Sent as the top-level `serviceTier` field.","options":[{"value":"none","label":"None","description":"Standard processing"},{"value":"flex","label":"Flex","description":"Lower cost, higher latency (Gemini API + Vertex)"},{"value":"priority","label":"Priority","description":"Faster, higher reliability (Gemini API + Vertex)"}]},"type":"enum","default":"none","values":["none","flex","priority"]},"tier.subagent":{"ui":{"tab":"model","group":"Sampling","label":"Service Tier — Subagent","description":"Service Tier for spawned task/eval subagents. Inherit = match the main agent\'s live per-family tiers (tracks /fast); pick a value to apply it to whichever family the subagent\'s model belongs to.","options":[{"value":"inherit","label":"Inherit","description":"Match the main agent\'s live per-family tiers"},{"value":"none","label":"None","description":"Standard processing"},{"value":"auto","label":"Auto","description":"Provider default tier selection (OpenAI family)"},{"value":"default","label":"Default","description":"Standard priority processing (OpenAI family)"},{"value":"flex","label":"Flex","description":"Flexible capacity tier (OpenAI/Google families)"},{"value":"scale","label":"Scale","description":"Scale Tier credits (OpenAI family)"},{"value":"priority","label":"Priority","description":"Priority on every supported family of the spawned model"}]},"type":"enum","default":"inherit","values":["inherit","none","auto","default","flex","scale","priority"]},"tier.advisor":{"ui":{"tab":"model","group":"Sampling","label":"Service Tier — Advisor","description":"Service Tier for the advisor model. None = standard processing; Inherit = match the main agent\'s live per-family tiers; pick a value to apply it to the advisor model\'s family.","condition":"advisorEnabled","options":[{"value":"inherit","label":"Inherit","description":"Match the main agent\'s live per-family tiers"},{"value":"none","label":"None","description":"Standard processing"},{"value":"auto","label":"Auto","description":"Provider default tier selection (OpenAI family)"},{"value":"default","label":"Default","description":"Standard priority processing (OpenAI family)"},{"value":"flex","label":"Flex","description":"Flexible capacity tier (OpenAI/Google families)"},{"value":"scale","label":"Scale","description":"Scale Tier credits (OpenAI family)"},{"value":"priority","label":"Priority","description":"Priority on every supported family of the spawned model"}]},"type":"enum","default":"none","values":["inherit","none","auto","default","flex","scale","priority"]},"retry.maxRetries":{"ui":{"tab":"model","group":"Retry & Fallback","label":"Retry Attempts","description":"Maximum retry attempts on API errors","options":[{"value":"1","label":"1 retry","description":""},{"value":"2","label":"2 retries","description":""},{"value":"3","label":"3 retries","description":""},{"value":"5","label":"5 retries","description":""},{"value":"10","label":"10 retries","description":""}]},"type":"number","default":10},"retry.maxDelayMs":{"ui":{"tab":"model","group":"Retry & Fallback","label":"Max Retry Delay","description":"Maximum wait between retries, in ms. When the provider asks us to wait longer than this and no credential or model fallback succeeds, the request fails fast instead of sleeping (e.g. 3-hour Anthropic rate-limit windows). 0 disables the ceiling — to let the session auto-resume through provider-stated quota resets."},"type":"number","default":300000},"retry.waitForUsageReset":{"ui":{"tab":"model","group":"Retry & Fallback","label":"Wait For Usage Reset","description":"When a provider reports usage-limit exhaustion with a reset time (5-hour or weekly quota windows on any provider), sleep until the reset instead of failing fast past retry.maxDelayMs. Waits are abortable (Esc) but also hold subagents, so leave off for unattended runs."},"type":"boolean","default":false},"retry.modelFallback":{"ui":{"tab":"model","group":"Retry & Fallback","label":"Retry Model Fallback","description":"Allow retry recovery to switch to configured fallback models"},"type":"boolean","default":true},"retry.usageAwareFallback":{"ui":{"tab":"model","group":"Retry & Fallback","label":"Usage-Aware Fallback","description":"Use reliable coding-plan quota reports to prefer same-provider accounts, then configured fallback models, before a hard usage limit. Ordinary configured API keys are excluded."},"type":"boolean","default":false},"retry.usageReservePct":{"ui":{"tab":"model","group":"Retry & Fallback","label":"Reserve Margin","description":"Treat a coding-plan model as near its limit below this remaining percentage. Unknown or unmapped usage keeps the primary model.","condition":"usageAwareFallbackEnabled","options":[{"value":"5","label":"5%","description":"Act only when nearly exhausted"},{"value":"10","label":"10%","description":"Balanced safety margin"},{"value":"15","label":"15%","description":"Conservative"},{"value":"20","label":"20%","description":"Early protection"},{"value":"25","label":"25%","description":"Very conservative"}]},"type":"number","default":10},"retry.usageReservePolicy":{"ui":{"tab":"model","group":"Retry & Fallback","label":"Reserve Policy","description":"What to do when every same-provider coding-plan account is inside the reserve margin.","condition":"usageAwareFallbackEnabled","options":[{"value":"confirm","label":"Confirm interactively","description":"Keep interactive sessions on the primary until confirmed; background agents auto-fallback"},{"value":"auto","label":"Auto-fallback","description":"Always select the next eligible configured fallback"},{"value":"fail-closed","label":"Fail closed","description":"Do not spend reserve quota or select a fallback"}]},"type":"enum","default":"confirm","values":["confirm","auto","fail-closed"]},"retry.fallbackChains":{"ui":{"tab":"model","group":"Retry & Fallback","label":"Retry Fallback Chains","description":"JSON object mapping model roles, model selectors (\\"provider/model-id\\"), or provider wildcards (\\"provider/*\\") to ordered fallback selectors, e.g. {\\"default\\":[\\"openai/gpt-4o-mini\\"],\\"google-antigravity/*\\":[\\"google/*\\",\\"google-vertex/*\\"]}. Model-oriented keys apply whenever that model/provider is active, regardless of role; a \\"provider/*\\" entry keeps the failing model\'s id and swaps the provider. An id-prefixed wildcard (\\"openrouter/google/*\\") re-prefixes the failing model\'s bare id (google-antigravity/gemini-x -> openrouter/google/gemini-x) and, used as a key, matches only that provider\'s ids under the prefix. A fallback entry may carry an explicit thinking suffix (\\"provider/model:low\\", \\":high\\", \\":max\\", \\":off\\"); a bare entry inherits the failing turn\'s effort, and \\"provider/*\\" entries always inherit."},"type":"record","default":{}},"retry.fallbackRevertPolicy":{"ui":{"tab":"model","group":"Retry & Fallback","label":"Fallback Revert Policy","description":"When to return to the primary model after a fallback","options":[{"value":"cooldown-expiry","label":"Cooldown expiry","description":"Return to the primary model after its suppression window ends"},{"value":"never","label":"Never","description":"Stay on the fallback model until manually changed"}]},"type":"enum","default":"cooldown-expiry","values":["cooldown-expiry","never"]},"providers.anthropic.serverSideFallback":{"ui":{"tab":"model","group":"Retry & Fallback","label":"Anthropic Server-Side Fallback (Fable 5)","description":"When a Claude Fable 5 / Mythos 5 request is blocked by Anthropic\'s safety classifier, retry it on Claude Opus 4.8 server-side (Anthropic `server-side-fallback-2026-06-01` beta). Opt-in — leaving this off preserves the pre-fallback behavior for every request."},"type":"boolean","default":false},"steeringMode":{"ui":{"tab":"interaction","group":"Input","label":"Steering Mode","description":"How to process queued messages while agent is working"},"type":"enum","default":"one-at-a-time","values":["all","one-at-a-time"]},"followUpMode":{"ui":{"tab":"interaction","group":"Input","label":"Follow-Up Mode","description":"How to drain follow-up messages after a turn completes"},"type":"enum","default":"one-at-a-time","values":["all","one-at-a-time"]},"interruptMode":{"ui":{"tab":"interaction","group":"Input","label":"Interrupt Mode","description":"When steering messages interrupt tool execution"},"type":"enum","default":"immediate","values":["immediate","wait"]},"tui.vimMode":{"ui":{"tab":"interaction","group":"Input","label":"Vim Editing Mode","description":"Modal prompt editing. Escape leaves Insert mode; Normal mode has hjkl, 0, $, ^, w, b, e, gg, G, counts, x/D/C, dd/yy, p and u; operators take motions or text objects (diw, ca(, dap); v/V start a Visual selection that y copies and d deletes"},"type":"boolean","default":false},"tui.vimModeDisplay":{"ui":{"tab":"interaction","group":"Input","label":"Vim Mode Indicator","description":"How the current Vim mode appears in the status line","condition":"vimModeEnabled","options":[{"value":"text","label":"Text","description":"Full mode name — NORMAL, INSERT, VISUAL, V-LINE"},{"value":"icon","label":"Icon","description":"Single compact glyph per mode"},{"value":"none","label":"Hidden","description":"Do not show the mode in the status line"}]},"type":"enum","default":"text","values":["text","icon","none"]},"loop.mode":{"ui":{"tab":"interaction","group":"Input","label":"Loop Mode","description":"What happens between /loop iterations before re-submitting the prompt","options":[{"value":"prompt","label":"Prompt","description":"Re-submit the prompt as a follow-up message (current behavior)"},{"value":"compact","label":"Compact","description":"Compact the session context, then re-submit the prompt"},{"value":"reset","label":"Reset","description":"Start a new session, then re-submit the prompt"}]},"type":"enum","default":"prompt","values":["prompt","compact","reset"]},"loop.conditionTimeoutMs":{"ui":{"tab":"interaction","group":"Input","label":"Loop Condition Timeout (ms)","description":"Max wait for a `/loop --while` / `--until` condition command before treating it as broken and stopping the loop. Set to 0 to wait indefinitely","options":[{"value":"0","label":"Unlimited","description":""},{"value":"10000","label":"10 seconds","description":""},{"value":"30000","label":"30 seconds","description":""},{"value":"120000","label":"2 minutes","description":""}]},"type":"number","default":30000},"composer.recallClearedDrafts":{"ui":{"tab":"interaction","group":"Input","label":"Recall Cleared Drafts","description":"Keep drafts cleared with Ctrl+C in local Up/Down history until exit; disabling affects future clears"},"type":"boolean","default":true},"doubleEscapeAction":{"ui":{"tab":"interaction","group":"Input","label":"Double-Escape Action","description":"What pressing Escape twice with an empty editor does: open the transcript rewind selector, open the session tree, or nothing"},"type":"enum","default":"rewind","values":["rewind","tree","none"]},"treeFilterMode":{"ui":{"tab":"interaction","group":"Input","label":"Session Tree Filter","description":"Default filter mode when opening the session tree"},"type":"enum","default":"default","values":["default","no-tools","user-only","labeled-only","all"]},"autocompleteMaxVisible":{"ui":{"tab":"interaction","group":"Input","label":"Autocomplete Items","description":"Max visible items in autocomplete dropdown (3-20)","options":[{"value":"3","label":"3 items","description":""},{"value":"5","label":"5 items","description":""},{"value":"7","label":"7 items","description":""},{"value":"10","label":"10 items","description":""},{"value":"15","label":"15 items","description":""},{"value":"20","label":"20 items","description":""}]},"type":"number","default":10},"spelling.typoDetection":{"ui":{"tab":"interaction","group":"Input","label":"Typo Detection (macOS)","description":"Mark misspelled prompt words with the active macOS dictionaries","condition":"macOS"},"type":"boolean","default":true},"spelling.autocomplete":{"ui":{"tab":"interaction","group":"Input","label":"Word Autocomplete (macOS)","description":"Show macOS dictionary word completions as inline hints accepted with Tab","condition":"macOS"},"type":"boolean","default":true},"spelling.autocorrect":{"ui":{"tab":"interaction","group":"Input","label":"Autocorrect (macOS)","description":"Apply confident macOS spelling corrections after completed words","condition":"macOS"},"type":"boolean","default":false},"emojiAutocomplete":{"ui":{"tab":"interaction","group":"Input","label":"Emoji Autocomplete","description":"Suggest emojis from `:name:` shortcodes and expand text emoticons like `:D` or `:-)`"},"type":"boolean","default":true},"paste.largeMenuThreshold":{"ui":{"tab":"interaction","group":"Input","label":"Large Paste Menu","description":"When a paste reaches this many lines, offer a menu to wrap it in a code block, wrap it in XML tags, or save it to a file. 0 disables the menu (large pastes still collapse to a [Paste] marker).","options":[{"value":"0","label":"Off","description":""},{"value":"100","label":"100 lines","description":""},{"value":"250","label":"250 lines","description":""},{"value":"500","label":"500 lines","description":""},{"value":"1000","label":"1000 lines","description":""}]},"type":"number","default":100},"startup.quiet":{"ui":{"tab":"interaction","group":"Startup & Updates","label":"Quiet Startup","description":"Skip welcome screen and startup status messages"},"type":"boolean","default":false},"startup.showSplash":{"ui":{"tab":"interaction","group":"Startup & Updates","label":"Show Startup Splash","description":"Show the full animated setup splash on normal interactive startup without rerunning setup. Quiet Startup still suppresses it."},"type":"boolean","default":false},"startup.setupWizard":{"ui":{"tab":"interaction","group":"Startup & Updates","label":"Setup Wizard","description":"Show newly added onboarding steps once per setup version"},"type":"boolean","default":true},"startup.checkUpdate":{"ui":{"tab":"interaction","group":"Startup & Updates","label":"Check for Updates","description":"Check for omp updates on startup"},"type":"boolean","default":true},"update.channel":{"ui":{"tab":"interaction","group":"Startup & Updates","label":"Update Channel","description":"Update channel used by omp update and the startup update check","options":[{"value":"stable","label":"Stable","description":""},{"value":"canary","label":"Canary","description":""}]},"type":"enum","default":"stable","values":["stable","canary"]},"marketplace.autoUpdate":{"ui":{"tab":"interaction","group":"Startup & Updates","label":"Marketplace Auto-Update","description":"Check for plugin updates on startup","options":[{"value":"off","label":"Off","description":"Don\'t check for plugin updates"},{"value":"notify","label":"Notify","description":"Check on startup and notify when updates are available"},{"value":"auto","label":"Auto","description":"Check on startup and auto-install updates"}]},"type":"enum","default":"notify","values":["off","notify","auto"]},"startup.changelogMode":{"ui":{"tab":"interaction","group":"Startup & Updates","label":"Startup Changelog","description":"Choose whether update notes start as a summary, full details, or stay hidden","options":[{"value":"summary","label":"Summary","description":"Show release and change counts with a /changelog hint"},{"value":"expanded","label":"Expanded","description":"Show the recent release notes in full"},{"value":"hidden","label":"Hidden","description":"Do not show release notes on startup"}]},"type":"enum","default":"summary","values":["summary","expanded","hidden"]},"magicKeywords.enabled":{"ui":{"tab":"interaction","group":"Magic Keywords","label":"Magic Keywords","description":"Enable hidden notices for standalone ultrathink, orchestrate, and workflowz keywords"},"type":"boolean","default":true},"magicKeywords.ultrathink":{"ui":{"tab":"interaction","group":"Magic Keywords","label":"Ultrathink Keyword","description":"Let standalone ultrathink request maximum automatic thinking and append its hidden notice"},"type":"boolean","default":true},"magicKeywords.orchestrate":{"ui":{"tab":"interaction","group":"Magic Keywords","label":"Orchestrate Keyword","description":"Let standalone orchestrate append its hidden multi-agent orchestration notice"},"type":"boolean","default":true},"magicKeywords.workflow":{"ui":{"tab":"interaction","group":"Magic Keywords","label":"Workflow Keyword","description":"Let standalone workflowz append its hidden eval workflow notice"},"type":"boolean","default":true},"completion.notify":{"ui":{"tab":"interaction","group":"Notifications","label":"Completion Notification","description":"Notify when the agent finishes a turn"},"type":"enum","default":"on","values":["on","off"]},"error.notify":{"ui":{"tab":"interaction","group":"Notifications","label":"Error Notification","description":"Notify when the agent stops with an error"},"type":"enum","default":"off","values":["on","off"]},"ask.timeout":{"ui":{"tab":"interaction","group":"Notifications","label":"Ask Timeout","description":"Auto-select the recommended ask option after this many seconds (0 disables)","options":[{"value":"0","label":"Disabled","description":""},{"value":"15","label":"15 seconds","description":""},{"value":"30","label":"30 seconds","description":""},{"value":"60","label":"60 seconds","description":""},{"value":"120","label":"120 seconds","description":""}]},"type":"number","default":0},"ask.notify":{"ui":{"tab":"interaction","group":"Notifications","label":"Ask Notification","description":"Notify when the ask tool is waiting for input"},"type":"enum","default":"on","values":["on","off"]},"recap.enabled":{"ui":{"tab":"interaction","group":"Notifications","label":"Idle Recap","description":"Generate a brief LLM recap of where things stand after the terminal has been idle"},"type":"boolean","default":true},"recap.idleSeconds":{"ui":{"tab":"interaction","group":"Notifications","label":"Idle Recap Delay","description":"Seconds to wait while idle before showing the recap","options":[{"value":"60","label":"1 minute","description":""},{"value":"120","label":"2 minutes","description":""},{"value":"240","label":"4 minutes","description":""},{"value":"300","label":"5 minutes","description":""},{"value":"600","label":"10 minutes","description":""}]},"type":"number","default":240},"collab.relayUrl":{"ui":{"tab":"interaction","group":"Collab","label":"Relay URL","description":"Relay used by /collab (wss://host[:port])"},"type":"string","default":"wss://my.omp.sh"},"collab.webUrl":{"ui":{"tab":"interaction","group":"Collab","label":"Web UI URL","description":"Browser UI used by /collab links; empty derives from collab.relayUrl; explicit http:// is localhost-only"},"type":"string","default":""},"collab.displayName":{"ui":{"tab":"interaction","group":"Collab","label":"Display Name","description":"Name shown to other collab participants (default: OS username)"},"type":"string","default":""},"collab.autoStart":{"ui":{"tab":"interaction","group":"Collab","label":"Auto Start","description":"Host every interactive session via collab.relayUrl as it starts and publish it to the local registry (omp collab list); rooms rotate on session switch","options":[{"value":"off","label":"Off","description":"Share only when /collab is run"},{"value":"view","label":"View","description":"Auto-host; the registry hands out view-only links (omp collab link --view)"},{"value":"control","label":"Control","description":"Auto-host; the registry hands out control links that can prompt the session"}]},"type":"enum","default":"off","values":["off","view","control"]},"share.serverUrl":{"ui":{"tab":"interaction","group":"Collab","label":"Share Server","description":"Share viewer/upload base used by /share (encrypted blob upload + viewer; links are <base>/<id>#<key>)"},"type":"string","default":"https://my.omp.sh/s"},"share.store":{"ui":{"tab":"interaction","group":"Collab","label":"Share Store","description":"Where /share uploads the encrypted session blob","options":[{"value":"blob","label":"Encrypted Blob","description":"Upload to the share server (no GitHub account needed; avoids gist API rate limits)"},{"value":"gist","label":"GitHub Gist","description":"Push to a secret gist (needs authenticated gh), falling back to the share server"}]},"type":"enum","default":"blob","values":["blob","gist"]},"share.redactSecrets":{"ui":{"tab":"interaction","group":"Collab","label":"Share Secret Redaction","description":"Run the secret obfuscator over /share snapshots before upload (uses the secrets.* config)"},"type":"boolean","default":true},"stt.enabled":{"ui":{"tab":"interaction","group":"Speech","label":"Speech-to-Text","description":"Enable speech-to-text input via microphone"},"type":"boolean","default":false},"stt.modelName":{"ui":{"tab":"interaction","group":"Speech","label":"Speech Model","description":"Local on-device speech model. Parakeet TDT v3 (sherpa-onnx) is the SoTA default; Whisper base/small/large-v3-turbo tiers (transformers.js) trade size for multilingual coverage. Downloaded on first use.","options":[{"value":"fast","label":"Fast (Whisper base)","description":"Whisper base, multilingual. Smallest + fastest; lowest accuracy. Best for low-resource machines."},{"value":"balanced","label":"Balanced (Whisper small)","description":"Whisper small, multilingual. More accurate than Fast, still light on CPU/RAM."},{"value":"turbo","label":"Turbo (Whisper large-v3)","description":"Whisper large-v3-turbo, 99 languages. Widest language coverage; large download, slower."},{"value":"parakeet","label":"Parakeet TDT v3 (SoTA)","description":"NVIDIA Parakeet TDT 0.6B v3, 25 languages. Open ASR Leaderboard leader — best accuracy and far fastest decoding. Default."}]},"type":"enum","default":"parakeet","values":["fast","balanced","turbo","parakeet"]},"stt.submitTrigger":{"ui":{"tab":"interaction","group":"Speech","label":"Speech-to-Text Submit Trigger","description":"Choose when speech dictation automatically submits: Never, Release (2+ words), Release with complete sentence, or When I Say Submit.","options":[{"value":"never","label":"Never","description":"Never automatically submit; insert dictation and remain in editor."},{"value":"release","label":"Release","description":"Submit on release if the utterance has 2+ words to avoid accidental sends."},{"value":"release-complete","label":"Release with complete sentence","description":"Submit on release if the utterance ends with sentence-terminal punctuation (. ? ! etc.)."},{"value":"say-submit","label":"When I Say Submit","description":"Submit if the utterance ends with a word containing \'submit\' (strips that word before submitting)."}]},"type":"enum","default":"never","values":["never","release","release-complete","say-submit"]},"contextPromotion.enabled":{"ui":{"tab":"context","group":"General","label":"Auto-Promote Context","description":"Promote to a larger-context model on context overflow instead of compacting"},"type":"boolean","default":false},"extendedContext":{"ui":{"tab":"context","group":"General","label":"Extended Context","description":"Use larger context windows where supported; may incur premium pricing. Off keeps default or standard-pricing windows"},"type":"boolean","default":false},"compaction.enabled":{"ui":{"tab":"context","group":"Compaction","label":"Auto-Compact","description":"Automatically compact context when it gets too large"},"type":"boolean","default":true},"compaction.experimentalContextManagement":{"ui":{"tab":"context","group":"Compaction","label":"Notes-backed context windows (experimental)","description":"Keep persistent notes and searchable raw history across context windows. Restart to update available tools."},"type":"boolean","default":false},"compaction.midTurnEnabled":{"ui":{"tab":"context","group":"Compaction","label":"Mid-Turn Compaction","description":"Check thresholds at safe mid-turn tool-loop boundaries before the next provider request"},"type":"boolean","default":true},"compaction.methodOrder":{"ui":{"tab":"context","group":"Compaction","label":"Compaction Method Order","description":"Preferred fallback order for automatic context maintenance; unavailable or failed methods advance to the next choice","ordered":true,"options":[{"value":"remote","label":"Server compaction","description":"Use provider-native server compaction (OpenAI Responses compact, Anthropic compaction beta) when the active route supports it"},{"value":"snapcompact","label":"Snapcompact","description":"Archive history onto dense bitmap images the active vision model reads back; no LLM call"},{"value":"handoff","label":"Handoff","description":"Generate a handoff document and continue from it as the compaction summary"},{"value":"soft","label":"Soft compaction","description":"Summarize in place with a compaction model without using server compaction"},{"value":"shake","label":"Shake","description":"Drop recoverable heavy content in place without an LLM call"}]},"type":"array","default":["remote","snapcompact","handoff","shake","soft"]},"compaction.thresholdPercent":{"ui":{"tab":"context","group":"Compaction","label":"Compaction Threshold","description":"Percent threshold for context maintenance; set to Default to use legacy reserve-based behavior","options":[{"value":"default","label":"Default","description":"Legacy reserve-based threshold"},{"value":"10","label":"10%","description":"Extremely early maintenance"},{"value":"20","label":"20%","description":"Very early maintenance"},{"value":"30","label":"30%","description":"Early maintenance"},{"value":"40","label":"40%","description":"Moderately early maintenance"},{"value":"50","label":"50%","description":"Halfway point"},{"value":"60","label":"60%","description":"Moderate context usage"},{"value":"70","label":"70%","description":"Balanced"},{"value":"75","label":"75%","description":"Slightly aggressive"},{"value":"80","label":"80%","description":"Typical threshold"},{"value":"85","label":"85%","description":"Aggressive context usage"},{"value":"90","label":"90%","description":"Very aggressive"},{"value":"95","label":"95%","description":"Near context limit"}]},"type":"number","default":-1},"compaction.thresholdTokens":{"ui":{"tab":"context","group":"Compaction","label":"Compaction Token Limit","description":"Fixed token limit for context maintenance; overrides percentage if set","options":[{"value":"default","label":"Default","description":"Use percentage-based threshold"},{"value":"25000","label":"25K tokens","description":"1/8 of a 200K window"},{"value":"50000","label":"50K tokens","description":"1/4 of a 200K window"},{"value":"100000","label":"100K tokens","description":"1/2 of a 200K window"},{"value":"150000","label":"150K tokens","description":"3/4 of a 200K window"},{"value":"200000","label":"200K tokens","description":"Full standard context window"},{"value":"300000","label":"300K tokens","description":"Large context window"},{"value":"500000","label":"500K tokens","description":"Very large context window"}]},"type":"number","default":-1},"compaction.handoffSaveToDisk":{"ui":{"tab":"context","group":"Compaction","label":"Save Handoff Docs","description":"Save generated handoff documents to markdown files for the auto-handoff flow"},"type":"boolean","default":false},"compaction.remoteStreamingV2Enabled":{"ui":{"tab":"context","group":"Compaction","label":"Remote Compaction V2","description":"Use Responses streaming compaction for compatible remote compaction models"},"type":"boolean","default":true},"compaction.asyncEnabled":{"ui":{"tab":"context","group":"Compaction","label":"Async Compaction","description":"Speculatively summarize in the background as context nears the compaction threshold, then splice the ready result in when the threshold is crossed"},"type":"boolean","default":true},"compaction.idleEnabled":{"ui":{"tab":"context","group":"Compaction","label":"Idle Compaction","description":"Compact context while idle when token count exceeds threshold"},"type":"boolean","default":false},"compaction.idleThresholdTokens":{"ui":{"tab":"context","group":"Compaction","label":"Idle Compaction Threshold","description":"Token count above which idle compaction triggers","options":[{"value":"100000","label":"100K tokens","description":""},{"value":"200000","label":"200K tokens","description":""},{"value":"300000","label":"300K tokens","description":""},{"value":"400000","label":"400K tokens","description":""},{"value":"500000","label":"500K tokens","description":""},{"value":"600000","label":"600K tokens","description":""},{"value":"700000","label":"700K tokens","description":""},{"value":"800000","label":"800K tokens","description":""},{"value":"900000","label":"900K tokens","description":""}]},"type":"number","default":200000},"compaction.idleTimeoutSeconds":{"ui":{"tab":"context","group":"Compaction","label":"Idle Compaction Delay","description":"Seconds to wait while idle before compacting","options":[{"value":"60","label":"1 minute","description":""},{"value":"120","label":"2 minutes","description":""},{"value":"300","label":"5 minutes","description":""},{"value":"600","label":"10 minutes","description":""},{"value":"1800","label":"30 minutes","description":""},{"value":"3600","label":"1 hour","description":""}]},"type":"number","default":300},"compaction.supersedeReads":{"ui":{"tab":"context","group":"Compaction","label":"Supersede Stale Reads","description":"Prune older read results when the same file is read again (cache-aware, runs every turn)"},"type":"boolean","default":true},"compaction.dropUseless":{"ui":{"tab":"context","group":"Compaction","label":"Elide Uneventful Results","description":"Prune tool results flagged contextually useless (no matches, timed-out waits) once consumed (cache-aware)"},"type":"boolean","default":true},"snapcompact.systemPrompt":{"ui":{"tab":"context","group":"Experimental","label":"Snapcompact System Prompt","description":"Experimental: render selected system prompt text as dense PNG image(s) and attach to the first user message (vision models only). Saves tokens; loses prompt caching for imaged text.","options":[{"value":"none","label":"None","description":"Keep the system prompt as text."},{"value":"agents-md","label":"AGENTS.md","description":"Only move loaded context-file instructions to images, when that saves tokens."},{"value":"all","label":"All","description":"Move the full system prompt to images, when that saves tokens."}]},"type":"enum","default":"none","values":["none","agents-md","all"]},"snapcompact.toolResults":{"ui":{"tab":"context","group":"Experimental","label":"Snapcompact Tool Results","description":"Experimental: render large historical tool results as dense PNG image(s) instead of text (vision models only). Saves tokens on accumulated read/search output."},"type":"boolean","default":false},"tools.format":{"ui":{"tab":"context","group":"Experimental","label":"Tool Calling Mode","description":"Controls how tools are exposed to the model. Auto uses provider-native tool calls unless the selected model is marked as not supporting them, then falls back to the GLM owned dialect. Native forces provider-native tools; the other values force the named owned dialect. Applies on session start.","options":[{"value":"auto","label":"Auto","description":"Use native tool calls unless the model is known not to support them."},{"value":"native","label":"Native","description":"Use provider-native tool calls."},{"value":"glm","label":"GLM","description":"Use GLM-style in-band tool calls."},{"value":"hermes","label":"Hermes","description":"Use Hermes-style in-band tool calls."},{"value":"kimi","label":"Kimi","description":"Use Kimi-style in-band tool calls."},{"value":"xml","label":"XML","description":"Use generic XML in-band tool calls."},{"value":"anthropic","label":"Anthropic","description":"Use Anthropic-style in-band tool calls."},{"value":"deepseek","label":"DeepSeek","description":"Use DeepSeek-style in-band tool calls."},{"value":"harmony","label":"Harmony","description":"Use Harmony-style in-band tool calls."},{"value":"qwen3","label":"Qwen3","description":"Use the Qwen3 owned dialect."},{"value":"gemini","label":"Gemini","description":"Use the Gemini owned dialect."},{"value":"gemma","label":"Gemma","description":"Use the Gemma owned dialect."},{"value":"minimax","label":"MiniMax","description":"Use the MiniMax owned dialect."}]},"type":"enum","default":"auto","values":["auto","native","glm","hermes","kimi","xml","anthropic","deepseek","harmony","qwen3","gemini","gemma","minimax"]},"snapcompact.shape":{"ui":{"tab":"context","group":"Experimental","label":"Snapcompact Shape","description":"Frame shape snapcompact prints text with (compaction archive and inline imaging). Auto picks a shape tuned for the current model.","options":[{"value":"auto","label":"Auto","description":"Picks a shape tuned for the current model, falling back to its provider family."},{"value":"8x8r-bw","label":"8x8 repeated, black","description":"unscii square cell, black ink, every line printed twice with the copy on a pale highlight band."},{"value":"8x8r-sent","label":"8x8 repeated, sentence hues","description":"Repeated grid with ink cycling six hues at sentence boundaries."},{"value":"8x8u-bw","label":"8x8, black","description":"Plain unscii square cell, single-printed lines, black ink."},{"value":"8x8u-sent","label":"8x8, sentence hues","description":"Plain unscii square cell with sentence-hue ink."},{"value":"6x6u-bw","label":"6x6 dense, black","description":"unscii squeezed to 6x6 — densest readable cell, fewest frames — in black ink."},{"value":"6x6u-sent","label":"6x6 dense, sentence hues","description":"Densest cell with sentence-hue ink."},{"value":"5x8-bw","label":"5x8 legacy, black","description":"Original X.org 5x8 glyphs on the 2576px frame, black ink."},{"value":"5x8-sent","label":"5x8 legacy, sentence hues","description":"The original snapcompact shape (pre-shape-table sessions rendered this)."},{"value":"6x12-dim","label":"6x12, dimmed stopwords","description":"X.org 6x12 glyphs, black ink, function words dimmed gray."},{"value":"8x13-bw","label":"8x13, black","description":"X.org 8x13 glyphs, black ink."},{"value":"8on16-bw","label":"8x13 on 16px pitch, black","description":"8x13 glyphs on an 8x16 cell (extra leading), black ink."},{"value":"8on22-bw","label":"8x13 on 22px pitch (leading), black","description":"8x13 glyphs on an 8x22 cell — extra line spacing so rows don\'t crowd. Default for OpenAI/Google."},{"value":"11on16-bw","label":"8x13 on 11px advance (tracking), black","description":"8x13 glyphs on an 11x16 cell — extra letter spacing so characters don\'t merge. Default for Anthropic."},{"value":"silver16-bw","label":"Silver 16, CJK","description":"Embedded Silver TrueType font on a 16px grid for CJK and other non-Latin text."},{"value":"doc-8on16-bw","label":"Doc 8on16, black","description":"Two word-wrapped newspaper columns of 8x13 glyphs on a 16px pitch, black ink."},{"value":"doc-8on16-sent","label":"Doc 8on16, sentence hues","description":"Two-column doc layout with sentence-hue ink."},{"value":"doc-8on16-sent-dim","label":"Doc 8on16, sentence hues + dimmed stopwords","description":"Two-column doc layout, sentence-hue ink, function words dimmed gray."}]},"type":"enum","default":"auto","values":["auto","8x8r-bw","8x8r-sent","8x8u-bw","8x8u-sent","6x6u-bw","6x6u-sent","5x8-bw","5x8-sent","6x12-dim","8x13-bw","8on16-bw","8on22-bw","11on16-bw","silver16-bw","doc-8on16-bw","doc-8on16-sent","doc-8on16-sent-dim"]},"branchSummary.enabled":{"ui":{"tab":"context","group":"General","label":"Branch Summaries","description":"Prompt to summarize when leaving a branch"},"type":"boolean","default":false},"memory.backend":{"ui":{"tab":"memory","group":"General","label":"Memory Backend","description":"Off, local summary pipeline, Mnemopi SQLite, Hindsight remote memory, or Sharpshooter","options":[{"value":"off","label":"Off","description":"No memory subsystem runs"},{"value":"local","label":"Local","description":"Local rollout summarisation pipeline (memory_summary.md)"},{"value":"hindsight","label":"Hindsight","description":"Vectorize Hindsight remote memory service"},{"value":"mnemopi","label":"Mnemopi","description":"Local SQLite recall/retain backend with optional embeddings"},{"value":"sharpshooter","label":"Sharpshooter","description":"Friction-gated project decision files (architecture/product/style), consolidated in the background"}]},"type":"enum","default":"off","values":["off","local","hindsight","mnemopi","sharpshooter"]},"sharpshooter.model":{"ui":{"tab":"memory","group":"Sharpshooter","label":"Sharpshooter Model","description":"Model selector for extraction/consolidation, empty = smol role"},"type":"string"},"autolearn.enabled":{"ui":{"tab":"memory","group":"Auto-Learn","label":"Auto-Learn (experimental)","description":"After the agent stops, nudge it to capture lessons to memory and create/enhance isolated managed skills"},"type":"boolean","default":false},"autolearn.autoContinue":{"ui":{"tab":"memory","group":"Auto-Learn","label":"Auto-run capture at stop","description":"When on, auto-run one private capture turn at stop (uses extra tokens). When off, only standing auto-learn guidance remains.","condition":"autolearnActive"},"type":"boolean","default":false},"mnemopi.dbPath":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi DB Path","description":"Optional SQLite DB path. Defaults to the agent memories directory.","condition":"mnemopiActive"},"type":"string"},"mnemopi.bank":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi Bank","description":"Optional shared bank base name. Per-project modes derive project-local banks from it.","condition":"mnemopiActive"},"type":"string"},"mnemopi.scoping":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi Scoping","description":"global = one shared bank; per-project = isolated bank per cwd; per-project-tagged = project-local writes plus global recall visibility","condition":"mnemopiActive","options":[{"value":"global","label":"Global","description":"One shared Mnemopi bank for every project"},{"value":"per-project","label":"Per project","description":"Project-local Mnemopi bank per cwd basename"},{"value":"per-project-tagged","label":"Per project (tagged)","description":"Write to a project-local bank but merge project + shared recall results"}]},"type":"enum","default":"per-project","values":["global","per-project","per-project-tagged"]},"mnemopi.embeddingVariant":{"ui":{"tab":"memory","group":"Mnemopi","label":"Embedding variant","description":"Local embedding model family. en = stronger English model; multilingual = cross-language model. Changing this rebuilds existing memory embeddings on next start.","condition":"mnemopiActive","options":[{"value":"en","label":"English (bge-base-en-v1.5)","description":"BAAI/bge-base-en-v1.5 (768d), English-only"},{"value":"multilingual","label":"Multilingual (multilingual-e5-large)","description":"intfloat/multilingual-e5-large (1024d), cross-language recall"}]},"type":"enum","default":"en","values":["en","multilingual"]},"mnemopi.autoRecall":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi Auto Recall","description":"Recall local memories into the first turn of each session","condition":"mnemopiActive"},"type":"boolean","default":true},"mnemopi.autoRetain":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi Auto Retain","description":"Retain completed conversation turns into local Mnemopi memory","condition":"mnemopiActive"},"type":"boolean","default":true},"mnemopi.polyphonicRecall":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi Polyphonic Recall","description":"Enable 4-voice recall (vector, graph, fact, temporal) fused with reciprocal rank fusion","condition":"mnemopiActive"},"type":"boolean","default":false},"mnemopi.enhancedRecall":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi Enhanced Recall","description":"Enable the tiered query result cache for repeated and similar recall queries","condition":"mnemopiActive"},"type":"boolean","default":false},"mnemopi.proactiveLinking":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi Proactive Linking","description":"Ingest new memories into the episodic graph as they are stored, linking them to related entities and memories","condition":"mnemopiActive"},"type":"boolean","default":false},"mnemopi.noEmbeddings":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi Disable Embeddings","description":"Force deterministic FTS-only recall instead of vector embeddings","condition":"mnemopiActive"},"type":"boolean","default":false},"mnemopi.embeddingModel":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi Embedding Model","description":"Advanced: explicit embedding model id that overrides the variant. Leave empty to use mnemopi.embeddingVariant.","condition":"mnemopiActive"},"type":"string"},"mnemopi.embeddingApiUrl":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi Embedding API URL","description":"Optional OpenAI-compatible embedding endpoint passed to Mnemopi","condition":"mnemopiActive"},"type":"string"},"mnemopi.embeddingApiKey":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi Embedding API Key","description":"Optional embedding API key passed to Mnemopi","condition":"mnemopiActive"},"type":"string","credential":true},"mnemopi.llmMode":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi LLM Mode","description":"Use no LLM, the online tiny model (the TINY role from /models, else @smol), or a remote OpenAI-compatible endpoint","condition":"mnemopiActive","options":[{"value":"none","label":"None","description":"Disable Mnemopi LLM-backed extraction"},{"value":"smol","label":"Online (tiny)","description":"Use the online tiny model (the TINY role from /models, else @smol)"},{"value":"remote","label":"Remote","description":"Use the Mnemopi remote LLM settings below"}]},"type":"enum","default":"smol","values":["none","smol","remote"]},"mnemopi.llmBaseUrl":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi LLM Base URL","description":"Optional OpenAI-compatible LLM endpoint for Mnemopi remote mode","condition":"mnemopiActive"},"type":"string"},"mnemopi.llmApiKey":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi LLM API Key","description":"Optional LLM API key for Mnemopi remote mode","condition":"mnemopiActive"},"type":"string","credential":true},"mnemopi.llmModel":{"ui":{"tab":"memory","group":"Mnemopi","label":"Mnemopi LLM Model","description":"Optional LLM model name for Mnemopi remote mode","condition":"mnemopiActive"},"type":"string"},"hindsight.apiUrl":{"ui":{"tab":"memory","group":"Hindsight","label":"Hindsight API URL","description":"Hindsight server URL (Cloud or self-hosted)","condition":"hindsightActive"},"type":"string","default":"http://localhost:8888"},"hindsight.apiToken":{"ui":{"tab":"memory","group":"Hindsight","label":"Hindsight API Token","description":"Bearer token for authenticated Hindsight servers","condition":"hindsightActive"},"type":"string","credential":true},"hindsight.bankId":{"ui":{"tab":"memory","group":"Hindsight","label":"Hindsight Bank ID","description":"Memory bank identifier (default: project name)","condition":"hindsightActive"},"type":"string"},"hindsight.scoping":{"ui":{"tab":"memory","group":"Hindsight","label":"Hindsight Scoping","description":"global = one shared bank; per-project = isolated bank per cwd; per-project-tagged = shared bank with project tags so global + project memories merge on recall","condition":"hindsightActive","options":[{"value":"global","label":"Global","description":"One shared bank — every project sees the same memories"},{"value":"per-project","label":"Per project","description":"Isolated bank per cwd basename — projects cannot see each other\'s memories"},{"value":"per-project-tagged","label":"Per project (tagged)","description":"Shared bank, retains tagged with project:<cwd>. Recall surfaces project + untagged global memories together"}]},"type":"enum","default":"per-project-tagged","values":["global","per-project","per-project-tagged"]},"hindsight.autoRecall":{"ui":{"tab":"memory","group":"Hindsight","label":"Hindsight Auto Recall","description":"Recall memories on the first turn of each session","condition":"hindsightActive"},"type":"boolean","default":true},"hindsight.autoRetain":{"ui":{"tab":"memory","group":"Hindsight","label":"Hindsight Auto Retain","description":"Retain transcript every N turns and at session boundaries","condition":"hindsightActive"},"type":"boolean","default":true},"hindsight.retainMode":{"ui":{"tab":"memory","group":"Hindsight","label":"Hindsight Retain Mode","description":"full-session = upsert one document per session, last-turn = chunked","condition":"hindsightActive","options":[{"value":"full-session","label":"Full session","description":"Upsert one document per session (recommended)"},{"value":"last-turn","label":"Last turn","description":"Chunked retention sliced by turn boundaries"}]},"type":"enum","default":"full-session","values":["full-session","last-turn"]},"hindsight.mentalModelsEnabled":{"ui":{"tab":"memory","group":"Hindsight","label":"Hindsight Mental Models","description":"Read curated reflect summaries (mental models) into developer instructions at boot. Loads existing models on the bank — does not write. Pair with hindsight.mentalModelAutoSeed to also auto-create the built-in seed set.","condition":"hindsightActive"},"type":"boolean","default":true},"hindsight.mentalModelAutoSeed":{"ui":{"tab":"memory","group":"Hindsight","label":"Hindsight Mental Model Auto-Seed","description":"At session start, create any built-in mental models (project-conventions, project-decisions, user-preferences) that do not yet exist on the bank.","condition":"hindsightActive"},"type":"boolean","default":true},"ttsr.enabled":{"ui":{"tab":"context","group":"Rules (TTSR)","label":"TTSR","description":"Interrupt the agent mid-stream when output matches rule patterns (Time-Traveling Stream Rules)"},"type":"boolean","default":true},"ttsr.contextMode":{"ui":{"tab":"context","group":"Rules (TTSR)","label":"TTSR Context Mode","description":"What to do with partial output when TTSR triggers"},"type":"enum","default":"discard","values":["discard","keep"]},"ttsr.interruptMode":{"ui":{"tab":"context","group":"Rules (TTSR)","label":"TTSR Interrupt Mode","description":"When to interrupt mid-stream vs inject warning after completion","options":[{"value":"always","label":"always","description":"Interrupt on prose and tool streams"},{"value":"prose-only","label":"prose-only","description":"Interrupt only on reply/thinking matches"},{"value":"tool-only","label":"tool-only","description":"Interrupt only on tool-call argument matches"},{"value":"never","label":"never","description":"Never interrupt; inject warning after completion"}]},"type":"enum","default":"always","values":["never","prose-only","tool-only","always"]},"ttsr.repeatMode":{"ui":{"tab":"context","group":"Rules (TTSR)","label":"TTSR Repeat Mode","description":"How rules can repeat: once per session or after a message gap"},"type":"enum","default":"once","values":["once","after-gap"]},"ttsr.repeatGap":{"ui":{"tab":"context","group":"Rules (TTSR)","label":"TTSR Repeat Gap","description":"Messages before a rule can trigger again","options":[{"value":"5","label":"5 messages","description":""},{"value":"10","label":"10 messages","description":""},{"value":"15","label":"15 messages","description":""},{"value":"20","label":"20 messages","description":""},{"value":"30","label":"30 messages","description":""}]},"type":"number","default":10},"ttsr.builtinRules":{"ui":{"tab":"context","group":"Rules (TTSR)","label":"Built-in Rules","description":"Load the default rules shipped with the agent (override individually with ttsr.disabledRules)"},"type":"boolean","default":true},"ttsr.disabledRules":{"ui":{"tab":"context","group":"Rules (TTSR)","label":"Disabled Rules","description":"Rule names to ignore entirely (applies to bundled defaults and your own rules)"},"type":"array","default":[]},"edit.mode":{"ui":{"tab":"files","group":"Editing","label":"Edit Mode","description":"Select the edit tool variant (replace, patch, hashline, or apply_patch)"},"type":"enum","default":"hashline","values":["apply_patch","hashline","patch","replace","sloppy"]},"edit.fuzzyMatch":{"ui":{"tab":"files","group":"Editing","label":"Fuzzy Match","description":"Accept high-confidence fuzzy matches for whitespace differences"},"type":"boolean","default":true},"edit.fuzzyThreshold":{"ui":{"tab":"files","group":"Editing","label":"Fuzzy Match Threshold","description":"Similarity threshold (0-1) for accepting fuzzy matches","options":[{"value":"0.85","label":"0.85","description":"Lenient"},{"value":"0.90","label":"0.90","description":"Moderate"},{"value":"0.95","label":"0.95","description":"Default"},{"value":"0.98","label":"0.98","description":"Strict"}]},"type":"number","default":0.95},"edit.streamingAbort":{"ui":{"tab":"files","group":"Editing","label":"Abort on Failed Preview","description":"Abort streaming edit tool calls when patch preview fails"},"type":"boolean","default":false},"edit.recoverInlineEdits":{"ui":{"tab":"files","group":"Editing","label":"Recover Inline Edit Payloads","description":"Execute edit payloads the model emits as plain text by converting them into edit tool calls"},"type":"boolean","default":true},"edit.blockAutoGenerated":{"ui":{"tab":"files","group":"Editing","label":"Block Auto-Generated Files","description":"Prevent editing of files that appear to be auto-generated (protoc, sqlc, swagger, etc.)"},"type":"boolean","default":true},"edit.enforceSeenLines":{"ui":{"tab":"files","group":"Editing","label":"Enforce Seen-Line Guard","description":"Reject edits anchored on lines a prior read/search never displayed in full"},"type":"boolean","default":false},"edit.blackbox.enabled":{"ui":{"tab":"files","group":"Editing","label":"Record Parse Regressions","description":"Append full before/after source when an edit introduces an AST parse failure"},"type":"boolean","default":false},"edit.autoRepair.enabled":{"ui":{"tab":"files","group":"Editing","label":"Auto-Repair Parse Regressions","description":"When an edit breaks a file\'s AST parse, ask the smol model to fix the broken region (validated by re-parse; falls back to a warning)"},"type":"boolean","default":false},"readLineNumbers":{"ui":{"tab":"files","group":"Reading","label":"Line Numbers","description":"Prepend line numbers to read tool output by default"},"type":"boolean","default":false},"read.defaultLimit":{"ui":{"tab":"files","group":"Reading","label":"Default Read Limit","description":"Default number of lines returned when agent calls read without a limit","options":[{"value":"200","label":"200 lines","description":""},{"value":"300","label":"300 lines","description":""},{"value":"500","label":"500 lines","description":""},{"value":"1000","label":"1000 lines","description":""},{"value":"5000","label":"5000 lines","description":""}]},"type":"number","default":300},"read.renderMarkdown":{"ui":{"tab":"files","group":"Reading","label":"Markdown Previews","description":"Render Markdown read results as formatted terminal Markdown previews instead of raw source"},"type":"boolean","default":false},"read.summarize.enabled":{"ui":{"tab":"files","group":"Read Summaries","label":"Read Summaries","description":"Return structural code summaries when read is called without an explicit selector"},"type":"boolean","default":true},"read.summarize.prose":{"ui":{"tab":"files","group":"Read Summaries","label":"Prose Summaries","description":"Return structural summaries for Markdown and plain text reads"},"type":"boolean","default":false},"read.summarize.minBodyLines":{"ui":{"tab":"files","group":"Read Summaries","label":"Read Summary Body Lines","description":"Minimum multiline body or literal length before read summaries collapse it"},"type":"number","default":4},"read.summarize.minCommentLines":{"ui":{"tab":"files","group":"Read Summaries","label":"Read Summary Comment Lines","description":"Minimum multiline block comment length before read summaries collapse it"},"type":"number","default":6},"read.summarize.minTotalLines":{"ui":{"tab":"files","group":"Read Summaries","label":"Read Summary Minimum File Length","description":"Files with fewer total lines are read verbatim instead of structurally summarized"},"type":"number","default":100},"read.summarize.unfoldUntil":{"ui":{"tab":"files","group":"Read Summaries","label":"Read Summary Unfold Target","description":"BFS-unfold elidable spans until the summary is at least this many visible lines. 0 keeps only the outermost elisions."},"type":"number","default":50},"read.summarize.unfoldLimit":{"ui":{"tab":"files","group":"Read Summaries","label":"Read Summary Unfold Ceiling","description":"Hard ceiling on summary size while BFS-unfolding. An unfold whose revealed lines would exceed this is skipped (that span stays folded) and unfolding continues with the remaining spans."},"type":"number","default":100},"read.toolResultPreview":{"ui":{"tab":"files","group":"Reading","label":"Inline Read Previews","description":"Render read tool results inline in the transcript instead of summary rows"},"type":"boolean","default":false},"lsp.enabled":{"ui":{"tab":"files","group":"LSP","label":"LSP","description":"Enable the lsp tool for code intelligence (definitions, references, diagnostics, rename)"},"type":"boolean","default":true},"lsp.lazy":{"ui":{"tab":"files","group":"LSP","label":"Lazy LSP Startup","description":"Start language servers on first use (lsp tool or editing a matching file type) instead of at session startup"},"type":"boolean","default":true},"lsp.shared":{"ui":{"tab":"files","group":"LSP","label":"Shared Language Servers","description":"Share one language server per project across omp instances via the daemon broker (falls back to private servers when unavailable)"},"type":"boolean","default":true},"lsp.formatOnWrite":{"ui":{"tab":"files","group":"LSP","label":"Format on Write","description":"Automatically format code files using LSP after writing"},"type":"boolean","default":false},"lsp.diagnosticsOnWrite":{"ui":{"tab":"files","group":"LSP","label":"Diagnostics on Write","description":"Return LSP diagnostics after writing code files"},"type":"boolean","default":true},"lsp.diagnosticsOnEdit":{"ui":{"tab":"files","group":"LSP","label":"Diagnostics on Edit","description":"Return LSP diagnostics after editing code files"},"type":"boolean","default":false},"lsp.diagnosticsDeduplicate":{"ui":{"tab":"files","group":"LSP","label":"Deduplicate Diagnostics","description":"Suppress post-edit LSP diagnostics already shown for a file; only surface new or changed ones"},"type":"boolean","default":true},"bash.enabled":{"ui":{"tab":"shell","group":"Bash","label":"Bash","description":"Enable the bash tool for shell command execution"},"type":"boolean","default":true},"bash.allowCompoundCommands":{"ui":{"tab":"shell","group":"Bash","label":"Allow Compound Commands","description":"Evaluate literal && chains per command; unmatched commands use normal bash approval policy and mode"},"type":"boolean","default":false},"bash.autoBackground.enabled":{"ui":{"tab":"shell","group":"Bash","label":"Bash Auto-Background","description":"Automatically background long-running bash commands and deliver the result later"},"type":"boolean","default":true},"bash.patterns":{"ui":{"tab":"shell","group":"Bash","label":"Bash Approval Patterns","description":"Ordered bash command approval rules. Each item has match and approval fields; only \'*\' wildcards are supported."},"type":"array","default":[]},"bashInterceptor.enabled":{"ui":{"tab":"shell","group":"Bash","label":"Bash Interceptor","description":"Block shell commands that have dedicated tools"},"type":"boolean","default":false},"bash.direnv":{"ui":{"tab":"shell","group":"Bash","label":"direnv Auto-Load","description":"Auto-load a repo\'s direnv/devenv `.envrc` into the bash session so devenv tools and env vars are present without manual `direnv exec`. Honors direnv\'s allow list: an `.envrc` you haven\'t `direnv allow`ed is never executed"},"type":"enum","default":"auto","values":["auto","off"]},"bash.direnvLoadTimeoutMs":{"ui":{"tab":"shell","group":"Bash","label":"direnv Load Timeout (ms)","description":"Max wait for the first `direnv export` (a cold devenv shell can be slow); on timeout the session runs without the direnv env"},"type":"number","default":30000},"shellMinimizer.enabled":{"ui":{"tab":"shell","group":"Bash","label":"Shell Minimizer","description":"Compress verbose shell output (git, npm, cargo, etc.) before returning it to the agent"},"type":"boolean","default":true},"shellMinimizer.sourceOutlineLevel":{"ui":{"tab":"shell","group":"Bash","label":"Shell Minimizer Source Outline","description":"Source outline mode for cat/read of source files: default or aggressive"},"type":"enum","default":"default","values":["default","aggressive"]},"eval.py":{"ui":{"tab":"shell","group":"Eval & Runtimes","label":"Python Eval Backend","description":"Allow the eval tool to dispatch Python cells to the IPython kernel"},"type":"boolean","default":true},"eval.js":{"ui":{"tab":"shell","group":"Eval & Runtimes","label":"JavaScript Eval Backend","description":"Allow the eval tool to dispatch JavaScript cells to the in-process runtime"},"type":"boolean","default":true},"eval.tools.enabled":{"ui":{"tab":"shell","group":"Eval & Runtimes","label":"Eval-Defined Tools","description":"Let eval cells define tools (@tool in Python, tool(fn) in JS) that task, agent(), and workpool() subagents can call"},"type":"boolean","default":true},"eval.workpool.freshAgents":{"ui":{"tab":"shell","group":"Eval & Runtimes","label":"Fresh Workpool Agents","description":"Spawn a new subagent for every workpool item instead of reusing workers or batching queued items"},"type":"boolean","default":false},"eval.autoBackground.enabled":{"ui":{"tab":"shell","group":"Eval & Runtimes","label":"Eval Auto-Background","description":"Automatically background long-running eval cells and deliver the result later"},"type":"boolean","default":false},"python.kernelMode":{"ui":{"tab":"shell","group":"Eval & Runtimes","label":"Python Kernel Mode","description":"Keep the IPython kernel alive across eval calls or start fresh each time"},"type":"enum","default":"session","values":["session","per-call"]},"python.interpreter":{"ui":{"tab":"shell","group":"Eval & Runtimes","label":"Python Interpreter","description":"Optional path to an exact Python executable. When set, automatic Python runtime discovery is skipped."},"type":"string","default":""},"tools.approval":{"ui":{"tab":"interaction","group":"Approvals","label":"Tool Approval Policies","description":"Per-tool approval policies. Set to \'allow\' to auto-approve, \'prompt\' to require confirmation, or \'deny\' to block. Overrides are honored in every approval mode."},"type":"record","default":{}},"tools.approvalMode":{"ui":{"tab":"interaction","group":"Approvals","label":"Tool Approval","description":"Default approval behavior for tool calls. \'Always ask\' auto-approves read-only tools only. \'Write\' auto-approves read and workspace-write tools. \'Yolo\' auto-approves all tiers; user policy may still prompt or block.","options":[{"value":"always-ask","label":"Always ask","description":"Auto-approve read-only tools; require confirmation for write and exec tools."},{"value":"write","label":"Write","description":"Auto-approve read-only and write tools; require confirmation for exec tools such as bash, eval, browser, and task."},{"value":"yolo","label":"Yolo","description":"Auto-approve read, write, and exec tools. User policy can still require confirmation or block calls."}]},"type":"enum","default":"yolo","values":["always-ask","write","yolo"]},"todo.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Todos","description":"Enable the todo tool for task tracking"},"type":"boolean","default":true},"todo.reminders":{"ui":{"tab":"tools","group":"Todos","label":"Todo Reminders","description":"Remind the agent to complete todos before stopping"},"type":"boolean","default":true},"todo.remindersMax":{"ui":{"tab":"tools","group":"Todos","label":"Todo Reminder Limit","description":"Maximum number of todo reminders before giving up","options":[{"value":"1","label":"1 reminder","description":""},{"value":"2","label":"2 reminders","description":""},{"value":"3","label":"3 reminders","description":""},{"value":"5","label":"5 reminders","description":""}]},"type":"number","default":3},"todo.eager":{"ui":{"tab":"tools","group":"Todos","label":"Create Todos Automatically","description":"How strongly to push automatic todo-list creation after the first message","options":[{"value":"default","label":"Default","description":"Model decides; no automatic todo list"},{"value":"preferred","label":"Preferred","description":"Suggests a todo list on the first message (reminder, not forced)"},{"value":"always","label":"Always","description":"Forces a comprehensive todo list on the first message"}]},"type":"enum","default":"default","values":["default","preferred","always"]},"glob.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Glob","description":"Enable the glob tool for glob-based file lookup"},"type":"boolean","default":true},"grep.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Grep","description":"Enable the grep tool for regex content search"},"type":"boolean","default":true},"grep.contextBefore":{"ui":{"tab":"tools","group":"Grep & Browser","label":"Grep Context Before","description":"Lines of context before each grep match","options":[{"value":"0","label":"0 lines","description":""},{"value":"1","label":"1 line","description":""},{"value":"2","label":"2 lines","description":""},{"value":"3","label":"3 lines","description":""},{"value":"5","label":"5 lines","description":""}]},"type":"number","default":1},"grep.contextAfter":{"ui":{"tab":"tools","group":"Grep & Browser","label":"Grep Context After","description":"Lines of context after each grep match","options":[{"value":"0","label":"0 lines","description":""},{"value":"1","label":"1 line","description":""},{"value":"2","label":"2 lines","description":""},{"value":"3","label":"3 lines","description":""},{"value":"5","label":"5 lines","description":""},{"value":"10","label":"10 lines","description":""}]},"type":"number","default":3},"astGrep.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"AST Grep","description":"Enable the ast_grep tool for structural AST search"},"type":"boolean","default":false},"astEdit.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"AST Edit","description":"Enable the ast_edit tool for structural AST rewrites"},"type":"boolean","default":true},"debug.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Debug","description":"Enable the debug tool for DAP-based debugging"},"type":"boolean","default":true},"launch.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Launch","description":"Enable the launch tool for supervising shared long-running project processes"},"type":"boolean","default":true},"speechgen.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Speech Generation","description":"Enable the tts tool for on-device (Kokoro) or xAI Grok Voice speech-file synthesis"},"type":"boolean","default":false},"generate_image.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Generate Image","description":"Enable the generate_image tool (text-to-image generation and editing). Exposed as an xd:// device when tools.xdev is on."},"type":"boolean","default":false},"computer.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Computer","description":"Enable the scriptable host-desktop eval prelude (screenshots, input, accessibility)"},"type":"boolean","default":false},"computer.display":{"ui":{"tab":"tools","group":"Computer","label":"Computer Display","description":"Composite all displays or select a native display id"},"type":"string","default":"all"},"computer.maxWidth":{"ui":{"tab":"tools","group":"Computer","label":"Computer Screenshot Width","description":"Maximum composite screenshot width in pixels"},"type":"number","default":3840},"computer.maxHeight":{"ui":{"tab":"tools","group":"Computer","label":"Computer Screenshot Height","description":"Maximum composite screenshot height in pixels"},"type":"number","default":2400},"images.questionTimeoutMs":{"ui":{"tab":"tools","group":"Execution","label":"Image Question Timeout","description":"Per-request timeout for the vision-model call behind read\'s ?q= image questions, in milliseconds. A stalled provider fails fast with a timeout error instead of blocking until manual abort. Set to 0 to disable the timeout.","options":[{"value":"0","label":"Disabled","description":""},{"value":"60000","label":"1 minute","description":""},{"value":"120000","label":"2 minutes","description":""},{"value":"180000","label":"3 minutes","description":""},{"value":"300000","label":"5 minutes","description":""}]},"type":"number","default":300000},"checkpoint.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Checkpoint/Rewind","description":"Enable the checkpoint and rewind tools for context checkpointing"},"type":"boolean","default":false},"fetch.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Read URLs","description":"Allow the read tool to fetch and process URLs"},"type":"boolean","default":true},"vault.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Obsidian Vault","description":"Enable the vault:// internal URL for reading and editing Obsidian vault content via the Obsidian CLI. When disabled, vault:// resolution is refused and the vault:// entry is omitted from the system prompt."},"type":"boolean","default":false},"github.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"GitHub CLI","description":"Enable the github tool (op-based dispatch for repository, issue, pull request, diff, search, checkout, push, and Actions watch workflows)"},"type":"boolean","default":false},"github.cache.enabled":{"ui":{"tab":"tools","group":"GitHub","label":"GitHub View Cache","description":"Cache rendered issue/PR view output in ~/.omp/cache/github-cache.db so repeated reads are free"},"type":"boolean","default":true},"github.cache.softTtlSec":{"ui":{"tab":"tools","group":"GitHub","label":"GitHub Cache Soft TTL","description":"Within this window, cached issue/PR view rows are returned directly (seconds; default 5 minutes)"},"type":"number","default":300},"github.cache.hardTtlSec":{"ui":{"tab":"tools","group":"GitHub","label":"GitHub Cache Hard TTL","description":"Past the soft TTL the cached row is returned and refreshed in the background; past the hard TTL it is dropped (seconds; default 7 days)"},"type":"number","default":604800},"web_search.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Web Search","description":"Enable the web_search tool for live web results"},"type":"boolean","default":true},"security.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Security","description":"Enable OMP-native security scan planning, execution, and the read-only security:// resource namespace"},"type":"boolean","default":false},"ask.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Ask","description":"Enable the ask tool for interactive user questions"},"type":"boolean","default":true},"browser.enabled":{"ui":{"tab":"tools","group":"Available Tools","label":"Browser","description":"Enable the browser eval prelude for scripted Chromium automation (Puppeteer)"},"type":"boolean","default":true},"browser.cdpUrl":{"ui":{"tab":"tools","group":"Grep & Browser","label":"Browser CDP URL","description":"Default HTTP CDP discovery endpoint (for example http://127.0.0.1:9222) to attach to instead of launching a browser. Explicit app.cdp_url or app.path on the tool call take precedence."},"type":"string"},"browser.relay":{"ui":{"tab":"tools","group":"Grep & Browser","label":"Browser Relay","description":"Drive your own Chrome tabs through the omp browser relay. Install the extension once (`omp browser-relay install`); the relay server auto-starts when the browser prelude needs it. Takes precedence over Browser CDP URL; set PI_BROWSER_RELAY=0 or PI_BROWSER_RELAY=1 to override."},"type":"boolean","default":false},"browser.relayUrl":{"ui":{"tab":"tools","group":"Grep & Browser","label":"Browser Relay URL","description":"omp browser relay endpoint (default http://127.0.0.1:9224)."},"type":"string"},"browser.headless":{"ui":{"tab":"tools","group":"Grep & Browser","label":"Headless Browser","description":"Launch browser in headless mode (disable to show browser UI)"},"type":"boolean","default":true},"browser.cmux":{"ui":{"tab":"tools","group":"Grep & Browser","label":"cmux Browser","description":"Use cmux WKWebView surfaces for browser automation when a cmux socket is available. Set PI_BROWSER_CMUX=0 or PI_BROWSER_CMUX=1 to override."},"type":"boolean","default":true},"browser.freezeOnTurnEnd":{"ui":{"tab":"tools","group":"Grep & Browser","label":"Freeze Browser Tabs On Turn End","description":"Freeze OMP-owned headless browser tabs when a turn settles so animated pages stop burning CPU/GPU while idle. Tabs unfreeze automatically on next use; pass persist:true on open to opt a tab out."},"type":"boolean","default":true},"browser.idleCloseSec":{"ui":{"tab":"tools","group":"Grep & Browser","label":"Browser Idle Close Timeout","description":"Close OMP-owned headless browser tabs idle longer than this many seconds (0 = never; session dispose still reaps). Applies only to OMP-launched headless tabs, never relay/CDP/spawned browsers or other sessions\' tabs.","options":[{"value":"0","label":"Never","description":""},{"value":"900","label":"15 minutes","description":""},{"value":"1800","label":"30 minutes","description":""},{"value":"3600","label":"1 hour","description":""}]},"type":"number","default":1800},"browser.screenshotDir":{"ui":{"tab":"tools","group":"Grep & Browser","label":"Screenshot Directory","description":"Directory to save screenshots. If unset, screenshots go to a temp file. Supports ~. Examples: ~/Downloads, ~/Desktop, /sdcard/Download (Android)"},"type":"string"},"tools.intentTracing":{"ui":{"tab":"tools","group":"Execution","label":"Intent Tracing","description":"Ask the agent to describe the intent of each tool call before executing it"},"type":"boolean","default":true},"tools.abortOnFabricatedResult":{"ui":{"tab":"tools","group":"Execution","label":"Abort On Fabricated Tool Result","description":"With in-band tool calls, stop the model immediately when it starts hallucinating a tool result mid-turn. Disable to let the model finish generating and discard the fabricated continuation instead."},"type":"boolean","default":true},"tools.speculativeExecution.enabled":{"ui":{"tab":"tools","group":"Execution","label":"Experimental Speculative Execution","description":"Enable the discard-safe first slice: validated local reads through direct read calls and nested eval. Network requests, provider completions, and live filesystem writes are not part of this baseline."},"type":"boolean","default":false},"tools.speculativeExecution.maxInFlight":{"ui":{"tab":"tools","group":"Execution","label":"Speculative Execution Concurrency","description":"Maximum number of validated local reads allowed to run before normal dispatch.","options":[{"value":"1","label":"1 operation","description":""},{"value":"2","label":"2 operations","description":""},{"value":"3","label":"3 operations","description":""},{"value":"4","label":"4 operations","description":""}]},"type":"number","default":2},"tools.maxTimeout":{"ui":{"tab":"tools","group":"Execution","label":"Max Tool Timeout","description":"Maximum timeout in seconds the agent can set for any tool (0 = no limit)","options":[{"value":"0","label":"No limit","description":""},{"value":"30","label":"30 seconds","description":""},{"value":"60","label":"60 seconds","description":""},{"value":"120","label":"120 seconds","description":""},{"value":"300","label":"5 minutes","description":""},{"value":"600","label":"10 minutes","description":""}]},"type":"number","default":0},"async.enabled":{"ui":{"tab":"tools","group":"Execution","label":"Async Execution","description":"Enable async bash commands and background task execution"},"type":"boolean","default":true},"irc.timeoutMs":{"ui":{"tab":"tools","group":"Execution","label":"IRC Timeout","description":"Timeout for hub send await:true in milliseconds; 0 disables the timeout","options":[{"value":"0","label":"Disabled","description":""},{"value":"30000","label":"30 seconds","description":""},{"value":"60000","label":"1 minute","description":""},{"value":"120000","label":"2 minutes","description":""},{"value":"300000","label":"5 minutes","description":""}]},"type":"number","default":120000},"tools.xdev":{"ui":{"tab":"tools","group":"Discovery & MCP","label":"xd:// Tools","description":"Mount rarely-used (discoverable) tools under xd:// device URLs driven via read/write instead of shipping their schemas on every request. Sessions whose explicit tool list grants read but omits write mount devices through a device-only write transport (filesystem writes stay rejected). Disable to expose every enabled tool top-level."},"type":"boolean","default":true},"tools.xdevDocs":{"ui":{"tab":"tools","group":"Discovery & MCP","label":"xd:// Prompt Docs","description":"Choose which mounted-device docs and schemas are inlined in the system prompt. Built-ins keeps core tools inline while MCP and extension tools stay on-demand.","options":[{"value":"inline","label":"All Devices","description":"Inline docs and schemas for every mounted device."},{"value":"builtins","label":"Built-ins Only","description":"Inline built-in docs; fetch MCP and extension docs on demand."},{"value":"catalog","label":"Catalog Only","description":"List every device; fetch all docs on demand."}]},"type":"enum","default":"builtins","values":["inline","builtins","catalog"]},"tools.xdevInlineDevices":{"ui":{"tab":"tools","group":"Discovery & MCP","label":"xd:// Inline Devices","description":"When xd:// Prompt Docs is Built-ins Only, inline dynamic devices whose names match these glob patterns (for example mcp__context_mode_*). Catalog Only ignores this setting."},"type":"array","default":[]},"mcp.enableProjectConfig":{"ui":{"tab":"tools","group":"Discovery & MCP","label":"MCP Project Config","description":"Load .mcp.json/mcp.json from project root"},"type":"boolean","default":true},"mcp.renderMarkdownResults":{"ui":{"tab":"tools","group":"Discovery & MCP","label":"MCP Markdown Results","description":"Render non-JSON MCP text results as Markdown in the transcript"},"type":"boolean","default":true},"mcp.notifications":{"ui":{"tab":"tools","group":"Discovery & MCP","label":"MCP Update Injection","description":"Inject MCP resource updates into the agent conversation"},"type":"boolean","default":false},"mcp.notificationDebounceMs":{"ui":{"tab":"tools","group":"Discovery & MCP","label":"MCP Notification Debounce","description":"Debounce window in milliseconds for MCP resource updates before injecting them into the conversation"},"type":"number","default":500},"plan.enabled":{"ui":{"tab":"tasks","group":"Modes","label":"Plan Mode","description":"Enable plan mode for read-only exploration and planning before execution"},"type":"boolean","default":true},"plan.defaultOnStartup":{"ui":{"tab":"tasks","group":"Modes","label":"Start in Plan Mode","description":"Automatically enter plan mode at the start of every new session","condition":"planModeEnabled"},"type":"boolean","default":false},"plan.autosave":{"ui":{"tab":"tasks","group":"Modes","label":"Autosave Plans","description":"Automatically save approved plans to disk when plan mode completes","condition":"planModeEnabled"},"type":"boolean","default":false},"plan.autosaveDir":{"ui":{"tab":"tasks","group":"Modes","label":"Autosave Directory","description":"Directory for autosaved plans. Supports ~, absolute, and cwd-relative paths. Empty uses <project>/.omp/plans/.","condition":"planAutosaveEnabled"},"type":"string"},"goal.enabled":{"ui":{"tab":"tasks","group":"Modes","label":"Goal Mode","description":"Enable per-session goal mode and the hidden goal tool"},"type":"boolean","default":true},"goal.statusInFooter":{"ui":{"tab":"tasks","group":"Modes","label":"Goal Status in Footer","description":"Show token budget alongside the goal indicator in the status line"},"type":"boolean","default":true},"goal.continuationModes":{"ui":{"tab":"tasks","group":"Modes","label":"Goal Continuation Modes","description":"Run modes where active goals may auto-continue between turns"},"type":"array","default":["interactive"]},"title.refreshOnReplan":{"ui":{"tab":"tasks","group":"Modes","label":"Refresh Title on Replan","description":"Refresh generated session titles after todo init replans unless the title was set by the user"},"type":"boolean","default":true},"task.isolation.enabled":{"ui":{"tab":"tasks","group":"Isolation","label":"Isolate Subagents","description":"Run subagents in an isolated copy of the checkout and integrate their changes afterwards"},"type":"boolean","default":false},"isolation.backend":{"ui":{"tab":"tasks","group":"Isolation","label":"Isolation Backend","description":"Backend used for subagent isolation and worktree cloning","options":[{"value":"auto","label":"Auto","description":"Let the PAL pick the best available backend"},{"value":"apfs","label":"APFS","description":"macOS clonefile reflink (APFS)"},{"value":"btrfs","label":"btrfs","description":"btrfs subvolume snapshot"},{"value":"zfs","label":"ZFS","description":"ZFS snapshot + clone"},{"value":"reflink","label":"Reflink","description":"Linux FICLONE per-file reflink"},{"value":"overlayfs","label":"Overlayfs","description":"Linux kernel overlay (or fuse-overlayfs fallback)"},{"value":"projfs","label":"ProjFS","description":"Windows Projected File System"},{"value":"block-clone","label":"Block clone","description":"Windows FSCTL_DUPLICATE_EXTENTS_TO_FILE (NTFS/ReFS)"},{"value":"rcopy","label":"Recursive copy","description":"git worktree if available, otherwise recursive copy"}]},"type":"enum","default":"auto","values":["auto","apfs","btrfs","zfs","reflink","overlayfs","projfs","block-clone","rcopy"]},"worktree.clone":{"ui":{"tab":"tasks","group":"Isolation","label":"Clone Checkout into Worktrees","description":"New worktrees from `github pr_checkout` and `git worktree add` in bash start as a copy-on-write clone of the current checkout so ignored build artifacts (node_modules, target) carry over; falls back to a plain checkout when the filesystem cannot clone"},"type":"boolean","default":true},"worktree.cleanSource":{"ui":{"tab":"tasks","group":"Isolation","label":"Clean Source Checkout on /wt","description":"When creating a worktree with `/wt`, reset tracked changes and remove untracked files from the original checkout after carrying them over"},"type":"boolean","default":false},"task.isolation.apply":{"ui":{"tab":"tasks","group":"Isolation","label":"Apply Isolated Changes","description":"Automatically apply successful isolated task changes to the parent checkout; disable to retain patch or branch artifacts"},"type":"boolean","default":true},"task.isolation.merge":{"ui":{"tab":"tasks","group":"Isolation","label":"Isolation Merge Strategy","description":"How isolated task changes are integrated (patch apply or branch merge)","options":[{"value":"patch","label":"Patch","description":"Combine diffs and git apply"},{"value":"branch","label":"Branch","description":"Commit per task, merge with --no-ff"}]},"type":"enum","default":"patch","values":["patch","branch"]},"task.isolation.commits":{"ui":{"tab":"tasks","group":"Isolation","label":"Isolation Commit Style","description":"Commit message style for nested repo changes (generic or AI-generated)","options":[{"value":"generic","label":"Generic","description":"Static commit message"},{"value":"ai","label":"AI","description":"AI-generated commit message from diff"}]},"type":"enum","default":"generic","values":["generic","ai"]},"worktree.base":{"ui":{"tab":"tasks","group":"Isolation","label":"Worktree Base Directory","description":"Base directory for agent-managed worktrees — task-isolation copies, `github` PR checkouts, and `omp worktree` cleanup all live here. Unset uses ~/.omp/wt. Must be an absolute or ~-relative path; relative paths are ignored. The OMP_WORKTREE_DIR env var overrides this."},"type":"string"},"task.eager":{"ui":{"tab":"tasks","group":"Subagents","label":"Prefer Task Delegation","description":"How strongly to push delegating work to subagents","options":[{"value":"default","label":"Default","description":"Uses the selected model\'s policy; some models require an explicit delegation request"},{"value":"preferred","label":"Preferred","description":"Adds delegation guidance to the system prompt"},{"value":"always","label":"Always","description":"Prompt guidance plus a first-turn delegation reminder"}]},"type":"enum","default":"default","values":["default","preferred","always"]},"task.batch":{"ui":{"tab":"tasks","group":"Subagents","label":"Batch Task Calls","description":"Switch the task tool to its batch shape: one call carries { context, tasks[] } — one subagent per item, with an optional per-item agent (defaulting to the session spawn-policy agent), per-item isolation, and a required shared context prepended to every assignment. With async.enabled=true, each spawn runs as an independent background agent with the normal idle/parked lifecycle; otherwise the call blocks for merged results. Disable to restore the flat single-spawn schema."},"type":"boolean","default":true},"task.enableEffort":{"ui":{"tab":"tasks","group":"Subagents","label":"Per-Task Effort","description":"Expose the optional effort parameter on task spawns, allowing callers to override each subagent\'s thinking level"},"type":"boolean","default":false},"task.maxConcurrency":{"ui":{"tab":"tasks","group":"Subagents","label":"Max Concurrent Tasks","description":"Maximum number of subagents running concurrently","options":[{"value":"0","label":"Unlimited","description":""},{"value":"1","label":"1 task","description":""},{"value":"2","label":"2 tasks","description":""},{"value":"4","label":"4 tasks","description":""},{"value":"8","label":"8 tasks","description":""},{"value":"16","label":"16 tasks","description":""},{"value":"32","label":"32 tasks","description":""},{"value":"64","label":"64 tasks","description":""}]},"type":"number","default":32},"task.enableLsp":{"ui":{"tab":"tasks","group":"Subagents","label":"LSP in Subagents","description":"Allow subagents spawned via the task tool to use the lsp tool. Off by default to keep subagents cheap; enable when LSP-aware delegation is worth the extra tokens."},"type":"boolean","default":false},"task.maxRecursionDepth":{"ui":{"tab":"tasks","group":"Subagents","label":"Max Task Recursion","description":"How many levels deep subagents can spawn their own subagents","options":[{"value":"-1","label":"Unlimited","description":""},{"value":"0","label":"None","description":""},{"value":"1","label":"Single","description":""},{"value":"2","label":"Double","description":""},{"value":"3","label":"Triple","description":""}]},"type":"number","default":2},"task.maxRuntimeMs":{"ui":{"tab":"tasks","group":"Subagents","label":"Max Subagent Runtime","description":"Hard wall-clock limit per subagent (ms). 0 disables it. Defense-in-depth against provider-side stream hangs that escape the inference-layer watchdog; triggers a normal subagent abort with a \'timed out\' reason.","options":[{"value":"0","label":"Unlimited","description":"Default"},{"value":"300000","label":"5 minutes","description":""},{"value":"900000","label":"15 minutes","description":""},{"value":"1800000","label":"30 minutes","description":""},{"value":"3600000","label":"1 hour","description":""}]},"type":"number","default":0},"task.agentIdleTtlMs":{"ui":{"tab":"tasks","group":"Subagents","label":"Agent Idle TTL","description":"How long an idle subagent stays live in memory before being parked to disk (ms). Parked agents are revived automatically when messaged or resumed. 0 keeps idle agents live until exit."},"type":"number","default":420000},"task.softRequestBudget":{"ui":{"tab":"tasks","group":"Subagents","label":"Soft Subagent Request Budget","description":"Soft per-subagent request budget (assistant requests per run). Crossing it injects a wrap-up steering notice (see task.softRequestBudgetNotice); at 1.5x the budget the run is force-stopped and the agent must yield its partial findings. 0 disables the guard. Bundled scout/sonic agents cap out at a lower built-in budget, so a value below that cap still applies to them.","options":[{"value":"0","label":"Disabled","description":""},{"value":"90","label":"90 requests","description":""},{"value":"150","label":"150 requests","description":""},{"value":"200","label":"200 requests","description":"Default"}]},"type":"number","default":200},"task.softRequestBudgetNotice":{"ui":{"tab":"tasks","group":"Subagents","label":"Soft Request Budget Notice","description":"Inject one steering notice when a subagent crosses its soft request budget, asking it to wrap up before the 1.5x forced-yield stop."},"type":"boolean","default":true},"task.maxEffort":{"ui":{"tab":"tasks","group":"Subagents","label":"Maximum Per-Spawn Effort","description":"Maximum reasoning effort allowed for the task tool\'s per-spawn effort hint. Lower values prevent callers from escalating subagents above this ceiling; the default preserves the model\'s full range.","options":[{"value":"minimal","label":"min","description":"Very brief reasoning (~1k tokens)"},{"value":"low","label":"low","description":"Light reasoning (~2k tokens)"},{"value":"medium","label":"medium","description":"Moderate reasoning (~8k tokens)"},{"value":"high","label":"high","description":"Deep reasoning (~16k tokens)"},{"value":"xhigh","label":"xhigh","description":"Extended reasoning (~32k tokens)"},{"value":"max","label":"max","description":"Maximum reasoning the model supports"}]},"type":"enum","default":"max","values":["minimal","low","medium","high","xhigh","max"]},"task.prewalk":{"ui":{"tab":"tasks","group":"Subagents","label":"Generic Task Prewalk","description":"Arm prewalk for the bundled generic `task` subagent: it starts on its resolved model, plans and begins the implementation, then hands off to the \'smol\' role at its first edit/write. Per-agent overrides (task.agentPrewalk, configured from the /agents hub) and user agent `prewalk` frontmatter apply regardless of this toggle."},"type":"boolean","default":false},"tasks.todoClearDelay":{"ui":{"tab":"tools","group":"Todos","label":"Todo Auto-Clear Delay","description":"Delay before completed or abandoned todos are removed from the todo widget","options":[{"value":"0","label":"Instant","description":""},{"value":"60","label":"1 minute","description":"Default"},{"value":"300","label":"5 minutes","description":""},{"value":"900","label":"15 minutes","description":""},{"value":"1800","label":"30 minutes","description":""},{"value":"3600","label":"1 hour","description":""},{"value":"-1","label":"Never","description":""}]},"type":"number","default":60},"task.showResolvedModelBadge":{"ui":{"tab":"appearance","group":"Display","label":"Show Resolved Model Badge","description":"Display the actual model ID used by each subagent in the task widget status line"},"type":"boolean","default":false},"skills.enableSkillCommands":{"ui":{"tab":"tasks","group":"Commands & Skills","label":"Skill Commands","description":"Register skills as /skill:name commands"},"type":"boolean","default":true},"commands.enableClaudeUser":{"ui":{"tab":"tasks","group":"Commands & Skills","label":"Claude User Commands","description":"Load commands from ~/.claude/commands/"},"type":"boolean","default":false},"commands.enableClaudeProject":{"ui":{"tab":"tasks","group":"Commands & Skills","label":"Claude Project Commands","description":"Load commands from .claude/commands/"},"type":"boolean","default":true},"commands.enableOpencodeUser":{"ui":{"tab":"tasks","group":"Commands & Skills","label":"OpenCode User Commands","description":"Load commands from ~/.config/opencode/commands/"},"type":"boolean","default":false},"commands.enableOpencodeProject":{"ui":{"tab":"tasks","group":"Commands & Skills","label":"OpenCode Project Commands","description":"Load commands from .opencode/commands/"},"type":"boolean","default":true},"secrets.enabled":{"ui":{"tab":"providers","group":"Privacy","label":"Hide Secrets","description":"Obfuscate configured secrets and redact credential-shaped tokens before sending to AI providers"},"type":"boolean","default":false},"providers.ollama-cloud.maxConcurrency":{"ui":{"tab":"providers","group":"Services","label":"Ollama Cloud Max Concurrency","description":"Maximum concurrent Ollama Cloud subagent runs per process; 0 disables the provider-specific limit"},"type":"number","default":3},"providers.webSearchOrder":{"ui":{"tab":"providers","group":"Services","label":"Web Search Provider Order","description":"Prioritized providers for the web_search tool; unlisted providers retain their default order afterward","ordered":true,"options":[{"value":"perplexity","label":"Perplexity","description":"Uses auth when configured; explicit selection falls back to anonymous search"},{"value":"gemini","label":"Gemini","description":"Google Search grounding via Gemini (uses google-gemini-cli or google-antigravity OAuth)"},{"value":"anthropic","label":"Anthropic","description":"Claude\'s native web_search tool (uses Anthropic OAuth or ANTHROPIC_API_KEY)"},{"value":"codex","label":"OpenAI","description":"OpenAI\'s native web_search (uses ChatGPT OAuth via /login openai-codex)"},{"value":"xai","label":"xAI","description":"Grok web search via xAI Responses API (uses SuperGrok/X Premium+ OAuth via /login xai-oauth, or XAI_API_KEY)"},{"value":"zai","label":"Z.AI","description":"Calls Z.AI webSearchPrime MCP"},{"value":"exa","label":"Exa","description":"API via /login exa or EXA_API_KEY; explicit keyless fallback via MCP"},{"value":"tinyfish","label":"TinyFish","description":"Requires TINYFISH_API_KEY"},{"value":"jina","label":"Jina","description":"Requires JINA_API_KEY"},{"value":"kagi","label":"Kagi","description":"Requires KAGI_API_KEY and Kagi Search API beta access"},{"value":"tavily","label":"Tavily","description":"Requires TAVILY_API_KEY"},{"value":"firecrawl","label":"Firecrawl","description":"Uses Firecrawl API when FIRECRAWL_API_KEY is set; falls back to keyless mode"},{"value":"brave","label":"Brave","description":"Requires BRAVE_API_KEY"},{"value":"kimi","label":"Kimi","description":"Kimi Code search (requires a Kimi Code Console key via KIMI_SEARCH_API_KEY/MOONSHOT_SEARCH_API_KEY or /login kimi-code; not MOONSHOT_API_KEY)"},{"value":"parallel","label":"Parallel","description":"API via /login parallel or PARALLEL_API_KEY; explicit keyless fallback via MCP"},{"value":"synthetic","label":"Synthetic","description":"Requires SYNTHETIC_API_KEY"},{"value":"ollama","label":"Ollama","description":"Requires OLLAMA_CLOUD_API_KEY"},{"value":"searxng","label":"SearXNG","description":"Requires SEARXNG_ENDPOINT or searxng.endpoint"},{"value":"startpage","label":"Startpage","description":"Credential-free scrape of Startpage (Google-backed) results; may be bot-challenged"},{"value":"duckduckgo","label":"DuckDuckGo","description":"Credential-free best-effort fallback; may be bot-challenged on datacenter/shared-egress IPs"},{"value":"ecosia","label":"Ecosia","description":"Credential-free browser-backed scrape of Ecosia (Google-backed) results"},{"value":"google","label":"Google","description":"Credential-free browser-backed fallback; slower and may be bot-challenged"},{"value":"mojeek","label":"Mojeek","description":"Credential-free browser-backed scrape of Mojeek\'s independent index"},{"value":"public","label":"Public Web","description":"Queries every credential-free engine in parallel and consolidates deduplicated results"}]},"type":"array","default":[]},"providers.webSearchExclude":{"ui":{"tab":"providers","group":"Services","label":"Excluded Web Search Providers","description":"Providers that web_search should never use, even as fallbacks","options":[{"value":"perplexity","label":"Perplexity","description":"Uses auth when configured; explicit selection falls back to anonymous search"},{"value":"gemini","label":"Gemini","description":"Google Search grounding via Gemini (uses google-gemini-cli or google-antigravity OAuth)"},{"value":"anthropic","label":"Anthropic","description":"Claude\'s native web_search tool (uses Anthropic OAuth or ANTHROPIC_API_KEY)"},{"value":"codex","label":"OpenAI","description":"OpenAI\'s native web_search (uses ChatGPT OAuth via /login openai-codex)"},{"value":"xai","label":"xAI","description":"Grok web search via xAI Responses API (uses SuperGrok/X Premium+ OAuth via /login xai-oauth, or XAI_API_KEY)"},{"value":"zai","label":"Z.AI","description":"Calls Z.AI webSearchPrime MCP"},{"value":"exa","label":"Exa","description":"API via /login exa or EXA_API_KEY; explicit keyless fallback via MCP"},{"value":"tinyfish","label":"TinyFish","description":"Requires TINYFISH_API_KEY"},{"value":"jina","label":"Jina","description":"Requires JINA_API_KEY"},{"value":"kagi","label":"Kagi","description":"Requires KAGI_API_KEY and Kagi Search API beta access"},{"value":"tavily","label":"Tavily","description":"Requires TAVILY_API_KEY"},{"value":"firecrawl","label":"Firecrawl","description":"Uses Firecrawl API when FIRECRAWL_API_KEY is set; falls back to keyless mode"},{"value":"brave","label":"Brave","description":"Requires BRAVE_API_KEY"},{"value":"kimi","label":"Kimi","description":"Kimi Code search (requires a Kimi Code Console key via KIMI_SEARCH_API_KEY/MOONSHOT_SEARCH_API_KEY or /login kimi-code; not MOONSHOT_API_KEY)"},{"value":"parallel","label":"Parallel","description":"API via /login parallel or PARALLEL_API_KEY; explicit keyless fallback via MCP"},{"value":"synthetic","label":"Synthetic","description":"Requires SYNTHETIC_API_KEY"},{"value":"ollama","label":"Ollama","description":"Requires OLLAMA_CLOUD_API_KEY"},{"value":"searxng","label":"SearXNG","description":"Requires SEARXNG_ENDPOINT or searxng.endpoint"},{"value":"startpage","label":"Startpage","description":"Credential-free scrape of Startpage (Google-backed) results; may be bot-challenged"},{"value":"duckduckgo","label":"DuckDuckGo","description":"Credential-free best-effort fallback; may be bot-challenged on datacenter/shared-egress IPs"},{"value":"ecosia","label":"Ecosia","description":"Credential-free browser-backed scrape of Ecosia (Google-backed) results"},{"value":"google","label":"Google","description":"Credential-free browser-backed fallback; slower and may be bot-challenged"},{"value":"mojeek","label":"Mojeek","description":"Credential-free browser-backed scrape of Mojeek\'s independent index"},{"value":"public","label":"Public Web","description":"Queries every credential-free engine in parallel and consolidates deduplicated results"}]},"type":"array","default":[]},"providers.webSearchTimeoutSeconds":{"ui":{"tab":"providers","group":"Services","label":"Web Search Timeout","description":"Hard timeout for each provider\'s search transport before web_search advances to the next fallback, in seconds (maximum 300)","options":[{"value":"30","label":"30 seconds","description":""},{"value":"60","label":"1 minute","description":""},{"value":"120","label":"2 minutes","description":""},{"value":"180","label":"3 minutes","description":""},{"value":"300","label":"5 minutes","description":""}]},"type":"number","default":60},"providers.webSearchGeminiModel":{"ui":{"tab":"providers","group":"Services","label":"Gemini web_search model","description":"Model ID for Gemini Google Search grounding. Defaults to gemini-2.5-flash."},"type":"string"},"providers.antigravityEndpoint":{"ui":{"tab":"providers","group":"Services","label":"Antigravity Endpoint Mode","description":"Endpoint routing strategy for google-antigravity providers (chat, search, image, discovery)","options":[{"value":"auto","label":"Auto","description":"Try production endpoint, fail over to sandbox on 5xx/429"},{"value":"production","label":"Production Only","description":"Force production endpoint only"},{"value":"sandbox","label":"Sandbox Only","description":"Force sandbox endpoint only"}]},"type":"enum","default":"auto","values":["auto","production","sandbox"]},"providers.imageOrder":{"ui":{"tab":"providers","group":"Services","label":"Image Provider Order","description":"Prioritized providers for image generation; unlisted providers follow the active session provider and the built-in order","ordered":true,"options":[{"value":"openai","label":"OpenAI","description":"OPENAI_API_KEY (gpt-image-2) or active GPT model; falls back to a connected Codex subscription"},{"value":"openai-codex","label":"OpenAI Codex (ChatGPT)","description":"Uses a connected Codex / ChatGPT subscription — no OPENAI_API_KEY needed"},{"value":"antigravity","label":"Antigravity","description":"Requires google-antigravity OAuth"},{"value":"xai","label":"xAI Grok Imagine","description":"Requires xAI Grok OAuth or XAI_API_KEY"},{"value":"gemini","label":"Gemini","description":"Requires GEMINI_API_KEY"},{"value":"openrouter","label":"OpenRouter","description":"Requires OPENROUTER_API_KEY"},{"value":"deepinfra","label":"DeepInfra","description":"Requires DEEPINFRA_API_KEY"}]},"type":"array","default":[]},"providers.fireworksTier":{"ui":{"tab":"providers","group":"Fireworks","label":"Fireworks Tier","description":"Serving path for Fireworks requests. Priority sends `service_tier: \\"priority\\"` for higher reliability during peak traffic at a higher price; Standard omits it. Fast (`-fast`) models ignore this — Fast is its own serving path.","options":[{"value":"standard","label":"Standard","description":"Default serving path (no service_tier)"},{"value":"priority","label":"Priority","description":"Priority serving path: higher reliability, premium per-token pricing"}]},"type":"enum","default":"standard","values":["standard","priority"]},"live.voice":{"ui":{"tab":"providers","group":"Services","label":"Live Voice","description":"Voice used by Codex-backed realtime voice sessions","options":[{"value":"arbor","label":"Arbor","description":""},{"value":"breeze","label":"Breeze","description":""},{"value":"cove","label":"Cove","description":""},{"value":"ember","label":"Ember","description":""},{"value":"juniper","label":"Juniper","description":""},{"value":"maple","label":"Maple","description":""},{"value":"sol","label":"Sol","description":""},{"value":"spruce","label":"Spruce","description":""},{"value":"vale","label":"Vale","description":""}]},"type":"enum","default":"sol","values":["arbor","breeze","cove","ember","juniper","maple","sol","spruce","vale"]},"providers.tts":{"ui":{"tab":"providers","group":"Services","label":"Text-to-Speech Provider","description":"Backend for the tts tool: local on-device neural TTS (Kokoro-82M), xAI Grok Voice, or DeepInfra speech","options":[{"value":"auto","label":"Auto","description":"Prefer local on-device TTS; route .mp3 output to xAI when credentials exist"},{"value":"local","label":"Local","description":"On-device neural TTS (Kokoro-82M); output is WAV/PCM16"},{"value":"xai","label":"xAI Grok Voice","description":"Requires xAI Grok OAuth or XAI_API_KEY; MP3 or WAV"},{"value":"deepinfra","label":"DeepInfra Speech","description":"Requires DEEPINFRA_API_KEY; MP3 or WAV"}]},"type":"enum","default":"auto","values":["auto","local","xai","deepinfra"]},"tts.localModel":{"ui":{"tab":"providers","group":"Services","label":"Local TTS Model","description":"On-device neural TTS model (Kokoro-82M) used by the local TTS backend","options":[{"value":"kokoro","label":"Kokoro-82M","description":"Kokoro-82M neural TTS — SoTA on-device quality, multi-voice, fully local"}]},"type":"enum","default":"kokoro","values":["kokoro"]},"tts.localVoice":{"ui":{"tab":"providers","group":"Services","label":"Local TTS Voice","description":"Kokoro voice used by the local TTS backend (American/British, female/male)","options":[{"value":"af_heart","label":"Heart (American female)","description":""},{"value":"af_bella","label":"Bella (American female)","description":""},{"value":"af_nicole","label":"Nicole (American female)","description":""},{"value":"af_aoede","label":"Aoede (American female)","description":""},{"value":"af_kore","label":"Kore (American female)","description":""},{"value":"af_sarah","label":"Sarah (American female)","description":""},{"value":"am_michael","label":"Michael (American male)","description":""},{"value":"am_fenrir","label":"Fenrir (American male)","description":""},{"value":"am_puck","label":"Puck (American male)","description":""},{"value":"bf_emma","label":"Emma (British female)","description":""},{"value":"bm_george","label":"George (British male)","description":""},{"value":"bm_fable","label":"Fable (British male)","description":""}]},"type":"enum","default":"af_heart","values":["af_heart","af_bella","af_nicole","af_aoede","af_kore","af_sarah","am_michael","am_fenrir","am_puck","bf_emma","bm_george","bm_fable"]},"speech.enabled":{"ui":{"tab":"providers","group":"Services","label":"Speech Vocalization","description":"Speak the assistant\'s output aloud through the speakers as it streams"},"type":"boolean","default":false},"speech.mode":{"ui":{"tab":"providers","group":"Services","label":"Speech Vocalization Mode","description":"What to speak: all = assistant messages + thinking; assistant = messages only; yield = only the final message at turn end","options":[{"value":"all","label":"All (messages + thinking)","description":""},{"value":"assistant","label":"Assistant messages","description":""},{"value":"yield","label":"Final message only","description":""}]},"type":"enum","default":"assistant","values":["all","assistant","yield"]},"speech.enhanced":{"ui":{"tab":"providers","group":"Services","label":"Enhanced Speech Rewriting","description":"Rewrite assistant output into natural spoken prose with the tiny/smol model before synthesis (describes code, drops links and markdown). Falls back to mechanical cleanup on failure"},"type":"boolean","default":false},"speech.voice":{"ui":{"tab":"providers","group":"Services","label":"Speech Vocalization Voice","description":"Kokoro voice used when speaking the assistant\'s output aloud","options":[{"value":"af_heart","label":"Heart (American female)","description":""},{"value":"af_bella","label":"Bella (American female)","description":""},{"value":"af_nicole","label":"Nicole (American female)","description":""},{"value":"af_aoede","label":"Aoede (American female)","description":""},{"value":"af_kore","label":"Kore (American female)","description":""},{"value":"af_sarah","label":"Sarah (American female)","description":""},{"value":"am_michael","label":"Michael (American male)","description":""},{"value":"am_fenrir","label":"Fenrir (American male)","description":""},{"value":"am_puck","label":"Puck (American male)","description":""},{"value":"bf_emma","label":"Emma (British female)","description":""},{"value":"bm_george","label":"George (British male)","description":""},{"value":"bm_fable","label":"Fable (British male)","description":""}]},"type":"enum","default":"af_heart","values":["af_heart","af_bella","af_nicole","af_aoede","af_kore","af_sarah","am_michael","am_fenrir","am_puck","bf_emma","bm_george","bm_fable"]},"providers.tinyModel":{"ui":{"tab":"providers","group":"Tiny Model","label":"Tiny Model","description":"Session-title model: online (the TINY role from /models, else @smol) by default, or a local on-device model","options":[{"value":"online","label":"Online (TINY role, else @smol)","description":"Online title generation: the TINY model role (set one in /models) when assigned, otherwise the online fallback (commit role, then @smol). No local download or on-device inference."},{"value":"lfm2.5-230m","label":"LFM2.5 230M","description":"Recommended local model; fastest LFM2.5 option, about 214 MB cached."},{"value":"lfm2.5-350m","label":"LFM2.5 350M","description":"Larger LFM2.5 option, about 292 MB cached; tends toward terse titles."},{"value":"falcon-h1-90m","label":"Falcon H1 Tiny 90M","description":"Smallest option, about 147 MB cached; lower fidelity on complex prompts."}]},"type":"enum","default":"online","values":["online","lfm2.5-230m","lfm2.5-350m","falcon-h1-90m"]},"providers.tinyModelDevice":{"ui":{"tab":"providers","group":"Tiny Model","label":"Tiny Model Device","description":"Inference backend for local tiny models (titles + memory): an ONNX execution provider, or `mlx` to download MLX weights and run them through mlx-lm on Apple silicon. Default uses CPU-only ONNX. The PI_TINY_DEVICE env var overrides this.","options":[{"value":"default","label":"Default","description":"CPU-only inference"},{"value":"gpu","label":"GPU","description":"Accelerated provider (WebGPU/Metal, CUDA, or DirectML)"},{"value":"cpu","label":"CPU","description":"CPU-only inference"},{"value":"mlx","label":"MLX","description":"Apple silicon GPU via mlx-lm (Python subprocess; macOS arm64)"},{"value":"metal","label":"Metal","description":"Alias for MLX"},{"value":"webgpu","label":"WebGPU","description":"WebGPU/Metal backend"},{"value":"cuda","label":"CUDA","description":"NVIDIA CUDA (Linux x64)"},{"value":"dml","label":"DirectML","description":"DirectML backend (Windows)"},{"value":"coreml","label":"CoreML","description":"Apple CoreML (opt-in; can fail to load)"},{"value":"auto","label":"Auto","description":"Let ONNX Runtime choose a provider"},{"value":"wasm","label":"WASM","description":"WebAssembly backend"},{"value":"webnn","label":"WebNN","description":"WebNN backend"},{"value":"webnn-gpu","label":"WebNN GPU","description":"WebNN GPU device"},{"value":"webnn-cpu","label":"WebNN CPU","description":"WebNN CPU device"},{"value":"webnn-npu","label":"WebNN NPU","description":"WebNN NPU device"}]},"type":"enum","default":"default","values":["default","gpu","cpu","mlx","metal","webgpu","cuda","dml","coreml","auto","wasm","webnn","webnn-gpu","webnn-cpu","webnn-npu"]},"providers.tinyModelDtype":{"ui":{"tab":"providers","group":"Tiny Model","label":"Tiny Model Precision","description":"ONNX quantization/precision for local tiny models. Default uses each model\'s shipped dtype (q4); lower precision is faster, higher is more faithful. Ignored by the MLX backend (its repos are pre-quantized 4-bit). The PI_TINY_DTYPE env var overrides this.","options":[{"value":"default","label":"Default","description":"Each model\'s shipped dtype (currently q4)"},{"value":"q4","label":"q4","description":"4-bit weights; smallest and fastest"},{"value":"q4f16","label":"q4f16","description":"4-bit weights with fp16 activations"},{"value":"q8","label":"q8","description":"8-bit quantization"},{"value":"fp16","label":"fp16","description":"16-bit float; higher fidelity, larger"},{"value":"fp32","label":"fp32","description":"Full precision; largest and slowest"},{"value":"int8","label":"int8","description":"Signed 8-bit integer"},{"value":"uint8","label":"uint8","description":"Unsigned 8-bit integer"},{"value":"bnb4","label":"bnb4","description":"bitsandbytes 4-bit"},{"value":"q2","label":"q2","description":"2-bit weights"},{"value":"q2f16","label":"q2f16","description":"2-bit weights with fp16 activations"},{"value":"q1","label":"q1","description":"1-bit weights"},{"value":"q1f16","label":"q1f16","description":"1-bit weights with fp16 activations"},{"value":"auto","label":"Auto","description":"Let transformers.js choose per device"}]},"type":"enum","default":"default","values":["default","q4","q4f16","q8","fp16","fp32","int8","uint8","bnb4","q2","q2f16","q1","q1f16","auto"]},"providers.memoryModel":{"ui":{"tab":"memory","group":"General","label":"Memory Model","description":"Mnemopi LLM for fact extraction + consolidation: online (the TINY role from /models, else smol/remote) by default, or a local on-device model","condition":"mnemopiActive","options":[{"value":"online","label":"Online (TINY role, else @smol)","description":"Use the online model: the TINY role from /models when set, otherwise @smol. No local model download or on-device inference."},{"value":"qwen3-1.7b","label":"Qwen3 1.7B","description":"MLX only (providers.tinyModelDevice=mlx): onnxruntime-node cannot run this ONNX export\'s RotaryEmbedding cache updates."},{"value":"llama3.2:3b","label":"Llama 3.2 3B","description":"Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost."},{"value":"gemma-3-1b","label":"Gemma 3 1B","description":"Best consolidation/dedup; lighter footprint, but leaks small talk during extraction."},{"value":"qwen2.5-1.5b","label":"Qwen2.5 1.5B","description":"Best extraction granularity (atomic facts); weaker consolidation."},{"value":"lfm2-1.2b","label":"LFM2 1.2B","description":"Fastest load; solid all-rounder, slightly noisier extraction labels."}]},"type":"enum","default":"online","values":["online","qwen3-1.7b","llama3.2:3b","gemma-3-1b","qwen2.5-1.5b","lfm2-1.2b"]},"providers.autoThinkingModel":{"ui":{"tab":"model","group":"Thinking","label":"Auto Thinking Model","description":"Difficulty classifier for the `auto` thinking level: online (the TINY role from /models, else smol) by default, or a local on-device model","condition":"autoThinkingActive","options":[{"value":"online","label":"Online (TINY role, else @smol)","description":"Classify prompt difficulty online with the TINY role model (set one in /models) or @smol; no local download or on-device inference."},{"value":"qwen3-1.7b","label":"Qwen3 1.7B","description":"MLX only (providers.tinyModelDevice=mlx): onnxruntime-node cannot run this ONNX export\'s RotaryEmbedding cache updates."},{"value":"llama3.2:3b","label":"Llama 3.2 3B","description":"Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost."},{"value":"gemma-3-1b","label":"Gemma 3 1B","description":"Best consolidation/dedup; lighter footprint, but leaks small talk during extraction."},{"value":"qwen2.5-1.5b","label":"Qwen2.5 1.5B","description":"Best extraction granularity (atomic facts); weaker consolidation."},{"value":"lfm2-1.2b","label":"LFM2 1.2B","description":"Fastest load; solid all-rounder, slightly noisier extraction labels."}]},"type":"enum","default":"online","values":["online","qwen3-1.7b","llama3.2:3b","gemma-3-1b","qwen2.5-1.5b","lfm2-1.2b"]},"providers.autoThinkingMaxEffort":{"ui":{"tab":"model","group":"Thinking","label":"Auto Thinking Ceiling","description":"Highest effort the `auto` classifier may resolve. `xhigh` keeps the classifier one tier below the top, so only an explicit `ultrathink` reaches `max`; `max` lets a turn the classifier judges exceptional bill the top tier on models that expose it.","condition":"autoThinkingActive","options":[{"value":"xhigh","label":"xhigh","description":"Classifier stops at xhigh (default)"},{"value":"max","label":"max","description":"Classifier may resolve max where the model supports it"}]},"type":"enum","default":"xhigh","values":["xhigh","max"]},"features.unexpectedStopDetection":{"ui":{"tab":"interaction","group":"Agent","label":"Unexpected Stops","description":"Automatically recover when the assistant stops without a visible message. Smart also classifies text-only stops with a small model.","options":[{"value":"none","label":"None","description":"Disabled"},{"value":"mechanical","label":"Mechanical","description":"Retry stops with no visible assistant message; tool calls are excluded (default)"},{"value":"smart","label":"Smart","description":"Mechanical + small-model classification of text-only stops"}]},"type":"enum","default":"mechanical","values":["none","mechanical","smart"]},"providers.unexpectedStopModel":{"ui":{"tab":"providers","group":"Tiny Model","label":"Unexpected Stop Model","description":"Classifier for Smart unexpected-stop detection: online (the TINY role from /models, else smol) by default, or a local on-device model.","condition":"unexpectedStopSmart","options":[{"value":"online","label":"Online (TINY role, else @smol)","description":"Use the online model: the TINY role from /models when set, otherwise @smol. No local model download or on-device inference."},{"value":"qwen3-1.7b","label":"Qwen3 1.7B","description":"MLX only (providers.tinyModelDevice=mlx): onnxruntime-node cannot run this ONNX export\'s RotaryEmbedding cache updates."},{"value":"llama3.2:3b","label":"Llama 3.2 3B","description":"Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost."},{"value":"gemma-3-1b","label":"Gemma 3 1B","description":"Best consolidation/dedup; lighter footprint, but leaks small talk during extraction."},{"value":"qwen2.5-1.5b","label":"Qwen2.5 1.5B","description":"Best extraction granularity (atomic facts); weaker consolidation."},{"value":"lfm2-1.2b","label":"LFM2 1.2B","description":"Fastest load; solid all-rounder, slightly noisier extraction labels."}]},"type":"enum","default":"online","values":["online","qwen3-1.7b","llama3.2:3b","gemma-3-1b","qwen2.5-1.5b","lfm2-1.2b"]},"providers.kimiApiFormat":{"ui":{"tab":"providers","group":"Protocol","label":"Kimi API Format","description":"API format for Kimi Code provider (auto follows live model metadata)","options":[{"value":"auto","label":"Auto","description":"Use the model\'s server-declared protocol"},{"value":"openai","label":"OpenAI","description":"api.kimi.com"},{"value":"anthropic","label":"Anthropic","description":"api.moonshot.ai"}]},"type":"enum","default":"auto","values":["auto","openai","anthropic"]},"providers.openaiWebsockets":{"ui":{"tab":"providers","group":"Protocol","label":"OpenAI WebSockets","description":"Websocket policy for OpenAI Codex models (auto uses model defaults, on forces, off disables)","options":[{"value":"auto","label":"Auto","description":"Use model/provider default websocket behavior"},{"value":"off","label":"Off","description":"Disable websockets for OpenAI Codex models"},{"value":"on","label":"On","description":"Force websockets for OpenAI Codex models"}]},"type":"enum","default":"auto","values":["auto","off","on"]},"providers.cacheRetention":{"ui":{"tab":"providers","group":"Protocol","label":"Prompt Cache Retention","description":"Prompt-cache retention forwarded to providers that support it (Anthropic, Bedrock, OpenRouter, OpenAI)","options":[{"value":"auto","label":"Auto","description":"Provider default — Anthropic OAuth subscriber sessions default to 1h, API keys use 5m kept warm by idle keep-alive refreshes; PI_CACHE_RETENTION still applies"},{"value":"short","label":"Short (5m)","description":"Cheapest cache writes; Anthropic keeps the entry warm with bounded keep-alive refreshes while idle"},{"value":"long","label":"Long (1h)","description":"1h TTL where the provider supports it; pricier writes, no keep-alive refresh requests"},{"value":"none","label":"Off","description":"Disable prompt caching and cache-affinity routing"}]},"type":"enum","default":"auto","values":["auto","short","long","none"]},"providers.streamFirstEventTimeoutSeconds":{"ui":{"tab":"providers","group":"Timeouts","label":"Stream First Event Timeout","description":"Seconds to wait for the first model stream event; -1 uses provider/env defaults, 0 disables the watchdog","options":[{"value":"-1","label":"Auto","description":"Use provider defaults and PI_* timeout env vars"},{"value":"0","label":"Off","description":"Disable first-event timeout"},{"value":"300","label":"5 minutes","description":""},{"value":"600","label":"10 minutes","description":""},{"value":"1800","label":"30 minutes","description":""}]},"type":"number","default":-1},"providers.streamIdleTimeoutSeconds":{"ui":{"tab":"providers","group":"Timeouts","label":"Stream Idle Timeout","description":"Seconds a model stream may stay silent between events; -1 uses provider/env defaults, 0 disables the watchdog","options":[{"value":"-1","label":"Auto","description":"Use provider defaults and PI_* timeout env vars"},{"value":"0","label":"Off","description":"Disable idle timeout"},{"value":"300","label":"5 minutes","description":""},{"value":"600","label":"10 minutes","description":""},{"value":"1800","label":"30 minutes","description":""}]},"type":"number","default":-1},"providers.openrouterVariant":{"ui":{"tab":"providers","group":"Protocol","label":"OpenRouter Routing","description":"Default routing-variant suffix appended to OpenRouter model IDs (overridden when the selector already names a variant)","options":[{"value":"default","label":"Default","description":"No suffix; use OpenRouter\'s default routing"},{"value":"nitro","label":":nitro","description":"Prioritize throughput / lowest latency"},{"value":"floor","label":":floor","description":"Prioritize cheapest available provider"},{"value":"online","label":":online","description":"Enable OpenRouter\'s web-search plugin"},{"value":"exacto","label":":exacto","description":"Cherry-picked high-quality providers (only defined for select models)"}]},"type":"enum","default":"default","values":["default","nitro","floor","online","exacto"]},"providers.fetch":{"ui":{"tab":"providers","group":"Services","label":"Fetch Provider","description":"Reader backend priority for the fetch/read URL tool","options":[{"value":"auto","label":"Auto","description":"Priority: native > trafilatura > lynx > parallel > firecrawl > jina"},{"value":"native","label":"Native","description":"In-process HTML→Markdown converter (always available)"},{"value":"trafilatura","label":"Trafilatura","description":"Auto-installs via uv/pip"},{"value":"lynx","label":"Lynx","description":"Requires lynx system package"},{"value":"parallel","label":"Parallel","description":"Requires PARALLEL_API_KEY"},{"value":"firecrawl","label":"Firecrawl","description":"Requires FIRECRAWL_API_KEY"},{"value":"jina","label":"Jina","description":"Uses r.jina.ai reader (JINA_API_KEY optional)"}]},"type":"enum","default":"auto","values":["auto","native","trafilatura","lynx","parallel","firecrawl","jina"]},"codexResets.autoRedeem":{"ui":{"tab":"providers","group":"Services","label":"Codex Auto-Redeem Saved Resets","description":"Spend saved Codex rate-limit resets automatically: restore an account blocked by an exhausted 5h or weekly window when a turn is stuck and no other account can take over, and salvage credits that are about to expire. unset asks before the first spend, yes spends without prompting, and no disables both checks.","options":[{"value":"unset","label":"Unset","description":"Check eligibility, then ask before spending the first saved reset."},{"value":"yes","label":"Yes","description":"Spend eligible saved resets without prompting."},{"value":"no","label":"No","description":"Do not run the saved-reset auto-redeem check."}]},"type":"enum","default":"unset","values":["unset","yes","no"]},"codexResets.minBlockedMinutes":{"ui":{"tab":"providers","group":"Services","label":"Codex Auto-Redeem Min Block","description":"Only auto-redeem when the natural unblock — the latest reset among the exhausted 5h/weekly windows — is at least this many minutes away (don\'t spend a scarce credit to save a short wait). Raise it (e.g. 360) to ignore 5h-only blocks."},"type":"number","default":60},"codexResets.keepCredits":{"ui":{"tab":"providers","group":"Services","label":"Codex Auto-Redeem Reserve","description":"Never auto-spend below this many saved resets (0 = the last credit may be spent automatically). Credits about to expire are exempt — a reserved credit that expires preserves nothing."},"type":"number","default":0},"codexResets.salvageHorizonHours":{"ui":{"tab":"providers","group":"Services","label":"Codex Reset Salvage Horizon","description":"Spend a saved Codex reset automatically when it would otherwise expire within this many hours and either chat window (5h or weekly) has meaningful usage to restore (0 disables expiry salvage)."},"type":"number","default":12},"provider.appendOnlyContext":{"ui":{"tab":"providers","group":"Protocol","label":"Append-Only Context","description":"Cache system prompt + tool specs and keep an append-only message log so provider prefix caches (DeepSeek, Xiaomi/SGLang, Anthropic) hit at maximum rate. Auto enables for known prefix-cache providers.","options":[{"value":"auto","label":"Auto","description":"Enable for known prefix-cache providers (recommended)"},{"value":"on","label":"On","description":"Always enable append-only context"},{"value":"off","label":"Off","description":"Disable append-only context"}]},"type":"enum","default":"auto","values":["auto","on","off"]},"exa.enabled":{"ui":{"tab":"providers","group":"Services","label":"Exa","description":"Enable the Exa web search provider"},"type":"boolean","default":true},"exa.searchDelayMs":{"ui":{"tab":"providers","group":"Services","label":"Exa Search Delay","description":"Minimum delay between Exa web search requests in milliseconds; set 0 to disable pacing"},"type":"number","default":1000},"searxng.endpoint":{"ui":{"tab":"providers","group":"Services","label":"SearXNG Endpoint","description":"Base URL of a self-hosted SearXNG instance used for web search"},"type":"string"},"extensionHandlers.toolCallTimeoutMs":{"ui":{"tab":"tools","group":"Extensions","label":"Tool Call Handler Timeout (ms)","description":"Positive finite active-work timeout for extension tool_call handlers; invalid values use 30000ms, and time awaiting OMP-owned dialogs does not count"},"type":"number","default":30000},"dev.autoqa":{"ui":{"tab":"tools","group":"Developer","label":"Auto QA","description":"Automated tool issue reporting (xd://report_issue). On by default; the first report asks for consent, and denying it disables reporting until re-enabled explicitly"},"type":"boolean","default":true},"dev.autoqaPush.endpoint":{"ui":{"tab":"tools","group":"Developer","label":"Auto QA Push Endpoint","description":"Full URL receiving Auto QA JSON reports (default https://qa.omp.sh/v1/grievances)"},"type":"string","default":"https://qa.omp.sh/v1/grievances"}}}');let t8={...t6.entries,"retry.enabled":{type:"boolean",default:!0,ui:{tab:"model",group:"Retry & Fallback",label:"Retry Enabled",description:"Retry transient provider errors (rate limits, outages, quota walls)."}},"retry.baseDelayMs":{type:"number",default:500,ui:{tab:"model",group:"Retry & Fallback",label:"Retry Base Delay (ms)",description:"Initial backoff before the first retry."}},"thinkingBudgets.minimal":{type:"number",default:1024,ui:{tab:"model",group:"Thinking",label:"Minimal Thinking Budget",description:"Token budget for the minimal thinking level."}},"thinkingBudgets.low":{type:"number",default:2048,ui:{tab:"model",group:"Thinking",label:"Low Thinking Budget",description:"Token budget for the low thinking level."}},"thinkingBudgets.medium":{type:"number",default:8192,ui:{tab:"model",group:"Thinking",label:"Medium Thinking Budget",description:"Token budget for the medium thinking level."}},"thinkingBudgets.high":{type:"number",default:16384,ui:{tab:"model",group:"Thinking",label:"High Thinking Budget",description:"Token budget for the high thinking level."}},"thinkingBudgets.xhigh":{type:"number",default:32768,ui:{tab:"model",group:"Thinking",label:"XHigh Thinking Budget",description:"Token budget for the xhigh thinking level."}},"thinkingBudgets.max":{type:"number",default:32768,ui:{tab:"model",group:"Thinking",label:"Max Thinking Budget",description:"Token budget for the max thinking level."}},modelTags:{type:"record",default:{},ui:{tab:"model",group:"Prompt",label:"Model Tags",description:"Custom role/tag metadata; can introduce additional roles. JSON record."}},modelProviderOrder:{type:"array",default:[],ui:{tab:"model",group:"Prompt",label:"Model Provider Order",description:"Preferred provider order when a model id is ambiguous. JSON array."}},cycleOrder:{type:"array",default:["smol","default","slow"],ui:{tab:"model",group:"Prompt",label:"Model Cycle Order",description:"Roles cycled by the model switcher. JSON array."}},enabledModels:{type:"array",default:[],ui:{tab:"model",group:"Prompt",label:"Enabled Models",description:"Allow-list of models; supports path-scoped entries. Empty means all available models. JSON array."}},"task.agentServiceTierOverrides":{type:"record",default:{},ui:{tab:"model",group:"Sampling",label:"Agent Service Tier Overrides",description:"Sparse exact-name service-tier overrides for agents spawned by task/eval dispatch. JSON record."}},"compaction.reserveTokens":{type:"number",ui:{tab:"context",group:"Compaction",label:"Compaction Reserve Tokens",description:"Absolute reserve floor. Unset = larger of 16384 and 15% of the context window."}},"compaction.keepRecentTokens":{type:"number",default:2e4,ui:{tab:"context",group:"Compaction",label:"Keep Recent Tokens",description:"Recent tokens always preserved through compaction."}},"compaction.autoContinue":{type:"boolean",default:!0,ui:{tab:"context",group:"Compaction",label:"Auto-Continue",description:"Continue automatically after compaction."}},"autolearn.minToolCalls":{type:"number",default:5,ui:{tab:"memory",group:"Auto-Learn",label:"Min Tool Calls",description:"Only nudge after a turn that used at least this many tools.",condition:"autolearnActive"}},shellPath:{type:"string",ui:{tab:"shell",group:"Bash",label:"Shell Path",description:"Override the shell binary used by bash."}},"bash.autoBackground.thresholdMs":{type:"number",default:6e4,ui:{tab:"shell",group:"Bash",label:"Auto-Background Threshold (ms)",description:"Threshold before auto-backgrounding long-running commands."}},"task.agentAdvisor":{type:"record",default:{},ui:{tab:"tasks",group:"Subagents",label:"Agent Advisor Overrides",description:'Per-agent subagent advisor: agent name → "on" / "off" / advisor model pattern. JSON record.'}},enabledProviders:{type:"array",default:[],ui:{tab:"providers",group:"Services",label:"Enabled Providers",description:"Foreign user-level discovery sources to load; supports path-scoped entries. JSON array."}},disabledProviders:{type:"array",default:[],ui:{tab:"providers",group:"Services",label:"Disabled Providers",description:"Disabled model/discovery providers; supports path-scoped entries. JSON array."}}};function t7(e,t){return e[t]?.value}let t9=(e,t)=>JSON.stringify(e)===JSON.stringify(t),ie=e=>{let t=e.trim();if(""===t||"-"===t||"+"===t)return null;let i=Number(t);return Number.isFinite(i)?i:null};function it(e){let{entryKey:t,entry:i,value:o,initialValue:r,onChangeDirty:s,onCommit:d,saving:c,saveError:p}=e,[u,m]=(0,n.J0)(()=>null==o?"":Array.isArray(o)||"object"==typeof o?JSON.stringify(o):String(o)),b=(0,n.li)(!1),h=(0,n.li)(r),f=(0,n.Kr)(()=>Array.isArray(i.ui.options)?i.ui.options:null,[i.ui.options]);(0,n.vJ)(()=>{m(null==o?"":Array.isArray(o)||"object"==typeof o?JSON.stringify(o):String(o)),b.current=!1},[o]);let g=()=>{let e=h.current;m(null==e?"":Array.isArray(e)||"object"==typeof e?JSON.stringify(e):String(e)),b.current=!1,s(t,!1,()=>{})},v=e=>{m("string"==typeof e?e:JSON.stringify(e)),b.current=!1,d(t,e).then(e=>{e?s(t,!1,()=>{}):(m(u),s(t,!0,g))}).catch(()=>{m(u),s(t,!0,g)})},x=()=>{if(b.current){if("number"===i.type){let e=ie(u);return null===e||e===o?void g():void v(e)}if("string"===i.type){let e=u.trim();return e===o?void g():void v(e)}if("array"===i.type){let e=(e=>{let t=e.trim();if(""===t)return[];try{let e=JSON.parse(t);return Array.isArray(e)?e:null}catch{return null}})(u);return null===e||t9(e,o)?void g():void v(e)}if("record"===i.type){let e=(e=>{let t=e.trim();if(""===t)return{};try{let e=JSON.parse(t);return"object"!=typeof e||null===e||Array.isArray(e)?null:e}catch{return null}})(u);if(null===e||t9(e,o))return void g();v(e)}}},k=()=>{let e=b.current;b.current=!0,e||s(t,!0,g)};if("boolean"===i.type){let e=!0===o;return(0,a.Y)("button",{type:"button",role:"switch","aria-checked":e,"aria-label":i.ui.label,onClick:()=>{s(t,!1,()=>{}),v(!e)},disabled:c,className:`relative h-5 w-9 shrink-0 rounded-full transition-colors cursor-pointer ${e?"bg-ink":"bg-ink/15"} ${c?"opacity-50":""}`,children:(0,a.Y)("span",{className:`absolute top-0.5 h-4 w-4 rounded-full bg-paper shadow-sm transition-all ${e?"left-[18px]":"left-0.5"}`})})}if("array"===i.type&&i.ui.ordered&&f){let e=Array.isArray(o)?o.filter(e=>"string"==typeof e):[],t=t=>{v(e.includes(t)?e.filter(e=>e!==t):[...e,t])},i=(t,i)=>{let a=t+i;if(a<0||a>=e.length)return;let n=[...e],[o]=n.splice(t,1);n.splice(a,0,o),v(n)};return(0,a.FD)("div",{className:"flex flex-wrap items-center gap-1.5 justify-end max-w-72",children:[e.map((n,o)=>{let r=f.find(e=>e.value===n);return(0,a.FD)("span",{className:"inline-flex items-center gap-1 rounded-md border border-ink/15 bg-ink/[0.03] px-2 py-0.5 text-[10px] text-ink",children:[o>0&&(0,a.Y)("button",{type:"button","aria-label":`${r?.label??n} left`,onClick:()=>i(o,-1),className:"text-ink/40 hover:text-ink cursor-pointer",disabled:c,children:"←"}),r?.label??n,o<e.length-1&&(0,a.Y)("button",{type:"button","aria-label":`${r?.label??n} right`,onClick:()=>i(o,1),className:"text-ink/40 hover:text-ink cursor-pointer",disabled:c,children:"→"}),(0,a.Y)("button",{type:"button","aria-label":`Remove ${r?.label??n}`,onClick:()=>t(n),className:"text-ink/40 hover:text-error cursor-pointer",disabled:c,children:(0,a.Y)(l.A,{size:10})})]},n)}),0===e.length&&(0,a.Y)("span",{className:"text-[10px] text-ink/40",children:"empty"}),(0,a.FD)("details",{className:"relative",children:[(0,a.Y)("summary",{className:"cursor-pointer rounded-md border border-ink/15 px-2 py-0.5 text-[10px] text-ink/70 hover:text-ink select-none",children:"add…"}),(0,a.FD)("div",{className:"absolute right-0 top-full z-10 mt-1 max-h-44 w-48 overflow-auto rounded-md border border-ink/15 bg-paper p-1 shadow-lg",children:[f.filter(t=>!e.includes(t.value)).map(e=>(0,a.Y)("button",{type:"button",onClick:()=>t(e.value),className:"block w-full rounded px-2 py-1 text-left text-[11px] text-ink/80 hover:bg-ink/5",children:e.label||e.value},e.value)),f.every(t=>e.includes(t.value))&&(0,a.Y)("div",{className:"px-2 py-1 text-[10px] text-ink/40",children:"all selected"})]})]})]})}let y=f??("enum"===i.type&&i.values?i.values.map(e=>({value:e,label:e,description:""})):null);if(y){let e=null==o?"":String(o);return(0,a.Y)("div",{className:"flex items-center gap-2 shrink-0",children:(0,a.FD)("select",{"aria-label":i.ui.label,value:e,onChange:e=>{let t=e.currentTarget.value;if("number"===i.type){let e=ie(t);if(null===e||e===o)return;v(e)}else{if(t===o)return;v(t)}},disabled:c,className:`bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink max-w-56 ${c?"opacity-50":""}`,children:[""===e&&(0,a.Y)("option",{value:"",disabled:!0,children:"select…"}),y.map(e=>(0,a.Y)("option",{value:e.value,children:e.label||e.value},e.value))]})})}return"array"===i.type?(0,a.Y)("input",{"aria-label":i.ui.label,type:"text",value:u,onChange:e=>{m(e.currentTarget.value),k()},onBlur:x,disabled:c,placeholder:'["anthropic","openai"]',className:`w-48 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${c?"opacity-50":""}`}):"record"===i.type?(0,a.Y)("input",{"aria-label":i.ui.label,type:"text",value:u,onChange:e=>{m(e.currentTarget.value),k()},onBlur:x,disabled:c,placeholder:'{"bash":"prompt"}',className:`w-48 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${c?"opacity-50":""}`}):"number"===i.type?(0,a.Y)("input",{"aria-label":i.ui.label,type:"text",inputMode:"decimal",value:u,onChange:e=>{m(e.currentTarget.value),k()},onBlur:x,disabled:c,className:`w-28 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${c?"opacity-50":""}`}):(0,a.Y)("input",{"aria-label":i.ui.label,type:i.credential?"password":"text",value:u,onChange:e=>{m(e.currentTarget.value),k()},onBlur:x,disabled:c,className:`w-48 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono text-[11px] ${c?"opacity-50":""} ${p?"border-error":""}`})}function ii(e){let{tabs:t,entries:i,activeTabId:o,onSelectTab:l,searchQuery:r,dirtyKeys:s,savingKeys:d,saveErrors:c,onCommit:p,onReset:u,onDirty:m}=e,b=t.find(e=>e.id===o)??t[0],h=(0,n.Kr)(()=>{var e;let t=r.trim().toLowerCase();return t?Object.entries(t8).filter(e=>{let[i,a]=e;return!t||i.toLowerCase().includes(t)||a.ui.label.toLowerCase().includes(t)||a.ui.description.toLowerCase().includes(t)}).map(e=>{let[t]=e;return t}).slice(0,80):(e=b.id,Object.entries(t8).filter(t=>{let[,i]=t;return i.ui.tab===e})).filter(e=>{let[,t]=e;switch(t.ui.condition){case void 0:case"macOS":case"hasImageProtocol":default:return!0;case"advisorEnabled":return!0===t7(i,"advisor.enabled");case"vimModeEnabled":return!0===t7(i,"tui.vimMode");case"hindsightActive":return"hindsight"===t7(i,"memory.backend");case"mnemopiActive":return"mnemopi"===t7(i,"memory.backend");case"autolearnActive":return!0===t7(i,"autolearn.enabled");case"autoThinkingActive":return"auto"===t7(i,"defaultThinkingLevel");case"usageAwareFallbackEnabled":return!0===t7(i,"retry.usageAwareFallback");case"planModeEnabled":return!0===t7(i,"plan.enabled");case"planAutosaveEnabled":return!0===t7(i,"plan.enabled")&&!0===t7(i,"plan.autosave");case"unexpectedStopSmart":return"smart"===t7(i,"features.unexpectedStopDetection")}}).map(e=>{let[t]=e;return t})},[i,b.id,r]),f=(0,n.Kr)(()=>{if(!r.trim())return[];let e=[],i=new Map;for(let a of h){let n=t8[a],o=t.find(e=>e.id===n?.ui.tab),l=`${n?.ui.tab??"?"}\0${n?.ui.group??""}`,r=i.get(l);r||(r={label:n?.ui.group?`${o?.label??n?.ui.tab} \xb7 ${n.ui.group}`:o?.label??n?.ui.tab??"Other",keys:[]},i.set(l,r),e.push({id:l,...r})),r.keys.push(a)}return e},[h,r,t]);return(0,a.FD)("div",{className:"w-full flex flex-col gap-3 text-xs",children:[(0,a.Y)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-overlay-container scrollbar-overlay-static",children:t.map(e=>(0,a.Y)("button",{type:"button",onClick:()=>l(e.id),className:`shrink-0 rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors cursor-pointer ${e.id===b.id?"bg-ink/10 text-ink":"text-ink/55 hover:bg-ink/5 hover:text-ink"}`,children:e.label},e.id))}),(0,a.FD)("div",{className:"w-full rounded-lg border border-ink/10 divide-y divide-ink/5",children:[r.trim()?f.map(e=>(0,a.Y)(ia,{keys:e.keys,entries:i,groupLabel:e.label,dirtyKeys:s,savingKeys:d,saveErrors:c,onCommit:p,onReset:u,onDirty:m},e.id)):b.groups.map(e=>{let t=h.filter(t=>t8[t]?.ui.group===e);return 0===t.length?null:(0,a.Y)(ia,{keys:t,entries:i,groupLabel:e,dirtyKeys:s,savingKeys:d,saveErrors:c,onCommit:p,onReset:u,onDirty:m},e)}),0===h.length&&(0,a.Y)("div",{className:"px-3 py-6 text-center text-ink/40",children:r.trim()?"No settings match your search.":"No settings in this tab."})]})]})}function ia(e){let{keys:t,entries:i,groupLabel:n,dirtyKeys:o,savingKeys:l,saveErrors:s,onCommit:d,onReset:c,onDirty:p}=e;return(0,a.FD)("div",{children:[(0,a.Y)("div",{className:"px-3 py-1.5 bg-ink/[0.02] text-[10px] uppercase tracking-wide text-ink/40 font-medium",children:n}),t.map(e=>{let t=t8[e];if(!t?.ui)return null;let n=i[e]?.value,u=o.has(e),m=l.has(e),b=s.has(e);return(0,a.FD)("div",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[(0,a.FD)("div",{className:"min-w-0 flex-1",children:[(0,a.FD)("div",{className:"flex items-center gap-1.5",children:[(0,a.Y)("span",{className:"font-medium text-ink",children:t.ui.label}),(0,a.Y)("span",{className:"font-mono text-[9px] text-ink/30",title:"config key",children:e}),u&&!m&&(0,a.Y)("span",{className:"shrink-0 rounded bg-warning/15 px-1 py-px text-[9px] font-semibold text-warning",children:"unsaved"}),m&&(0,a.Y)("span",{className:"shrink-0 text-[9px] text-ink/40",children:"saving…"}),b&&!m&&(0,a.Y)("span",{className:"shrink-0 rounded bg-error/10 px-1 py-px text-[9px] font-semibold text-error",children:"save failed"})]}),t.ui.description&&(0,a.Y)("div",{className:"text-[10px] text-ink/40 leading-snug",children:t.ui.description}),t.ui.warning&&(0,a.Y)("div",{className:"text-[10px] text-error/80 leading-snug",children:t.ui.warning})]}),(0,a.FD)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,a.Y)(it,{entryKey:e,entry:t,value:n,initialValue:n,onChangeDirty:p,onCommit:d,saving:m,saveError:b}),(0,a.Y)("button",{type:"button","aria-label":`Reset ${t.ui.label}`,title:"Reset to schema default",onClick:()=>c(e),disabled:m,className:`rounded p-1 text-ink/30 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 ${m?"":"hover:bg-ink/5"}`,children:(0,a.Y)(tS.A,{size:11})}),u&&(0,a.Y)(r.A,{size:11,className:"text-ink/30"})]})]},e)})]})}let io=["default","smol","slow","vision","plan","commit","tiny","task","advisor"];function il(e){let{modelRoles:t,onSaveRole:i,savedRole:o}=e,[l,s]=(0,n.J0)(()=>({...t}));return(0,a.FD)("div",{className:"pt-2",children:[(0,a.FD)("div",{className:"flex items-center justify-between pb-2",children:[(0,a.FD)("div",{children:[(0,a.Y)("h3",{className:"text-sm font-semibold text-ink",children:"Model Roles"}),(0,a.Y)("p",{className:"text-ink/50 mt-0.5",children:"Role → model selectors from config.yml. Empty removes the role override."})]}),o&&(0,a.FD)("span",{className:"inline-flex items-center gap-1 text-[10px] text-ink/60",children:[(0,a.Y)(r.A,{size:11})," saved"]})]}),(0,a.Y)("div",{className:"rounded-lg border border-ink/10 divide-y divide-ink/5",children:io.map(e=>(0,a.FD)("div",{className:"flex items-center justify-between gap-3 px-3 py-2.5",children:[(0,a.Y)("div",{className:"font-medium text-ink capitalize",children:e}),(0,a.Y)("input",{"aria-label":`${e} model`,type:"text",value:l[e]??"",onChange:t=>s(i=>({...i,[e]:t.currentTarget.value})),onBlur:a=>((e,a)=>{let n=a.trim();if((t[e]??"")===n)return;let o={...l};n?o[e]=n:delete o[e],s(o),i(e,n)})(e,a.currentTarget.value),placeholder:"provider/model",className:"w-56 bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink text-right font-mono"})]},e))})]})}function ir(e){let{extensions:t,savedExtension:i,onToggle:n}=e;return 0===t.length?null:(0,a.FD)("div",{className:"pt-2",children:[(0,a.FD)("div",{className:"flex items-center justify-between pb-2",children:[(0,a.FD)("div",{children:[(0,a.Y)("h3",{className:"text-sm font-semibold text-ink",children:"Extensions"}),(0,a.Y)("p",{className:"text-ink/50 mt-0.5",children:"TS/JS modules loaded from .omp/extensions. Disable writes to config.yml."})]}),i&&(0,a.FD)("span",{className:"inline-flex items-center gap-1 text-[10px] text-ink/60",children:[(0,a.Y)(r.A,{size:11})," saved"]})]}),(0,a.Y)("div",{className:"rounded-lg border border-ink/10 divide-y divide-ink/5",children:t.map(e=>(0,a.FD)("div",{className:"flex items-center justify-between gap-3 px-3 py-2.5",children:[(0,a.FD)("div",{className:"min-w-0",children:[(0,a.Y)("div",{className:"font-medium text-ink",children:e.name}),(0,a.FD)("div",{className:"text-[10px] text-ink/40 truncate font-mono",children:[e.sourceRoot," · ",e.filePath]})]}),(0,a.FD)("select",{"aria-label":`${e.name} enabled`,value:e.disabled?"false":"true",onChange:()=>n(e),className:"bg-paper border border-ink/15 rounded-md px-2 py-1 text-ink",children:[(0,a.Y)("option",{value:"true",children:"enabled"}),(0,a.Y)("option",{value:"false",children:"disabled"})]})]},e.id))})]})}function is(e){let[t,i]=(0,n.J0)(null),[o,r]=(0,n.J0)(!1),[s,d]=(0,n.J0)({}),[c,p]=(0,n.J0)({}),[u,m]=(0,n.J0)([]),[b,h]=(0,n.J0)(!0),[f,g]=(0,n.J0)(t6.tabs["0"]?.id??"model"),[v,x]=(0,n.J0)(""),[k,y]=(0,n.J0)(null),[w,N]=(0,n.J0)(new Set),[A,Y]=(0,n.J0)(new Set),[S,C]=(0,n.J0)(new Set),T=(0,n.hb)(()=>{h(!0),Promise.all([fetch("/api/omp/state").then(e=>e.json()),fetch("/api/settings/omp-config").then(e=>e.json()),fetch("/api/model-roles").then(e=>e.json()),fetch("/api/omp/extensions").then(e=>e.json())]).then(e=>{let[t,a,n,o]=e;t.running&&t.state&&i(t.state),r(!!t.running),a.entries&&d(a.entries),n.roles&&"object"==typeof n.roles&&p(n.roles),Array.isArray(o.extensions)&&m(o.extensions)}).catch(e=>console.error("Failed to load omp settings:",e)).finally(()=>h(!1))},[]);(0,n.vJ)(()=>{T()},[T]);let M=e=>{y(e),setTimeout(()=>y(t=>t===e?null:t),2e3)},P=(e,t,i)=>{Y(t=>{let i=new Set(t);return i.delete(e),i}),N(t=>{let i=new Set(t);return i.delete(e),i}),t?(C(t=>{let i=new Set(t);return i.delete(e),i}),void 0!==i&&d(t=>({...t,[e]:{...t[e],value:i}})),M(e)):C(t=>new Set(t).add(e))},I=(0,n.hb)(async(e,t)=>{Y(t=>new Set(t).add(e)),N(t=>{let i=new Set(t);return i.delete(e),i});try{let i=await fetch("/api/settings/omp-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e,value:t})}),a=await i.json(),n=!!a.success;return P(e,n,a.value),n}catch(t){return console.error("Failed to save omp config:",t),P(e,!1),!1}},[]),R=(0,n.hb)(async e=>{Y(t=>new Set(t).add(e));try{let t=await fetch("/api/settings/omp-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e,action:"reset"})}),i=await t.json(),a=!!i.success;return P(e,a,i.value),a}catch(t){return console.error("Failed to reset omp config:",t),P(e,!1),!1}},[]),E=(0,n.hb)((e,t)=>{N(i=>{let a=new Set(i);return t?a.add(e):a.delete(e),a})},[]);return b?(0,a.Y)("div",{className:"flex items-center justify-center p-8 text-ink/40 text-xs",children:"Loading OMP settings..."}):(0,a.FD)("div",{className:"w-full space-y-4 text-ink pb-2 text-xs",children:[(0,a.FD)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-3 border-b border-ink/10",children:[(0,a.FD)("div",{children:[(0,a.Y)("h2",{className:"text-sm font-semibold text-ink",children:"OMP Engine"}),(0,a.Y)("p",{className:"text-ink/50 mt-0.5",children:"Live agent state and the full native config schema from oh-my-pi."})]}),(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.FD)("div",{className:"relative",children:[(0,a.Y)(D.A,{size:12,className:"absolute left-2 top-1/2 -translate-y-1/2 text-ink/40 pointer-events-none"}),(0,a.Y)("input",{"aria-label":"Search settings",type:"text",value:v,onChange:e=>x(e.currentTarget.value),placeholder:"Search settings…",className:"w-44 bg-paper border border-ink/15 rounded-md pl-6 pr-6 py-1 text-ink placeholder:text-ink/40"}),v&&(0,a.Y)("button",{type:"button","aria-label":"Clear search",onClick:()=>x(""),className:"absolute right-1.5 top-1/2 -translate-y-1/2 text-ink/40 hover:text-ink cursor-pointer",children:(0,a.Y)(l.A,{size:11})})]}),(0,a.FD)("button",{type:"button",onClick:T,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border border-ink/15 text-ink/70 hover:text-ink hover:bg-ink/5 transition-all cursor-pointer",children:[(0,a.Y)(F.A,{size:12})," Refresh"]})]})]}),(0,a.FD)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:[(0,a.FD)("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[(0,a.Y)("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Engine"}),(0,a.Y)("div",{className:"font-semibold text-ink mt-0.5",children:o?"Running":"Idle"})]}),(0,a.FD)("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[(0,a.Y)("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Model"}),(0,a.Y)("div",{className:"font-semibold text-ink mt-0.5 truncate",children:t?.model?.id??"—"})]}),(0,a.FD)("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[(0,a.Y)("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Thinking"}),(0,a.Y)("div",{className:"font-semibold text-ink mt-0.5",children:t?.thinkingLevel??"—"})]}),(0,a.FD)("div",{className:"rounded-lg border border-ink/10 bg-ink/[0.03] px-3 py-2",children:[(0,a.Y)("div",{className:"text-[10px] uppercase tracking-wide text-ink/40",children:"Context"}),(0,a.Y)("div",{className:"font-semibold text-ink mt-0.5",children:t?.contextUsage?.percent!=null?`${t.contextUsage.percent.toFixed(1)}%`:"—"})]})]}),(0,a.FD)("div",{className:"pt-1",children:[(0,a.FD)("div",{className:"flex items-center justify-between pb-2",children:[(0,a.FD)("div",{children:[(0,a.Y)("h3",{className:"text-sm font-semibold text-ink",children:"Config"}),(0,a.FD)("p",{className:"text-ink/50 mt-0.5",children:["Schema-driven settings backed by ",(0,a.Y)("span",{className:"font-mono",children:"omp config"}),".",v.trim()&&" — matching keys only"]})]}),k&&!k.startsWith("role-")&&!k.startsWith("ext-")&&(0,a.FD)("span",{className:"inline-flex items-center gap-1 text-[10px] text-ink/60",children:["saved ",k]})]}),(0,a.Y)(ii,{tabs:t6.tabs,entries:s,activeTabId:f,onSelectTab:g,searchQuery:v,dirtyKeys:w,savingKeys:A,saveErrors:S,onCommit:I,onReset:R,onDirty:E})]}),(0,a.Y)(il,{modelRoles:c,onSaveRole:(e,t)=>{let i={...c};t.trim()?i[e]=t.trim():delete i[e],p(i),fetch("/api/model-roles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({roles:i})}).then(e=>e.json()).then(t=>{t.success&&M(`role-${e}`)}).catch(e=>console.error("Failed to save model roles:",e))},savedRole:k?.startsWith("role-")?k.slice(5):null}),(0,a.Y)(ir,{extensions:u,savedExtension:k?.startsWith("ext-")?k.slice(4):null,onToggle:e=>{fetch("/api/omp/extensions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id,disabled:!e.disabled})}).then(e=>e.json()).then(t=>{t.success&&(m(t=>t.map(t=>t.id===e.id?{...t,disabled:!e.disabled}:t)),M(`ext-${e.id}`))}).catch(e=>console.error("Failed to toggle extension:",e))}})]})}var id=i("nj");function ic(e){let{activeMetrics:t}=e;return(0,a.FD)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-2.5 items-stretch",children:[(0,a.Y)(id.h,{value:t.processedTokens,label:"Processed tokens",hint:t.activeRate}),(0,a.Y)(id.h,{value:t.cachedInput,label:"Cached input",hint:t.cachedPercent}),(0,a.Y)(id.h,{value:t.uncachedInput,label:"Uncached input",hint:"0 cache writes"}),(0,a.Y)(id.h,{value:t.outputTokens,label:"Output",hint:t.reasoning}),(0,a.Y)(id.h,{value:t.cacheSavings,label:"Cache savings",hint:"0.0x the raw token cost",tone:"muted",className:"col-span-2 sm:col-span-1"})]})}let ip={daily:"DAY",weekly:"WEEK",monthly:"MONTH"};function iu(e){let{breakdownTab:t,setBreakdownTab:i,activeBreakdownRows:n,activeMetrics:o,cadence:l}=e;return(0,a.FD)("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-3",children:[(0,a.FD)("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs xl:col-span-2",children:[(0,a.FD)("div",{className:"flex justify-between items-center mb-3",children:[(0,a.Y)("span",{className:"font-semibold text-xs text-ink",children:"Breakdown"}),(0,a.FD)("div",{className:"flex bg-ink/5 rounded p-0.5",children:[(0,a.Y)("button",{onClick:()=>i("model"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${"model"===t?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"MODEL"}),(0,a.Y)("button",{onClick:()=>i("day"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${"day"===t?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:ip[l]}),(0,a.Y)("button",{onClick:()=>i("project"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${"project"===t?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"PROJECT"})]})]}),(0,a.Y)("div",{className:"overflow-x-auto",children:(0,a.FD)("table",{className:"w-full text-[11px]",children:[(0,a.Y)("thead",{children:(0,a.FD)("tr",{className:"text-ink/40 border-b border-ink/10",children:[(0,a.Y)("th",{className:"font-medium text-left pb-2 capitalize",children:"day"===t?ip[l].toLowerCase():t}),(0,a.Y)("th",{className:"font-medium text-right pb-2",children:"Cost"}),(0,a.Y)("th",{className:"font-medium text-right pb-2",children:"Share"}),(0,a.Y)("th",{className:"font-medium text-right pb-2",children:"Tokens"})]})}),(0,a.Y)("tbody",{className:"divide-y divide-ink/5",children:n.map(e=>(0,a.FD)("tr",{children:[(0,a.FD)("td",{className:"py-2.5 flex items-center gap-2",children:[(0,a.Y)("div",{className:`w-1.5 h-1.5 rounded-full ${e.dotColorClass}`}),(0,a.Y)("span",{className:"font-semibold text-ink whitespace-nowrap",children:e.name})]}),(0,a.Y)("td",{className:"py-2.5 text-right font-bold text-ink",children:e.cost}),(0,a.Y)("td",{className:"py-2.5 text-right text-ink/60",children:e.share}),(0,a.Y)("td",{className:"py-2.5 text-right text-ink/60",children:e.tokens})]},e.name))})]})}),(0,a.Y)("div",{className:"h-1.5 w-full bg-ink/5 rounded-full mt-3 overflow-hidden flex",children:n.map((e,t)=>(0,a.Y)("div",{className:`h-full ${0===t?"bg-ink/80":1===t?"bg-ink/45 border-l border-paper":"bg-ink/20 border-l border-paper"}`,style:{width:`${e.sharePercent}%`}},e.name))})]}),(0,a.FD)("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs xl:col-span-1",children:[(0,a.Y)("div",{className:"font-semibold text-xs mb-3 text-ink",children:"Cost quality"}),(0,a.FD)("div",{className:"space-y-2 text-[11px]",children:[(0,a.FD)("div",{className:"flex justify-between items-center",children:[(0,a.Y)("span",{className:"text-ink/60",children:"Provider reported"}),(0,a.Y)("span",{className:"font-semibold text-ink",children:"100.0%"})]}),(0,a.FD)("div",{className:"flex justify-between items-center",children:[(0,a.Y)("span",{className:"text-ink/60",children:"Model priced"}),(0,a.Y)("span",{className:"font-semibold text-ink",children:"0.0%"})]}),(0,a.FD)("div",{className:"flex justify-between items-center",children:[(0,a.Y)("span",{className:"text-ink/60",children:"Unpriced"}),(0,a.Y)("span",{className:"font-semibold text-ink",children:"0.0%"})]})]}),(0,a.Y)("div",{className:"border-t border-ink/10 mt-3 pt-2.5",children:(0,a.FD)("div",{className:"flex justify-between items-center text-[11px]",children:[(0,a.Y)("span",{className:"text-ink/60",children:"Cache savings"}),(0,a.Y)("span",{className:"font-semibold text-ink",children:o.cacheSavings})]})})]})]})}function im(e){let{cadence:t,metric:i,series:n}=e,o=n.map(e=>"cost"===i?e.cost:e.tokens),l=o.length>0?Math.max(...o):0,r=function(e,t,i){if(0===e.length)return"";if(1===e.length)return"M0,98 L100,98";let a=i>0?i:1;return e.map((i,n)=>{let o=n/(e.length-1)*100,l=98-t[n]/a*94;return`${0===n?"M":"L"}${o.toFixed(2)},${l.toFixed(2)}`}).join(" ")}(n,o,l),s="cost"===i?(0,e6.BD)(l)||"$0.00":(0,e6.Rk)(l)??"0",d="cost"===i?(0,e6.BD)(l/2)||"$0.00":(0,e6.Rk)(l/2)??"0",c=n[0]?.label??"",p=n.length>2?n[Math.floor(n.length/2)]?.label??"":"",u=n.length>1?n[n.length-1]?.label??"":"";return 0===n.length?(0,a.Y)("div",{className:"h-28 flex items-center justify-center text-[11px] text-ink/40",children:"No usage data in this period"}):(0,a.FD)("div",{className:"h-28 relative",children:[(0,a.FD)("div",{className:"absolute inset-0 flex flex-col justify-between pt-1 pb-4",children:[(0,a.Y)("div",{className:"border-t border-ink/5 w-full border-dashed"}),(0,a.Y)("div",{className:"border-t border-ink/5 w-full border-dashed"}),(0,a.Y)("div",{className:"border-t border-ink/15 w-full"})]}),(0,a.FD)("div",{className:"absolute left-0 top-0 bottom-4 flex flex-col justify-between text-[9px] font-mono text-ink/40 w-9",children:[(0,a.Y)("span",{children:s}),(0,a.Y)("span",{children:d}),(0,a.Y)("span",{children:"0"})]}),(0,a.Y)("div",{className:"absolute left-10 right-0 bottom-4 top-0 flex items-end",children:(0,a.Y)("svg",{className:"w-full h-full",preserveAspectRatio:"none",viewBox:"0 0 100 100",children:(0,a.Y)("path",{d:r,fill:"none",stroke:"currentColor",className:"text-ink/60 transition-all duration-300",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,a.FD)("div",{className:"absolute left-10 right-0 bottom-0 h-4 flex justify-between text-[9px] text-ink/40 items-end",children:[(0,a.Y)("span",{children:c}),p&&(0,a.Y)("span",{children:p}),(0,a.Y)("span",{children:u})]}),(0,a.Y)("span",{className:"sr-only",children:`${t} ${i} trend`})]})}function ib(e){let{settings:t,onUpdate:i}=e,[o,l]=(0,n.J0)("daily"),[s,d]=(0,n.J0)("30d"),[c,p]=(0,n.J0)(!1),[u,m]=(0,n.J0)("cost"),[b,h]=(0,n.J0)("model"),[f,g]=(0,n.J0)(!1),v=new Date().toISOString().slice(0,10),x=new Date(Date.now()-2592e6).toISOString().slice(0,10),[k,y]=(0,n.J0)(x),[w,N]=(0,n.J0)(v),[A,Y]=(0,n.J0)([]),[S,C]=(0,n.J0)(null),[D,T]=(0,n.J0)([]),[M,P]=(0,n.J0)([]),I=(0,n.li)(null);(0,eY.W)(I,()=>p(!1));let R=(0,n.hb)(()=>{g(!0);let e="custom"===s?`&customFrom=${k}&customTo=${w}`:"";fetch(`/api/telemetry/tokens?timeRange=${s}&breakdownTab=${b}&cadence=${o}${e}`).then(e=>e.json()).then(e=>{e.timeRanges&&Y(e.timeRanges),e.metrics&&C(e.metrics),e.breakdownRows&&T(e.breakdownRows),e.chartSeries&&P(e.chartSeries)}).catch(e=>console.error("Failed to load token telemetry:",e)).finally(()=>g(!1))},[s,b,o,k,w]);(0,n.vJ)(()=>{R()},[R]);let E=A.find(e=>e.id===s)||A[0]||{id:s,label:s,dateRange:"Current Period"},L="custom"===s?`${k} to ${w}`:E.dateRange;return S?(0,a.FD)("div",{className:"w-full space-y-4 text-ink pb-2 text-xs",children:[(0,a.FD)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-3 border-b border-ink/10",children:[(0,a.Y)("div",{className:"flex items-center gap-2",children:(0,a.Y)("span",{className:"text-xs font-semibold text-ink/75",children:L})}),(0,a.FD)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.FD)("div",{className:"flex items-center bg-paper border border-ink/15 rounded-md text-[11px] font-medium overflow-hidden",children:[(0,a.Y)("button",{onClick:()=>l("daily"),className:`px-2.5 py-1 transition-colors ${"daily"===o?"bg-ink/10 text-ink font-semibold":"text-ink/65 hover:bg-ink/5 hover:text-ink"}`,children:"Daily"}),(0,a.Y)("button",{onClick:()=>l("weekly"),className:`px-2.5 py-1 transition-colors ${"weekly"===o?"bg-ink/10 text-ink font-semibold":"text-ink/65 hover:bg-ink/5 hover:text-ink"}`,children:"Weekly"}),(0,a.Y)("button",{onClick:()=>l("monthly"),className:`px-2.5 py-1 transition-colors ${"monthly"===o?"bg-ink/10 text-ink font-semibold":"text-ink/65 hover:bg-ink/5 hover:text-ink"}`,children:"Monthly"})]}),(0,a.FD)("div",{className:"relative",ref:I,children:[(0,a.FD)("button",{onClick:()=>p(!c),className:"flex items-center gap-1.5 px-2.5 py-1 bg-paper border border-ink/15 rounded-md text-[11px] font-medium hover:bg-ink/5 text-ink/80 transition-colors",children:[(0,a.Y)("span",{children:E.label}),(0,a.Y)(eA.A,{size:12,className:`transition-transform duration-150 ${c?"rotate-180":""}`})]}),c&&(0,a.FD)("div",{className:"absolute right-0 top-full mt-1 w-44 bg-paper border border-ink/15 rounded-md shadow-lg z-30 py-1 text-[11px] divide-y divide-ink/5",children:[A.map(e=>(0,a.FD)("button",{onClick:()=>{d(e.id),"custom"!==e.id&&p(!1)},className:`w-full flex items-center justify-between px-3 py-1.5 text-left hover:bg-ink/5 transition-colors ${s===e.id?"font-semibold text-ink bg-ink/5":"text-ink/70"}`,children:[(0,a.Y)("span",{children:e.label}),s===e.id&&(0,a.Y)(r.A,{size:12,className:"text-ink"})]},e.id)),"custom"===s&&(0,a.FD)("div",{className:"px-3 py-2 space-y-2",children:[(0,a.FD)("label",{className:"block",children:[(0,a.Y)("span",{className:"text-[9px] font-mono uppercase tracking-wider text-ink/40",children:"From"}),(0,a.Y)("input",{type:"date",value:k,max:w,onChange:e=>y(e.currentTarget.value),className:"mt-0.5 w-full bg-paper border border-ink/15 rounded px-1.5 py-1 text-[11px] text-ink focus:outline-none focus:border-ink/40"})]}),(0,a.FD)("label",{className:"block",children:[(0,a.Y)("span",{className:"text-[9px] font-mono uppercase tracking-wider text-ink/40",children:"To"}),(0,a.Y)("input",{type:"date",value:w,min:k,max:v,onChange:e=>N(e.currentTarget.value),className:"mt-0.5 w-full bg-paper border border-ink/15 rounded px-1.5 py-1 text-[11px] text-ink focus:outline-none focus:border-ink/40"})]}),(0,a.Y)("button",{onClick:()=>p(!1),className:"w-full bg-ink/10 hover:bg-ink/20 text-ink font-semibold rounded px-2 py-1 transition-colors",children:"Apply"})]})]})]}),(0,a.Y)("button",{onClick:()=>{R()},className:"p-1.5 bg-paper border border-ink/15 rounded-md hover:bg-ink/5 text-ink/80 transition-colors",title:"Refresh Token Telemetry",children:(0,a.Y)(F.A,{size:12,className:f?"animate-spin text-ink":""})})]})]}),(0,a.FD)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3",children:[(0,a.FD)("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs flex flex-col justify-between",children:[(0,a.FD)("div",{children:[(0,a.Y)("div",{className:"text-[10px] font-mono font-semibold text-ink/40 tracking-wider uppercase mb-2",children:"USAGECONFIG.RAWTOKENCOST"}),(0,a.FD)("div",{className:"flex items-baseline gap-1 mb-0.5",children:[(0,a.Y)("span",{className:"text-2xl font-bold tracking-tight text-ink",children:S.rawCost}),(0,a.Y)("span",{className:"text-xs font-semibold text-ink/50",children:"*"})]}),(0,a.Y)("p",{className:"text-[11px] text-ink/50 mb-4",children:"* if billed at full API rate"})]}),(0,a.FD)("div",{children:[(0,a.Y)("div",{className:"h-1.5 w-full bg-ink/10 rounded-full mb-2 overflow-hidden flex",children:(0,a.Y)("div",{className:"h-full bg-ink/80 rounded-full",style:{width:"100%"}})}),(0,a.FD)("div",{className:"flex items-center justify-between text-[11px]",children:[(0,a.FD)("div",{className:"flex items-center gap-1.5",children:[(0,a.Y)("div",{className:"w-2 h-2 rounded-full bg-ink/80"}),(0,a.Y)("span",{className:"font-semibold text-ink",children:"DeepSeek"})]}),(0,a.FD)("div",{className:"flex items-center gap-3 text-ink/70",children:[(0,a.Y)("span",{className:"font-bold text-ink",children:S.rawCost}),(0,a.Y)("span",{children:"100.0% share"}),(0,a.Y)("span",{children:S.processedTokens})]})]})]})]}),(0,a.FD)("div",{className:"bg-paper border border-ink/15 rounded-lg p-3.5 shadow-xs flex flex-col",children:[(0,a.FD)("div",{className:"flex justify-between items-start mb-3",children:[(0,a.FD)("div",{className:"flex items-center gap-2",children:[(0,a.FD)("span",{className:"font-semibold text-xs text-ink capitalize",children:[o," ",u]}),(0,a.FD)("div",{className:"flex items-center gap-1",children:[(0,a.Y)("div",{className:"w-1.5 h-1.5 rounded-full bg-ink/80"}),(0,a.Y)("span",{className:"text-[11px] text-ink/60",children:"DeepSeek"})]})]}),(0,a.FD)("div",{className:"flex bg-ink/5 rounded p-0.5",children:[(0,a.Y)("button",{onClick:()=>m("cost"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${"cost"===u?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"COST"}),(0,a.Y)("button",{onClick:()=>m("tokens"),className:`px-2 py-0.5 rounded text-[9px] font-bold tracking-wider transition-colors ${"tokens"===u?"bg-paper shadow-xs text-ink":"text-ink/50 hover:text-ink"}`,children:"TOKENS"})]})]}),(0,a.Y)(im,{cadence:o,metric:u,series:M})]})]}),(0,a.Y)(ic,{activeMetrics:S}),(0,a.Y)(iu,{breakdownTab:b,setBreakdownTab:h,activeBreakdownRows:D,activeMetrics:S,cadence:o}),(0,a.FD)("div",{className:"text-center text-[10px] text-ink/40 pt-2",children:["Scanned ",S.scannedTranscripts," transcripts (1 outside the window) · ",S.usageRecords," usage records · 0.1s"]})]}):(0,a.Y)("div",{className:"flex items-center justify-center p-8 text-ink/40 text-xs",children:"Loading token usage telemetry..."})}var ih=i("hm");function ig(e){let{report:t,selectedProviderId:i,onSelectProvider:n}=e,o=(0,ih.T)(t);return(0,a.FD)("div",{className:"w-56 sm:w-64 border-r border-ink/10 h-full flex flex-col bg-paper/50 flex-shrink-0 select-none",children:[(0,a.Y)("div",{className:"px-3.5 py-2.5 border-b border-ink/10 flex items-center justify-between",children:(0,a.FD)("span",{className:"text-xs font-semibold text-ink",children:["Total ",o.length," providers"]})}),(0,a.Y)("div",{className:"flex-1 scrollbar-overlay-container scrollbar-overlay-static p-1.5 space-y-3 text-xs",children:(0,a.FD)("div",{children:[(0,a.Y)("div",{className:"px-2.5 pt-1.5 pb-1 text-[10px] font-bold text-ink/50 uppercase tracking-wider",children:"Providers"}),(0,a.Y)("div",{className:"space-y-0.5",children:o.map(e=>{let t=e.id===i,o=e.configured&&!e.error,l="kenari"===e.id?g.A:w.A;return(0,a.FD)("button",{type:"button",onClick:()=>n(e.id),className:`w-full text-left px-2.5 py-2 rounded-lg transition-colors cursor-pointer flex flex-col gap-0.5 group ${t?"bg-ink/10 text-ink font-medium shadow-2xs":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[(0,a.FD)("div",{className:"flex items-center justify-between gap-1.5",children:[(0,a.FD)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.FD)("div",{className:"relative",children:[(0,a.Y)(l,{className:`w-3.5 h-3.5 flex-shrink-0 ${t?"text-ink/80":"text-ink/60"}`}),(0,a.Y)("span",{className:`absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full ${o?"bg-ink":"bg-ink/20"}`})]}),(0,a.Y)("span",{className:"font-semibold text-xs text-ink truncate",children:e.name})]}),(0,a.Y)("span",{className:`text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-ink/10 font-medium ${e.error?"text-error":"text-ink/70"}`,children:(0,ih.R)(e)})]}),(0,a.Y)("p",{className:"text-[11px] text-ink/60 line-clamp-1 leading-snug pl-5",children:e.hint})]},e.id)})})]})})]})}var iv=i("Cw"),ix=i("TW"),ik=i("uY");function iy(){let{report:e,isLoading:t,error:i,reload:o}=(0,ik.N)(),[l,r]=(0,n.J0)("kenari");return i&&!e?(0,a.FD)("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 p-8 text-center text-xs",children:[(0,a.Y)(eQ.A,{size:16,className:"text-error"}),(0,a.Y)("p",{className:"text-error text-xs",children:i}),(0,a.Y)("button",{type:"button",onClick:()=>o(),className:"text-[11px] font-semibold text-ink/70 hover:text-ink underline underline-offset-2",children:"Try again"})]}):e?(0,a.FD)("div",{className:"flex h-full w-full overflow-hidden bg-paper text-xs text-ink",children:[(0,a.Y)(ig,{report:e,selectedProviderId:l,onSelectProvider:r}),(0,a.FD)("div",{className:"flex-1 h-full overflow-hidden flex flex-col",children:[(0,a.FD)("div",{className:"px-3.5 py-2.5 border-b border-ink/10 flex items-center justify-between gap-3 flex-shrink-0",children:[(0,a.FD)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.FD)("span",{className:"text-xs font-semibold text-ink/75 truncate",children:["Updated ",(0,ix.r6)(e.generatedAt)]}),e.isMock&&(0,a.Y)("span",{className:"text-[10px] font-mono uppercase tracking-wider bg-ink/5 border border-ink/15 rounded px-1.5 py-0.5 text-ink/60",children:"Mock"})]}),(0,a.Y)("button",{type:"button",onClick:()=>o(),disabled:t,className:"p-1.5 bg-paper border border-ink/15 rounded-md hover:bg-ink/5 text-ink/80 transition-colors disabled:opacity-50 flex-shrink-0",title:"Refresh usage",children:(0,a.Y)(F.A,{size:12,className:t?"animate-spin text-ink":""})})]}),(0,a.FD)("div",{className:"flex-1 overflow-y-auto scrollbar-overlay-container scrollbar-overlay-static p-3.5 space-y-4",children:[i&&(0,a.Y)("p",{className:"text-error text-xs",children:i}),(0,a.Y)(iv.H,{providerId:l,report:e})]})]})]}):(0,a.Y)("div",{className:"flex h-full w-full items-center justify-center text-ink/40 text-xs",children:"Loading provider usage..."})}let iw=(0,v.A)({name:"volume-2",size:24,node:[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]}),iN=(0,v.A)({name:"volume-x",size:24,node:[["path",{d:"M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z",key:"1p7khw"}],["path",{d:"m16.5 14.5 5-5",key:"cul3yw"}],["path",{d:"m16.5 9.5 5 5",key:"1akey5"}]]});var iA=i("ng");function iY(e){let{settings:t,onUpdate:i}=e,[o,l]=(0,n.J0)(!1),r=t.chatCompletionSound??t.soundAlerts??!0;return(0,a.Y)("div",{className:"w-full space-y-6 text-xs text-ink",children:(0,a.FD)("div",{className:"bg-paper border border-ink/15 rounded-lg p-4 shadow-xs space-y-4",children:[(0,a.FD)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.FD)("div",{className:"flex items-start gap-3",children:[(0,a.Y)("div",{className:"w-8 h-8 rounded-md bg-ink/5 border border-ink/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:r?(0,a.Y)(iw,{size:16,className:"text-ink"}):(0,a.Y)(iN,{size:16,className:"text-ink/40"})}),(0,a.FD)("div",{children:[(0,a.FD)("div",{className:"text-sm font-semibold text-ink flex items-center gap-2",children:[(0,a.Y)("span",{children:"AI Response Completion Sound"}),(0,a.Y)("span",{className:"text-[10px] uppercase font-mono px-1.5 py-0.5 rounded bg-ink/10 text-ink/80 font-bold",children:"Audio Chime"})]}),(0,a.Y)("p",{className:"text-ink/65 text-[11px] mt-1 leading-relaxed",children:"Play an audible notification chime when the AI completes generating its response, thinking blocks, or diagnostic execution."})]})]}),(0,a.Y)("button",{type:"button",role:"switch","aria-checked":r,onClick:()=>{let e=!r;i({chatCompletionSound:e,soundAlerts:e}),e&&(0,iA.$E)()},className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${r?"bg-ink":"bg-ink/20"}`,children:(0,a.Y)("span",{"aria-hidden":"true",className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-paper shadow ring-0 transition duration-200 ease-in-out ${r?"translate-x-5":"translate-x-0"}`})})]}),(0,a.FD)("div",{className:"pt-3 border-t border-ink/10 flex items-center justify-between",children:[(0,a.FD)("span",{className:"text-[11px] text-ink/60 flex items-center gap-1.5",children:[(0,a.Y)(q.A,{size:13,className:"text-ink/60"}),"Warm harmonic chime synthesized natively via Web Audio"]}),(0,a.FD)("button",{type:"button",onClick:()=>{l(!0),(0,iA.$E)(),setTimeout(()=>l(!1),600)},className:`px-3 py-1.5 rounded-md border border-ink/20 bg-paper hover:bg-ink/5 text-ink font-medium text-[11px] flex items-center gap-1.5 transition-all shadow-xs active:scale-95 ${o?"border-ink bg-ink/10":""}`,children:[(0,a.Y)(iw,{size:13,className:o?"animate-bounce text-ink":"text-ink/70"}),(0,a.Y)("span",{children:o?"Playing...":"Test Sound"})]})]})]})})}let iS={binaryPath:"/Users/you/.bun/bin/omp",showUpdateNotifications:!0,agentControlTool:!0,ompChamberWebTool:!0,theme:"paper",fontSize:"standard",editorFont:"JetBrains Mono",streamResponses:!0,streamTransport:"websocket",autoSessionTitle:!0,expandedThinking:!0,detailedToolCalls:!1,notificationsEnabled:!0,buildFailureAlert:!0,soundAlerts:!0,chatCompletionSound:!0,defaultWorkspacePath:"~/Projects/ompchamber",tunnelEnabled:!0,tunnelSubdomain:"omp-dev-preview",activeProvider:"claude",autoApproveSafeCmds:!0,autoPatchErrors:!0,followUpBehavior:"queue",keybindingSend:"Enter",keybindingNewLine:"Shift + Enter",keybindingSteering:"Ctrl / Cmd + Enter"};function iC(e){let{isOpen:t,onClose:i,initialCategory:p="appearance",appSettings:m={},autoOpenAddProvider:b=!1}=e,[h,f]=(0,n.J0)(p),[g,v]=(0,n.J0)(b),[x,k]=(0,n.J0)(""),[y,w]=(0,n.J0)(!1),[N,A]=(0,n.J0)(!1),[Y,S]=(0,n.J0)(null),C=(0,d.g)(),[D,F]=(0,n.J0)(()=>(0,s.cm)(iS,m));(0,n.vJ)(()=>{t&&(f(p),v(b),A(!1),k(""))},[t,p,b]),(0,u.sY)("omp:open-settings",e=>{e.detail?.category&&f(e.detail.category),e.detail?.autoOpenAdd&&v(!0)});let P=e=>{F(t=>{let i="function"==typeof e?e(t):{...t,...e};return"u">typeof document&&i.theme&&(0,c.Ps)(i.theme),C(function(e,t,i){let a={};for(let n of"function"==typeof i?Object.keys(t):Object.keys(i))t[n]!==e[n]&&(a[n]=t[n]);return a}(t,i,e)),i}),S("Setting was saved"),setTimeout(()=>S(null),3e3)},I=()=>{w(!0),setTimeout(()=>{w(!1)},1200)};if(!t)return null;let R=T.find(e=>e.id===h)||T["0"];return(0,a.Y)("div",{className:"fixed inset-0 bg-ink/40 backdrop-blur-[2px] z-50 flex items-center justify-center p-0 md:p-6 animate-in fade-in duration-150",onClick:i,children:(0,a.FD)("div",{className:"relative bg-paper border border-ink/15 md:rounded-2xl shadow-2xl w-full h-full md:max-w-4xl lg:max-w-5xl xl:max-w-[1150px] md:h-[782px] md:max-h-[92vh] flex flex-col md:flex-row overflow-hidden text-ink",onClick:e=>e.stopPropagation(),children:[(0,a.Y)("div",{className:"hidden md:flex w-64 flex-shrink-0 h-full",children:(0,a.Y)(M,{activeCategory:h,onSelectCategory:e=>f(e),searchQuery:x,onSearchChange:k,onReloadOmpEngine:I,isReloading:y,className:"w-full"})}),(0,a.FD)("div",{className:`flex-1 flex-col h-full bg-paper overflow-hidden ${N?"flex":"hidden md:flex"}`,children:[(0,a.FD)("div",{className:"h-16 px-6 border-b border-ink/10 flex items-center justify-between flex-shrink-0 bg-paper",children:[(0,a.FD)("div",{className:"flex items-center space-x-3 min-w-0",children:[(0,a.Y)("button",{type:"button",onClick:()=>A(!1),className:"md:hidden p-1.5 -ml-2 rounded-lg hover:bg-ink/5 active:bg-ink/10 text-ink","aria-label":"Back to categories",children:(0,a.Y)(o.A,{size:20})}),(0,a.FD)("div",{className:"truncate",children:[(0,a.Y)("h3",{className:"font-semibold text-base tracking-tight text-ink leading-tight",children:R.label}),(0,a.Y)("p",{className:"text-[11px] text-ink/60 truncate hidden sm:block",children:R.description})]})]}),(0,a.Y)("button",{type:"button",onClick:i,className:"p-1.5 rounded-lg text-ink/50 hover:text-ink hover:bg-ink/5 transition-colors cursor-pointer","aria-label":"Close settings",children:(0,a.Y)(l.A,{size:18,strokeWidth:2.2})})]}),(0,a.Y)("div",{className:`flex-1 scrollbar-overlay-container scrollbar-overlay-static w-full ${["projects","providers","agents","behavior","commands","mcp","skills","skills-catalog","usage"].includes(h)?"p-0 flex flex-col":"p-6 md:p-8 flex flex-col"}`,children:(0,a.Y)("div",{className:"w-full h-full flex-1 flex flex-col",children:(()=>{switch(h){case"appearance":return(0,a.Y)(O,{settings:D,onUpdate:P});case"chats":return(0,a.Y)(Z,{settings:D,onUpdate:P});case"projects":return(0,a.Y)(eL,{});case"providers":return(0,a.Y)(tu,{autoOpenAdd:g,onAddModalClose:()=>v(!1)});case"agents":return(0,a.Y)(tY,{settings:D,onUpdate:P});case"behavior":return(0,a.Y)(tI,{});case"commands":return(0,a.Y)(tO,{settings:D,onUpdate:P});case"mcp":return(0,a.Y)(tG,{settings:D,onUpdate:P});case"token-usage":return(0,a.Y)(ib,{settings:D,onUpdate:P});case"notifications":return(0,a.Y)(iY,{settings:D,onUpdate:P});case"skills":return(0,a.Y)(tQ,{settings:D,onUpdate:P,onNavigateToCatalog:()=>f("skills-catalog")});case"skills-catalog":return(0,a.Y)(t3,{});case"omp":return(0,a.Y)(is,{settings:D,onUpdate:P});case"usage":return(0,a.Y)(iy,{});default:return(0,a.Y)(t4,{category:h})}})()})})]}),(0,a.FD)("div",{className:`flex-1 flex-col h-full bg-canvas md:hidden ${N?"hidden":"flex"}`,children:[(0,a.FD)("div",{className:"h-14 px-4 border-b border-ink/10 flex items-center justify-between flex-shrink-0 bg-canvas",children:[(0,a.Y)("span",{className:"font-bold text-sm tracking-tight text-ink",children:"Settings"}),(0,a.Y)("button",{type:"button",onClick:i,className:"p-1.5 rounded-lg text-ink/50 hover:text-ink","aria-label":"Close",children:(0,a.Y)(l.A,{size:18})})]}),(0,a.Y)("div",{className:"flex-1 overflow-hidden",children:(0,a.Y)(M,{activeCategory:h,onSelectCategory:e=>{f(e),A(!0)},searchQuery:x,onSearchChange:k,onReloadOmpEngine:I,isReloading:y,className:"w-full border-r-0"})})]}),Y&&(0,a.FD)("div",{className:"absolute bottom-6 left-1/2 transform -translate-x-1/2 bg-ink text-canvas px-4 py-2 rounded-lg text-xs font-semibold shadow-lg animate-in fade-in slide-in-from-bottom-2 z-50 flex items-center space-x-2",children:[(0,a.Y)(r.A,{size:14,className:"text-success"}),(0,a.Y)("span",{children:Y})]})]})})}},qp(e,t,i){let a=(0,i("y").A)({name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]});i.d(t,{},{A:a})},Soe(e,t,i){let a=(0,i("y").A)({name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]});i.d(t,{},{A:a})},qn(e,t,i){let a=(0,i("y").A)({name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]});i.d(t,{},{A:a})},ES(e,t,i){let a=(0,i("y").A)({name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]});i.d(t,{},{A:a})},yh(e,t,i){let a=(0,i("y").A)({name:"text-wrap",size:24,node:[["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M3 12h14.5a1 1 0 0 1 0 7H13",key:"18xa6z"}],["path",{d:"M3 19h6",key:"1ygdsz"}],["path",{d:"M3 5h18",key:"1u36vt"}]],aliases:["wrap-text"]});i.d(t,{},{A:a})},zr(e,t,i){let a=(0,i("y").A)({name:"type",size:24,node:[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]});i.d(t,{},{A:a})},ke(e,t,i){let a=(0,i("y").A)({name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]});i.d(t,{},{A:a})}}]);