@openviking/react 0.1.2 → 0.1.4

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 (249) hide show
  1. package/LICENSE.arco-design +21 -0
  2. package/README.md +25 -15
  3. package/dist/0~0.js +19 -0
  4. package/dist/2~0.js +2360 -0
  5. package/dist/2~0.js.LICENSE.txt +23 -0
  6. package/dist/3c~0.js +2206 -0
  7. package/dist/3~0.js +1205 -1982
  8. package/dist/4~0.js +18 -0
  9. package/dist/9~0.js +43 -0
  10. package/dist/ae~0.js +487 -0
  11. package/dist/ark-message-list-view~0.js +530 -119
  12. package/dist/a~0.js +1289 -10
  13. package/dist/c7~0.js +38 -2
  14. package/dist/ck~0.js +23 -0
  15. package/dist/client/index.d.ts +2 -1
  16. package/dist/client/paths.d.ts +64 -0
  17. package/dist/client/provider.d.ts +5 -3
  18. package/dist/client/response.d.ts +31 -0
  19. package/dist/client/sse.d.ts +39 -0
  20. package/dist/client/stream.d.ts +26 -0
  21. package/dist/client/types.d.ts +109 -5
  22. package/dist/client.js +2 -239
  23. package/dist/components/agent-connect/agent-connect-copy.d.ts +19 -33
  24. package/dist/components/agent-connect/agent-connect-design.d.ts +1935 -167
  25. package/dist/components/agent-connect/agent-connect-instructions.d.ts +135 -0
  26. package/dist/components/agent-connect/locales/en-US.d.ts +20 -0
  27. package/dist/components/agent-connect/locales/zh-CN.d.ts +3 -0
  28. package/dist/components/agent-connect/style.css +14 -2
  29. package/dist/components/agent-connect/types.d.ts +2 -1
  30. package/dist/components/directory-tour/directory-tour.d.ts +3 -0
  31. package/dist/components/directory-tour/index.d.ts +3 -0
  32. package/dist/components/directory-tour/locales/en-US.d.ts +3 -0
  33. package/dist/components/directory-tour/locales/zh-CN.d.ts +3 -0
  34. package/dist/components/directory-tour/steps.d.ts +5 -0
  35. package/dist/components/directory-tour/style.css +237 -0
  36. package/dist/components/directory-tour/style.js +0 -0
  37. package/dist/components/directory-tour/types.d.ts +42 -0
  38. package/dist/components/directory-tour/use-tour-anchor.d.ts +5 -0
  39. package/dist/components/directory-tour/use-tour-position.d.ts +12 -0
  40. package/dist/components/directory-tour.js +40 -0
  41. package/dist/components/file-browser-entries/file-browser-entries-icons.d.ts +18 -0
  42. package/dist/components/file-browser-entries/file-browser-entries.d.ts +14 -0
  43. package/dist/components/file-browser-entries/index.d.ts +1 -0
  44. package/dist/components/file-browser-entries/labels.d.ts +3 -0
  45. package/dist/components/file-browser-entries/locales/en-US.d.ts +6 -0
  46. package/dist/components/file-browser-entries/locales/zh-CN.d.ts +6 -0
  47. package/dist/components/file-browser-entries/style.css +905 -0
  48. package/dist/components/file-browser-entries/style.js +0 -0
  49. package/dist/components/file-browser-entries/types.d.ts +63 -0
  50. package/dist/components/file-browser-entries.js +1 -0
  51. package/dist/components/file-preview/file-preview-adapters.d.ts +2 -1
  52. package/dist/components/file-preview/file-preview-body.d.ts +2 -1
  53. package/dist/components/file-preview/file-preview-breadcrumb-menu.d.ts +2 -1
  54. package/dist/components/file-preview/file-preview-breadcrumb.d.ts +2 -1
  55. package/dist/components/file-preview/file-preview-directory.d.ts +33 -0
  56. package/dist/components/file-preview/file-preview-handle-adapters.d.ts +2 -1
  57. package/dist/components/file-preview/file-preview-header.d.ts +25 -3
  58. package/dist/components/file-preview/file-preview-image-frame.d.ts +5 -0
  59. package/dist/components/file-preview/file-preview-labels.d.ts +2 -14
  60. package/dist/components/file-preview/file-preview-level-tabs.d.ts +7 -0
  61. package/dist/components/file-preview/file-preview-markdown-images.d.ts +13 -0
  62. package/dist/components/file-preview/file-preview-panels.d.ts +44 -0
  63. package/dist/components/file-preview/file-preview-state.d.ts +10 -3
  64. package/dist/components/file-preview/file-preview-viewer.d.ts +2 -1
  65. package/dist/components/file-preview/file-preview.d.ts +1 -1
  66. package/dist/components/file-preview/index.d.ts +2 -1
  67. package/dist/components/file-preview/level-selection.d.ts +25 -0
  68. package/dist/components/file-preview/locales/en-US.d.ts +16 -0
  69. package/dist/components/file-preview/locales/zh-CN.d.ts +16 -0
  70. package/dist/components/file-preview/style.css +234 -3
  71. package/dist/components/file-preview/types.d.ts +134 -11
  72. package/dist/components/file-preview/use-directory-level.d.ts +30 -0
  73. package/dist/components/file-preview/use-file-preview-actions-context.d.ts +6 -2
  74. package/dist/components/file-preview/use-file-preview-actions.d.ts +1 -1
  75. package/dist/components/file-preview/use-file-preview-levels.d.ts +7 -0
  76. package/dist/components/file-preview/use-file-preview-view-state.d.ts +15 -0
  77. package/dist/components/file-preview.js +1 -1
  78. package/dist/components/file-tree/file-tree-info-labels.d.ts +0 -15
  79. package/dist/components/file-tree/file-tree-info-tooltip.d.ts +7 -7
  80. package/dist/components/file-tree/file-tree-labels.d.ts +4 -0
  81. package/dist/components/file-tree/file-tree-row-context.d.ts +0 -5
  82. package/dist/components/file-tree/file-tree-row-shared.d.ts +1 -4
  83. package/dist/components/file-tree/file-tree-toolbar.d.ts +11 -0
  84. package/dist/components/file-tree/file-tree-tooltip-surface.d.ts +8 -8
  85. package/dist/components/file-tree/locales/en-US.d.ts +69 -0
  86. package/dist/components/file-tree/locales/zh-CN.d.ts +69 -0
  87. package/dist/components/file-tree/style.css +207 -42
  88. package/dist/components/file-tree/types.d.ts +58 -10
  89. package/dist/components/file-tree/use-file-tree-actions.d.ts +4 -1
  90. package/dist/components/scope-switcher/labels.d.ts +3 -0
  91. package/dist/components/scope-switcher/locales/en-US.d.ts +8 -0
  92. package/dist/components/scope-switcher/locales/zh-CN.d.ts +8 -0
  93. package/dist/components/scope-switcher/scope-panel.d.ts +1 -1
  94. package/dist/components/scope-switcher/scope-switcher.d.ts +1 -1
  95. package/dist/components/scope-switcher/style.css +14 -2
  96. package/dist/components/scope-switcher/types.d.ts +11 -5
  97. package/dist/components/style.css +10144 -6840
  98. package/dist/components/tui/locales/en-US.d.ts +35 -0
  99. package/dist/components/tui/locales/zh-CN.d.ts +35 -0
  100. package/dist/components/tui/style.css +310 -18
  101. package/dist/components/tui/tui-copy-button.d.ts +1 -1
  102. package/dist/components/tui/tui-empty.d.ts +25 -0
  103. package/dist/components/tui/tui-labels.d.ts +2 -2
  104. package/dist/components/tui/tui.d.ts +1 -1
  105. package/dist/components/tui/types.d.ts +35 -12
  106. package/dist/components/tui.js +1 -1
  107. package/dist/components/viking-bot/ark-adapter.d.ts +2 -0
  108. package/dist/components/viking-bot/ark-message-body.d.ts +1 -7
  109. package/dist/components/viking-bot/ark-message-list-view.d.ts +1 -1
  110. package/dist/components/viking-bot/ark-message-row.d.ts +3 -1
  111. package/dist/components/viking-bot/bot-popover.d.ts +9 -0
  112. package/dist/components/viking-bot/capabilities.d.ts +49 -0
  113. package/dist/components/viking-bot/composer-attachments.d.ts +13 -0
  114. package/dist/components/viking-bot/composer-controls.d.ts +10 -0
  115. package/dist/components/viking-bot/composer-footer.d.ts +17 -0
  116. package/dist/components/viking-bot/composer-references.d.ts +20 -0
  117. package/dist/components/viking-bot/composer-text.d.ts +10 -0
  118. package/dist/components/viking-bot/index.d.ts +3 -1
  119. package/dist/components/viking-bot/interaction/ask-human-fields.d.ts +1 -1
  120. package/dist/components/viking-bot/interaction/labels.d.ts +2 -1
  121. package/dist/components/viking-bot/interaction/locales/en-US.d.ts +17 -0
  122. package/dist/components/viking-bot/interaction/locales/zh-CN.d.ts +17 -0
  123. package/dist/components/viking-bot/interaction/types.d.ts +8 -3
  124. package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +1 -1
  125. package/dist/components/viking-bot/labels.d.ts +2 -0
  126. package/dist/components/viking-bot/locales/en-US.d.ts +40 -0
  127. package/dist/components/viking-bot/locales/zh-CN.d.ts +40 -0
  128. package/dist/components/viking-bot/markdown-links.d.ts +27 -0
  129. package/dist/components/viking-bot/message-activity.d.ts +7 -0
  130. package/dist/components/viking-bot/message-code-block.d.ts +8 -0
  131. package/dist/components/viking-bot/message-footer.d.ts +8 -0
  132. package/dist/components/viking-bot/message-markdown.d.ts +9 -0
  133. package/dist/components/viking-bot/model.d.ts +37 -3
  134. package/dist/components/viking-bot/quick-input-tracker.d.ts +16 -0
  135. package/dist/components/viking-bot/quick-inputs.d.ts +6 -0
  136. package/dist/components/viking-bot/reference-picker.d.ts +16 -0
  137. package/dist/components/viking-bot/session-actions.d.ts +11 -0
  138. package/dist/components/viking-bot/style.css +1486 -48
  139. package/dist/components/viking-bot/tool-activity.d.ts +9 -0
  140. package/dist/components/viking-bot/tool-result-links.d.ts +6 -0
  141. package/dist/components/viking-bot/types.d.ts +21 -9
  142. package/dist/components/viking-bot/use-quick-input.d.ts +17 -0
  143. package/dist/components/viking-bot/viking-bot.d.ts +1 -6
  144. package/dist/components/viking-bot/welcome.d.ts +8 -0
  145. package/dist/components/viking-bot.js +1 -1
  146. package/dist/c~0.js +533 -66
  147. package/dist/e~0.js +333 -0
  148. package/dist/file-preview-viewer~0.js +90 -8
  149. package/dist/f~0.js +39 -47
  150. package/dist/h~0.js +5 -1
  151. package/dist/icons/console-icons.d.ts +12 -0
  152. package/dist/icons/index.d.ts +2 -0
  153. package/dist/icons/viking-bot-icons.d.ts +6 -0
  154. package/dist/icons.js +1 -0
  155. package/dist/index.d.ts +4 -0
  156. package/dist/index.js +3 -1
  157. package/dist/k~0.js +1 -0
  158. package/dist/lg~0.js +155 -0
  159. package/dist/lk~0.js +37 -8
  160. package/dist/l~0.js +1447 -25
  161. package/dist/modules/console/command-messages.d.ts +19 -0
  162. package/dist/modules/console/command-parser.d.ts +15 -0
  163. package/dist/modules/console/command-specs.d.ts +15 -0
  164. package/dist/modules/console/commands.d.ts +6 -0
  165. package/dist/modules/console/console-history.d.ts +10 -0
  166. package/dist/modules/console/console-toolbar.d.ts +18 -0
  167. package/dist/modules/console/console.d.ts +1 -3
  168. package/dist/modules/console/controller.d.ts +17 -0
  169. package/dist/modules/console/index.d.ts +2 -0
  170. package/dist/modules/console/labels.d.ts +61 -0
  171. package/dist/modules/console/locales/en-US.d.ts +49 -0
  172. package/dist/modules/console/locales/zh-CN.d.ts +3 -0
  173. package/dist/modules/console/localize-records.d.ts +11 -0
  174. package/dist/modules/console/results.d.ts +2 -0
  175. package/dist/modules/console/style.css +10905 -15
  176. package/dist/modules/console/types.d.ts +59 -80
  177. package/dist/modules/console/use-console.d.ts +3 -0
  178. package/dist/modules/console.js +1 -1
  179. package/dist/modules/file-browser/file-browser-detail-icons.d.ts +10 -0
  180. package/dist/modules/file-browser/file-browser-detail.d.ts +34 -0
  181. package/dist/modules/file-browser/file-browser-empty.d.ts +3 -0
  182. package/dist/modules/file-browser/file-browser-failure.d.ts +22 -0
  183. package/dist/modules/file-browser/file-browser-icons.d.ts +18 -0
  184. package/dist/modules/file-browser/file-browser-labels.d.ts +27 -0
  185. package/dist/modules/file-browser/file-browser-layout.d.ts +27 -0
  186. package/dist/modules/file-browser/file-browser-toolbar.d.ts +17 -0
  187. package/dist/modules/file-browser/file-browser-tree-pane.d.ts +32 -0
  188. package/dist/modules/file-browser/file-browser.d.ts +14 -5
  189. package/dist/modules/file-browser/find-result.d.ts +24 -0
  190. package/dist/modules/file-browser/fs-directories.d.ts +33 -0
  191. package/dist/modules/file-browser/fs-file-kind.d.ts +19 -0
  192. package/dist/modules/file-browser/fs-icon.d.ts +17 -0
  193. package/dist/modules/file-browser/fs-model.d.ts +106 -0
  194. package/dist/modules/file-browser/fs-page.d.ts +16 -0
  195. package/dist/modules/file-browser/fs-path.d.ts +16 -0
  196. package/dist/modules/file-browser/fs-read-directory.d.ts +16 -0
  197. package/dist/modules/file-browser/fs-scope.d.ts +22 -0
  198. package/dist/modules/file-browser/fs-stat.d.ts +25 -0
  199. package/dist/modules/file-browser/index.d.ts +3 -1
  200. package/dist/modules/file-browser/locales/en-US.d.ts +25 -0
  201. package/dist/modules/file-browser/locales/zh-CN.d.ts +25 -0
  202. package/dist/modules/file-browser/style.css +6388 -41
  203. package/dist/modules/file-browser/types.d.ts +206 -52
  204. package/dist/modules/file-browser/use-container-width.d.ts +17 -0
  205. package/dist/modules/file-browser/use-file-browser.d.ts +54 -0
  206. package/dist/modules/file-browser/use-fs-preview.d.ts +65 -0
  207. package/dist/modules/file-browser/use-fs-search.d.ts +35 -0
  208. package/dist/modules/file-browser/use-fs-tree.d.ts +43 -0
  209. package/dist/modules/file-browser/use-request-scope.d.ts +39 -0
  210. package/dist/modules/file-browser.js +1 -1
  211. package/dist/modules/scope-cascade/labels.d.ts +6 -0
  212. package/dist/modules/scope-cascade/locales/en-US.d.ts +6 -0
  213. package/dist/modules/scope-cascade/locales/zh-CN.d.ts +3 -0
  214. package/dist/modules/scope-cascade/scope-cascade.d.ts +1 -1
  215. package/dist/modules/scope-cascade/style.css +14 -2
  216. package/dist/modules/scope-cascade/types.d.ts +3 -0
  217. package/dist/modules/style.css +17338 -77
  218. package/dist/nx~0.js +15 -0
  219. package/dist/n~0.js +403 -144
  220. package/dist/o~0.js +106 -0
  221. package/dist/p~0.js +27 -0
  222. package/dist/rslib-runtime~0.js +42 -0
  223. package/dist/r~0.js +152 -0
  224. package/dist/shared/components/divider/divider.d.ts +18 -0
  225. package/dist/shared/components/divider/index.d.ts +1 -0
  226. package/dist/shared/components/divider/types.d.ts +35 -0
  227. package/dist/shared/components/drawer/drawer.d.ts +13 -0
  228. package/dist/shared/components/drawer/index.d.ts +1 -0
  229. package/dist/shared/components/overlay/types.d.ts +7 -0
  230. package/dist/shared/components/{tooltip/use-tooltip-position.d.ts → overlay/use-overlay-position.d.ts} +6 -6
  231. package/dist/shared/components/popover/index.d.ts +1 -0
  232. package/dist/shared/components/popover/popover.d.ts +23 -0
  233. package/dist/shared/components/popover/types.d.ts +50 -0
  234. package/dist/shared/components/resizable/clamp.d.ts +13 -0
  235. package/dist/shared/components/resizable/index.d.ts +2 -0
  236. package/dist/shared/components/resizable/resizable-handle.d.ts +25 -0
  237. package/dist/shared/components/resizable/types.d.ts +48 -0
  238. package/dist/shared/components/tooltip/types.d.ts +5 -5
  239. package/dist/shared/components/tooltip/use-portal-theme.d.ts +3 -0
  240. package/dist/shared/locale.d.ts +6 -0
  241. package/dist/style.css +27753 -7176
  242. package/dist/u~0.js +75 -58
  243. package/dist/viking-bot-composer~0.js +434 -77
  244. package/dist/viking-bot-interaction~0.js +11 -11
  245. package/package.json +18 -4
  246. package/dist/components/file-tree/file-tree-tooltip.d.ts +0 -17
  247. package/dist/components/tui/tui-labels-zh.d.ts +0 -2
  248. package/dist/g~0.js +0 -1207
  249. package/dist/modules/file-browser/file-browser-toolbar-button.d.ts +0 -10
