抽屉优化

This commit is contained in:
pphua committed 2026-08-25 12:05:26 +08:00
1 parent 7234874797
commit d968727460
14 files changed
+669 -154

No files matched your search

-2
View File
@@ -415,8 +415,6 @@ function ProfileSheet({
<SheetContent
side="right"
className="flex flex-col gap-0 p-0 data-[side=right]:min-w-[420px] data-[side=right]:sm:max-w-xl"
// 表单填到一半时点外面不该丢内容(Esc / ✕ 仍可关闭)。
onInteractOutside={(e) => e.preventDefault()}
>
<SheetHeader className="px-4">
<SheetTitle className="flex items-center gap-2">
+8
View File
@@ -313,6 +313,7 @@ function ToolEditor({
function ToolGridCard({ tool, onClick }: { tool: Tool; onClick: () => void }) {
return (
<button
type="button"
onClick={onClick}
className="hover:border-primary/50 hover:bg-muted/40 focus-visible:ring-ring flex flex-col gap-2 rounded-lg border p-4 text-left transition-colors focus-visible:ring-2 focus-visible:outline-none"
>
@@ -337,6 +338,13 @@ function ToolGridCard({ tool, onClick }: { tool: Tool; onClick: () => void }) {
已停用
</Badge>
)}
<Badge
variant="secondary"
className="ml-auto px-1.5 py-0 text-[10px] tabular-nums"
title={`累计调用 ${tool.calls ?? 0} 次`}
>
调用 {tool.calls ?? 0}
</Badge>
</div>
<p className="text-muted-foreground line-clamp-1 h-4 text-xs">
{tool.description || "(无描述)"}