Skip to content

Commit 8efc2c9

Browse files
committed
feat: ultimate version phase 1 - multi-agent orchestration and interactive roadmap
1 parent 2d869b7 commit 8efc2c9

2 files changed

Lines changed: 96 additions & 13 deletions

File tree

src/components/JourneyRoadmap.tsx

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import { motion } from "framer-motion";
2+
import { Plane, Hotel, MapPin, CheckCircle2, Navigation } from "lucide-react";
3+
4+
interface RoadmapEvent {
5+
type: 'flight' | 'hotel' | 'activity' | 'done';
6+
title: string;
7+
details: string;
8+
agent: string;
9+
time?: string;
10+
}
11+
12+
export const JourneyRoadmap = ({ events }: { events: RoadmapEvent[] }) => {
13+
return (
14+
<div className="relative py-8 pl-8 pr-4 overflow-hidden bg-card/40 rounded-3xl border border-border/40 backdrop-blur-2xl shadow-2xl mt-6">
15+
<div className="absolute top-0 right-0 p-8 opacity-[0.02] pointer-events-none">
16+
<Navigation className="h-40 w-40" />
17+
</div>
18+
19+
<div className="absolute left-[39px] top-10 bottom-10 w-0.5 bg-gradient-to-b from-primary via-purple-500 to-emerald-500 rounded-full opacity-30 shadow-[0_0_10px_rgba(14,165,233,0.3)]" />
20+
21+
<div className="space-y-10 relative z-10">
22+
{events.map((event, i) => (
23+
<motion.div
24+
key={i}
25+
initial={{ opacity: 0, x: -20 }}
26+
animate={{ opacity: 1, x: 0 }}
27+
transition={{ delay: i * 0.3 }}
28+
className="flex gap-8 relative group"
29+
>
30+
<div className={`h-8 w-8 rounded-xl flex items-center justify-center shrink-0 shadow-lg relative z-20 transition-transform group-hover:scale-110 ${
31+
event.type === 'flight' ? 'bg-blue-500/20 text-blue-400 border border-blue-500/30' :
32+
event.type === 'hotel' ? 'bg-purple-500/20 text-purple-400 border border-purple-500/30' :
33+
event.type === 'activity' ? 'bg-emerald-500/20 text-emerald-400 border border-emerald-500/30' :
34+
'bg-primary/20 text-primary border border-primary/30'
35+
}`}>
36+
{event.type === 'flight' && <Plane className="h-4 w-4" />}
37+
{event.type === 'hotel' && <Hotel className="h-4 w-4" />}
38+
{event.type === 'activity' && <MapPin className="h-4 w-4" />}
39+
{event.type === 'done' && <CheckCircle2 className="h-4 w-4" />}
40+
</div>
41+
42+
<div className="flex-1">
43+
<div className="flex items-center justify-between mb-1">
44+
<h4 className="font-display font-bold text-lg text-foreground tracking-tight group-hover:text-primary transition-colors">
45+
{event.title}
46+
</h4>
47+
<span className="text-[9px] font-bold uppercase tracking-[0.2em] px-2 py-0.5 rounded bg-primary/10 text-primary/70 border border-primary/10">
48+
{event.agent}
49+
</span>
50+
</div>
51+
<p className="text-sm text-muted-foreground font-medium leading-relaxed opacity-80 decoration-primary/20 hover:opacity-100 transition-opacity">
52+
{event.details}
53+
</p>
54+
{event.time && (
55+
<div className="mt-2 flex items-center gap-2 text-[10px] font-mono text-muted-foreground/40">
56+
<span>{event.time} UTC</span>
57+
<span className="h-1 w-1 rounded-full bg-border" />
58+
<span>Verified Node</span>
59+
</div>
60+
)}
61+
</div>
62+
</motion.div>
63+
))}
64+
</div>
65+
</div>
66+
);
67+
};

src/pages/Plan.tsx

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useState, useRef, useEffect } from "react";
22
// Deployment Cache Bust: 2026-03-25T01:58:00Z
33
import { SendHorizontal, Bot, User, ShieldCheck, CreditCard, CheckCircle2, Sparkles, MapPin, Plane } from "lucide-react";
44
import { motion, AnimatePresence } from "framer-motion";
5+
import { JourneyRoadmap } from "../components/JourneyRoadmap";
56

