Compare commits

...

1 Commits

Author SHA1 Message Date
mao qinghui 8383076791 fix(hermes): use SOUL.md instead of AGENTS.md for Hermes prompt filename (#5779)
* fix(hermes): use SOUL.md instead of AGENTS.md for Hermes prompt filename

* test(hermes): add regression test for SOUL.md prompt filename

---------

Co-authored-by: mmm-05610 <maoqh@users.noreply.github.com>
Co-authored-by: Jason <farion1231@gmail.com>
2026-08-02 22:02:06 +08:00
2 changed files with 18 additions and 2 deletions
+17 -1
View File
@@ -33,13 +33,29 @@ pub fn prompt_file_path(app: &AppType) -> Result<PathBuf, AppError> {
AppType::Claude => "CLAUDE.md",
AppType::Codex => "AGENTS.md",
AppType::Gemini => "GEMINI.md",
AppType::GrokBuild | AppType::OpenCode | AppType::OpenClaw | AppType::Hermes => "AGENTS.md",
AppType::GrokBuild | AppType::OpenCode | AppType::OpenClaw => "AGENTS.md",
AppType::Hermes => "SOUL.md",
AppType::ClaudeDesktop => unreachable!("handled above"),
};
Ok(base_dir.join(filename))
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn hermes_prompt_file_uses_soul_md() {
let path = prompt_file_path(&AppType::Hermes).expect("Hermes prompt path");
assert_eq!(
path.file_name().and_then(|name| name.to_str()),
Some("SOUL.md")
);
}
}
fn get_base_dir_with_fallback(
primary_path: PathBuf,
fallback_dir: &str,
+1 -1
View File
@@ -32,7 +32,7 @@ const PromptFormPanel: React.FC<PromptFormPanelProps> = ({
grokbuild: "AGENTS.md",
opencode: "AGENTS.md",
openclaw: "AGENTS.md",
hermes: "AGENTS.md",
hermes: "SOUL.md",
};
const filename = filenameMap[appId];
const [name, setName] = useState("");