fix(agent): trim redundant system prompt context
This commit is contained in:
1 parent
841d2b880c
commit
32f5cc76a4
6 files changed
+11
-19
No files matched your search
@@ -270,7 +270,7 @@ def test_template_memory_md_is_skipped(tmp_path) -> None:
|
||||
builder = ContextBuilder(workspace)
|
||||
prompt = builder.build_system_prompt()
|
||||
|
||||
assert "## Long-term Memory" not in prompt
|
||||
assert "# Long-term Memory" not in prompt
|
||||
assert "History log: memory/history.jsonl" in prompt
|
||||
assert "This file is automatically updated by nanobot" not in prompt
|
||||
|
||||
@@ -297,6 +297,6 @@ def test_customized_memory_md_is_injected(tmp_path, monkeypatch) -> None:
|
||||
monkeypatch.setattr(builder.memory, "read_memory", tracked_read_memory)
|
||||
prompt = builder.build_system_prompt()
|
||||
|
||||
assert "# Memory\n\n## Long-term Memory" in prompt
|
||||
assert prompt.count("# Long-term Memory") == 1
|
||||
assert "User prefers dark mode" in prompt
|
||||
assert calls == 1
|
||||
Reference in new issue
Block a user