Repository Public MIT
1<!DOCTYPE html>2<html lang="fr">3<head>4 <meta charset="UTF-8">5 <meta name="viewport" content="width=device-width, initial-scale=1.0">6 <title>VQuant — Configuration</title>7 <link rel="stylesheet" href="setup.css">8</head>9<body>10 <div class="drag-region"></div>1112 <div class="container">13 <div class="header">14 <div class="logo">15 <svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">16 <path d="m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"/>17 <path d="M5 3v4"/><path d="M19 17v4"/><path d="M3 5h4"/><path d="M17 19h4"/>18 </svg>19 </div>20 <h1>VQuant</h1>21 <p class="subtitle">Financial Intelligence Platform</p>22 </div>2324 <div class="description">25 <p>Configurez vos cles API pour demarrer. Les cles requises sont necessaires pour utiliser VQuant.</p>26 </div>2728 <form id="setup-form">29 <div class="section">30 <h2>31 <span class="badge required">Requises</span>32 Cles API principales33 </h2>3435 <div class="field">36 <label for="anthropic">Anthropic (Claude AI)</label>37 <input type="password" id="anthropic" placeholder="sk-ant-api03-..." autocomplete="off" spellcheck="false" />38 <span class="hint">Obtenez votre cle sur <a href="#" onclick="openLink('https://console.anthropic.com/')">console.anthropic.com</a></span>39 </div>4041 <div class="field">42 <label for="fmp">Financial Modeling Prep</label>43 <input type="password" id="fmp" placeholder="Votre cle FMP..." autocomplete="off" spellcheck="false" />44 <span class="hint">Obtenez votre cle sur <a href="#" onclick="openLink('https://financialmodelingprep.com/developer')">financialmodelingprep.com</a></span>45 </div>46 </div>4748 <div class="section">49 <h2>50 <span class="badge optional">Optionnelles</span>51 Recherche web & extras52 </h2>5354 <div class="collapsible" id="optional-toggle">55 <button type="button" class="collapsible-btn" onclick="toggleOptional()">56 <span>Afficher les cles optionnelles</span>57 <svg class="chevron" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>58 </button>59 </div>6061 <div class="optional-fields" id="optional-fields" style="display: none;">62 <div class="field">63 <label for="tavily">Tavily (Recherche web)</label>64 <input type="password" id="tavily" placeholder="tvly-..." autocomplete="off" spellcheck="false" />65 </div>66 <div class="field">67 <label for="firecrawl">Firecrawl (Web scraping)</label>68 <input type="password" id="firecrawl" placeholder="fc-..." autocomplete="off" spellcheck="false" />69 </div>70 <div class="field">71 <label for="exa">Exa (Recherche semantique)</label>72 <input type="password" id="exa" placeholder="Votre cle Exa..." autocomplete="off" spellcheck="false" />73 </div>74 <div class="field">75 <label for="serpapi">SerpAPI (Google Search)</label>76 <input type="password" id="serpapi" placeholder="Votre cle SerpAPI..." autocomplete="off" spellcheck="false" />77 </div>78 <div class="field">79 <label for="elevenlabs">ElevenLabs (Speech-to-text)</label>80 <input type="password" id="elevenlabs" placeholder="Votre cle ElevenLabs..." autocomplete="off" spellcheck="false" />81 </div>82 </div>83 </div>8485 <div id="error-message" class="error" style="display: none;"></div>8687 <div id="loading-state" class="loading" style="display: none;">88 <div class="spinner"></div>89 <span>Demarrage du serveur VQuant...</span>90 </div>9192 <button type="submit" id="submit-btn" class="submit-btn">93 Demarrer VQuant94 </button>95 </form>9697 <div class="footer">98 <span>VQuant Desktop</span>99 <span id="version"></span>100 </div>101 </div>102103 <script>104 function openLink(url) {105 if (window.vquant) {106 window.vquant.openExternal(url);107 }108 }109110 function toggleOptional() {111 const fields = document.getElementById('optional-fields');112 const btn = document.querySelector('.collapsible-btn span');113 const chevron = document.querySelector('.chevron');114 if (fields.style.display === 'none') {115 fields.style.display = 'block';116 btn.textContent = 'Masquer les cles optionnelles';117 chevron.style.transform = 'rotate(180deg)';118 } else {119 fields.style.display = 'none';120 btn.textContent = 'Afficher les cles optionnelles';121 chevron.style.transform = 'rotate(0deg)';122 }123 }124125 async function init() {126 if (!window.vquant) return;127128 const version = await window.vquant.getAppVersion();129 document.getElementById('version').textContent = `v${version}`;130131 const keys = await window.vquant.getApiKeys();132 if (keys.ANTHROPIC_API_KEY) document.getElementById('anthropic').value = keys.ANTHROPIC_API_KEY;133 if (keys.FMP_API_KEY) document.getElementById('fmp').value = keys.FMP_API_KEY;134 if (keys.TAVILY_API_KEY) document.getElementById('tavily').value = keys.TAVILY_API_KEY;135 if (keys.FIRECRAWL_API_KEY) document.getElementById('firecrawl').value = keys.FIRECRAWL_API_KEY;136 if (keys.EXA_API_KEY) document.getElementById('exa').value = keys.EXA_API_KEY;137 if (keys.SERPAPI_API_KEY) document.getElementById('serpapi').value = keys.SERPAPI_API_KEY;138 if (keys.ELEVENLABS_API_KEY) document.getElementById('elevenlabs').value = keys.ELEVENLABS_API_KEY;139140 const theme = await window.vquant.getTheme();141 document.body.setAttribute('data-theme', theme);142143 window.vquant.onSetupStatus((status) => {144 if (status === 'starting-server') {145 document.getElementById('loading-state').style.display = 'flex';146 document.getElementById('submit-btn').disabled = true;147 }148 });149 }150151 document.getElementById('setup-form').addEventListener('submit', async (e) => {152 e.preventDefault();153154 const anthropic = document.getElementById('anthropic').value.trim();155 const fmp = document.getElementById('fmp').value.trim();156157 if (!anthropic || !fmp) {158 const error = document.getElementById('error-message');159 error.textContent = 'Les cles Anthropic et FMP sont requises.';160 error.style.display = 'block';161 return;162 }163164 document.getElementById('error-message').style.display = 'none';165 document.getElementById('loading-state').style.display = 'flex';166 document.getElementById('submit-btn').disabled = true;167 document.getElementById('submit-btn').textContent = 'Demarrage...';168169 const keys = {170 ANTHROPIC_API_KEY: anthropic,171 FMP_API_KEY: fmp,172 TAVILY_API_KEY: document.getElementById('tavily').value.trim(),173 FIRECRAWL_API_KEY: document.getElementById('firecrawl').value.trim(),174 EXA_API_KEY: document.getElementById('exa').value.trim(),175 SERPAPI_API_KEY: document.getElementById('serpapi').value.trim(),176 ELEVENLABS_API_KEY: document.getElementById('elevenlabs').value.trim(),177 };178179 const result = await window.vquant.saveApiKeys(keys);180181 if (!result.success) {182 document.getElementById('loading-state').style.display = 'none';183 document.getElementById('submit-btn').disabled = false;184 document.getElementById('submit-btn').textContent = 'Demarrer VQuant';185 const error = document.getElementById('error-message');186 error.textContent = `Erreur: ${result.error}`;187 error.style.display = 'block';188 }189 });190191 init();192 </script>193</body>194</html>195