@blueking/chat-x 0.0.46-beta.2 → 0.0.46-beta.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.
@@ -37,6 +37,7 @@ declare global {
37
37
  }
38
38
  export type BkFlowMessageContent = BkFlowTask[];
39
39
  export type BkFlowNode = {
40
+ closable?: boolean;
40
41
  elapsed_time: number;
41
42
  finish_time: string;
42
43
  id: string;
@@ -48,9 +49,11 @@ export type BkFlowNode = {
48
49
  skippable?: boolean;
49
50
  start_time: string;
50
51
  state: string;
52
+ tab_order?: number;
51
53
  type: string;
52
54
  };
53
55
  export type BkFlowTask = {
56
+ closable?: boolean;
54
57
  confidence_title?: string;
55
58
  has_confidence?: boolean;
56
59
  is_active?: boolean;
@@ -59,6 +62,7 @@ export type BkFlowTask = {
59
62
  state_counts: Record<string, number>;
60
63
  total: number;
61
64
  };
65
+ tab_order?: number;
62
66
  task_id: number;
63
67
  task_name: string;
64
68
  task_outputs: unknown;
@@ -1,4 +1,5 @@
1
- import type { Component, Ref } from 'vue';
1
+ import { type Ref } from 'vue';
2
+ import type { Component } from 'vue';
2
3
  import { InterruptResumeOperation } from '../../../ag-ui/types/interrupt';
3
4
  import type { BkFlowNode, BkFlowTask } from '../../../ag-ui/types/contents';
4
5
  import type { OnInterruptResume } from '../../../ag-ui/types/interrupt';
@@ -7,12 +8,18 @@ import type { FlowNodeVM, FlowTaskVM } from './use-flow-agent';
7
8
  export type FlowNodeActionId = 'detail' | InterruptResumeOperation.FlowNodeRetry | InterruptResumeOperation.FlowNodeSkip;
8
9
  /** 节点行尾操作视图模型:详情 / 重试 / 跳过统一为同一渲染单元(图标 + 文案 + 点击) */
9
10
  export interface FlowNodeActionVM {
11
+ /** 是否禁用点击(任一 resume 操作进行中时,重试 / 跳过均禁用) */
12
+ disabled: boolean;
10
13
  /** 按钮图标组件 */
11
14
  icon: Component;
12
15
  /** 唯一标识,用于 v-for key 与样式钩子 */
13
16
  id: FlowNodeActionId;
14
- /** 国际化文案 */
17
+ /** 国际化文案(进行中时切换为「重试中 / 跳过中」) */
15
18
  label: string;
19
+ /** 是否处于进行中态:图标切换为 loading,文案切换为进行中文案 */
20
+ loading: boolean;
21
+ /** 因另一操作进行中而禁用时的 hover 提示(设计稿 annotation) */
22
+ tooltip?: string;
16
23
  /** 点击执行 */
17
24
  run: () => void;
18
25
  }
@@ -23,10 +30,13 @@ export interface FlowNodeActionVM {
23
30
  * 操作列表,组件层只需遍历渲染,显隐与点击行为均收敛于此,便于复用、单测与扩展。
24
31
  */
25
32
  export declare const useFlowNodeActions: (options: {
33
+ /** 隐藏重试 / 跳过等交互式 resume 操作(分享态只读,仅保留「详情」查看入口) */
34
+ hideResumeActions?: Ref<boolean>;
26
35
  /** resume 回调(与第三方审批取消同一回调,按 payload.operation 分流) */
27
36
  onInterruptResume: Ref<OnInterruptResume | undefined>;
28
37
  /** 打开节点详情侧栏(复用 useFlowTab 的能力) */
29
38
  openNodeDetail: (task: BkFlowTask, node: BkFlowNode) => void;
30
39
  }) => {
31
40
  getNodeActions: (task: FlowTaskVM, node: FlowNodeVM) => FlowNodeActionVM[];
41
+ isNodePending: (task: FlowTaskVM, node: FlowNodeVM) => boolean;
32
42
  };
@@ -1,6 +1,7 @@
1
1
  import type { EditorCommand } from '../../../edix';
2
2
  import type { Position } from '../../../edix/doc/types';
3
- import type { IAiSlashMenuItem } from '../../../types/editor';
3
+ import type { IAiSlashMenuItem, ISkillListItem } from '../../../types/editor';
4
4
  export declare const DeleteTag: EditorCommand<[Position, Position]>;
5
5
  export declare const InsertTag: EditorCommand<[Position, IAiSlashMenuItem]>;
6
6
  export declare const InsertText: EditorCommand<[Position, string]>;
7
+ export declare const InsertSkillTag: EditorCommand<[Position, ISkillListItem]>;
@@ -1,3 +1,7 @@
1
+ import type { VoidNode } from '../../../edix/doc/types';
2
+ import type { TagSchema } from '../../../types/input';
3
+ export declare const tagNodeToMessageString: (node: VoidNode) => string;
4
+ export declare const tagSchemaToMessageString: (doc: TagSchema) => string;
1
5
  export declare const tagSchema: import("../../..").DocSchema<({
2
6
  text: string;
3
7
  type: "text";
@@ -1,6 +1,6 @@
1
1
  import type { AssistantMessage } from '../../../ag-ui/types/messages';
2
2
  declare var __VLS_1: {
3
- content: string | undefined;
3
+ content: string;
4
4
  };
5
5
  type __VLS_Slots = {} & {
6
6
  default?: (props: typeof __VLS_1) => any;
@@ -1,25 +1,36 @@
1
- import { type ShallowRef } from 'vue';
1
+ import { type ComputedRef, type ShallowRef } from 'vue';
2
2
  import type { CustomTab } from '../types';
3
3
  export declare const CUSTOM_TAB_TOKEN: unique symbol;
4
4
  export declare const EXECUTION_TAB_NAME = "execution";
5
+ /** 自定义 Tab 默认排序权重;执行情况固定为 0,业务自定义 Tab 缺省回退到此值 */
6
+ export declare const DEFAULT_TAB_ORDER = 100;
5
7
  export declare function useCustomTabProvider<T extends Record<string, unknown>>(options: {
8
+ /** 执行情况 Tab 是否展示,缺省 true;传 getter 以保持响应式 */
9
+ executionTabVisible?: () => boolean | undefined;
6
10
  onTabChange?: (tab: CustomTab<T>) => void;
7
11
  }): {
8
12
  tabs: ShallowRef<CustomTab<T>[], CustomTab<T>[]>;
13
+ displayTabs: ComputedRef<CustomTab<T>[]>;
9
14
  selectedTab: import("vue").Ref<{
15
+ closable?: boolean | undefined;
10
16
  data?: import("vue").UnwrapRef<T & {
11
17
  messageUid?: string;
12
18
  }> | undefined;
13
19
  icon?: string | undefined;
14
20
  label: string;
15
21
  name: string;
22
+ order?: number | undefined;
23
+ visible?: boolean | undefined;
16
24
  }, CustomTab<T> | {
25
+ closable?: boolean | undefined;
17
26
  data?: import("vue").UnwrapRef<T & {
18
27
  messageUid?: string;
19
28
  }> | undefined;
20
29
  icon?: string | undefined;
21
30
  label: string;
22
31
  name: string;
32
+ order?: number | undefined;
33
+ visible?: boolean | undefined;
23
34
  }>;
24
35
  isCollapse: ShallowRef<boolean, boolean>;
25
36
  addCustomTab: (tab: CustomTab<T>) => void;
@@ -29,6 +40,7 @@ export declare function useCustomTabProvider<T extends Record<string, unknown>>(
29
40
  };
30
41
  export declare const useCustomTabConsumer: <T extends Record<string, unknown>>() => {
31
42
  addCustomTab: (tab: CustomTab<T>) => void;
43
+ displayTabs: ComputedRef<CustomTab<T>[]>;
32
44
  removeCustomTab: (tabName: CustomTab<T>["name"]) => void;
33
45
  selectCustomTab: (tab: CustomTab<T>) => void;
34
46
  selectedTab: ShallowRef<CustomTab<T> | null>;
@@ -24,6 +24,7 @@ export declare const useMessageGroup: (options: {
24
24
  messages: ({
25
25
  activityType: MessageContentType.FlowAgent | MessageContentType.KnowledgeRag | MessageContentType.ReferenceDocument | string;
26
26
  content: {
27
+ closable?: boolean | undefined;
27
28
  confidence_title?: string | undefined;
28
29
  has_confidence?: boolean | undefined;
29
30
  is_active?: boolean | undefined;
@@ -32,6 +33,7 @@ export declare const useMessageGroup: (options: {
32
33
  state_counts: Record<string, number>;
33
34
  total: number;
34
35
  };
36
+ tab_order?: number | undefined;
35
37
  task_id: number;
36
38
  task_name: string;
37
39
  task_outputs: unknown;
@@ -13012,6 +13014,7 @@ export declare const useMessageGroup: (options: {
13012
13014
  messages: ({
13013
13015
  activityType: MessageContentType.FlowAgent | MessageContentType.KnowledgeRag | MessageContentType.ReferenceDocument | string;
13014
13016
  content: {
13017
+ closable?: boolean | undefined;
13015
13018
  confidence_title?: string | undefined;
13016
13019
  has_confidence?: boolean | undefined;
13017
13020
  is_active?: boolean | undefined;
@@ -13020,6 +13023,7 @@ export declare const useMessageGroup: (options: {
13020
13023
  state_counts: Record<string, number>;
13021
13024
  total: number;
13022
13025
  };
13026
+ tab_order?: number | undefined;
13023
13027
  task_id: number;
13024
13028
  task_name: string;
13025
13029
  task_outputs: unknown;
@@ -26006,6 +26010,7 @@ export declare const useMessageGroup: (options: {
26006
26010
  onConfirmShare: () => ({
26007
26011
  activityType: MessageContentType.FlowAgent | MessageContentType.KnowledgeRag | MessageContentType.ReferenceDocument | string;
26008
26012
  content: {
26013
+ closable?: boolean | undefined;
26009
26014
  confidence_title?: string | undefined;
26010
26015
  has_confidence?: boolean | undefined;
26011
26016
  is_active?: boolean | undefined;
@@ -26014,6 +26019,7 @@ export declare const useMessageGroup: (options: {
26014
26019
  state_counts: Record<string, number>;
26015
26020
  total: number;
26016
26021
  };
26022
+ tab_order?: number | undefined;
26017
26023
  task_id: number;
26018
26024
  task_name: string;
26019
26025
  task_outputs: unknown;