Skip to main content
The chat interface is where you communicate with OpenCode AI agents to accomplish your coding tasks. It provides a rich, interactive experience for natural language programming.

Composing Messages

Message Input

The message input area is located at the bottom of the screen and features:
  • Multi-line text area - Automatically resizes as you type (up to a maximum height)
  • File mentions - Use @ to reference files in your project
  • Keyboard shortcuts - Enter to send, Shift + Enter for new lines
The text area supports up to 5 rows by default, with scrolling for longer messages.

Sending Messages

  • Press Enter to send your message
  • Press Shift + Enter to add a new line
  • Click the Send button to submit
The Send button is disabled until you type at least one character, preventing accidental empty messages.

Conversation Display

Message Types

The chat interface displays two types of messages:

User Messages

Your messages appear with a user icon and are styled in a muted color for clear distinction.

AI Responses

AI agent responses appear with a sparkle icon and feature rich markdown formatting.

Message Formatting

AI responses support full GitHub-flavored markdown, including:
  • Code blocks with syntax highlighting
  • Lists and nested lists
  • Tables
  • Links
  • Blockquotes
  • Bold and italic text

Tool Call Indicators

When the AI agent uses tools, you’ll see visual indicators showing:
1

Tool Icon

Each tool has a unique icon (e.g., pen for edit, eye for read, terminal for bash)
2

Tool Name and Target

The specific tool being used and what file or command it’s operating on
3

Status Indicator

  • Running - Yellow text with animated ellipsis
  • Completed - Muted gray text
  • Error - Red text
4

Additional Details

Context like line counts for file writes or diff stats for edits

Tool Display Examples

Here’s what you’ll see for common tool calls:
  • Edit: ✏️ edit src/app.ts (+12-5) - Shows additions and deletions
  • Read: 👁 read package.json - Shows which file is being read
  • Write: ✒️ write config.ts (45 lines) - Shows total lines written
  • Bash: $ npm install - Shows the command with description
  • Glob: 🔍 glob *.tsx in src/components - Shows search pattern and path

Message Queue

OpenCode Portal uses an intelligent message queue system:

Sequential Processing

  • Messages are processed one at a time
  • New messages added while the AI is thinking are queued
  • Queued messages display a “Queued” badge
  • Messages are automatically processed in order

Visual Feedback

When sending a message, the interface shows:
  • Button text changes to “Sending…”
  • A “Thinking…” indicator with animated ripple effect
When messages are queued:
  • A yellow “Queued” badge appears on the message
  • The badge disappears when processing begins
If a message fails to send:
  • An error message appears in red
  • The failed message is removed from the queue
  • You can try sending again

Model and Agent Selection

Below the message input, you can configure how the AI responds:

Agent Selection

Choose which specialized agent handles your request:
  • Default: The standard agent for general tasks
  • Plan: Specialized for planning and task breakdown
  • Custom agents: Any additional agents configured in your instance
Each agent shows a description when you hover over it.

Model Selection

Model selection is only available when not using a specialized agent. Agents have pre-configured model settings.
When using the default agent, you can select:
  • Provider: OpenAI, Anthropic, etc.
  • Model: Specific model version (e.g., GPT-4, Claude 3.5 Sonnet)
The model selector includes a searchable dropdown for quick access to your configured models.

Auto-Scrolling

The chat interface features intelligent auto-scrolling:
  • New messages: Automatically scrolls to bottom when new messages arrive
  • Manual scroll: If you scroll up to read history, auto-scroll pauses
  • Near bottom: Auto-scroll resumes when you’re within 100px of the bottom
  • Initial load: Automatically scrolls to the latest message when opening a session
The scroll position is tracked per session. Switching sessions preserves your scroll position.

Empty Session State

When you open a new session with no messages:
  • A centered message shows “No messages yet”
  • The input area is ready for your first message
  • All agent and model selections are available

Error Handling

If errors occur:
  • Message loading errors appear at the top of the chat
  • Send errors appear above the input area
  • Errors are displayed in red with clear descriptions
  • You can retry failed operations
If you encounter persistent errors, check your instance connection in the instance management screen.

Build docs developers (and LLMs) love