Skip to content

Commit 71150dc

Browse files
committed
fix
1 parent 9291e83 commit 71150dc

File tree

1 file changed

+32
-26
lines changed

1 file changed

+32
-26
lines changed

visual-tree-search-app/components/MessageLogPanel.tsx

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,28 @@
1-
import React, { useState, useEffect } from 'react';
1+
import React, { useEffect } from 'react';
22
import {
3-
ChevronDown,
4-
ChevronUp,
53
Info,
6-
Play,
74
CheckCircle,
85
XCircle,
9-
Search,
106
Globe,
117
AlertCircle,
12-
Terminal,
138
Code,
149
Settings,
1510
RefreshCw,
1611
Loader2,
17-
Shield,
18-
Database,
1912
Network,
20-
FileText,
2113
MessageSquare,
2214
AlertTriangle,
2315
HelpCircle,
2416
Clock,
25-
Zap,
2617
Cpu,
2718
Brain,
2819
Target,
2920
Flag,
3021
Award,
3122
Trophy,
3223
Star,
33-
Heart,
3424
ThumbsUp,
3525
ThumbsDown,
36-
Smile,
37-
Frown,
3826
Meh,
3927
ArrowRight,
4028
PlusCircle,
@@ -57,7 +45,23 @@ interface ParsedMessage {
5745
content?: string;
5846
status?: string;
5947
message?: string;
60-
[key: string]: any;
48+
goal?: string;
49+
search_algorithm?: string;
50+
max_depth?: number;
51+
browser_type?: string;
52+
page_info?: {
53+
url?: string;
54+
title?: string;
55+
};
56+
description?: string;
57+
action?: string;
58+
reason?: string;
59+
score?: number;
60+
tree?: unknown[];
61+
path?: PathStep[];
62+
server_info?: {
63+
hostname?: string;
64+
};
6165
}
6266

6367
interface PathStep {
@@ -443,18 +447,20 @@ const MessageLogPanel: React.FC<MessageLogPanelProps> = ({ messages, messagesEnd
443447
<div className="text-emerald-600 dark:text-emerald-400">
444448
Search Complete | Score: {message.score}
445449
</div>
446-
<div className="mt-1">
447-
{message.path.map((step: PathStep, index: number) => (
448-
<div
449-
key={index}
450-
className="flex items-start gap-1 text-xs text-slate-500 dark:text-slate-400 animate-fadeIn"
451-
style={{ animationDelay: `${index * 100}ms` }}
452-
>
453-
<ArrowRight className="h-3 w-3 mt-0.5" />
454-
{step.natural_language_description}
455-
</div>
456-
))}
457-
</div>
450+
{message.path && message.path.length > 0 && (
451+
<div className="mt-1">
452+
{message.path.map((step: PathStep, index: number) => (
453+
<div
454+
key={index}
455+
className="flex items-start gap-1 text-xs text-slate-500 dark:text-slate-400 animate-fadeIn"
456+
style={{ animationDelay: `${index * 100}ms` }}
457+
>
458+
<ArrowRight className="h-3 w-3 mt-0.5" />
459+
{step.natural_language_description}
460+
</div>
461+
))}
462+
</div>
463+
)}
458464
</div>
459465
</div>
460466
);

0 commit comments

Comments
 (0)