@chatcode/cco-better-sidebar 0.18.0-alpha.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/LICENSE +21 -0
  2. package/README.md +554 -0
  3. package/README_EN.md +563 -0
  4. package/assets/logo.svg +1 -0
  5. package/cordis.patch.yml +79 -0
  6. package/lib/client-editor.js +55744 -0
  7. package/lib/client-mermaid.js +208256 -0
  8. package/lib/client-registry.js +30378 -0
  9. package/lib/client-terminal.js +16894 -0
  10. package/lib/client.js +30378 -0
  11. package/lib/index.js +6897 -0
  12. package/lib/invariant.js +22 -0
  13. package/lib/types/agent-opens.d.ts +65 -0
  14. package/lib/types/agent-pty.d.ts +226 -0
  15. package/lib/types/browser-probe.d.ts +15 -0
  16. package/lib/types/bundle-route.d.ts +12 -0
  17. package/lib/types/chatcode-update.d.ts +47 -0
  18. package/lib/types/client/AccountMenu.d.ts +1 -0
  19. package/lib/types/client/AiRatioSection.d.ts +3 -0
  20. package/lib/types/client/BrowserView.d.ts +39 -0
  21. package/lib/types/client/ChatcodeGate.d.ts +6 -0
  22. package/lib/types/client/CodingPlanModelsSettings.d.ts +9 -0
  23. package/lib/types/client/DiffTab.d.ts +6 -0
  24. package/lib/types/client/DiffView.d.ts +51 -0
  25. package/lib/types/client/EditorHost.d.ts +13 -0
  26. package/lib/types/client/FenceErrorNotice.d.ts +5 -0
  27. package/lib/types/client/FileTree.d.ts +41 -0
  28. package/lib/types/client/FreeWindow.d.ts +29 -0
  29. package/lib/types/client/GitView.d.ts +12 -0
  30. package/lib/types/client/MarkdownHtml.d.ts +32 -0
  31. package/lib/types/client/OrphanedTab.d.ts +11 -0
  32. package/lib/types/client/PdfView.d.ts +6 -0
  33. package/lib/types/client/ReleaseNotesDialog.d.ts +11 -0
  34. package/lib/types/client/RenderBoundary.d.ts +32 -0
  35. package/lib/types/client/SandboxStatusBar.d.ts +10 -0
  36. package/lib/types/client/SideCardSection.d.ts +74 -0
  37. package/lib/types/client/Sidebar.d.ts +8 -0
  38. package/lib/types/client/TabBar.d.ts +54 -0
  39. package/lib/types/client/TerminalView.d.ts +24 -0
  40. package/lib/types/client/TextEditor.d.ts +10 -0
  41. package/lib/types/client/TreePanel.d.ts +27 -0
  42. package/lib/types/client/UpdateDialog.d.ts +10 -0
  43. package/lib/types/client/UpdateSettingsPanel.d.ts +1 -0
  44. package/lib/types/client/UpdateSettingsSection.d.ts +10 -0
  45. package/lib/types/client/UploadOverlay.d.ts +20 -0
  46. package/lib/types/client/UsageHeatmapSection.d.ts +4 -0
  47. package/lib/types/client/add-plugin-modal.d.ts +15 -0
  48. package/lib/types/client/api.d.ts +345 -0
  49. package/lib/types/client/binary-download.d.ts +12 -0
  50. package/lib/types/client/breakpoints.d.ts +17 -0
  51. package/lib/types/client/browser.d.ts +60 -0
  52. package/lib/types/client/builtins/index.d.ts +18 -0
  53. package/lib/types/client/builtins/tabs.d.ts +11 -0
  54. package/lib/types/client/builtins/viewers.d.ts +3 -0
  55. package/lib/types/client/chat-presentation.d.ts +13 -0
  56. package/lib/types/client/chunk-loader.d.ts +124 -0
  57. package/lib/types/client/chunks/editor.d.ts +9 -0
  58. package/lib/types/client/chunks/mermaid.d.ts +10 -0
  59. package/lib/types/client/chunks/terminal.d.ts +9 -0
  60. package/lib/types/client/cm-themes.d.ts +24 -0
  61. package/lib/types/client/conversation-draft.d.ts +14 -0
  62. package/lib/types/client/desktop-env.d.ts +35 -0
  63. package/lib/types/client/editor-load.d.ts +66 -0
  64. package/lib/types/client/frame-batcher.d.ts +24 -0
  65. package/lib/types/client/icons.d.ts +66 -0
  66. package/lib/types/client/image-types.d.ts +3 -0
  67. package/lib/types/client/ime-guard.d.ts +36 -0
  68. package/lib/types/client/index.d.ts +19 -0
  69. package/lib/types/client/intercept.d.ts +44 -0
  70. package/lib/types/client/lang.d.ts +14 -0
  71. package/lib/types/client/layout-push.d.ts +15 -0
  72. package/lib/types/client/lazy-chunk.d.ts +25 -0
  73. package/lib/types/client/link-intercept.d.ts +42 -0
  74. package/lib/types/client/locales-ar.d.ts +18 -0
  75. package/lib/types/client/locales-de.d.ts +4 -0
  76. package/lib/types/client/locales-fr.d.ts +10 -0
  77. package/lib/types/client/locales-hi.d.ts +17 -0
  78. package/lib/types/client/locales-id.d.ts +15 -0
  79. package/lib/types/client/locales-it.d.ts +8 -0
  80. package/lib/types/client/locales-ja.d.ts +17 -0
  81. package/lib/types/client/locales-ko.d.ts +9 -0
  82. package/lib/types/client/locales-nl.d.ts +16 -0
  83. package/lib/types/client/locales-pl.d.ts +19 -0
  84. package/lib/types/client/locales-pt.d.ts +1 -0
  85. package/lib/types/client/locales-ru.d.ts +13 -0
  86. package/lib/types/client/locales-sv.d.ts +1 -0
  87. package/lib/types/client/locales-th.d.ts +17 -0
  88. package/lib/types/client/locales-tr.d.ts +17 -0
  89. package/lib/types/client/locales-vi.d.ts +17 -0
  90. package/lib/types/client/locales-zh-HK.d.ts +32 -0
  91. package/lib/types/client/locales-zh-MO.d.ts +32 -0
  92. package/lib/types/client/locales-zh-TW.d.ts +32 -0
  93. package/lib/types/client/locales.d.ts +571 -0
  94. package/lib/types/client/markdown-html.d.ts +96 -0
  95. package/lib/types/client/markdown-images.d.ts +45 -0
  96. package/lib/types/client/markdown-labels.d.ts +21 -0
  97. package/lib/types/client/md-toc.d.ts +4 -0
  98. package/lib/types/client/mermaid-blocks.d.ts +47 -0
  99. package/lib/types/client/mermaid-sanitize.d.ts +2 -0
  100. package/lib/types/client/mermaid.d.ts +12 -0
  101. package/lib/types/client/open-when-sized.d.ts +20 -0
  102. package/lib/types/client/open-with-settings.d.ts +4 -0
  103. package/lib/types/client/open-with.d.ts +87 -0
  104. package/lib/types/client/openpath-intercept.d.ts +52 -0
  105. package/lib/types/client/paths.d.ts +43 -0
  106. package/lib/types/client/pdf-types.d.ts +2 -0
  107. package/lib/types/client/pinned.d.ts +86 -0
  108. package/lib/types/client/plugin-settings.d.ts +8 -0
  109. package/lib/types/client/plugins-shared.d.ts +27 -0
  110. package/lib/types/client/plugins-tabs.d.ts +3 -0
  111. package/lib/types/client/plugins-viewers.d.ts +3 -0
  112. package/lib/types/client/prefs.d.ts +41 -0
  113. package/lib/types/client/produced-files.d.ts +29 -0
  114. package/lib/types/client/selection-payload.d.ts +27 -0
  115. package/lib/types/client/service.d.ts +445 -0
  116. package/lib/types/client/session-pins.d.ts +14 -0
  117. package/lib/types/client/settings-nav-icon.d.ts +27 -0
  118. package/lib/types/client/shell-presets.d.ts +48 -0
  119. package/lib/types/client/split-pane.d.ts +38 -0
  120. package/lib/types/client/state.d.ts +480 -0
  121. package/lib/types/client/tab-content-memo.d.ts +40 -0
  122. package/lib/types/client/terminal-font.d.ts +78 -0
  123. package/lib/types/client/terminal-links.d.ts +119 -0
  124. package/lib/types/client/theme.d.ts +45 -0
  125. package/lib/types/client/titlebar-strip.d.ts +23 -0
  126. package/lib/types/client/ui-tweaks/appicons.d.ts +16 -0
  127. package/lib/types/client/ui-tweaks/archive.d.ts +42 -0
  128. package/lib/types/client/ui-tweaks/branding.d.ts +45 -0
  129. package/lib/types/client/ui-tweaks/cachehit.d.ts +41 -0
  130. package/lib/types/client/ui-tweaks/gitbar.d.ts +103 -0
  131. package/lib/types/client/ui-tweaks/index.d.ts +279 -0
  132. package/lib/types/client/ui-tweaks/mcp.d.ts +28 -0
  133. package/lib/types/client/ui-tweaks/notifier.d.ts +125 -0
  134. package/lib/types/client/ui-tweaks/whale.d.ts +55 -0
  135. package/lib/types/client/upload.d.ts +69 -0
  136. package/lib/types/client/useChatcodeAccount.d.ts +10 -0
  137. package/lib/types/client/wco.d.ts +47 -0
  138. package/lib/types/codingplan.d.ts +37 -0
  139. package/lib/types/config.d.ts +95 -0
  140. package/lib/types/context-types.d.ts +540 -0
  141. package/lib/types/fs-operations.d.ts +30 -0
  142. package/lib/types/fs-search.d.ts +24 -0
  143. package/lib/types/fs-tree.d.ts +51 -0
  144. package/lib/types/git.d.ts +124 -0
  145. package/lib/types/html-route.d.ts +59 -0
  146. package/lib/types/index.d.ts +47 -0
  147. package/lib/types/invariant.d.ts +15 -0
  148. package/lib/types/login-route.d.ts +2 -0
  149. package/lib/types/open-external.d.ts +24 -0
  150. package/lib/types/path-security.d.ts +26 -0
  151. package/lib/types/prefs-shared.d.ts +257 -0
  152. package/lib/types/pty-deps.d.ts +79 -0
  153. package/lib/types/pty-manager.d.ts +168 -0
  154. package/lib/types/tools.d.ts +34 -0
  155. package/lib/types/trust-fence.d.ts +24 -0
  156. package/lib/types/ui-tweaks/archive.d.ts +71 -0
  157. package/lib/types/ui-tweaks/config.d.ts +186 -0
  158. package/lib/types/ui-tweaks/git-web.d.ts +43 -0
  159. package/lib/types/ui-tweaks/git.d.ts +311 -0
  160. package/lib/types/ui-tweaks/index.d.ts +17 -0
  161. package/lib/types/ui-tweaks/mcp.d.ts +103 -0
  162. package/lib/types/ui-tweaks/turn-outcome.d.ts +57 -0
  163. package/lib/types/ui-tweaks/web.d.ts +55 -0
  164. package/lib/types/wire.d.ts +38 -0
  165. package/package.json +213 -0
  166. package/scripts/install.ps1 +310 -0
  167. package/scripts/install.sh +287 -0
  168. package/src/agent-opens.ts +265 -0
  169. package/src/agent-pty.ts +527 -0
  170. package/src/browser-probe.ts +26 -0
  171. package/src/bundle-route.ts +129 -0
  172. package/src/chatcode-update.ts +193 -0
  173. package/src/client/AccountMenu.tsx +177 -0
  174. package/src/client/AiRatioSection.module.css +329 -0
  175. package/src/client/AiRatioSection.tsx +292 -0
  176. package/src/client/BrowserView.tsx +289 -0
  177. package/src/client/ChatcodeGate.tsx +35 -0
  178. package/src/client/CodingPlanModelsSettings.module.css +118 -0
  179. package/src/client/CodingPlanModelsSettings.tsx +101 -0
  180. package/src/client/DiffTab.tsx +114 -0
  181. package/src/client/DiffView.tsx +305 -0
  182. package/src/client/EditorHost.tsx +563 -0
  183. package/src/client/FenceErrorNotice.tsx +40 -0
  184. package/src/client/FileTree.tsx +701 -0
  185. package/src/client/FreeWindow.tsx +337 -0
  186. package/src/client/GitView.tsx +722 -0
  187. package/src/client/MarkdownHtml.tsx +296 -0
  188. package/src/client/OrphanedTab.tsx +27 -0
  189. package/src/client/PdfView.tsx +110 -0
  190. package/src/client/ReleaseNotesDialog.tsx +91 -0
  191. package/src/client/RenderBoundary.tsx +49 -0
  192. package/src/client/SandboxStatusBar.tsx +60 -0
  193. package/src/client/SideCardSection.module.css +932 -0
  194. package/src/client/SideCardSection.tsx +1169 -0
  195. package/src/client/Sidebar.tsx +1857 -0
  196. package/src/client/TabBar.tsx +365 -0
  197. package/src/client/TerminalView.tsx +424 -0
  198. package/src/client/TextEditor.tsx +468 -0
  199. package/src/client/TreePanel.tsx +279 -0
  200. package/src/client/UpdateDialog.tsx +186 -0
  201. package/src/client/UpdateSettingsPanel.tsx +29 -0
  202. package/src/client/UpdateSettingsSection.tsx +22 -0
  203. package/src/client/UploadOverlay.tsx +62 -0
  204. package/src/client/UsageHeatmapSection.module.css +440 -0
  205. package/src/client/UsageHeatmapSection.tsx +301 -0
  206. package/src/client/add-plugin-modal.tsx +199 -0
  207. package/src/client/api.ts +433 -0
  208. package/src/client/binary-download.tsx +23 -0
  209. package/src/client/breakpoints.ts +61 -0
  210. package/src/client/browser.ts +167 -0
  211. package/src/client/builtins/index.ts +37 -0
  212. package/src/client/builtins/tabs.tsx +275 -0
  213. package/src/client/builtins/viewers.tsx +125 -0
  214. package/src/client/chat-presentation.ts +95 -0
  215. package/src/client/chunk-loader.ts +350 -0
  216. package/src/client/chunks/editor.tsx +9 -0
  217. package/src/client/chunks/mermaid.tsx +10 -0
  218. package/src/client/chunks/terminal.tsx +9 -0
  219. package/src/client/cm-themes.ts +129 -0
  220. package/src/client/conversation-draft.ts +29 -0
  221. package/src/client/css-modules.d.ts +5 -0
  222. package/src/client/desktop-env.ts +72 -0
  223. package/src/client/editor-load.ts +92 -0
  224. package/src/client/frame-batcher.ts +56 -0
  225. package/src/client/icons.tsx +170 -0
  226. package/src/client/image-types.ts +8 -0
  227. package/src/client/ime-guard.ts +47 -0
  228. package/src/client/index.tsx +501 -0
  229. package/src/client/intercept.tsx +172 -0
  230. package/src/client/lang.ts +225 -0
  231. package/src/client/layout-push.ts +37 -0
  232. package/src/client/layout.css +156 -0
  233. package/src/client/lazy-chunk.tsx +89 -0
  234. package/src/client/link-intercept.ts +73 -0
  235. package/src/client/locales-ar.ts +387 -0
  236. package/src/client/locales-de.ts +372 -0
  237. package/src/client/locales-fr.ts +379 -0
  238. package/src/client/locales-hi.ts +386 -0
  239. package/src/client/locales-id.ts +384 -0
  240. package/src/client/locales-it.ts +377 -0
  241. package/src/client/locales-ja.ts +486 -0
  242. package/src/client/locales-ko.ts +378 -0
  243. package/src/client/locales-nl.ts +384 -0
  244. package/src/client/locales-pl.ts +388 -0
  245. package/src/client/locales-pt.ts +369 -0
  246. package/src/client/locales-ru.ts +384 -0
  247. package/src/client/locales-sv.ts +369 -0
  248. package/src/client/locales-th.ts +386 -0
  249. package/src/client/locales-tr.ts +386 -0
  250. package/src/client/locales-vi.ts +386 -0
  251. package/src/client/locales-zh-HK.ts +401 -0
  252. package/src/client/locales-zh-MO.ts +401 -0
  253. package/src/client/locales-zh-TW.ts +401 -0
  254. package/src/client/locales.ts +1229 -0
  255. package/src/client/markdown-html.ts +331 -0
  256. package/src/client/markdown-images.ts +137 -0
  257. package/src/client/markdown-labels.tsx +31 -0
  258. package/src/client/md-toc.tsx +127 -0
  259. package/src/client/mermaid-blocks.ts +110 -0
  260. package/src/client/mermaid-sanitize.ts +93 -0
  261. package/src/client/mermaid.tsx +406 -0
  262. package/src/client/open-when-sized.ts +43 -0
  263. package/src/client/open-with-settings.tsx +135 -0
  264. package/src/client/open-with.ts +221 -0
  265. package/src/client/openpath-intercept.ts +79 -0
  266. package/src/client/paths.ts +63 -0
  267. package/src/client/pdf-types.ts +4 -0
  268. package/src/client/pinned.ts +184 -0
  269. package/src/client/plugin-settings.ts +43 -0
  270. package/src/client/plugins-shared.ts +29 -0
  271. package/src/client/plugins-tabs.ts +153 -0
  272. package/src/client/plugins-viewers.ts +44 -0
  273. package/src/client/prefs.ts +216 -0
  274. package/src/client/produced-files.ts +120 -0
  275. package/src/client/selection-payload.ts +86 -0
  276. package/src/client/service.ts +873 -0
  277. package/src/client/session-pins.tsx +334 -0
  278. package/src/client/settings-nav-icon.ts +55 -0
  279. package/src/client/shell-presets.ts +83 -0
  280. package/src/client/sidebar.module.css +3607 -0
  281. package/src/client/split-pane.tsx +333 -0
  282. package/src/client/state.ts +1646 -0
  283. package/src/client/tab-content-memo.ts +55 -0
  284. package/src/client/terminal-font.ts +224 -0
  285. package/src/client/terminal-links.ts +194 -0
  286. package/src/client/theme.ts +110 -0
  287. package/src/client/titlebar-strip.ts +37 -0
  288. package/src/client/ui-tweaks/appicons.ts +24 -0
  289. package/src/client/ui-tweaks/archive.tsx +281 -0
  290. package/src/client/ui-tweaks/branding.tsx +232 -0
  291. package/src/client/ui-tweaks/cachehit.tsx +122 -0
  292. package/src/client/ui-tweaks/gitbar.tsx +2559 -0
  293. package/src/client/ui-tweaks/index.tsx +1696 -0
  294. package/src/client/ui-tweaks/mcp.tsx +582 -0
  295. package/src/client/ui-tweaks/notifier.ts +514 -0
  296. package/src/client/ui-tweaks/whale.tsx +171 -0
  297. package/src/client/upload.ts +187 -0
  298. package/src/client/useChatcodeAccount.ts +103 -0
  299. package/src/client/wco.ts +120 -0
  300. package/src/codingplan.ts +146 -0
  301. package/src/config.ts +207 -0
  302. package/src/context-types.ts +559 -0
  303. package/src/fs-operations.ts +97 -0
  304. package/src/fs-search.ts +113 -0
  305. package/src/fs-tree.ts +158 -0
  306. package/src/git.ts +446 -0
  307. package/src/html-route.ts +106 -0
  308. package/src/index.ts +1524 -0
  309. package/src/invariant.ts +32 -0
  310. package/src/login-route.ts +26 -0
  311. package/src/open-external.ts +90 -0
  312. package/src/path-security.ts +81 -0
  313. package/src/prefs-shared.ts +303 -0
  314. package/src/pty-deps.ts +241 -0
  315. package/src/pty-manager.ts +376 -0
  316. package/src/tools.ts +482 -0
  317. package/src/trust-fence.ts +84 -0
  318. package/src/ui-tweaks/archive.ts +293 -0
  319. package/src/ui-tweaks/config.ts +257 -0
  320. package/src/ui-tweaks/git-web.ts +421 -0
  321. package/src/ui-tweaks/git.ts +1524 -0
  322. package/src/ui-tweaks/index.ts +61 -0
  323. package/src/ui-tweaks/mcp.ts +535 -0
  324. package/src/ui-tweaks/turn-outcome.ts +105 -0
  325. package/src/ui-tweaks/web.ts +225 -0
  326. package/src/wire.ts +110 -0
  327. package/vendor/addon-fit.js +2 -0
  328. package/vendor/xterm.css +218 -0
  329. package/vendor/xterm.js +5 -0
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Append text to the current session's composer draft through the
3
+ * conversation service — the shared path behind the explorer's @-reference
4
+ * button and the viewer selection popup. The service is resolved lazily
5
+ * through `ctx.get` (the inject-free read the app's own plugins use); a
6
+ * missing service or scope degrades to a logged no-op, never a crash.
7
+ */
8
+ import type { Context } from '../context-types.ts';
9
+ /**
10
+ * Append `text` to the session's composer draft (space-separated, like the
11
+ * @-mentions). Returns false — and logs — when the conversation service or
12
+ * the session scope is unavailable.
13
+ */
14
+ export declare function appendToDraft(ctx: Context, sessionId: string, text: string): boolean;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Desktop-shell detection for the sidebar. Shells may stamp the render URL
3
+ * with `dsh-desktop-mode` / `dsh-desktop-platform` (the official Electron
4
+ * shell does) and expose `window.__DSH_DESKTOP_FILE_PATH__` through a
5
+ * preload. Parsed once per page and memoized (the URL never changes
6
+ * mid-session); `resetDesktopEnvForTests` clears the memo for unit tests.
7
+ *
8
+ * GEOMETRY POLICY: this module only REPORTS shell facts — it never decides
9
+ * how to adapt. The strip height comes from standard signals first (the
10
+ * Window Controls Overlay API, see wco.ts), then the documented contract
11
+ * parameter `dsh-desktop-titlebar-inset` (a shell may stamp the real pixels
12
+ * it reserves at the top), then the user's chosen scheme (preset / custom).
13
+ * The legacy win32-advanced 32px constant is gone from the core: it lives
14
+ * in the opt-in shell preset (shell-presets.ts) as a fallback for shells
15
+ * without the WCO API.
16
+ */
17
+ export interface DesktopEnv {
18
+ /** Running inside a desktop shell (any URL stamp or preload marker). */
19
+ readonly desktop: boolean;
20
+ /** `advanced` = frameless/custom-titlebar shell; `compatibility` = native frame. */
21
+ readonly mode: 'compatibility' | 'advanced' | null;
22
+ /** Shell platform stamp ('darwin' | 'win32' | …), lowercased, or null. */
23
+ readonly platform: string | null;
24
+ /**
25
+ * Contract parameter `dsh-desktop-titlebar-inset`: pixels the shell
26
+ * reserves at the top of the web content for its own chrome (0–120,
27
+ * clamped; 0 when absent). Standard WCO geometry takes precedence over
28
+ * this whenever the API is available.
29
+ */
30
+ readonly titlebarInset: number;
31
+ }
32
+ /** Read the shell's desktop stamps (memoized per page; SSR-safe). */
33
+ export declare function parseDesktopEnv(): DesktopEnv;
34
+ /** Test hook: drop the memo so the next parse re-reads the URL/globals. */
35
+ export declare function resetDesktopEnvForTests(): void;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Pure editor-load planning: the decision logic the editor host needs to
3
+ * turn a matched file viewer + a host fs.read result into a render action.
4
+ * Kept dependency-free (no React, no fetch) so the strategy dispatch is
5
+ * unit-testable and the wire contract (head bytes, binary flag) is pinned.
6
+ *
7
+ * The host flow this module drives:
8
+ * 1. `matchFileViewer(path)` picks a viewer by extension/priority.
9
+ * 2. `planFirstMatch` dispatches its fetchStrategy.
10
+ * 3. An fsRead viewer fetches through the host; `planFsReadOutcome`
11
+ * decides what to do with the result — including the head-based
12
+ * re-match that lets a `detect` viewer claim a binary the extension
13
+ * match could not see (the builtin NUL probe on `binary-download`).
14
+ */
15
+ import type { FileViewerDescriptor } from './service.ts';
16
+ /** One host fs.read result (mirror of the wire; `head` present when binary). */
17
+ export interface FsReadOutcome {
18
+ binary: boolean;
19
+ content: string;
20
+ truncated: boolean;
21
+ /** base64 of the first bytes (present on binary reads; sniffing material). */
22
+ head?: string;
23
+ }
24
+ /** What the editor host should do next. */
25
+ export type EditorLoadAction =
26
+ /** No renderer: show the download UI. */
27
+ {
28
+ kind: 'binary';
29
+ }
30
+ /** Render `viewer`'s component with the carried payload. */
31
+ | {
32
+ kind: 'render';
33
+ viewer: FileViewerDescriptor;
34
+ content?: string;
35
+ truncated?: boolean;
36
+ mediaUrl?: string;
37
+ customData?: unknown;
38
+ }
39
+ /** Fetch the file through the host (fsRead strategy). */
40
+ | {
41
+ kind: 'fetchFsRead';
42
+ viewer: FileViewerDescriptor;
43
+ }
44
+ /** Call the viewer's load() and render with its return value. */
45
+ | {
46
+ kind: 'customLoad';
47
+ viewer: FileViewerDescriptor;
48
+ };
49
+ /** Decode the host's base64 head bytes into the sniffing buffer. */
50
+ export declare function decodeHead(headBase64: string): Uint8Array;
51
+ /**
52
+ * Dispatch one matched viewer's fetchStrategy. A missing viewer or a
53
+ * `binary-download` strategy both mean "no client-side renderer" → the
54
+ * download UI. `mediaUrlOf` builds the media URL for `mediaUrl`/`none`
55
+ * strategies (pure, but scope-bound — injected by the host).
56
+ */
57
+ export declare function planFirstMatch(viewer: FileViewerDescriptor | undefined, mediaUrlOf: () => string): EditorLoadAction;
58
+ /**
59
+ * Decide what an fsRead result means for the editor.
60
+ * - Text: the first match stands (content is valid for any fsRead viewer).
61
+ * - Binary: the host head bytes enable a re-match — a `detect` viewer (e.g.
62
+ * a plugin sniffing a binary format) may claim the file. `custom` viewers
63
+ * load their own bytes; `mediaUrl`/`none` viewers render the media route;
64
+ * an fsRead viewer or nothing cannot render binary → download UI.
65
+ */
66
+ export declare function planFsReadOutcome(viewer: FileViewerDescriptor, result: FsReadOutcome, rematch: (head: Uint8Array) => FileViewerDescriptor | undefined, mediaUrlOf: () => string): EditorLoadAction;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Per-frame task coalescing for pointer-driven interactions.
3
+ *
4
+ * Pointer streams fire several times faster than the display refresh, and
5
+ * applying every event (a React setState, a store reduce) re-renders whole
6
+ * trees at event cadence — the visible drag lag on slower CPUs (#315). This
7
+ * batcher keeps the LATEST scheduled task, runs it at most once per
8
+ * animation frame, and lets the caller flush synchronously on release (so
9
+ * the final pointer position is never lost to a cancelled frame).
10
+ *
11
+ * Callers compose the pending value in a ref before scheduling; the
12
+ * scheduled task reads that ref, so replacing the task on every event is
13
+ * cheap (one ref write + one rAF check).
14
+ */
15
+ export interface FrameBatcher {
16
+ /** Schedule (or replace) the per-frame task. Safe to call on every event. */
17
+ schedule(task: () => void): void;
18
+ /** Cancel any pending frame and run the scheduled task synchronously
19
+ * (no-op when nothing is scheduled). */
20
+ flushNow(): void;
21
+ /** Cancel any pending frame and drop the task without running it. */
22
+ dispose(): void;
23
+ }
24
+ export declare function createFrameBatcher(): FrameBatcher;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Icons the sidebar needs beyond the primitives set: a terminal glyph (the
3
+ * icon library has none), a diff glyph, and the two panel-toggle glyphs for
4
+ * the top-right cluster. Per-tab icons live on the tab descriptors
5
+ * (`descriptor.icon`), not in a type-keyed switch — the icon mapping was
6
+ * registry-ized with the tab types.
7
+ */
8
+ import type { IconProps } from '@deepseek-ai/dsh-client-ui-primitives';
9
+ /** User-manual glyph: an open book in the sidebar's 1.5px outline style. */
10
+ export declare const IconBookOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
11
+ /**
12
+ * Right-panel toggle glyph (the "侧拉" button): a frame with a filled strip
13
+ * along its RIGHT edge, in the app's outline style (1.5px stroke,
14
+ * currentColor).
15
+ */
16
+ export declare const IconPanelRightOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
17
+ /**
18
+ * Bottom-panel toggle glyph (the "底栏" button): a frame with a filled strip
19
+ * along its BOTTOM edge, in the app's outline style.
20
+ */
21
+ export declare const IconPanelBottomOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
22
+ /**
23
+ * Terminal glyph in the app's outline style (1.5px stroke, currentColor):
24
+ * a rounded frame with a prompt chevron and underscore cursor.
25
+ */
26
+ export declare const IconTerminalOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
27
+ /** Diff glyph in the app's outline style: a file frame with a plus and a minus row. */
28
+ export declare const IconDiffOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
29
+ /**
30
+ * Stop glyph for the background-job kill button: a filled square in the
31
+ * app's outline scale (16), the universal "halt this work" mark.
32
+ */
33
+ export declare const IconStopOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
34
+ /** Upload glyph in the app's outline style: an arrow rising into a tray
35
+ * (the file-manager "upload into the workspace" action). */
36
+ export declare const IconUploadOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
37
+ /**
38
+ * Pin glyph in the app's outline style (1.5px stroke, currentColor): a pushpin
39
+ * tilted to the lower-right. Used by the PinnedRail and the tab context menu's
40
+ * pin entry (v0.17.0+).
41
+ */
42
+ export declare const IconPinOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
43
+ /** Image viewer glyph: a picture frame with a sun and a mountain. */
44
+ export declare const IconImageOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
45
+ /** PDF viewer glyph: a document frame with the "PDF" label. */
46
+ export declare const IconPdfOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
47
+ /** Markdown viewer glyph: the classic "M with a down arrow" badge. */
48
+ export declare const IconMarkdownOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
49
+ /** HTML viewer glyph: a document frame with a "‹/›" tag pair. */
50
+ export declare const IconHtmlOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
51
+ /** Browser tab glyph: a globe with meridians. */
52
+ export declare const IconGlobeOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
53
+ /** History glyph (thread switcher): a clock with a counterclockwise arrow,
54
+ * in the app's outline style — the "past conversations" mark. */
55
+ export declare const IconHistoryOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
56
+ /** Save glyph (save-as-new-session): the classic floppy disk, in the app's
57
+ * outline style. */
58
+ export declare const IconSaveOutline16: ({ size, className }: IconProps) => import("react").JSX.Element;
59
+ /**
60
+ * Visual Studio Code brand mark for the file-tree "open with" menu. The
61
+ * path is the Simple Icons `visualstudiocode` glyph (CC0 1.0,
62
+ * simple-icons@11.0.0 — later releases dropped it over Microsoft's brand
63
+ * policy, so it is inlined here rather than pulled from react-icons),
64
+ * rendered monochrome via currentColor to follow the active skin.
65
+ */
66
+ export declare const IconVscode16: ({ size, className }: IconProps) => import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ /** Image extension dispatch, separate from React for unit testing. */
2
+ export declare const IMAGE_EXTENSIONS: readonly string[];
3
+ export declare function isImageExt(ext: string): boolean;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * IME-composition key guard.
3
+ *
4
+ * While a Chinese/Japanese/Korean input method is composing (the user is
5
+ * picking a candidate from the IME window), every pressed key BELONGS to the
6
+ * input method: arrows move the candidate highlight, Enter/Space confirm the
7
+ * composition, Escape cancels it. Page code must not process those keys —
8
+ * a component that does (a number stepper calling preventDefault() on
9
+ * ArrowUp/ArrowDown, a submit handler reacting to Enter, ...) silently
10
+ * breaks the IME: candidates stop responding, the composition gets torn
11
+ * apart, and only bare letters come out.
12
+ *
13
+ * This guard enforces that rule at the document boundary: a capture-phase
14
+ * keydown/keyup listener that stops the event from propagating further
15
+ * whenever a composition is in progress. Because it runs in the capture
16
+ * phase on `document` — the outermost node — it fires BEFORE React's
17
+ * delegated handlers (attached at the root container) and before any native
18
+ * target/bubble listener, so an inlined third-party component (e.g. the
19
+ * Univer office UI bundled into this plugin) can never intercept
20
+ * composition keys. The browser's native IME processing is untouched:
21
+ * stopPropagation only silences page JS, not the default action.
22
+ *
23
+ * The composition signal follows the DSH core convention (InputBar's IME
24
+ * guard, issue #535): `isComposing` for modern engines, keyCode 229 as the
25
+ * legacy signal engines emit without isComposing.
26
+ */
27
+ /** The pure decision: is this keyboard event part of an IME composition? */
28
+ export declare function isImeComposition(event: {
29
+ isComposing: boolean;
30
+ keyCode: number;
31
+ }): boolean;
32
+ /**
33
+ * Register the document-level capture guard. Returns the disposer
34
+ * (HMR-safe; call through `ctx.effect`).
35
+ */
36
+ export declare function registerImeGuard(): () => void;
@@ -0,0 +1,19 @@
1
+ import type { Context } from '../context-types.ts';
2
+ import './layout.css';
3
+ /** Services required before mounting (provided by the client runtime; the
4
+ * locale service backs the sidebar's copy — see locales.ts). `modules`
5
+ * (rc.8+) is the client module system the chunk loader resolves its
6
+ * externals through — Cordis guards service access without inject. */
7
+ export declare const inject: string[];
8
+ /**
9
+ * Error boundary over the sidebar tree (root scope): a render error in the
10
+ * sidebar SHELL itself must never blank the page silently — the shared
11
+ * RenderBoundary shows a dismissible error strip and logs the stack. The
12
+ * per-tab scope (Sidebar.tsx) catches viewer/editor crashes first; this root
13
+ * boundary stays as the last resort for Workbench/shell errors.
14
+ */
15
+ /**
16
+ * Client plugin body.
17
+ * @param ctx - the client cordis context (slots, sessions).
18
+ */
19
+ export declare function apply(ctx: Context): void;
@@ -0,0 +1,44 @@
1
+ import type { Context } from '../context-types.ts';
2
+ import { type SidebarStore } from './state.ts';
3
+ /** Open a file in the sidebar's editor (used by the intercepted row and the explorer). */
4
+ export declare function openSidebarFile(ctx: Context, store: SidebarStore, sessionId: string, path: string): void;
5
+ /**
6
+ * Reveal the produced files in the sidebar explorer: expand their parent
7
+ * directories, highlight the rows, and focus the explorer tab (expanding the
8
+ * hosting panel when it is collapsed). Unknown files fall back to revealing
9
+ * the workspace root itself.
10
+ */
11
+ export declare function revealInExplorer(ctx: Context, store: SidebarStore, sessionId: string, files: readonly string[]): void;
12
+ /** The intercepted produced-files row (visual twin of the deliverables chips). */
13
+ export declare function SidebarProducedFiles(props: {
14
+ matched: readonly string[];
15
+ openInSidebar: (path: string) => void;
16
+ /** Reveal the produced files in the explorer ("Show in folder" twin). */
17
+ onShowInFolder: (files: readonly string[]) => void;
18
+ }): import("react").JSX.Element;
19
+ /**
20
+ * Register the turn-tail interception (returns the disposer).
21
+ *
22
+ * The slot is a CHILD slot the host's ui-conversation declares in its
23
+ * `conversation.chat.node` children table (kind: chain, scope: session).
24
+ * Registering it directly races the declaration — the ui-slots core's
25
+ * load-time validation throws "not declared (a parent entry's children
26
+ * table must declare it)" when the parent entry is not on the ledger yet.
27
+ * slots.inject waits for the declaration: the callback runs synchronously
28
+ * when the slot is already declared, otherwise it runs inside the declaring
29
+ * register() call once the declaration commits; declaration collapse
30
+ * disposes the entry and a later declaration re-registers it. This mirrors
31
+ * @deepseek-ai/dsh-client-ui-deliverables' registration of the same slot.
32
+ */
33
+ export declare function registerTurnTailInterception(ctx: Context, store: SidebarStore): () => void;
34
+ /**
35
+ * Register the chat file-open interception: wraps `ctx.workspaces.openPath`
36
+ * — the single funnel every chat-side file open goes through (tool-row path
37
+ * links, the produced-files row, prose mentions) — so opens land in the
38
+ * sidebar editor instead of the Host OS. The folder-reveal gesture ("Show in
39
+ * folder" passes `'.'`) is the one exception: it is routed to the explorer.
40
+ * Gated by BOTH the `interceptOpenPath` pref and the editor tab's enable
41
+ * switch; declined opens fall through to the original method. Returns the
42
+ * disposer restoring the original (HMR-safe).
43
+ */
44
+ export declare function registerOpenPathInterception(ctx: Context, store: SidebarStore): () => void;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Syntax highlighting for the file editor: extension → CodeMirror language
3
+ * mapping. The key derivation is pure and unit-tested; the factories pull in
4
+ * the CodeMirror language packages (bundled into the client).
5
+ */
6
+ import { Language, LanguageSupport } from '@codemirror/language';
7
+ /** The lowercased file extension of a path ('' when none). */
8
+ export declare function extOf(path: string): string;
9
+ /** Language key for an extension, or null for plain text. Pure (tested). */
10
+ export declare function languageKeyForExt(ext: string): string | null;
11
+ /** Every language key the extension table can produce (test seam). */
12
+ export declare function supportedLanguageKeys(): readonly string[];
13
+ /** The CodeMirror language support for a path, or null for plain text. */
14
+ export declare function languageForPath(path: string): Language | LanguageSupport | null;
@@ -0,0 +1,15 @@
1
+ export interface LayoutPushInput {
2
+ narrow: boolean;
3
+ panelOpen: boolean;
4
+ bottomOpen: boolean;
5
+ width: number;
6
+ bottomHeight: number;
7
+ viewportWidth: number;
8
+ viewportHeight: number;
9
+ }
10
+ export interface LayoutPushSize {
11
+ width: number;
12
+ height: number;
13
+ }
14
+ /** Compute the live layout-push size. Narrow drawers float and push 0. */
15
+ export declare function layoutPushSize(input: LayoutPushInput): LayoutPushSize;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Lazy chunk view wrapper: mounts a component that lives in a lazy chunk,
3
+ * showing a loading placeholder while the chunk script loads and an error +
4
+ * retry affordance on failure. Used by the built-in tab/viewer descriptors.
5
+ *
6
+ * Contract note: {@link lazyChunkComponent} returns a plain render-prop
7
+ * function — the descriptor contract is `component: (props) => ReactNode`,
8
+ * and the repo renders descriptors BOTH ways: Sidebar calls
9
+ * `descriptor.component(props)` directly, EditorHost renders it via
10
+ * `createElement`. The wrapper function body therefore contains no hooks;
11
+ * all state lives in the inner {@link LazyChunkView} component.
12
+ */
13
+ import { type ComponentType, type ReactNode } from 'react';
14
+ import { type ChunkExports, type ChunkName } from './chunk-loader.ts';
15
+ /**
16
+ * Build a descriptor-compatible lazy wrapper for a chunk-resident component.
17
+ * The returned function is the descriptor `component` itself: it returns an
18
+ * element and never calls hooks, so both invocation styles (plain function
19
+ * call and createElement/JSX render) work. `pick` must be a module-level
20
+ * function (stable identity) — an inline lambda would re-trigger the load
21
+ * effect on every render.
22
+ * @param chunk - the chunk name (see chunk-loader.ts).
23
+ * @param pick - select the component from the chunk's exports.
24
+ */
25
+ export declare function lazyChunkComponent<P extends object>(chunk: ChunkName, pick: (mod: ChunkExports) => ComponentType<P> | undefined): (props: P) => ReactNode;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Chat/GUI external-link interception: clicking an http(s) link that points
3
+ * OUTSIDE the GUI (chat messages, tool rows, prose mentions) opens the
4
+ * sidebar instead of a new browser tab. Gated by the caller through
5
+ * `takeoverEnabled(url)` — the `browserInterceptLinks` master, the URL's
6
+ * protocol flag (`browserInterceptHttp` / `browserInterceptHttps`) and the
7
+ * target tab's enable switch — and a Ctrl/Cmd/Shift/Alt-modified click
8
+ * always bypasses the takeover so the user can still force a real browser
9
+ * tab.
10
+ *
11
+ * Only the GUI's OWN document is watched — links inside the browser tab's
12
+ * sandboxed iframe live in another document and never bubble here (and
13
+ * their clicks must keep working inside the sidebar).
14
+ */
15
+ /** The pure decision: the URL to open in the sidebar, or null to let the
16
+ * click fall through. Extracted so the policy is unit-testable without a
17
+ * DOM. `anchorHref` must be the ABSOLUTE href (`<a>.href` already is).
18
+ * The protocol/same-origin policy lives HERE; the prefs gates (master +
19
+ * protocol flags + target enablement) live in the caller's
20
+ * `takeoverEnabled(url)` callback. */
21
+ export declare function shouldInterceptLink(anchorHref: string, selfOrigin: string): string | null;
22
+ /** Whether a left-click may be taken over (unmodified left click only). */
23
+ export declare function isPlainLeftClick(event: {
24
+ button: number;
25
+ metaKey: boolean;
26
+ ctrlKey: boolean;
27
+ shiftKey: boolean;
28
+ altKey: boolean;
29
+ }): boolean;
30
+ /**
31
+ * Register the document-level click capture that funnels external links
32
+ * into the sidebar. Returns the disposer (HMR-safe).
33
+ */
34
+ export declare function registerLinkInterception(opts: {
35
+ /** Whether the takeover may happen for THIS url (the caller's prefs
36
+ * gates: master switch, protocol flag, target enablement). */
37
+ takeoverEnabled: (url: URL) => boolean;
38
+ /** Open the sidebar tab at `url` (the caller resolves the target type). */
39
+ openInSidebar: (url: string) => void;
40
+ /** The GUI's own origin (window.location.origin at registration). */
41
+ selfOrigin: string;
42
+ }): () => void;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The ar (Arabic) dictionary for the betterSidebar namespace.
3
+ *
4
+ * Mirrors the key set of `zh` in `locales.ts`. The sidebar's `t()`
5
+ * consults this dict when `attachBetterLocale(store)` has been called
6
+ * with an active better-locale store whose `active` is `'ar'`; absent
7
+ * that, the existing zh/en chain runs unchanged.
8
+ *
9
+ * Translation conventions:
10
+ * - Modern Standard Arabic (فصحى); UI text is RTL-ready (the framework
11
+ * handles direction).
12
+ * - Git vocabulary follows standard Arabic localizations (إدراج، تثبيت، فرع).
13
+ * - Placeholders keep `{name}` verbatim (interpolation runs after lookup).
14
+ * - English brand names (VS Code, Cursor, Zed, SSH, Git, HTML, PDF, Markdown)
15
+ * stay as-is.
16
+ */
17
+ /** The ar dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
18
+ export declare const ar: Record<string, string>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * German dictionary for better-sidebar.
3
+ */
4
+ export declare const de: Record<string, string>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * French translation of the better-sidebar copy.
3
+ *
4
+ * Mirrors the key set of the zh dictionary in `locales.ts` (enforced by
5
+ * the `Record<keyof typeof zh, string>` type annotation). The better-locale
6
+ * override store registers this dict under the `betterSidebar` namespace,
7
+ * so it takes effect when the user has selected the `fr` override.
8
+ */
9
+ /** fr dictionary for the `betterSidebar` namespace. */
10
+ export declare const fr: Record<string, string>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The hi (Hindi) dictionary for the betterSidebar namespace.
3
+ *
4
+ * Mirrors the key set of `zh` in `locales.ts`. The sidebar's `t()`
5
+ * consults this dict when `attachBetterLocale(store)` has been called
6
+ * with an active better-locale store whose `active` is `'hi'`; absent
7
+ * that, the existing zh/en chain runs unchanged.
8
+ *
9
+ * Translation conventions:
10
+ * - Technical terms (Git, SSH, HTTP, URL, Markdown, PDF, VS Code, API, etc.) stay in English.
11
+ * - Common dev-tool terms use Devanagari transliterations (टर्मिनल, ब्राउज़र, सैंडबॉक्स).
12
+ * - Git vocabulary follows English loanwords (स्टेज, कमिट, ब्रांच, चेरी-पिक).
13
+ * - Placeholders keep `{name}` verbatim (interpolation runs after lookup).
14
+ * - English brand names (VS Code, Cursor, Zed, SSH, Chrome) stay as-is.
15
+ */
16
+ /** The hi dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
17
+ export declare const hi: Record<string, string>;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The id (Indonesian) dictionary for the betterSidebar namespace.
3
+ *
4
+ * Mirrors the key set of `zh` in `locales.ts`. The sidebar's `t()`
5
+ * consults this dict when `attachBetterLocale(store)` has been called
6
+ * with an active better-locale store whose `active` is `'id'`; absent
7
+ * that, the existing zh/en chain runs unchanged.
8
+ *
9
+ * Translation conventions:
10
+ * - Git vocabulary stays close to the English form (stage, commit, branch, fork).
11
+ * - Settings labels mirror the zh cadence (… perilaku / … cara).
12
+ * - Placeholders keep {name} verbatim (interpolation runs after lookup).
13
+ * - English brand names (VS Code, Cursor, Zed, SSH) stay as-is.
14
+ */
15
+ export declare const id: Record<string, string>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Italian copy for the sidebar. Key-set-equal to `zh` in `locales.ts`;
3
+ * consumed by the better-locale override store (see `locales.ts` for the
4
+ * zh/en/ja lookup chain and the `attachBetterLocale` contract).
5
+ *
6
+ * @module dsh-better-sidebar/client/locales-it
7
+ */
8
+ export declare const it: Record<string, string>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The ja (Japanese) dictionary for the betterSidebar namespace.
3
+ *
4
+ * Mirrors the key set of `zh` in `locales.ts`. The sidebar's `t()`
5
+ * consults this dict when `attachBetterLocale(store)` has been called
6
+ * with an active better-locale store whose `active` is `'ja'`; absent
7
+ * that, the existing zh/en chain runs unchanged.
8
+ *
9
+ * Translation conventions:
10
+ * - Common dev-tool loanwords stay in katakana (ターミナル, ブラウザー, サンドボックス).
11
+ * - Git vocabulary follows the GitHub Japan style guide (ステージ, コミット, ブランチ).
12
+ * - Settings labels end in する/名/方法 to mirror the zh 「…行为/方式」 cadence.
13
+ * - Placeholders keep `{name}` verbatim (interpolation runs after lookup).
14
+ * - English brand names (VS Code, Cursor, Zed, SSH) stay as-is.
15
+ */
16
+ /** The ja dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
17
+ export declare const ja: Record<string, string>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Korean dictionary for the better-sidebar plugin (LOCALE_NS `betterSidebar`).
3
+ *
4
+ * Key-set-equal to the zh dictionary in `./locales.ts` (zh is the source of
5
+ * truth). Registered through the better-locale override store when that
6
+ * plugin is installed; the override borrows ChatCode CLI's English slot, so it takes
7
+ * effect only while ChatCode CLI's active locale is `'en'`.
8
+ */
9
+ export declare const ko: Record<string, string>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The nl (Dutch) dictionary for the betterSidebar namespace.
3
+ *
4
+ * Mirrors the key set of `zh` in `locales.ts`. The sidebar's `t()`
5
+ * consults this dict when `attachBetterLocale(store)` has been called
6
+ * with an active better-locale store whose `active` is `'nl'`; absent
7
+ * that, the existing zh/en chain runs unchanged.
8
+ *
9
+ * Translation conventions:
10
+ * - Formal "u" form for user-facing text.
11
+ * - Technical loanwords stay in English (Git, SSH, HTTP, URL, Markdown, PDF, VS Code).
12
+ * - Git vocabulary follows English-derived conventions (stagen, unstagen, commit, branch).
13
+ * - Placeholders keep `{name}` verbatim (interpolation runs after lookup).
14
+ * - English brand names (VS Code, Cursor, Zed, SSH) stay as-is.
15
+ */
16
+ export declare const nl: Record<string, string>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The pl (Polish) dictionary for the betterSidebar namespace.
3
+ *
4
+ * Mirrors the key set of `zh` in `locales.ts`. The sidebar's `t()`
5
+ * consults this dict when `attachBetterLocale(store)` has been called
6
+ * with an active better-locale store whose `active` is `'pl'`; absent
7
+ * that, the existing zh/en chain runs unchanged.
8
+ *
9
+ * Translation conventions:
10
+ * - Formal register (Pan/Pani/Państwo) for user-facing copy.
11
+ * - Polish diacritics used throughout (ą, ć, ę, ł, ń, ó, ś, ź, ż).
12
+ * - {placeholder} patterns kept verbatim (interpolation runs after lookup).
13
+ * - Git vocabulary follows the English-leaning developer style
14
+ * (commit, branch, stage, diff, cherry-pick, hash, push, fetch, pull).
15
+ * - English brand names (VS Code, Cursor, Zed, SSH, Mermaid, HTML, CSS,
16
+ * PDF, Markdown, Cursor) stay as-is.
17
+ */
18
+ /** The pl dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
19
+ export declare const pl: Record<string, string>;
@@ -0,0 +1 @@
1
+ export declare const pt: Record<string, string>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Russian (ru) dictionary for the better-sidebar plugin.
3
+ *
4
+ * Translated from the Simplified-Chinese (zh) source-of-truth dictionary in
5
+ * `./locales.ts`. Placeholders like `{name}` / `{path}` / `{dir}` are
6
+ * preserved verbatim; technical terms (Git, SSH, HTTP, URL, Markdown, PDF,
7
+ * VS Code, Tab, cherry-pick, etc.) are kept in English where idiomatic in
8
+ * Russian product UI.
9
+ *
10
+ * Tone: formal «Вы». Key set is type-checked against `zh` via the import in
11
+ * `locales.ts` (`Record<keyof typeof zh, string>`).
12
+ */
13
+ export declare const ru: Record<string, string>;
@@ -0,0 +1 @@
1
+ export declare const sv: Record<string, string>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The th (Thai) dictionary for the betterSidebar namespace.
3
+ *
4
+ * Mirrors the key set of `zh` in `locales.ts`. The sidebar's `t()`
5
+ * consults this dict when `attachBetterLocale(store)` has been called
6
+ * with an active better-locale store whose `active` is `'th'`; absent
7
+ * that, the existing zh/en chain runs unchanged.
8
+ *
9
+ * Translation conventions:
10
+ * - Technical terms stay in English where appropriate (Git, SSH, HTTP, URL,
11
+ * Markdown, PDF, VS Code, API Key, Base URL, token, etc.).
12
+ * - Placeholders keep {name} verbatim (interpolation runs after lookup).
13
+ * - Formal Thai appropriate for software UI.
14
+ * - Terminology is kept consistent with the ChatCode CLI core th dictionary.
15
+ */
16
+ /** The th dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
17
+ export declare const th: Record<string, string>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The tr (Turkish) dictionary for the betterSidebar namespace.
3
+ *
4
+ * Mirrors the key set of `zh` in `locales.ts`. The sidebar's `t()`
5
+ * consults this dict when `attachBetterLocale(store)` has been called
6
+ * with an active better-locale store whose `active` is `'tr'`; absent
7
+ * that, the existing zh/en chain runs unchanged.
8
+ *
9
+ * Translation conventions:
10
+ * - Common dev-tool loanwords stay in Turkish (Terminal, Tarayıcı, Klasör).
11
+ * - Git vocabulary follows standard Turkish usage ( Sahnele, İşle, Dal).
12
+ * - Settings labels end in noun/infinitive forms to mirror the zh cadence.
13
+ * - Placeholders keep `{name}` verbatim (interpolation runs after lookup).
14
+ * - English brand names (VS Code, Cursor, Zed, SSH) stay as-is.
15
+ */
16
+ /** The tr dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
17
+ export declare const tr: Record<string, string>;