Remove AI config approval flow
This commit is contained in:
@@ -565,8 +565,9 @@ describe("PlatformApiClient AI providers", () => {
|
||||
providerId: "ai.openai",
|
||||
model: "gpt-4.1",
|
||||
status: "ok",
|
||||
recommendation: "Review before applying.",
|
||||
configRecommendation: { key: "server.properties", suggestedConfig: "server.name=Example Survival #1\npvp=false\n", diffSummary: "review required" },
|
||||
recommendation: "Configuration changes are dispatched automatically.",
|
||||
configRecommendation: { key: "server.properties", suggestedConfig: "server.name=Example Survival #1\npvp=false\n", diffSummary: "AI config write queued" },
|
||||
configExecution: { status: "queued", job: { ...job, id: "job-ai-config-1", capability: "config.write", targetKey: "server.properties" } },
|
||||
usage: { providerId: "ai.openai", model: "gpt-4.1", inputTokens: 20, outputTokens: 12, mocked: true }
|
||||
});
|
||||
}
|
||||
@@ -645,7 +646,7 @@ describe("PlatformApiClient AI providers", () => {
|
||||
});
|
||||
await expect(
|
||||
client.invokeAI({ requestId: "ai-1", serverInstanceId: server.id, purpose: "config.suggest", prompt: "Tune PVP safely", currentConfig: "server.name=Example Survival #1\n" })
|
||||
).resolves.toMatchObject({ status: "ok", usage: { mocked: true }, configRecommendation: { diffSummary: "review required" } });
|
||||
).resolves.toMatchObject({ status: "ok", usage: { mocked: true }, configRecommendation: { diffSummary: "AI config write queued" }, configExecution: { status: "queued", job: { id: "job-ai-config-1", capability: "config.write" } } });
|
||||
|
||||
expect(fetchMock).toHaveBeenCalledTimes(51);
|
||||
});
|
||||
@@ -799,6 +800,7 @@ describe("PlatformApiClient AI providers", () => {
|
||||
const client = new PlatformApiClient("/api/v1");
|
||||
|
||||
expect(client.serverLogEventsUrl("server/scum 1")).toBe("/api/v1/server-instances/server%2Fscum%201/logs/events");
|
||||
expect(client.serverLogEventsUrl("server-1", { jobId: "job/config write" })).toBe("/api/v1/server-instances/server-1/logs/events?jobId=job%2Fconfig%20write");
|
||||
expect(client.serverLogEventsUrl("server-1")).toBe("/api/v1/server-instances/server-1/logs/events");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user