Help us shape the future of Go! Take the 2026 Go Developer Survey

memtree

package
v0.19.13 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package memtree keeps a session's whole history reachable at a constant size, after OptChat (https://gist.github.com/VictorTaelin/91837951a5ce5b38f341ec1ba1df6449): a binary tree of one-line summaries over every message, a view of it that fades with age, and a zoom tool that opens any line back down to its message. In fresh mode every prompt starts a new context from the view; in compaction mode the view replaces Orb's summary when the context fills.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extension

func Extension(options Options) extensions.Factory

Extension builds memtree. It needs nothing from the host: summaries are kept in the session.

Types

type Options added in v0.16.0

type Options struct {
	Mode  string
	Model string
}

Options configure memtree. Mode is "fresh" (the default, OptChat's turn loop) or "compaction"; Model is the compactor as "provider/id", the session's model when empty.

func OptionsFrom added in v0.16.0

func OptionsFrom(settings map[string]any) Options

OptionsFrom reads a "plugins": {"memtree": {...}} settings object.

Jump to

Keyboard shortcuts

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