@openviking/react 0.1.3 → 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 (200) 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 +2267 -29
  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/{1~0.js → ae~0.js} +5 -24
  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/provider.d.ts +5 -3
  16. package/dist/client/types.d.ts +5 -5
  17. package/dist/client.js +2 -1
  18. package/dist/components/agent-connect/agent-connect-copy.d.ts +19 -33
  19. package/dist/components/agent-connect/agent-connect-design.d.ts +1935 -167
  20. package/dist/components/agent-connect/agent-connect-instructions.d.ts +135 -0
  21. package/dist/components/agent-connect/locales/en-US.d.ts +20 -0
  22. package/dist/components/agent-connect/locales/zh-CN.d.ts +3 -0
  23. package/dist/components/agent-connect/style.css +14 -2
  24. package/dist/components/agent-connect/types.d.ts +2 -1
  25. package/dist/components/directory-tour/directory-tour.d.ts +3 -0
  26. package/dist/components/directory-tour/index.d.ts +3 -0
  27. package/dist/components/directory-tour/locales/en-US.d.ts +3 -0
  28. package/dist/components/directory-tour/locales/zh-CN.d.ts +3 -0
  29. package/dist/components/directory-tour/steps.d.ts +5 -0
  30. package/dist/components/directory-tour/style.css +237 -0
  31. package/dist/components/directory-tour/style.js +0 -0
  32. package/dist/components/directory-tour/types.d.ts +42 -0
  33. package/dist/components/directory-tour/use-tour-anchor.d.ts +5 -0
  34. package/dist/components/directory-tour/use-tour-position.d.ts +12 -0
  35. package/dist/components/directory-tour.js +40 -0
  36. package/dist/components/file-browser-entries/file-browser-entries.d.ts +5 -5
  37. package/dist/components/file-browser-entries/labels.d.ts +3 -0
  38. package/dist/components/file-browser-entries/locales/en-US.d.ts +6 -0
  39. package/dist/components/file-browser-entries/locales/zh-CN.d.ts +6 -0
  40. package/dist/components/file-browser-entries/style.css +752 -2
  41. package/dist/components/file-browser-entries/types.d.ts +34 -16
  42. package/dist/components/file-preview/file-preview-adapters.d.ts +2 -1
  43. package/dist/components/file-preview/file-preview-body.d.ts +2 -1
  44. package/dist/components/file-preview/file-preview-breadcrumb-menu.d.ts +2 -1
  45. package/dist/components/file-preview/file-preview-breadcrumb.d.ts +2 -1
  46. package/dist/components/file-preview/file-preview-directory.d.ts +2 -1
  47. package/dist/components/file-preview/file-preview-handle-adapters.d.ts +2 -1
  48. package/dist/components/file-preview/file-preview-header.d.ts +6 -2
  49. package/dist/components/file-preview/file-preview-image-frame.d.ts +5 -0
  50. package/dist/components/file-preview/file-preview-labels.d.ts +2 -14
  51. package/dist/components/file-preview/file-preview-level-tabs.d.ts +7 -0
  52. package/dist/components/file-preview/file-preview-markdown-images.d.ts +13 -0
  53. package/dist/components/file-preview/file-preview-panels.d.ts +5 -2
  54. package/dist/components/file-preview/file-preview-viewer.d.ts +2 -1
  55. package/dist/components/file-preview/file-preview.d.ts +0 -1
  56. package/dist/components/file-preview/index.d.ts +2 -1
  57. package/dist/components/file-preview/locales/en-US.d.ts +16 -0
  58. package/dist/components/file-preview/locales/zh-CN.d.ts +16 -0
  59. package/dist/components/file-preview/style.css +160 -2
  60. package/dist/components/file-preview/types.d.ts +34 -10
  61. package/dist/components/file-preview/use-file-preview-levels.d.ts +7 -0
  62. package/dist/components/file-preview/use-file-preview-view-state.d.ts +15 -0
  63. package/dist/components/file-preview.js +1 -1
  64. package/dist/components/file-tree/file-tree-info-labels.d.ts +0 -15
  65. package/dist/components/file-tree/file-tree-labels.d.ts +4 -0
  66. package/dist/components/file-tree/file-tree-row-shared.d.ts +2 -12
  67. package/dist/components/file-tree/file-tree-toolbar.d.ts +11 -0
  68. package/dist/components/file-tree/locales/en-US.d.ts +69 -0
  69. package/dist/components/file-tree/locales/zh-CN.d.ts +69 -0
  70. package/dist/components/file-tree/style.css +143 -15
  71. package/dist/components/file-tree/types.d.ts +38 -10
  72. package/dist/components/file-tree/use-file-tree-actions.d.ts +4 -1
  73. package/dist/components/scope-switcher/labels.d.ts +3 -0
  74. package/dist/components/scope-switcher/locales/en-US.d.ts +8 -0
  75. package/dist/components/scope-switcher/locales/zh-CN.d.ts +8 -0
  76. package/dist/components/scope-switcher/scope-panel.d.ts +1 -1
  77. package/dist/components/scope-switcher/scope-switcher.d.ts +1 -1
  78. package/dist/components/scope-switcher/style.css +14 -2
  79. package/dist/components/scope-switcher/types.d.ts +11 -5
  80. package/dist/components/style.css +9851 -6812
  81. package/dist/components/tui/locales/en-US.d.ts +35 -0
  82. package/dist/components/tui/locales/zh-CN.d.ts +35 -0
  83. package/dist/components/tui/style.css +310 -18
  84. package/dist/components/tui/tui-copy-button.d.ts +1 -1
  85. package/dist/components/tui/tui-empty.d.ts +25 -0
  86. package/dist/components/tui/tui-labels.d.ts +2 -2
  87. package/dist/components/tui/tui.d.ts +1 -1
  88. package/dist/components/tui/types.d.ts +35 -12
  89. package/dist/components/tui.js +1 -1
  90. package/dist/components/viking-bot/ark-adapter.d.ts +2 -0
  91. package/dist/components/viking-bot/ark-message-body.d.ts +1 -7
  92. package/dist/components/viking-bot/ark-message-list-view.d.ts +1 -1
  93. package/dist/components/viking-bot/ark-message-row.d.ts +3 -1
  94. package/dist/components/viking-bot/bot-popover.d.ts +9 -0
  95. package/dist/components/viking-bot/capabilities.d.ts +49 -0
  96. package/dist/components/viking-bot/composer-attachments.d.ts +13 -0
  97. package/dist/components/viking-bot/composer-controls.d.ts +10 -0
  98. package/dist/components/viking-bot/composer-footer.d.ts +17 -0
  99. package/dist/components/viking-bot/composer-references.d.ts +20 -0
  100. package/dist/components/viking-bot/composer-text.d.ts +10 -0
  101. package/dist/components/viking-bot/index.d.ts +3 -1
  102. package/dist/components/viking-bot/interaction/ask-human-fields.d.ts +1 -1
  103. package/dist/components/viking-bot/interaction/labels.d.ts +2 -1
  104. package/dist/components/viking-bot/interaction/locales/en-US.d.ts +17 -0
  105. package/dist/components/viking-bot/interaction/locales/zh-CN.d.ts +17 -0
  106. package/dist/components/viking-bot/interaction/types.d.ts +8 -3
  107. package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +1 -1
  108. package/dist/components/viking-bot/labels.d.ts +2 -0
  109. package/dist/components/viking-bot/locales/en-US.d.ts +40 -0
  110. package/dist/components/viking-bot/locales/zh-CN.d.ts +40 -0
  111. package/dist/components/viking-bot/markdown-links.d.ts +27 -0
  112. package/dist/components/viking-bot/message-activity.d.ts +7 -0
  113. package/dist/components/viking-bot/message-code-block.d.ts +8 -0
  114. package/dist/components/viking-bot/message-footer.d.ts +8 -0
  115. package/dist/components/viking-bot/message-markdown.d.ts +9 -0
  116. package/dist/components/viking-bot/model.d.ts +37 -3
  117. package/dist/components/viking-bot/quick-input-tracker.d.ts +16 -0
  118. package/dist/components/viking-bot/quick-inputs.d.ts +6 -0
  119. package/dist/components/viking-bot/reference-picker.d.ts +16 -0
  120. package/dist/components/viking-bot/session-actions.d.ts +11 -0
  121. package/dist/components/viking-bot/style.css +1486 -48
  122. package/dist/components/viking-bot/tool-activity.d.ts +9 -0
  123. package/dist/components/viking-bot/tool-result-links.d.ts +6 -0
  124. package/dist/components/viking-bot/types.d.ts +21 -9
  125. package/dist/components/viking-bot/use-quick-input.d.ts +17 -0
  126. package/dist/components/viking-bot/viking-bot.d.ts +1 -6
  127. package/dist/components/viking-bot/welcome.d.ts +8 -0
  128. package/dist/components/viking-bot.js +1 -1
  129. package/dist/c~0.js +533 -66
  130. package/dist/e~0.js +333 -0
  131. package/dist/file-preview-viewer~0.js +90 -8
  132. package/dist/f~0.js +39 -47
  133. package/dist/h~0.js +5 -1
  134. package/dist/icons/console-icons.d.ts +12 -0
  135. package/dist/icons/index.d.ts +2 -0
  136. package/dist/icons/viking-bot-icons.d.ts +6 -0
  137. package/dist/icons.js +1 -0
  138. package/dist/index.d.ts +2 -0
  139. package/dist/index.js +2 -1
  140. package/dist/k~0.js +1 -0
  141. package/dist/lg~0.js +155 -0
  142. package/dist/lk~0.js +37 -8
  143. package/dist/l~0.js +102 -119
  144. package/dist/modules/console/command-messages.d.ts +19 -0
  145. package/dist/modules/console/command-parser.d.ts +15 -0
  146. package/dist/modules/console/command-specs.d.ts +15 -0
  147. package/dist/modules/console/commands.d.ts +6 -0
  148. package/dist/modules/console/console-history.d.ts +10 -0
  149. package/dist/modules/console/console-toolbar.d.ts +18 -0
  150. package/dist/modules/console/console.d.ts +1 -3
  151. package/dist/modules/console/controller.d.ts +17 -0
  152. package/dist/modules/console/index.d.ts +2 -0
  153. package/dist/modules/console/labels.d.ts +61 -0
  154. package/dist/modules/console/locales/en-US.d.ts +49 -0
  155. package/dist/modules/console/locales/zh-CN.d.ts +3 -0
  156. package/dist/modules/console/localize-records.d.ts +11 -0
  157. package/dist/modules/console/results.d.ts +2 -0
  158. package/dist/modules/console/style.css +10905 -15
  159. package/dist/modules/console/types.d.ts +59 -80
  160. package/dist/modules/console/use-console.d.ts +3 -0
  161. package/dist/modules/console.js +1 -1
  162. package/dist/modules/file-browser/file-browser-detail.d.ts +2 -1
  163. package/dist/modules/file-browser/file-browser-labels.d.ts +11 -12
  164. package/dist/modules/file-browser/file-browser-toolbar.d.ts +3 -4
  165. package/dist/modules/file-browser/file-browser-tree-pane.d.ts +7 -5
  166. package/dist/modules/file-browser/file-browser.d.ts +1 -1
  167. package/dist/modules/file-browser/fs-read-directory.d.ts +2 -6
  168. package/dist/modules/file-browser/locales/en-US.d.ts +25 -0
  169. package/dist/modules/file-browser/locales/zh-CN.d.ts +25 -0
  170. package/dist/modules/file-browser/style.css +1581 -126
  171. package/dist/modules/file-browser/types.d.ts +38 -29
  172. package/dist/modules/file-browser/use-file-browser.d.ts +6 -1
  173. package/dist/modules/file-browser/use-fs-preview.d.ts +15 -1
  174. package/dist/modules/scope-cascade/labels.d.ts +6 -0
  175. package/dist/modules/scope-cascade/locales/en-US.d.ts +6 -0
  176. package/dist/modules/scope-cascade/locales/zh-CN.d.ts +3 -0
  177. package/dist/modules/scope-cascade/scope-cascade.d.ts +1 -1
  178. package/dist/modules/scope-cascade/style.css +14 -2
  179. package/dist/modules/scope-cascade/types.d.ts +3 -0
  180. package/dist/modules/style.css +15853 -3484
  181. package/dist/nx~0.js +15 -0
  182. package/dist/n~0.js +238 -83
  183. package/dist/o~0.js +10 -7
  184. package/dist/p~0.js +27 -0
  185. package/dist/rslib-runtime~0.js +42 -0
  186. package/dist/r~0.js +152 -0
  187. package/dist/shared/components/drawer/drawer.d.ts +13 -0
  188. package/dist/shared/components/drawer/index.d.ts +1 -0
  189. package/dist/shared/components/overlay/use-overlay-position.d.ts +2 -2
  190. package/dist/shared/components/tooltip/use-portal-theme.d.ts +3 -0
  191. package/dist/shared/locale.d.ts +6 -0
  192. package/dist/style.css +26056 -10636
  193. package/dist/u~0.js +75 -58
  194. package/dist/viking-bot-composer~0.js +434 -77
  195. package/dist/viking-bot-interaction~0.js +11 -11
  196. package/package.json +13 -4
  197. package/dist/30~0.js +0 -1332
  198. package/dist/components/tui/tui-labels-zh.d.ts +0 -2
  199. package/dist/modules/file-browser/tree-info-copy.d.ts +0 -15
  200. package/dist/modules/file-browser/tree-info-copy.zh-CN.d.ts +0 -15
