@openviking/react 0.1.8-beta.10.1.g8e5299efeb0a → 0.1.8-beta.12.1.g83d24ca4fc6f

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.
package/dist/3c~0.js CHANGED
@@ -621,8 +621,8 @@ function useTuiComposerKeyboard({ inputRef, value, history, completion, inline,
621
621
  handleKeyDown
622
622
  };
623
623
  }
624
- const TUI_URI_PATTERN = /viking:\/\/[^\s"'<>`]+/g;
625
- const TUI_PROSE_URI_PATTERN = /viking:\/\/[^\s,,。;;、"'<>()[\]]+/g;
624
+ const TUI_URI_PATTERN = /(?:viking|https?):\/\/[^\s"'<>`]+/g;
625
+ const TUI_PROSE_URI_PATTERN = /(?:viking|https?):\/\/[^\s,,。;;、"'<>()[\]]+/g;
626
626
  function getTuiSafeHref(uri) {
627
627
  const href = uri?.trim();
628
628
  return href && /^(?:viking|https?):\/\/[^\s]+$/i.test(href) ? href : void 0;
@@ -921,14 +921,24 @@ function TuiComposer({ anchorRef, assistId, onFocus, onDismiss, onRequestPalette
921
921
  ]
922
922
  });
923
923
  }
924
- function pickTuiCommands(names = [], commands) {
924
+ function pickTuiCommands(shortcuts = [], commands) {
925
925
  const byName = new Map(commands.map((command)=>[
926
926
  command.name,
927
927
  command
928
928
  ]));
929
+ const firstByName = new Map();
930
+ for (const shortcut of shortcuts)if (!firstByName.has(shortcut.name)) firstByName.set(shortcut.name, shortcut);
929
931
  return [
930
- ...new Set(names)
931
- ].flatMap((name)=>byName.get(name) ?? []);
932
+ ...firstByName.values()
933
+ ].flatMap((shortcut)=>{
934
+ const command = byName.get(shortcut.name);
935
+ return command ? [
936
+ {
937
+ ...command,
938
+ value: shortcut.value
939
+ }
940
+ ] : [];
941
+ });
932
942
  }
933
943
  function TuiEmptyRegion({ emptyState, commands, labels, disabled, onPick }) {
934
944
  if (void 0 !== emptyState) return null === emptyState ? null : /*#__PURE__*/ jsx("div", {
@@ -959,7 +969,7 @@ function TuiEmptyRegion({ emptyState, commands, labels, disabled, onPick }) {
959
969
  type: "button",
960
970
  className: "ov-tui__empty-action",
961
971
  disabled: disabled,
962
- onClick: ()=>onPick(command),
972
+ onClick: ()=>onPick(command.value),
963
973
  children: [
964
974
  /*#__PURE__*/ jsx(ArrowRightIcon, {
965
975
  width: 14,
@@ -2117,13 +2127,14 @@ function Tui({ records, value, disabled = false, emptyState, quickCommands, loca
2117
2127
  onValueChange?.(next);
2118
2128
  };
2119
2129
  const readOnly = !onValueChange;
2120
- const fillCommand = (next)=>{
2130
+ const fillInput = (next)=>{
2121
2131
  if (disabled || readOnly) return;
2122
- updateValue(formatTuiCommandInput(next, commands));
2132
+ updateValue(next);
2123
2133
  composerRef.current?.querySelector('textarea')?.focus({
2124
2134
  preventScroll: true
2125
2135
  });
2126
2136
  };
2137
+ const fillCommand = (next)=>fillInput(formatTuiCommandInput(next, commands));
2127
2138
  const completion = useTuiCompletion(value, !disabled && !readOnly && dismissedValue !== value, commands, commandGroups, paletteScope);
2128
2139
  const queryKey = value;
2129
2140
  const activeIndex = selection.queryKey === queryKey && selection.index < completion.options.length ? selection.index : -1;
@@ -2171,7 +2182,7 @@ function Tui({ records, value, disabled = false, emptyState, quickCommands, loca
2171
2182
  commands: pickTuiCommands(quickCommands, commands),
2172
2183
  labels: text,
2173
2184
  disabled: disabled || readOnly,
2174
- onPick: (command)=>fillCommand(`${command.name} `)
2185
+ onPick: fillInput
2175
2186
  })
2176
2187
  }),
2177
2188
  /*#__PURE__*/ jsx(TuiAssist, {
@@ -2,9 +2,10 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { ChatMessageList } from "@ark-design/ui/message-list";
3
3
  import { Bubble, BubbleTools } from "@ark-design/ui/bubble";
4
4
  import { ErrorCard } from "@ark-design/ui/error-card";
5
- import { useEffect, useMemo, useState } from "react";
5
+ import { Fragment as external_react_Fragment, useEffect, useMemo, useState } from "react";
6
6
  import { ActivityTimeline } from "@ark-design/ui/activity-timeline";
7
7
  import { MDRenderer } from "@ark-design/ui/markdown-renderer";
8
+ import { UserMessageFileList } from "@ark-design/ui/user-message-file-list";
8
9
  import { DocumentIcon } from "./k~0.js";
9
10
  import { VikingBotIcon } from "./lg~0.js";
10
11
  import { groupActivityParts, mergeToolResults, resolveVikingBotLabels, toRenderItems } from "./c~0.js";
@@ -553,6 +554,49 @@ function MessageFooter({ message, showTime, labels, locale, onCopy }) {
553
554
  ]
554
555
  });
555
556
  }
557
+ function UserMessageGroup({ message, labels, footer, onOpenUri }) {
558
+ const attachments = message.parts.filter((part)=>'attachment' === part.type);
559
+ const parts = message.parts.filter((part)=>'attachment' !== part.type);
560
+ const hasContent = parts.some((part)=>'text' !== part.type || Boolean(part.text));
561
+ if (!hasContent && 0 === attachments.length) return null;
562
+ return /*#__PURE__*/ jsxs("div", {
563
+ className: "ov-viking-bot__user-message-group",
564
+ children: [
565
+ attachments.length > 0 ? /*#__PURE__*/ jsx(UserMessageFileList, {
566
+ className: "ov-viking-bot__user-message-attachments",
567
+ items: attachments.map((part, index)=>({
568
+ id: part.uri ?? String(index),
569
+ title: part.name,
570
+ previewEnabled: false
571
+ })),
572
+ renderItem: (_item, index)=>/*#__PURE__*/ jsx(external_react_Fragment, {
573
+ children: renderPart(attachments[index], {
574
+ labels,
575
+ onOpenUri
576
+ })
577
+ }, index)
578
+ }) : null,
579
+ hasContent ? /*#__PURE__*/ jsx(Bubble, {
580
+ className: "ov-viking-bot__user-bubble",
581
+ placement: "end",
582
+ variant: "filled",
583
+ maxHeight: "9999px",
584
+ footer: footer,
585
+ children: /*#__PURE__*/ jsx("div", {
586
+ className: "ov-viking-bot__user-message-content",
587
+ children: /*#__PURE__*/ jsx(MessageBody, {
588
+ message: {
589
+ ...message,
590
+ parts
591
+ },
592
+ labels: labels,
593
+ onOpenUri: onOpenUri
594
+ })
595
+ })
596
+ }) : footer
597
+ ]
598
+ });
599
+ }
556
600
  function MessageActions({ message, onMessageAction }) {
557
601
  const actions = message.actions ?? (message.action ? [
558
602
  {
@@ -599,13 +643,11 @@ function VikingBotMessageRow({ message, labels, onOpenUri, onCopy, onMessageActi
599
643
  return /*#__PURE__*/ jsxs("article", {
600
644
  className: `ov-viking-bot__message ov-viking-bot__message--${message.role}`,
601
645
  children: [
602
- 'user' === message.role ? /*#__PURE__*/ jsx(Bubble, {
603
- className: "ov-viking-bot__user-bubble",
604
- placement: "end",
605
- variant: "filled",
606
- maxHeight: "9999px",
607
- footer: footer,
608
- children: body
646
+ 'user' === message.role ? /*#__PURE__*/ jsx(UserMessageGroup, {
647
+ message: message,
648
+ labels: labels,
649
+ onOpenUri: onOpenUri,
650
+ footer: footer
609
651
  }) : message.streaming && 0 === message.parts.length ? /*#__PURE__*/ jsx(Bubble, {
610
652
  loading: true,
611
653
  placement: "start",
package/dist/a~0.js CHANGED
@@ -1211,7 +1211,10 @@ const DEFAULT_QUICK_COMMANDS = [
1211
1211
  'find',
1212
1212
  'read',
1213
1213
  'status'
1214
- ];
1214
+ ].map((name)=>({
1215
+ name,
1216
+ value: `ov ${name} `
1217
+ }));
1215
1218
  function Console({ mode, defaultMode, locale: localeProp, quickCommands = DEFAULT_QUICK_COMMANDS, scopeKey, requestOptions, onModeChange, onOpenUri, conversation, slots, labels: overrides, className, ...rest }) {
1216
1219
  const locale = useLocale(localeProp);
1217
1220
  const state = useConsole({
@@ -11701,7 +11701,6 @@ html.dark .ov-wiki-dashboard, html.dark .ov-experience-dashboard, html.dark .ov-
11701
11701
  border: 1px solid var(--ov-viking-bot-border);
11702
11702
  border-radius: var(--ov-viking-bot-radius);
11703
11703
  max-width: 100%;
11704
- color: var(--ov-viking-bot-accent);
11705
11704
  font: inherit;
11706
11705
  overflow-wrap: anywhere;
11707
11706
  cursor: pointer;
@@ -11711,6 +11710,14 @@ html.dark .ov-wiki-dashboard, html.dark .ov-experience-dashboard, html.dark .ov-
11711
11710
  font-size: 12px;
11712
11711
  }
11713
11712
 
11713
+ .ov-viking-bot__context {
11714
+ color: var(--ov-viking-bot-accent);
11715
+ }
11716
+
11717
+ .ov-viking-bot__attachment {
11718
+ color: var(--ov-ui-color-text-2, var(--ov-ui-text-2-default));
11719
+ }
11720
+
11714
11721
  .ov-viking-bot__context:hover, .ov-viking-bot__attachment:hover {
11715
11722
  background: var(--ov-viking-bot-surface-hover);
11716
11723
  }
@@ -13487,6 +13494,23 @@ textarea.ov-viking-bot__interaction-input {
13487
13494
  }
13488
13495
  }
13489
13496
 
13497
+ /*!
13498
+ * Copyright (c) 2026 Bytedance, Inc. and its affiliates.
13499
+ * SPDX-License-Identifier: MIT
13500
+ */
13501
+ /*!
13502
+ * Copyright (c) 2026 Bytedance, Inc. and its affiliates.
13503
+ * SPDX-License-Identifier: MIT
13504
+ */
13505
+ .ark-agentic-user-message-file-list-user-message-file-list-1 {
13506
+ justify-content: flex-end;
13507
+ align-items: flex-start;
13508
+ gap: .5rem;
13509
+ width: 100%;
13510
+ display: flex;
13511
+ overflow: auto hidden;
13512
+ }
13513
+
13490
13514
  /*!
13491
13515
  * Copyright (c) 2026 Bytedance, Inc. and its affiliates.
13492
13516
  * SPDX-License-Identifier: MIT
@@ -20060,54 +20084,134 @@ html.dark .ov-wiki-dashboard, html.dark .ov-experience-dashboard, html.dark .ov-
20060
20084
  outline: none;
20061
20085
  }
20062
20086
 
20063
- .ov-viking-bot__reference-tags {
20064
- flex-wrap: wrap;
20087
+ .ov-viking-bot__quick-inputs button:not(.ov-button):focus-visible, .ov-viking-bot__session-history button:not(.ov-button):focus-visible {
20088
+ outline: 2px solid var(--ov-ui-color-focus, var(--ov-ui-focus-default));
20089
+ outline-offset: 2px;
20090
+ }
20091
+
20092
+ .ov-viking-bot__quick-inputs button:not(.ov-button):disabled {
20093
+ opacity: .5;
20094
+ cursor: not-allowed;
20095
+ }
20096
+
20097
+ .ov-viking-bot__attach > svg {
20098
+ width: 10.208px;
20099
+ height: 10.208px;
20100
+ }
20101
+
20102
+ .ov-viking-bot__reference-tags, .ov-viking-bot__reference-overflow {
20103
+ flex-direction: column;
20104
+ align-items: flex-start;
20065
20105
  gap: 6px;
20066
- margin: 0 0 8px;
20067
- padding: 0;
20068
- list-style: none;
20106
+ min-width: 0;
20069
20107
  display: flex;
20070
20108
  }
20071
20109
 
20072
- .ov-viking-bot__reference-tags li {
20073
- background: var(--ov-ui-color-bg-5, var(--ov-ui-bg-5-default));
20074
- border-radius: 6px;
20110
+ .ov-viking-bot__reference-tags {
20111
+ margin-bottom: 10px;
20112
+ }
20113
+
20114
+ .ov-viking-bot__reference-row {
20075
20115
  align-items: center;
20076
20116
  gap: 4px;
20077
20117
  min-width: 0;
20078
20118
  max-width: 100%;
20079
- padding: 4px 6px;
20119
+ display: flex;
20120
+ }
20121
+
20122
+ .ov-viking-bot__reference-tag, .ov-viking-bot__reference-more {
20123
+ box-sizing: border-box;
20124
+ background: var(--ov-ui-color-bg-3, var(--ov-ui-bg-3-default));
20125
+ max-width: 100%;
20126
+ height: 26px;
20127
+ color: var(--ov-ui-color-text-2, var(--ov-ui-text-2-default));
20128
+ letter-spacing: .036px;
20129
+ border: 0;
20130
+ border-radius: 6px;
20131
+ align-items: center;
20132
+ gap: 4px;
20133
+ padding: 3px 8px;
20134
+ font-family: Roboto, PingFang SC, sans-serif;
20135
+ font-size: 12px;
20136
+ font-weight: 400;
20137
+ line-height: 20px;
20080
20138
  display: inline-flex;
20081
20139
  }
20082
20140
 
20083
- .ov-viking-bot__reference-tags li > span {
20141
+ .ov-viking-bot__reference-tag {
20142
+ min-width: 0;
20143
+ }
20144
+
20145
+ .ov-viking-bot__reference-tag > svg {
20146
+ flex-shrink: 0;
20147
+ }
20148
+
20149
+ .ov-viking-bot__reference-icon {
20150
+ color: var(--ov-ui-viking-bot-reference-icon-light);
20151
+ }
20152
+
20153
+ .dark .ov-viking-bot__reference-icon {
20154
+ color: var(--ov-ui-viking-bot-reference-icon-dark);
20155
+ }
20156
+
20157
+ .ov-viking-bot__reference-path {
20084
20158
  text-overflow: ellipsis;
20085
20159
  white-space: nowrap;
20086
20160
  min-width: 0;
20087
20161
  overflow: hidden;
20088
20162
  }
20089
20163
 
20090
- .ov-viking-bot__reference-tags button:not(.ov-button) {
20164
+ .ov-viking-bot__reference-open {
20165
+ min-width: 0;
20091
20166
  color: inherit;
20167
+ font: inherit;
20168
+ text-align: start;
20092
20169
  cursor: pointer;
20093
20170
  background: none;
20094
20171
  border: 0;
20095
- padding: 0 2px;
20172
+ padding: 0;
20173
+ display: inline-flex;
20174
+ overflow: hidden;
20175
+ }
20176
+
20177
+ .ov-viking-bot__reference-open:hover {
20178
+ color: var(--ov-ui-color-primary, var(--ov-ui-primary-default));
20179
+ }
20180
+
20181
+ .ov-viking-bot__reference-remove {
20182
+ width: 14px;
20183
+ height: 14px;
20184
+ color: var(--ov-ui-color-text-3, var(--ov-ui-text-3-default));
20185
+ cursor: pointer;
20186
+ background: none;
20187
+ border: 0;
20188
+ border-radius: 2px;
20189
+ flex-shrink: 0;
20190
+ justify-content: center;
20191
+ align-items: center;
20192
+ padding: 0;
20193
+ display: inline-flex;
20194
+ }
20195
+
20196
+ .ov-viking-bot__reference-more {
20197
+ cursor: pointer;
20198
+ flex-shrink: 0;
20096
20199
  }
20097
20200
 
20098
- .ov-viking-bot__quick-inputs button:not(.ov-button):focus-visible, .ov-viking-bot__session-history button:not(.ov-button):focus-visible, .ov-viking-bot__reference-tags button:not(.ov-button):focus-visible {
20201
+ .ov-viking-bot__reference-open:focus-visible, .ov-viking-bot__reference-more:focus-visible, .ov-viking-bot__reference-remove:focus-visible {
20099
20202
  outline: 2px solid var(--ov-ui-color-focus, var(--ov-ui-focus-default));
20100
20203
  outline-offset: 2px;
20101
20204
  }
20102
20205
 
20103
- .ov-viking-bot__quick-inputs button:not(.ov-button):disabled {
20104
- opacity: .5;
20206
+ .ov-viking-bot__reference-remove:disabled {
20105
20207
  cursor: not-allowed;
20208
+ opacity: .5;
20106
20209
  }
20107
20210
 
20108
- .ov-viking-bot__attach > svg {
20109
- width: 10.208px;
20110
- height: 10.208px;
20211
+ .ov-viking-bot__reference-overflow {
20212
+ max-width: min(440px, 100vw - 48px);
20213
+ max-height: min(360px, 50vh);
20214
+ overflow-y: auto;
20111
20215
  }
20112
20216
 
20113
20217
  .ov-viking-bot__list {
@@ -20128,6 +20232,15 @@ html.dark .ov-wiki-dashboard, html.dark .ov-experience-dashboard, html.dark .ov-
20128
20232
  padding-left: 32px;
20129
20233
  }
20130
20234
 
20235
+ .ov-viking-bot__user-message-group {
20236
+ flex-direction: column;
20237
+ align-items: flex-end;
20238
+ gap: 6px;
20239
+ width: min(88%, 960px);
20240
+ max-width: 100%;
20241
+ display: flex;
20242
+ }
20243
+
20131
20244
  .ov-viking-bot__user-bubble {
20132
20245
  --agentic-bubble-content-max-width: 100%;
20133
20246
  --agentic-bubble-content-filled-bg: var(--ov-ui-color-bg-3, var(--ov-ui-bg-3-default));
@@ -20136,10 +20249,30 @@ html.dark .ov-wiki-dashboard, html.dark .ov-experience-dashboard, html.dark .ov-
20136
20249
  --agentic-bubble-content-radius-default: 16px;
20137
20250
  --agentic-bubble-content-font-size: 14px;
20138
20251
  --agentic-bubble-content-line-height: 22px;
20139
- width: min(88%, 960px);
20140
20252
  max-width: 100%;
20141
20253
  }
20142
20254
 
20255
+ .ov-viking-bot__user-message-content {
20256
+ flex-direction: column;
20257
+ align-items: flex-start;
20258
+ gap: 6px;
20259
+ width: max-content;
20260
+ max-width: 100%;
20261
+ display: flex;
20262
+ }
20263
+
20264
+ .ov-viking-bot__user-message-attachments {
20265
+ flex-wrap: wrap;
20266
+ justify-content: flex-end;
20267
+ align-self: flex-end;
20268
+ align-items: center;
20269
+ gap: 8px;
20270
+ width: 100%;
20271
+ max-width: 100%;
20272
+ display: flex;
20273
+ overflow: visible;
20274
+ }
20275
+
20143
20276
  .ov-viking-bot__user-bubble .ark-agentic-bubble__content {
20144
20277
  inline-size: max-content;
20145
20278
  max-inline-size: 100%;
@@ -20185,7 +20318,7 @@ html.dark .ov-wiki-dashboard, html.dark .ov-experience-dashboard, html.dark .ov-
20185
20318
  display: inline-flex;
20186
20319
  }
20187
20320
 
20188
- .ov-viking-bot__message:hover .ov-viking-bot__message-footer, .ov-viking-bot__message:focus-within .ov-viking-bot__message-footer {
20321
+ .ov-viking-bot__message:not(.ov-viking-bot__message--user):hover .ov-viking-bot__message-footer, .ov-viking-bot__message:not(.ov-viking-bot__message--user):focus-within .ov-viking-bot__message-footer, .ov-viking-bot__user-message-group:hover .ov-viking-bot__message-footer, .ov-viking-bot__user-message-group:focus-within .ov-viking-bot__message-footer {
20189
20322
  opacity: 1;
20190
20323
  pointer-events: auto;
20191
20324
  }
@@ -1 +1,2 @@
1
1
  export * from './tui.js';
2
+ export type { TuiQuickCommand } from './types.js';
@@ -1,5 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { TuiCommandDefinition } from './command-catalog.js';
3
+ import type { TuiQuickCommand } from './types.js';
3
4
  import type { ResolvedTuiLabels } from './tui-labels.js';
4
5
  /**
5
6
  * 按名称从宿主目录中取快捷命令,保持传入顺序,未命中的名称直接跳过。
@@ -8,7 +9,7 @@ import type { ResolvedTuiLabels } from './tui-labels.js';
8
9
  * names the catalogue does not contain. Repeated names keep their first
9
10
  * occurrence so one command never renders as sibling nodes with the same key.
10
11
  */
11
- export declare function pickTuiCommands(names: readonly string[] | undefined, commands: readonly TuiCommandDefinition[]): readonly TuiCommandDefinition[];
12
+ export declare function pickTuiCommands(shortcuts: readonly TuiQuickCommand[] | undefined, commands: readonly TuiCommandDefinition[]): readonly (TuiCommandDefinition & TuiQuickCommand)[];
12
13
  /**
13
14
  * 无记录时的空态区域。宿主节点优先;否则展示内置空态,没有可用快捷命令时
14
15
  * 不渲染任何内容。
@@ -18,8 +19,8 @@ export declare function pickTuiCommands(names: readonly string[] | undefined, co
18
19
  */
19
20
  export declare function TuiEmptyRegion({ emptyState, commands, labels, disabled, onPick, }: {
20
21
  emptyState?: ReactNode;
21
- commands: readonly TuiCommandDefinition[];
22
+ commands: readonly (TuiCommandDefinition & TuiQuickCommand)[];
22
23
  labels: ResolvedTuiLabels;
23
24
  disabled?: boolean;
24
- onPick: (command: TuiCommandDefinition) => void;
25
+ onPick: (value: string) => void;
25
26
  }): import("react").JSX.Element | null;
@@ -465,6 +465,13 @@ export interface TuiLabels {
465
465
  /** 格式化已过去的整小时。Formats elapsed whole hours. */
466
466
  formatHoursAgo?: (hours: number) => string;
467
467
  }
468
+ /** 空态快捷入口。One empty-state shortcut. */
469
+ export interface TuiQuickCommand {
470
+ /** 匹配 commands 的名称,复用其说明。Name matched in commands to reuse its copy. */
471
+ name: string;
472
+ /** 原样填入的完整命令;空字符串清空输入,不回退到命令前缀。Full input text; an empty string clears the input without a prefix fallback. */
473
+ value: string;
474
+ }
468
475
  /**
469
476
  * 当前命令记录、结果与输入区的公开接口;会话、历史面板和外层工具栏由宿主组合。
470
477
  * 提供命令补全、参数提示与帮助。
@@ -504,15 +511,15 @@ export interface TuiProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCopy'
504
511
  */
505
512
  emptyState?: ReactNode;
506
513
  /**
507
- * 内置空态展示的快捷命令名称,按数组顺序取自 `commands`,未命中的名称跳过,
508
- * 重复名称只保留首次出现。
509
- * 点击后填入输入框并聚焦,不提交命令。
510
- * Quick command names rendered by the built-in empty state, resolved from
511
- * `commands` in array order; unknown names are skipped and repeats keep their
512
- * first occurrence. Selecting one fills
513
- * and focuses the input without submitting.
514
+ * 内置空态快捷入口;name 按顺序匹配 commands 并复用 summary/description,
515
+ * 未命中的名称跳过,重复名称只保留首次出现。
516
+ * 点击后原样填入 value 并聚焦,不添加前缀、不提交;空字符串清空输入。
517
+ * Built-in empty-state shortcuts. Names resolve copy from commands in order;
518
+ * unknown names are skipped and repeats keep their first occurrence.
519
+ * Selection fills value verbatim and focuses without adding a prefix or
520
+ * submitting. An empty value clears the input.
514
521
  */
515
- quickCommands?: readonly string[];
522
+ quickCommands?: readonly TuiQuickCommand[];
516
523
  /** 宿主提供的命令目录;省略时无候选和参数帮助,仍可提交文本。 */
517
524
  commands?: readonly TuiCommandDefinition[];
518
525
  /** 宿主提供的分组名称与顺序;未声明的组按目录顺序追加。 */
@@ -1,9 +1,10 @@
1
1
  import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
2
  /** Private non-modal popover shared by history and the reference toolbar. */
3
- export declare function BotPopover({ label, trigger: renderTrigger, children, placement, onOpen, }: {
3
+ export declare function BotPopover({ label, trigger: renderTrigger, children, placement, onOpen, hover, }: {
4
4
  label: string;
5
5
  trigger: (props: ButtonHTMLAttributes<HTMLButtonElement>) => ReactNode;
6
6
  children: (close: () => void) => ReactNode;
7
7
  placement?: 'top' | 'bottom';
8
8
  onOpen?: () => void;
9
+ hover?: boolean;
9
10
  }): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { VikingBotReferences } from './capabilities.js';
2
+ import type { VikingBotLabels } from './model.js';
3
+ export declare function ReferenceTags({ config, labels, disabled, onOpenUri, }: {
4
+ config?: VikingBotReferences;
5
+ labels: Required<VikingBotLabels>;
6
+ disabled?: boolean;
7
+ onOpenUri?: (uri: string) => void;
8
+ }): import("react").JSX.Element | null;
@@ -13,8 +13,3 @@ export declare function ReferenceButton({ locale, config, disabled, labels, send
13
13
  locale: Locale;
14
14
  senderRef: RefObject<SenderInstance | null>;
15
15
  }): import("react").JSX.Element;
16
- export declare function ReferenceTags({ config, labels, disabled, }: {
17
- config?: VikingBotReferences;
18
- labels: Required<VikingBotLabels>;
19
- disabled?: boolean;
20
- }): import("react").JSX.Element | null;
@@ -13,6 +13,7 @@ declare const messages: {
13
13
  searchReferences: string;
14
14
  emptyReferences: string;
15
15
  removeReference: string;
16
+ openReference: string;
16
17
  expandReference: string;
17
18
  collapseReference: string;
18
19
  welcomeTitle: string;
@@ -13,6 +13,7 @@ declare const messages: {
13
13
  searchReferences: string;
14
14
  emptyReferences: string;
15
15
  removeReference: string;
16
+ openReference: string;
16
17
  expandReference: string;
17
18
  collapseReference: string;
18
19
  welcomeTitle: string;
@@ -237,6 +237,7 @@ export interface VikingBotLabels {
237
237
  searchReferences?: string;
238
238
  emptyReferences?: string;
239
239
  removeReference?: string;
240
+ openReference?: string;
240
241
  expandReference?: string;
241
242
  collapseReference?: string;
242
243
  /** 欢迎标题。Welcome heading. */
@@ -0,0 +1,3 @@
1
+ import type { KeyboardEvent } from 'react';
2
+ /** Match the native popover's logical Tab order across the portal boundary. */
3
+ export declare function navigatePopoverTab(event: KeyboardEvent<HTMLElement>, anchor: HTMLElement | null, surface: HTMLElement | null, close: () => void): void;