@openviking/react 0.1.3 → 0.1.5

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 (209) hide show
  1. package/LICENSE.arco-design +21 -0
  2. package/README.md +27 -15
  3. package/dist/0~0.js +19 -0
  4. package/dist/28~0.js +15 -0
  5. package/dist/2~0.js +2270 -29
  6. package/dist/2~0.js.LICENSE.txt +23 -0
  7. package/dist/3c~0.js +2208 -0
  8. package/dist/3~0.js +1207 -1982
  9. package/dist/4~0.js +18 -0
  10. package/dist/9~0.js +43 -0
  11. package/dist/{1~0.js → ae~0.js} +11 -26
  12. package/dist/ark-message-list-view~0.js +530 -119
  13. package/dist/a~0.js +1300 -14
  14. package/dist/c7~0.js +38 -2
  15. package/dist/ck~0.js +23 -0
  16. package/dist/client/provider.d.ts +15 -9
  17. package/dist/client/types.d.ts +5 -5
  18. package/dist/client.js +2 -1
  19. package/dist/components/agent-connect/agent-connect-code-block.d.ts +14 -0
  20. package/dist/components/agent-connect/agent-connect-copy.d.ts +22 -33
  21. package/dist/components/agent-connect/agent-connect-design.d.ts +1936 -168
  22. package/dist/components/agent-connect/agent-connect-installer.d.ts +1 -0
  23. package/dist/components/agent-connect/agent-connect-instructions-view.d.ts +4 -6
  24. package/dist/components/agent-connect/agent-connect-instructions.d.ts +148 -0
  25. package/dist/components/agent-connect/agent-connect-markdown.d.ts +8 -2
  26. package/dist/components/agent-connect/agent-connect-mask.d.ts +10 -0
  27. package/dist/components/agent-connect/agent-connect.d.ts +1 -1
  28. package/dist/components/agent-connect/locales/en-US.d.ts +23 -0
  29. package/dist/components/agent-connect/locales/zh-CN.d.ts +3 -0
  30. package/dist/components/agent-connect/style.css +129 -3
  31. package/dist/components/agent-connect/types.d.ts +7 -4
  32. package/dist/components/agent-connect/use-agent-connect-copy.d.ts +6 -0
  33. package/dist/components/directory-tour/directory-tour.d.ts +3 -0
  34. package/dist/components/directory-tour/index.d.ts +3 -0
  35. package/dist/components/directory-tour/locales/en-US.d.ts +3 -0
  36. package/dist/components/directory-tour/locales/zh-CN.d.ts +3 -0
  37. package/dist/components/directory-tour/steps.d.ts +5 -0
  38. package/dist/components/directory-tour/style.css +237 -0
  39. package/dist/components/directory-tour/style.js +0 -0
  40. package/dist/components/directory-tour/types.d.ts +43 -0
  41. package/dist/components/directory-tour/use-tour-anchor.d.ts +5 -0
  42. package/dist/components/directory-tour/use-tour-position.d.ts +12 -0
  43. package/dist/components/directory-tour.js +40 -0
  44. package/dist/components/file-browser-entries/file-browser-entries.d.ts +5 -5
  45. package/dist/components/file-browser-entries/labels.d.ts +3 -0
  46. package/dist/components/file-browser-entries/locales/en-US.d.ts +6 -0
  47. package/dist/components/file-browser-entries/locales/zh-CN.d.ts +6 -0
  48. package/dist/components/file-browser-entries/style.css +866 -2
  49. package/dist/components/file-browser-entries/types.d.ts +34 -16
  50. package/dist/components/file-preview/file-preview-adapters.d.ts +2 -1
  51. package/dist/components/file-preview/file-preview-body.d.ts +2 -1
  52. package/dist/components/file-preview/file-preview-breadcrumb-menu.d.ts +2 -1
  53. package/dist/components/file-preview/file-preview-breadcrumb.d.ts +2 -1
  54. package/dist/components/file-preview/file-preview-directory.d.ts +2 -1
  55. package/dist/components/file-preview/file-preview-handle-adapters.d.ts +2 -1
  56. package/dist/components/file-preview/file-preview-header.d.ts +6 -2
  57. package/dist/components/file-preview/file-preview-image-frame.d.ts +5 -0
  58. package/dist/components/file-preview/file-preview-labels.d.ts +2 -14
  59. package/dist/components/file-preview/file-preview-level-tabs.d.ts +7 -0
  60. package/dist/components/file-preview/file-preview-markdown-images.d.ts +13 -0
  61. package/dist/components/file-preview/file-preview-panels.d.ts +5 -2
  62. package/dist/components/file-preview/file-preview-viewer.d.ts +2 -1
  63. package/dist/components/file-preview/file-preview.d.ts +0 -1
  64. package/dist/components/file-preview/index.d.ts +2 -1
  65. package/dist/components/file-preview/locales/en-US.d.ts +16 -0
  66. package/dist/components/file-preview/locales/zh-CN.d.ts +16 -0
  67. package/dist/components/file-preview/style.css +160 -2
  68. package/dist/components/file-preview/types.d.ts +34 -10
  69. package/dist/components/file-preview/use-file-preview-levels.d.ts +7 -0
  70. package/dist/components/file-preview/use-file-preview-view-state.d.ts +15 -0
  71. package/dist/components/file-preview.js +1 -1
  72. package/dist/components/file-tree/file-tree-info-labels.d.ts +0 -15
  73. package/dist/components/file-tree/file-tree-labels.d.ts +4 -0
  74. package/dist/components/file-tree/file-tree-row-shared.d.ts +2 -12
  75. package/dist/components/file-tree/file-tree-toolbar.d.ts +11 -0
  76. package/dist/components/file-tree/locales/en-US.d.ts +69 -0
  77. package/dist/components/file-tree/locales/zh-CN.d.ts +69 -0
  78. package/dist/components/file-tree/style.css +143 -15
  79. package/dist/components/file-tree/types.d.ts +38 -10
  80. package/dist/components/file-tree/use-file-tree-actions.d.ts +4 -1
  81. package/dist/components/scope-switcher/labels.d.ts +3 -0
  82. package/dist/components/scope-switcher/locales/en-US.d.ts +8 -0
  83. package/dist/components/scope-switcher/locales/zh-CN.d.ts +8 -0
  84. package/dist/components/scope-switcher/scope-panel.d.ts +1 -1
  85. package/dist/components/scope-switcher/scope-switcher.d.ts +2 -2
  86. package/dist/components/scope-switcher/style.css +14 -2
  87. package/dist/components/scope-switcher/types.d.ts +12 -6
  88. package/dist/components/style.css +10030 -6763
  89. package/dist/components/tui/locales/en-US.d.ts +35 -0
  90. package/dist/components/tui/locales/zh-CN.d.ts +35 -0
  91. package/dist/components/tui/style.css +310 -18
  92. package/dist/components/tui/tui-copy-button.d.ts +1 -1
  93. package/dist/components/tui/tui-empty.d.ts +25 -0
  94. package/dist/components/tui/tui-labels.d.ts +2 -2
  95. package/dist/components/tui/tui.d.ts +1 -1
  96. package/dist/components/tui/types.d.ts +35 -12
  97. package/dist/components/tui.js +1 -1
  98. package/dist/components/viking-bot/ark-adapter.d.ts +2 -0
  99. package/dist/components/viking-bot/ark-message-body.d.ts +1 -7
  100. package/dist/components/viking-bot/ark-message-list-view.d.ts +4 -1
  101. package/dist/components/viking-bot/ark-message-row.d.ts +3 -1
  102. package/dist/components/viking-bot/bot-popover.d.ts +9 -0
  103. package/dist/components/viking-bot/capabilities.d.ts +49 -0
  104. package/dist/components/viking-bot/composer-attachments.d.ts +13 -0
  105. package/dist/components/viking-bot/composer-controls.d.ts +10 -0
  106. package/dist/components/viking-bot/composer-footer.d.ts +17 -0
  107. package/dist/components/viking-bot/composer-references.d.ts +20 -0
  108. package/dist/components/viking-bot/composer-text.d.ts +10 -0
  109. package/dist/components/viking-bot/index.d.ts +3 -1
  110. package/dist/components/viking-bot/interaction/ask-human-fields.d.ts +1 -1
  111. package/dist/components/viking-bot/interaction/labels.d.ts +2 -1
  112. package/dist/components/viking-bot/interaction/locales/en-US.d.ts +17 -0
  113. package/dist/components/viking-bot/interaction/locales/zh-CN.d.ts +17 -0
  114. package/dist/components/viking-bot/interaction/types.d.ts +8 -3
  115. package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +1 -1
  116. package/dist/components/viking-bot/labels.d.ts +2 -0
  117. package/dist/components/viking-bot/locales/en-US.d.ts +40 -0
  118. package/dist/components/viking-bot/locales/zh-CN.d.ts +40 -0
  119. package/dist/components/viking-bot/markdown-links.d.ts +27 -0
  120. package/dist/components/viking-bot/message-activity.d.ts +7 -0
  121. package/dist/components/viking-bot/message-code-block.d.ts +8 -0
  122. package/dist/components/viking-bot/message-footer.d.ts +8 -0
  123. package/dist/components/viking-bot/message-markdown.d.ts +9 -0
  124. package/dist/components/viking-bot/model.d.ts +37 -3
  125. package/dist/components/viking-bot/quick-input-tracker.d.ts +16 -0
  126. package/dist/components/viking-bot/quick-inputs.d.ts +6 -0
  127. package/dist/components/viking-bot/reference-picker.d.ts +16 -0
  128. package/dist/components/viking-bot/session-actions.d.ts +11 -0
  129. package/dist/components/viking-bot/style.css +1486 -48
  130. package/dist/components/viking-bot/tool-activity.d.ts +9 -0
  131. package/dist/components/viking-bot/tool-result-links.d.ts +6 -0
  132. package/dist/components/viking-bot/types.d.ts +20 -8
  133. package/dist/components/viking-bot/use-quick-input.d.ts +17 -0
  134. package/dist/components/viking-bot/viking-bot.d.ts +1 -6
  135. package/dist/components/viking-bot/welcome.d.ts +8 -0
  136. package/dist/components/viking-bot.js +1 -1
  137. package/dist/c~0.js +550 -69
  138. package/dist/e~0.js +335 -0
  139. package/dist/file-preview-viewer~0.js +90 -8
  140. package/dist/f~0.js +49 -51
  141. package/dist/h~0.js +5 -1
  142. package/dist/icons/console-icons.d.ts +12 -0
  143. package/dist/icons/index.d.ts +2 -0
  144. package/dist/icons/viking-bot-icons.d.ts +6 -0
  145. package/dist/icons.js +1 -0
  146. package/dist/index.d.ts +2 -0
  147. package/dist/index.js +2 -1
  148. package/dist/k~0.js +1 -0
  149. package/dist/lg~0.js +155 -0
  150. package/dist/lk~0.js +40 -8
  151. package/dist/l~0.js +170 -181
  152. package/dist/modules/console/command-messages.d.ts +19 -0
  153. package/dist/modules/console/command-parser.d.ts +15 -0
  154. package/dist/modules/console/command-specs.d.ts +15 -0
  155. package/dist/modules/console/commands.d.ts +6 -0
  156. package/dist/modules/console/console-history.d.ts +10 -0
  157. package/dist/modules/console/console-toolbar.d.ts +18 -0
  158. package/dist/modules/console/console.d.ts +1 -3
  159. package/dist/modules/console/controller.d.ts +17 -0
  160. package/dist/modules/console/index.d.ts +2 -0
  161. package/dist/modules/console/labels.d.ts +61 -0
  162. package/dist/modules/console/locales/en-US.d.ts +49 -0
  163. package/dist/modules/console/locales/zh-CN.d.ts +3 -0
  164. package/dist/modules/console/localize-records.d.ts +11 -0
  165. package/dist/modules/console/results.d.ts +2 -0
  166. package/dist/modules/console/style.css +10905 -15
  167. package/dist/modules/console/types.d.ts +59 -80
  168. package/dist/modules/console/use-console.d.ts +3 -0
  169. package/dist/modules/console.js +1 -1
  170. package/dist/modules/file-browser/file-browser-detail.d.ts +2 -1
  171. package/dist/modules/file-browser/file-browser-labels.d.ts +11 -12
  172. package/dist/modules/file-browser/file-browser-toolbar.d.ts +3 -4
  173. package/dist/modules/file-browser/file-browser-tree-pane.d.ts +7 -5
  174. package/dist/modules/file-browser/file-browser.d.ts +1 -1
  175. package/dist/modules/file-browser/fs-read-directory.d.ts +2 -6
  176. package/dist/modules/file-browser/locales/en-US.d.ts +25 -0
  177. package/dist/modules/file-browser/locales/zh-CN.d.ts +25 -0
  178. package/dist/modules/file-browser/style.css +1695 -126
  179. package/dist/modules/file-browser/types.d.ts +38 -29
  180. package/dist/modules/file-browser/use-file-browser.d.ts +6 -1
  181. package/dist/modules/file-browser/use-fs-preview.d.ts +15 -1
  182. package/dist/modules/scope-cascade/labels.d.ts +6 -0
  183. package/dist/modules/scope-cascade/locales/en-US.d.ts +6 -0
  184. package/dist/modules/scope-cascade/locales/zh-CN.d.ts +3 -0
  185. package/dist/modules/scope-cascade/scope-cascade.d.ts +2 -2
  186. package/dist/modules/scope-cascade/style.css +14 -2
  187. package/dist/modules/scope-cascade/types.d.ts +3 -0
  188. package/dist/modules/style.css +15938 -3455
  189. package/dist/nx~0.js +15 -0
  190. package/dist/n~0.js +240 -83
  191. package/dist/o~0.js +10 -7
  192. package/dist/p~0.js +27 -0
  193. package/dist/rslib-runtime~0.js +42 -0
  194. package/dist/r~0.js +152 -0
  195. package/dist/shared/components/drawer/drawer.d.ts +13 -0
  196. package/dist/shared/components/drawer/index.d.ts +1 -0
  197. package/dist/shared/components/overlay/use-overlay-position.d.ts +2 -2
  198. package/dist/shared/components/tooltip/use-portal-theme.d.ts +3 -0
  199. package/dist/shared/locale-context.d.ts +8 -0
  200. package/dist/shared/locale.d.ts +6 -0
  201. package/dist/style.css +26339 -10577
  202. package/dist/u~0.js +397 -152
  203. package/dist/viking-bot-composer~0.js +436 -77
  204. package/dist/viking-bot-interaction~0.js +13 -11
  205. package/package.json +15 -4
  206. package/dist/30~0.js +0 -1332
  207. package/dist/components/tui/tui-labels-zh.d.ts +0 -2
  208. package/dist/modules/file-browser/tree-info-copy.d.ts +0 -15
  209. package/dist/modules/file-browser/tree-info-copy.zh-CN.d.ts +0 -15
