Documentation
¶
Overview ¶
Package firstrun is the plan of the first run of icebath: which steps of setting it up a user is shown, which of them this computer and profile have done already, which the user skipped or went through, the step in view, and whether the first run opens by itself. It reads nothing: the steps come with what their features found, and the progress with what the user did, as it is kept
Index ¶
- Constants
- Variables
- func Way(word string) bool
- type Found
- type Plan
- type Progress
- func (p *Progress) Again(now time.Time)
- func (p *Progress) Choose(way string, now time.Time)
- func (p Progress) Chosen() string
- func (p *Progress) Finish(now time.Time)
- func (p *Progress) Go(id string, now time.Time)
- func (p *Progress) Prove(id string, worked bool, now time.Time)
- func (p *Progress) Skip(id string, now time.Time)
- func (p *Progress) Unskip(id string, now time.Time)
- func (p *Progress) View(id string, now time.Time)
- type Row
- type State
- type Step
Constants ¶
const ( // The language, what icebath needs to work, and what is on but lacks something Quick = "quick" // Every step Full = "full" // What icebath needs, and the blank slate that turns off all but the basics Blank = "blank" // What icebath needs, and bringing in the setup of another agent program Import = "import" )
Ways through the first run, which decide the steps it shows
Variables ¶
Ways in the order the first run offers them
Functions ¶
Types ¶
type Found ¶
type Found struct {
// The step is set up here already, such as a model of new sessions that a key reaches
Done bool
// The feature is on and lacks something to work, such as a web search with no key
Lacks bool
// The step does not apply here, such as the keys of a terminal icebath knows nothing of
Absent bool
// What was found, one line a user reads: "OpenAI's key is in the environment"
Said string
// What was found that the step can take, each a phrase: "the key OPENAI_API_KEY", "the sign-in of Claude Code"
Offers []string
}
What a feature found of its step on this computer and profile, read without sending anything anywhere
type Plan ¶
type Plan struct {
Way string
Rows []Row
// Step in view, empty when none waits
Current string
// The first run opens by itself: it is not finished, and it started already or a step icebath needs is not done
Due bool
// The user ended the first run
Finished bool
// Steps icebath needs that are not done, in their order, whatever the way and whatever the user skipped
Needs []Step
}
What the first run shows now
func Make ¶
Plan of the steps as the progress stands: every step in its order, the first ones before the rest, each shown or hidden by the way and standing as what was found and what the user did say
func (Plan) Next ¶
First step that waits after the one of the id, then from the top. Empty when none waits but that one
type Progress ¶
type Progress struct {
// Way chosen, the quick one when empty
Way string `json:"way,omitempty"`
// Step in view when the user last moved, which an interrupted run comes back to
At string `json:"at,omitempty"`
// Steps the user skipped, went through, and tried with success
Skipped []string `json:"skipped,omitempty"`
Gone []string `json:"gone,omitempty"`
Proved []string `json:"proved,omitempty"`
// When the first run started and when it ended, zero for not yet
Started time.Time `json:"started,omitzero"`
Finished time.Time `json:"finished,omitzero"`
}
What the user did of the first run, kept for the profile
func (*Progress) Again ¶
Starts the first run over: nothing skipped or gone through, the tries kept as they stand
type Row ¶
type Row struct {
Step Step
State State
// A try of the step worked since it was last set up
Proved bool
}
One step in the plan and how it stands
type Step ¶
type Step struct {
// Unique among the steps, such as model; /setup <id> opens it
ID string
// What the step sets up, as the first run lists it: "Model"
Title string
// What it is for, a sentence
About string
// Place among the steps, lowest first
Order int
// The agent does not work without it: the first run opens while it is not done, every way shows it, Doctor names it
Needed bool
// Asked before every other step, as the language is
First bool
// Shown in these ways besides the full one, such as the import step in the way that brings another agent's setup
Ways []string
// What opens the page of the step: the key of a setting changed with its own control, otherwise the section of the settings menu,
// otherwise the slash line of a screen of the app
Setting, Area, Slash string
// Of the computer the window runs on rather than of the profile, read by the window
Here bool
// The step can be tried, such as a model asked for one word, which the user is shown before the step is said to work
Proves bool
Found Found
}
One step of setting icebath up, as its feature offers it