Improve WebUI streaming and Python tooling

This commit is contained in:
武阳
2026-05-06 20:37:17 +08:00
parent a0da3c2423
commit 9ca675be0d
13 changed files with 930 additions and 147 deletions
+10
View File
@@ -186,6 +186,11 @@ def serialize_runtime_config(runtime_config: AgentRuntimeConfig) -> JSONDict:
),
'session_directory': str(runtime_config.session_directory),
'scratchpad_root': str(runtime_config.scratchpad_root),
'python_env_dir': (
str(runtime_config.python_env_dir)
if runtime_config.python_env_dir is not None
else None
),
}
@@ -230,6 +235,11 @@ def deserialize_runtime_config(payload: JSONDict) -> AgentRuntimeConfig:
output_schema=_deserialize_output_schema(output_schema_payload),
session_directory=Path(str(payload.get('session_directory', DEFAULT_AGENT_SESSION_DIR))).resolve(),
scratchpad_root=Path(str(payload.get('scratchpad_root', DEFAULT_SESSION_DIR / 'scratchpad'))).resolve(),
python_env_dir=(
Path(str(payload['python_env_dir'])).resolve()
if payload.get('python_env_dir') is not None
else None
),
)