firstrun

package
v2.0.4-main.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 4 Imported by: ? 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 firstrun is the plan of the first run of icebath: which steps of setting it up a person is shown, which of them this computer and profile have done already, which the person 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 person did, as it is kept

Index

Constants

View Source
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

func Way

func Way(word string) bool

Whether the word names a way through the first run

Types

type Found

type Found struct {
	// The step is set up here already, such as a model of new chats 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 person 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 person ended the first run
	Finished bool
	// Steps icebath needs that are not done, in their order, whatever the way and whatever the person skipped
	Needs []Step
}

What the first run shows now

func Make

func Make(steps []Step, progress Progress) Plan

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 person did say

func (Plan) Left

func (p Plan) Left() []Row

Steps the way shows that still wait

func (Plan) Next

func (p Plan) Next(after string) string

First step that waits after the one of the id, then from the top; empty when none waits but that one

func (Plan) Row

func (p Plan) Row(id string) (Row, bool)

Row of the step, false when the plan has none of the id

func (Plan) Shown

func (p Plan) Shown() []Row

Rows the way shows, in their order

type Progress

type Progress struct {
	// Way chosen, the quick one when empty
	Way string `json:"way,omitempty"`
	// Step in view when the person last moved, which an interrupted run comes back to
	At string `json:"at,omitempty"`
	// Steps the person 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 person did of the first run, kept for the profile

func (*Progress) Again

func (p *Progress) Again(now time.Time)

Starts the first run over: nothing skipped or gone through, the tries kept as they stand

func (*Progress) Choose

func (p *Progress) Choose(way string, now time.Time)

Takes the way, the first run starting now when it had not

func (Progress) Chosen

func (p Progress) Chosen() string

Way the progress follows, the quick one when it names none it knows

func (*Progress) Finish

func (p *Progress) Finish(now time.Time)

Ends the first run, which never opens by itself again

func (*Progress) Go

func (p *Progress) Go(id string, now time.Time)

Records that the person went through the step's page

func (*Progress) Prove

func (p *Progress) Prove(id string, worked bool, now time.Time)

Records whether a try of the step worked

func (*Progress) Skip

func (p *Progress) Skip(id string, now time.Time)

Records that the person skipped the step

func (*Progress) Unskip

func (p *Progress) Unskip(id string, now time.Time)

Takes a skip back, the step waiting again

func (*Progress) View

func (p *Progress) View(id string, now time.Time)

Records the step in view, the first run starting now when it had not

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 State

type State int

How a step stands in the plan

const (
	// Not shown in the way chosen, or it does not apply here
	Hidden State = iota
	// Set up here already
	Done
	// The person went through its page
	Gone
	// The person skipped it
	Skipped
	// Waiting for the person
	Due
)

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, else the section of the settings menu, else 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 person is shown before the step is said to work
	Proves bool
	Found  Found
}

One step of setting icebath up, as its feature offers it

Jump to

Keyboard shortcuts

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