diff options
| author | Adam Malczewski <[email protected]> | 2026-06-05 21:20:34 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-05 21:20:34 +0900 |
| commit | 552c22d74e5df915088d9e9ff4a286c96c2a54d6 (patch) | |
| tree | 7d9db1052bab91ef994446d80efc3bfc38026cad /packages/cli/src/catalog.test.ts | |
| parent | 7fb3269c698ae583ea7997ce206c4ae252fd3218 (diff) | |
| download | dispatch-552c22d74e5df915088d9e9ff4a286c96c2a54d6.tar.gz dispatch-552c22d74e5df915088d9e9ff4a286c96c2a54d6.zip | |
feat(cli): one-shot terminal client (models, chat, --text/--file/--cwd/--conversation)
HTTP client of transport-contract; pure-core arg/render/ndjson + injected fetch/fs shell.
Docs: GLOSSARY (credential/key/model name/model catalog), tasks.md milestone, ORCHESTRATOR geography.
Diffstat (limited to 'packages/cli/src/catalog.test.ts')
| -rw-r--r-- | packages/cli/src/catalog.test.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/cli/src/catalog.test.ts b/packages/cli/src/catalog.test.ts new file mode 100644 index 0000000..3b32efc --- /dev/null +++ b/packages/cli/src/catalog.test.ts @@ -0,0 +1,18 @@ +import { describe, expect, it } from "vitest"; +import { formatCatalog } from "./catalog.js"; + +describe("formatCatalog", () => { + it("formats a single model", () => { + expect(formatCatalog({ models: ["openai/gpt-4"] })).toBe("openai/gpt-4"); + }); + + it("formats multiple models one per line", () => { + expect(formatCatalog({ models: ["openai/gpt-4", "anthropic/claude-3", "local/llama"] })).toBe( + "openai/gpt-4\nanthropic/claude-3\nlocal/llama", + ); + }); + + it("returns empty string for empty models", () => { + expect(formatCatalog({ models: [] })).toBe(""); + }); +}); |
