fix(聊天页面): 思考模式开关仅在非Codex模型时显示
- 添加模型类型判断逻辑 - Codex 模型不支持思考模式,隐藏开关按钮 - 优化用户体验,避免无效操作
This commit is contained in:
parent
ec4f5f2dba
commit
bd09e67988
@ -479,20 +479,22 @@ export default function ChatPage({ params }: PageProps) {
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
{/* 思考模式开关 */}
|
||||
<button
|
||||
onClick={handleThinkingToggle}
|
||||
className={cn(
|
||||
'flex items-center gap-2 px-3 py-1.5 text-sm rounded-lg transition-colors',
|
||||
enableThinking
|
||||
? 'bg-[var(--color-primary-light)] text-[var(--color-primary)]'
|
||||
: 'text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)]'
|
||||
)}
|
||||
title={enableThinking ? '关闭思考模式' : '开启思考模式'}
|
||||
>
|
||||
<Clock size={16} />
|
||||
<span>思考</span>
|
||||
</button>
|
||||
{/* 思考模式开关 - 只在非 Codex 模型时显示 */}
|
||||
{!selectedModelId.toLowerCase().includes('codex') && (
|
||||
<button
|
||||
onClick={handleThinkingToggle}
|
||||
className={cn(
|
||||
'flex items-center gap-2 px-3 py-1.5 text-sm rounded-lg transition-colors',
|
||||
enableThinking
|
||||
? 'bg-[var(--color-primary-light)] text-[var(--color-primary)]'
|
||||
: 'text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)]'
|
||||
)}
|
||||
title={enableThinking ? '关闭思考模式' : '开启思考模式'}
|
||||
>
|
||||
<Clock size={16} />
|
||||
<span>思考</span>
|
||||
</button>
|
||||
)}
|
||||
|
||||
<button
|
||||
className="flex items-center gap-2 px-3 py-1.5 text-sm text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)] rounded-lg transition-colors"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user