Phase 2 complete.

This commit is contained in:
Aodhan Collins
2025-10-06 21:08:25 +01:00
parent 66749a5ce7
commit 8d6a681baa
26 changed files with 3163 additions and 164 deletions

View File

@@ -5,6 +5,7 @@ import { ChatInterface } from './components/ChatInterface'
import { ModelSelector } from './components/ModelSelector'
import { CharacterSelector } from './components/CharacterSelector'
import { SettingsPanel } from './components/SettingsPanel'
import { WindowControls } from './components/WindowControls'
import { useSettingsStore } from './stores/settingsStore'
import { getThemeManager } from './lib/theme'
import './App.css'
@@ -28,15 +29,30 @@ function App() {
// Fetch API keys from the backend on app load
async function fetchEnvKeys() {
try {
console.log('🔑 Fetching API keys from backend...')
const keys = await invoke<Keys>('get_env_keys')
console.log('🔑 Keys received from backend:', {
hasOpenRouter: !!keys.openrouter_api_key,
hasElevenLabs: !!keys.elevenlabs_api_key,
openRouterLength: keys.openrouter_api_key?.length || 0,
elevenLabsLength: keys.elevenlabs_api_key?.length || 0,
})
if (keys.openrouter_api_key) {
console.log('✅ Setting OpenRouter API key')
setOpenRouterApiKey(keys.openrouter_api_key)
} else {
console.warn('⚠️ No OpenRouter API key found in .env')
}
if (keys.elevenlabs_api_key) {
console.log('✅ Setting ElevenLabs API key')
setElevenLabsApiKey(keys.elevenlabs_api_key)
} else {
console.warn('⚠️ No ElevenLabs API key found in .env')
}
} catch (error) {
console.error('Failed to fetch env keys from backend:', error)
console.error('Failed to fetch env keys from backend:', error)
}
}
@@ -45,6 +61,8 @@ function App() {
return (
<div className="h-screen flex flex-col bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
{/* Window Controls (invisible, handles minimize to tray) */}
<WindowControls />
{/* Header */}
<header className="flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700 bg-white/50 dark:bg-gray-800/50 backdrop-blur-sm">
<div className="flex items-center gap-3">