feat: sync PROVIDER_NAMES with config schema and update README docs
Extract MODEL_PROVIDERS const from config schema as single source of truth for provider names. PROVIDER_NAMES in TUI commands now imports from schema instead of maintaining a hardcoded list. Adds tests verifying sync. Updates README TUI Commands section with /model hot-swap documentation, supported providers, and runtime model switching examples.
This commit is contained in:
@@ -139,6 +139,8 @@ Commands:
|
||||
`.trim();
|
||||
}
|
||||
|
||||
import { MODEL_PROVIDERS } from '../../config/index.js';
|
||||
|
||||
export type ModelAlias = 'local' | 'default' | 'fast' | 'complex' | 'opus' | 'sonnet' | 'haiku' | 'ollama';
|
||||
|
||||
// List of all slash commands for autocompletion
|
||||
@@ -186,8 +188,8 @@ export const COMMAND_TOOLTIPS: Record<string, string> = {
|
||||
// Model aliases for /model command autocompletion
|
||||
export const MODEL_ALIASES = ['local', 'default', 'fast', 'complex', 'opus', 'sonnet', 'haiku', 'ollama'];
|
||||
|
||||
// Provider names for /model <tier> <provider/model> syntax
|
||||
export const PROVIDER_NAMES = ['anthropic', 'openai', 'github-copilot', 'gemini', 'bedrock', 'ollama', 'llamacpp'];
|
||||
// Provider names for /model <tier> <provider/model> syntax — derived from config schema
|
||||
export const PROVIDER_NAMES: readonly string[] = MODEL_PROVIDERS;
|
||||
|
||||
// Model alias descriptions
|
||||
export const MODEL_TOOLTIPS: Record<string, string> = {
|
||||
|
||||
Reference in New Issue
Block a user