test(#4999): cover every memory path branch
This commit is contained in:
parent
c4f87f24fb
commit
19b3ad0893
2 changed files with 10 additions and 1 deletions
|
|
@ -4629,6 +4629,7 @@ function _memorySectionPath(key) {
|
|||
if (key === 'user') return _memoryData.user_path || '';
|
||||
if (key === 'soul') return _memoryData.soul_path || '';
|
||||
if (key === 'project_context') return _memoryData.project_context_path || '';
|
||||
// Intentional default: the primary "memory" section remains the fallback.
|
||||
return _memoryData.memory_path || '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -202,9 +202,13 @@ function esc(value) {
|
|||
eval(helperBlock + "\n" + renderBlock);
|
||||
_renderMemoryDetail('memory');
|
||||
const memoryHtml = nodes.memoryDetailBody.innerHTML;
|
||||
_renderMemoryDetail('user');
|
||||
const userHtml = nodes.memoryDetailBody.innerHTML;
|
||||
_renderMemoryDetail('soul');
|
||||
const soulHtml = nodes.memoryDetailBody.innerHTML;
|
||||
_renderMemoryDetail('project_context');
|
||||
const projectHtml = nodes.memoryDetailBody.innerHTML;
|
||||
console.log(JSON.stringify({memoryHtml, projectHtml, memoryMode: _memoryMode}));
|
||||
console.log(JSON.stringify({memoryHtml, userHtml, soulHtml, projectHtml, memoryMode: _memoryMode}));
|
||||
"""
|
||||
)
|
||||
completed = subprocess.run(
|
||||
|
|
@ -232,6 +236,10 @@ def test_memory_detail_renders_path_for_non_project_sections():
|
|||
|
||||
assert "MEMORY.md" in rendered["memoryHtml"]
|
||||
assert "C:/Users/Rod/.hermes/memories/MEMORY.md" in rendered["memoryHtml"]
|
||||
assert "USER.md" in rendered["userHtml"]
|
||||
assert "C:/Users/Rod/.hermes/memories/USER.md" in rendered["userHtml"]
|
||||
assert "SOUL.md" in rendered["soulHtml"]
|
||||
assert "C:/Users/Rod/.hermes/SOUL.md" in rendered["soulHtml"]
|
||||
assert "AGENTS.md · D:/Repos/hermes-webui/AGENTS.md" in rendered["projectHtml"]
|
||||
assert "CLAUDE.md present, shadowed by AGENTS.md" in rendered["projectHtml"]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue