mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 00:46:52 +08:00
### 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:
@ -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>
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user