tasksummary

package
v0.3.29 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const StandMaxChars = 40

StandMaxChars is a hard cap after the word clamp (very long tokens).

View Source
const StandMaxWords = 5

StandMaxWords is the sticky-note length: enough to queue the brain, short enough to fit a kanban card without ellipsis.

Variables

This section is empty.

Functions

func DisplayStand added in v0.3.25

func DisplayStand(summary string) string

DisplayStand returns the stand to show, or empty when summary is a fossil recap / empty. Long valid stands are clamped to StandMaxWords.

func FallbackStand added in v0.3.25

func FallbackStand(log *db.TaskLog) string

FallbackStand is the card/header fallback when there is no stand: the agent's question. Reconnect / continuation noise is never shown.

func GenerateAndStore

func GenerateAndStore(ctx context.Context, database *db.DB, taskID int64) (string, error)

func GenerateAndStoreForce

func GenerateAndStoreForce(ctx context.Context, database *db.DB, taskID int64) (string, error)

func IsNoiseLog added in v0.3.25

func IsNoiseLog(content string) bool

IsNoiseLog reports log lines that must never appear as a stand fallback (session reconnects, continuation markers, empty).

func IsStandLine added in v0.3.25

func IsStandLine(summary string) bool

IsStandLine reports whether summary is a one-line stand (queue-the-brain), not an old 2–4 bullet recap. Fossils must not render as the stand.

func KickoffGenerate added in v0.3.25

func KickoffGenerate(database *db.DB, taskID int64)

KickoffGenerate starts a background skip-if-exists generation (freeze-on-done).

func KickoffOnStatusChange added in v0.3.25

func KickoffOnStatusChange(database *db.DB, oldStatus, newStatus string, taskID int64)

KickoffOnStatusChange rewrites the stand when a task first enters blocked.

func KickoffRewrite added in v0.3.25

func KickoffRewrite(database *db.DB, taskID int64)

KickoffRewrite starts a background Force rewrite of the stand line.

func NeedsRefresh added in v0.3.25

func NeedsRefresh(task *db.Task, latest *db.TaskLog) bool

NeedsRefresh reports whether a stand should be rewritten for this task. Frozen on done/archived. Not while running (live crumb is enough). On blocked: rewrite fossils, or when new logs arrived after last distill.

func NormalizeStand added in v0.3.25

func NormalizeStand(s string) string

NormalizeStand flattens model output into a single stored stand line.

func ShouldRewriteOnStatus added in v0.3.25

func ShouldRewriteOnStatus(oldStatus, newStatus string) bool

ShouldRewriteOnStatus is true on the transition into blocked. That is the attention-change rewrite: the stand is the question now in front of you.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(apiKey string) *Service

func (*Service) GenerateSummary

func (s *Service) GenerateSummary(ctx context.Context, task *db.Task, logs []*db.TaskLog) (string, error)

func (*Service) IsAvailable

func (s *Service) IsAvailable() bool

Jump to

Keyboard shortcuts

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