@@ -1,3 +1,4 @@
1
1
  import type { AgentConnectLocale } from './types.js';
2
2
  export declare const INSTALLER_HARNESSES: Partial<Record<string, string>>;
3
+ export declare function getInstallerCommand(harness: string, locale: AgentConnectLocale, apiKey: string, baseUrl: string): string;
3
4
  export declare function getInstallerInstructions(name: string, harness: string, locale: AgentConnectLocale, apiKey: string, baseUrl: string): string;
@@ -1,14 +1,12 @@
1
1
  import type { AgentConnectLocale } from './types.js';
2
+ import type { getAgentConnectInstructions } from './agent-connect-instructions.js';
2
3
  interface InstructionsViewProps {
3
- instructions: {
4
- fixed: boolean;
5
- display: string;
6
- copy: string;
7
- };
4
+ instructions: ReturnType<typeof getAgentConnectInstructions>;
5
+ apiKey: string;
8
6
  locale: AgentConnectLocale;
9
7
  agreementUrl?: string;
10
8
  onCopy?: (text: string) => void;
11
9
  }
12
10
  /** 由父视图的 key 隔离指南及凭据的复制生命周期。 */
13
- export declare function AgentConnectInstructionsView({ instructions, locale, agreementUrl, onCopy, }: InstructionsViewProps): import("react").JSX.Element;
11
+ export declare function AgentConnectInstructionsView({ instructions, apiKey, locale, agreementUrl, onCopy, }: InstructionsViewProps): import("react").JSX.Element;
14
12
  export {};
