✨ feat(vscode): 重写注释时在卡片下展示模型过程

This commit is contained in:
cruldra committed 2026-10-03 03:22:20 +08:00
1 parent 08fb04e3fd
commit 5e8e7b65ee
15 files changed
+369 -83

No files matched your search

@@ -1,9 +1,9 @@
import type { ReactElement } from 'react'
import { Eye, LoaderCircle, Pencil, RefreshCw, Sparkles } from 'lucide-react'
import { Eye, MessageSquareText, Pencil, Sparkles } from 'lucide-react'
/**
* 块右上角的一排图标按钮(普通块、属性表、库规则的卡片共用):只放图标,名字写在悬停提示(data-tooltip)和读屏用的 aria-label 里。
* 「按注释规范重写」:只给注释块。点了用写注释的技能重写这一段并写回文件;正在重写时转圈,不能再点。
* 「按注释规范重写」:只给注释块。点了用写注释的技能重写这一段并写回文件;正在重写时不能再点。图标是注释。
* 「问 AI」:点开 / 收起块下面的问答区,展开时带按下的底色。
* 「编辑 / 预览」切换:预览时是铅笔「编辑」,编辑时是眼睛「预览」、带按下的底色。
*/
@@ -33,9 +33,7 @@ export function BlockTools({ editing, onToggleEdit, asking, onToggleAsk, rewriti
disabled={rewriting === true}
onClick={onRewrite}
>
{rewriting
? <LoaderCircle size={14} strokeWidth={1.8} className="cr-qa-spin" aria-hidden />
: <RefreshCw size={14} strokeWidth={1.8} aria-hidden />}
<MessageSquareText size={14} strokeWidth={1.8} aria-hidden />
</button>
)}
{onToggleAsk && (