Keep a connected tool card's title to the service name

The server adds the account to a tool's name so pickers can tell accounts
apart; the card names the account on its own line already.
This commit is contained in:
arc53-machine committed 2026-09-29 10:49:48 +01:00
1 parent db63eae93f
commit 52217d43be
2 files changed
+13 -4

No files matched your search

+2 -2
View File
@@ -12,8 +12,8 @@ const TOOLS = [
{
id: 'tg',
name: 'telegram',
displayName: 'Telegram',
customName: '',
displayName: 'Telegram · Alerts bot',
customName: 'Telegram · Alerts bot',
description: 'Send messages',
status: true,
config: {},
+11 -2
View File
@@ -440,6 +440,15 @@ export default function Tools() {
: undefined;
// A catalog service reads as the catalog describes it;
// a custom server keeps the description it came with.
// The account is on the card's own line, so the title
// drops the " · account" the server adds to tell
// accounts apart in pickers.
const fullName = tool.customName || tool.displayName;
const title =
connection &&
fullName.startsWith(`${connection.name} · `)
? connection.name
: fullName;
const description =
connector && connector.publisher !== 'custom'
? connectorDescription(t, connector)
@@ -515,10 +524,10 @@ export default function Tools() {
<div className="mt-[9px] px-1">
<CardTitle
as="h2"
title={tool.customName || tool.displayName}
title={title}
className="truncate capitalize"
>
{tool.customName || tool.displayName}
{title}
</CardTitle>
<CardDescription
size="xs"