Documentation

AI Chat Interface

AI Chat Interface

The left panel of the Workspace Editor is an AI-powered chat assistant specialized for infrastructure-as-code. It can write Terraform code, explain resources, troubleshoot errors, and execute Terraform operations through tool calls.

Chat Features

  1. 1
    Sending Messages
    • Type your message in the text input at the bottom of the left panel
    • Press Enter or click the Send button to submit
    • Use Shift+Enter for multi-line messages
  2. 2
    Voice Input (Speech to Text)
    • Click the microphone button (Dictate button) next to the message input
    • Allow browser microphone access when prompted
    • Speak your message clearly
    • The speech is transcribed using Microsoft Cognitive Services
    • The transcribed text appears in the input field
    • Edit as needed before sending
    • Click the microphone button again to stop recording
  3. 3
    Model Selection
    • Click the model name displayed above the chat input
    • A dropdown opens showing all available AI models
    • Models are grouped by provider:
    • Anthropic: Claude Opus, Claude Sonnet, Claude Haiku
    • OpenAI: GPT-4, GPT-4o, GPT-4o Mini
    • Azure OpenAI: Azure-hosted GPT models
    • Google: Gemini Pro, Gemini Flash
    • Ollama: Locally hosted models (if configured)
    • Select a model to switch — subsequent messages use the new model
    • Different models have different strengths, costs, and context window sizes
  4. 4
    Token Usage Display
    • Token usage is shown for each AI response
    • Displayed metrics:
    • Input Tokens: Tokens sent to the model (your messages + context)
    • Output Tokens: Tokens generated by the model (AI response)
    • Cached Tokens: Tokens served from the model's prompt cache (lower cost)
    • Use this to monitor costs and optimize prompt length
  5. 5
    Message History
    • Previous messages in the workspace are loaded automatically on open
    • Scroll up to see older messages
    • Full conversation context is maintained between sessions
  6. 6
    AI Capabilities
    • Write Terraform code for any resource type
    • Explain existing code and resource configurations
    • Troubleshoot Terraform errors
    • Suggest best practices and improvements
    • Perform infrastructure research (AWS, Azure, GCP documentation)
    • Execute Terraform commands via tool calls (requires approval)
  7. 7
    Tool Approval / Confirmation Dialogs
    • When the AI wants to execute a Terraform command or modify files, a confirmation dialog appears
    • The dialog shows exactly what action will be taken
    • Click 'Approve' to allow the action
    • Click 'Deny' to reject the action
    • This ensures you remain in control of all infrastructure changes
  8. 8
    Thinking Indicator
    • For complex requests, the AI shows a 'thinking' animation while processing
    • This indicates the AI is reasoning through your request before responding
    • Do not send additional messages while the AI is thinking
  9. 9
    Streaming Responses
    • AI responses are streamed in real-time as they are generated
    • You can read the response as it appears without waiting for completion
    • A stop button appears during streaming if you want to halt the response
  10. 10
    Code Blocks
    • Terraform code in AI responses is displayed in syntax-highlighted code blocks
    • Copy button: Copies the code to your clipboard with one click
    • Code blocks support HCL, JSON, YAML, Bash, and other formats
  11. 11
    Chat Landing Page
    • When starting a new chat session, a landing page shows suggested prompts
    • Click any suggested prompt to pre-fill the input
    • Examples: 'Create an S3 bucket', 'Plan my infrastructure', 'Explain this error'