From 6a5481368f1db90897adfc03a3b9e77cc33ba3bf Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Wed, 10 Sep 2025 13:53:45 +0100 Subject: [PATCH] docs(agent-task view): improve `--help` docs Signed-off-by: Babak K. Shandiz --- pkg/cmd/agent-task/view/view.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/agent-task/view/view.go b/pkg/cmd/agent-task/view/view.go index b592af7cf..787157ffe 100644 --- a/pkg/cmd/agent-task/view/view.go +++ b/pkg/cmd/agent-task/view/view.go @@ -51,10 +51,26 @@ func NewCmdView(f *cmdutil.Factory, runF func(*ViewOptions) error) *cobra.Comman cmd := &cobra.Command{ Use: "view [ | | | ]", - Short: "View an agent task session", + Short: "View an agent task session (preview)", Long: heredoc.Doc(` View an agent task session. `), + Example: heredoc.Doc(` + # View an agent task by session ID + $ gh agent-task view e2fa49d2-f164-4a56-ab99-498090b8fcdf + + # View an agent task by pull request number in current repo + $ gh agent-task view 12345 + + # View an agent task by pull request number + $ gh agent-task view --repo OWNER/REPO 12345 + + # View an agent task by pull request reference + $ gh agent-task view OWNER/REPO#12345 + + # View a pull request agents tasks in the browser + $ gh agent-task view 12345 --web + `), Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { // Support -R/--repo override