Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960/** CLI argument parser definitions for the image-diff command. Defines the result type and combines subcommand parsers into a single top-level parser. @module */
// TODO: deprecate Optiqueimport { or, } from '@optique/core/constructs';// TODO: deprecate Optiqueimport type { Parser, } from '@optique/core/parser';
import { compareCmd, embedCmd,} from './cli-parsers-cmds.ts';import type { EmbeddingModel, Provider,} from './types.ts';
//region Result types: discriminated union for subcommand dispatch
/** Discriminated union of all subcommand parse results. */export type ImageDiffArgs = | { cmd: 'compare'; imageA: string; imageB: string; provider?: Provider; model?: EmbeddingModel; } | { cmd: 'embed'; image: string; provider?: Provider; model?: EmbeddingModel; };
//endregion Result types
/* oxlint-disable typescript-eslint/no-explicit-any -- Parser is invariant in TState; opaque nested state types can't use unknown *//** TODO: deprecate Optique Combined top-level parser across all subcommands. @example ```ts const result = runSync(parser, { programName: 'image-diff' }); ``` */export const parser: Parser<'sync', ImageDiffArgs, any> = or( compareCmd, embedCmd,);/* oxlint-enable typescript-eslint/no-explicit-any */