@@ -136,10 +136,158 @@ 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): {
142
277
  fixed: boolean;
143
278
  display: string;
144
279
  copy: string;
280
+ command: {
281
+ display: string;
282
+ copy: string;
283
+ };
284
+ markdown?: undefined;
285
+ keyToken?: undefined;
286
+ } | {
287
+ command?: undefined;
288
+ fixed: boolean;
289
+ display: string;
290
+ copy: string;
291
+ markdown: string;
292
+ keyToken: string;
145
293
  };
@@ -1,3 +1,9 @@
1
- export declare function AgentConnectMarkdown({ text }: {
1
+ import { type CodeBlockControls } from './agent-connect-code-block.js';
2
+ /** 先解析原始 HTML,再清理不允许的标签、属性与协议。 */
3
+ interface MarkdownProps extends CodeBlockControls {
2
4
  text: string;
3
- }): import("react").JSX.Element;
5
+ keyToken: string;
6
+ apiKey: string;
7
+ }
8
+ export declare function AgentConnectMarkdown({ text, ...context }: MarkdownProps): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,10 @@
1
+ interface MarkdownNode {
2
+ type: string;
3
+ value?: string;
4
+ children?: MarkdownNode[];
5
+ }
6
+ /** 正文及行内代码只显示脱敏值;代码块由专用视图处理占位符。 */
7
+ export declare function remarkMaskApiKey({ keyToken }: {
8
+ keyToken: string;
9
+ }): (tree: MarkdownNode) => void;
10
+ export {};
@@ -1,4 +1,4 @@
1
1
  import type { AgentConnectProps } from './types.js';
2
2
  export type { AgentConnectItem, AgentConnectProps, AgentConnectLocale, AgentConnectTabId, } from './types.js';
3
3
  /** 按设计稿固定文案与图标;选择与复制保持实例内交互。 */
4
- export declare function AgentConnect({ apiKey, locale, baseUrl, agreementUrl, activeTabId: controlledTabId, selectedId: controlledSelectedId, onTabChange, onSelect, onCopy, className, ...rest }: AgentConnectProps): import("react").JSX.Element;
4
+ export declare function AgentConnect({ apiKey, locale: localeProp, baseUrl, agreementUrl, showOverseasTag, activeTabId: controlledTabId, selectedId: controlledSelectedId, onTabChange, onSelect, onCopy, className, ...rest }: AgentConnectProps): import("react").JSX.Element;
@@ -0,0 +1,23 @@
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
+ copyCode: string;
10
+ showApiKey: string;
11
+ hideApiKey: string;
12
+ copied: string;
13
+ failed: string;
14
+ notice: string;
15
+ seeAgreement: string;
16
+ agreement: string;
17
+ apiKey: string;
18
+ overseas: string;
19
+ hermesCustomIntro: string;
20
+ hermesCustomStep: string;
21
+ installerInstructions: (name: string, command: string) => string;
22
+ };
23
+ 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;
@@ -79,6 +91,93 @@
79
91
  --ov-ui-connect-notice-default: var(--ov-ui-text-2-default);
80
92
  }
81
93
 
94
+ .ov-agent-connect__code-block {
95
+ border: 1px solid var(--ov-ui-agent-connect-border);
96
+ background: var(--ov-ui-agent-connect-bg);
97
+ white-space: normal;
98
+ border-radius: 8px;
99
+ margin-bottom: 12px;
100
+ overflow: hidden;
101
+ }
102
+
103
+ .ov-agent-connect__code-block:last-child {
104
+ margin-bottom: 0;
105
+ }
106
+
107
+ .ov-agent-connect__code-header {
108
+ border-bottom: 1px solid var(--ov-ui-agent-connect-border);
109
+ color: var(--ov-ui-agent-connect-muted);
110
+ justify-content: space-between;
111
+ align-items: center;
112
+ gap: 8px;
113
+ padding: 6px 12px;
114
+ font-size: 12px;
115
+ display: flex;
116
+ }
117
+
118
+ .ov-agent-connect__code-actions {
119
+ align-items: center;
120
+ gap: 12px;
121
+ display: flex;
122
+ }
123
+
124
+ .ov-agent-connect__code-actions button {
125
+ width: 24px;
126
+ height: 24px;
127
+ color: var(--ov-ui-agent-connect-secondary);
128
+ background: none;
129
+ border: 0;
130
+ border-radius: 4px;
131
+ justify-content: center;
132
+ align-items: center;
133
+ padding: 4px;
134
+ font-size: 12px;
135
+ display: inline-flex;
136
+ }
137
+
138
+ .ov-agent-connect__code-actions button:hover {
139
+ color: var(--ov-ui-agent-connect-primary);
140
+ }
141
+
142
+ .ov-agent-connect__code-actions button:disabled {
143
+ opacity: .6;
144
+ cursor: wait;
145
+ }
146
+
147
+ .ov-agent-connect__code-actions svg {
148
+ width: 16px;
149
+ height: 16px;
150
+ }
151
+
152
+ .ov-agent-connect .ov-agent-connect__code-block pre {
153
+ white-space: pre-wrap;
154
+ overflow-wrap: anywhere;
155
+ background: none;
156
+ border-radius: 0;
157
+ margin: 0;
158
+ padding: 12px;
159
+ font-size: 12px;
160
+ line-height: 20px;
161
+ }
162
+
163
+ .ov-agent-connect__code-block code {
164
+ font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
165
+ }
166
+
167
+ .ov-agent-connect__code-block > .ov-agent-connect__feedback:not(:empty) {
168
+ padding: 0 12px 8px;
169
+ display: block;
170
+ }
171
+
172
+ .ov-agent-connect__code-feedback {
173
+ clip-path: inset(50%);
174
+ white-space: nowrap;
175
+ width: 1px;
176
+ height: 1px;
177
+ position: absolute;
178
+ overflow: hidden;
179
+ }
180
+
82
181
  .ov-agent-connect {
83
182
  --ov-ui-agent-connect-text: var(--ov-ui-color-text-1, var(--ov-ui-text-1-default));
84
183
  --ov-ui-agent-connect-secondary: var(--ov-ui-color-text-2, var(--ov-ui-text-2-default));
@@ -409,7 +508,7 @@
409
508
  white-space: normal;
410
509
  }
