page

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 18 Imported by: 0

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.

func NewChatPage

func NewChatPage(app *app.App, commands []dialog.Command) tea.Model

NewChatPage creates a new chat page with the given application.

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 LogPage

type LogPage interface {
	tea.Model
	layout.Sizeable
	layout.Bindings
}

LogPage defines the interface for the logs page.

func NewLogsPage

func NewLogsPage() LogPage

NewLogsPage creates a new logs page.

type Page added in v1.10.0

type Page interface {
	tea.Model
	layout.Sizeable
	layout.Bindings
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL