feat(02-01): implement protocol types, SessionRegistry, and LabelStore
- Enrich Session with Workspace, Label, WaitingSince fields - Protocol types: Request, Response, SessionInfo, SwitchArgs, LabelArgs - SessionRegistry with WaitingSince transition tracking - LabelStore with JSON file persistence
This commit is contained in:
19
types.go
19
types.go
@@ -1,5 +1,7 @@
|
||||
package main
|
||||
|
||||
import "time"
|
||||
|
||||
// SessionState represents the current activity state of a Claude Code session.
|
||||
type SessionState int
|
||||
|
||||
@@ -32,11 +34,14 @@ type Process struct {
|
||||
|
||||
// Session represents a Claude Code session enriched with JSONL metadata.
|
||||
type Session struct {
|
||||
Process Process
|
||||
SessionID string
|
||||
GitBranch string
|
||||
State SessionState
|
||||
Preview string // last lines of output
|
||||
CwdPath string // process cwd
|
||||
Worktree string // git worktree (may differ from cwd)
|
||||
Process Process
|
||||
SessionID string
|
||||
GitBranch string
|
||||
State SessionState
|
||||
Preview string // last lines of output
|
||||
CwdPath string // process cwd
|
||||
Worktree string // git worktree (may differ from cwd)
|
||||
Workspace string // i3 workspace number
|
||||
Label string // user-assigned label
|
||||
WaitingSince *time.Time // when session started waiting for input
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user