Faster startup: parallel catalog (stale-while-revalidate), MCP overlaps catalog, parallel extensions, single prompt scan, 10s MCP connect timeout, HX_TRACE_STARTUP
This commit is contained in:
1 parent
7a238e0e51
commit
6c8d492ca5
6 files changed
+83
-33
No files matched your search
@@ -162,7 +162,16 @@ pub fn skill_index_line(k: &Skill) -> String {
|
||||
}
|
||||
|
||||
pub fn system_prompt(base: Option<&str>, home: &Path, cwd: &Path) -> String {
|
||||
let mut s = base.unwrap_or(DEFAULT_PROMPT).to_string();
|
||||
format!(
|
||||
"{}{}",
|
||||
base.unwrap_or(DEFAULT_PROMPT),
|
||||
prompt_tail(home, cwd)
|
||||
)
|
||||
}
|
||||
|
||||
/// Everything after the base prompt (cwd, skills, context files, memory). Scans the disk: compute once, reuse per role.
|
||||
pub fn prompt_tail(home: &Path, cwd: &Path) -> String {
|
||||
let mut s = String::new();
|
||||
s.push_str(&format!("\n\nWorking directory: {}", cwd.display()));
|
||||
let sk = skills(home, cwd);
|
||||
for k in sk.iter().filter(|k| k.load == Load::Always) {
|
||||
|
||||
Reference in new issue
Block a user