Max Beizer
ceb8cf2561
Polish --json support for agent-task view
...
- Rename 'status' field to 'state' for consistency with struct and UI
- Add missing JSON fields: completedAt, user, pullRequestTitle, pullRequestState
- Add test for nil PullRequest with --json
- Expand existing JSON test to cover new fields
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-01 09:09:08 -06:00
Max Beizer
250d5a850a
Fix gofmt alignment in view_test.go
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-01 08:57:53 -06:00
Max Beizer
7241b42ecf
Add --json support to gh agent-task view
...
Add --json, --jq, and --template flags to `gh agent-task view`,
consistent with the pattern used by `gh pr view --json`,
`gh issue view --json`, etc.
This reuses the same ExportData interface and SessionFields defined
for list, applying them to the single-session view output.
Closes https://github.com/cli/cli/issues/12805 (partial)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 09:22:28 -06:00
Babak K. Shandiz
eb3c842818
test(agent-task view): populate Session.Name in all test cases
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 17:39:06 +01:00
Babak K. Shandiz
ecfbb67e99
fix(agent-task view): improve session overview
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 17:37:25 +01:00
Babak K. Shandiz
3091c21320
fix(agent-task view): re-fetch session to get all pieces of data
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-19 16:45:42 +01:00
Babak K. Shandiz
123c9eaba8
fix(agent-task view): improve session error
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 16:14:31 +01:00
Babak K. Shandiz
beba8f6387
fix(agent-task view): display session error
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 16:12:11 +01:00
Babak K. Shandiz
f0a0c4b856
fix(agent-task view): display zero premium requests
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-18 10:18:40 +01:00
Babak K. Shandiz
661817de50
fix(agent-task view): omit session overview in log mode
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-17 13:59:13 +01:00
Babak K. Shandiz
99a61618df
fix(agent-task view): display premium requests used
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-17 13:29:38 +01:00
Babak K. Shandiz
49ba21a366
fix(agent-task view): display session duration
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-17 12:20:40 +01:00
Babak K. Shandiz
87b310a881
fix(agent-task view): display completed sessions as "Ready for review"
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-17 11:58:04 +01:00
Kynan Ware
0fb10fca7d
Various log rendering improvements
...
Updated the LogRenderer interface and implementations to accept *iostreams.IOStreams instead of *iostreams.ColorScheme, enabling access to terminal theme and width for improved markdown rendering. Refactored related code, tests, and mocks to support this change, and enhanced log rendering to better handle markdown and code output for various tool calls.
2025-09-15 10:13:55 -06:00
Babak K. Shandiz
1ccbb0af83
feat(agent-task view): add --log and --follow flags
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-15 10:13:55 -06:00
Babak K. Shandiz
3798d98969
feat(agent-task view): support PR /agent-sessions/* URL as argument
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 18:57:58 +01:00
Babak K. Shandiz
b3b8697cf3
test(agent-task view): enhance naming and stubs
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 11:05:29 +01:00
Babak K. Shandiz
ecbad7ecb9
test(agent-task view): add --web mode tests
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-10 11:05:29 +01:00
Babak K. Shandiz
ec8f412cca
docs(agent-task view): explain test case rationale
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-09 12:24:09 +01:00
Babak K. Shandiz
6e78b8d68f
test(agent-task view): update tests
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-08 13:51:38 +01:00
Babak K. Shandiz
8482e3d2a4
feat(agent-task view): support PR arg
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-05 17:03:59 +01:00
Babak K. Shandiz
d3fa0a70bc
test(agent-task view): add tests for the view command
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-09-05 12:55:15 +01:00