@@ -136,6 +136,141 @@ export declare function getAgentConnectContent(locale: AgentConnectLocale): {
136
136
  markdown: string;
137
137
  guides: never[];
138
138
  };
139
+ } | {
140
+ codex: {
141
+ name: string;
142
+ description: string;
143
+ tags: string[];
144
+ markdown: string;
145
+ guides: never[];
146
+ };
147
+ 'claude-code': {
148
+ name: string;
149
+ description: string;
150
+ tags: string[];
151
+ markdown: string;
152
+ guides: never[];
153
+ };
154
+ doubao: {
155
+ name: string;
156
+ description: string;
157
+ tags: string[];
158
+ markdown: string;
159
+ guides: never[];
160
+ };
161
+ workbuddy: {
162
+ name: string;
163
+ description: string;
164
+ tags: string[];
165
+ markdown: string;
166
+ guides: never[];
167
+ };
168
+ trae: {
169
+ name: string;
170
+ description: string;
171
+ tags: string[];
172
+ markdown: string;
173
+ guides: never[];
174
+ };
175
+ cursor: {
176
+ name: string;
177
+ description: string;
178
+ tags: string[];
179
+ markdown: string;
180
+ guides: never[];
181
+ };
182
+ openclaw: {
183
+ name: string;
184
+ description: string;
185
+ tags: string[];
186
+ markdown: string;
187
+ guides: never[];
188
+ };
189
+ hermes: {
190
+ name: string;
191
+ description: string;
192
+ tags: string[];
193
+ markdown: string;
194
+ guides: never[];
195
+ };
196
+ opencode: {
197
+ name: string;
198
+ description: string;
199
+ tags: string[];
200
+ markdown: string;
201
+ guides: never[];
202
+ };
203
+ 'deepseek-harness': {
204
+ name: string;
205
+ description: string;
206
+ tags: string[];
207
+ markdown: string;
208
+ guides: never[];
209
+ };
210
+ deerflow: {
211
+ name: string;
212
+ description: string;
213
+ tags: string[];
214
+ markdown: string;
215
+ guides: {
216
+ id: string;
217
+ label: string;
218
+ markdown: string;
219
+ }[];
220
+ };
221
+ pi: {
222
+ name: string;
223
+ description: string;
224
+ tags: string[];
225
+ markdown: string;
226
+ guides: never[];
227
+ };
228
+ zcode: {
229
+ name: string;
230
+ description: string;
231
+ tags: string[];
232
+ markdown: string;
233
+ guides: never[];
234
+ };
235
+ 'kimi-code': {
236
+ name: string;
237
+ description: string;
238
+ tags: string[];
239
+ markdown: string;
240
+ guides: never[];
241
+ };
242
+ mcp: {
243
+ name: string;
244
+ description: string;
245
+ tags: never[];
246
+ markdown: string;
247
+ guides: never[];
248
+ };
249
+ cli: {
250
+ name: string;
251
+ description: string;
252
+ tags: never[];
253
+ markdown: string;
254
+ guides: {
255
+ id: string;
256
+ label: string;
257
+ markdown: string;
258
+ }[];
259
+ };
260
+ api: {
261
+ name: string;
262
+ description: string;
263
+ tags: never[];
264
+ markdown: string;
265
+ guides: never[];
266
+ };
267
+ sdk: {
268
+ name: string;
269
+ description: string;
270
+ tags: never[];
271
+ markdown: string;
272
+ guides: never[];
273
+ };
139
274
  };
