Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • add fix in copilot for errors

Type of Change

  • New feature

Testing

Tested manually, reuses the notifications setup for fix in copilot

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 Jan 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Jan 19, 2026 8:39pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 19, 2026

Greptile Summary

  • Adds "Fix in Copilot" feature to terminal error logs, allowing users to right-click on failed entries and send error details to the AI copilot for debugging assistance
  • Integrates with existing notification system using openCopilotWithMessage utility to format error messages with block context information
  • Conditionally displays the new context menu option only for failed log entries (!entry.success) to ensure relevant usage

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx Added handleFixInCopilot callback that formats error messages with block information and sends them to copilot
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/log-row-context-menu.tsx Added conditional "Fix in Copilot" menu item that only appears for failed log entries

Confidence score: 4/5

  • This PR introduces a well-structured feature with minimal risk and follows established patterns in the codebase
  • Score reflects clean implementation using existing utilities and proper conditional rendering, but deducted one point due to missing error handling in the handleFixInCopilot callback
  • Pay attention to the terminal.tsx file to ensure error handling is robust for edge cases where openCopilotWithMessage might fail

Sequence Diagram

sequenceDiagram
    participant User
    participant Terminal
    participant LogRowContextMenu
    participant openCopilotWithMessage

    User->>Terminal: "Right-click on error entry"
    Terminal->>LogRowContextMenu: "Show context menu"
    User->>LogRowContextMenu: "Click 'Fix in Copilot'"
    LogRowContextMenu->>Terminal: "Call handleFixInCopilot(entry)"
    Terminal->>Terminal: "Extract error message and block name"
    Terminal->>openCopilotWithMessage: "Send formatted error message"
    Terminal->>LogRowContextMenu: "Close context menu"
Loading

@waleedlatif1 waleedlatif1 merged commit 1861f77 into staging Jan 19, 2026
11 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/terminal branch January 19, 2026 21:42
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