fix: restore composer guidance in input hint

The composer placeholder had been reduced to only the message prompt, hiding send, newline, and paste guidance unless users hovered the field. The full localized keyboard guidance now appears directly in the empty text area again for both chat and image generation.

Release note: 恢复聊天输入框中的发送、换行和粘贴快捷键提示,空输入框会再次直接显示完整操作说明。
This commit is contained in:
mesalogo
2026-08-27 10:14:39 +08:00
parent 957e2ecde7
commit 0a3bf6094a
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1163,7 +1163,7 @@ describe('App', () => {
screen.getByLabelText('Message GoodBuddy')
).toHaveAttribute(
'placeholder',
'Message GoodBuddy…'
'Message GoodBuddy…\nEnter to send, Shift+Enter for a new line, Ctrl+V to paste an image or text'
)
expect(
screen.getByLabelText('Message GoodBuddy')
@@ -5581,7 +5581,7 @@ describe('App', () => {
).toHaveTextContent(/^Ask$/u)
expect(screen.getByLabelText('向 GoodBuddy 提问')).toHaveAttribute(
'placeholder',
'给 GoodBuddy 发消息…'
'给 GoodBuddy 发消息…\nEnter 发送,Shift+Enter 换行,Ctrl+V 粘贴图片或文本'
)
expect(
within(conversationSettings).getByRole('button', {
+2 -2
View File
@@ -8908,11 +8908,11 @@ function App(): React.JSX.Element {
<div className="composer__input">
<textarea
aria-label={t('composer.inputLabel')}
placeholder={
placeholder={`${
runtime?.capability === 'image-generation'
? t('composer.imagePlaceholder')
: t('composer.placeholder')
}
}\n${t('composer.keyboardHint')}`}
ref={inputRef}
rows={3}
title={t('composer.keyboardHint')}