Skip to content

feat: add Ask Chat action to git refresh error toasts#150

Open
tylergraydev wants to merge 1 commit into
mainfrom
tylergraydev/git-error-ask-chat
Open

feat: add Ask Chat action to git refresh error toasts#150
tylergraydev wants to merge 1 commit into
mainfrom
tylergraydev/git-error-ask-chat

Conversation

@tylergraydev

Copy link
Copy Markdown
Owner

Summary

  • When git diff refresh fails (loadDiff / loadRepoDiff), an error toast now appears with an Ask Chat button
  • Clicking the button sends the error to the active workspace's chat, formatted in a code block, and asks the LLM to diagnose and fix it
  • Follows the same pattern as the existing "Fix CI" flow in ChangesPanel

Files changed

  • src/stores/diffStore.ts — added showGitErrorToast() helper, wired into catch blocks
  • src/stores/diffStore.test.ts — 4 new tests covering toast creation, click behavior, and edge cases

Test plan

  • npx vitest run src/stores/diffStore.test.ts — 51 tests pass
  • Manual: trigger a git error (e.g. corrupt repo path), verify error toast appears with "Ask Chat" button
  • Manual: click "Ask Chat", verify error is sent to chat and LLM responds

🤖 Generated with Claude Code

When git diff refresh fails, the error toast now includes an "Ask Chat"
button that sends the error to the active workspace's chat and asks the
LLM to diagnose and fix it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.

1 participant