@farris/x-ui 0.1.2 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farris/x-ui",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "可复用的 AI 对话组件",
5
5
  "type": "module",
6
6
  "main": "./farris.x-ui.umd.cjs",
@@ -0,0 +1,7 @@
1
+ import { Plugin } from '../../vue';
2
+ import { default as FXToolUseBatch } from '../../src/tool-use-batch.component';
3
+
4
+ export * from '../../src/types';
5
+ export { FXToolUseBatch };
6
+ declare const _default: typeof FXToolUseBatch & Plugin;
7
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { PropType } from '../../../vue';
2
+ import { MessageContentToolUseBatch } from '../../../types';
3
+
4
+ /**
5
+ * 智能体批量工具调用容器:统一展示多个工具调用条目,
6
+ * 支持整体收折/展开、单条结果展开、动态标题、进度行。
7
+ */
8
+ declare const _default: import('../../../vue').DefineComponent<import('../../../vue').ExtractPropTypes<{
9
+ content: {
10
+ type: PropType<MessageContentToolUseBatch>;
11
+ required: true;
12
+ };
13
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<import('../../../vue').ExtractPropTypes<{
14
+ content: {
15
+ type: PropType<MessageContentToolUseBatch>;
16
+ required: true;
17
+ };
18
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
19
+ export default _default;
@@ -0,0 +1,25 @@
1
+ /** batch 内部单个工具调用条目 */
2
+ export interface ToolUseBatchItem {
3
+ toolUseId: string;
4
+ toolName: string;
5
+ /** 主显示文本:优先 command,fallback 到 toolDescription */
6
+ command?: string;
7
+ toolDescription?: string;
8
+ result: string;
9
+ toolResultApplied?: boolean;
10
+ success?: boolean;
11
+ errorMessage?: string;
12
+ /** 组件内部状态:该条目是否展开(仅完成/失败态可展开) */
13
+ _expanded?: boolean;
14
+ }
15
+ /** 网关 agent/tool-use-batch 归一化后的消息内容类型 */
16
+ export interface MessageContentToolUseBatch {
17
+ type: 'ToolUseBatch';
18
+ standardType?: 'agent/tool-use-batch' | string;
19
+ /** 批次标识,用于 upsert 去重 */
20
+ groupId?: string;
21
+ /** 工具调用总数 */
22
+ totalCount?: number;
23
+ /** 批量工具调用列表 */
24
+ toolCalls: ToolUseBatchItem[];
25
+ }