remove optchat

This commit is contained in:
2026-10-10 13:17:48 +02:00
parent d7f67f8d4f
commit c189a355c0
14 changed files with 17 additions and 1949 deletions
+5 -8
View File
@@ -3,7 +3,7 @@ import { join } from "node:path";
import { createInterface } from "node:readline/promises";
import { z } from "zod";
const names = ["agents", "multi-work", "quota", "optchat"] as const;
const names = ["agents", "multi-work", "quota"] as const;
const base = "./plugins/stanp-opencode";
const entrySchema = z
.object({ package: z.string(), options: z.record(z.string(), z.json()).optional() })
@@ -22,7 +22,6 @@ function skeleton(name: (typeof names)[number]): Options {
]),
),
};
if (name === "optchat") return { compactionModel: "", dataDir: "" };
return {};
}
const nested = z.record(z.string(), z.json());
@@ -74,7 +73,7 @@ export async function install(source: string, config: string, selection?: string
const previous = configured.filter((entry) => isOwned(entry.package));
const oldMonolith = previous.some((entry) => monolith(entry.package));
const retained = oldMonolith
? names.filter((name) => name !== "optchat")
? [...names]
: names.filter((name) =>
previous.some(
(entry) =>
@@ -92,7 +91,7 @@ export async function install(source: string, config: string, selection?: string
chosen = (
(
await input.question(
`Plugins (agents,multi-work,quota,optchat) [${defaults.join(",")}]: `,
`Plugins (agents,multi-work,quota) [${defaults.join(",")}]: `,
)
).trim() || defaults.join(",")
).split(",");
@@ -112,7 +111,7 @@ export async function install(source: string, config: string, selection?: string
} else {
if (!retained.length)
throw new Error(
"Noninteractive installation requires --plugins agents,multi-work,quota,optchat (or a valid subset)",
"Noninteractive installation requires --plugins agents,multi-work,quota (or a valid subset)",
);
chosen = [...retained];
}
@@ -120,9 +119,7 @@ export async function install(source: string, config: string, selection?: string
!z.array(z.enum(names)).min(1).safeParse(chosen).success ||
new Set(chosen).size !== chosen.length
)
throw new Error(
"Invalid --plugins selection; use unique names: agents,multi-work,quota,optchat",
);
throw new Error("Invalid --plugins selection; use unique names: agents,multi-work,quota");
if (chosen.includes("multi-work") && !chosen.includes("agents"))
throw new Error("Multi-work requires Agents; select agents,multi-work");
const selected = names.filter((name) => chosen.includes(name));