identity: handle .md suffix in file-backed context group keys
Keys like "identity.md" were producing "identity.md.md" lookups. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
b88b05fe07
commit
9127e61c69
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ fn load_memory_files(cwd: &Path, memory_project: Option<&Path>, context_groups:
|
|||
}
|
||||
ContextSource::File => {
|
||||
for key in &group.keys {
|
||||
let filename = format!("{}.md", key);
|
||||
let filename = if key.ends_with(".md") { key.clone() } else { format!("{}.md", key) };
|
||||
if let Some(content) = read_nonempty(&config_dir.join(&filename)) {
|
||||
memories.push((key.clone(), content));
|
||||
} else if let Some(content) = load_memory_file(&filename, project.as_deref(), &global) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue