feat(search): Optimized search functionality and user interface #3221 (#9535)

### What problem does this PR solve?

feat(search): Optimized search functionality and user interface #3221
### Type of change
- Added similarity threshold adjustment function
- Optimized mind map display logic
- Adjusted search settings interface layout
- Fixed related search and document viewing functions
- Optimized time display and node selection logic

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-08-19 09:39:48 +08:00
committed by GitHub
parent 188c0f614b
commit 2b9ed935f3
18 changed files with 231 additions and 104 deletions

View File

@ -242,7 +242,7 @@ export function InnerNextStepDropdown({
}}
onClick={(e) => e.stopPropagation()}
>
<div className="w-[300px] font-semibold bg-white border border-border rounded-md shadow-lg">
<div className="w-[300px] font-semibold bg-bg-base border border-border rounded-md shadow-lg">
<div className="px-3 py-2 border-b border-border">
<div className="text-sm font-medium">Next Step</div>
</div>

View File

@ -158,8 +158,9 @@ const ToolTimelineItem = ({
</span>
)}
<span className="text-text-secondary text-xs">
{/* 0:00
{x.data.elapsed_time?.toString().slice(0, 6)} */}
{/* 0:00*/}
{tool.elapsed_time?.toString().slice(0, 6) || ''}
{tool.elapsed_time ? 's' : ''}
</span>
<span
className={cn(

View File

@ -153,6 +153,22 @@ export const WorkFlowTimeline = ({
}, []);
}, [currentEventListWithoutMessage, sendLoading]);
const getElapsedTime = (nodeId: string) => {
if (nodeId === 'begin') {
return '';
}
const data = currentEventListWithoutMessage?.find((x) => {
return (
x.data.component_id === nodeId &&
x.event === MessageEventType.NodeFinished
);
});
if (!data || data?.data.elapsed_time < 0.000001) {
return '';
}
return data?.data.elapsed_time || '';
};
const hasTrace = useCallback(
(componentId: string) => {
if (Array.isArray(traceData)) {
@ -272,7 +288,10 @@ export const WorkFlowTimeline = ({
nodeLabel)}
</span>
<span className="text-text-secondary text-xs">
{x.data.elapsed_time?.toString().slice(0, 6)}
{getElapsedTime(x.data.component_id)
.toString()
.slice(0, 6)}
{getElapsedTime(x.data.component_id) ? 's' : ''}
</span>
<span
className={cn(