fix(agent): close runtime context persistence gaps

This commit is contained in:
chengyongru
2026-07-12 00:35:17 +08:00
committed by Xubin Ren
parent f75d3519db
commit 2eb7398f34
10 changed files with 235 additions and 20 deletions
+4 -2
View File
@@ -216,7 +216,8 @@ class Session:
content = f"{content}\n{breadcrumbs}" if content else breadcrumbs
cli_apps = message.get("cli_apps")
if (
not has_persisted_runtime_context
include_runtime_context
and not has_persisted_runtime_context
and role == "user"
and isinstance(cli_apps, list)
and cli_apps
@@ -239,7 +240,8 @@ class Session:
content = f"{content}\n{breadcrumbs}" if content else breadcrumbs
mcp_presets = message.get("mcp_presets")
if (
not has_persisted_runtime_context
include_runtime_context
and not has_persisted_runtime_context
and role == "user"
and isinstance(mcp_presets, list)
and mcp_presets