Add task sidebar workflow

This commit is contained in:
2026-06-24 12:28:56 +01:00
parent 45263d59f8
commit d133839194
33 changed files with 1890 additions and 134 deletions
+4 -2
View File
@@ -77,6 +77,7 @@ type Child struct {
WorkDir string
Kind ChildKind
ParentID string // empty for top-level sessions
TaskID string // empty unless launched from an explicit task context
// PresetRef names the source preset (when known). Used by trust
// gating to re-check on restart_process. Empty for freeform-argv
@@ -191,7 +192,7 @@ type PortSighting struct {
const ringCap = 1 << 20 // 1 MiB per SPEC §5
// newChildEntry builds the in-memory Child record but does NOT start a PTY.
func newChildEntry(id, name string, kind ChildKind, argv, env []string, parentID, workDir, presetRef string) *Child {
func newChildEntry(id, name string, kind ChildKind, argv, env []string, parentID, taskID, workDir, presetRef string) *Child {
c := &Child{
ID: id,
Name: name,
@@ -200,6 +201,7 @@ func newChildEntry(id, name string, kind ChildKind, argv, env []string, parentID
WorkDir: workDir,
Kind: kind,
ParentID: parentID,
TaskID: taskID,
PresetRef: presetRef,
ring: make([]byte, ringCap),
}
@@ -228,7 +230,7 @@ func (c *Child) startPTY(cols, rows uint16) (uint64, error) {
}
starting := StatusStarting
c.status.Store(&starting)
p, err := pkgpty.Start(c.Argv, c.Env, cols, rows)
p, err := pkgpty.Start(c.Argv, c.Env, c.WorkDir, cols, rows)
if err != nil {
em.Close()
errored := StatusErrored