mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-28 00:04:47 +08:00
feat: hide model ID for safety reason, only show the display_name (#1410)
Co-authored-by: Henry Li <lixin.henry@bytedance.com>
This commit is contained in:
@@ -218,7 +218,14 @@ export function InputBox({
|
|||||||
onContextChange?.({
|
onContextChange?.({
|
||||||
...context,
|
...context,
|
||||||
mode: getResolvedMode(mode, supportThinking),
|
mode: getResolvedMode(mode, supportThinking),
|
||||||
reasoning_effort: mode === "ultra" ? "high" : mode === "pro" ? "medium" : mode === "thinking" ? "low" : "minimal",
|
reasoning_effort:
|
||||||
|
mode === "ultra"
|
||||||
|
? "high"
|
||||||
|
: mode === "pro"
|
||||||
|
? "medium"
|
||||||
|
: mode === "thinking"
|
||||||
|
? "low"
|
||||||
|
: "minimal",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[onContextChange, context, supportThinking],
|
[onContextChange, context, supportThinking],
|
||||||
@@ -292,7 +299,9 @@ export function InputBox({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const current = (textInput.value ?? "").trim();
|
const current = (textInput.value ?? "").trim();
|
||||||
const next = current ? `${current}\n${pendingSuggestion}` : pendingSuggestion;
|
const next = current
|
||||||
|
? `${current}\n${pendingSuggestion}`
|
||||||
|
: pendingSuggestion;
|
||||||
textInput.setInput(next);
|
textInput.setInput(next);
|
||||||
setFollowupsHidden(true);
|
setFollowupsHidden(true);
|
||||||
setConfirmOpen(false);
|
setConfirmOpen(false);
|
||||||
@@ -446,7 +455,8 @@ export function InputBox({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{(context.mode === "flash" && t.inputBox.flashMode) ||
|
{(context.mode === "flash" && t.inputBox.flashMode) ||
|
||||||
(context.mode === "thinking" && t.inputBox.reasoningMode) ||
|
(context.mode === "thinking" &&
|
||||||
|
t.inputBox.reasoningMode) ||
|
||||||
(context.mode === "pro" && t.inputBox.proMode) ||
|
(context.mode === "pro" && t.inputBox.proMode) ||
|
||||||
(context.mode === "ultra" && t.inputBox.ultraMode)}
|
(context.mode === "ultra" && t.inputBox.ultraMode)}
|
||||||
</div>
|
</div>
|
||||||
@@ -531,7 +541,8 @@ export function InputBox({
|
|||||||
<GraduationCapIcon
|
<GraduationCapIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
"mr-2 size-4",
|
"mr-2 size-4",
|
||||||
context.mode === "pro" && "text-accent-foreground",
|
context.mode === "pro" &&
|
||||||
|
"text-accent-foreground",
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{t.inputBox.proMode}
|
{t.inputBox.proMode}
|
||||||
@@ -589,10 +600,14 @@ export function InputBox({
|
|||||||
<PromptInputActionMenuTrigger className="gap-1! px-2!">
|
<PromptInputActionMenuTrigger className="gap-1! px-2!">
|
||||||
<div className="text-xs font-normal">
|
<div className="text-xs font-normal">
|
||||||
{t.inputBox.reasoningEffort}:
|
{t.inputBox.reasoningEffort}:
|
||||||
{context.reasoning_effort === "minimal" && " " + t.inputBox.reasoningEffortMinimal}
|
{context.reasoning_effort === "minimal" &&
|
||||||
{context.reasoning_effort === "low" && " " + t.inputBox.reasoningEffortLow}
|
" " + t.inputBox.reasoningEffortMinimal}
|
||||||
{context.reasoning_effort === "medium" && " " + t.inputBox.reasoningEffortMedium}
|
{context.reasoning_effort === "low" &&
|
||||||
{context.reasoning_effort === "high" && " " + t.inputBox.reasoningEffortHigh}
|
" " + t.inputBox.reasoningEffortLow}
|
||||||
|
{context.reasoning_effort === "medium" &&
|
||||||
|
" " + t.inputBox.reasoningEffortMedium}
|
||||||
|
{context.reasoning_effort === "high" &&
|
||||||
|
" " + t.inputBox.reasoningEffortHigh}
|
||||||
</div>
|
</div>
|
||||||
</PromptInputActionMenuTrigger>
|
</PromptInputActionMenuTrigger>
|
||||||
<PromptInputActionMenuContent className="w-70">
|
<PromptInputActionMenuContent className="w-70">
|
||||||
@@ -647,7 +662,8 @@ export function InputBox({
|
|||||||
</PromptInputActionMenuItem>
|
</PromptInputActionMenuItem>
|
||||||
<PromptInputActionMenuItem
|
<PromptInputActionMenuItem
|
||||||
className={cn(
|
className={cn(
|
||||||
context.reasoning_effort === "medium" || !context.reasoning_effort
|
context.reasoning_effort === "medium" ||
|
||||||
|
!context.reasoning_effort
|
||||||
? "text-accent-foreground"
|
? "text-accent-foreground"
|
||||||
: "text-muted-foreground/65",
|
: "text-muted-foreground/65",
|
||||||
)}
|
)}
|
||||||
@@ -661,7 +677,8 @@ export function InputBox({
|
|||||||
{t.inputBox.reasoningEffortMediumDescription}
|
{t.inputBox.reasoningEffortMediumDescription}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{context.reasoning_effort === "medium" || !context.reasoning_effort ? (
|
{context.reasoning_effort === "medium" ||
|
||||||
|
!context.reasoning_effort ? (
|
||||||
<CheckIcon className="ml-auto size-4" />
|
<CheckIcon className="ml-auto size-4" />
|
||||||
) : (
|
) : (
|
||||||
<div className="ml-auto size-4" />
|
<div className="ml-auto size-4" />
|
||||||
@@ -706,11 +723,6 @@ export function InputBox({
|
|||||||
<ModelSelectorName className="text-xs font-normal">
|
<ModelSelectorName className="text-xs font-normal">
|
||||||
{selectedModel?.display_name}
|
{selectedModel?.display_name}
|
||||||
</ModelSelectorName>
|
</ModelSelectorName>
|
||||||
{selectedModel?.model && (
|
|
||||||
<span className="text-muted-foreground w-full truncate text-[10px] leading-none">
|
|
||||||
{selectedModel.model}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</PromptInputButton>
|
</PromptInputButton>
|
||||||
</ModelSelectorTrigger>
|
</ModelSelectorTrigger>
|
||||||
@@ -761,7 +773,7 @@ export function InputBox({
|
|||||||
!isNewThread &&
|
!isNewThread &&
|
||||||
!followupsHidden &&
|
!followupsHidden &&
|
||||||
(followupsLoading || followups.length > 0) && (
|
(followupsLoading || followups.length > 0) && (
|
||||||
<div className="absolute right-0 -top-20 left-0 z-20 flex items-center justify-center">
|
<div className="absolute -top-20 right-0 left-0 z-20 flex items-center justify-center">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
{followupsLoading ? (
|
{followupsLoading ? (
|
||||||
<div className="text-muted-foreground bg-background/80 rounded-full border px-4 py-2 text-xs backdrop-blur-sm">
|
<div className="text-muted-foreground bg-background/80 rounded-full border px-4 py-2 text-xs backdrop-blur-sm">
|
||||||
|
|||||||
Reference in New Issue
Block a user