Documentation
¶
Overview ¶
page chat.go: This file defines the ChatPage, which is the main interface for users to interact with chat sessions, send messages, and view message history. It manages the layout of the chat interface, handles user input, and coordinates with the app's session and agent management to facilitate conversations.
Package page provides page components for the OpenCode TUI, including the main chat page, logs page, and page management utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAgentsPage ¶ added in v1.9.0
func NewAgentsPage(registry agentregistry.Registry) tea.Model
NewAgentsPage creates a new agents page.
Types ¶
type ChatKeyMap ¶
type ChatKeyMap struct {
ShowCompletionDialog key.Binding // Show completion dialog (@)
ShowCommandCompletionDialog key.Binding // Show command completion dialog (/)
NewSession key.Binding // Create new session (ctrl+n)
Cancel key.Binding // Cancel current operation (esc)
}
ChatKeyMap defines keyboard shortcuts for the chat page.
type Page ¶ added in v1.10.0
Page defines the interface that all pages must implement. It combines tea.Model with layout-specific interfaces for responsive sizing and keyboard bindings.
type PageChangeMsg ¶
type PageChangeMsg struct {
ID PageID
}
PageChangeMsg is used to change the current page
type PageID ¶
type PageID string
PageID is a unique identifier for a page
var AgentsPage PageID = "agents"
AgentsPage is the page ID for the agents page.
var ChatPage PageID = "chat"
ChatPage is the main page for interacting with chat sessions, sending messages, and viewing message history.
var LogsPage PageID = "logs"
LogsPage is the page for viewing logs.