From ab7e4039daa1994b1dca60413636a92d5d72d448 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Wed, 10 Sep 2025 10:54:40 +0100 Subject: [PATCH] refactor: move Copilot Agents home URL to capi Signed-off-by: Babak K. Shandiz --- pkg/cmd/agent-task/capi/sessions.go | 2 ++ pkg/cmd/agent-task/list/list.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/agent-task/capi/sessions.go b/pkg/cmd/agent-task/capi/sessions.go index f28914f80..aa7deabaf 100644 --- a/pkg/cmd/agent-task/capi/sessions.go +++ b/pkg/cmd/agent-task/capi/sessions.go @@ -18,6 +18,8 @@ import ( "github.com/vmihailenco/msgpack/v5" ) +const AgentsHomeURL = "https://github.com/copilot/agents" + var defaultSessionsPerPage = 50 var ErrSessionNotFound = errors.New("not found") diff --git a/pkg/cmd/agent-task/list/list.go b/pkg/cmd/agent-task/list/list.go index bff4ed835..5886955e6 100644 --- a/pkg/cmd/agent-task/list/list.go +++ b/pkg/cmd/agent-task/list/list.go @@ -70,7 +70,7 @@ func listRun(opts *ListOptions) error { // based on repo, so we just open the agents dashboard with no args. // If that page is ever added in the future, we should route to that // page instead of the global one when --repo is set. - const webURL = "https://github.com/copilot/agents" + webURL := capi.AgentsHomeURL if opts.IO.IsStdoutTTY() { fmt.Fprintf(opts.IO.ErrOut, "Opening %s in your browser.\n", text.DisplayURL(webURL)) }