Sypha AI Docs
FeaturesAt mentions

Git Mentions

Git mentions enable you to incorporate your repository's history and modifications directly into your Sypha conversation. You can cite uncommitted modifications using @git-changes or particular commits via @[commit-hash].

Typing @ in chat allows you to choose "Git Changes" from the dropdown, or you can directly enter @git-changes. For particular commits, enter @ followed by the commit hash (minimum 7 characters). Sypha instantly accesses the git status, diffs, commit descriptions, and other pertinent information.

Git mentions are my regular tool when attempting to comprehend code modifications or troubleshoot issues arising from recent commits. Rather than attempting to copy diffs or commit logs manually, I simply query:

I think this commit broke our authentication flow: @a1b2c3d

Can you explain what changed and why it might be causing the issue?

This supplies Sypha with complete commit details, encompassing the commit description, author, timestamp, and the comprehensive diff. Sypha can subsequently examine precisely what modifications occurred and how they might impact other codebase sections.

The @git-changes mention proves ideal when working on modifications and seeking feedback prior to committing:

Here are my current changes: @git-changes

I'm trying to implement a new feature for user profiles. Does my approach make sense?
Are there any potential issues or improvements you'd suggest?

This presents Sypha with all your uncommitted modifications, encompassing new files, altered files, and their diffs. Sypha can subsequently evaluate your changes and offer implementation feedback.

Git mentions become especially potent when merged with file mentions. During bug investigation, I frequently cite both:

I think this commit introduced a bug: @a1b2c3d

Here's the current implementation: @/src/components/Auth.jsx

How can I fix the issue while preserving the intended functionality?

When working with code modifications or investigating issues in the future, consider utilizing git mentions rather than manually describing or copying changes. You'll receive more accurate assistance since Sypha can observe precisely what changed and within what context.

How It Works Under the Hood

Here's the behind-the-scenes process when employing git mentions in your message:

For Git Changes (@git-changes)

  1. Upon message submission, Sypha identifies the @git-changes pattern within your text

  2. The extension executes git commands to retrieve the current working state of your repository

  3. It captures the results of git status and git diff to access all uncommitted modifications

  4. This information gets attached to your message using a structured format:

    <git_working_state>
    On branch main
    Changes not staged for commit:
      modified: src/components/Button.jsx
      modified: src/styles/main.css
    
    [Complete diff output with all changes]
    </git_working_state>

For Specific Commits (@[commit-hash])

  1. Upon message submission, Sypha identifies the @ followed by a commit hash pattern

  2. The extension executes git show and associated commands to retrieve information about that commit

  3. It obtains the commit description, author, timestamp, and the comprehensive diff

  4. This information gets attached to your message using a structured format:

    <git_commit hash="a1b2c3d">
    commit a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t
    Author: Developer Name <dev@example.com>
    Date: Mon May 20 14:30:45 2025 -0700
    
    Fix authentication bug in login form
    
    [Complete diff output showing all changes in the commit]
    </git_commit>

This procedure executes automatically each time you employ git mentions, providing the AI with complete visibility into your code modifications without requiring manual copying of diffs or commit logs.

On this page