fix: session resume, config_set schema, metrics chart, subagent logging

- Fix session resume: remove messages.length>1 guard so sessionStorage
  ID is used as resumeSessionId on first message (prevents new session
  creation when user sends "继续")
- Fix config_set tool schema: add missing `items: {}` to array type in
  oneOf (Azure OpenAI strict validation rejects it otherwise)
- Metrics chart: use actual target set filename from trigger text
  instead of generic "target_subset" key
- Add sub-agent skill call logging to agent_runtime.py (full
  prompt/response, no truncation)
- Various metric enrichment and dedup fixes in server.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
wangsenhao
2026-05-27 17:02:24 +08:00
parent 89e77140e7
commit 85ce8c0e69
8 changed files with 411 additions and 40 deletions
+9 -2
View File
@@ -268,10 +268,12 @@ class JupyterRuntimeSession:
'远端 jupyter pod 未挂载 /mnt/wangsenhao 或不可写:'
+ (probe.stdout.strip() or probe.stderr.strip() or 'unknown error')
)
ws_output = f'{shlex.quote(self.binding.workspace_cwd)}/output'
chat_output_link = f'{shlex.quote(chat_root)}/output'
result = self.run_command(
(
'mkdir -p '
f'{shlex.quote(self.binding.workspace_cwd)}/output '
f'{ws_output} '
f'{shlex.quote(self.binding.workspace_cwd)}/input '
f'{shlex.quote(self.binding.workspace_cwd)}/scratchpad '
f'{shlex.quote(self.binding.workspace_root)}/.runtime/uploads '
@@ -279,7 +281,12 @@ class JupyterRuntimeSession:
f'{shlex.quote(self.account_runtime_root)}/python '
f'{shlex.quote(chat_root)}/results '
f'{shlex.quote(chat_root)}/sft_output '
f'{shlex.quote(chat_root)}/scripts'
f'{shlex.quote(chat_root)}/scripts && '
f'if [ -d {chat_output_link} ] && [ ! -L {chat_output_link} ]; then '
f'cp -a {chat_output_link}/* {ws_output}/ 2>/dev/null; '
f'rm -rf {chat_output_link}; '
f'fi && '
f'ln -sfnT {ws_output} {chat_output_link}'
),
timeout_seconds=timeout_seconds,
max_output_chars=4000,