fix: display URL in permission popup path field for fetch operations

hems and Claude created

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 <noreply@anthropic.com>

Change summary

internal/tui/components/dialogs/permissions/permissions.go | 12 +++++++
1 file changed, 11 insertions(+), 1 deletion(-)

Detailed changes

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(