share

package
v0.11.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Overview

Package share renders a session as a self-contained HTML page and uploads it to a paste service for easy URL-based sharing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(s *session.Session) (string, error)

Render produces a single-file HTML doc (inlined CSS, no JS) showing the conversation. Each message has role, content, tool calls collapsed, and timestamps. Style is a clean dark theme matching the TUI palette.

Types

type Uploader

type Uploader interface {
	Upload(ctx context.Context, html string) (url string, err error)
	Name() string
}

Uploader uploads HTML content somewhere and returns a public URL.

func NewUploader

func NewUploader(cfg config.ShareConfig) (Uploader, error)

NewUploader returns an Uploader for the configured backend. When backend is "" defaults to gist when a token is present, otherwise transfer-sh.

Jump to

Keyboard shortcuts

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