improve: Update disabled action tooltips for better accuracy

Update tooltip messages from "正在生成中,请稍候..." to "操作暂时被禁用"
in MessageActions component to better reflect that actions can be disabled
during both message generation and editing states.

Changes:
- Replace specific "generating" message with generic "temporarily disabled" message
- Applies to retry, edit, role toggle, and delete action tooltips
- Provides more accurate user feedback for disabled states

Files modified:
- web/src/components/playground/MessageActions.js
This commit is contained in:
Apple\Apple
2025-05-30 22:35:43 +08:00
parent b548c6c827
commit f7a16c6ca5

View File

@@ -33,7 +33,7 @@ const MessageActions = ({
return (
<div className="flex items-center gap-0.5">
{!isLoading && (
<Tooltip content={shouldDisableActions ? t('正在生成中,请稍候...') : t('重试')} position="top">
<Tooltip content={shouldDisableActions ? t('操作暂时被禁用') : t('重试')} position="top">
<Button
theme="borderless"
type="tertiary"
@@ -62,7 +62,7 @@ const MessageActions = ({
)}
{canEdit && (
<Tooltip content={shouldDisableActions ? t('正在生成中,请稍候...') : t('编辑')} position="top">
<Tooltip content={shouldDisableActions ? t('操作暂时被禁用') : t('编辑')} position="top">
<Button
theme="borderless"
type="tertiary"
@@ -80,7 +80,7 @@ const MessageActions = ({
<Tooltip
content={
shouldDisableActions
? t('正在生成中,请稍候...')
? t('操作暂时被禁用')
: message.role === 'assistant'
? t('切换为System角色')
: t('切换为Assistant角色')
@@ -101,7 +101,7 @@ const MessageActions = ({
)}
{!isLoading && (
<Tooltip content={shouldDisableActions ? t('正在生成中,请稍候...') : t('删除')} position="top">
<Tooltip content={shouldDisableActions ? t('操作暂时被禁用') : t('删除')} position="top">
<Button
theme="borderless"
type="tertiary"