Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix: register dictionary nav section + keep bare-body trailing newline

Ruben Lütke2524fdb660bc
diff --git a/jarvis/docs/loader.py b/jarvis/docs/loader.py
index 98cd27b37c..eef207758b 100644
--- a/jarvis/docs/loader.py
+++ b/jarvis/docs/loader.py
@@ -81,7 +81,14 @@ def _split_frontmatter(text: str) -> tuple[dict, str]:
"""
if _HAVE_FRONTMATTER:
post = _frontmatter.loads(text) # type: ignore[union-attr]
- return dict(post.metadata), post.content
+ meta = dict(post.metadata)
+ # python-frontmatter strips a trailing newline from ``.content``; when a
+ # doc has NO frontmatter, return the body unchanged so this path agrees
+ # with the manual fallback below and the round-trip contract (a bare-body
+ # doc must not silently lose its trailing newline).
+ if not meta:
+ return {}, text
+ return meta, post.content
if not _HAVE_YAML:
# No YAML library available — cannot parse frontmatter, but we do not
diff --git a/jarvis/plugins/tool/navigate.py b/jarvis/plugins/tool/navigate.py
index ab31d78be2..70ea0adbea 100644
--- a/jarvis/plugins/tool/navigate.py
+++ b/jarvis/plugins/tool/navigate.py
@@ -47,6 +47,7 @@ KNOWN: frozenset[str] = frozenset(
"contacts",
"feedback",
"agent-instructions",
+ "dictionary",
}
)