diff --git a/cptr/frontend/src/lib/components/chat/ChatInput.svelte b/cptr/frontend/src/lib/components/chat/ChatInput.svelte index 79a8e94..01420ae 100644 --- a/cptr/frontend/src/lib/components/chat/ChatInput.svelte +++ b/cptr/frontend/src/lib/components/chat/ChatInput.svelte @@ -142,6 +142,7 @@ let voiceCaptureChunks: Blob[] = []; let voiceCaptureMimeType = 'audio/webm'; let selectedSlashCommandIndex = $state(0); + let modelSelector: ModelSelector | undefined = $state(); const voiceModeAvailable = $derived( $ttsEnabled && $ttsConfigured && ($voiceModeSttMode === 'browser' || $sttConfigured) ); @@ -979,6 +980,7 @@ if (onplan && '/plan'.startsWith(slashCommandQuery)) ids.push('plan'); if (hasChatContent && onfork && '/fork'.startsWith(slashCommandQuery)) ids.push('fork'); if (hasChatContent && onstatus && '/status'.startsWith(slashCommandQuery)) ids.push('status'); + if ('/model'.startsWith(slashCommandQuery)) ids.push('model'); if ( hasChatContent && onskillslist && @@ -1093,6 +1095,11 @@ onstatus(); return; } + if (commandId === 'model') { + inputText = ''; + void modelSelector?.openSelector(); + return; + } if (commandId === 'skills:list' && onskillslist) { inputText = ''; onskillslist(); @@ -1331,6 +1338,31 @@ {/if} + {#if slashCommandIds.includes('model')} + + {/if} {#if slashCommandIds.includes('skills:list')}