feat: add inbox

This commit is contained in:
2026-05-26 17:49:31 +08:00
parent f7fcd0e966
commit 68b5c8bc81
25 changed files with 2108 additions and 1 deletions
+38
View File
@@ -0,0 +1,38 @@
package inbox
import (
"os"
"time"
)
type BuildInput struct {
Agent string
Event string
CWD string
Title string
Body string
Source string
}
func BuildRecord(input BuildInput) Record {
host, _ := os.Hostname()
source := input.Source
if source == "" {
source = SourceLocal
}
return Record{
ID: NewID(time.Now()),
Time: time.Now(),
Host: host,
Agent: input.Agent,
Event: input.Event,
CWD: input.CWD,
Title: input.Title,
Body: input.Body,
Status: StatusPending,
Source: source,
Tmux: TmuxContext{
Pane: os.Getenv("TMUX_PANE"),
},
}
}