🎨 优化角色卡编辑功能,新增正则编辑和测试

Signed-off-by: Echo <1711788888@qq.com>
This commit is contained in:
2026-03-02 00:50:56 +08:00
parent aa461ec6c3
commit fd660c8804
3 changed files with 256 additions and 24 deletions

View File

@@ -627,7 +627,7 @@ export default function ChatArea({ conversation, character, onConversationUpdate
</div>
)}
<div className={`max-w-[70%] min-w-0 flex flex-col ${msg.role === 'user' ? 'items-end' : 'items-start'}`}>
<div className={`min-w-0 flex flex-col ${msg.role === 'user' ? 'max-w-[70%] items-end' : 'w-[70%] items-start'}`}>
{/* 助手名称 */}
{msg.role === 'assistant' && (
<span className="text-xs text-white/40 mb-1 ml-1">{character.name}</span>
@@ -638,7 +638,7 @@ export default function ChatArea({ conversation, character, onConversationUpdate
className={`relative px-4 py-3 rounded-2xl ${
msg.role === 'user'
? 'bg-primary/25 border border-primary/20 rounded-br-md'
: 'glass rounded-bl-md'
: 'glass rounded-bl-md w-full'
}`}
style={{ wordBreak: 'break-word', overflowWrap: 'anywhere' }}
>