ui: show submit button when the chat input has content (#31324)

ChatFormActions gated the mic and stop buttons on a `canSubmit` prop that
ChatForm never passed, so it was always false and typing text did not swap
them for the submit button. Use `canSend` instead and also hide the
skip-reasoning button while there is content to send.

Assisted-by: Claude (Opus 5.5 Medium)
This commit is contained in:
Aleksander Grygier authored and GitHub committed 2026-10-29 10:15:54 +02:00
1 parent 3ed915e309
commit f5d4d75419
1 file changed
+3 -5
@@ -20,7 +20,6 @@
interface Props {
canSend?: boolean;
canSubmit?: boolean;
class?: string;
disabled?: boolean;
isLoading?: boolean;
@@ -37,7 +36,6 @@
let {
canSend = false,
canSubmit = false,
class: className = '',
disabled = false,
isLoading = false,
@@ -73,7 +71,7 @@
uploadedFiles.some((file) => getFileTypeCategory(file.type) === FileTypeCategory.AUDIO)
);
let shouldShowRecordButton = $derived(
hasAudioModality && !canSubmit && !hasAudioAttachments && currentConfig.autoMicOnEmpty
hasAudioModality && !canSend && !hasAudioAttachments && currentConfig.autoMicOnEmpty
);
let selectorModelRef: ModelsSelector | undefined = $state(undefined);
@@ -176,7 +174,7 @@
{/if}
</div>
{#if isReasoning}
{#if isReasoning && !canSend}
<Button
class="group h-8 w-8 rounded-full p-0 max-md:h-9 max-md:w-9"
onclick={() =>
@@ -193,7 +191,7 @@
</Button>
{/if}
{#if isLoading && !canSubmit}
{#if isLoading && !canSend}
<Button
class="group h-8 w-8 rounded-full p-0 max-md:h-9 max-md:w-9 hover:bg-destructive/10!"
onclick={onStop}