Sypha AI Docs
FeaturesAt mentions

File Mentions

File mentions enable you to incorporate any workspace file directly into your Sypha conversation. Eliminate the need for copying code snippets manually - simply enter @/ and indicate the file requiring assistance.

Typing @/ in the chat displays your workspace files. Browse through directories, choose your desired file, and it becomes instantly accessible to Sypha - including all imports, associated functions, and contextual code.

File mentions are my constant debugging tool. Rather than determining which code segments to manually copy, I simply reference the file directly:

I'm getting this error when my form submits: @terminal

Here's my component: @/src/components/ContactForm.jsx

And the API endpoint: @/src/api/contact.js

What am I missing?

This supplies Sypha with all necessary elements - the error notification, component implementation, and API endpoint - without requiring any manual copying. Sypha accesses imports, dependencies, and all contextual code that might trigger the issue.

File mentions excel when addressing complex bugs spanning multiple files. Previously, I would meticulously copy each relevant file, ensuring nothing important was overlooked. Now I simply reference each file using @/ and Sypha obtains the complete picture.

When facing a problem next time, consider utilizing file mentions rather than copying code. You'll conserve time and receive superior answers since Sypha possesses all necessary context.

How It Works Under the Hood

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

  1. Upon message submission, Sypha identifies the @/path/to/file pattern within your text
  2. The extension resolves the file path in relation to your workspace root directory
  3. It determines whether the file is binary (such as an image) or text-based
  4. For text-based files, it extracts the complete file content
  5. The file content gets attached to your message using a structured format:
    <file_content path="path/to/file">
    [Complete file content]
    </file_content>
  6. This enriched message containing the embedded file content gets transmitted to the AI
  7. The AI now accesses the complete file content as though you had manually copied and inserted it

This seamless procedure executes automatically each time you employ file mentions, providing the AI with full context while eliminating manual copying.

On this page