refactor(core): consolidate tool architecture
This commit is contained in:
parent
0fd73a2976
commit
8db7487c89
466 changed files with 9405 additions and 11071 deletions
|
|
@ -3,7 +3,8 @@ export * as SessionEvent from "./session-event.js"
|
|||
import { Schema } from "effect"
|
||||
import { optional } from "./schema.js"
|
||||
import { Event } from "./event.js"
|
||||
import { FinishReason, ToolContent } from "./llm.js"
|
||||
import { FinishReason } from "./llm.js"
|
||||
import { Content } from "./tool.js"
|
||||
import { Model } from "./model.js"
|
||||
import { NonNegativeInt, PositiveInt, RelativePath } from "./schema.js"
|
||||
import { FileAttachment } from "./prompt.js"
|
||||
|
|
@ -429,7 +430,7 @@ export namespace Tool {
|
|||
},
|
||||
schema: {
|
||||
...ToolBase,
|
||||
content: Schema.NonEmptyArray(ToolContent),
|
||||
content: Schema.NonEmptyArray(Content),
|
||||
metadata: Schema.Record(Schema.String, Schema.Json).pipe(optional),
|
||||
executed: Schema.Boolean,
|
||||
resultState: SessionMessage.ProviderState.pipe(optional),
|
||||
|
|
@ -451,7 +452,7 @@ export namespace Tool {
|
|||
schema: {
|
||||
...ToolBase,
|
||||
error: SessionError.Error,
|
||||
content: Schema.NonEmptyArray(ToolContent).pipe(optional),
|
||||
content: Schema.NonEmptyArray(Content).pipe(optional),
|
||||
metadata: Schema.Record(Schema.String, Schema.Json).pipe(optional),
|
||||
executed: Schema.Boolean,
|
||||
resultState: SessionMessage.ProviderState.pipe(optional),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue