From c0de0f3a60b6c462352803944ca480ba5e6df3e6 Mon Sep 17 00:00:00 2001 From: balibabu Date: Thu, 17 Jul 2025 12:10:03 +0800 Subject: [PATCH] Feat: Display the thinking process according to the start_to_think flag of the message #3221 (#8888) ### What problem does this PR solve? Feat: Display the thinking process according to the start_to_think flag of the message #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/components/llm-select/next.tsx | 13 ++++++-- .../originui/select-with-search.tsx | 7 ++-- web/src/hooks/use-send-message.ts | 2 ++ web/src/pages/agent/chat/hooks.ts | 33 ++++++++++++++++++- 4 files changed, 49 insertions(+), 6 deletions(-) diff --git a/web/src/components/llm-select/next.tsx b/web/src/components/llm-select/next.tsx index 4b0c0b07a..a90e88131 100644 --- a/web/src/components/llm-select/next.tsx +++ b/web/src/components/llm-select/next.tsx @@ -3,6 +3,7 @@ import { useComposeLlmOptionsByModelTypes } from '@/hooks/llm-hooks'; import * as SelectPrimitive from '@radix-ui/react-select'; import { forwardRef, memo, useState } from 'react'; import { LlmSettingFieldItems } from '../llm-setting-items/next'; +import { SelectWithSearch } from '../originui/select-with-search'; import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover'; import { Select, SelectTrigger, SelectValue } from '../ui/select'; @@ -10,20 +11,28 @@ interface IProps { id?: string; value?: string; onInitialValue?: (value: string, option: any) => void; - onChange?: (value: string, option: any) => void; + onChange?: (value: string) => void; disabled?: boolean; } const NextInnerLLMSelect = forwardRef< React.ElementRef, IProps ->(({ value, disabled }, ref) => { +>(({ value, disabled, onChange }, ref) => { const [isPopoverOpen, setIsPopoverOpen] = useState(false); const modelOptions = useComposeLlmOptionsByModelTypes([ LlmModelType.Chat, LlmModelType.Image2text, ]); + return ( + + ); + return (