+ {/* Setup Phase - Editorial Style */}
+ {(state.status === "setup" || (!state.status && scenarios.length > 0)) && (
-
- {state.scenario.title}
-
- {state.scenario.item}
-
- Asking Price:
- ${state.scenario.asking_price?.toLocaleString()}
-
-
-
- )}
-
- {/* VS Display */}
- {state.buyer && state.seller && (
-
- {/* Buyer */}
-
- {state.buyer.emoji}
- {state.buyer.name}
- BUYER
-
- Budget: ${state.buyer.budget?.toLocaleString()}
-
-
-
- {/* VS Badge */}
-
- VS
-
-
- {/* Seller */}
-
- {state.seller.emoji}
- {state.seller.name}
- SELLER
-
- Minimum: ${state.seller.minimum?.toLocaleString()}
-
-
-
- )}
-
- {/* Negotiation Timeline */}
- {state.rounds && state.rounds.length > 0 && (
-
-
- ⏱️ NEGOTIATION TIMELINE
-
-
- {/* Center line */}
-
-
- {/* Rounds */}
-
- {state.rounds.map((round, index) => (
-
+ {/* Scenario Selection */}
+
+
+ Step 1
+
+ Select Context
+
+
+
+ {scenarios.map((scenario) => (
+
setSelectedScenario(scenario.id)}
+ className={`
+ cursor-pointer p-8 rounded-xl border transition-all duration-200
+ ${selectedScenario === scenario.id
+ ? 'bg-bg-card border-text-primary shadow-md ring-1 ring-text-primary'
+ : 'bg-bg-subtle border-transparent hover:border-border-medium hover:bg-bg-card'
+ }
+ `}
+ >
+ {scenario.emoji}
+ {scenario.title}
+ {scenario.item}
+
+ ${scenario.asking_price.toLocaleString()}
+
+
))}
-
-
-
- )}
+
+
- {/* Deal Banner */}
- {state.status === "deal" && state.final_price && state.scenario && (
-
-
-
- )}
+ {/* Character Selection */}
+ {selectedScenario && (
+
+
+ {/* Buyer Selection */}
+
+
+ Step 2
+
+ Choose Buyer
+
+
+
+ {buyers.map((buyer) => (
+
setSelectedBuyer(buyer.id)}
+ className={`
+ cursor-pointer p-5 rounded-lg border transition-all
+ ${selectedBuyer === buyer.id
+ ? 'bg-bg-card border-text-primary shadow-sm'
+ : 'bg-bg-subtle border-transparent hover:border-border-medium'
+ }
+ `}
+ >
+ {buyer.emoji}
+ {buyer.name}
+
+ ))}
+
+
- {/* No Deal Banner */}
- {state.status === "no_deal" && (
-
-
- NO DEAL 💔
- The negotiation has ended without an agreement.
+ {/* Seller Selection */}
+
+
+ Step 3
+
+ Choose Seller
+
+
+
+ {sellers.map((seller) => (
+
setSelectedSeller(seller.id)}
+ className={`
+ cursor-pointer p-5 rounded-lg border transition-all
+ ${selectedSeller === seller.id
+ ? 'bg-bg-card border-text-primary shadow-sm'
+ : 'bg-bg-subtle border-transparent hover:border-border-medium'
+ }
+ `}
+ >
+ {seller.emoji}
+ {seller.name}
+
+ ))}
+
+
+
+
+ {/* Start Button */}
+ {selectedBuyer && selectedSeller && (
+
+
+
+ Begin Negotiation
+
+
+ )}
+
+ )}
)}
- {/* Instructions when no negotiation */}
- {state.status === "setup" && (
-
- 🎮
-
- Ready to Start a Battle?
-
-
- Open the chat sidebar and tell the Battle Master to start a negotiation!
- Try: "Start a negotiation for a used car"
-
-
+ {/* Battle Phase */}
+ {(state.status === "ready" || state.status === "negotiating" || state.status === "deal" || state.status === "no_deal") && (
+
+ {/* Scenario Header - Editorial Style */}
+ {state.scenario && (
+
+
+ Negotiation Item
+
+
+ {state.scenario.title}
+
+ {state.scenario.item}
+
+ Asking Price
+
+ ${state.scenario.asking_price?.toLocaleString()}
+
+
+
+ )}
+
+ {/* Comparison Display - Editorial Two-Column */}
+ {state.buyer && state.seller && (
+
+
+ {/* Buyer Column */}
+
+ Buyer
+ {state.buyer.emoji}
+ {state.buyer.name}
+ Budget: ${state.buyer.budget?.toLocaleString()}
+
+
+ {/* Seller Column */}
+
+ Seller
+ {state.seller.emoji}
+ {state.seller.name}
+ Minimum: ${state.seller.minimum?.toLocaleString()}
+
+
+
+ )}
+
+ {/* Negotiation Chat */}
+ {state.rounds && state.rounds.length > 0 && (
+
+
+
+ Live Transcript
+
+
+
+ {/* Price Tracker */}
+ {state.buyer && state.seller && state.rounds.length > 0 && state.rounds[state.rounds.length - 1].offer_amount && (
+
+ )}
+
+ {/* Chat Bubbles */}
+
+
+ {state.rounds.map((round, index) => {
+ const isBuyer = round.type === "buyer_offer" || round.buyer_name;
+ return (
+
+ );
+ })}
+
+
+ {/* Typing Indicator */}
+ {(state.status === "negotiating" || state.status === "ready") && (
+
+
+
+ )}
+
+
+ )}
+
+ {/* Deal Banner */}
+ {state.status === "deal" && state.final_price && state.scenario && (
+
+
+
+ )}
+
+ {/* No Deal Banner */}
+ {state.status === "no_deal" && (
+
+
+ Negotiation Ended
+ No agreement could be reached between the parties.
+
+ )}
+
+ {/* Reset Button */}
+ {(state.status === "deal" || state.status === "no_deal") && (
+
+
+
+ Start New Negotiation
+
+
+ )}
+
)}
);
}
diff --git a/advanced_ai_agents/multi_agent_apps/ai_negotiation_battle_simulator/screenshots/demo.gif b/advanced_ai_agents/multi_agent_apps/ai_negotiation_battle_simulator/screenshots/demo.gif
deleted file mode 100644
index a8cc52c..0000000
Binary files a/advanced_ai_agents/multi_agent_apps/ai_negotiation_battle_simulator/screenshots/demo.gif and /dev/null differ