chore: generate
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
import { Effect } from "effect"
|
||||
import { LLMEvent, type ToolCallPart, ToolFailure, ToolOutput, ToolResultValue, type ToolOutput as ToolOutputType, type ToolResultValue as ToolResultValueType } from "./schema"
|
||||
import {
|
||||
LLMEvent,
|
||||
type ToolCallPart,
|
||||
ToolFailure,
|
||||
ToolOutput,
|
||||
ToolResultValue,
|
||||
type ToolOutput as ToolOutputType,
|
||||
type ToolResultValue as ToolResultValueType,
|
||||
} from "./schema"
|
||||
import { type AnyTool, type Tools } from "./tool"
|
||||
|
||||
export interface ToolSettlement {
|
||||
@@ -52,11 +60,7 @@ const decodeAndExecute = (tool: AnyTool, call: ToolCallPart): Effect.Effect<Tool
|
||||
),
|
||||
)
|
||||
|
||||
const result = (
|
||||
call: ToolCallPart,
|
||||
value: ToolResultValueType | ToolSettlement,
|
||||
error?: unknown,
|
||||
): DispatchResult => {
|
||||
const result = (call: ToolCallPart, value: ToolResultValueType | ToolSettlement, error?: unknown): DispatchResult => {
|
||||
const settlement = ToolResultValue.is(value) ? { result: value } : value
|
||||
return {
|
||||
result: settlement.result,
|
||||
|
||||
Reference in New Issue
Block a user