@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
package/dist/u~0.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Fragment as external_react_Fragment, useCallback, useId, useRef, useState } from "react";
3
+ import { resolveLocale } from "./nx~0.js";
3
4
  const SvgCodexDetail = (props)=>/*#__PURE__*/ jsxs("svg", {
4
5
  xmlns: "http://www.w3.org/2000/svg",
5
6
  xmlnsXlink: "http://www.w3.org/1999/xlink",
@@ -49,40 +50,68 @@ const SvgCodexDetail = (props)=>/*#__PURE__*/ jsxs("svg", {
49
50
  ]
50
51
  });
51
52
  const codex_detailreact = SvgCodexDetail;
52
- const AGENT_CONNECT_COPY = {
53
- zh: {
54
- title: '连接 Agent',
55
- mainstream: '接入主流 Agent',
56
- custom: '开发自己的 Agent',
57
- integration: '接入',
58
- instructions: '完整指令',
59
- copy: '复制并发送给 Agent',
60
- copyMarkdown: '复制为 Markdown',
61
- copied: '已复制',
62
- failed: '复制失败,请重试',
63
- notice: '接入后 Agent 能读到你在 OpenViking 里能看到的内容,若接入境外服务数据有可能传到境外。',
64
- seeAgreement: '详见',
65
- agreement: '《用户协议》',
66
- apiKey: 'API Key',
67
- overseas: '境外'
68
- },
69
- en: {
70
- title: 'Connect Agent',
71
- mainstream: 'Connect mainstream agents',
72
- custom: 'Build your own agent',
73
- integration: 'Integration',
74
- instructions: 'Full instructions',
75
- copy: 'Copy and send to Agent',
76
- copyMarkdown: 'Copy as Markdown',
77
- copied: 'Copied',
78
- failed: 'Copy failed. Please retry.',
79
- notice: 'Connected agents can read content available to you in OpenViking. Overseas services may transfer data abroad.',
80
- seeAgreement: ' See ',
81
- agreement: 'Terms of Service',
82
- apiKey: 'API Key',
83
- overseas: 'Overseas'
84
- }
53
+ const messages = {
54
+ title: 'Connect Agent',
55
+ mainstream: 'Connect mainstream agents',
56
+ custom: 'Build your own agent',
57
+ integration: 'Integration',
58
+ instructions: 'Full instructions',
59
+ copy: 'Copy and send to Agent',
60
+ copyMarkdown: 'Copy as Markdown',
61
+ copied: 'Copied',
62
+ failed: 'Copy failed. Please retry.',
63
+ notice: 'Connected agents can read content available to you in OpenViking. Overseas services may transfer data abroad.',
64
+ seeAgreement: ' See ',
65
+ agreement: 'Terms of Service',
66
+ apiKey: 'API Key',
67
+ overseas: 'Overseas',
68
+ hermesCustomIntro: '# Custom OpenViking server for Hermes\n\nConnect to the host-provided OpenViking server using the URL and API key in the setup steps below.\n\n',
69
+ hermesCustomStep: '3. Choose **Custom** and enter {{OPENVIKING_BASE_URL}} as the server URL.',
70
+ installerInstructions: (name, command)=>`Install the OpenViking memory plugin for ${name} and help me start using it. OpenViking is a context database for AI agents (https://github.com/volcengine/OpenViking); the command and link below are from its official docs.
71
+
72
+ 1. Run the official installer. It needs network access and writes to my home directory; if your sandbox blocks that, ask me for approval:
73
+
74
+ ${command}
75
+
76
+ 2. Once it's installed, read the OpenViking onboarding guide and use it to walk me through setup. The guide has you ask me before choices like importing history or adding a working rule. docs.openviking.ai and docs.openviking.net are the same docs site; use whichever loads: https://docs.openviking.ai/agents/en/onboarding.md
77
+
78
+ The API key is one I created for myself in the OpenViking console; the installer stores it in ~/.openviking/ovcli.conf on this machine. Use it in the command as it is; there's no need to show it in your replies, and don't write it into any other file or rule. Talk to me in English.`
79
+ };
80
+ const en_US = messages;
81
+ const zh_CN_messages = {
82
+ title: '连接 Agent',
83
+ mainstream: '接入主流 Agent',
84
+ custom: '开发自己的 Agent',
85
+ integration: '接入',
86
+ instructions: '完整指令',
87
+ copy: '复制并发送给 Agent',
88
+ copyMarkdown: '复制为 Markdown',
89
+ copied: '已复制',
90
+ failed: '复制失败,请重试',
91
+ notice: '接入后 Agent 能读到你在 OpenViking 里能看到的内容,若接入境外服务数据有可能传到境外。',
92
+ seeAgreement: '详见',
93
+ agreement: '《用户协议》',
94
+ apiKey: 'API Key',
95
+ overseas: '境外',
96
+ hermesCustomIntro: '# 为 Hermes 配置自定义 OpenViking 服务\n\n连接调用方指定的 OpenViking 服务,使用以下步骤填写服务地址和 API Key。\n\n',
97
+ hermesCustomStep: '3. 选择 **Custom**,服务地址填写 {{OPENVIKING_BASE_URL}}。',
98
+ installerInstructions: (name, command)=>`帮我为 ${name} 安装 OpenViking 记忆插件,并带我开始使用。OpenViking 是为 Agent 提供的上下文数据库(https://github.com/volcengine/OpenViking),下面的命令和链接来自它的官方文档。
99
+
100
+ 1. 运行官方安装器。它需要联网并写入我的主目录,如果被你的沙箱拦住,请向我申请批准:
101
+
102
+ ${command}
103
+
104
+ 2. 装好后读 OpenViking 的接入引导,按它带我完成设置。导入历史、写协作规则这类选择,引导会让你先问我。docs.openviking.ai 和 docs.openviking.net 是同一个文档站,哪个打得开用哪个:https://docs.openviking.ai/agents/zh/onboarding.md
105
+
106
+ API key 是我在 OpenViking 控制台给自己生成的,安装器会把它存到本机的 ~/.openviking/ovcli.conf。命令里原样使用就行,回复里不用再显示它,也不要写进别的文件或规则。全程用中文和我交流。`
85
107
  };
108
+ const zh_CN = zh_CN_messages;
109
+ function resolveAgentConnectLabels(locale) {
110
+ return resolveLocale({
111
+ 'en-US': en_US,
112
+ 'zh-CN': zh_CN
113
+ }, locale);
114
+ }
86
115
  const content_zh = {
87
116
  codex: {
88
117
  name: 'Codex',
@@ -462,30 +491,18 @@ function shellArgument(value) {
462
491
  return `'${value.replace(/'/g, "'\"'\"'")}'`;
463
492
  }
464
493
  function getInstallerInstructions(name, harness, locale, apiKey, baseUrl) {
465
- const command = `curl -fsSL https://openviking.ai/install | bash -s -- --yes --lang ${locale} --harness ${harness},cli --url ${shellArgument(baseUrl)} --api-key ${shellArgument(apiKey)}`;
466
- return 'zh' === locale ? `帮我为 ${name} 安装 OpenViking 记忆插件,并带我开始使用。OpenViking 是为 Agent 提供的上下文数据库(https://github.com/volcengine/OpenViking),下面的命令和链接来自它的官方文档。
467
-
468
- 1. 运行官方安装器。它需要联网并写入我的主目录,如果被你的沙箱拦住,请向我申请批准:
469
-
470
- ${command}
471
-
472
- 2. 装好后读 OpenViking 的接入引导,按它带我完成设置。导入历史、写协作规则这类选择,引导会让你先问我。docs.openviking.ai 和 docs.openviking.net 是同一个文档站,哪个打得开用哪个:https://docs.openviking.ai/agents/zh/onboarding.md
473
-
474
- API key 是我在 OpenViking 控制台给自己生成的,安装器会把它存到本机的 ~/.openviking/ovcli.conf。命令里原样使用就行,回复里不用再显示它,也不要写进别的文件或规则。全程用中文和我交流。` : `Install the OpenViking memory plugin for ${name} and help me start using it. OpenViking is a context database for AI agents (https://github.com/volcengine/OpenViking); the command and link below are from its official docs.
475
-
476
- 1. Run the official installer. It needs network access and writes to my home directory; if your sandbox blocks that, ask me for approval:
477
-
478
- ${command}
479
-
480
- 2. Once it's installed, read the OpenViking onboarding guide and use it to walk me through setup. The guide has you ask me before choices like importing history or adding a working rule. docs.openviking.ai and docs.openviking.net are the same docs site; use whichever loads: https://docs.openviking.ai/agents/en/onboarding.md
481
-
482
- The API key is one I created for myself in the OpenViking console; the installer stores it in ~/.openviking/ovcli.conf on this machine. Use it in the command as it is; there's no need to show it in your replies, and don't write it into any other file or rule. Talk to me in English.`;
494
+ const command = `curl -fsSL https://openviking.ai/install | bash -s -- --yes --lang ${'zh-CN' === locale ? 'zh' : 'en'} --harness ${harness},cli --url ${shellArgument(baseUrl)} --api-key ${shellArgument(apiKey)}`;
495
+ return resolveAgentConnectLabels(locale).installerInstructions(name, command);
483
496
  }
484
497
  const DEFAULT_BASE_URL = 'https://api.vikingdb.cn-beijing.volces.com/openviking';
485
498
  function getAgentConnectContent(locale) {
486
- return 'en' === locale ? content_en : content_zh;
499
+ return resolveLocale({
500
+ 'en-US': content_en,
501
+ 'zh-CN': content_zh
502
+ }, locale);
487
503
  }
488
504
  function getAgentConnectInstructions(id, locale, apiKey, baseUrl, guideId) {
505
+ const text = resolveAgentConnectLabels(locale);
489
506
  const content = getAgentConnectContent(locale)[id];
490
507
  const harness = INSTALLER_HARNESSES[id];
491
508
  if (harness) {
@@ -499,8 +516,8 @@ function getAgentConnectInstructions(id, locale, apiKey, baseUrl, guideId) {
499
516
  const guide = content.guides.find((item)=>item.id === guideId);
500
517
  let template = guide?.markdown ?? content.markdown;
501
518
  if ('hermes' === id && baseUrl.replace(/\/+$/, '') !== DEFAULT_BASE_URL) {
502
- template = template.replace(/^[\s\S]*?(?=^## )/m, ()=>'zh' === locale ? '# 为 Hermes 配置自定义 OpenViking 服务\n\n连接调用方指定的 OpenViking 服务,使用以下步骤填写服务地址和 API Key。\n\n' : '# Custom OpenViking server for Hermes\n\nConnect to the host-provided OpenViking server using the URL and API key in the setup steps below.\n\n');
503
- template = template.replace(/^3\. (?:选择|Choose) \*\*OpenViking Service \(VolcEngine Cloud\)\*\*[。.][ \t]*$/m, ()=>'zh' === locale ? '3. 选择 **Custom**,服务地址填写 {{OPENVIKING_BASE_URL}}。' : '3. Choose **Custom** and enter {{OPENVIKING_BASE_URL}} as the server URL.');
519
+ template = template.replace(/^[\s\S]*?(?=^## )/m, ()=>text.hermesCustomIntro);
520
+ template = template.replace(/^3\. (?:选择|Choose) \*\*OpenViking Service \(VolcEngine Cloud\)\*\*[。.][ \t]*$/m, ()=>text.hermesCustomStep);
504
521
  }
505
522
  if (!/\{\{OPENVIKING_API_KEY/.test(template)) template += '\n\nBase URL: {{OPENVIKING_BASE_URL}}\n\nAPI Key:\n\n{{OPENVIKING_API_KEY_BLOCK}}';
506
523
  const pathBaseUrl = baseUrl.replace(/\/+$/, '');
@@ -648,7 +665,7 @@ function AgentConnectInstructionsView({ instructions, locale, agreementUrl, onCo
648
665
  const setRoot = useCallback((node)=>{
649
666
  mounted.current = null !== node;
650
667
  }, []);
651
- const labels = AGENT_CONNECT_COPY[locale];
668
+ const labels = resolveAgentConnectLabels(locale);
652
669
  const message = 'copied' === status ? labels.copied : 'failed' === status ? labels.failed : '';
653
670
  const copyLabel = instructions.fixed ? labels.copy : labels.copyMarkdown;
654
671
  async function handleCopy() {
@@ -739,7 +756,7 @@ function AgentConnectDetailView({ selected, apiKey, locale, baseUrl, agreementUr
739
756
  baseUrl,
740
757
  revision: credentials.revision + 1
741
758
  });
742
- const labels = AGENT_CONNECT_COPY[locale];
759
+ const labels = resolveAgentConnectLabels(locale);
743
760
  const title = selected.name.endsWith(labels.integration) ? selected.name : `${selected.name} ${labels.integration}`;
744
761
  return /*#__PURE__*/ jsxs("section", {
745
762
  className: "ov-agent-connect__detail",
@@ -1451,7 +1468,7 @@ const custom = [
1451
1468
  ];
1452
1469
  function getAgentConnectDesign(locale) {
1453
1470
  const content = getAgentConnectContent(locale);
1454
- const labels = AGENT_CONNECT_COPY[locale];
1471
+ const labels = resolveAgentConnectLabels(locale);
1455
1472
  return {
1456
1473
  tabs: [
1457
1474
  {
@@ -1489,7 +1506,7 @@ function AgentConnect({ apiKey, locale, baseUrl = DEFAULT_BASE_URL, agreementUrl
1489
1506
  const activeTabId = controlledTabId ?? localTabId;
1490
1507
  const selectedId = controlledSelectedId ?? localSelection[activeTabId];
1491
1508
  const design = getAgentConnectDesign(locale);
1492
- const labels = AGENT_CONNECT_COPY[locale];
1509
+ const labels = resolveAgentConnectLabels(locale);
1493
1510
  const tabs = design.tabs;
1494
1511
  const items = design[activeTabId];
1495
1512
  const activeIndex = Math.max(0, tabs.findIndex((tab)=>tab.id === activeTabId));