hermes - 💡(How to fix) Fix [Desktop App] Profile 列表頁缺少「切換/啟用」功能,按下無反應

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

  • 所有 Desktop App 使用者都會遇到
  • 多 profile 用戶(例如家人、團隊各自 persona)切換工作流完全卡死
  • 唯一 workaround:關閉 Desktop → hermes -p <name> gateway run → 重新開 Desktop

Code Example

function ProfileRow({ active, onSelect, profile }: { ... }) {
  return (
    <li ... onClick={onSelect}>  // 只更新 selectedName

---

$ hermes profile list
Profile          Model                        Gateway      Alias
───────────────  ───────────────────────────  ───────────  ───────────
default          glm-5.1:cloud                stopped      —
etf_daughter     glm-5.1:cloud                stopped      —
◆etf_master      MiniMax-M3                   running      etf_master
etf_son          glm-5.1:cloud                stopped      —
etf_wife         glm-5.1:cloud                stopped      —
wiki             —                            stopped      —
RAW_BUFFERClick to expand / collapse

[Desktop App] Profile 列表頁缺少「切換/啟用」功能,按下無反應

環境

  • Hermes Desktop App version: 0.15.1
  • 安裝位置: ~/.hermes/hermes-agent/apps/desktop/
  • OS: macOS 26.5.1 (arm64)
  • Hermes CLI 一切正常: hermes profile list 列出 6 個 profile

重現步驟

  1. 開啟 Hermes Desktop App
  2. 點右上角「人形頭像」icon → 跳出 dropdown 選單(含 "Manage profiles")
  3. 點 "Manage profiles" → 跳到 /profiles 頁面
  4. 列表顯示所有 profile(etf_daughter / etf_master / etf_son / etf_wife / wiki / default)
  5. 點其中一個 profile(例如想從 etf_master 切到 etf_wife)

預期行為

點下去後該 profile 變成「active」,Desktop App 重啟或重新連線時使用新 profile 的 ~/.hermes/profiles/<name>/ 設定、skills、memories、SOUL.md。

實際行為

完全無反應。 Profile row 的 click handler 只更新 UI 內部的 selectedName state(純前端高亮),沒有任何 IPC 呼叫去告訴 main process 切換。

根因分析(已驗證)

1. Renderer 端缺少「切換」API 介面

檔案:src/hermes.ts

目前暴露的 profile 相關函式(行號 445-488):

  • getProfiles()
  • createProfile()
  • renameProfile()
  • deleteProfile()
  • getProfileSoul()
  • getProfileSetupCommand()

缺少switchProfile(name) / setActiveProfile(name) / activateProfile(name)

2. ProfileRow 元件沒有切換邏輯

檔案:src/app/profiles/index.tsx

function ProfileRow({ active, onSelect, profile }: { ... }) {
  return (
    <li ... onClick={onSelect}>  // 只更新 selectedName

onSelect 只觸發 setSelectedName(profile.name)(前端高亮),沒有呼叫任何 IPC。

3. Main process 端缺少 IPC handler

檔案:electron/main.cjselectron/preload.cjs

兩個檔案 grep -E "profile|Profile"完全 0 命中。preload 沒暴露任何 profile IPC 介面,main 沒註冊任何 ipcMain.handle('profile:*', ...) 處理器。

對比:CLI 完全支援

$ hermes profile list
Profile          Model                        Gateway      Alias
───────────────  ───────────────────────────  ───────────  ───────────
default          glm-5.1:cloud                stopped      —
etf_daughter     glm-5.1:cloud                stopped      —
◆etf_master      MiniMax-M3                   running      etf_master
etf_son          glm-5.1:cloud                stopped      —
etf_wife         glm-5.1:cloud                stopped      —
wiki             —                            stopped      —

CLI 透過 hermes --profile <name> 切換完全沒問題。Desktop 應該呼叫同一個底層機制。

建議修法

需要補三層:

  1. Backend CLI/RPC:在 Python 端新增 profile switch 指令(如果還沒有的話 — CLI 已有 -p 旗標,可重複使用)
  2. Main process IPC (electron/main.cjs):註冊 ipcMain.handle('profile:switch', ...),spawn hermes profile use <name> 或寫入某個 sticky 設定
  3. Preload 介面 (electron/preload.cjs):透過 contextBridge.exposeInMainWorld 暴露 switchProfile(name)
  4. Renderer API (src/hermes.ts):新增 export function switchProfile(name: string)
  5. ProfileRow (src/app/profiles/index.tsx):在每列右側加一個「Activate」按鈕,點擊呼叫 switchProfile(name) 並 refresh gateway 連線

影響範圍

  • 所有 Desktop App 使用者都會遇到
  • 多 profile 用戶(例如家人、團隊各自 persona)切換工作流完全卡死
  • 唯一 workaround:關閉 Desktop → hermes -p <name> gateway run → 重新開 Desktop

補充資訊

  • 標題列的 dropdown menu (line 196-234 in titlebar-controls.tsx) 行為正常,能跳到 /profiles
  • ProfilesView 列表的 create / rename / delete / SOUL.md 編輯功能都正常
  • 唯獨「切換 active profile」這條主路徑沒接上

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING