agent-tool-chat 1.0.2 → 1.1.0
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/agent-core/agent.d.ts +2 -0
- package/dist/agent-core/types.d.ts +5 -3
- package/dist/agent-tool-chat.css +1 -1
- package/dist/bridge/agent-bridge-core.d.ts +17 -0
- package/dist/bridge/index.d.ts +4 -0
- package/dist/bridge/usePageAgentBridge.d.ts +9 -0
- package/dist/components/ChatPanel.vue.d.ts +2 -0
- package/dist/components/RenderBlock.vue.d.ts +1 -1
- package/dist/composables/useAgentChat.d.ts +8 -2
- package/dist/composables/useDraggable.d.ts +26 -0
- package/dist/core/event-bus.d.ts +1 -0
- package/dist/core/render-resolver.d.ts +2 -0
- package/dist/index.cjs +31 -31
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3153 -2878
- package/dist/types.d.ts +15 -2
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -7,13 +7,16 @@ export interface ToolDefinition {
|
|
|
7
7
|
parameters: Record<string, any>;
|
|
8
8
|
displayHints?: {
|
|
9
9
|
suggestComponent?: string;
|
|
10
|
-
resultFormat?: 'table' | 'card' | 'list' | 'text' | 'map';
|
|
10
|
+
resultFormat?: 'table' | 'card' | 'list' | 'text' | 'map' | 'none' | 'auto';
|
|
11
11
|
previewFields?: string[];
|
|
12
12
|
summaryTemplate?: string;
|
|
13
13
|
suggestedNext?: string;
|
|
14
14
|
selectable?: boolean;
|
|
15
15
|
labelField?: string;
|
|
16
16
|
suggestedNextEvent?: string;
|
|
17
|
+
/** 是否展示大模型对该工具结果的 md 文字回复,默认 true;
|
|
18
|
+
* 设为 false(且本工具配置了 resultFormat 结构化输出)时隐藏模型 md,避免与卡片/表格重复 */
|
|
19
|
+
showModelContent?: boolean;
|
|
17
20
|
};
|
|
18
21
|
}
|
|
19
22
|
export interface ToolPackage {
|
|
@@ -30,7 +33,7 @@ export interface ToolCallEvent {
|
|
|
30
33
|
args: Record<string, any>;
|
|
31
34
|
}
|
|
32
35
|
export interface RenderBlock {
|
|
33
|
-
type: 'component' | 'table' | 'card' | 'list';
|
|
36
|
+
type: 'component' | 'table' | 'card' | 'list' | 'auto' | 'none';
|
|
34
37
|
packageId?: string;
|
|
35
38
|
componentName?: string;
|
|
36
39
|
title?: string;
|
|
@@ -72,6 +75,8 @@ export interface ChatMessage {
|
|
|
72
75
|
files?: FileAttachment[];
|
|
73
76
|
/** 工具调用结果 */
|
|
74
77
|
toolResults?: ToolResult[];
|
|
78
|
+
/** 隐藏本条消息的大模型 md 内容(由 displayHints.showModelContent=false 触发) */
|
|
79
|
+
hideMarkdown?: boolean;
|
|
75
80
|
}
|
|
76
81
|
export interface ToolResult {
|
|
77
82
|
callId: string;
|
|
@@ -89,6 +94,10 @@ export interface ChatSettings {
|
|
|
89
94
|
useTools?: boolean;
|
|
90
95
|
providerMode: 'direct' | 'proxy';
|
|
91
96
|
proxyUrl: string;
|
|
97
|
+
/** 思考模式(推理/思维链)开关 */
|
|
98
|
+
thinking?: boolean;
|
|
99
|
+
/** 思考强度:低/高/最大 */
|
|
100
|
+
thinkingEffort?: 'low' | 'high' | 'max';
|
|
92
101
|
}
|
|
93
102
|
export declare const DEFAULT_SETTINGS: ChatSettings;
|
|
94
103
|
export interface ChatCommand {
|
|
@@ -110,6 +119,10 @@ export interface AgentChatOptions {
|
|
|
110
119
|
suggestedCommands?: ChatCommand[];
|
|
111
120
|
/** 内置工具开关:true=全启用(默认) / string[]=按工具名启用 / false=关闭 */
|
|
112
121
|
builtInTools?: boolean | string[];
|
|
122
|
+
/** 发给模型的历史令牌预算(约值),超出从前往后裁剪;≤0 表示不限制。默认 48000(见 useAgentChat) */
|
|
123
|
+
maxContextTokens?: number;
|
|
124
|
+
/** 历史消息硬上限(条),超出仅保留最近 N 条;≤0 表示不限制。默认 60(见 useAgentChat) */
|
|
125
|
+
maxHistoryMessages?: number;
|
|
113
126
|
}
|
|
114
127
|
export interface BusinessEvent {
|
|
115
128
|
type: string;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "agent-tool-chat",
|
|
3
3
|
"description": "An agent-driven chat plugin with ToolPackage architecture and host-controlled execution",
|
|
4
4
|
"author": "kangjinrui <1092014304@qq.com>",
|
|
5
|
-
"version": "1.0
|
|
5
|
+
"version": "1.1.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
8
8
|
"type": "module",
|