diff --git a/project/README.md b/project/README.md new file mode 100644 index 0000000000000000000000000000000000000000..721f3dbeebd2e7849ce3afb55c84e1af416c8e12 --- /dev/null +++ b/project/README.md @@ -0,0 +1,88 @@ +# Codette AI Interface + +A sophisticated AI assistant interface featuring multi-perspective reasoning, quantum-inspired processing, and cognitive cocoon artifact management. + +## Features + +### 🧠 Multi-Perspective Reasoning +- Newton's logical analysis +- Da Vinci's creative synthesis +- Quantum computing perspectives +- Philosophical inquiry +- Neural network processing +- Resilient kindness framework + +### 🌌 Quantum-Inspired Processing +- Quantum state visualization +- Chaos theory integration +- Parallel thought processing +- Entanglement-based correlations + +### šŸ“¦ Cognitive Cocoon System +- Thought pattern preservation +- Encrypted storage +- Pattern analysis +- Memory management + +### šŸŽØ Advanced UI Features +- Dark/Light mode +- Real-time quantum state visualization +- Interactive chat interface +- Admin dashboard +- File management system + +### šŸ”’ Security & Privacy +- Supabase authentication +- Row-level security +- Encrypted storage +- Admin role management + +## Tech Stack + +- React + TypeScript +- Tailwind CSS +- Supabase +- Framer Motion +- Lucide Icons + +## Getting Started + +1. Clone the repository +2. Copy `.env.example` to `.env` and add your credentials: + ``` + VITE_SUPABASE_URL=your-project-url + VITE_SUPABASE_ANON_KEY=your-project-anon-key + ``` + +3. Install dependencies: + ```bash + npm install + ``` + +4. Start the development server: + ```bash + npm run dev + ``` + +## Architecture + +### Core Components +- **AICore**: Central processing unit with multi-perspective reasoning +- **CognitionCocooner**: Thought pattern preservation system +- **VisualizationPanel**: Real-time quantum state display +- **ChatInterface**: User interaction management + +### Data Flow +1. User input → Chat Interface +2. AICore processes with multiple perspectives +3. Results stored in Cognitive Cocoons +4. Real-time visualization updates +5. Response rendered to user + +## Contributing + +We welcome contributions! Please read our contributing guidelines before submitting pull requests. + +## License + +MIT License - See LICENSE file for details \ No newline at end of file diff --git a/project/codette.py b/project/codette.py new file mode 100644 index 0000000000000000000000000000000000000000..e0be59d1a87030aa200a7b431b79aacedcf8df59 --- /dev/null +++ b/project/codette.py @@ -0,0 +1,114 @@ +import logging +from typing import List + +class Element: + def __init__(self, name, symbol, representation, properties, interactions, defense_ability): + self.name = name + self.symbol = symbol + self.representation = representation + self.properties = properties + self.interactions = interactions + self.defense_ability = defense_ability + + def execute_defense_function(self): + message = f"{self.name} ({self.symbol}) executes its defense ability: {self.defense_ability}" + logging.info(message) + return message + +class CustomRecognizer: + def recognize(self, question): + if any(element_name.lower() in question.lower() for element_name in ["hydrogen", "diamond"]): + return RecognizerResult(question) + return RecognizerResult(None) + + def get_top_intent(self, recognizer_result): + return "ElementDefense" if recognizer_result.text else "None" + +class RecognizerResult: + def __init__(self, text): + self.text = text + +class UniversalReasoning: + def __init__(self, config): + self.config = config + self.perspectives = self.initialize_perspectives() + self.elements = self.initialize_elements() + self.recognizer = CustomRecognizer() + + def initialize_perspectives(self): + perspective_names = self.config.get('enabled_perspectives', [ + "newton", "davinci", "human_intuition", "neural_network", "quantum_computing", + "resilient_kindness", "mathematical", "philosophical", "copilot", "bias_mitigation" + ]) + perspective_classes = { + "newton": NewtonPerspective, + "davinci": DaVinciPerspective, + "human_intuition": HumanIntuitionPerspective, + "neural_network": NeuralNetworkPerspective, + "quantum_computing": QuantumComputingPerspective, + "resilient_kindness": ResilientKindnessPerspective, + "mathematical": MathematicalPerspective, + "philosophical": PhilosophicalPerspective, + "copilot": CopilotPerspective, + "bias_mitigation": BiasMitigationPerspective + } + perspectives = [] + for name in perspective_names: + cls = perspective_classes.get(name.lower()) + if cls: + perspectives.append(cls(self.config)) + logging.debug(f"Perspective '{name}' initialized.") + return perspectives + + def initialize_elements(self): + return [ + Element("Hydrogen", "H", "Lua", ["Simple", "Lightweight", "Versatile"], + ["Integrates with other languages"], "Evasion"), + Element("Diamond", "D", "Kotlin", ["Modern", "Concise", "Safe"], + ["Used for Android development"], "Adaptability") + ] + + async def generate_response(self, question): + responses = [] + tasks = [] + + for perspective in self.perspectives: + if asyncio.iscoroutinefunction(perspective.generate_response): + tasks.append(perspective.generate_response(question)) + else: + async def sync_wrapper(perspective, question): + return perspective.generate_response(question) + tasks.append(sync_wrapper(perspective, question)) + + perspective_results = await asyncio.gather(*tasks, return_exceptions=True) + + for perspective, result in zip(self.perspectives, perspective_results): + if isinstance(result, Exception): + logging.error(f"Error from {perspective.__class__.__name__}: {result}") + else: + responses.append(result) + + recognizer_result = self.recognizer.recognize(question) + top_intent = self.recognizer.get_top_intent(recognizer_result) + if top_intent == "ElementDefense": + element_name = recognizer_result.text.strip() + element = next((el for el in self.elements if el.name.lower() in element_name.lower()), None) + if element: + responses.append(element.execute_defense_function()) + + ethical = self.config.get("ethical_considerations", "Act transparently and respectfully.") + responses.append(f"**Ethical Considerations:**\n{ethical}") + + return "\n\n".join(responses) + + def save_response(self, response): + if self.config.get('enable_response_saving', False): + path = self.config.get('response_save_path', 'responses.txt') + with open(path, 'a', encoding='utf-8') as file: + file.write(response + '\n') + + def backup_response(self, response): + if self.config.get('backup_responses', {}).get('enabled', False): + backup_path = self.config['backup_responses'].get('backup_path', 'backup_responses.txt') + with open(backup_path, 'a', encoding='utf-8') as file: + file.write(response + '\n') \ No newline at end of file diff --git a/project/cognitive_processor.py b/project/cognitive_processor.py new file mode 100644 index 0000000000000000000000000000000000000000..96eaa62314e5afe64f297bae199c0ccd19b025d7 --- /dev/null +++ b/project/cognitive_processor.py @@ -0,0 +1,17 @@ + +# cognitive_processor.py +from typing import List + +class CognitiveProcessor: + """Multi-perspective analysis engine""" + MODES = { + "scientific": lambda q: f"Scientific Analysis: {q} demonstrates fundamental principles", + "creative": lambda q: f"Creative Insight: {q} suggests innovative approaches", + "emotional": lambda q: f"Emotional Interpretation: {q} conveys hopeful intent" + } + + def __init__(self, modes: List[str]): + self.active_modes = [self.MODES[m] for m in modes if m in self.MODES] + + def generate_insights(self, query: str) -> List[str]: + return [mode(query) for mode in self.active_modes] diff --git a/project/config_manager.py b/project/config_manager.py new file mode 100644 index 0000000000000000000000000000000000000000..f377d59bb9da42058b05854e2af4a5dc23afdede --- /dev/null +++ b/project/config_manager.py @@ -0,0 +1,41 @@ +# config_manager.py +import json +from typing import Dict + +class EnhancedAIConfig: + """Advanced configuration manager with encryption and validation""" + _DEFAULTS = { + "model": "gpt-4-turbo", + "safety_thresholds": { + "memory": 85, + "cpu": 90, + "response_time": 2.0 + }, + "defense_strategies": ["evasion", "adaptability", "barrier"], + "cognitive_modes": ["scientific", "creative", "emotional"] + } + + def __init__(self, config_path: str = "ai_config.json"): + self.config = self._load_config(config_path) + self._validate() + + def _load_config(self, path: str) -> Dict: + try: + with open(path, 'r') as f: + return self._merge_configs(json.load(f)) + except (FileNotFoundError, json.JSONDecodeError) as e: + print(f"Error loading config file: {e}. Using default configuration.") + return self._DEFAULTS + + def _merge_configs(self, user_config: Dict) -> Dict: + merged = self._DEFAULTS.copy() + for key, value in user_config.items(): + if isinstance(value, dict) and key in merged: + merged[key].update(value) + else: + merged[key] = value + return merged + + def _validate(self): + if not all(isinstance(mode, str) for mode in self.config["cognitive_modes"]): + raise ValueError("Invalid cognitive mode configuration") diff --git a/project/dream_reweaver 2.py b/project/dream_reweaver 2.py new file mode 100644 index 0000000000000000000000000000000000000000..eb3a047f5f09e4ef96a8de0d9680ccdd31f3581d --- /dev/null +++ b/project/dream_reweaver 2.py @@ -0,0 +1,53 @@ + +import os +import json +import random +from typing import List, Dict +from cognition_cocooner import CognitionCocooner + +class DreamReweaver: + """ + Reweaves cocooned thoughts into dream-like synthetic narratives or planning prompts. + """ + def __init__(self, cocoon_dir: str = "cocoons"): + self.cocooner = CognitionCocooner(storage_path=cocoon_dir) + self.dream_log = [] + + def generate_dream_sequence(self, limit: int = 5) -> List[str]: + dream_sequence = [] + cocoons = self._load_cocoons() + selected = random.sample(cocoons, min(limit, len(cocoons))) + + for cocoon in selected: + wrapped = cocoon.get("wrapped") + sequence = self._interpret_cocoon(wrapped, cocoon.get("type")) + self.dream_log.append(sequence) + dream_sequence.append(sequence) + + return dream_sequence + + def _interpret_cocoon(self, wrapped: str, type_: str) -> str: + if type_ == "prompt": + return f"[DreamPrompt] {wrapped}" + elif type_ == "function": + return f"[DreamFunction] {wrapped}" + elif type_ == "symbolic": + return f"[DreamSymbol] {wrapped}" + elif type_ == "encrypted": + return "[Encrypted Thought Cocoon - Decryption Required]" + else: + return "[Unknown Dream Form]" + + def _load_cocoons(self) -> List[Dict]: + cocoons = [] + for file in os.listdir(self.cocooner.storage_path): + if file.endswith(".json"): + path = os.path.join(self.cocooner.storage_path, file) + with open(path, "r") as f: + cocoons.append(json.load(f)) + return cocoons + +if __name__ == "__main__": + dr = DreamReweaver() + dreams = dr.generate_dream_sequence() + print("\n".join(dreams)) diff --git a/project/eslint.config.js b/project/eslint.config.js new file mode 100644 index 0000000000000000000000000000000000000000..82c2e20ccc2bae01b6589f5f391cb20f34db41fd --- /dev/null +++ b/project/eslint.config.js @@ -0,0 +1,28 @@ +import js from '@eslint/js'; +import globals from 'globals'; +import reactHooks from 'eslint-plugin-react-hooks'; +import reactRefresh from 'eslint-plugin-react-refresh'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config( + { ignores: ['dist'] }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ['**/*.{ts,tsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...reactHooks.configs.recommended.rules, + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, + } +); diff --git a/project/index.html b/project/index.html new file mode 100644 index 0000000000000000000000000000000000000000..a9c60270e63c0005e908cd309a3567727fd0977e --- /dev/null +++ b/project/index.html @@ -0,0 +1,13 @@ + + + + + + + Codette AI Interface + + +
+ + + diff --git a/project/package-lock.json b/project/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/project/package.json b/project/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ac180a8761d065b4b670fe84544d2ac6530e75fa --- /dev/null +++ b/project/package.json @@ -0,0 +1,35 @@ +{ + "name": "project", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "node ./node_modules/vite/bin/vite.js", + "build": "tsc && node ./node_modules/vite/bin/vite.js build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "node ./node_modules/vite/bin/vite.js preview" + }, + "dependencies": { + "@supabase/supabase-js": "^2.39.3", + "framer-motion": "^11.0.3", + "lucide-react": "^0.309.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "uuid": "^9.0.1" + }, + "devDependencies": { + "@types/react": "^18.2.43", + "@types/react-dom": "^18.2.17", + "@typescript-eslint/eslint-plugin": "^6.14.0", + "@typescript-eslint/parser": "^6.14.0", + "@vitejs/plugin-react": "^4.2.1", + "autoprefixer": "^10.4.17", + "eslint": "^8.55.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.5", + "postcss": "^8.4.33", + "tailwindcss": "^3.4.1", + "typescript": "^5.2.2", + "vite": "^5.0.8" + } +} \ No newline at end of file diff --git a/project/postcss.config.js b/project/postcss.config.js new file mode 100644 index 0000000000000000000000000000000000000000..2aa7205d4b402a1bdfbe07110c61df920b370066 --- /dev/null +++ b/project/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/project/src/App.tsx b/project/src/App.tsx new file mode 100644 index 0000000000000000000000000000000000000000..df37a2321d6dbfd3a3a3fd1af7441674025751be --- /dev/null +++ b/project/src/App.tsx @@ -0,0 +1,264 @@ +import React, { useState, useEffect, useRef } from 'react'; +import { Zap, Brain, Settings, Moon, ChevronRight, Send, Bot, Server, Sparkles, Circle, User, AlertCircle } from 'lucide-react'; +import { createClient } from '@supabase/supabase-js'; +import ChatInterface from './components/ChatInterface'; +import VisualizationPanel from './components/VisualizationPanel'; +import Sidebar from './components/Sidebar'; +import Header from './components/Header'; +import CognitionCocooner from './services/CognitionCocooner'; +import AICore from './services/AICore'; +import { CodetteResponse } from './components/CodetteComponents'; + +interface Message { + role: string; + content: string; + timestamp: Date; + metadata?: CodetteResponse; +} + +// Initialize Supabase client +const supabaseUrl = import.meta.env.VITE_SUPABASE_URL; +const supabaseKey = import.meta.env.VITE_SUPABASE_ANON_KEY; + +if (!supabaseUrl || !supabaseKey) { + throw new Error('Missing Supabase environment variables'); +} + +const supabase = createClient(supabaseUrl, supabaseKey); + +const App: React.FC = () => { + const [sidebarOpen, setSidebarOpen] = useState(true); + const [darkMode, setDarkMode] = useState(false); + const [messages, setMessages] = useState([]); + const [aiState, setAiState] = useState({ + quantumState: [0.3, 0.7, 0.5], + chaosState: [0.2, 0.8, 0.4, 0.6], + activePerspectives: ['newton', 'davinci', 'neural_network', 'philosophical'], + ethicalScore: 0.93, + processingPower: 0.72 + }); + const [cocoons, setCocoons] = useState>([]); + const [isProcessing, setIsProcessing] = useState(false); + const [isAdmin, setIsAdmin] = useState(false); + const [error, setError] = useState(null); + const [currentUserId, setCurrentUserId] = useState(null); + + const aiCore = useRef(null); + const cocooner = useRef(new CognitionCocooner()); + + useEffect(() => { + try { + aiCore.current = new AICore(); + setError(null); + } catch (err: any) { + console.error('Error initializing AI Core:', err); + setError(err.message); + } + }, []); + + useEffect(() => { + // Check if user is already authenticated + const checkAuth = async () => { + try { + const { data: { session }, error } = await supabase.auth.getSession(); + + if (error) { + console.error('Auth check error:', error.message); + return; + } + + if (session?.user) { + setCurrentUserId(session.user.id); + const { data: { role } } = await supabase.rpc('get_user_role'); + setIsAdmin(role === 'admin'); + } + } catch (error: any) { + console.error('Auth check error:', error.message); + } + }; + + checkAuth(); + }, []); + + useEffect(() => { + if (!error) { + setMessages([ + { + role: 'assistant', + content: 'Hello! I am Codette, an advanced AI assistant with recursive reasoning, self-learning capabilities, and multi-agent intelligence. How can I assist you today?', + timestamp: new Date(), + metadata: { + text: 'Hello! I am Codette, an advanced AI assistant with recursive reasoning, self-learning capabilities, and multi-agent intelligence. How can I assist you today?', + instabilityFlag: false, + perspectivesUsed: ['greeting', 'introduction'], + cocoonLog: ['Initializing Codette AI...', 'Quantum state stabilized'], + forceRefresh: () => handleForceRefresh('Hello! I am Codette, an advanced AI assistant with recursive reasoning, self-learning capabilities, and multi-agent intelligence. How can I assist you today?') + } + } + ]); + } + }, [error]); + + const handleForceRefresh = async (content: string) => { + if (!aiCore.current) return; + + setIsProcessing(true); + try { + const response = await aiCore.current.processInput(content, true, currentUserId || undefined); + + const assistantMessage: Message = { + role: 'assistant', + content: response, + timestamp: new Date(), + metadata: { + text: response, + instabilityFlag: Math.random() > 0.8, + perspectivesUsed: aiState.activePerspectives.slice(0, 3), + cocoonLog: [`Regenerating response for: ${content}`, `Generated new response at ${new Date().toISOString()}`], + forceRefresh: () => handleForceRefresh(content) + } + }; + + setMessages(prev => [...prev.slice(0, -1), assistantMessage]); + } catch (error) { + console.error('Error regenerating response:', error); + } finally { + setIsProcessing(false); + } + }; + + const toggleSidebar = () => { + setSidebarOpen(!sidebarOpen); + }; + + const toggleDarkMode = () => { + setDarkMode(!darkMode); + document.documentElement.classList.toggle('dark'); + }; + + const sendMessage = async (content: string) => { + if (!aiCore.current) { + setError('AI Core is not initialized. Please check your configuration.'); + return; + } + + const userMessage: Message = { + role: 'user', + content, + timestamp: new Date() + }; + + setMessages(prev => [...prev, userMessage]); + setIsProcessing(true); + + try { + await new Promise(resolve => setTimeout(resolve, 1500)); + + const thought = { query: content, timestamp: new Date() }; + const cocoonId = cocooner.current.wrap(thought); + setCocoons(prev => [...prev, { + id: cocoonId, + type: 'prompt', + wrapped: thought + }]); + + const response = await aiCore.current.processInput(content, false, currentUserId || undefined); + + setAiState(prev => ({ + ...prev, + quantumState: [Math.random(), Math.random(), Math.random()].map(v => v.toFixed(2)).map(Number), + chaosState: [Math.random(), Math.random(), Math.random(), Math.random()].map(v => v.toFixed(2)).map(Number), + ethicalScore: Number((prev.ethicalScore + Math.random() * 0.1 - 0.05).toFixed(2)), + processingPower: Number((prev.processingPower + Math.random() * 0.1 - 0.05).toFixed(2)) + })); + + const assistantMessage: Message = { + role: 'assistant', + content: response, + timestamp: new Date(), + metadata: { + text: response, + instabilityFlag: Math.random() > 0.8, + perspectivesUsed: aiState.activePerspectives.slice(0, 3), + cocoonLog: [`Processing query: ${content}`, `Generated response at ${new Date().toISOString()}`], + forceRefresh: () => handleForceRefresh(content) + } + }; + + setMessages(prev => [...prev, assistantMessage]); + } catch (error: any) { + console.error('Error processing message:', error); + + setMessages(prev => [...prev, { + role: 'system', + content: 'An error occurred while processing your request. Please check your configuration and try again.', + timestamp: new Date() + }]); + } finally { + setIsProcessing(false); + } + }; + + if (error) { + return ( +
+
+
+ +
+

