Add multiple terminals per task and saved commands that start one

This commit is contained in:
Ian Gulliver
2026-10-21 08:59:03 -07:00
parent fe2a2022c3
commit d062d7ccae
15 changed files with 1418 additions and 450 deletions
+4 -5
View File
@@ -54,22 +54,21 @@ func New(dataDir string, portFirst int, ts *tsnet.Server) (*Server, error) {
return nil, err
}
terminals, err := terminal.New(filepath.Join(dataDir, "zsh"))
if err != nil {
return nil, err
}
lc, err := ts.LocalClient()
if err != nil {
return nil, err
}
s := &Server{
hub: newHub(),
terminals: terminals,
tailnet: lc,
hostname: ts.Hostname,
startedAt: time.Now().UTC(),
users: map[string]string{},
}
s.terminals, err = terminal.New(filepath.Join(dataDir, "zsh"), s.terminalsChanged)
if err != nil {
return nil, err
}
s.clients = clients.New(s.clientsChanged)
s.store, err = store.Open(filepath.Join(dataDir, "byre.db"), portFirst, s.publish)