fix: match Code microphone and send button order

This commit is contained in:
鲨鱼辣椒 committed 2026-10-13 19:20:27 +08:00
1 parent f61efaf046
commit ddb942f944
4 files changed
+13 -2

No files matched your search

+3 -1
View File
@@ -441,7 +441,6 @@ export function CloudChat({ slug, previewRevision: latestRevision, initialThread
headerTarget={attachmentHeader === undefined ? localAttachmentHeader : attachmentHeader} activeView={activeView}
deliveryHistory={history}
filesRevision={`${history?.messages.at(-1)?.id ?? ''}:${history?.run?.agent_run_id ?? ''}:${history?.run?.status ?? ''}`}
actions={<ComposerVoiceButton voiceInput={voiceInput} />}
onBusy={setAttachmentBusy} disabled={!editable || running || voicePending} ensureThread={async () => {
if (thread) return thread.thread_id;
const expectedGeneration = generation.current;
@@ -452,8 +451,11 @@ export function CloudChat({ slug, previewRevision: latestRevision, initialThread
return created.thread_id;
}} footer={<>
<span className="agent-chat-keyboard-hint">Enter 发送 · Shift + Enter 换行</span>
<div className="agent-chat-composer-controls">
<ComposerVoiceButton voiceInput={voiceInput} />
{running ? <Button className="agent-chat-stop agent-chat-submit" size="icon" variant="outline" disabled={busy} onClick={() => void cancel()} type="button" aria-label="停止" title="停止"><Square className="h-3.5 w-3.5 fill-current" /></Button>
: <Button className="agent-chat-send agent-chat-submit" size="icon" type="submit" aria-label={busy ? '正在提交' : intent ? '重试本次发送' : '发送'} title={intent ? '重试本次发送' : '发送'} disabled={!canSend}>{busy ? <LoaderCircle className="h-4 w-4 animate-spin" /> : <ArrowUp className="h-4 w-4" />}</Button>}
</div>
</>}>
<Textarea aria-label="消息" className="agent-chat-input resize-none border-0 shadow-none focus-visible:ring-0" maxLength={32000}
rows={Math.min(6, Math.max(1, query.split('\n').length))}
+1
View File
@@ -146,6 +146,7 @@
.agent-chat-composer .agent-attachment-add:hover:not(:disabled) { background: hsl(var(--surface-subtle)); }
.agent-chat-composer .agent-attachment-add > svg { width: 16px; height: 16px; }
.agent-attachment-toolbar .agent-chat-keyboard-hint { margin-left: auto; }
.agent-chat-composer-controls { display: flex; min-width: 0; flex-shrink: 0; align-items: center; gap: 4px; margin-left: auto; }
.agent-attachment-toolbar > :is(.agent-chat-send, .agent-chat-stop, .agent-chat-submit) { margin-left: auto; }
.agent-attachment-toolbar .agent-chat-keyboard-hint + :is(.agent-chat-send, .agent-chat-stop, .agent-chat-submit) { margin-left: 4px; }
.agent-chat-composer .agent-attachment-selected { gap: 8px; margin-bottom: 8px; padding-inline: 4px; }