feat(actions): add tool description, description

This commit is contained in:
ItzCrazyKns
2025-12-09 11:41:55 +05:30
parent 3bffc72422
commit 01b537ade1
6 changed files with 105 additions and 18 deletions

View File

@@ -1,12 +1,19 @@
import z from 'zod';
import { ResearchAction } from '../../types';
const actionDescription = `
Use this action ONLY when you have completed all necessary research and are ready to provide a final answer to the user. This indicates that you have gathered sufficient information from previous steps and are concluding the research process.
YOU MUST CALL THIS ACTION TO SIGNAL COMPLETION; DO NOT OUTPUT FINAL ANSWERS DIRECTLY TO THE USER.
IT WILL BE AUTOMATICALLY TRIGGERED IF MAXIMUM ITERATIONS ARE REACHED SO IF YOU'RE LOW ON ITERATIONS, DON'T CALL IT AND INSTEAD FOCUS ON GATHERING ESSENTIAL INFO FIRST.
`
const doneAction: ResearchAction<any> = {
name: 'done',
description:
'Only call this after ___plan AND after any other needed tool calls when you truly have enough to answer. Do not call if information is still missing.',
enabled: (_) => true,
schema: z.object({}),
getToolDescription: () =>
'Only call this after ___plan AND after any other needed tool calls when you truly have enough to answer. Do not call if information is still missing.',
getDescription: () => actionDescription,
enabled: (_) => true,
execute: async (params, additionalConfig) => {
return {
type: 'done',