Template Editor Integration

Adding Snippet References

@-Symbol Trigger

Type @ followed by snippet name to reference snippets:

@system/greeting

Hello! @responses/welcome-message

For support, @contact/help-info

Autocomplete Feature

The template editor provides intelligent autocomplete:

  1. Type @ to trigger snippet suggestions
  2. Start typing the snippet name to filter results
  3. Use arrow keys to navigate suggestions
  4. Press Enter or click to insert snippet reference

Search and Filter

  • By name: Type partial names to find snippets
  • By hierarchy: Use / to navigate folder structures
  • Fuzzy matching: Finds snippets even with typos

Preview and Expansion

Hover Preview

Hover over any snippet reference to see:

  • Snippet content in a popup
  • Usage actions (View, Expand)
  • Quick preview without leaving the editor

Inline Expansion

Convert snippet references to static content:

  1. Hover over snippet reference
  2. Click “Expand” button
  3. Snippet becomes static text (loses reference)

⚠️ Warning: Expansion is permanent and removes the dynamic reference.

Reference Behavior

Dynamic Updates

Referenced snippets update automatically:

  • Content changes propagate immediately
  • No re-deployment needed for updates
  • All referencing prompts get changes instantly

Example Workflow

1. Create snippet: @system/greeting
   Content: "Hello! How can I help you today?"

2. Use in prompt: 
   "@system/greeting I'm here to assist with your order."

3. Update snippet content:
   "Hi there! How may I assist you?"

4. All prompts automatically show:
   "Hi there! How may I assist you? I'm here to assist with your order."

Reference Tracking

The system automatically tracks:

  • Which prompts use each snippet
  • Usage count for impact assessment
  • Reference cleanup when prompts are updated

Template Structure

Basic Usage

Template with snippet reference:
@system/greeting

{{ customerName }}, your order #{{ orderNumber }} is ready.

@responses/next-steps

Mixed Content

Combine snippets with regular text and variables:

@system/professional-greeting

Dear {{ customerName }},

@templates/order-confirmation

@legal/privacy-notice

Best regards,
The Autoblocks Team