Merge teacher composer height alignment
This commit is contained in:
commit
00cd3c114d
7 files changed
+158
-13
No files matched your search
@@ -17,6 +17,7 @@ import { MessageTimestamp } from './MessageTimestamp';
|
||||
import { ComposerVoiceButton } from './ComposerVoiceButton';
|
||||
import { useWorksVoiceInput } from '@/hooks/use-works-voice-input';
|
||||
import { useTeacherModelChoice } from '@/hooks/use-teacher-model-choice';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
|
||||
// Preserve loaded pages and the reading anchor while moving between contacts.
|
||||
// Durable messages remain Main-owned; this is only the current window's view.
|
||||
@@ -629,13 +630,13 @@ function ProjectTeacherChatPanel({
|
||||
>{shortcut.label}</button>)}
|
||||
</div>}
|
||||
<div className="consultation-composer rounded-2xl border bg-white p-3 focus-within:ring-2 focus-within:ring-black/5">
|
||||
<textarea ref={inputRef} aria-label={`向${label}提问`} value={text} disabled={busy} maxLength={6000} onChange={(e) => changeText(e.target.value)} placeholder="和老师聊聊" rows={2}
|
||||
<Textarea ref={inputRef} aria-label={`向${label}提问`} value={text} disabled={busy} maxLength={6000} onChange={(e) => changeText(e.target.value)} placeholder="和老师聊聊" rows={Math.min(6, text.split('\n').length)}
|
||||
onKeyDown={(e) => { if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) { e.preventDefault(); void send(); } }}
|
||||
className="min-h-[60px] w-full resize-none border-0 bg-transparent text-[13px] leading-6 outline-none placeholder:text-muted-foreground/65" />
|
||||
<div className="mt-2 flex min-h-[68px] flex-wrap items-center justify-between gap-x-2 gap-y-2" data-testid="consultation-composer-actions">
|
||||
className="max-h-48 !min-h-[42px] resize-none border-0 bg-transparent px-0 py-1 text-[13px] leading-6 shadow-none placeholder:text-muted-foreground/65 focus-visible:ring-0 focus-visible:ring-offset-0 md:text-[13px] md:leading-5" />
|
||||
<div className="flex min-h-8 items-center gap-1" data-testid="consultation-composer-actions">
|
||||
<div className="ml-auto flex min-w-0 max-w-full items-center gap-1" data-testid="teacher-composer-runtime-controls">
|
||||
<ComposerVoiceButton voiceInput={voiceInput} />
|
||||
{running ? <button type="button" className="rounded-lg border px-3 py-2 text-xs" onClick={() => void teacherApi.cancel(topicBase, endpointId, running.id).then(consume).catch(() => setError('暂时无法停止,请稍后重试。'))}>停止回复</button>
|
||||
{running ? <button type="button" className="h-8 rounded-lg border px-3 text-xs" onClick={() => void teacherApi.cancel(topicBase, endpointId, running.id).then(consume).catch(() => setError('暂时无法停止,请稍后重试。'))}>停止回复</button>
|
||||
: <button type="submit" aria-label="提问" title={busy ? '正在发送…' : '发送'} disabled={busy || !topicEnabled || !text.trim() || voiceInput.state !== 'idle'} className="consultation-send flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-white disabled:opacity-30"><ArrowUp className="h-4 w-4" /></button>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
.classroom-tabs button[aria-selected="true"] { background: #eaf1fb; border-color: #ccdaeb; color: #36557b; box-shadow: 0 2px 0 #dce6f3; }
|
||||
.classroom-chat-view:not([hidden]), .classroom-work-view:not([hidden]) { display: flex; }
|
||||
.classroom-chat-view[hidden], .classroom-work-view[hidden] { display: none; }
|
||||
.classroom-workspace [data-testid="coding-message-composer"] { max-width: 740px; padding-bottom: 22px; }
|
||||
.classroom-workspace [data-testid="coding-message-composer"] { max-width: 740px; }
|
||||
.classroom-workspace [data-testid="coding-message-composer"], .classroom-workspace .consultation-pane > form { padding-bottom: 22px; }
|
||||
.classroom-workspace .chat-composer-surface { border-color: #d3dfeb; border-bottom-width: 3px; border-radius: 14px; box-shadow: 0 3px 12px #3a557806; }
|
||||
.classroom-workspace [data-testid="coding-conversation-timeline"] { padding-top: 30px; }
|
||||
.classroom-work-view [data-testid="agent-browser-panel"] { border: 1px solid #dce5ef; border-radius: 12px; }
|
||||
@@ -79,7 +80,7 @@
|
||||
.consultation-follow-up:disabled { cursor: not-allowed; opacity: 0.5; }
|
||||
.consultation-pane .consultation-follow-up:focus-visible { outline-color: #6683a5; }
|
||||
.consultation-user { background: #eaf0e1; }
|
||||
.consultation-composer { border-color: #dce3d3; }
|
||||
.consultation-composer { border-color: #dce3d3; border-bottom-width: 3px; }
|
||||
.consultation-send { background: #536947; }
|
||||
@media (max-width: 1100px) { .classroom-tabs { padding-left: 18px; padding-right: 18px; } }
|
||||
@media (max-width: 900px) { .classroom-consultation-dock { position: absolute; inset: 0 0 0 auto; z-index: 45; max-width: 100%; box-shadow: -12px 0 36px #24311b0d; } .classroom-consultation-resizer { display: none; } }
|
||||
|
||||
Reference in new issue
Block a user