Skip to content

状态栏和思考框优化#10

Merged
ninirobot merged 10 commits into
mainfrom
bug专用
Feb 4, 2026

Hidden character warning

The head ref may contain hidden characters: "bug\u4e13\u7528"
Merged

状态栏和思考框优化#10
ninirobot merged 10 commits into
mainfrom
bug专用

Conversation

@ninirobot
Copy link
Copy Markdown
Owner

本次修改重构了 ChatAction 组件,将原有的“展开式按钮”替换为更稳定的纯 CSS Tooltip 交互。解决了布局抖动问题,并实现了更整洁的 UI 风格。

Key Changes

  1. 代码重构 (chat.tsx)
    移除冗余逻辑: 删除了用于计算按钮宽度的复杂 JS 逻辑 (useRef, getBoundingClientRect)。
    简化组件: ChatAction 现在是一个简单的函数组件,专注于渲染图标和结构。

  2. 样式更新 (chat.module.scss)
    Tooltip 实现:
    text 标签现在作为 Tooltip 在鼠标悬浮时居中显示在按钮上方。
    白底黑字风格: 采用浅色主题(白色背景、黑色文字、边框),符合你的审美偏好。
    定位: 使用绝对定位 (bottom: 100%) 确保其悬浮在 UI 顶层,不影响文档流。

3.思考折叠 (thinking.tsx)
思考框思考中时默认展开,完成后自动折叠。
移除动画:
移除了宽度的过渡动画。
移除了鼠标悬停时的图标上浮动画,保证操作的稳定感。
层级控制: 添加 z-index: 100 防止被遮挡。

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ninichat Ready Ready Preview, Comment Feb 4, 2026 9:32am

@ninirobot ninirobot merged commit b6e77b6 into main Feb 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant