tui: /reload re-reads AGENTS.md, skills, config, MCP prompt index

This commit is contained in:
hermes committed 2026-11-03 21:21:28 +00:00
1 parent 130704b8b3
commit dac2320503
4 files changed
+67

No files matched your search

+20
View File
@@ -1117,6 +1117,26 @@ async fn main() -> Result<()> {
}) as _)
})
},
reload: {
let (mcp, cwd, models, kinds) =
(mcp.clone(), cwd.clone(), models.clone(), kinds.clone());
Box::new(move || {
let cfg = Config::load(&cwd).map_err(|e| e.to_string())?;
let mut sys = format!(
"{}{}",
cfg.system_prompt
.as_deref()
.unwrap_or(context::DEFAULT_PROMPT),
context::prompt_tail(&context::hx_home(), &cwd)
);
let idx = mcp.system_prompt();
if !idx.is_empty() {
sys.push_str("\n\n");
sys.push_str(&idx);
}
Ok((sys, command_specs(&mcp, &cwd, &models, &kinds)))
})
},
lsp_status: {
let (m, l) = (mgr.clone(), lens_ref.clone());
Box::new(move || {