@@ -1,101 +1,80 @@
1
- import type { OvRequestOptions } from '../../client/index.js';
1
+ import type { Locale } from '../../shared/locale.js';
2
2
  import type { HTMLAttributes, ReactNode } from 'react';
3
- /**
4
- * 面板模式。对话与命令共用同一面板,切换时各自保留状态。
5
- * Panel mode. Conversation and commands share one panel, each keeping its own
6
- * state when the mode switches.
7
- */
3
+ import type { OvRequestOptions } from '../../client/types.js';
4
+ import type { TuiCommandDefinition, TuiLabels, TuiRecord } from '../../components/tui/index.js';
5
+ import type { VikingBotLabels, VikingBotProps } from '../../components/viking-bot/index.js';
8
6
  export type ConsoleMode = 'conversation' | 'command';
9
- /** 交互面板模块的插槽。Slots of the console module. */
10
7
  export interface ConsoleSlots {
11
- /**
12
- * 面板顶部工具栏。模式切换由模块渲染,这里放宿主专属入口。
13
- * Panel toolbar. The module renders the mode switch; put host-specific
14
- * entries here.
15
- */
16
8
  toolbar?: ReactNode;
17
- /**
18
- * 对话模式下输入区上方的附加内容,例如当前资源上下文。
19
- * Extra content above the composer in conversation mode, for example the
20
- * current resource context.
21
- */
22
9
  conversationContext?: ReactNode;
23
- /**
24
- * 命令模式下的命令帮助内容。省略时由模块按宿主声明的命令生成。
25
- * Command help in command mode. When omitted, the module derives it from the
26
- * commands the host declares.
27
- */
28
10
  commandHelp?: ReactNode;
29
11
  }
