@keith9681/dsh-sidebar 0.15.2

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 (220) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +0 -0
  3. package/README_EN.md +0 -0
  4. package/cordis.patch.yml +49 -0
  5. package/lib/client-editor.js +34651 -0
  6. package/lib/client-mermaid.js +200629 -0
  7. package/lib/client-registry.js +13388 -0
  8. package/lib/client-terminal.js +8904 -0
  9. package/lib/client.js +13388 -0
  10. package/lib/index.js +3959 -0
  11. package/lib/invariant.js +22 -0
  12. package/lib/types/agent-pty.d.ts +226 -0
  13. package/lib/types/browser-probe.d.ts +15 -0
  14. package/lib/types/bundle-route.d.ts +12 -0
  15. package/lib/types/client/BrowserView.d.ts +22 -0
  16. package/lib/types/client/DiffTab.d.ts +6 -0
  17. package/lib/types/client/DiffView.d.ts +51 -0
  18. package/lib/types/client/EditorHost.d.ts +12 -0
  19. package/lib/types/client/FileTree.d.ts +36 -0
  20. package/lib/types/client/GitView.d.ts +8 -0
  21. package/lib/types/client/OrphanedTab.d.ts +11 -0
  22. package/lib/types/client/PdfView.d.ts +6 -0
  23. package/lib/types/client/RenderBoundary.d.ts +32 -0
  24. package/lib/types/client/SandboxStatusBar.d.ts +10 -0
  25. package/lib/types/client/SideCardSection.d.ts +74 -0
  26. package/lib/types/client/SideChatView.d.ts +16 -0
  27. package/lib/types/client/Sidebar.d.ts +6 -0
  28. package/lib/types/client/SubagentView.d.ts +16 -0
  29. package/lib/types/client/TabBar.d.ts +43 -0
  30. package/lib/types/client/TerminalView.d.ts +24 -0
  31. package/lib/types/client/TextEditor.d.ts +10 -0
  32. package/lib/types/client/TreePanel.d.ts +23 -0
  33. package/lib/types/client/UploadOverlay.d.ts +20 -0
  34. package/lib/types/client/add-plugin-modal.d.ts +15 -0
  35. package/lib/types/client/api.d.ts +268 -0
  36. package/lib/types/client/binary-download.d.ts +12 -0
  37. package/lib/types/client/breakpoints.d.ts +12 -0
  38. package/lib/types/client/browser.d.ts +50 -0
  39. package/lib/types/client/builtins/index.d.ts +18 -0
  40. package/lib/types/client/builtins/tabs.d.ts +11 -0
  41. package/lib/types/client/builtins/viewers.d.ts +3 -0
  42. package/lib/types/client/chunk-loader.d.ts +124 -0
  43. package/lib/types/client/chunks/editor.d.ts +9 -0
  44. package/lib/types/client/chunks/mermaid.d.ts +10 -0
  45. package/lib/types/client/chunks/terminal.d.ts +9 -0
  46. package/lib/types/client/cm-themes.d.ts +24 -0
  47. package/lib/types/client/conversation-draft.d.ts +14 -0
  48. package/lib/types/client/desktop-env.d.ts +35 -0
  49. package/lib/types/client/editable-state.d.ts +27 -0
  50. package/lib/types/client/editor-load.d.ts +66 -0
  51. package/lib/types/client/frame-batcher.d.ts +24 -0
  52. package/lib/types/client/icons.d.ts +57 -0
  53. package/lib/types/client/image-types.d.ts +3 -0
  54. package/lib/types/client/ime-guard.d.ts +36 -0
  55. package/lib/types/client/index.d.ts +19 -0
  56. package/lib/types/client/intercept.d.ts +33 -0
  57. package/lib/types/client/lang.d.ts +12 -0
  58. package/lib/types/client/lazy-chunk.d.ts +25 -0
  59. package/lib/types/client/link-intercept.d.ts +42 -0
  60. package/lib/types/client/locales.d.ts +366 -0
  61. package/lib/types/client/mermaid-blocks.d.ts +41 -0
  62. package/lib/types/client/mermaid-sanitize.d.ts +2 -0
  63. package/lib/types/client/mermaid.d.ts +12 -0
  64. package/lib/types/client/open-when-sized.d.ts +20 -0
  65. package/lib/types/client/open-with-settings.d.ts +4 -0
  66. package/lib/types/client/open-with.d.ts +87 -0
  67. package/lib/types/client/openpath-intercept.d.ts +41 -0
  68. package/lib/types/client/paths.d.ts +35 -0
  69. package/lib/types/client/pdf-types.d.ts +2 -0
  70. package/lib/types/client/plugin-settings.d.ts +8 -0
  71. package/lib/types/client/plugins-shared.d.ts +27 -0
  72. package/lib/types/client/plugins-tabs.d.ts +3 -0
  73. package/lib/types/client/plugins-viewers.d.ts +3 -0
  74. package/lib/types/client/prefs.d.ts +41 -0
  75. package/lib/types/client/produced-files.d.ts +23 -0
  76. package/lib/types/client/selection-payload.d.ts +27 -0
  77. package/lib/types/client/service.d.ts +440 -0
  78. package/lib/types/client/settings-nav-icon.d.ts +19 -0
  79. package/lib/types/client/shell-presets.d.ts +48 -0
  80. package/lib/types/client/sidechat-transcript.d.ts +103 -0
  81. package/lib/types/client/split-pane.d.ts +30 -0
  82. package/lib/types/client/state.d.ts +359 -0
  83. package/lib/types/client/subagent-detect.d.ts +54 -0
  84. package/lib/types/client/subagent-jobs.d.ts +63 -0
  85. package/lib/types/client/tab-content-memo.d.ts +33 -0
  86. package/lib/types/client/terminal-font.d.ts +20 -0
  87. package/lib/types/client/theme.d.ts +45 -0
  88. package/lib/types/client/titlebar-strip.d.ts +23 -0
  89. package/lib/types/client/upload.d.ts +69 -0
  90. package/lib/types/client/wco.d.ts +47 -0
  91. package/lib/types/config.d.ts +64 -0
  92. package/lib/types/context-types.d.ts +603 -0
  93. package/lib/types/fs-operations.d.ts +28 -0
  94. package/lib/types/fs-search.d.ts +24 -0
  95. package/lib/types/fs-tree.d.ts +51 -0
  96. package/lib/types/git.d.ts +82 -0
  97. package/lib/types/html-route.d.ts +59 -0
  98. package/lib/types/index.d.ts +47 -0
  99. package/lib/types/invariant.d.ts +15 -0
  100. package/lib/types/jobs-routes.d.ts +45 -0
  101. package/lib/types/open-external.d.ts +24 -0
  102. package/lib/types/prefs-shared.d.ts +225 -0
  103. package/lib/types/pty-deps.d.ts +78 -0
  104. package/lib/types/pty-manager.d.ts +168 -0
  105. package/lib/types/sidechat-core.d.ts +172 -0
  106. package/lib/types/sidechat-routes.d.ts +30 -0
  107. package/lib/types/subagent-activity.d.ts +44 -0
  108. package/lib/types/subagent-live-route.d.ts +44 -0
  109. package/lib/types/tools.d.ts +31 -0
  110. package/lib/types/trust-fence.d.ts +24 -0
  111. package/lib/types/wire.d.ts +38 -0
  112. package/package.json +173 -0
  113. package/scripts/install.ps1 +289 -0
  114. package/scripts/install.sh +287 -0
  115. package/src/agent-pty.ts +527 -0
  116. package/src/browser-probe.ts +26 -0
  117. package/src/bundle-route.ts +129 -0
  118. package/src/client/BrowserView.tsx +253 -0
  119. package/src/client/DiffTab.tsx +110 -0
  120. package/src/client/DiffView.tsx +305 -0
  121. package/src/client/EditorHost.tsx +525 -0
  122. package/src/client/FileTree.tsx +653 -0
  123. package/src/client/GitView.tsx +558 -0
  124. package/src/client/OrphanedTab.tsx +27 -0
  125. package/src/client/PdfView.tsx +110 -0
  126. package/src/client/RenderBoundary.tsx +49 -0
  127. package/src/client/SandboxStatusBar.tsx +60 -0
  128. package/src/client/SideCardSection.module.css +960 -0
  129. package/src/client/SideCardSection.tsx +1152 -0
  130. package/src/client/SideChatView.module.css +437 -0
  131. package/src/client/SideChatView.tsx +644 -0
  132. package/src/client/Sidebar.tsx +1148 -0
  133. package/src/client/SubagentView.module.css +547 -0
  134. package/src/client/SubagentView.tsx +883 -0
  135. package/src/client/TabBar.tsx +305 -0
  136. package/src/client/TerminalView.tsx +383 -0
  137. package/src/client/TextEditor.tsx +500 -0
  138. package/src/client/TreePanel.tsx +273 -0
  139. package/src/client/UploadOverlay.tsx +62 -0
  140. package/src/client/add-plugin-modal.tsx +199 -0
  141. package/src/client/api.ts +335 -0
  142. package/src/client/binary-download.tsx +23 -0
  143. package/src/client/breakpoints.ts +51 -0
  144. package/src/client/browser.ts +119 -0
  145. package/src/client/builtins/index.ts +37 -0
  146. package/src/client/builtins/tabs.tsx +331 -0
  147. package/src/client/builtins/viewers.tsx +125 -0
  148. package/src/client/chunk-loader.ts +351 -0
  149. package/src/client/chunks/editor.tsx +9 -0
  150. package/src/client/chunks/mermaid.tsx +10 -0
  151. package/src/client/chunks/terminal.tsx +9 -0
  152. package/src/client/cm-themes.ts +129 -0
  153. package/src/client/conversation-draft.ts +29 -0
  154. package/src/client/css-modules.d.ts +5 -0
  155. package/src/client/desktop-env.ts +72 -0
  156. package/src/client/editable-state.ts +70 -0
  157. package/src/client/editor-load.ts +92 -0
  158. package/src/client/frame-batcher.ts +56 -0
  159. package/src/client/icons.tsx +161 -0
  160. package/src/client/image-types.ts +8 -0
  161. package/src/client/ime-guard.ts +47 -0
  162. package/src/client/index.tsx +369 -0
  163. package/src/client/intercept.tsx +110 -0
  164. package/src/client/lang.ts +103 -0
  165. package/src/client/layout.css +94 -0
  166. package/src/client/lazy-chunk.tsx +89 -0
  167. package/src/client/link-intercept.ts +73 -0
  168. package/src/client/locales.ts +734 -0
  169. package/src/client/mermaid-blocks.ts +110 -0
  170. package/src/client/mermaid-sanitize.ts +93 -0
  171. package/src/client/mermaid.tsx +401 -0
  172. package/src/client/open-when-sized.ts +43 -0
  173. package/src/client/open-with-settings.tsx +135 -0
  174. package/src/client/open-with.ts +221 -0
  175. package/src/client/openpath-intercept.ts +62 -0
  176. package/src/client/paths.ts +47 -0
  177. package/src/client/pdf-types.ts +4 -0
  178. package/src/client/plugin-settings.ts +43 -0
  179. package/src/client/plugins-shared.ts +29 -0
  180. package/src/client/plugins-tabs.ts +87 -0
  181. package/src/client/plugins-viewers.ts +30 -0
  182. package/src/client/prefs.ts +207 -0
  183. package/src/client/produced-files.ts +91 -0
  184. package/src/client/selection-payload.ts +86 -0
  185. package/src/client/service.ts +838 -0
  186. package/src/client/settings-nav-icon.ts +45 -0
  187. package/src/client/shell-presets.ts +83 -0
  188. package/src/client/sidebar.module.css +2577 -0
  189. package/src/client/sidechat-transcript.ts +321 -0
  190. package/src/client/split-pane.tsx +322 -0
  191. package/src/client/state.ts +1175 -0
  192. package/src/client/subagent-detect.ts +137 -0
  193. package/src/client/subagent-jobs.ts +161 -0
  194. package/src/client/tab-content-memo.ts +46 -0
  195. package/src/client/terminal-font.ts +28 -0
  196. package/src/client/theme.ts +110 -0
  197. package/src/client/titlebar-strip.ts +37 -0
  198. package/src/client/upload.ts +187 -0
  199. package/src/client/wco.ts +120 -0
  200. package/src/config.ts +155 -0
  201. package/src/context-types.ts +610 -0
  202. package/src/fs-operations.ts +99 -0
  203. package/src/fs-search.ts +86 -0
  204. package/src/fs-tree.ts +158 -0
  205. package/src/git.ts +244 -0
  206. package/src/html-route.ts +106 -0
  207. package/src/index.ts +1132 -0
  208. package/src/invariant.ts +32 -0
  209. package/src/jobs-routes.ts +257 -0
  210. package/src/open-external.ts +90 -0
  211. package/src/prefs-shared.ts +268 -0
  212. package/src/pty-deps.ts +240 -0
  213. package/src/pty-manager.ts +376 -0
  214. package/src/sidechat-core.ts +468 -0
  215. package/src/sidechat-routes.ts +344 -0
  216. package/src/subagent-activity.ts +91 -0
  217. package/src/subagent-live-route.ts +93 -0
  218. package/src/tools.ts +479 -0
  219. package/src/trust-fence.ts +77 -0
  220. package/src/wire.ts +100 -0
@@ -0,0 +1,366 @@
1
+ /**
2
+ * Minimal zh/en copy for the sidebar. The copy follows the DSH i18n system:
3
+ * the client apply attaches the locale service (`ctx.locale`, provided by
4
+ * `@deepseek-ai/dsh-client-locale`) through {@link attachLocale}, and
5
+ * `t()`/`isZh()` resolve the active locale from it — the Host-backed
6
+ * `locale.preference` wins over the raw browser language and switches live.
7
+ * Without an attached service (standalone/test compositions) the browser
8
+ * language is used, matching the previous behavior. The dictionaries are
9
+ * also registered into the DSH locale registry under {@link LOCALE_NS}.
10
+ */
11
+ /** The zh dictionary (also registered into the DSH locale registry under {@link LOCALE_NS}). */
12
+ export declare const zh: {
13
+ files: string;
14
+ explorer: string;
15
+ git: string;
16
+ terminal: string;
17
+ editor: string;
18
+ editorExplorer: string;
19
+ editorExplorerDesc: string;
20
+ editorExplorerMerged: string;
21
+ editorExplorerMergedDesc: string;
22
+ editorExplorerSplit: string;
23
+ editorExplorerSplitDesc: string;
24
+ editorTreeToggle: string;
25
+ editorPathPlaceholder: string;
26
+ editorSearchPlaceholder: string;
27
+ editorSearchNoResults: string;
28
+ editorSearchTruncated: string;
29
+ editorEmptyHint: string;
30
+ openFileNewTab: string;
31
+ openFileSide: string;
32
+ openWithMenu: string;
33
+ openWithSshSuffix: string;
34
+ pinOpenWith: string;
35
+ unpinOpenWith: string;
36
+ openWithExplorer: string;
37
+ openWithVscode: string;
38
+ openWithCursor: string;
39
+ openWithZed: string;
40
+ openWithSettingsSshTitle: string;
41
+ openWithSettingsSshDesc: string;
42
+ openWithSettingsSshPlaceholder: string;
43
+ openWithSettingsCustomTitle: string;
44
+ openWithSettingsCustomDesc: string;
45
+ openWithSettingsAdd: string;
46
+ openWithSettingsName: string;
47
+ openWithSettingsTemplate: string;
48
+ openWithSettingsFamily: string;
49
+ openWithSettingsFamilyDesc: string;
50
+ openWithSettingsRemove: string;
51
+ openWithSettingsInvalidHint: string;
52
+ newTab: string;
53
+ openExplorer: string;
54
+ brokenSymlink: string;
55
+ openGit: string;
56
+ newTerminal: string;
57
+ terminalLimit: string;
58
+ close: string;
59
+ closeOtherTabs: string;
60
+ closeLeftTabs: string;
61
+ closeRightTabs: string;
62
+ collapse: string;
63
+ expand: string;
64
+ terminalError: string;
65
+ terminalConnectFailed: string;
66
+ terminalRetry: string;
67
+ terminalDepsFailed: string;
68
+ terminalDepsHint: string;
69
+ terminalDepsProfile: string;
70
+ preview: string;
71
+ edit: string;
72
+ mermaidError: string;
73
+ mermaidZoomIn: string;
74
+ mermaidZoomOut: string;
75
+ mermaidZoomReset: string;
76
+ mermaidZoomHint: string;
77
+ refresh: string;
78
+ save: string;
79
+ saved: string;
80
+ unsaved: string;
81
+ saveFailed: string;
82
+ readOnlyMode: string;
83
+ editableMode: string;
84
+ switchReadOnlyTitle: string;
85
+ switchEditableTitle: string;
86
+ truncation: string;
87
+ binary: string;
88
+ loading: string;
89
+ error: string;
90
+ retry: string;
91
+ splitLeft: string;
92
+ splitRight: string;
93
+ splitUp: string;
94
+ splitDown: string;
95
+ notRepo: string;
96
+ noChanges: string;
97
+ stage: string;
98
+ unstage: string;
99
+ stageAll: string;
100
+ unstageAll: string;
101
+ commitPlaceholder: string;
102
+ commit: string;
103
+ commitError: string;
104
+ branch: string;
105
+ checkoutError: string;
106
+ history: string;
107
+ changes: string;
108
+ staged: string;
109
+ unstaged: string;
110
+ cancel: string;
111
+ diffEmpty: string;
112
+ diffLoadError: string;
113
+ diffBinary: string;
114
+ diffAdded: string;
115
+ diffDeleted: string;
116
+ diffRenamed: string;
117
+ diffExpand: string;
118
+ diffCollapse: string;
119
+ discard: string;
120
+ discardTitle: string;
121
+ discardDesc: string;
122
+ viewCommitDiff: string;
123
+ copyShortHash: string;
124
+ copyFullHash: string;
125
+ copySubject: string;
126
+ revertCommit: string;
127
+ revertTitle: string;
128
+ revertDesc: string;
129
+ cherryPickCommit: string;
130
+ cherryPickTitle: string;
131
+ cherryPickDesc: string;
132
+ timeJustNow: string;
133
+ timeMinutesAgo: string;
134
+ timeHoursAgo: string;
135
+ timeYesterday: string;
136
+ loadMore: string;
137
+ historyLoadError: string;
138
+ produced: string;
139
+ producedOpen: string;
140
+ disconnected: string;
141
+ exited: string;
142
+ noSession: string;
143
+ pluginNotLoaded: string;
144
+ hiddenFiles: string;
145
+ parent: string;
146
+ copied: string;
147
+ copy: string;
148
+ newFile: string;
149
+ openEditor: string;
150
+ gitDetail: string;
151
+ referenceFile: string;
152
+ addToConversation: string;
153
+ copyRelative: string;
154
+ copyAbsolute: string;
155
+ download: string;
156
+ uploadFiles: string;
157
+ uploadFolder: string;
158
+ uploadHere: string;
159
+ uploadDropHint: string;
160
+ uploadDropChat: string;
161
+ uploadTo: string;
162
+ uploadingTo: string;
163
+ uploadProgress: string;
164
+ uploadDone: string;
165
+ uploadFailed: string;
166
+ uploadFailedUnknown: string;
167
+ uploadTooLarge: string;
168
+ uploadCancelled: string;
169
+ settingsNav: string;
170
+ settingsIntro: string;
171
+ settingsPopupDesc: string;
172
+ settingsDone: string;
173
+ settingsOpenTitle: string;
174
+ settingsOpenDesc: string;
175
+ settingsWidthTitle: string;
176
+ settingsWidthDesc: string;
177
+ settingsWidthSuffix: string;
178
+ settingsOpenPathTitle: string;
179
+ settingsOpenPathDesc: string;
180
+ settingsTitleBarTitle: string;
181
+ settingsTitleBarDesc: string;
182
+ settingsTitleBarStripTitle: string;
183
+ settingsTitleBarStripDesc: string;
184
+ settingsSchemeAutoTitle: string;
185
+ settingsSchemeAutoDesc: string;
186
+ settingsSchemeWebTitle: string;
187
+ settingsSchemeWebDesc: string;
188
+ settingsSchemeCustomTitle: string;
189
+ settingsSchemeCustomDesc: string;
190
+ settingsSchemeDetectedSuffix: string;
191
+ settingsCustomCssTitle: string;
192
+ settingsCustomCssDesc: string;
193
+ settingsCustomCssPlaceholder: string;
194
+ settingsSaveFailed: string;
195
+ settingsConflict: string;
196
+ binaryNoPreview: string;
197
+ downloadToView: string;
198
+ settingsSubagentTitle: string;
199
+ settingsSubagentDesc: string;
200
+ settingsJobsTitle: string;
201
+ settingsJobsDesc: string;
202
+ settingsToolsTitle: string;
203
+ settingsToolsDesc: string;
204
+ settingsFontFamilyTitle: string;
205
+ settingsFontFamilyDesc: string;
206
+ settingsFontFamilyPlaceholder: string;
207
+ settingsFontSizeTitle: string;
208
+ settingsFontSizeDesc: string;
209
+ settingsFontSizeSuffix: string;
210
+ settingsShellTitle: string;
211
+ settingsShellDesc: string;
212
+ settingsShellPlaceholder: string;
213
+ settingsShellArgsTitle: string;
214
+ settingsShellArgsDesc: string;
215
+ settingsShellArgsPlaceholder: string;
216
+ settingsTabsTitle: string;
217
+ settingsViewersTitle: string;
218
+ settingsGeneralTitle: string;
219
+ settingsPopup: string;
220
+ settingsViewerCatchAll: string;
221
+ viewerImage: string;
222
+ viewerPdf: string;
223
+ viewerMarkdown: string;
224
+ viewerCode: string;
225
+ viewerBinary: string;
226
+ viewerHtml: string;
227
+ browser: string;
228
+ browserPlaceholder: string;
229
+ browserGo: string;
230
+ browserBack: string;
231
+ browserForward: string;
232
+ browserStart: string;
233
+ browserBlockedScheme: string;
234
+ browserBlockedLoopback: string;
235
+ browserInvalid: string;
236
+ browserNoSandboxWarning: string;
237
+ htmlNoSandboxWarning: string;
238
+ sandboxStatusOn: string;
239
+ sandboxUnlock: string;
240
+ sandboxRestore: string;
241
+ settingsHtmlDefaultUnsafeTitle: string;
242
+ settingsHtmlDefaultUnsafeDesc: string;
243
+ settingsHtmlSandboxTitle: string;
244
+ settingsHtmlSandboxDesc: string;
245
+ settingsBrowserSandboxTitle: string;
246
+ settingsBrowserSandboxDesc: string;
247
+ settingsBrowserLinksTitle: string;
248
+ settingsBrowserLinksDesc: string;
249
+ settingsBrowserHttpTitle: string;
250
+ settingsBrowserHttpDesc: string;
251
+ settingsBrowserHttpsTitle: string;
252
+ settingsBrowserHttpsDesc: string;
253
+ browserOpenExternal: string;
254
+ browserEmbedBlocked: string;
255
+ browserEmbedBlockedDesc: string;
256
+ browserEmbedAnyway: string;
257
+ subagent: string;
258
+ openSubagent: string;
259
+ subagentMainAgent: string;
260
+ subagentEmpty: string;
261
+ subagentEmptyDesc: string;
262
+ subagentRunning: string;
263
+ subagentInactive: string;
264
+ subagentModeOneShot: string;
265
+ subagentModeContinuable: string;
266
+ subagentCount: string;
267
+ subagentCountRunning: string;
268
+ subagentDiagCorrupt: string;
269
+ subagentDiagUnsupported: string;
270
+ subagentDiagUnavailable: string;
271
+ subagentThinking: string;
272
+ sideChat: string;
273
+ sideChatNew: string;
274
+ sideChatUntitled: string;
275
+ sideChatEmpty: string;
276
+ sideChatEmptyDesc: string;
277
+ sideChatCreating: string;
278
+ sideChatRetry: string;
279
+ sideChatThreads: string;
280
+ sideChatSave: string;
281
+ sideChatSaveTitle: string;
282
+ sideChatSaved: string;
283
+ sideChatNoTurn: string;
284
+ sideChatPendingDrop: string;
285
+ sideChatFirstPlaceholder: string;
286
+ sideChatComposerPlaceholder: string;
287
+ sideChatThinking: string;
288
+ sideChatThink: string;
289
+ sideChatInjection: string;
290
+ sideChatSend: string;
291
+ sideChatCancel: string;
292
+ sideChatCancelTitle: string;
293
+ sideChatClose: string;
294
+ sideChatCloseTitle: string;
295
+ sideChatError: string;
296
+ jobs: string;
297
+ jobsCount: string;
298
+ jobsCountRunning: string;
299
+ jobStatusRunning: string;
300
+ jobStatusStopping: string;
301
+ jobStatusCompleted: string;
302
+ jobStatusKilled: string;
303
+ jobStatusFailed: string;
304
+ jobDurationSeconds: string;
305
+ jobDurationMinutes: string;
306
+ jobDurationHours: string;
307
+ jobViewOutput: string;
308
+ jobHideOutput: string;
309
+ jobNoOutput: string;
310
+ jobNotReadYet: string;
311
+ jobOutputTruncated: string;
312
+ jobOutputError: string;
313
+ jobKill: string;
314
+ jobKillConfirm: string;
315
+ jobKillError: string;
316
+ addPluginsTabCard: string;
317
+ addPluginsTabCardDesc: string;
318
+ addPluginsViewerCard: string;
319
+ addPluginsViewerCardDesc: string;
320
+ addPluginsTabDesc: string;
321
+ addPluginsViewerDesc: string;
322
+ addPluginsBrowseMore: string;
323
+ addPluginsSearch: string;
324
+ addPluginsNoMatch: string;
325
+ addPluginsRecommended: string;
326
+ addPluginsEmpty: string;
327
+ openPlugin: string;
328
+ copyInstall: string;
329
+ pluginOfficeDesc: string;
330
+ pluginFlowglassDesc: string;
331
+ pluginGitForgeDesc: string;
332
+ pluginGitRemotesDesc: string;
333
+ pluginSentinelDesc: string;
334
+ pluginSidebarQaDesc: string;
335
+ pluginSshTunnelDesc: string;
336
+ pluginTurnReviewDesc: string;
337
+ pluginVideoPreviewDesc: string;
338
+ pluginDocsPanelDesc: string;
339
+ };
340
+ /** The en dictionary (key-set-equal to zh, enforced by the type annotation). */
341
+ export declare const en: Record<keyof typeof zh, string>;
342
+ /**
343
+ * The dictionary namespace this plugin owns in the DSH locale registry
344
+ * (`'sidebar'` is taken by DSH's own ui-sidebar, hence this distinct name).
345
+ */
346
+ export declare const LOCALE_NS = "betterSidebar";
347
+ /**
348
+ * Attach (or detach, with undefined) the DSH locale service. The sidebar
349
+ * mounts its own React root outside the slot system's locale seat, so the
350
+ * service rides this module-level holder: components keep calling the plain
351
+ * `t()` function, and the Sidebar root's locale subscription re-renders the
352
+ * whole tree on switches.
353
+ */
354
+ export declare function attachLocale(service: {
355
+ getSnapshot(): {
356
+ active: string;
357
+ };
358
+ } | undefined): void;
359
+ /** Translate a copy key in the active locale (zh → zh, else en). */
360
+ export type CopyKey = keyof typeof zh;
361
+ /** Translate a copy key; `{name}` placeholders interpolate from `params`. */
362
+ export declare function t(key: CopyKey, params?: Record<string, string | number>): string;
363
+ /** Whether the active locale is Chinese (used for selectors). */
364
+ export declare function isZh(): boolean;
365
+ /** Format an ISO 8601 author date relative to now (刚刚 / N 分钟前 / N 小时前 / 昨天 / date). */
366
+ export declare function relativeTime(iso: string): string;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Markdown/mermaid fence detection for the markdown preview. The preview
3
+ * renders the WHOLE document through one DSH `MarkdownText` pass (so
4
+ * cross-fence semantics — reference-style links, footnotes, list
5
+ * continuity — stay intact) and the mermaid lazy chunk then swaps the
6
+ * rendered `language-mermaid` code blocks for diagrams. This module's pure
7
+ * splitter exists to detect whether the source contains a mermaid fence at
8
+ * all, so the mermaid chunk is only fetched when needed (unit-tested in
9
+ * tests/mermaid-blocks.spec.ts).
10
+ */
11
+ /** One fenced mermaid diagram lifted out of the markdown source. */
12
+ export interface MermaidBlock {
13
+ kind: 'mermaid';
14
+ /** The raw diagram source between the fences (info string stripped). */
15
+ code: string;
16
+ }
17
+ /** A span of plain markdown source (may itself contain non-mermaid fences). */
18
+ export interface MarkdownBlock {
19
+ kind: 'markdown';
20
+ text: string;
21
+ }
22
+ export type MdBlock = MarkdownBlock | MermaidBlock;
23
+ /** Props of the chunk-resident `MermaidMarkdown` component (shared contract). */
24
+ export interface MermaidMarkdownProps {
25
+ /** The full markdown source (rendered in a single MarkdownText pass). */
26
+ text: string;
27
+ codeLabels: {
28
+ copyLabel: string;
29
+ copiedLabel: string;
30
+ };
31
+ }
32
+ /**
33
+ * Split markdown source into md/mermaid blocks for detection: only fences
34
+ * whose info string names mermaid are lifted; every other line stays in the
35
+ * markdown stream untouched. CommonMark fence rules are honored — opening
36
+ * fences of 3+ backticks OR tildes, and a closing fence must use the same
37
+ * character with at least as many characters as the opening fence. An
38
+ * unterminated mermaid fence swallows the rest of the file (the same
39
+ * recovery CommonMark applies to open fences).
40
+ */
41
+ export declare function splitMermaidBlocks(text: string): MdBlock[];
@@ -0,0 +1,2 @@
1
+ /** A parse failure keeps nothing of the input: the caller shows the error. */
2
+ export declare function sanitizeSvg(svg: string): string;
@@ -0,0 +1,12 @@
1
+ import type { MermaidMarkdownProps } from './mermaid-blocks.ts';
2
+ /**
3
+ * The chunk-resident markdown preview renderer: ONE MarkdownText pass over
4
+ * the full source (cross-fence reference/footnote/list semantics intact),
5
+ * then every rendered `language-mermaid` code block is swapped for a
6
+ * `MermaidDiagram`. The `.md-code-block` host stays in the React tree —
7
+ * only its children are replaced — so reconciliation never loses the host;
8
+ * a block that stops being a mermaid fence gets its original children back.
9
+ * Only mounted when the source contains at least one mermaid fence (see
10
+ * TextEditor.tsx).
11
+ */
12
+ export declare function MermaidMarkdown({ text, codeLabels }: MermaidMarkdownProps): React.ReactNode;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Deferred one-shot open for hosts that may not have a real size yet.
3
+ *
4
+ * xterm's `Terminal.open()` must not run in a zero-size container: the
5
+ * renderer creation fails there (the DomRenderer is built from the host's
6
+ * dimensions), leaving the render service's renderer `undefined`, and the
7
+ * next Viewport refresh crashes reading `.dimensions` off it. WebKit-based
8
+ * hosts (WKWebView) reliably report zero while the bottom panel's expand
9
+ * slide is in flight; any `display:none`-hidden ancestor does the same.
10
+ *
11
+ * The caller's `open` callback (open + fit + resize) is invoked exactly
12
+ * once, on the first frame where the host reports a real size. While the
13
+ * host stays zero-sized the polling continues every frame; it stops when
14
+ * the host leaves the document (`isConnected`), so a pending open never
15
+ * fires after unmount. The returned cancel function drops a pending frame
16
+ * immediately (idempotent).
17
+ *
18
+ * `raf`/`caf` are injectable so tests can drive the polling deterministically.
19
+ */
20
+ export declare function openWhenSized(host: HTMLElement, open: () => void, raf?: (cb: FrameRequestCallback) => number, caf?: (id: number) => void): () => void;
@@ -0,0 +1,4 @@
1
+ export declare function OpenWithSettings(props: {
2
+ pluginSettings: Record<string, unknown>;
3
+ updatePluginSetting: (key: string, value: unknown) => void;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,87 @@
1
+ /**
2
+ * The file tree's "open with" vocabulary: which external editors / file
3
+ * managers the context menu can hand a row's path to, how the per-user
4
+ * configuration (custom editors, SSH host, pinned ids) is parsed out of the
5
+ * persisted blob, and how the external URL is built (local `file` URLs and
6
+ * VSCode-family SSH-remote URLs).
7
+ *
8
+ * Pure by design (no React / no `api`), so the whole surface is unit-testable
9
+ * without a DOM or a host route. The menu and the settings panel only consume
10
+ * the exported types and functions.
11
+ */
12
+ import type { CopyKey } from './locales.ts';
13
+ /** One user-configured editor (persisted in `pluginSettings['editor'].openWith`). */
14
+ export interface CustomEditor {
15
+ id: string;
16
+ /** Human label shown in the menu (e.g. "Windsurf"). */
17
+ name: string;
18
+ /** URL template with a `{path}` placeholder (e.g. `cursor://file/{path}`). */
19
+ urlTemplate: string;
20
+ /** Whether the editor speaks the VSCode URL dialect — the only editors
21
+ * with an SSH-remote form (`<scheme>://vscode-remote/ssh-remote+<host>/…`). */
22
+ isVscodeFamily: boolean;
23
+ }
24
+ /** The per-user "open with" configuration (one key of the editor blob). */
25
+ export interface OpenWithConfig {
26
+ /** SSH host (user@host or an ~/.ssh/config alias); '' = local workspace. */
27
+ sshHost: string;
28
+ /** User-defined editors, appended after the built-ins. */
29
+ customEditors: CustomEditor[];
30
+ /** Ids of open-with targets pinned to the menu's top level
31
+ * ('explorer' | 'vscode' | 'cursor' | 'zed' | 'custom:<id>'). */
32
+ pinned: string[];
33
+ }
34
+ /** One menu-visible open target (built-in or custom, SSH-filtered). */
35
+ export interface OpenWithTarget {
36
+ /** Stable id (`explorer` / `vscode` / `cursor` / `zed` / `custom:<id>`). */
37
+ id: string;
38
+ /** Locale key of a built-in label (custom editors carry `name` instead). */
39
+ nameKey?: CopyKey;
40
+ /** User-defined label (custom editors only; '' for built-ins). */
41
+ name: string;
42
+ /** 'reveal' = show in the OS file manager; 'url' = open a URL. */
43
+ kind: 'reveal' | 'url';
44
+ /** URL template with `{path}`; undefined for reveal targets. */
45
+ urlTemplate?: string;
46
+ /** Whether the editor talks the VSCode URL dialect. */
47
+ isVscodeFamily: boolean;
48
+ /** Hidden in SSH mode (a host-local opener cannot reach a remote path). */
49
+ localOnly: boolean;
50
+ }
51
+ /** The default open-with configuration (fresh documents). */
52
+ export declare const OPEN_WITH_DEFAULTS: OpenWithConfig;
53
+ /** The built-in open targets, in menu order. */
54
+ export declare const OPEN_WITH_BUILTINS: readonly OpenWithTarget[];
55
+ /**
56
+ * Parse the persisted `openWith` blob (tolerant): malformed fields fall back
57
+ * to the defaults, malformed custom-editor rows are dropped, and pinned ids
58
+ * are kept verbatim (unknown ids are pruned when the targets are resolved —
59
+ * the menu is the only consumer of the resolved list).
60
+ */
61
+ export declare function parseOpenWithConfig(raw: unknown): OpenWithConfig;
62
+ /**
63
+ * The menu-visible open targets, in order (built-ins then custom editors).
64
+ * In SSH mode the local-only targets (the OS file manager, Zed, custom
65
+ * editors without the VSCode dialect) are dropped — they cannot reach a
66
+ * remote path. Unknown pinned ids are pruned here too.
67
+ */
68
+ export declare function resolveOpenWithTargets(config: OpenWithConfig): OpenWithTarget[];
69
+ /** The SSH hint appended to a target's label in remote mode. */
70
+ export declare function openWithSshActive(config: OpenWithConfig): boolean;
71
+ /**
72
+ * The URL to open for one resolved target, or undefined when the target has
73
+ * no URL form (reveal) or the template is malformed. The path is inserted
74
+ * RAW into the template (browsers percent-encode as needed; VSCode-family
75
+ * URL parsers consume the absolute path with its leading slash, e.g.
76
+ * `vscode://file//home/u/f.ts` or `vscode://file/C:/Users/u/f.ts`).
77
+ */
78
+ export declare function openWithUrl(target: OpenWithTarget, path: string, config: OpenWithConfig): string | undefined;
79
+ /** Normalize a filesystem path for embedding in a URL (backslashes → '/'). */
80
+ export declare function normalizeUrlPath(path: string): string;
81
+ /** A fresh custom-editor id (uuid when available, time-based fallback). */
82
+ export declare function newCustomEditorId(): string;
83
+ /** Validate one custom-editor row before the settings panel accepts it. */
84
+ export declare function isValidCustomEditor(row: {
85
+ name: string;
86
+ urlTemplate: string;
87
+ }): boolean;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Interception of the chat's file-open funnel. The client runtime's
3
+ * `ctx.workspaces.openPath` is the SINGLE door every chat-side file open goes
4
+ * through — ui-conversation's apply.ts resolves the path against the session
5
+ * cwd and calls it for tool-row path links, the produced-files row, and
6
+ * prose file mentions alike (verified against the DSH source:
7
+ * `packages/client/ui-conversation/src/client/apply.ts` is the only
8
+ * production caller). Wrapping that one method reroutes those opens into the
9
+ * sidebar editor instead of the Host OS — no DSH modification needed.
10
+ *
11
+ * The wrapper is dependency-free by design (no React / ui-primitives), so
12
+ * the takeover logic is unit-testable and the file stays importable from the
13
+ * test runtime.
14
+ */
15
+ /** The one service method the wrapper replaces (mirror of the runtime IWorkspaces). */
16
+ export interface OpenPathService {
17
+ openPath(path: string): Promise<void>;
18
+ }
19
+ /** Per-call decisions the wrapper needs (wired to the store + ctx in the client half). */
20
+ export interface OpenPathInterceptDeps {
21
+ /**
22
+ * Whether to take over this call: the `interceptOpenPath` pref AND the
23
+ * editor tab's own enable switch must both be on (an editor that cannot
24
+ * open must not swallow opens — they fall through to the Host).
25
+ */
26
+ takeoverEnabled(): boolean;
27
+ /** The session whose scope the sidebar editor loads the file in (current session). */
28
+ currentSessionId(): string | undefined;
29
+ /** Route the open into the sidebar editor (the established openSidebarFile). */
30
+ openInSidebar(path: string, sessionId: string): void;
31
+ }
32
+ /**
33
+ * Wrap `workspaces.openPath`: intercepted calls open the file in the sidebar
34
+ * editor instead of the Host OS and resolve as success (the original's
35
+ * callers ignore the result); anything that declines falls through to the
36
+ * original method untouched.
37
+ * @param workspaces - the client workspaces service to wrap.
38
+ * @param deps - per-call takeover decisions.
39
+ * @returns the disposer restoring the original method (HMR-safe).
40
+ */
41
+ export declare function wrapOpenPath(workspaces: OpenPathService, deps: OpenPathInterceptDeps): () => void;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Path projection helpers shared by the explorer rows: a path relative to
3
+ * the session cwd (for the @-reference button and "copy relative path").
4
+ * The fs-tree joins with '/' even on Windows, so both separators normalize
5
+ * to '/' before comparison.
6
+ *
7
+ * This module is dependency-free (no node:path in the client bundle): the
8
+ * host is the authority for path semantics, so this mirror deliberately
9
+ * accepts a SUPERSET of absolute forms — anything a Windows host would emit
10
+ * (drive letters, UNC) plus POSIX roots. A form the host would reject
11
+ * (e.g. a backslash UNC path on a POSIX host) passes through here and then
12
+ * fails loudly in the host's requireAbsolute instead of being silently
13
+ * joined onto the cwd.
14
+ */
15
+ /**
16
+ * Mirror of the host's absolute-path notion (see fs-tree.requireAbsolute):
17
+ * POSIX roots, Windows drive letters, and Windows UNC network shares in
18
+ * both backslash (`\\server\share\...`) and forward-slash
19
+ * (`//server/share/...`) form. Deliberately a superset — see the module
20
+ * comment — so a produced UNC path is never joined onto the cwd.
21
+ */
22
+ export declare function isAbsolutePath(path: string): boolean;
23
+ /**
24
+ * The path relative to the session's working directory.
25
+ * @param cwd - the explorer root (absolute).
26
+ * @param path - an absolute entry path from the fs-tree.
27
+ * @returns the relative path with '/' separators ('.' for the cwd itself),
28
+ * or `path` unchanged when it lies outside the cwd.
29
+ *
30
+ * The prefix test is case-insensitive: Windows paths (and macOS's
31
+ * case-insensitive volumes) may arrive with different casing than the cwd
32
+ * row, and the containment decision must not depend on it. The returned
33
+ * relative text keeps the caller's own casing.
34
+ */
35
+ export declare function relativeTo(cwd: string, path: string): string;
@@ -0,0 +1,2 @@
1
+ /** Pure PDF extension dispatch, separate from React for unit testing. */
2
+ export declare function isPdfExt(ext: string): boolean;
@@ -0,0 +1,8 @@
1
+ import type { SidebarStore } from './state.ts';
2
+ /**
3
+ * Merge one plugin-owned settings blob of one descriptor and persist it.
4
+ * @param store - the sidebar store (its prefs are replaced by the write result).
5
+ * @param descriptorId - the descriptor whose blob is patched ('editor' here).
6
+ * @param updater - pure patch function; receives a shallow copy of the blob.
7
+ */
8
+ export declare function updatePluginSettings(store: SidebarStore, descriptorId: string, updater: (blob: Record<string, unknown>) => Record<string, unknown>): void;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Shared vocabulary of the recommended plugin catalogs: the entry shape and
3
+ * the GitHub topic URL. The two catalogs live in sibling modules —
4
+ * `plugins-tabs.ts` (tab registrations) and `plugins-viewers.ts` (file
5
+ * previewer registrations) — and are shown in the two "add plugin" modals
6
+ * (Side card settings → the dashed cards at the end of the 侧边栏内容 /
7
+ * 文件预览 grids).
8
+ */
9
+ /** The GitHub topic page listing every repo tagged `dsh-better-sidebar`. */
10
+ export declare const PLUGIN_TOPIC_URL = "https://github.com/topics/dsh-better-sidebar";
11
+ /** One curated plugin entry (name / url / description / install script). */
12
+ export interface PluginEntry {
13
+ /** Unique id (the npm package name). */
14
+ id: string;
15
+ /** Short display name. */
16
+ name: string;
17
+ /** GitHub repository URL. */
18
+ url: string;
19
+ /** One-line description (i18n friendly: string or () => string). */
20
+ description: string | (() => string);
21
+ /** Optional catalog group heading (i18n friendly); entries without one
22
+ * render under the plain list (a flat catalog stays flat). */
23
+ category?: string | (() => string);
24
+ /** The full shell command pre-filled into the install terminal (not
25
+ * executed until the user presses Enter). */
26
+ install: string;
27
+ }
@@ -0,0 +1,3 @@
1
+ import type { PluginEntry } from './plugins-shared.ts';
2
+ /** Tab-registration plugins (alphabetical order). */
3
+ export declare const builtinTabPlugins: readonly PluginEntry[];
@@ -0,0 +1,3 @@
1
+ import type { PluginEntry } from './plugins-shared.ts';
2
+ /** File-previewer plugins (alphabetical order). */
3
+ export declare const builtinViewerPlugins: readonly PluginEntry[];