Dynamic system prompt — inject per-call instead of storing in context
System prompt is no longer stored in session.context. Instead,
_build_context() prepends the current profile's system prompt fresh on
every LLM call. This means profile switches take effect immediately on
the next message — no stale prompt lingering in stored context.

Also strips any existing system messages from context for migration
safety (old sessions that have one stored will still work).

_with_memory() removed, replaced by _build_context(context, profile, mem).
run_ephemeral() context no longer includes system message either.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d68d059 commit f68b071d89ecf2348bf0e5b2d9b700f8057e26d1
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 10 Apr
Showing 1 changed file
View
navi/core/agent.py