@@ -274,13 +274,19 @@ func TestClaudeAdditionalStatusLineFieldsJSONShape(t *testing.T) {
274274 JSON : `{
275275 "cwd": "/repo/project",
276276 "session_name": "release-check",
277+ "prompt_id": "prompt-456",
277278 "transcript_path": "/repo/project/.claude/transcript.jsonl",
278279 "version": "2.1.123",
279280 "output_style": {
280281 "name": "default"
281282 },
282283 "workspace": {
283- "added_dirs": ["/repo/shared", "/repo/docs"]
284+ "added_dirs": ["/repo/shared", "/repo/docs"],
285+ "repo": {
286+ "host": "github.com",
287+ "owner": "anthropics",
288+ "name": "claude-code"
289+ }
284290 },
285291 "exceeds_200k_tokens": true,
286292 "vim": {
@@ -289,6 +295,11 @@ func TestClaudeAdditionalStatusLineFieldsJSONShape(t *testing.T) {
289295 "agent": {
290296 "name": "security-reviewer"
291297 },
298+ "pr": {
299+ "number": 1234,
300+ "url": "https://github.com/anthropics/claude-code/pull/1234",
301+ "review_state": "pending"
302+ },
292303 "worktree": {
293304 "name": "my-feature",
294305 "path": "/repo/project/.claude/worktrees/my-feature",
@@ -299,15 +310,28 @@ func TestClaudeAdditionalStatusLineFieldsJSONShape(t *testing.T) {
299310 "fast_mode": true
300311 }` ,
301312 Expected : ClaudeData {
302- CWD : "/repo/project" ,
303- SessionName : "release-check" ,
304- TranscriptPath : "/repo/project/.claude/transcript.jsonl" ,
305- Version : "2.1.123" ,
306- OutputStyle : ClaudeOutputStyle {Name : defaultStr },
307- Workspace : ClaudeWorkspace {AddedDirs : []string {"/repo/shared" , "/repo/docs" }},
313+ CWD : "/repo/project" ,
314+ SessionName : "release-check" ,
315+ PromptID : "prompt-456" ,
316+ TranscriptPath : "/repo/project/.claude/transcript.jsonl" ,
317+ Version : "2.1.123" ,
318+ OutputStyle : ClaudeOutputStyle {Name : defaultStr },
319+ Workspace : ClaudeWorkspace {
320+ AddedDirs : []string {"/repo/shared" , "/repo/docs" },
321+ Repo : ClaudeRepo {
322+ Host : "github.com" ,
323+ Owner : "anthropics" ,
324+ Name : "claude-code" ,
325+ },
326+ },
308327 Exceeds200KTokens : true ,
309328 Vim : ClaudeVim {Mode : "NORMAL" },
310329 Agent : ClaudeAgent {Name : "security-reviewer" },
330+ PR : ClaudePR {
331+ Number : json .Number ("1234" ),
332+ URL : "https://github.com/anthropics/claude-code/pull/1234" ,
333+ ReviewState : "pending" ,
334+ },
311335 Worktree : ClaudeWorktree {
312336 Name : "my-feature" ,
313337 Path : "/repo/project/.claude/worktrees/my-feature" ,
@@ -331,6 +355,7 @@ func TestClaudeAdditionalStatusLineFieldsJSONShape(t *testing.T) {
331355 "workspace": {},
332356 "vim": {},
333357 "agent": {},
358+ "pr": {},
334359 "worktree": {}
335360 }` ,
336361 Expected : ClaudeData {},
@@ -377,6 +402,7 @@ func TestClaudeAdditionalStatusLineFieldsJSONShape(t *testing.T) {
377402 assert .NoError (t , err , tc .Case )
378403 assert .Equal (t , tc .Expected .CWD , data .CWD , tc .Case )
379404 assert .Equal (t , tc .Expected .SessionName , data .SessionName , tc .Case )
405+ assert .Equal (t , tc .Expected .PromptID , data .PromptID , tc .Case )
380406 assert .Equal (t , tc .Expected .TranscriptPath , data .TranscriptPath , tc .Case )
381407 assert .Equal (t , tc .Expected .Version , data .Version , tc .Case )
382408 assert .Equal (t , tc .Expected .OutputStyle .Name , data .OutputStyle .Name , tc .Case )
@@ -388,6 +414,12 @@ func TestClaudeAdditionalStatusLineFieldsJSONShape(t *testing.T) {
388414 assert .Equal (t , tc .Expected .Exceeds200KTokens , data .Exceeds200KTokens , tc .Case )
389415 assert .Equal (t , tc .Expected .Vim .Mode , data .Vim .Mode , tc .Case )
390416 assert .Equal (t , tc .Expected .Agent .Name , data .Agent .Name , tc .Case )
417+ assert .Equal (t , tc .Expected .Workspace .Repo .Host , data .Workspace .Repo .Host , tc .Case )
418+ assert .Equal (t , tc .Expected .Workspace .Repo .Owner , data .Workspace .Repo .Owner , tc .Case )
419+ assert .Equal (t , tc .Expected .Workspace .Repo .Name , data .Workspace .Repo .Name , tc .Case )
420+ assert .Equal (t , tc .Expected .PR .Number , data .PR .Number , tc .Case )
421+ assert .Equal (t , tc .Expected .PR .URL , data .PR .URL , tc .Case )
422+ assert .Equal (t , tc .Expected .PR .ReviewState , data .PR .ReviewState , tc .Case )
391423 assert .Equal (t , tc .Expected .Worktree .Name , data .Worktree .Name , tc .Case )
392424 assert .Equal (t , tc .Expected .Worktree .Path , data .Worktree .Path , tc .Case )
393425 assert .Equal (t , tc .Expected .Worktree .Branch , data .Worktree .Branch , tc .Case )
0 commit comments