Uh oh!
There was an error while loading. Please reload this page.
improvement(copilot): tool dependency errors show as skipped - #864
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Greptile Summary
This PR improves the user experience in the copilot tool execution system by changing how dependency-related failures are handled. Previously, when tools failed due to missing dependencies (like API keys or required connections), they would display as "errored" which implied a system failure. Now, when a tool fails with the exact error message "skipped", it's treated as a "rejected" state instead of "errored".
The changes are implemented consistently across three key components:
- RunWorkflowTool (
run-workflow.ts): Modified to check if the error message equals "skipped" and set the target state to "rejected" instead of "errored" - Copilot Store (
store.ts): Enhanced thehandleToolFailurefunction and SSE handler to distinguish between skipped and errored states, with added debugging logs - Inline Tool Call (
inline-tool-call.tsx): Updated client-side tool execution to apply the same skipped vs errored logic
This change leverages existing infrastructure - the tool metadata already defines a "rejected" state with display name "Skipped workflow execution" and a skip icon. The modification ensures that dependency-related skips are visually distinguished from actual errors, providing clearer feedback to users about why a tool didn't execute and whether action is needed on their part.
Confidence score: 4/5
- This PR is safe to merge with minimal risk as it only changes UI state representation without affecting core functionality
- Score reflects well-contained changes that improve user experience without introducing breaking changes or complex logic
- Pay close attention to the store.ts file due to its central role in state management and the addition of debugging logs
3 files reviewed, 3 comments
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
* Dependency errors show as skipped instead of errored * Update apps/sim/lib/copilot/tools/client-tools/run-workflow.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Lint --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Dependency errors show as skipped instead of errored * Update apps/sim/lib/copilot/tools/client-tools/run-workflow.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Lint --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…ioai#864) * Dependency errors show as skipped instead of errored * Update apps/sim/lib/copilot/tools/client-tools/run-workflow.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Lint --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Summary
Tool dependency errors now show as skipped instead of errored
Type of Change
Testing
Manual testing
Checklist