Documentation
¶
Overview ¶
Package sessionstate folds a session's events into what a person asks about: is a run going, what is queued, how did the last one end, which pull requests exist, what waits for a person. It is pure; the commands feed it events from the API or the stream.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Run ¶
type Run struct {
ID string
Mode string
Stage string // starting, working, verifying, reviewing, waiting
}
Run is the run in progress.
type State ¶
type State struct {
LastSeq int
Stage string // chat or working, from session.created / session.working
Sandbox string
Active *Run
Queued []Prompt
Last *api.OutcomeStatus
PRs []api.PRStatus
Approvals []api.ApprovalStatus
Runs int // run.completed seen
PRsOpened int // pr.opened seen
Archived bool
Proposal string // an open "work in a sandbox?" proposal id
RunOf map[string]string // prompt id to the run it started
Outcomes map[string]*api.OutcomeStatus
Cancelled map[string]bool
// contains filtered or unexported fields
}
State is the fold of the events applied so far.