webchat

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package webchat is tomo's built-in channel: a small single-page UI served on localhost and a streaming endpoint behind it. No third-party dependency, so it is the channel that always works and the one to develop against.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebChat

type WebChat struct {
	Addr string // listen address, e.g. 127.0.0.1:8765
	// contains filtered or unexported fields
}

WebChat serves the UI and turns browser requests into exchanges.

func (*WebChat) Caps

func (w *WebChat) Caps() channel.Caps

Caps implements channel.Channel. The browser streams text, renders approval buttons, and can attach images pasted or picked in the page.

func (*WebChat) Name

func (w *WebChat) Name() string

Name implements channel.Channel.

func (*WebChat) Run

func (w *WebChat) Run(ctx context.Context, h channel.Handler) error

Run starts the HTTP server and blocks until ctx is cancelled.

Jump to

Keyboard shortcuts

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