remove optchat
This commit is contained in:
@@ -10,7 +10,6 @@ export async function build() {
|
||||
"src/agents.ts",
|
||||
"src/multi-work.ts",
|
||||
"src/quota-plugin.ts",
|
||||
"src/optchat.ts",
|
||||
"src/quota-rpc.ts",
|
||||
],
|
||||
outdir: "dist",
|
||||
|
||||
+5
-8
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user