feat(web): add Agent Studio workspace UI

This commit is contained in:
Wenxin Duan
2026-09-07 17:17:04 +08:00
parent 63ea92b770
commit 145033974e
18 changed files with 647 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
import { render, screen } from "@testing-library/react";
import "@testing-library/jest-dom/vitest";
import { describe, expect, it } from "vitest";
import { StateView } from "../src/components/common/StateView.js";
describe("StateView", () => {
it.each([
["loading", "正在建立训练会话"],
["reconnecting", "事件流正在重连"],
["busy", "Agent 正在运行"],
["approval", "等待工具审批"],
["error", "会话启动失败"],
] as const)("renders the %s state", (kind, label) => {
render(<StateView kind={kind} title={label} />);
expect(screen.getByText(label)).toBeVisible();
});
});