harn-stdlib 0.10.194

Embedded Harn standard library source catalog
Documentation
/** Generated by scripts/generate_cli_localization.mjs. Do not edit. */
import { MESSAGE_246 } from "std/cli/localization/messages/part_49"
import { MessageTemplate, render_message } from "std/cli/message_template"

const MESSAGES: dict<string, MessageTemplate> = {
  "model_id={0} provider={1} latency_ms={2} first_token_ms={3} input_tokens={4} output_tokens={5} estimated_cost_usd={6}":
    MESSAGE_246,
}

/**
 * Select a registered CLI template without interpreting argument text.
 * @effects: []
 * @errors: ["Unregistered CLI localization message", "CLI localization argument count does not match its registered template"]
 */
pub fn cli_message(locale: string, source: string, values: list<string>) -> string {
  const template = MESSAGES[source]
  guard template != nil else {
    throw "Unregistered CLI localization message"
  }
  return render_message(template, locale, values)
}