INNER CODE UNIT · Go
runInstanceStartCmd
smtg-ai/claude-squad · app/app.go:925
func runInstanceStartCmd(instance *session.Instance) tea.Cmd {
return func() tea.Msg {
err := instance.Start(true)
return instanceStartDoneMsg{instance: instance, err: err}
}
}
// snapshotActiveInstances returns the currently active (started, not paused)
// instances. Called on the main thread so the filtering doesn't race with
// state mutations.
func (m *home) snapshotActiveInstances() []*session.Instance {
var out []*session.Instance
for _, inst := range m.list.GetInstances() {
if inst.Started() && !inst.Paused() {
out = append(out, inst)
}
}
return out