@glodon-aiot/agent-cli-ui 3.26.0-alpha.11 → 3.26.0-alpha.13

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.
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- export declare const isResultExec: (result?: string) => boolean;
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?: string;
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
- /** 内置工具插件的步骤返回中文名与相对路径;其他插件返回 undefined,按原样展示。 */
11
+ /** 内置工具插件的步骤返回中文名和这一次调用的辨识信息;其他插件返回 undefined。 */
11
12
  export declare function describeLocalFileAction(actions: ActionLike[]): {
12
13
  name: string;
13
- path: string | undefined;
14
+ funcCode: string;
15
+ summary: string | undefined;
14
16
  } | undefined;
15
17
  export {};
@@ -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;
@@ -1,4 +1,4 @@
1
- import { BotClient, AgentPluginMap, Session, MCPConfig, LocalFilesConfig, LocalPythonConfig } from '@glodon-aiot/bot-client-sdk';
1
+ import { BotClient, AgentPluginMap, Session, MCPConfig, LocalFilesConfig } 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';
@@ -268,7 +268,6 @@ export interface InitalData extends AgentClientUIConfig {
268
268
  /** SDK 内置插件;localFiles 额外支持 UI 专属字段 ui,不会传给 SDK。 */
269
269
  builtinPlugins?: {
270
270
  localFiles?: UILocalFilesConfig;
271
- localPython?: LocalPythonConfig;
272
271
  };
273
272
  mcp?: MCPConfig;
274
273
  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.11",
3
+ "version": "3.26.0-alpha.13",
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.11",
35
- "@glodon-aiot/bot-client-sdk": "^3.26.0-alpha.11",
36
- "@glodon-aiot/react-components": "^3.26.0-alpha.11",
34
+ "@glodon-aiot/apis": "^3.26.0-alpha.13",
35
+ "@glodon-aiot/bot-client-sdk": "^3.26.0-alpha.13",
36
+ "@glodon-aiot/react-components": "^3.26.0-alpha.13",
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",