411
510
 
412
- .ov-agent-connect__markdown :where(p, pre, h5, table) {
511
+ .ov-agent-connect__markdown :where(p, pre, h5, table, ul, ol, blockquote, details) {
413
512
  margin: 0 0 12px;
414
513
  }
415
514
 
@@ -421,6 +520,33 @@
421
520
  white-space: pre-wrap;
422
521
  }
423
522
 
523
+ .ov-agent-connect__markdown :where(ul, ol) {
524
+ padding-left: 24px;
525
+ }
526
+
527
+ .ov-agent-connect__markdown ul {
528
+ list-style-type: disc;
529
+ }
530
+
531
+ .ov-agent-connect__markdown ol {
532
+ list-style-type: decimal;
533
+ }
534
+
535
+ .ov-agent-connect__markdown blockquote {
536
+ border-left: 2px solid var(--ov-ui-agent-connect-border);
537
+ margin-left: 0;
538
+ padding-left: 12px;
539
+ }
540
+
541
+ .ov-agent-connect__markdown summary {
542
+ cursor: pointer;
543
+ }
544
+
545
+ .ov-agent-connect__markdown summary:focus-visible {
546
+ outline: 2px solid var(--ov-ui-agent-connect-primary);
547
+ outline-offset: 2px;
548
+ }
549
+
424
550
  .ov-agent-connect__markdown h5 {
425
551
  color: var(--ov-ui-agent-connect-text);
426
552
  font-size: 14px;
@@ -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 {
@@ -10,12 +11,14 @@ export interface AgentConnectItem {
10
11
  export interface AgentConnectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onSelect' | 'onCopy'> {
11
12
  /** 调用方提供的密钥;展示脱敏,复制保留原值。Host API key. */
12
13
  apiKey: string;
13
- /** 内置文案语言;必须由调用方指定。Required content locale. */
14
- locale: AgentConnectLocale;
14
+ /** 内置文案语言;省略时继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
15
+ locale?: AgentConnectLocale;
15
16
  /** 服务地址,默认 OpenViking 云服务。Optional service endpoint. */
16
17
  baseUrl?: string;
17
18
  /** 宿主提供的用户协议链接;未传时不显示协议引用。Host agreement URL. */
18
19
  agreementUrl?: string;
20
+ /** 是否展示境外标签,默认 false。Show Overseas tags; defaults to false. */
21
+ showOverseasTag?: boolean;
19
22
  /** 受控页签;默认 mainstream。Controlled tab; defaults to mainstream. */
20
23
  activeTabId?: AgentConnectTabId;
21
24
  /** 受控 Agent;默认 codex。Controlled agent; defaults to codex. */
@@ -24,6 +27,6 @@ export interface AgentConnectProps extends Omit<HTMLAttributes<HTMLDivElement>,
24
27
  onTabChange?: (tabId: AgentConnectTabId) => void;
25
28
  /** 返回内置目录条目的 id 和 name。Reports the built-in item id and name. */
26
29
  onSelect?: (item: AgentConnectItem) => void;
27
- /** 复制成功后通知;不负责写入剪贴板。Success notification, not clipboard writing. */
30
+ /** 复制成功后返回代码块或完整正文。Reports copied block or full-guide text. */
28
31
  onCopy?: (text: string) => void;
29
32
  }
@@ -0,0 +1,6 @@
1
+ /** 提交阶段切断过期结果;每个复制按钮拥有独立的反馈和请求状态。 */
2
+ export declare function useAgentConnectCopy(text: string, onCopy?: (text: string) => void): {
3
+ status: "copied" | "failed" | "idle" | "pending";
4
+ setRoot: (node: HTMLElement | null) => void;
5
+ copy: () => Promise<void>;
6
+ };
@@ -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
+ })[];