fix: deduplicate workbench requests and remove unused map paths
Generic Container CI/CD / test-build-publish (push) Successful in 2m7s
Frontend CI/CD / build-test-publish-and-deploy (push) Successful in 2m7s

This commit is contained in:
2026-11-09 18:49:32 +08:00
parent 038d3458bc
commit d7eb01652a
13 changed files with 403 additions and 321 deletions
@@ -956,19 +956,15 @@ function MapWorkbenchContent({
}
async function handleStartNewAgentSession() {
mapController.clearScadaAnalysis();
await agent.startNewSession();
}
async function handleLoadAgentHistorySession(sessionId: string) {
const changesSession = sessionId !== agent.sessionId;
const loaded = await agent.loadHistorySession(sessionId);
if (!loaded) throw new Error("会话打开已取消");
if (changesSession) mapController.clearScadaAnalysis();
}
async function handleOpenTaskCollaboration(taskId: string, discussion?: InvestigationDiscussion) {
mapController.clearScadaAnalysis();
const id = await agent.openTaskCollaboration(taskId, discussion);
if (discussion?.reference && id) agent.setContentReference(discussion.reference);
readingWorkspace?.close();
@@ -980,7 +976,6 @@ function MapWorkbenchContent({
target: TaskExecutionHistoryTarget,
knownRunId?: string
) {
mapController.clearScadaAnalysis();
let runId = knownRunId;
if (!runId) {
const runs = await fetchOperationalTaskRuns(taskId, getAccessToken);
@@ -999,12 +994,8 @@ function MapWorkbenchContent({
}
async function handleDeleteAgentHistorySession(sessionId: string) {
const clearsActiveAnalysis = sessionId === agent.sessionId;
const deleted = await agent.deleteHistorySession(sessionId);
if (!deleted) throw new Error("会话删除失败,请重试");
if (deleted && clearsActiveAnalysis) {
mapController.clearScadaAnalysis();
}
}
async function handleAgentMapAction(