tui

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 21 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tui is a terminal interface to chat in a session, which is a throwaway, until there's a better one

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chat

func Chat(parent context.Context, client Client, id uuid.UUID, debug bool) error

Chat runs the interface to chat in the session with the identifier, until it's quit, with escape or control-c: its messages are shown, and what's typed is sent, with enter, and the model's reply is shown as it's generated, with that it's thinking, or, when debugging, its thinking, and the tools it calls, and their results. The changes which others make to the session, such as in another window, are shown as they're made, and whether someone is typing, or the model is replying, and the server is told when someone is typing.

Types

type Client

type Client interface {
	GetDetails(ctx context.Context) (*memoryschema.Details, error)
	GetSession(ctx context.Context, id uuid.UUID) (*schema.Session, error)
	ListSessionMessages(ctx context.Context, id uuid.UUID, req schema.MessageListRequest) (*schema.MessageList, error)
	Chat(ctx context.Context, id uuid.UUID, req schema.ChatRequest, stream llm.GeneratorStreamFn) (*schema.ChatResponse, error)
	SetSessionStatus(ctx context.Context, id uuid.UUID, status schema.SessionStatus) (*schema.Session, error)
	WatchEvents(ctx context.Context, fn func(eventschema.Event) error) error
}

Client is what the interface chats in a session with, and watches the changes to it with, which others make, such as in another window, and gets the memory's details with, such as the names of the person and the assistant

Jump to

Keyboard shortcuts

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