Sypha AI Docs
FeaturesAt mentions

Problem Mentions

The problems mention provides Sypha with immediate access to all workspace errors and warnings. Simply enter @problems and Sypha gains visibility into every diagnostic issue detected by VSCode.

Typing @ in the chat allows you to choose "Problems" from the dropdown, or you can directly enter @problems. Sypha instantly accesses all workspace errors and warnings, including their file locations and diagnostic messages.

The problems mention is my constant companion when facing build failures or TypeScript challenges. Rather than attempting to describe errors or copying them individually, I simply query:

I'm getting these TypeScript errors and I'm not sure how to fix them: @problems

Can you help me understand what's wrong and how to fix it?

This supplies Sypha with the full error catalog, including precise locations and messages. Sypha can subsequently examine patterns spanning multiple errors and propose comprehensive solutions.

Problems mentions become especially potent when merged with file mentions. During complex type error troubleshooting, I reference both:

I'm getting these type errors: @problems

Here's my component: @/src/components/DataTable.tsx
And the types file: @/src/types/api.ts

How can I fix these issues?

This strategy equips Sypha with all required elements - the precise errors, component implementation, and type declarations - without necessitating any manual copying.

When stuck on errors next time, consider employing @problems rather than manually copying error messages. You'll obtain more precise assistance because Sypha can view the complete error context and file locations.

How It Works Under the Hood

Here's the behind-the-scenes process when utilizing problems mentions in your message:

  1. Upon message submission, Sypha identifies the @problems pattern within your text
  2. The extension invokes VSCode's native vscode.languages.getDiagnostics() API to retrieve all errors and warnings
  3. It transforms these diagnostics into a structured text format containing file paths, line numbers, and error descriptions
  4. The formatted problems catalog gets attached to your message using a structured format:
    <workspace_diagnostics>
    /path/to/file.js:10:5 - error TS2322: Type 'string' is not assignable to type 'number'.
    /path/to/file.js:15:3 - warning: This variable is never used.
    </workspace_diagnostics>
  5. This enriched message containing the embedded diagnostics gets transmitted to the AI
  6. The AI now accesses all workspace errors and warnings, including their locations and descriptions

This procedure executes automatically each time you employ problems mentions, providing the AI with a comprehensive perspective of all workspace issues without requiring manual copying.

On this page