Conversation
Co-authored-by: daniel <daniel@onlook.dev>
Co-authored-by: daniel <daniel@onlook.dev>
|
Cursor Agent can help with this pull request. Just |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Co-authored-by: daniel <daniel@onlook.dev>
Co-authored-by: daniel <daniel@onlook.dev>
Description
This PR introduces a step limit mechanism to prevent AI agents from running endlessly, thereby controlling potential high costs and giving users more control over long-running tasks. The agent will now pause after a set number of steps (tool calls) and prompt the user to explicitly continue the task.
Key changes include:
Related Issues
N/A
Type of Change
Testing
To verify these changes:
Screenshots (if applicable)
N/A
Additional Notes
The current step limit is set to 10 tool calls, defined by
MAX_AGENT_STEPSinpackages/ai/src/agents/root.ts. This value can be adjusted as needed.Important
Introduces a step limit mechanism to pause AI agents after 10 tool calls, with UI for user control, in
use-chat/index.tsxandchat-tab-content/index.tsx.use-chat/index.tsxto pause AI agent after 10 tool calls.hitStepLimit,continueAfterStepLimit, anddismissStepLimitfunctions to manage step limit state.StepLimitBannercomponent instep-limit-banner.tsxto display when step limit is reached.StepLimitBannerinchat-tab-content/index.tsxto allow users to continue or stop the task.MAX_AGENT_STEPSinroot.tsto set server-side step limit to 20.This description was created by
for 69dfe03. You can customize this summary. It will automatically update as commits are pushed.