mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-02 23:23:45 +00:00
ci: format
This commit is contained in:
@@ -623,5 +623,7 @@ export function replace(content: string, oldString: string, newString: string, r
|
||||
if (notFound) {
|
||||
throw new Error("oldString not found in content")
|
||||
}
|
||||
throw new Error("oldString found multiple times and requires more code context to uniquely identify the intended match")
|
||||
throw new Error(
|
||||
"oldString found multiple times and requires more code context to uniquely identify the intended match",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -71,9 +71,7 @@ export namespace ToolRegistry {
|
||||
break
|
||||
case "array":
|
||||
if (!val.items) throw new Error(`array spec for ${key} requires 'items'`)
|
||||
base = z.array(
|
||||
val.items === "string" ? z.string() : val.items === "number" ? z.number() : z.boolean(),
|
||||
)
|
||||
base = z.array(val.items === "string" ? z.string() : val.items === "number" ? z.number() : z.boolean())
|
||||
break
|
||||
default:
|
||||
base = z.any()
|
||||
|
||||
@@ -11,14 +11,12 @@ const TodoInfo = z.object({
|
||||
})
|
||||
type TodoInfo = z.infer<typeof TodoInfo>
|
||||
|
||||
const state = Instance.state(
|
||||
() => {
|
||||
const todos: {
|
||||
[sessionId: string]: TodoInfo[]
|
||||
} = {}
|
||||
return todos
|
||||
},
|
||||
)
|
||||
const state = Instance.state(() => {
|
||||
const todos: {
|
||||
[sessionId: string]: TodoInfo[]
|
||||
} = {}
|
||||
return todos
|
||||
})
|
||||
|
||||
export const TodoWriteTool = Tool.define("todowrite", {
|
||||
description: DESCRIPTION_WRITE,
|
||||
|
||||
Reference in New Issue
Block a user