fixup! feat(mcp): select resource

Carlos Alexandro Becker created

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Change summary

internal/tui/components/dialogs/mcp/resourcepicker.go | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)

Detailed changes

internal/tui/components/dialogs/mcp/resourcepicker.go 🔗

@@ -1,6 +1,7 @@
 package mcp
 
 import (
+	"cmp"
 	"context"
 	"fmt"
 	"strings"
@@ -38,18 +39,11 @@ type resourceItem struct {
 }
 
 func (i resourceItem) Title() string {
-	if i.resource.Title != "" {
-		return i.resource.Title
-	}
-	return i.resource.Name
+	return i.resource.URI
 }
 
 func (i resourceItem) Description() string {
-	desc := i.resource.Description
-	if desc == "" {
-		desc = i.resource.URI
-	}
-	return fmt.Sprintf("[%s] %s", i.clientName, desc)
+	return cmp.Or(i.resource.Description, i.resource.Title, i.resource.Name, "(no description)")
 }
 
 func (i resourceItem) FilterValue() string {