feat: 按老师发布配置渲染快捷提示
This commit is contained in:
@@ -611,8 +611,14 @@ export function TeacherChatPanel({
|
||||
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">
|
||||
<div className="min-w-0 grow">
|
||||
{!draftRevision && !text.trim() && <button type="button" disabled={helpUnavailable || voiceInput.state !== 'idle'} onClick={askForSuggestions} className="consultation-hint">帮我整体看🧠</button>}
|
||||
<div className="flex max-h-48 min-w-0 grow flex-wrap gap-2 overflow-y-auto pb-1">
|
||||
{!draftRevision && !text.trim() && (definition?.shortcuts == null
|
||||
? <button type="button" disabled={helpUnavailable || voiceInput.state !== 'idle'} onClick={askForSuggestions} className="consultation-hint">帮我整体看🧠</button>
|
||||
: definition.shortcuts.map((shortcut, index) => <button
|
||||
key={index} type="button" disabled={helpUnavailable || voiceInput.state !== 'idle'}
|
||||
onClick={() => void send({ text: shortcut.prompt })}
|
||||
className="consultation-hint max-w-full whitespace-normal break-words text-left"
|
||||
>{shortcut.label}</button>))}
|
||||
</div>
|
||||
<div className="ml-auto flex min-w-0 max-w-full items-center gap-1" data-testid="teacher-composer-runtime-controls">
|
||||
<TeacherModelSelect key={modelScope + (definition?.runtime ?? 'local')} runtime={definition?.runtime ?? 'local'} scope={modelScope} defaultModel={definition?.model.model_id}
|
||||
|
||||
Reference in New Issue
Block a user