MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / TestParseLineCursor_systemInit

Function TestParseLineCursor_systemInit

internal/loop/cursor_parser_test.go:8–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func TestParseLineCursor_systemInit(t *testing.T) {
9 line := `{"type":"system","subtype":"init","apiKeySource":"login","cwd":"/Users/user/project","session_id":"c6b62c6f-7ead-4fd6-9922-e952131177ff","model":"Claude 4 Sonnet","permissionMode":"default"}`
10 ev := ParseLineCursor(line)
11 if ev == nil {
12 t.Fatal("expected event, got nil")
13 }
14 if ev.Type != EventIterationStart {
15 t.Errorf("expected EventIterationStart, got %v", ev.Type)
16 }
17}
18
19func TestParseLineCursor_assistantText(t *testing.T) {
20 line := `{"type":"assistant","message":{"role":"assistant","content":[{"type":"text","text":"I'll read the README.md file"}]},"session_id":"c6b62c6f-7ead-4fd6-9922-e952131177ff"}`

Callers

nothing calls this directly

Calls 1

ParseLineCursorFunction · 0.85

Tested by

no test coverage detected