@huyooo/ai-chat-types 0.2.40 → 0.2.41
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/index.d.ts +7 -2
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/index.ts +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _huyooo_ai_chat_core_events from '@huyooo/ai-chat-core/events';
|
|
2
|
-
export { AbortEvent, ChatEvent, ChatEventType, DoneEvent, ErrorCategory, ErrorDetails, ErrorEvent, PlanStep, PlanStepStatus, SearchEndEvent, SearchEvent, SearchResult, SearchResultEvent, SearchStartEvent,
|
|
2
|
+
export { AbortEvent, ChatEvent, ChatEventType, DoneEvent, ErrorCategory, ErrorDetails, ErrorEvent, PlanStep, PlanStepStatus, SearchEndEvent, SearchEvent, SearchResult, SearchResultEvent, SearchStartEvent, StatusEvent, StepEndEvent, StepEvent, StepStartEvent, TextDeltaEvent, TextEvent, ThinkingDeltaEvent, ThinkingEndEvent, ThinkingEvent, ThinkingStartEvent, TokenUsage, ToolApprovalRequestEvent, ToolCallInfo, ToolCallOutputEvent, ToolCallResultEvent, ToolCallStartEvent, ToolCallStatus, ToolErrorShape, ToolEvent, ToolUIShape, createAbort, createApiError, createDone, createError, createParseError, createRateLimitError, createSearchEnd, createSearchResult, createSearchStart, createStepEnd, createStepStart, createTextDelta, createThinkingDelta, createThinkingEnd, createThinkingStart, createTimeoutError, createToolCallOutput, createToolCallResult, createToolCallStart, createToolError, isAbortEvent, isErrorEvent, isRetryableError, isSearchEvent, isStatusEvent, isStepEvent, isTextEvent, isThinkingEvent, isThrowableToolError, isToolEvent } from '@huyooo/ai-chat-core/events';
|
|
3
3
|
import { ModelOption, ChatEvent } from '@huyooo/ai-chat-core';
|
|
4
4
|
export { AutoRunConfig, AutoRunMode, McpConnectionInfo, McpConnectionStatus, McpServerConfig, ModelOption, ProviderType, ThinkingMode } from '@huyooo/ai-chat-core';
|
|
5
5
|
|
|
@@ -127,7 +127,12 @@ interface ToolExecutionResult {
|
|
|
127
127
|
success: boolean;
|
|
128
128
|
result: string;
|
|
129
129
|
error?: string;
|
|
130
|
-
|
|
130
|
+
/** 工具 UI 声明(成功时) */
|
|
131
|
+
ui?: {
|
|
132
|
+
type: 'render' | 'action';
|
|
133
|
+
name: string;
|
|
134
|
+
props?: Record<string, unknown>;
|
|
135
|
+
};
|
|
131
136
|
toolError?: _huyooo_ai_chat_core_events.ToolErrorShape;
|
|
132
137
|
}
|
|
133
138
|
/** ASR 会话配置 */
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createThinkingStart as o,createThinkingDelta as e,createThinkingEnd as r,createSearchStart as t,createSearchResult as a,createSearchEnd as c,createToolCallStart as h,createToolCallResult as i,createToolCallOutput as m,createTextDelta as p,createDone as f,createError as n,createApiError as s,createRateLimitError as u,createToolError as v,createTimeoutError as x,createParseError as y,createAbort as b,createStepStart as d,createStepEnd as g,isThinkingEvent as j,isSearchEvent as k,isToolEvent as l,isTextEvent as q,isStatusEvent as w,isErrorEvent as z,isAbortEvent as A,isStepEvent as B,isRetryableError as C,
|
|
1
|
+
import{createThinkingStart as o,createThinkingDelta as e,createThinkingEnd as r,createSearchStart as t,createSearchResult as a,createSearchEnd as c,createToolCallStart as h,createToolCallResult as i,createToolCallOutput as m,createTextDelta as p,createDone as f,createError as n,createApiError as s,createRateLimitError as u,createToolError as v,createTimeoutError as x,createParseError as y,createAbort as b,createStepStart as d,createStepEnd as g,isThinkingEvent as j,isSearchEvent as k,isToolEvent as l,isTextEvent as q,isStatusEvent as w,isErrorEvent as z,isAbortEvent as A,isStepEvent as B,isRetryableError as C,isThrowableToolError as D}from"@huyooo/ai-chat-core/events";export{b as createAbort,s as createApiError,f as createDone,n as createError,y as createParseError,u as createRateLimitError,c as createSearchEnd,a as createSearchResult,t as createSearchStart,g as createStepEnd,d as createStepStart,p as createTextDelta,e as createThinkingDelta,r as createThinkingEnd,o as createThinkingStart,x as createTimeoutError,m as createToolCallOutput,i as createToolCallResult,h as createToolCallStart,v as createToolError,A as isAbortEvent,z as isErrorEvent,C as isRetryableError,k as isSearchEvent,w as isStatusEvent,B as isStepEvent,q as isTextEvent,j as isThinkingEvent,D as isThrowableToolError,l as isToolEvent};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huyooo/ai-chat-types",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.41",
|
|
4
4
|
"description": "AI Chat 通用类型定义 - 支持 Electron/Web/CLI 多端",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"test:watch": "vitest"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@huyooo/ai-chat-core": "^0.2.
|
|
26
|
+
"@huyooo/ai-chat-core": "^0.2.41"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"tsup": "^8.0.0",
|
package/src/index.ts
CHANGED
|
@@ -26,7 +26,7 @@ export type {
|
|
|
26
26
|
ErrorCategory,
|
|
27
27
|
ErrorDetails,
|
|
28
28
|
ToolErrorShape,
|
|
29
|
-
|
|
29
|
+
ToolUIShape,
|
|
30
30
|
|
|
31
31
|
// 思考事件
|
|
32
32
|
ThinkingStartEvent,
|
|
@@ -98,7 +98,6 @@ export {
|
|
|
98
98
|
isAbortEvent,
|
|
99
99
|
isStepEvent,
|
|
100
100
|
isRetryableError,
|
|
101
|
-
createThrowableToolError,
|
|
102
101
|
isThrowableToolError,
|
|
103
102
|
} from '@huyooo/ai-chat-core/events'
|
|
104
103
|
|
|
@@ -259,7 +258,8 @@ export interface ToolExecutionResult {
|
|
|
259
258
|
success: boolean
|
|
260
259
|
result: string
|
|
261
260
|
error?: string
|
|
262
|
-
|
|
261
|
+
/** 工具 UI 声明(成功时) */
|
|
262
|
+
ui?: { type: 'render' | 'action'; name: string; props?: Record<string, unknown> }
|
|
263
263
|
toolError?: import('@huyooo/ai-chat-core/events').ToolErrorShape
|
|
264
264
|
}
|
|
265
265
|
|