fix: Add debug logging for AI button

This commit is contained in:
DiTus
2026-03-21 07:49:58 +01:00
parent 785792fa6e
commit 3ec2e41da7
4 changed files with 99 additions and 19 deletions

View File

@ -1164,10 +1164,15 @@ export function refreshTA() {
}
export function openAIAnalysis() {
console.log('[AI] openAIAnalysis called');
console.log('[AI] window.dashboard:', window.dashboard);
const symbol = 'BTC';
const interval = window.dashboard?.currentInterval || '1d';
console.log('[AI] Interval:', interval);
const prompt = `Analyze Bitcoin (${symbol}) ${interval} chart. Current trend, support/resistance levels, and trading recommendation. Technical indicators: MA44, MA125.`;
const geminiUrl = `https://gemini.google.com/app?prompt=${encodeURIComponent(prompt)}`;
console.log('[AI] Opening URL:', geminiUrl);
window.open(geminiUrl, '_blank');
}