@glodon-aiot/agent-cli-ui 3.26.0-alpha.20 → 3.26.0-alpha.23
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 +4828 -5196
- package/dist/lib/index.js +19 -20
- package/dist/src/Dialog/AgentChat/HistoryItem/index.d.ts +1 -2
- package/dist/src/components/LocalWorkspace/WorkspaceTree.d.ts +0 -2
- package/dist/src/components/LocalWorkspace/toolLabels.d.ts +2 -4
- package/dist/src/constant.d.ts +1 -2
- package/dist/src/index.d.ts +1 -1
- package/dist/src/types.d.ts +3 -2
- package/package.json +4 -4
- package/dist/src/Dialog/AgentChat/HistoryItem/ToolCalls.d.ts +0 -24
- package/dist/src/Dialog/AgentChat/HistoryItem/toolCallVisibility.d.ts +0 -11
- package/dist/src/components/LocalWorkspace/builtinToolSummary.d.ts +0 -22
- package/dist/src/components/Sider/SiderTabs.d.ts +0 -6
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IHistory, IApplication } from '@glodon-aiot/apis';
|
|
3
3
|
import { Session } from '@glodon-aiot/bot-client-sdk';
|
|
4
|
-
import { isResultExec } from './ToolCalls';
|
|
5
4
|
import { MarkdownProps } from '@glodon-aiot/react-components/dist/src/components/Markdown';
|
|
6
5
|
interface HistoryItemProps {
|
|
7
6
|
application: IApplication;
|
|
@@ -16,6 +15,6 @@ interface HistoryItemProps {
|
|
|
16
15
|
actions?: boolean;
|
|
17
16
|
markdown?: Partial<MarkdownProps>;
|
|
18
17
|
}
|
|
19
|
-
export
|
|
18
|
+
export declare const isResultExec: (result?: string) => boolean;
|
|
20
19
|
declare const HistoryItem: React.FC<HistoryItemProps>;
|
|
21
20
|
export default HistoryItem;
|
|
@@ -8,8 +8,6 @@ interface WorkspaceTreeProps {
|
|
|
8
8
|
getContainer: () => HTMLElement;
|
|
9
9
|
highlight?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
-
/** 浮窗模式:默认收成左上角入口,点击后展开目录面板。 */
|
|
12
|
-
collapsible?: boolean;
|
|
13
11
|
}
|
|
14
12
|
declare const WorkspaceTree: React.FC<WorkspaceTreeProps>;
|
|
15
13
|
export default WorkspaceTree;
|
|
@@ -5,13 +5,11 @@ interface ActionLike {
|
|
|
5
5
|
parameters?: {
|
|
6
6
|
query?: unknown;
|
|
7
7
|
};
|
|
8
|
-
requestBody?: unknown;
|
|
9
8
|
};
|
|
10
9
|
}
|
|
11
|
-
/**
|
|
10
|
+
/** 内置工具插件的步骤返回中文名与相对路径;其他插件返回 undefined,按原样展示。 */
|
|
12
11
|
export declare function describeLocalFileAction(actions: ActionLike[]): {
|
|
13
12
|
name: string;
|
|
14
|
-
|
|
15
|
-
summary: string | undefined;
|
|
13
|
+
path: string | undefined;
|
|
16
14
|
} | undefined;
|
|
17
15
|
export {};
|
package/dist/src/constant.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { default as icon } from './assets/icon.svg';
|
|
2
2
|
import { default as brand } from './assets/brand.svg';
|
|
3
3
|
import { default as IconThink } from './assets/think.svg';
|
|
4
|
-
import { default as IconTool } from './assets/tool.svg';
|
|
5
4
|
import { AgentClientUIConfig } from './types';
|
|
6
5
|
export declare const defaultUIConfig: AgentClientUIConfig;
|
|
7
6
|
export declare const defaultApiUrl = "https://copilot.glodon.com/api/cvforce";
|
|
8
7
|
export declare const defaultDovViewerUrl = "https://copilot.glodon.com/portal/_/cvforce/doc-viewer/";
|
|
9
|
-
export { icon, brand, IconThink
|
|
8
|
+
export { icon, brand, IconThink };
|
|
10
9
|
export declare const UNNAMED_SESSION_NAME = "\u672A\u547D\u540D\u4F1A\u8BDD";
|
|
11
10
|
export declare const KB = 1024;
|
|
12
11
|
export declare const MB: number;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export default class AgentClientUI {
|
|
|
39
39
|
/** SDK 的工作文件夹控制器,供宿主自定义选目录入口;未启用内置文件插件时为 undefined。 */
|
|
40
40
|
get localWorkspace(): import('@glodon-aiot/bot-client-sdk').LocalWorkspace | undefined;
|
|
41
41
|
private get localFilesEnabled();
|
|
42
|
-
/** 去掉 UI 专属的 ui 字段;集成方未提供文件确认钩子时注入 UI
|
|
42
|
+
/** 去掉 UI 专属的 ui 字段;集成方未提供文件确认钩子时注入 UI 弹窗。脚本确认不走这个弹窗。 */
|
|
43
43
|
private getSdkBuiltinPlugins;
|
|
44
44
|
setService(): BotClientApi;
|
|
45
45
|
reload(): void;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BotClient, AgentPluginMap, Session, MCPConfig, LocalFilesConfig } from '@glodon-aiot/bot-client-sdk';
|
|
1
|
+
import { BotClient, AgentPluginMap, Session, MCPConfig, LocalFilesConfig, LocalPythonConfig } from '@glodon-aiot/bot-client-sdk';
|
|
2
2
|
import { ApprovalBridge } from './components/LocalWorkspace/approvalBridge';
|
|
3
3
|
import { BotClientApi, ICommentParam, ISession, IChatMessage, IHistory, IKnowledge, ISessionPrompt, ISearchReference, IApplication } from '@glodon-aiot/apis';
|
|
4
4
|
import { Theme } from 'antd/es/config-provider/context';
|
|
@@ -231,7 +231,7 @@ export interface AgentClientDefaultProps {
|
|
|
231
231
|
localFilesApprovalBridge?: ApprovalBridge;
|
|
232
232
|
}
|
|
233
233
|
export interface LocalFilesUIConfig {
|
|
234
|
-
/**
|
|
234
|
+
/** 是否在输入区显示工作文件夹入口,默认 true。 */
|
|
235
235
|
picker?: boolean;
|
|
236
236
|
/** 首次选择前是否弹出数据外发提示,默认 true。 */
|
|
237
237
|
disclosure?: boolean;
|
|
@@ -268,6 +268,7 @@ export interface InitalData extends AgentClientUIConfig {
|
|
|
268
268
|
/** SDK 内置插件;localFiles 额外支持 UI 专属字段 ui,不会传给 SDK。 */
|
|
269
269
|
builtinPlugins?: {
|
|
270
270
|
localFiles?: UILocalFilesConfig;
|
|
271
|
+
localPython?: LocalPythonConfig;
|
|
271
272
|
};
|
|
272
273
|
mcp?: MCPConfig;
|
|
273
274
|
env?: Env;
|
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.23",
|
|
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.23",
|
|
35
|
+
"@glodon-aiot/bot-client-sdk": "^3.26.0-alpha.23",
|
|
36
|
+
"@glodon-aiot/react-components": "^3.26.0-alpha.23",
|
|
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",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export declare const isResultExec: (result?: unknown) => boolean;
|
|
3
|
-
type ToolStep = {
|
|
4
|
-
type?: string;
|
|
5
|
-
data?: {
|
|
6
|
-
pluginName?: string;
|
|
7
|
-
pluginCode?: string;
|
|
8
|
-
funcName?: string;
|
|
9
|
-
funcCode?: string;
|
|
10
|
-
thought?: string;
|
|
11
|
-
parameters?: {
|
|
12
|
-
query?: unknown;
|
|
13
|
-
};
|
|
14
|
-
requestBody?: unknown;
|
|
15
|
-
result?: unknown;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
interface ToolCallsProps {
|
|
19
|
-
actions?: ToolStep[][];
|
|
20
|
-
calling: boolean;
|
|
21
|
-
debug?: boolean;
|
|
22
|
-
}
|
|
23
|
-
declare const ToolCalls: React.FC<ToolCallsProps>;
|
|
24
|
-
export default ToolCalls;
|
|
@@ -1,11 +0,0 @@
|
|
|
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[][];
|
|
@@ -1,22 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { SiderRef } from './index';
|
|
3
|
-
import { SessionListProps } from '../../Dialog/SessionList';
|
|
4
|
-
export type { SiderRef };
|
|
5
|
-
declare const SiderTabs: React.ForwardRefExoticComponent<SessionListProps & React.RefAttributes<SiderRef>>;
|
|
6
|
-
export default SiderTabs;
|