mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 18:41:35 +08:00
feat(hermes): replace Prompts entry with Memory panel
Hermes has no slash-prompt concept (templates live as Skills), so the
Prompts tab for the Hermes app was always empty. Swap the toolbar Book
button for a Brain button that opens a new Memory panel editing
~/.hermes/memories/{MEMORY,USER}.md — Hermes' first-class memory store
which its Web UI exposes only as on/off toggles, never as an editor.
The panel shows each file in its own tab with a character-budget bar
read from config.yaml's nested memory.* section (memory_char_limit /
user_char_limit, default 2200 / 1375). Edits are written atomically;
Hermes picks them up on the next session start per MemoryStore.
Also extract useDarkMode to src/hooks/useDarkMode.ts — the codebase
already repeats the same MutationObserver pattern in 12+ places; this
PR introduces the shared hook and uses it once, leaving the migration
of the other copies to a follow-up.
This commit is contained in:
@@ -1675,6 +1675,19 @@
|
||||
"parseFailed": "config.yaml could not be parsed as valid YAML. Fix the file before editing it here.",
|
||||
"configNotFound": "Hermes config.yaml not found. Create it at ~/.hermes/config.yaml or configure the path in settings.",
|
||||
"envParseFailed": "The .env file could not be parsed."
|
||||
},
|
||||
"memory": {
|
||||
"title": "Memory",
|
||||
"agentTab": "Agent Memory (MEMORY.md)",
|
||||
"userTab": "User Profile (USER.md)",
|
||||
"usage": "{{current}} / {{limit}} characters",
|
||||
"overLimit": "Over budget — Hermes will truncate on next load",
|
||||
"disabled": "Memory is disabled in config.yaml. Enable it in Hermes config for edits to take effect.",
|
||||
"saveSuccess": "Memory saved",
|
||||
"saveFailed": "Failed to save memory",
|
||||
"loadFailed": "Failed to read memory file",
|
||||
"openConfig": "Adjust limits in Hermes Web UI",
|
||||
"runtimeNote": "Changes apply on Hermes restart or new session."
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
|
||||
@@ -1675,6 +1675,19 @@
|
||||
"parseFailed": "config.yaml を有効な YAML として解析できません。ここで編集する前にファイルを修正してください。",
|
||||
"configNotFound": "Hermes config.yaml が見つかりません。~/.hermes/config.yaml に作成するか、設定でパスを構成してください。",
|
||||
"envParseFailed": ".env ファイルを解析できません。"
|
||||
},
|
||||
"memory": {
|
||||
"title": "メモリ",
|
||||
"agentTab": "エージェント記憶 (MEMORY.md)",
|
||||
"userTab": "ユーザープロファイル (USER.md)",
|
||||
"usage": "{{current}} / {{limit}} 文字",
|
||||
"overLimit": "上限を超えました。Hermes は次回読み込み時に切り詰めます",
|
||||
"disabled": "Memory が config.yaml で無効化されています。Hermes 設定で有効化すると編集内容が反映されます。",
|
||||
"saveSuccess": "記憶を保存しました",
|
||||
"saveFailed": "記憶の保存に失敗しました",
|
||||
"loadFailed": "記憶ファイルの読み込みに失敗しました",
|
||||
"openConfig": "Hermes Web UI で上限を調整",
|
||||
"runtimeNote": "変更は Hermes の再起動または新規セッション時に反映されます。"
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
|
||||
@@ -1675,6 +1675,19 @@
|
||||
"parseFailed": "config.yaml 无法解析为有效 YAML。请先修复文件再在此编辑。",
|
||||
"configNotFound": "未找到 Hermes config.yaml。请在 ~/.hermes/config.yaml 创建或在设置中配置路径。",
|
||||
"envParseFailed": ".env 文件无法解析。"
|
||||
},
|
||||
"memory": {
|
||||
"title": "记忆管理",
|
||||
"agentTab": "Agent 记忆 (MEMORY.md)",
|
||||
"userTab": "用户画像 (USER.md)",
|
||||
"usage": "已用 {{current}} / {{limit}} 字符",
|
||||
"overLimit": "已超过上限,Hermes 下次加载时会截断",
|
||||
"disabled": "Memory 在 config.yaml 中已禁用,编辑后需在 Hermes 配置启用才会生效。",
|
||||
"saveSuccess": "记忆已保存",
|
||||
"saveFailed": "保存记忆失败",
|
||||
"loadFailed": "读取记忆文件失败",
|
||||
"openConfig": "在 Hermes Web UI 调整上限",
|
||||
"runtimeNote": "更改将在 Hermes 下次启动或新建会话时生效。"
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
|
||||
Reference in New Issue
Block a user