Skip to content

improvement(copilot): tool dependency errors show as skipped#864

Merged
Sg312 merged 3 commits intostagingfrom
improvement/copilot-tool-dependency-error
Aug 4, 2025
Merged

improvement(copilot): tool dependency errors show as skipped#864
Sg312 merged 3 commits intostagingfrom
improvement/copilot-tool-dependency-error

Conversation

@Sg312
Copy link
Contributor

@Sg312 Sg312 commented Aug 4, 2025

Summary

Tool dependency errors now show as skipped instead of errored

Type of Change

  • Other: ui update

Testing

Manual testing

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Aug 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sim ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 10:19pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Aug 4, 2025 10:19pm

@Sg312 Sg312 marked this pull request as draft August 4, 2025 22:09
@Sg312 Sg312 changed the base branch from main to staging August 4, 2025 22:09
@Sg312 Sg312 marked this pull request as ready for review August 4, 2025 22:10
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. RunWorkflowTool (run-workflow.ts): Modified to check if the error message equals "skipped" and set the target state to "rejected" instead of "errored"
  2. Copilot Store (store.ts): Enhanced the handleToolFailure function and SSE handler to distinguish between skipped and errored states, with added debugging logs
  3. 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

Edit Code Review Bot Settings | Greptile

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview – docs August 4, 2025 22:12 Inactive
@vercel vercel bot temporarily deployed to Preview – docs August 4, 2025 22:15 Inactive
@Sg312 Sg312 merged commit eb51d6d into staging Aug 4, 2025
5 checks passed
waleedlatif1 pushed a commit that referenced this pull request Aug 5, 2025
* 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>
@waleedlatif1 waleedlatif1 deleted the improvement/copilot-tool-dependency-error branch August 6, 2025 00:22
waleedlatif1 pushed a commit that referenced this pull request Aug 6, 2025
* 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>
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants