readnotes

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 10 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

Index

Constants

View Source
const MaxNotes = 50

MaxNotes is how many notes one call reads: an agent's batch, not the account.

Variables

View Source
var ErrInvalid = errors.New("invalid argument")

Functions

func Process

func Process(ctx context.Context, db bun.IDB, refs []string, maxChars int) *run

Process reads notes by uuid or path, in the order of refs; one missing fails it, named in the error. maxChars > 0 keeps only the start of each content, cut at the end of a line or a word (see cut).

Types

type Note

type Note struct {
	readitem.Result
	Length    int  `json:"length"` // the whole content's characters
	Truncated bool `json:"truncated"`
}

Note is a note as readitem gives it, with the whole content's length and whether max_chars cut it. The tags stay in their own field, whole: a cut content may lose the #tags written at its end.

Jump to

Keyboard shortcuts

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