fix: stabilize agent UI and SCADA card

This commit is contained in:
2026-07-20 17:17:55 +08:00
parent df2fb3ca38
commit 319c604e9d
12 changed files with 408 additions and 700 deletions
@@ -0,0 +1,17 @@
import { readFileSync } from "node:fs";
import { join } from "node:path";
import { describe, expect, it } from "vitest";
describe("StreamingTokenResponse", () => {
it("renders the backend-smoothed stream without a second timer buffer", () => {
const source = readFileSync(
join(process.cwd(), "features/agent/components/streaming-token-response.tsx"),
"utf8"
);
expect(source).not.toContain("setInterval");
expect(source).not.toContain("useState");
expect(source).not.toContain("streaming-token-response-state");
expect(source).toContain("{content}");
});
});