30
- /** 交互面板模块的可替换文案。Replaceable copy of the console module. */
31
12
  export interface ConsoleLabels {
32
- /**
33
- * 占位说明。缺省为 `Placeholder. Functionality is not available yet.`。
34
- * Placeholder description. Defaults to "Placeholder. Functionality is not
35
- * available yet.".
36
- */
13
+ /** Conversation welcome description. */
37
14
  description?: string;
38
- /** 对话模式名称。Conversation mode label. */
39
15
  conversation?: string;
40
- /** 命令模式名称。Command mode label. */
41
16
  command?: string;
42
- /** 会话加载失败提示。Session load failure message. */
43
- error?: string;
44
- /** 重试按钮文案。Retry button label. */
45
- retry?: string;
17
+ clear?: string;
18
+ history?: string;
19
+ emptyHistory?: string;
20
+ /** 终端空态标题,转交 Tui 的 `emptyTitle`。Terminal empty-state heading, mapped to Tui `emptyTitle`. */
21
+ commandTitle?: string;
22
+ /** 终端空态说明,转交 Tui 的 `emptyDescription`。Terminal empty-state description, mapped to Tui `emptyDescription`. */
23
+ commandDescription?: string;
24
+ /** 快捷命令引导文案,转交 Tui 的 `quickStart`。Quick-command label, mapped to Tui `quickStart`. */
25
+ quickStart?: string;
26
+ mode?: string;
27
+ tui?: TuiLabels;
28
+ vikingBot?: VikingBotLabels;
46
29
  }
