feat(ui): add retry button for failed tool calls#483
Open
JDis03 wants to merge 1 commit into
Open
Conversation
Fixes NeuralNomadsAI#473. When a tool call fails (rate limit, provider error, etc.), users can now retry by reverting to the original user message. How it works: - A "Retry" action appears in the tool call overflow menu when the tool state is "error". - Clicking retry calls the existing revert flow, which finds the user message before the failed tool call, reverts all messages after it, and restores the original prompt text in the input field. - The user can then change the model, edit the prompt, and resend. Files changed: - message-block.tsx: Added onRevert prop to ToolCallItem, handleRetry function, and retry menu item in actionMenuItems(). - All locale toolCall.ts files: Added toolCall.retry.label and toolCall.retry.title strings. Validation: - npm run typecheck --workspace @codenomad/ui
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/26045046321 Artifacts expire in 7 days.
|
Collaborator
|
Hey @JDis03 , Revert to last user message is already possible. Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #473. When a tool call fails (rate limit, provider error, etc.), users can now retry by reverting to the original user message.
How it works
error.Files changed
packages/ui/src/components/message-block.tsx: AddedonRevertprop toToolCallItem,handleRetryfunction, and retry menu item inactionMenuItems().toolCall.tsfiles: AddedtoolCall.retry.labelandtoolCall.retry.titlestrings (en, es, fr, ja, ru, he, zh-Hans).Validation
npm run typecheck --workspace @codenomad/ui