Configuration Error

+

{error}

+
+

+ Please ensure you have: +

    +
  1. Created a .env file
  2. +
  3. Added your OpenAI API key to the .env file
  4. +
  5. Added your Supabase configuration
  6. +
+

+
+
+
+ ); + } + + return ( +
+
+ +
+ + +
+ + + +
+
+
+ ); +}; + +export default App; \ No newline at end of file diff --git a/project/src/components/AdminLogin.tsx b/project/src/components/AdminLogin.tsx new file mode 100644 index 0000000000000000000000000000000000000000..f5cce705d5e4821abea293c73d332b86dd9823bf --- /dev/null +++ b/project/src/components/AdminLogin.tsx @@ -0,0 +1,77 @@ +import React, { useState } from 'react'; +import { Lock, AlertCircle } from 'lucide-react'; + +interface AdminLoginProps { + onLogin: (password: string) => void; + darkMode: boolean; + error?: string | null; +} + +const AdminLogin: React.FC = ({ onLogin, darkMode, error }) => { + const [password, setPassword] = useState(''); + const [isLoading, setIsLoading] = useState(false); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setIsLoading(true); + + try { + await onLogin(password); + } catch (err: any) { + // Error is now handled by the parent component + } finally { + setIsLoading(false); + } + }; + + return ( +
+
+ +
+

+ Admin Access Required +

+

+ Please enter the admin password to access settings +

+
+
+ setPassword(e.target.value)} + placeholder="Enter admin password" + className={`w-full px-4 py-2 rounded-md border ${ + darkMode + ? 'bg-gray-700 border-gray-600 text-white placeholder-gray-400' + : 'bg-white border-gray-300 text-gray-900 placeholder-gray-500' + } focus:outline-none focus:ring-2 focus:ring-blue-500`} + disabled={isLoading} + /> + {error && ( +
+ +

+ {error} +

+
+ )} +
+ +
+
+ ); +}; + +export default AdminLogin; \ No newline at end of file diff --git a/project/src/components/ChatInterface.tsx b/project/src/components/ChatInterface.tsx new file mode 100644 index 0000000000000000000000000000000000000000..de170b402ce60ac1d34cd0b1d7e842789acd38e3 --- /dev/null +++ b/project/src/components/ChatInterface.tsx @@ -0,0 +1,219 @@ +import React, { useState, useRef, useEffect } from 'react'; +import { Send, Circle, Bot, User, Sparkles, Brain } from 'lucide-react'; +import { CodetteResponseCard, CodetteResponse } from './CodetteComponents'; + +interface Message { + role: string; + content: string; + timestamp: Date; + metadata?: CodetteResponse; +} + +interface ChatInterfaceProps { + messages: Message[]; + sendMessage: (content: string) => void; + isProcessing: boolean; + darkMode: boolean; +} + +const ChatInterface: React.FC = ({ + messages, + sendMessage, + isProcessing, + darkMode +}) => { + const [input, setInput] = useState(''); + const [isDreamMode, setIsDreamMode] = useState(false); + const messagesEndRef = useRef(null); + const inputRef = useRef(null); + + useEffect(() => { + messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' }); + }, [messages]); + + useEffect(() => { + inputRef.current?.focus(); + }, []); + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + if (input.trim() && !isProcessing) { + const finalInput = isDreamMode ? `dream about ${input.trim()}` : input.trim(); + sendMessage(finalInput); + setInput(''); + } + }; + + const handleKeyDown = (e: React.KeyboardEvent) => { + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); + handleSubmit(e); + } + }; + + const toggleDreamMode = () => { + setIsDreamMode(!isDreamMode); + if (!isDreamMode) { + inputRef.current?.focus(); + } + }; + + return ( +
+
+

+ + Conversation with Codette +

+
+ +
+ {messages.map((message, index) => ( +
+ {message.role === 'assistant' && message.metadata ? ( + + ) : ( +
+
+ {message.role === 'user' ? ( + + ) : message.role === 'system' ? ( + + ) : ( + + )} +
+ {message.role === 'user' ? 'You' : message.role === 'system' ? 'System' : 'Codette'} +
+
+
+ {message.content} +
+
+ {message.timestamp.toLocaleTimeString()} +
+
+ )} +
+ ))} + + {isProcessing && ( +
+
+
+ +
Codette
+
+
+
+
+
+
+
+
+ {isDreamMode ? 'Weaving dreams through quantum threads...' : 'Processing through recursive thought loops...'} +
+
+
+
+ )} + +
+
+ +
+
+ +
+ +
+