@openviking/react 0.1.4 → 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.
- package/README.md +3 -1
- package/dist/28~0.js +15 -0
- package/dist/2~0.js +6 -3
- package/dist/3c~0.js +3 -1
- package/dist/3~0.js +3 -1
- package/dist/ae~0.js +6 -2
- package/dist/a~0.js +77 -70
- package/dist/client/provider.d.ts +10 -6
- package/dist/components/agent-connect/agent-connect-code-block.d.ts +14 -0
- package/dist/components/agent-connect/agent-connect-copy.d.ts +3 -0
- package/dist/components/agent-connect/agent-connect-design.d.ts +1 -1
- package/dist/components/agent-connect/agent-connect-installer.d.ts +1 -0
- package/dist/components/agent-connect/agent-connect-instructions-view.d.ts +4 -6
- package/dist/components/agent-connect/agent-connect-instructions.d.ts +13 -0
- package/dist/components/agent-connect/agent-connect-markdown.d.ts +8 -2
- package/dist/components/agent-connect/agent-connect-mask.d.ts +10 -0
- package/dist/components/agent-connect/agent-connect.d.ts +1 -1
- package/dist/components/agent-connect/locales/en-US.d.ts +3 -0
- package/dist/components/agent-connect/style.css +115 -1
- package/dist/components/agent-connect/types.d.ts +5 -3
- package/dist/components/agent-connect/use-agent-connect-copy.d.ts +6 -0
- package/dist/components/directory-tour/types.d.ts +2 -1
- package/dist/components/file-browser-entries/file-browser-entries.d.ts +1 -1
- package/dist/components/file-browser-entries/style.css +115 -1
- package/dist/components/file-browser-entries/types.d.ts +2 -2
- package/dist/components/file-preview/types.d.ts +2 -2
- package/dist/components/file-tree/types.d.ts +2 -2
- package/dist/components/scope-switcher/scope-switcher.d.ts +2 -2
- package/dist/components/scope-switcher/types.d.ts +5 -5
- package/dist/components/style.css +230 -2
- package/dist/components/tui/tui.d.ts +1 -1
- package/dist/components/tui/types.d.ts +2 -2
- package/dist/components/viking-bot/ark-message-list-view.d.ts +4 -1
- package/dist/components/viking-bot/interaction/types.d.ts +2 -2
- package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +1 -1
- package/dist/components/viking-bot/session-actions.d.ts +2 -2
- package/dist/components/viking-bot/types.d.ts +7 -7
- package/dist/components/viking-bot/viking-bot.d.ts +1 -1
- package/dist/c~0.js +168 -154
- package/dist/e~0.js +3 -1
- package/dist/f~0.js +13 -7
- package/dist/lk~0.js +4 -1
- package/dist/l~0.js +77 -71
- package/dist/modules/console/console.d.ts +1 -1
- package/dist/modules/console/types.d.ts +2 -2
- package/dist/modules/console/use-console.d.ts +1 -1
- package/dist/modules/file-browser/file-browser.d.ts +1 -1
- package/dist/modules/file-browser/style.css +115 -1
- package/dist/modules/file-browser/types.d.ts +2 -2
- package/dist/modules/file-browser/use-file-browser.d.ts +3 -3
- package/dist/modules/scope-cascade/scope-cascade.d.ts +2 -2
- package/dist/modules/scope-cascade/types.d.ts +2 -2
- package/dist/modules/style.css +115 -1
- package/dist/n~0.js +3 -1
- package/dist/shared/locale-context.d.ts +8 -0
- package/dist/style.css +345 -3
- package/dist/u~0.js +324 -96
- package/dist/viking-bot-composer~0.js +3 -1
- package/dist/viking-bot-interaction~0.js +3 -1
- package/package.json +3 -1
|
@@ -23,9 +23,10 @@ export interface DirectoryTourLabels {
|
|
|
23
23
|
progress?: (current: number, total: number) => string;
|
|
24
24
|
}
|
|
25
25
|
export interface DirectoryTourProps {
|
|
26
|
-
locale: Locale;
|
|
27
26
|
open: boolean;
|
|
28
27
|
steps: readonly DirectoryTourStep[];
|
|
28
|
+
/** Inherits the nearest language scope, otherwise en-US. */
|
|
29
|
+
locale?: Locale;
|
|
29
30
|
currentStep?: number;
|
|
30
31
|
defaultStep?: number;
|
|
31
32
|
placement?: 'right' | 'left';
|
|
@@ -11,4 +11,4 @@ export type { FileBrowserEntriesLabels, FileBrowserEntriesProps, } from './types
|
|
|
11
11
|
* agentConnect enables the right-side drawer; callbacks also support host-owned flows.
|
|
12
12
|
* Nothing renders without visible entries; hosts can wrap the default import button.
|
|
13
13
|
*/
|
|
14
|
-
export declare function FileBrowserEntries({ locale, agentConnect, onConnectAgent, onImportResources, renderImportResources, labels, className, ...rest }: FileBrowserEntriesProps): import("react").JSX.Element | null;
|
|
14
|
+
export declare function FileBrowserEntries({ locale: localeProp, agentConnect, onConnectAgent, onImportResources, renderImportResources, labels, className, ...rest }: FileBrowserEntriesProps): import("react").JSX.Element | null;
|
|
@@ -379,6 +379,93 @@
|
|
|
379
379
|
--ov-ui-connect-notice-default: var(--ov-ui-text-2-default);
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
+
.ov-agent-connect__code-block {
|
|
383
|
+
border: 1px solid var(--ov-ui-agent-connect-border);
|
|
384
|
+
background: var(--ov-ui-agent-connect-bg);
|
|
385
|
+
white-space: normal;
|
|
386
|
+
border-radius: 8px;
|
|
387
|
+
margin-bottom: 12px;
|
|
388
|
+
overflow: hidden;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.ov-agent-connect__code-block:last-child {
|
|
392
|
+
margin-bottom: 0;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.ov-agent-connect__code-header {
|
|
396
|
+
border-bottom: 1px solid var(--ov-ui-agent-connect-border);
|
|
397
|
+
color: var(--ov-ui-agent-connect-muted);
|
|
398
|
+
justify-content: space-between;
|
|
399
|
+
align-items: center;
|
|
400
|
+
gap: 8px;
|
|
401
|
+
padding: 6px 12px;
|
|
402
|
+
font-size: 12px;
|
|
403
|
+
display: flex;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.ov-agent-connect__code-actions {
|
|
407
|
+
align-items: center;
|
|
408
|
+
gap: 12px;
|
|
409
|
+
display: flex;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.ov-agent-connect__code-actions button {
|
|
413
|
+
width: 24px;
|
|
414
|
+
height: 24px;
|
|
415
|
+
color: var(--ov-ui-agent-connect-secondary);
|
|
416
|
+
background: none;
|
|
417
|
+
border: 0;
|
|
418
|
+
border-radius: 4px;
|
|
419
|
+
justify-content: center;
|
|
420
|
+
align-items: center;
|
|
421
|
+
padding: 4px;
|
|
422
|
+
font-size: 12px;
|
|
423
|
+
display: inline-flex;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.ov-agent-connect__code-actions button:hover {
|
|
427
|
+
color: var(--ov-ui-agent-connect-primary);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.ov-agent-connect__code-actions button:disabled {
|
|
431
|
+
opacity: .6;
|
|
432
|
+
cursor: wait;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.ov-agent-connect__code-actions svg {
|
|
436
|
+
width: 16px;
|
|
437
|
+
height: 16px;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.ov-agent-connect .ov-agent-connect__code-block pre {
|
|
441
|
+
white-space: pre-wrap;
|
|
442
|
+
overflow-wrap: anywhere;
|
|
443
|
+
background: none;
|
|
444
|
+
border-radius: 0;
|
|
445
|
+
margin: 0;
|
|
446
|
+
padding: 12px;
|
|
447
|
+
font-size: 12px;
|
|
448
|
+
line-height: 20px;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.ov-agent-connect__code-block code {
|
|
452
|
+
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.ov-agent-connect__code-block > .ov-agent-connect__feedback:not(:empty) {
|
|
456
|
+
padding: 0 12px 8px;
|
|
457
|
+
display: block;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.ov-agent-connect__code-feedback {
|
|
461
|
+
clip-path: inset(50%);
|
|
462
|
+
white-space: nowrap;
|
|
463
|
+
width: 1px;
|
|
464
|
+
height: 1px;
|
|
465
|
+
position: absolute;
|
|
466
|
+
overflow: hidden;
|
|
467
|
+
}
|
|
468
|
+
|
|
382
469
|
.ov-agent-connect {
|
|
383
470
|
--ov-ui-agent-connect-text: var(--ov-ui-color-text-1, var(--ov-ui-text-1-default));
|
|
384
471
|
--ov-ui-agent-connect-secondary: var(--ov-ui-color-text-2, var(--ov-ui-text-2-default));
|
|
@@ -709,7 +796,7 @@
|
|
|
709
796
|
white-space: normal;
|
|
710
797
|
}
|
|
711
798
|
|
|
712
|
-
.ov-agent-connect__markdown :where(p, pre, h5, table) {
|
|
799
|
+
.ov-agent-connect__markdown :where(p, pre, h5, table, ul, ol, blockquote, details) {
|
|
713
800
|
margin: 0 0 12px;
|
|
714
801
|
}
|
|
715
802
|
|
|
@@ -721,6 +808,33 @@
|
|
|
721
808
|
white-space: pre-wrap;
|
|
722
809
|
}
|
|
723
810
|
|
|
811
|
+
.ov-agent-connect__markdown :where(ul, ol) {
|
|
812
|
+
padding-left: 24px;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.ov-agent-connect__markdown ul {
|
|
816
|
+
list-style-type: disc;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
.ov-agent-connect__markdown ol {
|
|
820
|
+
list-style-type: decimal;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.ov-agent-connect__markdown blockquote {
|
|
824
|
+
border-left: 2px solid var(--ov-ui-agent-connect-border);
|
|
825
|
+
margin-left: 0;
|
|
826
|
+
padding-left: 12px;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
.ov-agent-connect__markdown summary {
|
|
830
|
+
cursor: pointer;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.ov-agent-connect__markdown summary:focus-visible {
|
|
834
|
+
outline: 2px solid var(--ov-ui-agent-connect-primary);
|
|
835
|
+
outline-offset: 2px;
|
|
836
|
+
}
|
|
837
|
+
|
|
724
838
|
.ov-agent-connect__markdown h5 {
|
|
725
839
|
color: var(--ov-ui-agent-connect-text);
|
|
726
840
|
font-size: 14px;
|
|
@@ -33,8 +33,8 @@ export interface FileBrowserEntriesLabels {
|
|
|
33
33
|
* there is nothing left to separate.
|
|
34
34
|
*/
|
|
35
35
|
export interface FileBrowserEntriesProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
36
|
-
/**
|
|
37
|
-
locale
|
|
36
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
37
|
+
locale?: Locale;
|
|
38
38
|
/**
|
|
39
39
|
* 内置 AgentConnect 右侧抽屉的参数;传入后显示连接入口。
|
|
40
40
|
* Options for the built-in AgentConnect drawer; enables the connect entry.
|
|
@@ -597,8 +597,8 @@ export interface FilePreviewProps extends Omit<HTMLAttributes<HTMLDivElement>, '
|
|
|
597
597
|
* component for format rendering or renders fully custom `content`.
|
|
598
598
|
*/
|
|
599
599
|
tabs: readonly [FilePreviewTab, ...FilePreviewTab[]];
|
|
600
|
-
/**
|
|
601
|
-
locale
|
|
600
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
601
|
+
locale?: Locale;
|
|
602
602
|
/**
|
|
603
603
|
* 受控的当前页签 key。传入时由宿主决定当前页签,组件只上报切换意图。
|
|
604
604
|
* The controlled active tab key. When given, the host owns the active tab and
|
|
@@ -510,8 +510,8 @@ export interface FileTreeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'chi
|
|
|
510
510
|
* Visible rows in render order.
|
|
511
511
|
*/
|
|
512
512
|
rows: readonly FileTreeRow[];
|
|
513
|
-
/**
|
|
514
|
-
locale
|
|
513
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
514
|
+
locale?: Locale;
|
|
515
515
|
/**
|
|
516
516
|
* 操作的执行能力;省略对应方法时禁用该操作。
|
|
517
517
|
* Operation capabilities; omitting a method disables its operation.
|
|
@@ -2,5 +2,5 @@ import type { ScopeSwitcherProps } from './types.js';
|
|
|
2
2
|
export { ScopeSelector } from './scope-selector.js';
|
|
3
3
|
export { SCOPE_SWITCHER_SEARCH_THRESHOLD } from './types.js';
|
|
4
4
|
export type { ScopeSelectorBaseProps, ScopeSelectorFixedProps, ScopeSelectorProps, ScopeSelectorSelectableProps, ScopeSwitcherActions, ScopeSwitcherData, ScopeSwitcherIdentity, ScopeSwitcherLabels, ScopeSwitcherOption, ScopeSwitcherPanelContent, ScopeSwitcherProps, ScopeSwitcherScrollMetrics, ScopeSwitcherSlots, ScopeSwitcherState, ScopeSwitcherTrigger, } from './types.js';
|
|
5
|
-
/**
|
|
6
|
-
export declare function ScopeSwitcher({ locale, children, className, ...props }: ScopeSwitcherProps): import("react").JSX.Element;
|
|
5
|
+
/** Layout and language scope only; selectors own data and interaction state. */
|
|
6
|
+
export declare function ScopeSwitcher({ locale: localeProp, children, className, ...props }: ScopeSwitcherProps): import("react").JSX.Element;
|
|
@@ -391,10 +391,10 @@ export interface ScopeSwitcherLabels {
|
|
|
391
391
|
*/
|
|
392
392
|
error?: string;
|
|
393
393
|
}
|
|
394
|
-
/** Layout
|
|
394
|
+
/** Layout and language scope: each child owns its state and data subscription. */
|
|
395
395
|
export interface ScopeSwitcherProps extends HTMLAttributes<HTMLDivElement> {
|
|
396
|
-
/**
|
|
397
|
-
locale
|
|
396
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
397
|
+
locale?: Locale;
|
|
398
398
|
}
|
|
399
399
|
/**
|
|
400
400
|
* 两种层级共有的入参:身份与触发器内容。
|
|
@@ -402,13 +402,13 @@ export interface ScopeSwitcherProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
402
402
|
* Props shared by both level forms: identity and what the trigger shows.
|
|
403
403
|
*/
|
|
404
404
|
export interface ScopeSelectorBaseProps {
|
|
405
|
-
/** 内置中英文文案的语言。Language of the built-in interface copy. */
|
|
406
|
-
locale: Locale;
|
|
407
405
|
/**
|
|
408
406
|
* 层级身份:稳定标识、无障碍名与末尾标记。
|
|
409
407
|
* Level identity: stable key, accessible name and trailing marker.
|
|
410
408
|
*/
|
|
411
409
|
identity: ScopeSwitcherIdentity;
|
|
410
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
411
|
+
locale?: Locale;
|
|
412
412
|
/**
|
|
413
413
|
* 触发器展示的当前值文本与图标。不传时从 `data.options` 里按 `data.selectedId`
|
|
414
414
|
* 取对应项;固定层级没有 `data`,因此固定层级需要在这里给出 `label`。
|
|
@@ -5421,6 +5421,93 @@ button.ark-agentic-file-viewer-diff__gutter {
|
|
|
5421
5421
|
--ov-ui-connect-notice-default: var(--ov-ui-text-2-default);
|
|
5422
5422
|
}
|
|
5423
5423
|
|
|
5424
|
+
.ov-agent-connect__code-block {
|
|
5425
|
+
border: 1px solid var(--ov-ui-agent-connect-border);
|
|
5426
|
+
background: var(--ov-ui-agent-connect-bg);
|
|
5427
|
+
white-space: normal;
|
|
5428
|
+
border-radius: 8px;
|
|
5429
|
+
margin-bottom: 12px;
|
|
5430
|
+
overflow: hidden;
|
|
5431
|
+
}
|
|
5432
|
+
|
|
5433
|
+
.ov-agent-connect__code-block:last-child {
|
|
5434
|
+
margin-bottom: 0;
|
|
5435
|
+
}
|
|
5436
|
+
|
|
5437
|
+
.ov-agent-connect__code-header {
|
|
5438
|
+
border-bottom: 1px solid var(--ov-ui-agent-connect-border);
|
|
5439
|
+
color: var(--ov-ui-agent-connect-muted);
|
|
5440
|
+
justify-content: space-between;
|
|
5441
|
+
align-items: center;
|
|
5442
|
+
gap: 8px;
|
|
5443
|
+
padding: 6px 12px;
|
|
5444
|
+
font-size: 12px;
|
|
5445
|
+
display: flex;
|
|
5446
|
+
}
|
|
5447
|
+
|
|
5448
|
+
.ov-agent-connect__code-actions {
|
|
5449
|
+
align-items: center;
|
|
5450
|
+
gap: 12px;
|
|
5451
|
+
display: flex;
|
|
5452
|
+
}
|
|
5453
|
+
|
|
5454
|
+
.ov-agent-connect__code-actions button {
|
|
5455
|
+
width: 24px;
|
|
5456
|
+
height: 24px;
|
|
5457
|
+
color: var(--ov-ui-agent-connect-secondary);
|
|
5458
|
+
background: none;
|
|
5459
|
+
border: 0;
|
|
5460
|
+
border-radius: 4px;
|
|
5461
|
+
justify-content: center;
|
|
5462
|
+
align-items: center;
|
|
5463
|
+
padding: 4px;
|
|
5464
|
+
font-size: 12px;
|
|
5465
|
+
display: inline-flex;
|
|
5466
|
+
}
|
|
5467
|
+
|
|
5468
|
+
.ov-agent-connect__code-actions button:hover {
|
|
5469
|
+
color: var(--ov-ui-agent-connect-primary);
|
|
5470
|
+
}
|
|
5471
|
+
|
|
5472
|
+
.ov-agent-connect__code-actions button:disabled {
|
|
5473
|
+
opacity: .6;
|
|
5474
|
+
cursor: wait;
|
|
5475
|
+
}
|
|
5476
|
+
|
|
5477
|
+
.ov-agent-connect__code-actions svg {
|
|
5478
|
+
width: 16px;
|
|
5479
|
+
height: 16px;
|
|
5480
|
+
}
|
|
5481
|
+
|
|
5482
|
+
.ov-agent-connect .ov-agent-connect__code-block pre {
|
|
5483
|
+
white-space: pre-wrap;
|
|
5484
|
+
overflow-wrap: anywhere;
|
|
5485
|
+
background: none;
|
|
5486
|
+
border-radius: 0;
|
|
5487
|
+
margin: 0;
|
|
5488
|
+
padding: 12px;
|
|
5489
|
+
font-size: 12px;
|
|
5490
|
+
line-height: 20px;
|
|
5491
|
+
}
|
|
5492
|
+
|
|
5493
|
+
.ov-agent-connect__code-block code {
|
|
5494
|
+
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
|
5495
|
+
}
|
|
5496
|
+
|
|
5497
|
+
.ov-agent-connect__code-block > .ov-agent-connect__feedback:not(:empty) {
|
|
5498
|
+
padding: 0 12px 8px;
|
|
5499
|
+
display: block;
|
|
5500
|
+
}
|
|
5501
|
+
|
|
5502
|
+
.ov-agent-connect__code-feedback {
|
|
5503
|
+
clip-path: inset(50%);
|
|
5504
|
+
white-space: nowrap;
|
|
5505
|
+
width: 1px;
|
|
5506
|
+
height: 1px;
|
|
5507
|
+
position: absolute;
|
|
5508
|
+
overflow: hidden;
|
|
5509
|
+
}
|
|
5510
|
+
|
|
5424
5511
|
.ov-agent-connect {
|
|
5425
5512
|
--ov-ui-agent-connect-text: var(--ov-ui-color-text-1, var(--ov-ui-text-1-default));
|
|
5426
5513
|
--ov-ui-agent-connect-secondary: var(--ov-ui-color-text-2, var(--ov-ui-text-2-default));
|
|
@@ -5751,7 +5838,7 @@ button.ark-agentic-file-viewer-diff__gutter {
|
|
|
5751
5838
|
white-space: normal;
|
|
5752
5839
|
}
|
|
5753
5840
|
|
|
5754
|
-
.ov-agent-connect__markdown :where(p, pre, h5, table) {
|
|
5841
|
+
.ov-agent-connect__markdown :where(p, pre, h5, table, ul, ol, blockquote, details) {
|
|
5755
5842
|
margin: 0 0 12px;
|
|
5756
5843
|
}
|
|
5757
5844
|
|
|
@@ -5763,6 +5850,33 @@ button.ark-agentic-file-viewer-diff__gutter {
|
|
|
5763
5850
|
white-space: pre-wrap;
|
|
5764
5851
|
}
|
|
5765
5852
|
|
|
5853
|
+
.ov-agent-connect__markdown :where(ul, ol) {
|
|
5854
|
+
padding-left: 24px;
|
|
5855
|
+
}
|
|
5856
|
+
|
|
5857
|
+
.ov-agent-connect__markdown ul {
|
|
5858
|
+
list-style-type: disc;
|
|
5859
|
+
}
|
|
5860
|
+
|
|
5861
|
+
.ov-agent-connect__markdown ol {
|
|
5862
|
+
list-style-type: decimal;
|
|
5863
|
+
}
|
|
5864
|
+
|
|
5865
|
+
.ov-agent-connect__markdown blockquote {
|
|
5866
|
+
border-left: 2px solid var(--ov-ui-agent-connect-border);
|
|
5867
|
+
margin-left: 0;
|
|
5868
|
+
padding-left: 12px;
|
|
5869
|
+
}
|
|
5870
|
+
|
|
5871
|
+
.ov-agent-connect__markdown summary {
|
|
5872
|
+
cursor: pointer;
|
|
5873
|
+
}
|
|
5874
|
+
|
|
5875
|
+
.ov-agent-connect__markdown summary:focus-visible {
|
|
5876
|
+
outline: 2px solid var(--ov-ui-agent-connect-primary);
|
|
5877
|
+
outline-offset: 2px;
|
|
5878
|
+
}
|
|
5879
|
+
|
|
5766
5880
|
.ov-agent-connect__markdown h5 {
|
|
5767
5881
|
color: var(--ov-ui-agent-connect-text);
|
|
5768
5882
|
font-size: 14px;
|
|
@@ -8350,6 +8464,93 @@ button.ov-scope-switcher__trigger:hover:not(:disabled), button.ov-scope-switcher
|
|
|
8350
8464
|
--ov-ui-connect-notice-default: var(--ov-ui-text-2-default);
|
|
8351
8465
|
}
|
|
8352
8466
|
|
|
8467
|
+
.ov-agent-connect__code-block {
|
|
8468
|
+
border: 1px solid var(--ov-ui-agent-connect-border);
|
|
8469
|
+
background: var(--ov-ui-agent-connect-bg);
|
|
8470
|
+
white-space: normal;
|
|
8471
|
+
border-radius: 8px;
|
|
8472
|
+
margin-bottom: 12px;
|
|
8473
|
+
overflow: hidden;
|
|
8474
|
+
}
|
|
8475
|
+
|
|
8476
|
+
.ov-agent-connect__code-block:last-child {
|
|
8477
|
+
margin-bottom: 0;
|
|
8478
|
+
}
|
|
8479
|
+
|
|
8480
|
+
.ov-agent-connect__code-header {
|
|
8481
|
+
border-bottom: 1px solid var(--ov-ui-agent-connect-border);
|
|
8482
|
+
color: var(--ov-ui-agent-connect-muted);
|
|
8483
|
+
justify-content: space-between;
|
|
8484
|
+
align-items: center;
|
|
8485
|
+
gap: 8px;
|
|
8486
|
+
padding: 6px 12px;
|
|
8487
|
+
font-size: 12px;
|
|
8488
|
+
display: flex;
|
|
8489
|
+
}
|
|
8490
|
+
|
|
8491
|
+
.ov-agent-connect__code-actions {
|
|
8492
|
+
align-items: center;
|
|
8493
|
+
gap: 12px;
|
|
8494
|
+
display: flex;
|
|
8495
|
+
}
|
|
8496
|
+
|
|
8497
|
+
.ov-agent-connect__code-actions button {
|
|
8498
|
+
width: 24px;
|
|
8499
|
+
height: 24px;
|
|
8500
|
+
color: var(--ov-ui-agent-connect-secondary);
|
|
8501
|
+
background: none;
|
|
8502
|
+
border: 0;
|
|
8503
|
+
border-radius: 4px;
|
|
8504
|
+
justify-content: center;
|
|
8505
|
+
align-items: center;
|
|
8506
|
+
padding: 4px;
|
|
8507
|
+
font-size: 12px;
|
|
8508
|
+
display: inline-flex;
|
|
8509
|
+
}
|
|
8510
|
+
|
|
8511
|
+
.ov-agent-connect__code-actions button:hover {
|
|
8512
|
+
color: var(--ov-ui-agent-connect-primary);
|
|
8513
|
+
}
|
|
8514
|
+
|
|
8515
|
+
.ov-agent-connect__code-actions button:disabled {
|
|
8516
|
+
opacity: .6;
|
|
8517
|
+
cursor: wait;
|
|
8518
|
+
}
|
|
8519
|
+
|
|
8520
|
+
.ov-agent-connect__code-actions svg {
|
|
8521
|
+
width: 16px;
|
|
8522
|
+
height: 16px;
|
|
8523
|
+
}
|
|
8524
|
+
|
|
8525
|
+
.ov-agent-connect .ov-agent-connect__code-block pre {
|
|
8526
|
+
white-space: pre-wrap;
|
|
8527
|
+
overflow-wrap: anywhere;
|
|
8528
|
+
background: none;
|
|
8529
|
+
border-radius: 0;
|
|
8530
|
+
margin: 0;
|
|
8531
|
+
padding: 12px;
|
|
8532
|
+
font-size: 12px;
|
|
8533
|
+
line-height: 20px;
|
|
8534
|
+
}
|
|
8535
|
+
|
|
8536
|
+
.ov-agent-connect__code-block code {
|
|
8537
|
+
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
|
8538
|
+
}
|
|
8539
|
+
|
|
8540
|
+
.ov-agent-connect__code-block > .ov-agent-connect__feedback:not(:empty) {
|
|
8541
|
+
padding: 0 12px 8px;
|
|
8542
|
+
display: block;
|
|
8543
|
+
}
|
|
8544
|
+
|
|
8545
|
+
.ov-agent-connect__code-feedback {
|
|
8546
|
+
clip-path: inset(50%);
|
|
8547
|
+
white-space: nowrap;
|
|
8548
|
+
width: 1px;
|
|
8549
|
+
height: 1px;
|
|
8550
|
+
position: absolute;
|
|
8551
|
+
overflow: hidden;
|
|
8552
|
+
}
|
|
8553
|
+
|
|
8353
8554
|
.ov-agent-connect {
|
|
8354
8555
|
--ov-ui-agent-connect-text: var(--ov-ui-color-text-1, var(--ov-ui-text-1-default));
|
|
8355
8556
|
--ov-ui-agent-connect-secondary: var(--ov-ui-color-text-2, var(--ov-ui-text-2-default));
|
|
@@ -8680,7 +8881,7 @@ button.ov-scope-switcher__trigger:hover:not(:disabled), button.ov-scope-switcher
|
|
|
8680
8881
|
white-space: normal;
|
|
8681
8882
|
}
|
|
8682
8883
|
|
|
8683
|
-
.ov-agent-connect__markdown :where(p, pre, h5, table) {
|
|
8884
|
+
.ov-agent-connect__markdown :where(p, pre, h5, table, ul, ol, blockquote, details) {
|
|
8684
8885
|
margin: 0 0 12px;
|
|
8685
8886
|
}
|
|
8686
8887
|
|
|
@@ -8692,6 +8893,33 @@ button.ov-scope-switcher__trigger:hover:not(:disabled), button.ov-scope-switcher
|
|
|
8692
8893
|
white-space: pre-wrap;
|
|
8693
8894
|
}
|
|
8694
8895
|
|
|
8896
|
+
.ov-agent-connect__markdown :where(ul, ol) {
|
|
8897
|
+
padding-left: 24px;
|
|
8898
|
+
}
|
|
8899
|
+
|
|
8900
|
+
.ov-agent-connect__markdown ul {
|
|
8901
|
+
list-style-type: disc;
|
|
8902
|
+
}
|
|
8903
|
+
|
|
8904
|
+
.ov-agent-connect__markdown ol {
|
|
8905
|
+
list-style-type: decimal;
|
|
8906
|
+
}
|
|
8907
|
+
|
|
8908
|
+
.ov-agent-connect__markdown blockquote {
|
|
8909
|
+
border-left: 2px solid var(--ov-ui-agent-connect-border);
|
|
8910
|
+
margin-left: 0;
|
|
8911
|
+
padding-left: 12px;
|
|
8912
|
+
}
|
|
8913
|
+
|
|
8914
|
+
.ov-agent-connect__markdown summary {
|
|
8915
|
+
cursor: pointer;
|
|
8916
|
+
}
|
|
8917
|
+
|
|
8918
|
+
.ov-agent-connect__markdown summary:focus-visible {
|
|
8919
|
+
outline: 2px solid var(--ov-ui-agent-connect-primary);
|
|
8920
|
+
outline-offset: 2px;
|
|
8921
|
+
}
|
|
8922
|
+
|
|
8695
8923
|
.ov-agent-connect__markdown h5 {
|
|
8696
8924
|
color: var(--ov-ui-agent-connect-text);
|
|
8697
8925
|
font-size: 14px;
|
|
@@ -8,4 +8,4 @@ export type { TuiCommandHelpContent, TuiCommandHelpItem, TuiCommandHelpSection,
|
|
|
8
8
|
* Command records, results and input. The host owns execution and sessions; the
|
|
9
9
|
* component renders supplied records and reports submission intent and successful copies.
|
|
10
10
|
*/
|
|
11
|
-
export declare function Tui({ records, value, disabled, emptyState, quickCommands, locale, commands, commandGroups, onValueChange, onSubmit, onOpenUri, onCopy, labels, className, ...rest }: TuiProps): import("react").JSX.Element;
|
|
11
|
+
export declare function Tui({ records, value, disabled, emptyState, quickCommands, locale: localeProp, commands, commandGroups, onValueChange, onSubmit, onOpenUri, onCopy, labels, className, ...rest }: TuiProps): import("react").JSX.Element;
|
|
@@ -473,8 +473,6 @@ export interface TuiLabels {
|
|
|
473
473
|
* Provides command completion, parameter hints and help.
|
|
474
474
|
*/
|
|
475
475
|
export interface TuiProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCopy' | 'onSubmit'> {
|
|
476
|
-
/** 内置中英文文案的语言。Language of the built-in interface copy. */
|
|
477
|
-
locale: Locale;
|
|
478
476
|
/**
|
|
479
477
|
* 当前展示的执行记录,按提交顺序排列;会话与历史切换后由宿主更新。
|
|
480
478
|
* Currently displayed execution records in submission order, updated by the
|
|
@@ -486,6 +484,8 @@ export interface TuiProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCopy'
|
|
|
486
484
|
* Controlled input value.
|
|
487
485
|
*/
|
|
488
486
|
value: string;
|
|
487
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
488
|
+
locale?: Locale;
|
|
489
489
|
/**
|
|
490
490
|
* 是否禁用命令输入与提交,缺省为 `false`。
|
|
491
491
|
* 禁用时的提示文案由 `labels.unavailableMessage` 提供。
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import type { Locale } from '../../shared/locale.js';
|
|
1
2
|
import type { VikingBotMessageListProps } from './types.js';
|
|
2
3
|
/**
|
|
3
4
|
* Ark 渲染的消息列表。只在懒加载边界之后加载,因此可以静态引用 Ark。
|
|
4
5
|
* The Ark-rendered message list. Loaded behind the lazy boundary, so it may
|
|
5
6
|
* import Ark statically.
|
|
6
7
|
*/
|
|
7
|
-
export declare function VikingBotMessageListView({ messages, className, streaming, footer, listKey, onOpenUri, onCopy, onMessageAction, renderMessage, locale, labels: overrides, }: VikingBotMessageListProps
|
|
8
|
+
export declare function VikingBotMessageListView({ messages, className, streaming, footer, listKey, onOpenUri, onCopy, onMessageAction, renderMessage, locale, labels: overrides, }: VikingBotMessageListProps & {
|
|
9
|
+
locale: Locale;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -164,8 +164,8 @@ export interface VikingBotInteractionLabels {
|
|
|
164
164
|
export interface VikingBotInteractionProps {
|
|
165
165
|
/** 当前问题。The current question. */
|
|
166
166
|
request: VikingBotInteractionRequest;
|
|
167
|
-
/**
|
|
168
|
-
locale
|
|
167
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
168
|
+
locale?: Locale;
|
|
169
169
|
/**
|
|
170
170
|
* 问题的稳定身份;变化时重置表单状态。省略时按 `request.kind` 与序号判定。
|
|
171
171
|
* Stable identity of the question; changes reset the form state. Defaults to
|
|
@@ -6,4 +6,4 @@ import type { VikingBotInteractionProps } from './types.js';
|
|
|
6
6
|
* The pending-interaction area. Ark's AskHuman renders the form; when a question
|
|
7
7
|
* needs a tree picker or an uploader, `custom` hands rendering to the host.
|
|
8
8
|
*/
|
|
9
|
-
export declare function VikingBotInteractionView({ request, className, requestKey, index, total, disabled, submitting, error, onSubmit, onCancel, locale, labels: overrides, }: VikingBotInteractionProps): import("react").JSX.Element;
|
|
9
|
+
export declare function VikingBotInteractionView({ request, className, requestKey, index, total, disabled, submitting, error, onSubmit, onCancel, locale: localeProp, labels: overrides, }: VikingBotInteractionProps): import("react").JSX.Element;
|
|
@@ -3,9 +3,9 @@ import type { ReactNode } from 'react';
|
|
|
3
3
|
import type { VikingBotLabels } from './model.js';
|
|
4
4
|
import type { VikingBotSessions } from './capabilities.js';
|
|
5
5
|
/** Session controls can be used alone by a host's shared header. */
|
|
6
|
-
export declare function VikingBotSessionActions({ sessions, extra, labels: overrides, locale, }: {
|
|
6
|
+
export declare function VikingBotSessionActions({ sessions, extra, labels: overrides, locale: localeProp, }: {
|
|
7
7
|
sessions?: VikingBotSessions;
|
|
8
8
|
extra?: ReactNode;
|
|
9
9
|
labels?: VikingBotLabels;
|
|
10
|
-
locale
|
|
10
|
+
locale?: Locale;
|
|
11
11
|
}): import("react").JSX.Element;
|
|
@@ -7,8 +7,8 @@ import type { VikingBotAttachment, VikingBotDraft, VikingBotLabels, VikingBotMes
|
|
|
7
7
|
export interface VikingBotMessageListProps {
|
|
8
8
|
/** 当前会话的消息。Messages in the current session. */
|
|
9
9
|
messages: readonly VikingBotMessage[];
|
|
10
|
-
/**
|
|
11
|
-
locale
|
|
10
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
11
|
+
locale?: Locale;
|
|
12
12
|
/** 附加到根元素的类名。Class name applied to the root element. */
|
|
13
13
|
className?: string;
|
|
14
14
|
/** 助手仍在生成时追加的片段。Parts appended while the assistant is still streaming. */
|
|
@@ -47,8 +47,8 @@ export interface VikingBotComposerRef {
|
|
|
47
47
|
export interface VikingBotComposerProps extends VikingBotInputFeatures {
|
|
48
48
|
/** 受控的草稿文本。Controlled draft text. */
|
|
49
49
|
value: string;
|
|
50
|
-
/**
|
|
51
|
-
locale
|
|
50
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
51
|
+
locale?: Locale;
|
|
52
52
|
/** 附加到根元素的类名。Class name applied to the root element. */
|
|
53
53
|
className?: string;
|
|
54
54
|
/** 宿主已选中的附件。Attachments already selected by the host. */
|
|
@@ -84,8 +84,8 @@ export interface VikingBotComposerProps extends VikingBotInputFeatures {
|
|
|
84
84
|
export interface VikingBotProps extends VikingBotInputFeatures, Omit<HTMLAttributes<HTMLDivElement>, 'onCopy' | 'onSubmit'> {
|
|
85
85
|
/** 当前会话的消息。Messages in the current session. */
|
|
86
86
|
messages: readonly VikingBotMessage[];
|
|
87
|
-
/**
|
|
88
|
-
locale
|
|
87
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
88
|
+
locale?: Locale;
|
|
89
89
|
/** Host-owned session history and actions. */
|
|
90
90
|
sessions?: VikingBotSessions;
|
|
91
91
|
/** Optional extension controls, such as a host-provided More menu. */
|
|
@@ -120,7 +120,7 @@ export interface VikingBotProps extends VikingBotInputFeatures, Omit<HTMLAttribu
|
|
|
120
120
|
* 待确认交互的配置;存在时替代输入区。
|
|
121
121
|
* Configuration of a pending interaction; replaces the composer.
|
|
122
122
|
*/
|
|
123
|
-
interaction?:
|
|
123
|
+
interaction?: VikingBotInteractionProps;
|
|
124
124
|
/**
|
|
125
125
|
* 整块替换交互区;传值时忽略 `interaction` 的内置渲染,宿主自行渲染。
|
|
126
126
|
* Replaces the whole interaction area; when set, the built-in rendering of
|
|
@@ -8,4 +8,4 @@ import type { VikingBotProps } from './types.js';
|
|
|
8
8
|
* interaction can each be replaced by the host; the built-in implementations
|
|
9
9
|
* are used when they are omitted.
|
|
10
10
|
*/
|
|
11
|
-
export declare function VikingBot({ messages, className, streaming, draft, attachments, isSending, isAvailable, unavailableMessage, emptyState, header, sessions, headerActions, locale, quickInputs, onQuickInputSelect, references, footer, children, messageList, composer, interaction, interactionSlot, listKey, composerRef, onDraftChange, onFilesAdded, onAttachmentRemove, onSend, onCancel, onOpenUri, onCopy, onMessageAction, labels: overrides, ...rest }: VikingBotProps): import("react").JSX.Element;
|
|
11
|
+
export declare function VikingBot({ messages, className, streaming, draft, attachments, isSending, isAvailable, unavailableMessage, emptyState, header, sessions, headerActions, locale: localeProp, quickInputs, onQuickInputSelect, references, footer, children, messageList, composer, interaction, interactionSlot, listKey, composerRef, onDraftChange, onFilesAdded, onAttachmentRemove, onSend, onCancel, onOpenUri, onCopy, onMessageAction, labels: overrides, ...rest }: VikingBotProps): import("react").JSX.Element;
|