xonecas.io
64875
Mc

mini-coder / commit b00091f

refactor: remove cache command completions and add login/logout commands

xonecas2026-03-19 b00091f46e220da8c97dfb106d65628b962ff873 parent e1c84e3

2 files changed

src/cli/completions.test.ts+1−13
@@ -54,18 +54,6 @@ describe("getCommandCompletions", () => {
5454 expect(results).toContain("/context prune balanced");
5555 });
5656
57- test("completes /cache subcommands", () => {
58- const results = getCommandCompletions("/cache o", cwd);
59- expect(results).toContain("/cache on");
60- expect(results).toContain("/cache off");
61- expect(results).toContain("/cache openai");
62- });
63-
64- test("completes /cache openai values", () => {
65- const results = getCommandCompletions("/cache openai i", cwd);
66- expect(results).toContain("/cache openai in_memory");
67- });
68-
6957 test("completes /mcp subcommands", () => {
7058 const results = getCommandCompletions("/mcp ", cwd);
7159 expect(results).toContain("/mcp list");
@@ -92,7 +80,7 @@ describe("getCommandCompletions", () => {
9280 });
9381
9482 test("returns empty for fourth token", () => {
95- const results = getCommandCompletions("/cache openai in_memory extra", cwd);
83+ const results = getCommandCompletions("/context prune balanced extra", cwd);
9684 expect(results).toEqual([]);
9785 });
9886 });
src/cli/completions.ts+2−6
@@ -12,13 +12,14 @@ const BUILTIN_COMMANDS = [
1212 "reasoning",
1313 "verbose",
1414 "context",
15- "cache",
1615 "agent",
1716 "mcp",
1817 "new",
1918 "help",
2019 "exit",
2120 "quit",
21+ "login",
22+ "logout",
2223 ];
2324
2425 // ─── Sub-command / parameter completions ───────────────────────────────────────
@@ -28,7 +29,6 @@ const COMMAND_PARAMS: Record<string, string[] | ((cwd: string) => string[])> = {
2829 reasoning: ["on", "off"],
2930 verbose: ["on", "off"],
3031 context: ["prune", "cap"],
31- cache: ["on", "off", "openai", "gemini"],
3232 mcp: ["list", "add", "remove", "rm"],
3333 agent: (cwd) => {
3434 const agents = loadAgents(cwd);
@@ -42,10 +42,6 @@ const NESTED_PARAMS: Record<string, Record<string, string[]>> = {
4242 prune: ["off", "balanced", "aggressive"],
4343 cap: ["off"],
4444 },
45- cache: {
46- openai: ["in_memory", "24h"],
47- gemini: ["off"],
48- },
4945 };
5046
5147 // ─── Public API ────────────────────────────────────────────────────────────────