refactor(agent)!: focus tools on SCADA
This commit is contained in:
@@ -31,11 +31,6 @@ import { FrontendActionCoordinator } from "../frontendAction/coordinator.js";
|
||||
import { frontendActionRegistryResponse } from "../frontendAction/registry.js";
|
||||
import type { UIEnvelopePayload } from "../uiEnvelope/types.js";
|
||||
import { toActorKey, toProjectKey } from "../utils/fileStore.js";
|
||||
import {
|
||||
createPressureTrendDemoEnvelopePayload,
|
||||
createPressureTrendDemoToolCall,
|
||||
isPressureTrendDemoPrompt,
|
||||
} from "./pressureTrendDemo.js";
|
||||
import {
|
||||
buildForkedSessionUiState,
|
||||
buildPromptWithLearningContext,
|
||||
@@ -1059,39 +1054,6 @@ export const buildChatRouter = (
|
||||
: undefined;
|
||||
|
||||
try {
|
||||
if (isPressureTrendDemoPrompt(promptText)) {
|
||||
const toolCall = createPressureTrendDemoToolCall();
|
||||
publish("progress", {
|
||||
session_id: clientSessionId,
|
||||
id: "pressure-trend-demo",
|
||||
phase: "tool",
|
||||
status: "running",
|
||||
title: "生成压力趋势图",
|
||||
detail: "已命中受控演示用例,正在通过 show_chart 生成可信 UIEnvelope。",
|
||||
started_at: Date.now(),
|
||||
elapsed_ms: 0,
|
||||
});
|
||||
publish("tool_call", {
|
||||
session_id: clientSessionId,
|
||||
tool: toolCall.tool,
|
||||
params: toolCall.params,
|
||||
reason: toolCall.reason,
|
||||
});
|
||||
publish(
|
||||
"ui_envelope",
|
||||
createPressureTrendDemoEnvelopePayload(clientSessionId, toolCall),
|
||||
);
|
||||
publish("token", {
|
||||
session_id: clientSessionId,
|
||||
content: "已生成最近压力趋势图,并通过可信 UIEnvelope 发送到前端。",
|
||||
});
|
||||
publish("done", {
|
||||
session_id: clientSessionId,
|
||||
duration_ms: 0,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const preparedMessage = await buildPromptWithLearningContext(
|
||||
memoryStore,
|
||||
requestContext.actorKey,
|
||||
|
||||
Reference in New Issue
Block a user