Skip to content

The agent that grows with you

fix(desktop): drop helpers only the suggestion pills used

Teknium3f2afed3eb81
diff --git a/apps/desktop/src/api/mcp.ts b/apps/desktop/src/api/mcp.ts
index 94a22dc6279..e9d6dc72ce1 100644
--- a/apps/desktop/src/api/mcp.ts
+++ b/apps/desktop/src/api/mcp.ts
@@ -74,37 +74,6 @@ export function listMcpServers(): Promise<{ servers: McpServerSummary[] }> {
})
}
-/** Add one server to `mcp_servers` (validated + name-collision-checked
- * server-side — the same endpoint the dashboard's add form uses). */
-export function addMcpServer(
- body: {
- name: string
- url?: string
- command?: string
- args?: string[]
- env?: Record<string, string>
- auth?: string
- },
- profile?: ProfileScope
-): Promise<McpServerSummary> {
- return window.hermesDesktop.api<McpServerSummary>({
- ...capabilityScoped(profile),
- path: '/api/mcp/servers',
- method: 'POST',
- body
- })
-}
-
-/** Remove one server from `mcp_servers` (the inline setup card's rollback
- * when a directory install is cancelled after the config write). */
-export function removeMcpServer(name: string, profile?: ProfileScope): Promise<{ ok: boolean }> {
- return window.hermesDesktop.api<{ ok: boolean }>({
- ...capabilityScoped(profile),
- path: `/api/mcp/servers/${encodeURIComponent(name)}`,
- method: 'DELETE'
- })
-}
-
export function setMcpServerEnabled(name: string, enabled: boolean): Promise<{ ok: boolean }> {
return hermesApi<{ ok: boolean }>({
...profileScoped(),
diff --git a/apps/desktop/src/api/system.ts b/apps/desktop/src/api/system.ts
index b3af668e68e..e31990b8800 100644
--- a/apps/desktop/src/api/system.ts
+++ b/apps/desktop/src/api/system.ts
@@ -267,16 +267,6 @@ export function getElevenLabsVoices(profile?: null | string): Promise<ElevenLabs
})
}
-/** `gh` CLI presence + auth state, for the composer's GitHub skill pill
- * (GitHub is deliberately not an MCP — the github/* skills are the
- * integration). Backend caches for 5 minutes; `refresh` bypasses. */
-export function getGhAuthStatus(refresh = false): Promise<{ available: boolean; authenticated: boolean }> {
- return hermesApi<{ available: boolean; authenticated: boolean }>({
- ...profileScoped(),
- path: `/api/git/gh-auth${refresh ? '?refresh=true' : ''}`
- })
-}
-
// ---------------------------------------------------------------------------
// Maintenance operations (parity with `hermes doctor` / `hermes security
// audit` / `hermes backup` / `hermes debug share` and the dashboard System
diff --git a/apps/desktop/src/i18n/ar_boot.ts b/apps/desktop/src/i18n/ar_boot.ts
index beb1785ac86..dd7a55c2be0 100644
--- a/apps/desktop/src/i18n/ar_boot.ts
+++ b/apps/desktop/src/i18n/ar_boot.ts
@@ -80,7 +80,6 @@ export const arBoot = {
'تعذّر على هذا الخادم تأكيد الإرسال السابق لهذه الرسالة، لذا ربما تم تنفيذها بالفعل. راجع المحادثة قبل إرسالها مرة أخرى.',
mcpReloadDeferred:
'هذه المحادثة مشغولة: يُطبَّق تغيير MCP بعد انتهاء دورها وإعادة تحميل MCP مجددًا، أو عند إعادة فتح المحادثة',
- mcpReloadNotInChat: server => `${server} غير مفعّل في هذه المحادثة`,
mcpReloadUnavailable: servers => `تعذّر الاتصال: ${servers}`,
compactedTurnUnavailable: 'تم تلخيص هذه الرسالة عند ضغط المحادثة، لذا لم يعد بالإمكان استعادتها أو تحريرها.',
staleTurnUnavailable: 'لم تعد هذه الرسالة موجودة في سجل هذه المحادثة.',
diff --git a/apps/desktop/src/i18n/de_notices.ts b/apps/desktop/src/i18n/de_notices.ts
index 16996f7a67c..0552e42fccd 100644
--- a/apps/desktop/src/i18n/de_notices.ts
+++ b/apps/desktop/src/i18n/de_notices.ts
@@ -23,7 +23,6 @@ export const deNotices = {
'Dieser Server konnte das frühere Senden dieser Nachricht nicht bestätigen; sie wurde möglicherweise bereits ausgeführt. Prüfe die Unterhaltung, bevor du sie erneut sendest.',
mcpReloadDeferred:
'Dieser Chat ist beschäftigt: Die MCP-Änderung gilt, sobald sein Durchlauf endet und MCP erneut geladen wird, oder wenn du den Chat wieder öffnest',
- mcpReloadNotInChat: server => `${server} ist in diesem Chat nicht aktiviert`,
mcpReloadUnavailable: servers => `Keine Verbindung: ${servers}`,
compactedTurnUnavailable:
'Diese Nachricht wurde beim Komprimieren des Chats zusammengefasst und kann nicht mehr wiederhergestellt oder bearbeitet werden.',
diff --git a/apps/desktop/src/i18n/en_notices.ts b/apps/desktop/src/i18n/en_notices.ts
index bdb3e7922c2..5e00deff5ba 100644
--- a/apps/desktop/src/i18n/en_notices.ts
+++ b/apps/desktop/src/i18n/en_notices.ts
@@ -23,7 +23,6 @@ export const enNotices = {
'This server could not confirm the earlier send of this message, so it may already have run. Check the conversation before sending it again.',
mcpReloadDeferred:
'This chat is busy: the MCP change applies once its turn finishes and MCP reloads again, or when you reopen the chat',
- mcpReloadNotInChat: server => `${server} is not enabled in this chat`,
mcpReloadUnavailable: servers => `Did not connect: ${servers}`,
compactedTurnUnavailable:
"That message was summarized when the chat was compressed, so it can't be restored or edited anymore.",
diff --git a/apps/desktop/src/i18n/es_notices.ts b/apps/desktop/src/i18n/es_notices.ts
index 78feac9785e..6d5b7ccd571 100644
--- a/apps/desktop/src/i18n/es_notices.ts
+++ b/apps/desktop/src/i18n/es_notices.ts
@@ -23,7 +23,6 @@ export const esNotices = {
'Este servidor no pudo confirmar el envío anterior de este mensaje, así que es posible que ya se haya ejecutado. Revisa la conversación antes de volver a enviarlo.',
mcpReloadDeferred:
'Este chat está ocupado: el cambio de MCP se aplica cuando termine su turno y MCP se recargue de nuevo, o al volver a abrir el chat',
- mcpReloadNotInChat: server => `${server} no está activado en este chat`,
mcpReloadUnavailable: servers => `No se conectó: ${servers}`,
compactedTurnUnavailable:
'Ese mensaje se resumió al comprimir el chat, así que ya no se puede restaurar ni editar.',
diff --git a/apps/desktop/src/i18n/fr_notices.ts b/apps/desktop/src/i18n/fr_notices.ts
index c1e0c163efe..82bc5bc4653 100644
--- a/apps/desktop/src/i18n/fr_notices.ts
+++ b/apps/desktop/src/i18n/fr_notices.ts
@@ -23,7 +23,6 @@ export const frNotices = {
"Ce serveur n'a pas pu confirmer l'envoi précédent de ce message ; il a peut-être déjà été exécuté. Vérifiez la conversation avant de le renvoyer.",
mcpReloadDeferred:
'Cette discussion est occupée : la modification MCP s’applique à la fin de son tour et au prochain rechargement MCP, ou à la réouverture de la discussion',
- mcpReloadNotInChat: server => `${server} n’est pas activé dans cette discussion`,
mcpReloadUnavailable: servers => `Connexion impossible : ${servers}`,
compactedTurnUnavailable:
'Ce message a été résumé lors de la compression de la conversation : il ne peut plus être restauré ni modifié.',
diff --git a/apps/desktop/src/i18n/ja_notices.ts b/apps/desktop/src/i18n/ja_notices.ts
index b5b5535a313..f07f677aff0 100644
--- a/apps/desktop/src/i18n/ja_notices.ts
+++ b/apps/desktop/src/i18n/ja_notices.ts
@@ -23,7 +23,6 @@ export const jaNotices = {
'このサーバーはこのメッセージの前回の送信を確認できなかったため、すでに実行された可能性があります。再送信する前に会話を確認してください。',
mcpReloadDeferred:
'このチャットは処理中です。MCP の変更は現在のターンが終わって MCP を再読み込みしたとき、またはチャットを開き直したときに反映されます',
- mcpReloadNotInChat: server => `${server} はこのチャットでは有効になっていません`,
mcpReloadUnavailable: servers => `接続できませんでした: ${servers}`,
compactedTurnUnavailable: 'このメッセージはチャットの圧縮時に要約されたため、復元や編集はできなくなりました。',
staleTurnUnavailable: 'このメッセージはこのチャットの履歴にはもうありません。',
diff --git a/apps/desktop/src/i18n/ru_notices.ts b/apps/desktop/src/i18n/ru_notices.ts
index 73325fe549c..2f16980065a 100644
--- a/apps/desktop/src/i18n/ru_notices.ts
+++ b/apps/desktop/src/i18n/ru_notices.ts
@@ -23,7 +23,6 @@ export const ruNotices = {
'Этот сервер не смог подтвердить предыдущую отправку этого сообщения, поэтому оно, возможно, уже выполнено. Проверьте беседу, прежде чем отправлять его снова.',
mcpReloadDeferred:
'Чат занят: изменение MCP применится, когда завершится текущий ход и MCP будет перезагружен снова, или при повторном открытии чата',
- mcpReloadNotInChat: server => `${server} не включён в этом чате`,
mcpReloadUnavailable: servers => `Не удалось подключиться: ${servers}`,
compactedTurnUnavailable:
'Это сообщение было сжато в краткое изложение при сжатии чата, поэтому его больше нельзя восстановить или изменить.',
diff --git a/apps/desktop/src/i18n/types_notices.ts b/apps/desktop/src/i18n/types_notices.ts
index 1798117f1c5..a3df684d18e 100644
--- a/apps/desktop/src/i18n/types_notices.ts
+++ b/apps/desktop/src/i18n/types_notices.ts
@@ -18,7 +18,6 @@ export interface NoticeTranslations {
/** reload.mcp left the chat's servers as they were: a turn was running or waiting. */
mcpReloadDeferred: string
/** A reloaded MCP server the chat does not run (no_mcp, an explicit pick, a platform allowlist). */
- mcpReloadNotInChat: (server: string) => string
/** Configured MCP servers that did not connect on reload. */
mcpReloadUnavailable: (servers: string) => string
/** An edit/restore/regenerate whose target compaction archived: the owner refused the rewind. */
diff --git a/apps/desktop/src/i18n/zh-hant_boot.ts b/apps/desktop/src/i18n/zh-hant_boot.ts
index 3154c828b65..61fdcc596d6 100644
--- a/apps/desktop/src/i18n/zh-hant_boot.ts
+++ b/apps/desktop/src/i18n/zh-hant_boot.ts
@@ -81,7 +81,6 @@ export const zhHantBoot = {
promptNotices: {
legacySendUnconfirmed: '此伺服器無法確認這則訊息先前的傳送,它可能已經執行過。再次傳送前請先查看對話。',
mcpReloadDeferred: '此對話正忙:MCP 變更會在目前輪次結束並再次重新載入 MCP 後生效,或在重新開啟對話時生效',
- mcpReloadNotInChat: server => `此對話未啟用 ${server}`,
mcpReloadUnavailable: servers => `未能連線:${servers}`,
compactedTurnUnavailable: '這則訊息在壓縮對話時已被摘要,無法再還原或編輯。',
staleTurnUnavailable: '這則訊息已不在此對話的歷史記錄中。',
diff --git a/apps/desktop/src/i18n/zh_notices.ts b/apps/desktop/src/i18n/zh_notices.ts
index ea1daaaf661..c4c99e27ec7 100644
--- a/apps/desktop/src/i18n/zh_notices.ts
+++ b/apps/desktop/src/i18n/zh_notices.ts
@@ -20,7 +20,6 @@ export const zhNotices = {
promptNotices: {
legacySendUnconfirmed: '此服务器无法确认这条消息之前的发送,它可能已经运行过。再次发送前请先查看对话。',
mcpReloadDeferred: '此对话正忙:MCP 更改将在当前轮次结束并再次重新加载 MCP 后生效,或在重新打开对话时生效',
- mcpReloadNotInChat: server => `此对话未启用 ${server}`,
mcpReloadUnavailable: servers => `未能连接:${servers}`,
compactedTurnUnavailable: '这条消息在压缩对话时已被概括,无法再恢复或编辑。',
staleTurnUnavailable: '这条消息已不在此对话的历史记录中。',
diff --git a/apps/desktop/src/lib/mcp-brands.tsx b/apps/desktop/src/lib/mcp-brands.tsx
index 6faff57884f..9973caa8c59 100644
--- a/apps/desktop/src/lib/mcp-brands.tsx
+++ b/apps/desktop/src/lib/mcp-brands.tsx
@@ -102,11 +102,6 @@ export const MCP_BRAND_ICONS: Record<string, McpBrand> = {
zapier: { Icon: SiZapier, color: '#FF4A00' }
}
-/** Inline-glyph color for a brand: monochrome marks inherit the surrounding
- * text color; branded marks use the brand color. */
-export const brandGlyphStyle = (brand: McpBrand): { color: string } | undefined =>
- brand.monochrome ? undefined : { color: brand.color }
-
/** The same brand under every spelling a connector arrives with: catalog slug
* (`unreal-engine`), registry id (`unreal_engine`), display name (`Unreal
* Engine`). Compare on letters and digits alone so none of them miss. */
diff --git a/apps/desktop/src/lib/mcp-reload.test.ts b/apps/desktop/src/lib/mcp-reload.test.ts
index 68f53fa7fc9..5e22503a51e 100644
--- a/apps/desktop/src/lib/mcp-reload.test.ts
+++ b/apps/desktop/src/lib/mcp-reload.test.ts
@@ -1,10 +1,9 @@
import { beforeEach, describe, expect, it, vi } from 'vitest'
-import { announceMcpReload, reloadMcp, reloadMcpFor } from './mcp-reload'
+import { announceMcpReload, reloadMcp } from './mcp-reload'
-const mocks = vi.hoisted(() => ({ gateway: null as unknown, notify: vi.fn() }))
+const mocks = vi.hoisted(() => ({ notify: vi.fn() }))
-vi.mock('@/store/gateway', () => ({ $gateway: { get: () => mocks.gateway } }))
vi.mock('@/store/notifications', () => ({ notify: mocks.notify }))
// The Capabilities save path: reload, then tell the user what did not take effect.
@@ -55,25 +54,3 @@ describe('a saved MCP change reports what the chat got', () => {
expect(request).toHaveBeenCalledWith('reload.mcp', { confirm: true, session_id: undefined })
})
})
-
-describe('a flow that claims a server is live in the chat', () => {
- const claim = (result: unknown) => {
- mocks.gateway = { request: vi.fn().mockResolvedValue(result) }
-
- return reloadMcpFor('fixt', 's1')
- }
-
- beforeEach(() => mocks.notify.mockReset())
-
- it('resolves once the chat runs the server', async () => {
- await expect(claim({ session: 'applied', session_servers: ['fixt'], status: 'reloaded' })).resolves.toBeUndefined()
- })
-
- it('refuses when the chat does not run that server (no_mcp, an explicit pick, an allowlist)', async () => {
- await expect(claim({ session: 'unchanged', session_servers: [], status: 'reloaded' })).rejects.toThrow(/fixt/)
- })
-
- it('keeps the earlier answer from a gateway that does not report the selection', async () => {
- await expect(claim({ session: 'applied', status: 'reloaded' })).resolves.toBeUndefined()
- })
-})
diff --git a/apps/desktop/src/lib/mcp-reload.ts b/apps/desktop/src/lib/mcp-reload.ts
index 881649d8c97..71de064f407 100644
--- a/apps/desktop/src/lib/mcp-reload.ts
+++ b/apps/desktop/src/lib/mcp-reload.ts
@@ -1,7 +1,6 @@
import type { ReloadMcpResult } from '@hermes/shared'
import { translateNow } from '@/i18n'
-import { $gateway } from '@/store/gateway'
import { notify } from '@/store/notifications'
import { ambientRequestFor } from '@/store/session-gone-latch'
import { requestForOwnedSession } from '@/store/session-states'
@@ -20,9 +19,6 @@ export interface McpReloadOutcome {
sessionServers: null | string[]
}
-/** The change has not reached the chat yet; the user already has the deferral notice. */
-export class McpReloadDeferred extends Error {}
-
export async function reloadMcp(
gateway: Parameters<typeof ambientRequestFor>[0],
sessionId: null | string | undefined
@@ -59,29 +55,3 @@ export function announceMcpReload(outcome: McpReloadOutcome, skip: readonly stri
})
}
}
-
-/** For a flow that claims `server` is live in the chat (connect, reconnect): resolves only once it is;
- * rejects with {@link McpReloadDeferred} while a turn defers it, or an error when it did not connect. */
-export async function reloadMcpFor(server: string, sessionId: null | string | undefined): Promise<void> {
- const gateway = $gateway.get()
-
- if (!gateway) {
- throw new Error(translateNow('settings.mcp.reloadFailed'))
- }
-
- const outcome = await reloadMcp(gateway, sessionId)
- announceMcpReload(outcome, [server])
-
- if (outcome.unavailable.includes(server)) {
- throw new Error(translateNow('promptNotices.mcpReloadUnavailable', server))
- }
-
- if (outcome.deferred) {
- throw new McpReloadDeferred(translateNow('promptNotices.mcpReloadDeferred'))
- }
-
- // Connected for the profile is not enabled in this chat (no_mcp, an explicit pick, a platform allowlist).
- if (outcome.sessionServers && !outcome.sessionServers.includes(server)) {
- throw new Error(translateNow('promptNotices.mcpReloadNotInChat', server))
- }
-}
diff --git a/locales/_keys.desktop.json b/locales/_keys.desktop.json
index 3167e14a7cb..ff1c153e486 100644
--- a/locales/_keys.desktop.json
+++ b/locales/_keys.desktop.json
@@ -2548,7 +2548,6 @@
"promptNotices.desktopCommands.unknownPath",
"promptNotices.legacySendUnconfirmed",
"promptNotices.mcpReloadDeferred",
- "promptNotices.mcpReloadNotInChat",
"promptNotices.mcpReloadUnavailable",
"promptNotices.sessionCommands.busy",
"promptNotices.sessionCommands.busyCompressing",