backend/frontend/runtime: 训练面板 / session 隔离 / agent runtime 调整

- backend/api/server.py:训练 step-detail / pipeline 卡片排序逻辑
- frontend:thread-list / thread / training-pipeline-panel / step-detail-sheet 配套调整,新增 metrics-chart-panel
- src/agent_*:tool spec / runtime / prompting 配套
- .gitignore 加 .logs/

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
hupenglong1
2026-05-25 11:43:10 +08:00
parent 57f5b60a3e
commit f068311cac
17 changed files with 1571 additions and 270 deletions
+16
View File
@@ -87,3 +87,19 @@ function normalizeSessionId(value: unknown) {
const trimmed = value.trim();
return trimmed || null;
}
// 记录"前端刚生成的 LOCALID"。AssistantWorkspace 的 draft cache effect 用它
// 区分:从 newTask 切到一个**新生成**的 LOCALID(草稿应继承)vs 切到一个
// **侧栏点击**的老 LOCALID(草稿不应继承)。
const freshLocalIds = new Set<string>();
export function markFreshLocalId(sessionId: string) {
freshLocalIds.add(sessionId);
}
export function consumeFreshLocalId(sessionId: string | null): boolean {
if (!sessionId) return false;
if (!freshLocalIds.has(sessionId)) return false;
freshLocalIds.delete(sessionId);
return true;
}