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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user