notes

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 6 Imported by: 0 modules, 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 notes is the per-session text file (Objective, Progress, Now) and the pin that keeps the summarizer from rewriting it.

Index

Constants

This section is empty.

Variables

View Source
var ErrBlank = errors.New("nothing to pin")

ErrBlank says there is no text to pin.

Functions

This section is empty.

Types

type Notes

type Notes struct{ Store state.Store }

Notes is the set of session files in a state folder.

func (Notes) Get

func (n Notes) Get(id state.ID, key string) string

Get is the value of the first "<key>:" line of the session's notes, without the spaces after the colon; empty when there is none. The text is raw: it came from a file, so it goes through textsafe before it is shown or stored again.

func (Notes) Pin

func (n Notes) Pin(id state.ID, text textsafe.Text) error

Pin sets the Objective and stops the summarizer from changing it. The other lines of the file stay as they are.

func (Notes) Snooze

func (n Notes) Snooze(id state.ID, changed int64) error

Snooze mutes the needs-you state of a session until its state next changes: it stores when the state last changed, and the snapshot treats the mute as over once that time is no longer the one stored.

func (Notes) Unpin

func (n Notes) Unpin(id state.ID) error

Unpin lets the summarizer rewrite the Objective again.

func (Notes) Unsnooze

func (n Notes) Unsnooze(id state.ID) error

Unsnooze ends the mute at once.

func (Notes) Write

func (n Notes) Write(id state.ID, objective, progress, now textsafe.Text) error

Write replaces the notes with the three lines the hook keeps.

Jump to

Keyboard shortcuts

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