refactor: remove legacy data compatibility

This commit is contained in:
2026-06-07 16:56:23 +08:00
parent 5e0c16f8b2
commit 1ed7e56f35
6 changed files with 46 additions and 412 deletions
+7 -2
View File
@@ -12,12 +12,17 @@ import { logger } from "./logger.js";
import { LearningOrchestrator } from "./learning/orchestrator.js";
import { MemoryStore } from "./memory/store.js";
import { ResultReferenceResolver } from "./results/resolver.js";
import { ResultReferenceStore } from "./results/store.js";
import {
RESULT_REFERENCE_SOURCE,
ResultReferenceStore,
} from "./results/store.js";
import { buildChatRouter } from "./routes/chat.js";
import { opencodeRuntime } from "./runtime/opencode.js";
import { SessionRuntimeContextStore } from "./sessions/runtimeContextStore.js";
const app = express();
// 这里集中组装 Agent 服务的运行期依赖,路由层只通过接口调用,便于测试时替换实现。
const sessionBridge = new ChatSessionBridge(opencodeRuntime);
const sessionMetadataStore = new SessionMetadataStore();
const sessionUiStateStore = new SessionUiStateStore();
@@ -190,7 +195,7 @@ app.post("/internal/tools/store-render-ref", async (req, res) => {
projectId: context.projectId,
projectKey: context.projectKey,
sessionId: context.clientSessionId,
source: "migration",
source: RESULT_REFERENCE_SOURCE.agentGenerated,
traceId: context.traceId,
});
res.json({