mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
live output from shell tool (#573)
This commit is contained in:
parent
0d5f7686d7
commit
bfeaac8441
4 changed files with 87 additions and 23 deletions
|
|
@ -64,7 +64,11 @@ export interface Tool<
|
|||
* @param params Parameters for the tool execution
|
||||
* @returns Result of the tool execution
|
||||
*/
|
||||
execute(params: TParams, signal: AbortSignal): Promise<TResult>;
|
||||
execute(
|
||||
params: TParams,
|
||||
signal: AbortSignal,
|
||||
onOutputChunk?: (chunk: string) => void,
|
||||
): Promise<TResult>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -144,7 +148,11 @@ export abstract class BaseTool<
|
|||
* @param signal AbortSignal for tool cancellation
|
||||
* @returns Result of the tool execution
|
||||
*/
|
||||
abstract execute(params: TParams, signal: AbortSignal): Promise<TResult>;
|
||||
abstract execute(
|
||||
params: TParams,
|
||||
signal: AbortSignal,
|
||||
onOutputChunk?: (chunk: string) => void,
|
||||
): Promise<TResult>;
|
||||
}
|
||||
|
||||
export interface ToolResult {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue