Documentation
¶
Overview ¶
Package chat provides an interactive Bubbletea TUI for conversing with GitHub Copilot. It renders assistant responses as markdown with syntax highlighting using glamour.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run starts the chat TUI and returns a permission handler for integration with the Copilot SDK. The returned handler can be used with SessionConfig.OnPermissionRequest to enable interactive permission prompting within the TUI.
func RunWithEventChannel ¶
func RunWithEventChannel( ctx context.Context, session *copilot.Session, timeout time.Duration, eventChan chan tea.Msg, ) error
RunWithEventChannel starts the chat TUI with a pre-created event channel. This allows external code (like permission handlers) to send events to the TUI.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the Bubbletea model for the chat TUI.
func NewWithEventChannel ¶
func NewWithEventChannel( session *copilot.Session, timeout time.Duration, eventChan chan tea.Msg, ) *Model
NewWithEventChannel creates a new chat TUI model with an optional pre-existing event channel. If eventChan is nil, a new channel is created. This allows external code to send events to the TUI (e.g., permission requests).
func (*Model) GetEventChannel ¶
GetEventChannel returns the model's event channel for external use. This is useful for creating permission handlers that can send events to the TUI.
type ToolOutputChunkMsg ¶
ToolOutputChunkMsg is the exported version of toolOutputChunkMsg for external use.