feat: add SCADA frontend action bridge
This commit is contained in:
@@ -8,6 +8,20 @@ import {
|
||||
} from "../../src/routes/chatUiState.js";
|
||||
|
||||
describe("appendBackendToolArtifact", () => {
|
||||
it("marks SCADA frontend actions as map artifacts", () => {
|
||||
const artifacts = appendBackendToolArtifact([], {
|
||||
tool: "render_scada_analysis",
|
||||
reason: "显示已完成的分级结论",
|
||||
params: { items: [{ sensor_id: "MP01", level: "high" }] },
|
||||
}) as Array<Record<string, unknown>>;
|
||||
|
||||
expect(artifacts[0]).toMatchObject({
|
||||
tool: "render_scada_analysis",
|
||||
kind: "map",
|
||||
description: "显示已完成的分级结论",
|
||||
});
|
||||
});
|
||||
|
||||
it("persists removed visual tool calls as generic tool artifacts", () => {
|
||||
const artifacts = appendBackendToolArtifact([], {
|
||||
session_id: "session-1",
|
||||
|
||||
Reference in New Issue
Block a user