fix(honcho): read the sessionStart pin defensively in the first-turn formatter
tests and callers can build the provider without initialize(); the formatter now treats a missing pin as unpinned instead of raising.
This commit is contained in:
@@ -405,7 +405,8 @@ class HonchoMemoryProvider(DialecticMixin, MemoryProvider):
|
||||
"""Render the prefetch context, keeping only the ``injection.sessionStart`` components when pinned.
|
||||
The summary passes usable_honcho_summary here, so a contaminated one never reaches _base_context_cache."""
|
||||
ctx = {**ctx, "summary": usable_honcho_summary(ctx.get("summary")) or ""}
|
||||
allowed = self._session_start_components
|
||||
# getattr: tests build the provider without initialize().
|
||||
allowed = getattr(self, "_session_start_components", None)
|
||||
parts, suppressed = [], []
|
||||
for name, key, header in _CONTEXT_SECTIONS:
|
||||
value = ctx.get(key, "")
|
||||
|
||||
Reference in New Issue
Block a user