Sypha AI Docs
FeaturesAt mentions

Folder Mentions

Folder mentions enable you to incorporate entire directories into your Sypha conversation. Simply enter @/ followed by a folder path with a trailing slash, and Sypha gains access to the directory structure and its contents.

Typing @/ in chat displays your workspace files and directories. Browse to your desired folder, ensure you include the trailing slash, and Sypha will access the directory's structure and contents.

Folder mentions serve me when requiring assistance with understanding or refactoring complete codebase sections. Rather than citing individual files sequentially, I can simply indicate the entire directory:

I'm trying to understand how the authentication flow works in my app.
Can you explain the structure and relationships between the files in @/src/auth/?

Sypha can subsequently access all files within the auth directory, their contents, and their interrelationships. This provides the complete context for explaining intricate interactions across multiple files.

Folder mentions also prove ideal for obtaining assistance with project organization. When uncertain about my project structure's effectiveness, I request Sypha to evaluate it:

I'm setting up a new React project. Does this folder structure make sense? @/src/
What would you change to make it more maintainable as the project grows?

When working with multiple interconnected files in the future, consider employing folder mentions rather than citing each file separately. You'll obtain more comprehensive assistance since Sypha can perceive the broader picture of how components interconnect.

How It Works Under the Hood

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

  1. Upon message submission, Sypha identifies the @/path/to/folder/ pattern (including trailing slash) within your text

  2. The extension resolves the folder path in relation to your workspace root directory

  3. It invokes fs.readdir() to retrieve a catalog of all files and subdirectories within that folder

  4. For every file in the directory, it determines whether it's binary or text-based

  5. For text-based files, it extracts the complete content

  6. The folder structure and file contents get attached to your message using a structured format:

    <folder_content path="path/to/folder">
    ├── file1.txt
    ├── file2.js
    └── subfolder/
    
    <file_content path="path/to/folder/file1.txt">
    [File content]
    </file_content>
    
    <file_content path="path/to/folder/file2.js">
    [File content]
    </file_content>
    </folder_content>
  7. This enriched message containing the embedded folder structure and file contents gets transmitted to the AI

  8. The AI now accesses both the directory architecture and the content of files within that directory

This procedure executes automatically each time you employ folder mentions, providing the AI with a comprehensive perspective of your project structure and file contents.

On this page