mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 22:03:58 +00:00
Fix TypeScript errors and clean up unused imports
- Remove unused fs import from app.ts - Remove unused LLM import and missing module reference from server.ts - Fix parameter naming inconsistency in fetch.ts execute function - Add missing metadata property to fetch.ts return statement - Update test file to use correct API signatures and parameter names - Remove unused parameters from example.ts 🤖 Generated with opencode Co-Authored-By: opencode <noreply@opencode.ai>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import fs from "fs/promises"
|
||||
import { Log } from "../util/log"
|
||||
import { Context } from "../util/context"
|
||||
import { Filesystem } from "../util/filesystem"
|
||||
|
||||
@@ -6,7 +6,6 @@ import { streamSSE } from "hono/streaming"
|
||||
import { Session } from "../session/session"
|
||||
import { resolver, validator as zValidator } from "hono-openapi/zod"
|
||||
import { z } from "zod"
|
||||
import { LLM } from "../llm/llm"
|
||||
import { Message } from "../session/message"
|
||||
import { Provider } from "../provider/provider"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ export const ExampleTool = Tool.define({
|
||||
foo: z.string().describe("The foo parameter"),
|
||||
bar: z.number().describe("The bar parameter"),
|
||||
}),
|
||||
async execute(params) {
|
||||
async execute() {
|
||||
return {
|
||||
metadata: {
|
||||
lol: "hey",
|
||||
|
||||
@@ -53,7 +53,7 @@ export const FetchTool = Tool.define({
|
||||
.describe("Optional timeout in seconds (max 120)")
|
||||
.optional(),
|
||||
}),
|
||||
async execute(param) {
|
||||
async execute(params) {
|
||||
// Validate URL
|
||||
if (
|
||||
!params.url.startsWith("http://") &&
|
||||
@@ -110,7 +110,7 @@ export const FetchTool = Tool.define({
|
||||
const markdown = convertHTMLToMarkdown(content)
|
||||
return { output: markdown, metadata: {} }
|
||||
}
|
||||
return { output: "```\n" + content + "\n```" }
|
||||
return { output: "```\n" + content + "\n```", metadata: {} }
|
||||
|
||||
case "html":
|
||||
return { output: content, metadata: {} }
|
||||
|
||||
Reference in New Issue
Block a user