feat(crypto): implement hybrid approach with real-time DexScreener tools

- Add crypto_realtime.py with get_live_token_price and get_live_token_data tools
- Register real-time tools in registry.py (no dependencies required)
- Export tool factories in __init__.py
- Create LiveTokenPriceToolUI component for real-time price display
- Create LiveTokenDataToolUI component for comprehensive market data
- Register tool-ui components in new-chat page

Hybrid Architecture:
- RAG (search_knowledge_base): Historical context, trends from indexed data
- Real-time tools: Current prices, live market data via direct API calls
- AI agent decides which to use based on query intent
This commit is contained in:
API Test Bot 2026-02-04 00:12:32 +07:00
parent f2e38c52a1
commit d20cb8a538
9 changed files with 979 additions and 125 deletions

View file

@ -39,6 +39,23 @@ import { GeneratePodcastToolUI } from "@/components/tool-ui/generate-podcast";
import { LinkPreviewToolUI } from "@/components/tool-ui/link-preview";
import { ScrapeWebpageToolUI } from "@/components/tool-ui/scrape-webpage";
import { RecallMemoryToolUI, SaveMemoryToolUI } from "@/components/tool-ui/user-memory";
// Crypto Tool UI Components - Conversational Crypto Advisor
import {
TokenAnalysisToolUI,
WatchlistDisplayToolUI,
ActionConfirmationToolUI,
AlertConfigurationToolUI,
ProactiveAlertToolUI,
TrendingTokensToolUI,
WhaleActivityToolUI,
MarketOverviewToolUI,
HolderAnalysisToolUI,
PortfolioDisplayToolUI,
UserProfileToolUI,
// Real-time crypto tools (Hybrid approach: RAG + Real-time)
LiveTokenPriceToolUI,
LiveTokenDataToolUI,
} from "@/components/tool-ui/crypto";
import { Spinner } from "@/components/ui/spinner";
import { useChatSessionStateSync } from "@/hooks/use-chat-session-state";
import { useMessagesElectric } from "@/hooks/use-messages-electric";
@ -1458,6 +1475,21 @@ export default function NewChatPage() {
<ScrapeWebpageToolUI />
<SaveMemoryToolUI />
<RecallMemoryToolUI />
{/* Crypto Tool UI Components - Conversational Crypto Advisor */}
<TokenAnalysisToolUI />
<WatchlistDisplayToolUI />
<ActionConfirmationToolUI />
<AlertConfigurationToolUI />
<ProactiveAlertToolUI />
<TrendingTokensToolUI />
<WhaleActivityToolUI />
<MarketOverviewToolUI />
<HolderAnalysisToolUI />
<PortfolioDisplayToolUI />
<UserProfileToolUI />
{/* Real-time Crypto Tools - Hybrid approach (RAG + Real-time) */}
<LiveTokenPriceToolUI />
<LiveTokenDataToolUI />
{/* <WriteTodosToolUI /> Disabled for now */}
<div className="flex flex-col h-[calc(100vh-64px)] overflow-hidden">
<Thread