@glodon-aiot/agent-cli-ui 3.26.0-alpha.12 → 3.26.0-alpha.14
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/es/index.mjs +4027 -3874
- package/dist/lib/index.js +19 -18
- package/dist/src/Dialog/AgentChat/HistoryItem/ToolCalls.d.ts +2 -2
- package/dist/src/Dialog/AgentChat/HistoryItem/toolCallVisibility.d.ts +11 -0
- package/dist/src/components/LocalWorkspace/builtinToolSummary.d.ts +22 -0
- package/dist/src/components/LocalWorkspace/toolLabels.d.ts +4 -2
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export declare const isResultExec: (result?:
|
|
2
|
+
export declare const isResultExec: (result?: unknown) => boolean;
|
|
3
3
|
type ToolStep = {
|
|
4
4
|
type?: string;
|
|
5
5
|
data?: {
|
|
@@ -12,7 +12,7 @@ type ToolStep = {
|
|
|
12
12
|
query?: unknown;
|
|
13
13
|
};
|
|
14
14
|
requestBody?: unknown;
|
|
15
|
-
result?:
|
|
15
|
+
result?: unknown;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
interface ToolCallsProps {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function isSkillToolCall(steps: {
|
|
2
|
+
data?: {
|
|
3
|
+
funcCode?: string;
|
|
4
|
+
};
|
|
5
|
+
}[]): boolean;
|
|
6
|
+
/** debug 不为真时去掉三个技能工具。历史记录与当前对话共用这一判断。 */
|
|
7
|
+
export declare function visibleToolCalls<T extends {
|
|
8
|
+
data?: {
|
|
9
|
+
funcCode?: string;
|
|
10
|
+
};
|
|
11
|
+
}>(actions: T[][] | undefined, debug?: boolean): T[][];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type BuiltinToolStatus = 'loading' | 'success' | 'error' | 'abort';
|
|
2
|
+
interface ToolStepLike {
|
|
3
|
+
data?: {
|
|
4
|
+
parameters?: {
|
|
5
|
+
query?: unknown;
|
|
6
|
+
};
|
|
7
|
+
requestBody?: unknown;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/** query 有内容时用 query,否则用 requestBody。两者都可以是对象或 JSON 字符串。 */
|
|
11
|
+
export declare function builtinToolInput(steps: ToolStepLike[]): Record<string, unknown>;
|
|
12
|
+
/** 折叠行中间的辨识文字。正文、stdout 和 old_text 不放在这里。 */
|
|
13
|
+
export declare function summarizeBuiltinCall(funcCode: string, input: Record<string, unknown>): string | undefined;
|
|
14
|
+
export interface ToolResultBody {
|
|
15
|
+
code?: number;
|
|
16
|
+
message?: string;
|
|
17
|
+
data?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export declare function readToolResult(result: unknown): ToolResultBody | undefined;
|
|
20
|
+
/** 折叠行右侧。没有更具体的结果时返回 undefined,调用方继续用执行成功 / 执行失败。 */
|
|
21
|
+
export declare function builtinToolResultLabel(funcCode: string, status: BuiltinToolStatus, result: unknown): string | undefined;
|
|
22
|
+
export {};
|
|
@@ -5,11 +5,13 @@ interface ActionLike {
|
|
|
5
5
|
parameters?: {
|
|
6
6
|
query?: unknown;
|
|
7
7
|
};
|
|
8
|
+
requestBody?: unknown;
|
|
8
9
|
};
|
|
9
10
|
}
|
|
10
|
-
/**
|
|
11
|
+
/** 内置工具插件的步骤返回中文名和这一次调用的辨识信息;其他插件返回 undefined。 */
|
|
11
12
|
export declare function describeLocalFileAction(actions: ActionLike[]): {
|
|
12
13
|
name: string;
|
|
13
|
-
|
|
14
|
+
funcCode: string;
|
|
15
|
+
summary: string | undefined;
|
|
14
16
|
} | undefined;
|
|
15
17
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glodon-aiot/agent-cli-ui",
|
|
3
|
-
"version": "3.26.0-alpha.
|
|
3
|
+
"version": "3.26.0-alpha.14",
|
|
4
4
|
"module": "./dist/es/index.mjs",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"typings": "./dist/src/index.d.ts",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ant-design/icons": "^5.3.4",
|
|
34
|
-
"@glodon-aiot/apis": "^3.26.0-alpha.
|
|
35
|
-
"@glodon-aiot/bot-client-sdk": "^3.26.0-alpha.
|
|
36
|
-
"@glodon-aiot/react-components": "^3.26.0-alpha.
|
|
34
|
+
"@glodon-aiot/apis": "^3.26.0-alpha.14",
|
|
35
|
+
"@glodon-aiot/bot-client-sdk": "^3.26.0-alpha.14",
|
|
36
|
+
"@glodon-aiot/react-components": "^3.26.0-alpha.14",
|
|
37
37
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
38
38
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
39
39
|
"@react-pdf-viewer/default-layout": "^3.12.0",
|