140
275
  /** 使用回调替换,密钥中的 $& 等字符也保持原值;不递归替换注入值。 */
141
276
  export declare function getAgentConnectInstructions(id: keyof typeof contentZh, locale: AgentConnectLocale, apiKey: string, baseUrl: string, guideId?: string): {
@@ -0,0 +1,20 @@
1
+ declare const messages: {
2
+ title: string;
3
+ mainstream: string;
4
+ custom: string;
5
+ integration: string;
6
+ instructions: string;
7
+ copy: string;
8
+ copyMarkdown: string;
9
+ copied: string;
10
+ failed: string;
11
+ notice: string;
12
+ seeAgreement: string;
13
+ agreement: string;
14
+ apiKey: string;
15
+ overseas: string;
16
+ hermesCustomIntro: string;
17
+ hermesCustomStep: string;
18
+ installerInstructions: (name: string, command: string) => string;
19
+ };
20
+ export default messages;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US.js';
2
+ declare const messages: typeof enUS;
3
+ export default messages;
@@ -1,7 +1,11 @@
1
- .ov-agent-connect, .ov-divider, .ov-file-browser, .ov-file-browser-entries, .ov-file-preview, .ov-file-tree, .ov-module-placeholder, .ov-popover, .ov-scope-switcher, .ov-tooltip, .ov-tui, .ov-viking-bot, .ov-viking-bot__interaction {
1
+ .ov-directory-tour, .ov-agent-connect, .ov-console, .ov-divider, .ov-file-browser-entries, .ov-drawer, .ov-file-browser, .ov-file-preview, .ov-file-tree, .ov-module-placeholder, .ov-popover, .ov-scope-switcher, .ov-tooltip, .ov-tui, .ov-viking-bot, .ov-viking-bot__popover, .ov-viking-bot__reference-picker--mention, .ov-viking-bot__interaction {
2
+ --ov-ui-tour-shadow-default: 0 15px 35px #0000000d, 0 5px 15px #0000000d;
3
+ --ov-ui-tour-highlight-default: #5252ff14;
2
4
  --ov-ui-primary-default: #5252ff;
3
5
  --ov-ui-primary-hover-default: #7075ff;
4
6
  --ov-ui-primary-active-default: #3833d2;
7
+ --ov-ui-primary-disabled-default: #acb4ff;
8
+ --ov-ui-text-on-primary-default: #fff;
5
9
  --ov-ui-primary-light-default: #f5f7ff;
6
10
  --ov-ui-connect-glow-warm-default: #ff952b0a;
7
11
  --ov-ui-connect-glow-pink-default: #fb4fbc0f;
@@ -19,18 +23,21 @@
19
23
  --ov-ui-bg-3-default: #f7f8fd;
20
24
  --ov-ui-bg-4-default: #f6f7fa;
21
25
  --ov-ui-bg-5-default: #f1f2f9;
26
+ --ov-ui-code-bg-default: #fbfbfc;
22
27
  --ov-ui-status-success-default: #1f9d55;
23
28
  --ov-ui-shadow-default: #0f172a;
29
+ --ov-ui-shadow-control-default: #0000000d;
24
30
  --ov-ui-focus-default: #5252ff;
25
31
  --ov-ui-fill-hover-default: #f1f2f9;
26
32
  --ov-ui-status-error-default: #c43838;
27
33
  --ov-ui-warning-default: #b26a00;
28
34
  --ov-ui-warning-light-default: #fff0b3;
35
+ --ov-ui-overlay-default: #0006;
29
36
  --ov-ui-tooltip-bg-default: #1f2329;
30
37
  --ov-ui-tooltip-text-default: #fff;
31
38
  }
32
39
 
33
- .dark .ov-agent-connect, .dark .ov-divider, .dark .ov-file-browser, .dark .ov-file-browser-entries, .dark .ov-file-preview, .dark .ov-file-tree, .dark .ov-module-placeholder, .dark .ov-popover, .dark .ov-scope-switcher, .dark .ov-tooltip, .dark .ov-tui, .dark .ov-viking-bot, .dark .ov-viking-bot__interaction {
40
+ .dark .ov-directory-tour, .dark .ov-agent-connect, .dark .ov-console, .dark .ov-divider, .dark .ov-file-browser-entries, .dark .ov-drawer, .dark .ov-file-browser, .dark .ov-file-preview, .dark .ov-file-tree, .dark .ov-module-placeholder, .dark .ov-popover, .dark .ov-scope-switcher, .dark .ov-tooltip, .dark .ov-tui, .dark .ov-viking-bot, .dark .ov-viking-bot__popover, .dark .ov-viking-bot__reference-picker--mention, .dark .ov-viking-bot__interaction {
34
41
  --ov-ui-primary-default: #5f5fff;
35
42
  --ov-ui-primary-hover-default: #7075ff;
36
43
  --ov-ui-primary-active-default: #4242ba;
@@ -56,9 +63,14 @@
56
63
  --ov-ui-warning-default: #e0a04a;
57
64
  --ov-ui-warning-light-default: #3a2f14;
58
65
  --ov-ui-tooltip-bg-default: #2a2d33;
66
+ --ov-ui-overlay-default: #000000a3;
59
67
  --ov-ui-tooltip-text-default: #f0f1f3;
60
68
  }
61
69
 
70
+ .dark .ov-viking-bot {
71
+ --ov-ui-code-bg-default: var(--ov-ui-bg-3-default);
72
+ }
73
+
62
74
  .ov-agent-connect {
63
75
  --ov-ui-connect-card-default: #fbfbfc;
64
76
  --ov-ui-connect-tabs-default: #f7f7f9;
@@ -1,5 +1,6 @@
1
+ import type { Locale } from '../../shared/locale.js';
1
2
  import type { HTMLAttributes } from 'react';
2
- export type AgentConnectLocale = 'zh' | 'en';
3
+ export type AgentConnectLocale = Locale;
3
4
  export type AgentConnectTabId = 'mainstream' | 'custom';
4
5
  /** 固定目录中选中的 Agent。Selected agent from the built-in catalog. */
5
6
  export interface AgentConnectItem {
@@ -0,0 +1,3 @@
1
+ import type { DirectoryTourProps } from './types.js';
2
+ /** Data-free directory guidance. Unmounting a closed session resets its steps. */
3
+ export declare function DirectoryTour(props: DirectoryTourProps): import("react").JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ export { DirectoryTour } from './directory-tour.js';
2
+ export { openVikingDirectoryTourSteps } from './steps.js';
3
+ export type { DirectoryTourProps, DirectoryTourStep, DirectoryTourTarget, DirectoryTourLabels, DirectoryTourResult, } from './types.js';
@@ -0,0 +1,3 @@
1
+ import type { DirectoryTourLabels } from '../types.js';
2
+ declare const messages: Required<DirectoryTourLabels>;
3
+ export default messages;
@@ -0,0 +1,3 @@
1
+ import type { DirectoryTourLabels } from '../types.js';
2
+ declare const messages: Required<DirectoryTourLabels>;
3
+ export default messages;
@@ -0,0 +1,5 @@
1
+ import type { DirectoryTourStep, DirectoryTourTarget } from './types.js';
2
+ /** Optional English preset; pass translated steps and illustrations in the host. */
3
+ export declare const openVikingDirectoryTourSteps: readonly (DirectoryTourStep & {
4
+ target: DirectoryTourTarget;
5
+ })[];
@@ -0,0 +1,237 @@
1
+ .ov-directory-tour, .ov-agent-connect, .ov-console, .ov-divider, .ov-file-browser-entries, .ov-drawer, .ov-file-browser, .ov-file-preview, .ov-file-tree, .ov-module-placeholder, .ov-popover, .ov-scope-switcher, .ov-tooltip, .ov-tui, .ov-viking-bot, .ov-viking-bot__popover, .ov-viking-bot__reference-picker--mention, .ov-viking-bot__interaction {
2
+ --ov-ui-tour-shadow-default: 0 15px 35px #0000000d, 0 5px 15px #0000000d;
3
+ --ov-ui-tour-highlight-default: #5252ff14;
4
+ --ov-ui-primary-default: #5252ff;
5
+ --ov-ui-primary-hover-default: #7075ff;
6
+ --ov-ui-primary-active-default: #3833d2;
7
+ --ov-ui-primary-disabled-default: #acb4ff;
8
+ --ov-ui-text-on-primary-default: #fff;
9
+ --ov-ui-primary-light-default: #f5f7ff;
10
+ --ov-ui-connect-glow-warm-default: #ff952b0a;
11
+ --ov-ui-connect-glow-pink-default: #fb4fbc0f;
12
+ --ov-ui-connect-glow-pink-soft-default: #fb4fbc0a;
13
+ --ov-ui-on-primary-default: #fff;
14
+ --ov-ui-text-1-default: #0b0b0f;
15
+ --ov-ui-text-2-default: #3f3f51;
16
+ --ov-ui-text-3-default: #6e718c;
17
+ --ov-ui-text-description-default: #0006;
18
+ --ov-ui-text-disabled-default: #a5a7bb;
19
+ --ov-ui-border-1-default: #f0f2fa;
20
+ --ov-ui-border-2-default: #e1e4f2;
21
+ --ov-ui-border-3-default: #d7daea;
22
+ --ov-ui-bg-1-default: #fff;
23
+ --ov-ui-bg-3-default: #f7f8fd;
24
+ --ov-ui-bg-4-default: #f6f7fa;
25
+ --ov-ui-bg-5-default: #f1f2f9;
26
+ --ov-ui-code-bg-default: #fbfbfc;
27
+ --ov-ui-status-success-default: #1f9d55;
28
+ --ov-ui-shadow-default: #0f172a;
29
+ --ov-ui-shadow-control-default: #0000000d;
30
+ --ov-ui-focus-default: #5252ff;
31
+ --ov-ui-fill-hover-default: #f1f2f9;
32
+ --ov-ui-status-error-default: #c43838;
33
+ --ov-ui-warning-default: #b26a00;
34
+ --ov-ui-warning-light-default: #fff0b3;
35
+ --ov-ui-overlay-default: #0006;
36
+ --ov-ui-tooltip-bg-default: #1f2329;
37
+ --ov-ui-tooltip-text-default: #fff;
38
+ }
39
+
40
+ .dark .ov-directory-tour, .dark .ov-agent-connect, .dark .ov-console, .dark .ov-divider, .dark .ov-file-browser-entries, .dark .ov-drawer, .dark .ov-file-browser, .dark .ov-file-preview, .dark .ov-file-tree, .dark .ov-module-placeholder, .dark .ov-popover, .dark .ov-scope-switcher, .dark .ov-tooltip, .dark .ov-tui, .dark .ov-viking-bot, .dark .ov-viking-bot__popover, .dark .ov-viking-bot__reference-picker--mention, .dark .ov-viking-bot__interaction {
41
+ --ov-ui-primary-default: #5f5fff;
42
+ --ov-ui-primary-hover-default: #7075ff;
43
+ --ov-ui-primary-active-default: #4242ba;
44
+ --ov-ui-primary-light-default: #1a1632;
45
+ --ov-ui-connect-glow-warm-default: #ff952b05;
46
+ --ov-ui-connect-glow-pink-default: #fb4fbc08;
47
+ --ov-ui-connect-glow-pink-soft-default: #fb4fbc05;
48
+ --ov-ui-text-1-default: #c7ccd6;
49
+ --ov-ui-text-2-default: #9da3af;
50
+ --ov-ui-text-3-default: #737a87;
51
+ --ov-ui-text-description-default: #fff6;
52
+ --ov-ui-text-disabled-default: #42464e;
53
+ --ov-ui-border-1-default: #23252a;
54
+ --ov-ui-border-2-default: #2e3138;
55
+ --ov-ui-border-3-default: #3a3d45;
56
+ --ov-ui-bg-1-default: #131416;
57
+ --ov-ui-bg-3-default: #1b1d21;
58
+ --ov-ui-bg-4-default: #202227;
59
+ --ov-ui-bg-5-default: #23252a;
60
+ --ov-ui-focus-default: #5f5fff;
61
+ --ov-ui-fill-hover-default: #23252a;
62
+ --ov-ui-status-error-default: #ff9595;
63
+ --ov-ui-warning-default: #e0a04a;
64
+ --ov-ui-warning-light-default: #3a2f14;
65
+ --ov-ui-tooltip-bg-default: #2a2d33;
66
+ --ov-ui-overlay-default: #000000a3;
67
+ --ov-ui-tooltip-text-default: #f0f1f3;
68
+ }
69
+
70
+ .dark .ov-viking-bot {
71
+ --ov-ui-code-bg-default: var(--ov-ui-bg-3-default);
72
+ }
73
+
74
+ .ov-agent-connect {
75
+ --ov-ui-connect-card-default: #fbfbfc;
76
+ --ov-ui-connect-tabs-default: #f7f7f9;
77
+ --ov-ui-connect-selected-default: #f3f4f7;
78
+ --ov-ui-connect-border-default: #edeef2;
79
+ --ov-ui-connect-outline-default: #e1e3ea;
80
+ --ov-ui-connect-muted-default: #787c91;
81
+ --ov-ui-connect-notice-default: #2e2984;
82
+ }
83
+
84
+ .dark .ov-agent-connect {
85
+ --ov-ui-connect-card-default: var(--ov-ui-bg-3-default);
86
+ --ov-ui-connect-tabs-default: var(--ov-ui-bg-3-default);
87
+ --ov-ui-connect-selected-default: var(--ov-ui-bg-4-default);
88
+ --ov-ui-connect-border-default: var(--ov-ui-border-1-default);
89
+ --ov-ui-connect-outline-default: var(--ov-ui-border-2-default);
90
+ --ov-ui-connect-muted-default: var(--ov-ui-text-3-default);
91
+ --ov-ui-connect-notice-default: var(--ov-ui-text-2-default);
92
+ }
93
+
94
+ .ov-directory-tour {
95
+ --ov-ui-directory-tour-primary: var(--ov-ui-color-primary, var(--ov-ui-primary-default));
96
+ --ov-ui-directory-tour-background: var(--ov-ui-color-bg-1, var(--ov-ui-bg-1-default));
97
+ --ov-ui-directory-tour-text: var(--ov-ui-color-text-1, var(--ov-ui-text-1-default));
98
+ --ov-ui-directory-tour-secondary: var(--ov-ui-color-text-2, var(--ov-ui-text-2-default));
99
+ --ov-ui-directory-tour-muted: var(--ov-ui-color-text-3, var(--ov-ui-text-3-default));
100
+ --ov-ui-directory-tour-border: var(--ov-ui-color-border-3, var(--ov-ui-border-3-default));
101
+ width: 270px;
102
+ max-width: calc(100vw - 16px);
103
+ max-height: calc(100dvh - 16px);
104
+ color: var(--ov-ui-directory-tour-text);
105
+ box-sizing: border-box;
106
+ background: none;
107
+ border: 0;
108
+ margin: 0;
109
+ padding: 0;
110
+ font-family: inherit;
111
+ position: fixed;
112
+ inset: auto;
113
+ overflow: visible;
114
+ }
115
+
116
+ .ov-directory-tour *, .ov-directory-tour :before, .ov-directory-tour :after {
117
+ box-sizing: border-box;
118
+ }
119
+
120
+ .ov-directory-tour__card {
121
+ border: .5px solid var(--ov-ui-directory-tour-border);
122
+ background: var(--ov-ui-directory-tour-background);
123
+ box-shadow: var(--ov-ui-color-tour-shadow, var(--ov-ui-tour-shadow-default));
124
+ border-radius: 8px;
125
+ flex-direction: column;
126
+ gap: 12px;
127
+ max-height: calc(100dvh - 16px);
128
+ padding: 16px;
129
+ display: flex;
130
+ position: relative;
131
+ overflow: auto;
132
+ }
133
+
134
+ .ov-directory-tour__title {
135
+ overflow-wrap: anywhere;
136
+ margin: 0;
137
+ padding-right: 16px;
138
+ font-size: 14px;
139
+ font-weight: 500;
140
+ line-height: 22px;
141
+ }
142
+
143
+ .ov-directory-tour__description {
144
+ color: var(--ov-ui-directory-tour-secondary);
145
+ overflow-wrap: anywhere;
146
+ margin-top: -8px;
147
+ font-size: 12px;
148
+ line-height: 20px;
149
+ }
150
+
151
+ .ov-directory-tour__illustration {
152
+ background: var(--ov-ui-color-bg-3, var(--ov-ui-bg-3-default));
153
+ border-radius: 8px;
154
+ flex-shrink: 0;
155
+ justify-content: center;
156
+ align-items: center;
157
+ height: 72px;
158
+ display: flex;
159
+ overflow: hidden;
160
+ }
161
+
162
+ .ov-directory-tour__illustration img {
163
+ object-fit: contain;
164
+ max-width: 100%;
165
+ max-height: 100%;
166
+ }
167
+
168
+ .ov-directory-tour__actions {
169
+ align-items: center;
170
+ gap: 8px;
171
+ display: flex;
172
+ }
173
+
174
+ .ov-directory-tour__progress {
175
+ color: var(--ov-ui-directory-tour-muted);
176
+ flex: 1;
177
+ font-size: 12px;
178
+ line-height: 20px;
179
+ }
180
+
181
+ .ov-directory-tour button {
182
+ cursor: pointer;
183
+ font: inherit;
184
+ border: 1px solid var(--ov-ui-directory-tour-border);
185
+ background: var(--ov-ui-directory-tour-background);
186
+ color: var(--ov-ui-directory-tour-text);
187
+ border-radius: 6px;
188
+ padding: 3px 10px;
189
+ font-size: 13px;
190
+ line-height: 22px;
191
+ }
192
+
193
+ .ov-directory-tour button:hover {
194
+ background: var(--ov-ui-color-bg-3, var(--ov-ui-bg-3-default));
195
+ }
196
+
197
+ .ov-directory-tour button:focus-visible {
198
+ outline: 2px solid var(--ov-ui-directory-tour-primary);
199
+ outline-offset: 2px;
200
+ }
201
+
202
+ .ov-directory-tour button:disabled {
203
+ cursor: wait;
204
+ opacity: .5;
205
+ }
206
+
207
+ .ov-directory-tour .ov-directory-tour__primary {
208
+ background: var(--ov-ui-directory-tour-primary);
209
+ color: var(--ov-ui-color-on-primary, var(--ov-ui-auth-on-primary-default));
210
+ border: 0;
211
+ }
212
+
213
+ .ov-directory-tour .ov-directory-tour__primary:hover {
214
+ background: var(--ov-ui-color-primary-hover, var(--ov-ui-primary-hover-default));
215
+ }
216
+
217
+ .ov-directory-tour .ov-directory-tour__close {
218
+ color: var(--ov-ui-directory-tour-muted);
219
+ background: none;
220
+ border: 0;
221
+ padding: 2px 6px;
222
+ font-size: 18px;
223
+ position: absolute;
224
+ top: 2px;
225
+ right: 4px;
226
+ }
227
+
228
+ .ov-directory-tour__highlight {
229
+ pointer-events: none;
230
+ border: 1px solid var(--ov-ui-directory-tour-primary);
231
+ background: var(--ov-ui-color-tour-highlight, var(--ov-ui-tour-highlight-default));
232
+ border-radius: 4px;
233
+ position: fixed;
234
+ }
235
+
236
+
237
+
File without changes
@@ -0,0 +1,42 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import type { Locale } from '../../shared/locale.js';
3
+ export type DirectoryTourTarget = 'userMemories' | 'userSessions' | 'userResources' | 'sharedResources' | 'userExperiences' | 'userPeers';
4
+ export interface DirectoryTourStep {
5
+ id: string;
6
+ target: string;
7
+ title: ReactNode;
8
+ description: ReactNode;
9
+ illustration?: ReactNode;
10
+ nextLabel?: string;
11
+ }
12
+ export interface DirectoryTourResult {
13
+ skippedStepIds: readonly string[];
14
+ }
15
+ export interface DirectoryTourLabels {
16
+ close?: string;
17
+ next?: string;
18
+ done?: string;
19
+ locating?: string;
20
+ unavailable?: string;
21
+ retry?: string;
22
+ skip?: string;
23
+ progress?: (current: number, total: number) => string;
24
+ }
25
+ export interface DirectoryTourProps {
26
+ locale: Locale;
27
+ open: boolean;
28
+ steps: readonly DirectoryTourStep[];
29
+ currentStep?: number;
30
+ defaultStep?: number;
31
+ placement?: 'right' | 'left';
32
+ locateTimeout?: number;
33
+ className?: string;
34
+ style?: CSSProperties;
35
+ /** Host loads/expands the path and resolves only after the row is rendered.
36
+ * Must respect cancellation. No network or business DTO belongs to the tour. */
37
+ locateTarget?: (target: string, signal: AbortSignal) => Promise<HTMLElement | null>;
38
+ onStepChange?: (index: number) => void;
39
+ onClose?: () => void;
40
+ onComplete?: (result: DirectoryTourResult) => void;
41
+ labels?: DirectoryTourLabels;
42
+ }
@@ -0,0 +1,5 @@
1
+ import type { DirectoryTourProps } from './types.js';
2
+ export declare function useTourAnchor(target: string, locateTarget: DirectoryTourProps['locateTarget'], timeout: number, attempt: number): {
3
+ anchor: HTMLElement | null;
4
+ failed: boolean;
5
+ };
@@ -0,0 +1,12 @@
1
+ interface Position {
2
+ top: number;
3
+ left: number;
4
+ targetTop: number;
5
+ targetLeft: number;
6
+ targetWidth: number;
7
+ targetHeight: number;
8
+ visible: boolean;
9
+ missing: boolean;
10
+ }
11
+ export declare function useTourPosition(anchor: HTMLElement | null, surface: HTMLDivElement | null, placement: 'right' | 'left'): Position | undefined;
12
+ export {};
@@ -0,0 +1,40 @@
1
+ const openVikingDirectoryTourSteps = [
2
+ {
3
+ id: 'memories',
4
+ target: 'userMemories',
5
+ title: 'User memories (memories)',
6
+ description: 'Long-term memories extracted from conversations: your identity, preferences and decisions.'
7
+ },
8
+ {
9
+ id: 'sessions',
10
+ target: 'userSessions',
11
+ title: 'Conversations (sessions)',
12
+ description: 'Conversations and task records. Return to the original context to understand an Agent’s decisions.'
13
+ },
14
+ {
15
+ id: 'personal-resources',
16
+ target: 'userResources',
17
+ title: 'Personal resources (resources)',
18
+ description: 'Documents, notes and knowledge you import for your own use.'
19
+ },
20
+ {
21
+ id: 'shared-resources',
22
+ target: 'sharedResources',
23
+ title: 'Team resources (resources)',
24
+ description: 'Shared documents, conventions and past projects available to the team.'
25
+ },
26
+ {
27
+ id: 'experiences',
28
+ target: 'userExperiences',
29
+ title: 'Agent experiences (experiences)',
30
+ description: 'Successful tasks become reusable experience for similar problems.'
31
+ },
32
+ {
33
+ id: 'peers',
34
+ target: 'userPeers',
35
+ title: 'Object memories (peers)',
36
+ description: 'Memories specific to a repository, Agent or colleague stay separate. General preferences belong in memories.'
37
+ }
38
+ ];
39
+ export { DirectoryTour } from "../e~0.js";
40
+ export { openVikingDirectoryTourSteps };
@@ -3,12 +3,12 @@ export type { FileBrowserEntriesLabels, FileBrowserEntriesProps, } from './types
3
3
  /**
4
4
  * 文件浏览入口条:连接 Agent 与导入资源。
5
5
  *
6
- * 两项都省略回调时不渲染任何东西,入口条因此整块消失——宿主既没接连接也没接
7
- * 导入时,留一条空白底色只会让人以为还有内容没加载出来。
6
+ * 传入 agentConnect 时内置右侧接入抽屉,回调仍可单独用于宿主自定义接入。
7
+ * 没有可见入口时不渲染入口条,导入入口支持宿主包装默认按钮。
8
8
  *
9
9
  * The file browser entry row: connect an agent, import resources.
10
10
  *
11
- * With both callbacks omitted nothing renders and the row disappears entirely —
12
- * leaving an empty tinted strip would suggest something failed to load.
11
+ * agentConnect enables the right-side drawer; callbacks also support host-owned flows.
12
+ * Nothing renders without visible entries; hosts can wrap the default import button.
13
13
  */
14
- export declare function FileBrowserEntries({ onConnectAgent, onImportResources, labels, className, ...rest }: FileBrowserEntriesProps): import("react").JSX.Element | null;
14
+ export declare function FileBrowserEntries({ locale, agentConnect, onConnectAgent, onImportResources, renderImportResources, labels, className, ...rest }: FileBrowserEntriesProps): import("react").JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ import type { FileBrowserEntriesLabels } from './types.js';
2
+ import { type Locale } from '../../shared/locale.js';
3
+ export declare function resolveFileBrowserEntriesLabels(locale: Locale, labels?: FileBrowserEntriesLabels): Required<FileBrowserEntriesLabels>;
@@ -0,0 +1,6 @@
1
+ declare const messages: {
2
+ close: string;
3
+ connectAgent: string;
4
+ importResources: string;
5
+ };
6
+ export default messages;
@@ -0,0 +1,6 @@
1
+ declare const messages: {
2
+ close: string;
3
+ connectAgent: string;
4
+ importResources: string;
5
+ };
6
+ export default messages;