MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / parseFormat

Function parseFormat

apps/cli/src/commands/cli/list.ts:36–43  ·  view source on GitHub ↗
(rawFormat: string | undefined)

Source from the content-addressed store, hash-verified

34type ListHostOptions = { ephemeral: boolean }
35
36export function parseFormat(rawFormat: string | undefined): ListFormat {
37 const format = (rawFormat ?? "json").toLowerCase()
38 if (format === "json" || format === "text") {
39 return format
40 }
41
42 throw new Error(`Invalid format: ${rawFormat}. Must be "json" or "text".`)
43}
44
45function resolveWorkspacePath(workspace: string | undefined): string {
46 const resolved = workspace ? path.resolve(workspace) : process.cwd()

Callers 4

listCommandsFunction · 0.85
listModesFunction · 0.85
listModelsFunction · 0.85
listSessionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected