feat(detection): implement multi-page token detection system

- Add extractTwitterTokens() to detect $TOKEN mentions (e.g., $BONK, $SOL)
- Add extractContractAddresses() for Solana (base58) and Ethereum (0x) addresses
- Add extractTradingPairs() to detect TOKEN/SOL, TOKEN/USDT patterns
- Update extractPageContext() to use new detection functions
- Add detectedTokens field to PageContext interface
- Create DetectedTokensList component to display detected tokens
- Integrate DetectedTokensList into ChatInterface
- Add handleDetectedTokenClick to analyze selected tokens
- Support auto-detection on Twitter, generic pages, and DexScreener

Implements Task 2: Multi-Page Token Detection
Part of hybrid token detection system (manual search + auto-detect)
This commit is contained in:
API Test Bot 2026-02-04 10:55:49 +07:00
parent cb879fca37
commit e89824db0f
4 changed files with 251 additions and 0 deletions

View file

@ -23,6 +23,8 @@ export interface PageContext {
title: string;
pageType: PageType;
tokenData?: TokenData;
/** Detected tokens from page content (Twitter mentions, addresses, pairs) */
detectedTokens?: TokenData[];
}
interface PageContextValue {