mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 14:22:13 +08:00
feat: adjust tooltips
This commit is contained in:
@@ -46,7 +46,7 @@ function TooltipContent({
|
||||
data-slot="tooltip-content"
|
||||
sideOffset={sideOffset ?? 4}
|
||||
className={cn(
|
||||
"animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-background text-foreground z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md border px-3 py-1.5 text-xs text-balance shadow-xs",
|
||||
"animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-foreground text-background dark:text-foreground z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md border px-3 py-1.5 text-xs text-balance shadow-xs dark:border-white/18 dark:bg-[#050504]",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -320,7 +320,13 @@ function ToolCall({
|
||||
return (
|
||||
<ChainOfThoughtStep key={id} label={description} icon={BookOpenTextIcon}>
|
||||
{path && (
|
||||
<Tooltip content={<pre>{result as string}</pre>}>
|
||||
<Tooltip
|
||||
content={
|
||||
<pre className="max-w-[95vw] whitespace-pre-wrap">
|
||||
{result as string}
|
||||
</pre>
|
||||
}
|
||||
>
|
||||
<ChainOfThoughtSearchResult className="cursor-pointer">
|
||||
{path}
|
||||
</ChainOfThoughtSearchResult>
|
||||
@@ -363,7 +369,11 @@ function ToolCall({
|
||||
}}
|
||||
>
|
||||
{path && (
|
||||
<ChainOfThoughtSearchResult>{path}</ChainOfThoughtSearchResult>
|
||||
<Tooltip content={t.toolCalls.clickToViewContent}>
|
||||
<ChainOfThoughtSearchResult className="cursor-pointer">
|
||||
{path}
|
||||
</ChainOfThoughtSearchResult>
|
||||
</Tooltip>
|
||||
)}
|
||||
</ChainOfThoughtStep>
|
||||
);
|
||||
|
||||
@@ -125,6 +125,7 @@ export const enUS: Translations = {
|
||||
listFolder: "List folder",
|
||||
readFile: "Read file",
|
||||
writeFile: "Write file",
|
||||
clickToViewContent: "Click to view file content",
|
||||
writeTodos: "Update to-do list",
|
||||
skillInstallTooltip: "Install skill and make it available to DeerFlow",
|
||||
},
|
||||
|
||||
@@ -118,6 +118,7 @@ export interface Translations {
|
||||
listFolder: string;
|
||||
readFile: string;
|
||||
writeFile: string;
|
||||
clickToViewContent: string;
|
||||
writeTodos: string;
|
||||
skillInstallTooltip: string;
|
||||
};
|
||||
|
||||
@@ -122,6 +122,7 @@ export const zhCN: Translations = {
|
||||
listFolder: "列出文件夹",
|
||||
readFile: "读取文件",
|
||||
writeFile: "写入文件",
|
||||
clickToViewContent: "点击查看文件内容",
|
||||
writeTodos: "更新 To-do 列表",
|
||||
skillInstallTooltip: "安装技能并使其可在 DeerFlow 中使用",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user