fix: remove 10 more unnecessary as any casts in opencode core (#22882)
This commit is contained in:
@@ -12,7 +12,6 @@ import { Config } from "../../config"
|
||||
import { ConsoleState } from "../../config/console-state"
|
||||
import { Account, AccountID, OrgID } from "../../account"
|
||||
import { AppRuntime } from "../../effect/app-runtime"
|
||||
import { zodToJsonSchema } from "zod-to-json-schema"
|
||||
import { errors } from "../error"
|
||||
import { lazy } from "../../util/lazy"
|
||||
import { Effect, Option } from "effect"
|
||||
@@ -226,8 +225,7 @@ export const ExperimentalRoutes = lazy(() =>
|
||||
tools.map((t) => ({
|
||||
id: t.id,
|
||||
description: t.description,
|
||||
// Handle both Zod schemas and plain JSON schemas
|
||||
parameters: (t.parameters as any)?._def ? zodToJsonSchema(t.parameters as any) : t.parameters,
|
||||
parameters: z.toJSONSchema(t.parameters),
|
||||
})),
|
||||
)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user