fix: remove 10 more unnecessary as any casts in opencode core (#22882)

This commit is contained in:
Kit Langton
2026-04-16 16:11:05 -04:00
committed by GitHub
parent 5e650fd9e2
commit 1c33b866ba
6 changed files with 30 additions and 36 deletions

View File

@@ -157,16 +157,6 @@ describe("structured-output.AssistantMessage", () => {
})
describe("structured-output.createStructuredOutputTool", () => {
test("creates tool with correct id", () => {
const tool = SessionPrompt.createStructuredOutputTool({
schema: { type: "object", properties: { name: { type: "string" } } },
onSuccess: () => {},
})
// AI SDK tool type doesn't expose id, but we set it internally
expect((tool as any).id).toBe("StructuredOutput")
})
test("creates tool with description", () => {
const tool = SessionPrompt.createStructuredOutputTool({
schema: { type: "object" },