Lyna
SupportBlog
IntroductionFeaturesIntegrationsTips & TricksChangelog
Build

Build Mode

Build Mode is where the AI writes code. Describe what you want, and the AI reads relevant files, makes changes, runs commands, and verifies the result. Your app updates on the canvas in real time.


What Build Mode does

The AI operates as an autonomous coding agent. It can:

  • Read files to understand existing code and patterns
  • Write and edit files to implement changes
  • Run terminal commands to install packages, run builds, check types
  • Execute code in the sandbox to test behavior
  • Take screenshots of the live preview to verify visual output
  • Create and switch branches to isolate changes

Everything runs inside a cloud sandbox (powered by E2B), so your local machine is unaffected. The sandbox runs a full dev server with HMR.


How to access Build Mode

From the mode toggle

Click the mode selector in the bottom-left of the chat input and select Build. This is the default mode.

Chat mode selector showing Build, Plan, and Ask

With a slash command

Type /build followed by your request.

Keyboard shortcut: Ctrl+Shift+B (or Cmd+Shift+B on Mac)


Model selection

Choose the right model for your task from the selector next to the chat input:

ModelBest forCredit multiplier
Lyna LiteFast everyday tasks, simple edits1x
Lyna ProComplex features, multi-file changes2x
Lyna MaxArchitecture decisions, large refactors3x

Lyna Lite runs Claude Haiku, Pro runs Claude Sonnet, Max runs Claude Opus. You can also connect your own API keys from Anthropic, OpenAI, or GitHub Copilot: see AI Providers.


Effort levels

For supported models (currently Opus only), you can control reasoning depth:

  • Default: Standard reasoning for the model
  • Low: Quick responses, minimal deliberation
  • Medium: Balanced reasoning and speed
  • High: Thorough analysis before acting
  • Max: Maximum reasoning depth for hard problems

The effort selector appears next to the model selector when the active model supports extended thinking.


How the build process works

  1. You describe the task: Type your request. Attach file references, screenshots, or errors for context.
  2. AI reads and plans: Examines relevant files and determines what to change.
  3. AI implements changes: Creates or modifies files. The terminal shows installs, builds, and type checks.
  4. Live preview updates: The canvas reloads via HMR. Results appear immediately.
  5. AI verifies: Can take screenshots, run the type checker, and confirm things work.

Tool approvals

For sensitive operations, a permission dock appears with three options:

  • Deny: Reject the tool call
  • Allow Once: Approve this specific execution
  • Allow Always: Approve this tool for the rest of the session

Working with context

Context pills (12 types)

Context pills attach to your message and provide specific context:

PillDescription
FILEA specific file from your project
HIGHLIGHTSelected code from the editor
IMAGEA screenshot or uploaded image
ERRORA runtime error from the console
BRANCHThe current git branch context
AGENT_RULEA project rule from .lyna_ai/rules.md
INSTALLED_COMPONENTSList of installed shadcn/ui components
REACT_GRABA selected React component from the canvas
PERFORMANCEPerformance metrics from DevTools
DESIGN_PROMPTA curated design prompt
DESIGN_SYSTEMTheme and design system context
SKILLAn active AI skill

@ mentions (5 types)

Type @ in the chat to reference context:

  • @file: Attach a file by path
  • @folder: Attach an entire folder
  • @url: Fetch and include content from a URL
  • @git-changes: Include uncommitted changes
  • @problems: Include current diagnostics and errors

@ mention picker with Files, Folders, URL, and Git Changes tabs

Attachments and context menu

Click the + button in the chat input to access Knowledge, add references, or attach images (upload, screenshot, or Figma import).

Chat plus menu with Knowledge, Add reference, and Attach options

Follow-up suggestions

After each AI response, three follow-up suggestions appear to help you continue the conversation.


Building indicators

While the AI works, a building indicator shows the current operation, plan step progress, and a summary of what it's doing. You can stop the build at any time with the stop button.


Model cascade router

When using Lyna's built-in models, the platform can auto-route your request to the right model tier:

  • Tier 1 (Flash): Simple tasks like typo fixes and small edits
  • Tier 2 (Sonnet): Standard development, multi-file changes
  • Tier 3 (Opus): Complex architecture, large refactors

This happens transparently so you get the right balance of speed and quality.


Chat history

Click the history icon in the chat toolbar to browse previous conversations. Each session is saved with a title and you can resume any past conversation.

Chat history panel showing previous conversations


Context usage

Click the usage icon to see detailed token statistics for the current session: provider, model, context limit, input/output/cache tokens, message count, and cost breakdown.

Context usage dialog with session statistics


Conversation compaction

Long conversations are automatically compacted when they approach the 32K token threshold. Compaction uses a fast model (Gemini Flash) to summarize while keeping key context, file paths, and decisions. You can also trigger it manually with /compact.


Todo/Task stepper

For multi-step tasks, the AI creates a todoread/todowrite plan. Each step appears as a checkable item in the chat, and the AI works through them in order.


Tips

  • Be specific: "Add a dark mode toggle to the header" works better than "make the site look nicer."
  • Iterate in small steps: Break large features into multiple requests.
  • Use context: Select elements on the canvas, reference files, include errors.
  • Review changes: Check the diff in the code editor after each build.
  • Plan first: For complex tasks, plan the approach before building.