mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-01 06:42:26 +00:00
sync
This commit is contained in:
@@ -11,7 +11,6 @@ export const GrepTool = Tool.define({
|
||||
parameters: z.object({
|
||||
pattern: z
|
||||
.string()
|
||||
.nullable()
|
||||
.describe("The regex pattern to search for in file contents"),
|
||||
path: z
|
||||
.string()
|
||||
@@ -52,7 +51,7 @@ export const GrepTool = Tool.define({
|
||||
|
||||
if (exitCode === 1) {
|
||||
return {
|
||||
metadata: { matches: 0, truncated: false },
|
||||
metadata: { matches: 0, truncated: false, title: params.pattern },
|
||||
output: "No files found",
|
||||
}
|
||||
}
|
||||
@@ -94,7 +93,7 @@ export const GrepTool = Tool.define({
|
||||
|
||||
if (finalMatches.length === 0) {
|
||||
return {
|
||||
metadata: { matches: 0, truncated: false },
|
||||
metadata: { matches: 0, truncated: false, title: params.pattern },
|
||||
output: "No files found",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export const TodoWriteTool = Tool.define({
|
||||
return {
|
||||
output: JSON.stringify(params.todos, null, 2),
|
||||
metadata: {
|
||||
title: `${params.todos.length} todos`,
|
||||
title: `${params.todos.filter((x) => x.status !== "completed").length} todos`,
|
||||
todos: params.todos,
|
||||
},
|
||||
}
|
||||
@@ -50,7 +50,7 @@ export const TodoReadTool = Tool.define({
|
||||
return {
|
||||
metadata: {
|
||||
todos,
|
||||
title: ``,
|
||||
title: `${todos.filter((x) => x.status !== "completed").length} todos`,
|
||||
},
|
||||
output: JSON.stringify(todos, null, 2),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user