47
- /**
48
- * 交互面板模块的属性。
49
- *
50
- * 模块自己通过 Hook 取数,props 里没有会话与命令记录:宿主给配置、受控模式、
51
- * 插槽与文案。打开资源通过回调交给宿主,与文件浏览模块的联动不依赖对方的私有
52
- * 状态。
53
- *
54
- * Props of the console module.
55
- *
56
- * The module loads its own data through a Hook, so no prop carries sessions or
57
- * command records: the host supplies configuration, the controlled mode, slots
58
- * and copy. Opening a resource goes back to the host through a callback, and
59
- * coordination with the file browser never reaches into the other module's
60
- * private state.
61
- */
62
- export interface ConsoleProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect' | 'children'> {
63
- /**
64
- * 受控的当前模式。传入时由宿主决定模式,模块只上报切换意图。
65
- * The controlled mode. When given, the host owns the mode and the module only
66
- * reports switch intent.
67
- */
30
+ /** Options shared by Console and useConsole. */
31
+ export interface ConsoleOptions {
32
+ locale?: Locale;
68
33
  mode?: ConsoleMode;
69
- /**
70
- * 非受控时的初始模式,缺省为 `conversation`。
71
- * Initial mode when uncontrolled; defaults to `conversation`.
72
- */
34
+ /** Initial uncontrolled mode. Defaults to VikingBot ('conversation'). */
73
35
  defaultMode?: ConsoleMode;
74
- /**
75
- * 模式变化后触发。
76
- * Called after the mode changes.
77
- */
36
+ /** Change with the identity when using dynamic credential/identity functions. */
37
+ scopeKey?: string;
78
38
  onModeChange?: (mode: ConsoleMode) => void;
39
+ requestOptions?: OvRequestOptions;
40
+ }
41
+ export interface ConsoleProps extends ConsoleOptions, Omit<HTMLAttributes<HTMLDivElement>, 'onSelect' | 'children'> {
42
+ /** 内置中英文文案的语言。Language of the built-in interface copy. */
43
+ locale: Locale;
79
44
  /**
80
- * 资源成功打开后触发,参数为资源 URI;失败时不触发。
81
- * Called after a resource opens successfully, with its URI; not called on
82
- * failure.
45
+ * 终端空态展示的快捷命令名称,按数组顺序取自命令目录,未命中的名称跳过,
46
+ * 重复名称只保留首次出现。
47
+ * 省略时使用默认集合;传空数组不展示内置空态。
48
+ * Quick command names shown in the terminal empty state, resolved from the
49
+ * command catalogue in array order with unknown names skipped. Omitted uses
50
+ * the default set; an empty array shows no built-in empty state.
83
51
  */
52
+ quickCommands?: readonly string[];
53
+ /** Host-owned conversation state/capabilities. Omit draft callbacks to use Console's local draft. */
54
+ conversation?: Partial<VikingBotProps>;
55
+ /** Reports navigation intent; the host opens the resource. */
84
56
  onOpenUri?: (uri: string) => void;
85
- /**
86
- * 插槽,见 {@link ConsoleSlots}。
87
- * Slots, see {@link ConsoleSlots}.
88
- */
89
57
  slots?: ConsoleSlots;
90
- /**
91
- * 可替换文案,缺省为英文。
92
- * Replaceable copy; English by default.
93
- */
94
58
  labels?: ConsoleLabels;
95
- /**
96
- * 请求配置覆盖,逐字段覆盖最近的 Provider。
97
- * Request configuration override, applied field by field over the nearest
98
- * Provider.
99
- */
100
- requestOptions?: OvRequestOptions;
59
+ }
60
+ /** Local state. Records and drafts are never persisted by the module. */
61
+ export interface ConsoleState {
62
+ records: readonly TuiRecord[];
63
+ command: string;
64
+ conversationDraft: string;
65
+ isExecuting: boolean;
66
+ error?: unknown;
67
+ failedCommand?: string;
68
+ }
69
+ /** Data and operations available independently of Console's view. */
70
+ export interface ConsoleResult extends ConsoleState {
71
+ mode: ConsoleMode;
72
+ commands: readonly TuiCommandDefinition[];
73
+ setMode: (mode: ConsoleMode) => void;
74
+ setCommand: (command: string) => void;
75
+ setConversationDraft: (draft: string) => void;
76
+ execute: (command?: string) => Promise<void>;
77
+ retry: () => Promise<void>;
78
+ cancel: () => void;
79
+ clear: () => void;
101
80
  }
