Remove AI config approval flow

This commit is contained in:
npc0-hue
2026-09-22 15:33:32 +08:00
parent 20008b4043
commit a8b5d483a3
54 changed files with 364 additions and 875 deletions
+7 -5
View File
@@ -23,7 +23,7 @@ const preview: ServerConfigDiffPreviewResponse = {
reviewedAt: "2026-07-06T00:00:00Z"
};
describe("ServerDetailPage config write approval", () => {
describe("ServerDetailPage config write flow", () => {
it("keeps server overview metrics on the server list instead of the detail header", () => {
expect(serverDetailPageSource).not.toContain("listServerMetrics");
expect(serverDetailPageSource).not.toContain("server-detail-stat-strip");
@@ -52,7 +52,7 @@ describe("ServerDetailPage config write approval", () => {
expect(serverDetailPageSource).toContain('setSection(`plugin:${defaultPluginPage.key}`)');
});
it("maps platform diff preview responses into the display diff without losing approval metadata", () => {
it("maps platform diff preview responses into the display diff without losing config metadata", () => {
const view = configDiffViewFromPreview(preview);
expect(view).toMatchObject({
@@ -70,8 +70,10 @@ describe("ServerDetailPage config write approval", () => {
]);
});
it("uses AI config diff approval without exposing raw config workbench APIs", () => {
expect(serverDetailPageSource).toContain("approveAIConfigDiff");
it("dispatches AI config writes directly and opens the streaming terminal", () => {
expect(serverDetailPageSource).toContain("configExecution");
expect(serverDetailPageSource).toContain("onOpenTerminal");
expect(serverDetailPageSource).not.toContain(["config", "diffs"].join("-"));
expect(serverDetailPageSource).toContain("AI 配置助手");
expect(serverDetailPageSource).not.toContain("previewServerConfigDiff");
expect(serverDetailPageSource).not.toContain("approveServerConfigWrite");
@@ -88,7 +90,7 @@ describe("ServerDetailPage config write approval", () => {
expect(serverDetailPageSource).not.toContain("fallbackConfig");
});
it("does not locally mutate visible config after dispatching approval jobs", () => {
it("does not locally mutate visible config after dispatching config jobs", () => {
expect(serverDetailPageSource).not.toContain("setCurrentConfig(suggestion.diff.nextContent)");
expect(serverDetailPageSource).not.toContain("content: diff.nextContent");
});