feat(core): add embedded v2 session runtime and tool foundation (#30632)
This commit is contained in:
@@ -1,18 +1,11 @@
|
||||
export * as ToolOutput from "./tool-output"
|
||||
export {
|
||||
ToolContent as Content,
|
||||
ToolFileContent as FileContent,
|
||||
ToolTextContent as TextContent,
|
||||
toolFile as file,
|
||||
toolText as text,
|
||||
} from "@opencode-ai/llm"
|
||||
import { Schema } from "effect"
|
||||
|
||||
export class TextContent extends Schema.Class<TextContent>("Tool.TextContent")({
|
||||
type: Schema.Literal("text"),
|
||||
text: Schema.String,
|
||||
}) {}
|
||||
|
||||
export class FileContent extends Schema.Class<FileContent>("Tool.FileContent")({
|
||||
type: Schema.Literal("file"),
|
||||
uri: Schema.String,
|
||||
mime: Schema.String,
|
||||
name: Schema.String.pipe(Schema.optional),
|
||||
}) {}
|
||||
|
||||
export const Content = Schema.Union([TextContent, FileContent]).pipe(Schema.toTaggedUnion("type"))
|
||||
|
||||
export const Structured = Schema.Record(Schema.String, Schema.Any)
|
||||
|
||||
Reference in New Issue
Block a user