From f854a40e772f8c37224185ccba263aef5183caea Mon Sep 17 00:00:00 2001 From: hems Date: Sun, 13 Jul 2025 05:22:42 +0100 Subject: [PATCH] fix: display URL in permission popup path field for fetch operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the path field in permission popups for fetch operations showed the working directory instead of the actual URL being fetched. Now the path field correctly displays the URL from the FetchPermissionsParams when the tool is a fetch operation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../components/dialogs/permissions/permissions.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/tui/components/dialogs/permissions/permissions.go b/internal/tui/components/dialogs/permissions/permissions.go index 6bac6e58b37a99b376ad936bbf19f541b999eb4b..8d8efcd65ecbf3f1c27eeaea48950df72d1b53b7 100644 --- a/internal/tui/components/dialogs/permissions/permissions.go +++ b/internal/tui/components/dialogs/permissions/permissions.go @@ -220,9 +220,19 @@ func (p *permissionDialogCmp) renderHeader() string { Render(fmt.Sprintf(" %s", p.permission.ToolName)) pathKey := t.S().Muted.Render("Path") + var pathDisplayValue string + if p.permission.ToolName == tools.FetchToolName { + if params, ok := p.permission.Params.(tools.FetchPermissionsParams); ok { + pathDisplayValue = params.URL + } else { + pathDisplayValue = p.permission.Path + } + } else { + pathDisplayValue = fsext.PrettyPath(p.permission.Path) + } pathValue := t.S().Text. Width(p.width - lipgloss.Width(pathKey)). - Render(fmt.Sprintf(" %s", fsext.PrettyPath(p.permission.Path))) + Render(fmt.Sprintf(" %s", pathDisplayValue)) headerParts := []string{ lipgloss.JoinHorizontal(