@@ -0,0 +1,3 @@
1
+ import type { ConsoleOptions, ConsoleResult } from './types.js';
2
+ /** Native command execution and draft orchestration, with or without Console. */
3
+ export declare function useConsole({ mode: controlledMode, defaultMode, locale, scopeKey, onModeChange, requestOptions, }?: ConsoleOptions): ConsoleResult;
@@ -1 +1 @@
1
- export { Console } from "../a~0.js";
1
+ export { Console, useConsole } from "../a~0.js";
@@ -0,0 +1,10 @@
1
+ /** 复制图标。Copy icon. */
2
+ export declare function CopyIcon({ size }: {
3
+ size?: number;
4
+ }): import("react").JSX.Element;
5
+ /** 历史图标。History icon. */
6
+ export declare function HistoryIcon(): import("react").JSX.Element;
7
+ /** 看板图标。Dashboard icon. */
8
+ export declare function DashboardIcon(): import("react").JSX.Element;
9
+ /** 下载图标。Download icon. */
10
+ export declare function DownloadIcon(): import("react").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import type { Locale } from '../../shared/locale.js';
2
+ import { type FilePreviewTab } from '../../components/file-preview/index.js';
3
+ import type { FileBrowserLabels } from './types.js';
4
+ /**
5
+ * 详情区:页签行与正文。分段器(预览 / 源码)与右侧图标按钮由这里渲染,通过
6
+ * `slots.actions` 拿到预览的视图状态。
7
+ *
8
+ * 目录的摘要层级不在这里——它是 `directory` 页签内部的一层,由组件自己渲染。
9
+ *
10
+ * The detail pane: tab row and body. The segmented control (preview / source) and
11
+ * the icon buttons on the right are rendered here, reading the view state from the
12
+ * preview through `slots.actions`.
13
+ *
14
+ * A directory's summary levels are not here: they are a layer inside the
15
+ * `directory` tab, rendered by the component itself.
16
+ */
17
+ export interface FileBrowserDetailProps {
18
+ tabs: readonly FilePreviewTab[];
19
+ activeKey: string | null;
20
+ locale: Locale;
21
+ labels?: FileBrowserLabels['preview'];
22
+ footer?: string;
23
+ /** 分段器与图标按钮的文案。Copy for the segmented control and icon buttons. */
24
+ viewLabels: {
25
+ preview: string;
26
+ source: string;
27
+ copyPath: string;
28
+ copyContent: string;
29
+ download: string;
30
+ viewSwitch: string;
31
+ };
32
+ onActiveKeyChange: (key: string) => void;
33
+ }
34
+ export declare function FileBrowserDetail({ tabs, activeKey, locale, labels, footer, viewLabels, onActiveKeyChange, }: FileBrowserDetailProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function FileBrowserEmpty({ label }: {
2
+ label: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 请求失败时的占位:一句结论、一行原始原因、一个重试按钮。
3
+ *
4
+ * 结论用可替换文案,原因原样显示服务端或传输层给的消息——把「403 Forbidden」
5
+ * 换成「加载失败」会让人分不清是权限、网络还是数据确实不存在,而这三者的处置
6
+ * 完全不同。
7
+ *
8
+ * The placeholder shown when a request fails: a conclusion, the raw reason and a
9
+ * retry button.
10
+ *
11
+ * The conclusion is replaceable copy while the reason is shown as the server or the
12
+ * transport reported it — replacing "403 Forbidden" with "Failed to load" hides
13
+ * whether this is a permission problem, a network problem or genuinely missing
14
+ * data, and the three call for different actions.
15
+ */
16
+ export interface FileBrowserFailureProps {
17
+ message: string;
18
+ detail?: string;
19
+ retryLabel: string;
20
+ onRetry: () => void;
21
+ }
22
+ export declare function FileBrowserFailure({ message, detail, retryLabel, onRetry, }: FileBrowserFailureProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * 工具栏图标:搜索与刷新。
3
+ *
4
+ * 路径取自控制台所用的图标集(Arco `IconSearch` / `IconRefresh`),不是手绘近似。
5
+ * 两者都是 48 网格、`stroke-width: 4`、`fill: none`、`stroke: currentColor`,按
6
+ * 同一比例缩放到 16px,描边粗细因此与原图标一致。
7
+ *
8
+ * Toolbar icons: search and refresh.
9
+ *
10
+ * The paths come from the icon set the console uses (Arco `IconSearch` /
11
+ * `IconRefresh`) rather than a hand-drawn approximation. Both are 48-grid,
12
+ * `stroke-width: 4`, `fill: none`, `stroke: currentColor`, scaled to 16px at the
13
+ * same ratio so the stroke weight matches the original.
14
+ */
15
+ /** 搜索图标。Search icon. */
16
+ export declare function SearchIcon(): import("react").JSX.Element;
17
+ /** 刷新图标。Refresh icon. */
18
+ export declare function RefreshIcon(): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { type Locale } from '../../shared/locale.js';
2
+ import type { FilePreviewLabels } from '../../components/file-preview/index.js';
3
+ import type { FileTreeLabels } from '../../components/file-tree/index.js';
4
+ import type { FileBrowserLabels } from './types.js';
5
+ /** 模块外壳自己渲染的文案,其余透传给树与预览。 */
6
+ export type ShellLabels = Omit<FileBrowserLabels, 'tree' | 'preview' | 'entries'>;
7
+ /**
8
+ * 模块外壳的内置文案。树与预览的默认值留在各自组件里,模块不重复一份。
9
+ * Built-in copy of the module shell. The tree and the preview keep their own
10
+ * defaults, so the module does not duplicate them.
11
+ */
12
+ /** 解析后的外壳文案,外加透传给两个组件的文案。 */
13
+ export interface ResolvedLabels extends Required<ShellLabels> {
14
+ tree: FileTreeLabels | undefined;
15
+ previewLabels: FileBrowserLabels['preview'];
16
+ }
17
+ /** 逐项合并默认文案;树与预览的文案原样透传,缺省由组件自己兜底。 */
18
+ export declare function resolveLabels(labels: FileBrowserLabels | undefined, locale: Locale): ResolvedLabels;
19
+ /** Shared shell labels followed by explicit preview overrides. */
20
+ export declare function resolvePreviewLabels(text: ResolvedLabels): FilePreviewLabels;
21
+ export declare const DEFAULT_LABELS: Required<ShellLabels>;
22
+ /** Summary titles are derived from the module resource, including host overrides. */
23
+ export declare function resolveSummaryLabels(locale: Locale, labels?: FileBrowserLabels): {
24
+ l0: string;
25
+ l1: string;
26
+ failure: string;
27
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 文件浏览的栏宽约束。
3
+ *
4
+ * 树默认 352px(与设计稿一致);窄于 200px 就只剩图标可辨。上限除了 520px 的
5
+ * 绝对值,还要给右侧详情留出可读宽度——容器被宿主压窄时,树不能继续占着
6
+ * 520px 把详情挤没。
7
+ *
8
+ * Column-width limits of the file browser.
9
+ *
10
+ * The tree starts at 352px, matching the design; below 200px only icons stay
11
+ * legible. Above the 520px absolute cap the detail pane must still have room, so a
12
+ * container the host squeezed narrows the tree rather than letting it keep 520px
13
+ * and crush the detail.
14
+ */
15
+ export declare const TREE_DEFAULT_WIDTH = 352;
16
+ export declare const TREE_MIN_WIDTH = 200;
17
+ /**
18
+ * 按容器宽度算出树的最大宽度。
19
+ *
20
+ * 容器宽度还没测出来(首帧)时用绝对值上限,避免把树压到最小。
21
+ *
22
+ * Resolves the tree's maximum width from the container width.
23
+ *
24
+ * Before the container is measured (the first frame) the absolute cap applies, so
25
+ * the tree is never squeezed to its minimum.
26
+ */
27
+ export declare function resolveTreeMaxWidth(containerWidth: number): number;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 搜索行:搜索框与刷新按钮。内置的连接与导入入口位于上一行。
3
+ *
4
+ * The search row: the search box and refresh button. Built-in connection and import
5
+ * entries occupy the row above.
6
+ */
7
+ export interface FileBrowserToolbarProps {
8
+ searchId: string;
9
+ query: string;
10
+ refreshing: boolean;
11
+ canRefresh: boolean;
12
+ placeholder: string;
13
+ refreshLabel: string;
14
+ onQueryChange: (value: string) => void;
15
+ onRefresh: () => void;
16
+ }
17
+ export declare function FileBrowserToolbar({ searchId, query, refreshing, canRefresh, placeholder, refreshLabel, onQueryChange, onRefresh, }: FileBrowserToolbarProps): import("react").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import type { Locale } from '../../shared/locale.js';
2
+ import type { FileBrowserEntriesProps } from '../../components/file-browser-entries/index.js';
3
+ import type { FileTreeLabels } from '../../components/file-tree/index.js';
4
+ import type { FileBrowserApi } from './types.js';
5
+ /**
6
+ * 左栏:内置入口条、搜索行与目录树。
7
+ *
8
+ * 宽度由外层的可拖拽分隔条决定,因此这里只铺满自己的盒子,不设宽度;树内容
9
+ * 比栏宽时横向滚动,而不是把名称截成省略号。
10
+ *
11
+ * The left column: the built-in entries, the search row and the tree.
12
+ *
13
+ * The width comes from the draggable divider outside, so this only fills its own
14
+ * box. When the tree is wider than the column it scrolls sideways rather than
15
+ * truncating names into ellipses.
16
+ */
17
+ export interface FileBrowserTreePaneProps {
18
+ entries: Pick<FileBrowserEntriesProps, 'agentConnect' | 'onImportResources' | 'renderImportResources' | 'labels'>;
19
+ locale: Locale;
20
+ searchId: string;
21
+ browser: FileBrowserApi;
22
+ treeLabels: FileTreeLabels | undefined;
23
+ searchPlaceholder: string;
24
+ refreshLabel: string;
25
+ searchLoading: string;
26
+ searchEmpty: string;
27
+ /** 搜索失败时的结论文案。Conclusion shown when the search request fails. */
28
+ searchErrorLabel: string;
29
+ /** 失败态里的重试按钮。Retry button of the failure state. */
30
+ retryLabel: string;
31
+ }
32
+ export declare function FileBrowserTreePane({ entries, locale, searchId, browser, treeLabels, searchPlaceholder, refreshLabel, searchLoading, searchEmpty, searchErrorLabel, retryLabel, }: FileBrowserTreePaneProps): import("react").JSX.Element;
@@ -1,6 +1,15 @@
1
- import { FileBrowserToolbarButton } from './file-browser-toolbar-button.js';
2
1
  import type { FileBrowserProps } from './types.js';
3
- export { FileBrowserToolbarButton };
4
- export type { FileBrowserLabels, FileBrowserProps, FileBrowserToolbarButtonProps, } from './types.js';
5
- /** 占位组件:渲染一个带模块名的空容器,真实实现随模块 Hook 与组合视图迁入。 */
6
- export declare function FileBrowser({ className, style, labels }: FileBrowserProps): import("react").JSX.Element;
2
+ export type { FileBrowserActions, FileBrowserApi, FileBrowserLabels, FileBrowserProps, } from './types.js';
3
+ /**
4
+ * 文件浏览模块的组合视图,对齐控制台设计稿:左侧目录树(入口条、搜索行、树),
5
+ * 右侧详情区(面包屑、标题行、正文、底部元信息)。两栏之间有一条可拖拽的
6
+ * 分隔条,拖动改树宽;取数与联动都在 {@link useFileBrowser} 里,这里只组装
7
+ * 视图。
8
+ *
9
+ * The file browser module's composite view, matching the console design: the tree
10
+ * on the left (entry row, search row, tree) and the detail pane on the right
11
+ * (breadcrumb, header, body, footer). A draggable divider between them resizes the
12
+ * tree; loading and coordination live in {@link useFileBrowser}, and this only
13
+ * assembles the view.
14
+ */
15
+ export declare function FileBrowser({ uri, defaultUri, rootUri, defaultExpandedUri, locale, agentConnect, onUriChange, onImportResources, renderImportResources, labels, requestOptions, className, style, ...rest }: FileBrowserProps): import("react").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import type { FsEntry } from './fs-model.js';
2
+ /** 语义搜索返回的分组结果。Grouped results of a semantic search. */
3
+ export interface FindResult {
4
+ memories?: Array<{
5
+ uri?: string;
6
+ abstract?: string;
7
+ }>;
8
+ resources?: Array<{
9
+ uri?: string;
10
+ abstract?: string;
11
+ }>;
12
+ skills?: Array<{
13
+ uri?: string;
14
+ abstract?: string;
15
+ }>;
16
+ }
17
+ /**
18
+ * 把分组结果合并成一个按 URI 去重的列表。搜索视图只需要「跳到哪个资源」,类别
19
+ * 分组对使用者没有意义。
20
+ *
21
+ * Merges the grouped result into one list deduplicated by URI: the search view
22
+ * only needs "which resource to jump to", so the category split adds nothing.
23
+ */
24
+ export declare function mergeFindResult(result: FindResult | null | undefined): FsEntry[];
@@ -0,0 +1,33 @@
1
+ import type { DirState } from './fs-model.js';
2
+ /**
3
+ * 树已知的目录 URI 集合:根目录,加上每一层已加载条目里标记为目录的那些。
4
+ *
5
+ * 它与「当前可见的行」无关——根目录从不出现在展平列表里,祖先折叠后其后代也会
6
+ * 消失,但它们的类型不会因此改变。预览据此决定读 L0/L1 摘要还是读正文。
7
+ *
8
+ * The set of directory URIs the tree knows about: the root plus every loaded entry
9
+ * marked as a directory.
10
+ *
11
+ * It is independent of the rows currently visible — the root never appears in the
12
+ * flattened list, and a descendant disappears when its ancestor collapses, yet
13
+ * neither changes type. The preview decides between an L0/L1 summary and content
14
+ * from this set.
15
+ */
16
+ export declare function knownDirectories(rootUri: string, dirs: Record<string, DirState>): ReadonlySet<string>;
17
+ /**
18
+ * 树里出现过的文件 URI。与 {@link knownDirectories} 一起构成「类型已知」的判定:
19
+ * 两者都不包含,说明这个 URI 还没被加载过,类型未知——此时不能假定它是文件。
20
+ *
21
+ * The file URIs the tree has seen. Together with {@link knownDirectories} this decides
22
+ * "type known": in neither means the URI was never loaded, so its type is unknown —
23
+ * and it must not be assumed to be a file.
24
+ */
25
+ export declare function knownFiles(dirs: Record<string, DirState>): ReadonlySet<string>;
26
+ /**
27
+ * 「这个 URI 是树里见过的文件」的判定函数。引用跟着文件集合走,因此同一份加载
28
+ * 结果下它是稳定的,可以作为依赖。
29
+ *
30
+ * The predicate "this URI is a file the tree has seen". Its identity follows the file
31
+ * set, so it stays stable for one load result and can be used as a dependency.
32
+ */
33
+ export declare function useKnownFile(dirs: Record<string, DirState>): (uri: string) => boolean;
@@ -0,0 +1,19 @@
1
+ import type { FilePreviewFileTab } from '../../components/file-preview/index.js';
2
+ import type { ReactNode } from 'react';
3
+ /**
4
+ * 该文件是否应按二进制读取。没有扩展名或扩展名未知时按文本处理——绝大多数
5
+ * 无扩展名的资源都是文本,例如 `Dockerfile`、`Makefile`。
6
+ *
7
+ * Whether the file should be read as binary. A file with no extension, or an
8
+ * unknown one, is treated as text — most extensionless resources are text, such as
9
+ * `Dockerfile` and `Makefile`.
10
+ */
11
+ export declare function isBinaryFile(name: string): boolean;
12
+ /** 该文件名对应的 MIME 类型。The MIME type for this file name. */
13
+ export declare function mimeTypeOf(name: string): string;
14
+ /**
15
+ * 一个二进制文件的预览页签。字节直接交给底座,按 `fileName` 的扩展名选 Adapter。
16
+ * A preview tab for a binary file. The bytes go to the base, which picks an adapter
17
+ * from the `fileName` extension.
18
+ */
19
+ export declare function toBinaryTab(uri: string, name: string, file: Blob, icon?: ReactNode, openParent?: (uri: string) => Promise<void>): FilePreviewFileTab;
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * 文件行的类型图标。同一份图标集里每个键都登记了浅色与暗色两套色值,交给
4
+ * `color` 由 CSS 跟随宿主的 `.dark`,不在这里判断主题。
5
+ *
6
+ * 树行与预览页签共用它,两处的图标因此完全一致——页签不该另画一套。
7
+ *
8
+ * The type icon of a file row. Every key in the icon set registers a light and a
9
+ * dark colour; `color` lets CSS follow the host's `.dark` rather than deciding the
10
+ * scheme here.
11
+ *
12
+ * The tree row and the preview tab share it, so both show the same icon — a tab
13
+ * has no business drawing its own.
14
+ */
15
+ export declare function fileTypeIcon(name: string): ReactNode;
16
+ /** 目录的图标,与树上的文件夹图标同源。The directory icon, the tree's folder icon. */
17
+ export declare function directoryIcon(): ReactNode;
@@ -0,0 +1,106 @@
1
+ import type { FilePreviewDirectoryTab, FilePreviewFileTab } from '../../components/file-preview/index.js';
2
+ import type { ReactNode } from 'react';
3
+ import type { FileTreeEntryRow, FileTreeRow } from '../../components/file-tree/index.js';
4
+ /**
5
+ * 目录接口返回的一行。`ls` 的 `output=agent` 不返回 `name`,名称从 URI 末段取。
6
+ * One row from the directory API. `ls` with `output=agent` returns no `name`, so
7
+ * the name comes from the last URI segment.
8
+ */
9
+ export interface FsEntry {
10
+ uri: string;
11
+ isDir?: boolean;
12
+ size?: number;
13
+ modTime?: string;
14
+ abstract?: string;
15
+ }
16
+ /** 一个目录已加载的子节点与分页状态。 */
17
+ export interface DirState {
18
+ entries: FsEntry[];
19
+ hasMore: boolean;
20
+ loading: boolean;
21
+ error: Error | null;
22
+ }
23
+ /** 语义搜索返回的分组结果。Grouped results of a semantic search. */
24
+ /** 空目录状态。An empty directory state. */
25
+ export declare const emptyDir: () => DirState;
26
+ /**
27
+ * 把新到的一页并入目录状态:`offset` 为 0 是首屏、直接替换,否则追加到已有
28
+ * 子节点之后。
29
+ *
30
+ * 追加而不是替换,是因为分页要保留前几页;替换会让「加载更多」把列表截成最后
31
+ * 一页。
32
+ *
33
+ * Merges an arriving page into a directory's state: `offset` 0 is the first page and
34
+ * replaces, anything else appends to the children already loaded.
35
+ *
36
+ * It appends rather than replaces because paging has to keep the earlier pages;
37
+ * replacing would truncate the list to its last page on "load more".
38
+ */
39
+ export declare function mergePage(current: DirState | undefined, page: {
40
+ entries: FsEntry[];
41
+ hasMore: boolean;
42
+ }, offset: number): DirState;
43
+ /** 从 URI 取末段名称。最后一段为空时回退到整个 URI。 */
44
+ export declare function nameFromUri(uri: string): string;
45
+ /**
46
+ * 把接口返回的一行映射成树行。目录未提供子节点信息,按「可以展开」处理。
47
+ *
48
+ * `index` 用于搜索结果:同一个 URI 可能出现在两个类别里,行 id 必须唯一,
49
+ * 否则选中与滚动定位会命中错的行。
50
+ *
51
+ * Maps one API entry onto a tree row. A directory carries no child information,
52
+ * so it is treated as expandable.
53
+ *
54
+ * `index` is for search results: one URI can appear in two categories, and row
55
+ * ids must be unique or selection and scroll targeting hit the wrong row.
56
+ */
57
+ export declare function toEntryRow(entry: FsEntry, depth: number, expanded: boolean, index?: number, busy?: boolean): FileTreeEntryRow;
58
+ /**
59
+ * 一个文件的预览页签。行数达到上限时按截断处理——接口不返回总行数,只能由
60
+ * 「读满了」推断出「可能还有」。
61
+ *
62
+ * A preview tab for one file. Reaching the line cap is reported as truncation:
63
+ * the API returns no total, so "the cap was filled" is the only signal that more
64
+ * content may exist.
65
+ */
66
+ export declare function toFileTab(entry: FsEntry, content: string, maxLines: number, icon?: ReactNode, openParent?: (uri: string) => Promise<void>): FilePreviewFileTab;
67
+ /**
68
+ * 目录的预览页签:两级摘要各自成一级,走 `directory` 页签,而不是文件页签。
69
+ *
70
+ * 文件页签只有正文,目录还要在标题行与正文之间多一层同级切换——这正是
71
+ * `directory` 这一类存在的理由。
72
+ *
73
+ * A preview tab for a directory: each summary level is one level of a `directory`
74
+ * tab rather than a file tab.
75
+ *
76
+ * A file tab is just a body; a directory also needs one more level of sibling
77
+ * switching between its header and body, which is exactly why the `directory` kind
78
+ * exists.
79
+ */
80
+ export interface DirectorySummary {
81
+ /** L0 摘要正文。The L0 abstract body. */
82
+ abstract: string;
83
+ /** L1 总览正文。The L1 overview body. */
84
+ overview: string;
85
+ /**
86
+ * 该级摘要的请求失败原因。为 `undefined` 表示请求成功(正文可能是空串,即
87
+ * 「还没生成」);有值表示「取不到」,与「没生成」是两件事,必须让用户分得清。
88
+ *
89
+ * Why that level's request failed. `undefined` means the request succeeded (the body
90
+ * may be empty, meaning "not generated yet"); a value means "could not load", which
91
+ * is a different situation the user has to be able to tell apart.
92
+ */
93
+ abstractError?: string;
94
+ overviewError?: string;
95
+ }
96
+ export declare function toDirectoryTab(uri: string, summary: DirectorySummary, labels: {
97
+ l0: string;
98
+ l1: string;
99
+ failure: string;
100
+ }, openParent?: (uri: string) => Promise<void>, icon?: ReactNode): FilePreviewDirectoryTab;
101
+ /** 把目录状态展开成按渲染顺序排列的行,只展开已打开的分支。 */
102
+ export declare function flattenTree(uri: string, depth: number, dirs: Record<string, DirState>, expanded: ReadonlySet<string>): FileTreeRow[];
103
+ /** 请求被取消时不需要写回状态。A cancelled request has no state to write. */
104
+ export declare function isAbort(error: unknown): boolean;
105
+ /** 把任意抛出物归一成 Error。Normalises a thrown value into an Error. */
106
+ export declare function toError(cause: unknown): Error;
@@ -0,0 +1,16 @@
1
+ import type { OvClient, OvRequestOptions } from '../../client/types.js';
2
+ import type { FsEntry } from './fs-model.js';
3
+ /** 一次取多少个子节点。One page of children. */
4
+ export declare const PAGE_SIZE = 200;
5
+ /**
6
+ * 读一页子节点。单独成文件是因为它是纯请求逻辑:没有状态、没有取消管理,调用方
7
+ * 传入 signal 即可;留在 Hook 里只会让那个文件超出行数上限。
8
+ *
9
+ * Reads one page of children. It lives in its own file because it is pure request
10
+ * logic with no state and no cancellation of its own — the caller supplies the
11
+ * signal — and keeping it in the Hook would only push that file past the line limit.
12
+ */
13
+ export declare function loadPage(client: OvClient, uri: string, offset: number, signal: AbortSignal, requestOptions?: OvRequestOptions): Promise<{
14
+ entries: FsEntry[];
15
+ hasMore: boolean;
16
+ }>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * 从根到目标路径之间的目录,按由浅到深排列;目标本身也包含在内——展开一个目录
3
+ * 才能看到它的子节点。路径不在根之下时返回空数组。
4
+ *
5
+ * 拼接时保留根自带的斜杠:`viking://` 去掉末尾斜杠会变成 `viking:`,拼出来就是
6
+ * `viking:/user` 这种不存在的路径。
7
+ *
8
+ * The directories from the root down to the target, shallowest first, including
9
+ * the target itself: a directory must be open for its children to show. Returns an
10
+ * empty array when the path is not under the root.
11
+ *
12
+ * The root keeps its own slashes when joined: stripping the trailing ones from
13
+ * `viking://` yields `viking:`, and joining that produces a path like
14
+ * `viking:/user` that does not exist.
15
+ */
16
+ export declare function expandChain(rootUri: string, targetUri?: string): string[];