67
type Message = {
78
role: "assistant" | "user";
@@ -10,6 +11,7 @@ type Message = {
1011
amount?: string;
1112
txId?: string;
1213
isStreaming?: boolean;
14+
roadmap?: any[];
1315
};
1416

1517
// Custom Typewriter Hook
@@ -125,30 +127,44 @@ export default function Plan() {
125127

126128
const isUganda = userMsg.toLowerCase().includes("uganda") || userMsg.toLowerCase().includes("safari") || userMsg.toLowerCase().includes("entebbe");
127129

128-
// Realistic Agent Orchestration Logic
130+
// Ultimate Multi-Agent Orchestration Logic
129131
setTimeout(() => {
130132
setIsTyping(false);
131-
132-
const response1 = isUganda
133-
? "Excellent! I'm initializing the Uganda Tourism Protocol. Scanning flights from Entebbe International (EBB) and checking availability at Kampala Serena Hotel..."
134-
: "I'm orchestrating your Flow. Scanning global flight databases and premium accommodation providers for your journey...";
135-
133+
134+
const response1 = isUganda
135+
? "SkyFlow Agent initializing Uganda Protocol. Scanning Entebbe International (EBB) flight corridor and StayBot verifying Serena Hotel suites..."
136+
: "Agentic Cluster initializing. Global orchestration layer scanning multi-modal logistics for your Flow...";
137+
136138
setMessages((prev) => [...prev, { role: "assistant", content: response1, isStreaming: true }]);
137-
139+
138140
setIsTyping(true);
139141
setTimeout(() => {
140142
setIsTyping(false);
141-
143+
142144
const response2 = isUganda
143-
? "I've locked in an exquisite 5-day itinerary: Flight UR402, 3 nights at Chobe Safari Lodge, and a private game drive in Murchison Falls. Everything is ready for checkout."
144-
: "I've optimized your itinerary for zero friction. Routes and stays are reserved. Would you like to proceed to secure this Flow via MiniPay?";
145-
146-
setMessages((prev) => [...prev.map((m, idx) => idx === prev.length - 1 ? { ...m, isStreaming: false } : m), { role: "assistant", content: response2, isStreaming: true }]);
145+
? "Orchestration complete. I've successfully converged your journey across three specialized agents. Your interactive Flow roadmap is ready for final review."
146+
: "Flow convergence achieved. Logistics are locked and verified across the network. Review your personalized journey Roadmap below.";
147+
148+
const roadmap = isUganda ? [
149+
{ type: 'flight', title: 'Flight UR402', details: 'Entebbe International Departure • Business Class Reserved', agent: 'SKYFLOW' },
150+
{ type: 'hotel', title: 'Chobe Safari Lodge', details: '3 Nights Luxury Suite • River View Authenticated', agent: 'STAYBOT' },
151+
{ type: 'activity', title: 'Murchison Falls Game Drive', details: 'Private 4x4 Orchestrated • Sunrise Departure', agent: 'LOCALGUIDE' },
152+
{ type: 'done', title: 'Everything Ready', details: 'All nodes synchronized and ready for blockchain booking.', agent: 'AI PILOT' }
153+
] : [
154+
{ type: 'flight', title: 'Global Route', details: 'Optimized flight path found with zero-friction connections.', agent: 'SKYFLOW' },
155+
{ type: 'hotel', title: 'Premium Stay', details: 'Accommodation verified via verified network providers.', agent: 'STAYBOT' },
156+
{ type: 'done', title: 'Ready for Flow', details: 'Agentic sequence complete.', agent: 'AI PILOT' }
157+
];
158+
159+
setMessages((prev) => [
160+
...prev.map((m, idx) => idx === prev.length - 1 ? { ...m, isStreaming: false } : m),
161+
{ role: "assistant", content: response2, isStreaming: true, roadmap: roadmap as any }
162+
]);
147163

148164
if (isUganda) {
149165
setTimeout(() => {
150166
setShowCheckout(true);
151-
}, 3000); // Wait for typing to finish roughly
167+
}, 4500); // Wait for roadmap animation
152168
}
153169
}, 3500);
154170

0 commit comments

Comments
 (0)