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Z,EAAW,GAD1BrG,CAEV,EACJ,EACJ,QACCrB,GAAA,EAAc,GACnB,EACAlI,MAACqK,GAAA,CAAU,cAAc,SAAS,GACtC,EACJ,EACArK,MAACuK,GAAA,CAAe,OAAQwF,EAAsB,QAAS,IAAMC,EAAsB,EAAK,EAAG,SAAUK,CAAA,CAAkB,GAC3H,GACJ,QAzBQlD,GAAA,EAAU,CA2BtB,EC5JMuD,GAAc,SAAS,eAAe,MAAM,EAClD,GAAI,CAACA,GACH,MAAM,IAAI,MAAM,yCAAyC,EAG3D,MAAMpX,GAAOqX,GAAS,WAAWD,EAAW,EAC5CpX,GAAK,OACH0G,MAACiF,EAAM,WAAN,CACC,eAACiB,GAAA,CACC,SAAAlG,MAAC2P,GAAA,EAAI,EACP,EACF,CACF","names":["isTelemetryEnabled","sanitizePayload","payload","sanitized","key","value","logEvent","eventName","logError","error","context","measurePerformance","metricName","operation","start","result","duration","octokitInstance","getOctokit","logout","getRepos","octokit","data","deleteRepo","owner","repo","getRepoTree","repoData","defaultBranch","branch","treeSha","treeData","root","item","pathParts","currentNode","part","index","childNode","child","isLastPart","getFileContent","path","content","commitFiles","files","message","refData","latestCommitSha","commitData","baseTreeSha","blobPromises","file","tree","blob","newTree","newCommit","API_KEY","ai","GoogleGenAI","streamContent","prompt","systemInstruction","temperature","response","chunk","generateJson","schema","generateCommitMessageStream","diff","generateUnitTestsStream","code","formatCodeStream","transcribeAudioToCodeStream","base64Audio","mimeType","transferCodeStyleStream","args","generateCodingChallengeStream","_","reviewCodeStream","generateChangelogFromLogStream","log","summarizeNotesStream","notes","migrateCodeStream","from","to","debugErrorStream","explainCodeStructured","Type","generatePrSummaryStructured","generateFeature","generateCronFromDescription","description","generateColorPalette","baseColor","getInferenceFunction","functionDeclarations","knowledgeBase","functionCalls","parts","_c","_b","_a","generateImage","DB_NAME","DB_VERSION","STORE_NAME","dbPromise","openDB","db","saveFile","getAllFiles","clearAllFiles","arrayBufferToBase64","buffer","binary","bytes","len","i","blobToBase64","resolve","reject","reader","downloadFile","filename","url","a","FEATURE_TAXONOMY","lazyWithRetry","componentImport","exportName","lazy","module","IconWrapper","children","className","jsx","CpuChipIcon","DocumentIcon","FolderIcon","LinkIcon","ClipboardDocumentIcon","ArrowDownTrayIcon","XMarkIcon","TrashIcon","Cog6ToothIcon","HomeIcon","ArrowLeftOnRectangleIcon","FileCodeIcon","GitBranchIcon","SparklesIcon","EyeIcon","MapIcon","BeakerIcon","CommandLineIcon","LockClosedIcon","CodeBracketSquareIcon","PhotoIcon","BellIcon","ChartBarIcon","BugAntIcon","ArrowPathIcon","DocumentTextIcon","MicrophoneIcon","CommandCenterIcon","jsxs","ProjectExplorerIcon","ConnectionsIcon","CodeExplainerIcon","FeatureBuilderIcon","CodeMigratorIcon","ThemeDesignerIcon","SnippetVaultIcon","DigitalWhiteboardIcon","UnitTestGeneratorIcon","CommitGeneratorIcon","GitLogAnalyzerIcon","ConcurrencyAnalyzerIcon","RegexSandboxIcon","PromptCraftPadIcon","CodeFormatterIcon","JsonTreeIcon","XbrlConverterIcon","CssGridEditorIcon","SchemaDesignerIcon","PwaManifestEditorIcon","MarkdownSlidesIcon","ScreenshotToComponentIcon","TypographyLabIcon","SvgPathEditorIcon","StyleTransferIcon","CodingChallengeIcon","CodeReviewBotIcon","AiPullRequestAssistantIcon","ChangelogGeneratorIcon","CronJobBuilderIcon","AsyncCallTreeIcon","AudioToCodeIcon","CodeDiffGhostIcon","CodeSpellCheckerIcon","ColorPaletteGeneratorIcon","LogicFlowBuilderIcon","MetaTagEditorIcon","NetworkVisualizerIcon","ResponsiveTesterIcon","SassCompilerIcon","ImageGeneratorIcon","GithubIcon","LoadingSpinner","MarkdownRenderer","sanitizedHtml","setSanitizedHtml","useState","useEffect","html","marked","ErrorBoundary","React","props","stream","fullResponse","e","errorInfo","initialState","reducer","state","action","featureId","newHiddenFeatures","id","GlobalStateContext","createContext","LOCAL_STORAGE_KEY","CONSENT_KEY","GlobalStateProvider","canPersist","dispatch","useReducer","initial","storedStateJSON","storedState","hydratedState","handler","stateToSave","useGlobalState","useContext","RAW_FEATURES","f","componentMap","__vitePreload","AiCommandCenter$1","ProjectExplorer$1","Connections$1","aiConfigMap","ALL_FEATURES","feature","FEATURES_MAP","CommitModal","fileCount","repoName","onCommit","onClose","isLoading","commitMessage","setCommitMessage","handleSubmit","ActionManager","setIsLoading","isCommitModalOpen","setCommitModalOpen","filesToCommit","setFilesToCommit","handleDownloadZip","zip","JSZip","p","currentFolder","folderName","zipBlob","link","handleOpenCommitModal","handleCommit","Fragment","Tooltip","text","LeftSidebar","items","activeView","onNavigate","user","handleLogout","isActive","StatusMessage","status","visible","setVisible","timer","Clock","time","setTime","timerId","StatusBar","bgImageStatus","CommandPalette","isOpen","onSelect","searchTerm","setSearchTerm","selectedIndex","setSelectedIndex","commandOptions","useMemo","navigationCommands","featureCommands","handleKeyDown","prev","selected","useLocalStorage","initialValue","storedValue","setStoredValue","valueToStore","ToggleSwitch","checked","onChange","SettingsView","setSnippets","setNotes","setDevNotes","handleClearGeneratedFiles","handleClearSnippets","handleClearNotes","isVisible","ExamplePromptButton","onClick","AiCommandCenter","setPrompt","lastResponse","setLastResponse","handleCommand","useCallback","call","name","err","handleExampleClick","CLIENT_ID","REDIRECT_URI","LoginView","handleLogin","githubAuthURL","FileTree","node","onFileSelect","level","setIsOpen","isFolder","handleToggle","handleFileClick","b","ProjectExplorer","selectedRepo","projectFiles","activeFileContent","setActiveFileContent","activeFilePath","setActiveFilePath","setError","handleFileSelect","ConnectionCard","icon","isConnected","userLogin","onDisconnect","RepoSelector","repos","setRepos","handleSelectRepo","fullName","handleDeleteRepo","r","Connections","isGithubConnected","handleDisconnectGitHub","LoadingIndicator","LocalStorageConsentModal","onAccept","onDecline","App","viewProps","hiddenFeatures","isAuthenticated","isCommandPaletteOpen","setCommandPaletteOpen","showConsentModal","setShowConsentModal","handleAcceptConsent","handleDeclineConsent","handleViewChange","view","sidebarItems","ActiveComponent","Suspense","rootElement","ReactDOM"],"ignoreList":[],"sources":["../../services/index.ts","../../components/icons.tsx","../../components/shared/index.tsx","../../components/ErrorBoundary.tsx","../../contexts/GlobalStateContext.tsx","../../services/telemetryService.ts","../../constants.ts","../../components/features/index.ts","../../components/ActionManager.tsx","../../components/LeftSidebar.tsx","../../components/StatusBar.tsx","../../components/CommandPalette.tsx","../../hooks/useLocalStorage.ts","../../components/SettingsView.tsx","../../components/features/AiCommandCenter.tsx","../../components/LoginView.tsx","../../components/features/ProjectExplorer.tsx","../../components/features/Connections.tsx","../../App.tsx","../../index.tsx"],"sourcesContent":["import React, { lazy } from 'react';\nimport { Octokit } from 'octokit';\nimport { openDB, DBSchema } from 'idb';\nimport { GoogleGenAI, Type, GenerateContentResponse, FunctionDeclaration } from \"@google/genai\";\nimport type { User, Repo, FileNode, GeneratedFile, StructuredPrSummary, StructuredExplanation, ColorTheme } from '../types.ts';\n\n// --- Telemetry Service ---\nconst isTelemetryEnabled = true;\n\nconst sanitizePayload = (payload: Record<string, any>): Record<string, any> => {\n const sanitized: Record<string, any> = {};\n for (const key in payload) {\n if (Object.prototype.hasOwnProperty.call(payload, key)) {\n const value = payload[key];\n if (typeof value === 'string' && value.length > 500) {\n sanitized[key] = `${value.substring(0, 100)}... (truncated)`;\n } else {\n sanitized[key] = value;\n }\n }\n }\n return sanitized;\n};\n\nexport const logEvent = (eventName: string, payload: Record<string, any> = {}) => {\n if (!isTelemetryEnabled) return;\n console.log(`%c[TELEMETRY EVENT]%c ${eventName}`, 'color: #84cc16; font-weight: bold;', 'color: inherit;', sanitizePayload(payload));\n};\n\nexport const logError = (error: Error, context: Record<string, any> = {}) => {\n if (!isTelemetryEnabled) return;\n console.error(`%c[TELEMETRY ERROR]%c ${error.message}`, 'color: #ef4444; font-weight: bold;', 'color: inherit;', { error, context: sanitizePayload(context), stack: error.stack });\n};\n\nexport const measurePerformance = async <T>(metricName: string, operation: () => Promise<T>): Promise<T> => {\n const start = performance.now();\n try {\n const result = await operation();\n const end = performance.now();\n const duration = end - start;\n if (isTelemetryEnabled) {\n console.log(`%c[TELEMETRY PERF]%c ${metricName}`, 'color: #3b82f6; font-weight: bold;', 'color: inherit;', { duration: `${duration.toFixed(2)}ms` });\n }\n return result;\n } catch (error) {\n const end = performance.now();\n const duration = end - start;\n if (isTelemetryEnabled) {\n console.warn(`%c[TELEMETRY PERF FAILED]%c ${metricName}`, 'color: #f97316; font-weight: bold;', 'color: inherit;', { duration: `${duration.toFixed(2)}ms`, error });\n }\n throw error;\n }\n};\n\n\n// --- Auth Service ---\nconst TOKEN_EXCHANGE_PROXY_URL = 'https://citibankdemobusiness.dev/oauth/callback.php';\n\ninterface AuthResult {\n user: User;\n token: string;\n}\n\nlet octokitInstance: Octokit | null = null;\n\nconst getAccessToken = async (code: string): Promise<string> => {\n logEvent('auth_token_exchange_start');\n const response = await fetch(`${TOKEN_EXCHANGE_PROXY_URL}?code=${code}`, { method: 'GET', headers: { 'Accept': 'application/json' } });\n if (!response.ok) {\n const errorBody = await response.text();\n logError(new Error(`Token exchange failed: ${response.status}`), { context: 'getAccessToken', errorBody });\n throw new Error(`Token exchange failed with status ${response.status}. Please check the proxy endpoint.`);\n }\n const data = await response.json();\n if (data.error || !data.access_token) {\n logError(new Error('Invalid token response from proxy'), { context: 'getAccessToken', responseData: data });\n throw new Error(data.error_description || 'Backend proxy failed to retrieve a valid access token.');\n }\n logEvent('auth_token_exchange_success');\n return data.access_token;\n};\n\nconst initializeOctokit = (token: string): void => {\n octokitInstance = new Octokit({ auth: token, request: { headers: { 'X-GitHub-Api-Version': '2022-11-28' } } });\n logEvent('octokit_initialized');\n};\n\nexport const getOctokit = (): Octokit => {\n if (!octokitInstance) { throw new Error(\"Octokit has not been initialized. Please authenticate first.\"); }\n return octokitInstance;\n};\n\nexport const handleGitHubCallback = async (code: string): Promise<AuthResult> => {\n return measurePerformance('handleGitHubCallback', async () => {\n try {\n const token = await getAccessToken(code);\n initializeOctokit(token);\n const octokit = getOctokit();\n logEvent('fetch_user_profile_start');\n const { data: user } = await octokit.request('GET /user');\n logEvent('fetch_user_profile_success', { username: user.login });\n return { user: user as unknown as User, token };\n } catch (error) {\n logError(error as Error, { context: 'handleGitHubCallback', code });\n throw new Error(`Authentication failed: ${(error as Error).message}`);\n }\n });\n};\n\nexport const checkSession = async (token: string | null): Promise<AuthResult | null> => {\n if (!token) return null;\n return measurePerformance('checkSession', async () => {\n logEvent('session_check_start');\n try {\n initializeOctokit(token);\n const octokit = getOctokit();\n const { data: user } = await octokit.request('GET /user');\n logEvent('session_check_success', { username: user.login });\n return { user: user as unknown as User, token };\n } catch (error) {\n logError(error as Error, { context: 'checkSession', message: \"Token validation failed, session is invalid.\" });\n octokitInstance = null;\n return null;\n }\n });\n};\n\nexport const logout = async (): Promise<void> => {\n logEvent('logout');\n octokitInstance = null;\n return Promise.resolve();\n};\n\n// --- GitHub Service ---\nexport const getRepos = async (): Promise<Repo[]> => {\n return measurePerformance('getRepos', async () => {\n logEvent('getRepos_start');\n try {\n const octokit = getOctokit();\n const { data } = await octokit.request('GET /user/repos', { type: 'owner', sort: 'updated', per_page: 100 });\n logEvent('getRepos_success', { count: data.length });\n return data as Repo[];\n } catch (error) {\n logError(error as Error, { context: 'getRepos' });\n throw new Error(`Failed to fetch repositories: ${(error as Error).message}`);\n }\n });\n};\n\nexport const deleteRepo = async (owner: string, repo: string): Promise<void> => {\n return measurePerformance('deleteRepo', async () => {\n logEvent('deleteRepo_start', { owner, repo });\n try {\n const octokit = getOctokit();\n await octokit.request('DELETE /repos/{owner}/{repo}', { owner, repo });\n logEvent('deleteRepo_success', { owner, repo });\n } catch (error) {\n logError(error as Error, { context: 'deleteRepo', owner, repo });\n throw new Error(`Failed to delete repository: ${(error as Error).message}`);\n }\n });\n};\n\nexport const getRepoTree = async (owner: string, repo: string): Promise<FileNode> => {\n return measurePerformance('getRepoTree', async () => {\n logEvent('getRepoTree_start', { owner, repo });\n try {\n const octokit = getOctokit();\n const { data: repoData } = await octokit.request('GET /repos/{owner}/{repo}', { owner, repo });\n const defaultBranch = repoData.default_branch;\n const { data: branch } = await octokit.request('GET /repos/{owner}/{repo}/branches/{branch}', { owner, repo, branch: defaultBranch });\n const treeSha = branch.commit.commit.tree.sha;\n const { data: treeData } = await octokit.request('GET /repos/{owner}/{repo}/git/trees/{tree_sha}', { owner, repo, tree_sha: treeSha, recursive: 'true' });\n const root: FileNode = { name: repo, type: 'folder', path: '', children: [] };\n treeData.tree.forEach((item: any) => {\n if (!item.path) return;\n const pathParts = item.path.split('/');\n let currentNode = root;\n pathParts.forEach((part, index) => {\n if (!currentNode.children) { currentNode.children = []; }\n let childNode = currentNode.children.find(child => child.name === part);\n if (!childNode) {\n const isLastPart = index === pathParts.length - 1;\n childNode = { name: part, path: pathParts.slice(0, index + 1).join('/'), type: isLastPart ? (item.type === 'tree' ? 'folder' : 'file') : 'folder' };\n if (childNode.type === 'folder') { childNode.children = []; }\n currentNode.children.push(childNode);\n }\n currentNode = childNode;\n });\n });\n logEvent('getRepoTree_success', { owner, repo, items: treeData.tree.length });\n return root;\n } catch (error) {\n logError(error as Error, { context: 'getRepoTree', owner, repo });\n throw new Error(`Failed to fetch repository tree: ${(error as Error).message}`);\n }\n });\n};\n\nexport const getFileContent = async (owner: string, repo: string, path: string): Promise<string> => {\n return measurePerformance('getFileContent', async () => {\n logEvent('getFileContent_start', { owner, repo, path });\n try {\n const octokit = getOctokit();\n const { data } = await octokit.request('GET /repos/{owner}/{repo}/contents/{path}', { owner, repo, path });\n if (Array.isArray(data) || data.type !== 'file' || typeof data.content !== 'string') { throw new Error(\"Path did not point to a valid file or content was missing.\"); }\n const content = atob(data.content);\n logEvent('getFileContent_success', { owner, repo, path, size: content.length });\n return content;\n } catch (error) {\n logError(error as Error, { context: 'getFileContent', owner, repo, path });\n throw new Error(`Failed to fetch file content for \"${path}\": ${(error as Error).message}`);\n }\n });\n};\n\nexport const commitFiles = async (\n owner: string,\n repo: string,\n files: { filePath: string; content: string }[],\n message: string,\n branch: string = 'main'\n): Promise<string> => {\n return measurePerformance('commitFiles', async () => {\n logEvent('commitFiles_start', { owner, repo, fileCount: files.length, branch });\n const octokit = getOctokit();\n\n try {\n // 1. Get the latest commit SHA of the branch.\n const { data: refData } = await octokit.request('GET /repos/{owner}/{repo}/git/ref/{ref}', {\n owner,\n repo,\n ref: `heads/${branch}`,\n });\n const latestCommitSha = refData.object.sha;\n\n // 2. Get the base tree SHA from that commit.\n const { data: commitData } = await octokit.request('GET /repos/{owner}/{repo}/git/commits/{commit_sha}', {\n owner,\n repo,\n commit_sha: latestCommitSha,\n });\n const baseTreeSha = commitData.tree.sha;\n\n // 3. Create new blob(s) for the file content.\n const blobPromises = files.map(file =>\n octokit.request('POST /repos/{owner}/{repo}/git/blobs', {\n owner,\n repo,\n content: file.content,\n encoding: 'utf-8',\n })\n );\n const blobs = await Promise.all(blobPromises);\n \n // 4. Create the tree object.\n const tree = blobs.map((blob, index) => ({\n path: files[index].filePath,\n mode: '100644' as const, // file mode\n type: 'blob' as const,\n sha: blob.data.sha,\n }));\n\n const { data: newTree } = await octokit.request('POST /repos/{owner}/{repo}/git/trees', {\n owner,\n repo,\n base_tree: baseTreeSha,\n tree,\n });\n\n // 5. Create a new commit pointing to the new tree.\n const { data: newCommit } = await octokit.request('POST /repos/{owner}/{repo}/git/commits', {\n owner,\n repo,\n message,\n tree: newTree.sha,\n parents: [latestCommitSha],\n });\n\n // 6. Update the branch reference to point to the new commit.\n await octokit.request('PATCH /repos/{owner}/{repo}/git/refs/{ref}', {\n owner,\n repo,\n ref: `heads/${branch}`,\n sha: newCommit.sha,\n });\n\n logEvent('commitFiles_success', { commitUrl: newCommit.html_url });\n return newCommit.html_url;\n\n } catch (error) {\n logError(error as Error, { context: 'commitFiles', owner, repo, branch });\n throw new Error(`Failed to commit files: ${(error as Error).message}`);\n }\n });\n};\n\n// --- Gemini Service ---\nconst API_KEY = process.env.GEMINI_API_KEY;\nif (!API_KEY) { throw new Error(\"Gemini API key not found. Please set the GEMINI_API_KEY environment variable.\"); }\nconst ai = new GoogleGenAI({ apiKey: API_KEY });\nconst sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\n\nasync function* streamContent(prompt: string | { parts: any[] }, systemInstruction: string, temperature = 0.5) {\n try {\n const response = await ai.models.generateContentStream({ model: 'gemini-2.5-flash', contents: prompt as any, config: { systemInstruction, temperature } });\n for await (const chunk of response) { yield chunk.text; }\n } catch (error) {\n console.error(\"Error streaming from AI model:\", error);\n logError(error as Error, { prompt, systemInstruction });\n if (error instanceof Error) { yield `An error occurred while communicating with the AI model: ${error.message}`; } else { yield \"An unknown error occurred while generating the response.\"; }\n }\n}\n\nasync function generateContent(prompt: string, systemInstruction: string, temperature = 0.5): Promise<string> {\n try {\n const response = await ai.models.generateContent({ model: 'gemini-2.5-flash', contents: prompt, config: { systemInstruction, temperature } });\n return response.text;\n } catch (error) {\n console.error(\"Error generating content from AI model:\", error);\n logError(error as Error, { prompt, systemInstruction });\n throw error;\n }\n}\n\nasync function generateJson<T>(prompt: string, systemInstruction: string, schema: any, temperature = 0.2): Promise<T> {\n try {\n const response = await ai.models.generateContent({ model: \"gemini-2.5-flash\", contents: prompt, config: { systemInstruction, responseMimeType: \"application/json\", responseSchema: schema, temperature } });\n return JSON.parse(response.text.trim());\n } catch (error) {\n console.error(\"Error generating JSON from AI model:\", error);\n logError(error as Error, { prompt, systemInstruction });\n throw error;\n }\n}\n\nexport const explainCodeStream = (code: string) => streamContent(`Please explain the following code snippet:\\n\\n\\`\\`\\`\\n${code}\\n\\`\\`\\``, \"You are an expert software engineer providing a clear, concise explanation of code.\");\nexport const generateRegExStream = (description: string) => streamContent(`Generate a single valid JavaScript regex literal (e.g., /abc/gi) for the following description. Respond with ONLY the regex literal and nothing else: \"${description}\"`, \"You are an expert in regular expressions. You only output valid JavaScript regex literals.\", 0.7);\nexport const generateCommitMessageStream = (diff: string) => streamContent(`Generate a conventional commit message for the following context of new files being added:\\n\\n${diff}`, \"You are an expert programmer who writes excellent, conventional commit messages. The response should be only the commit message text.\", 0.8);\nexport const generateUnitTestsStream = (code: string) => streamContent(`Generate Vitest unit tests for this React component code:\\n\\n\\`\\`\\`tsx\\n${code}\\n\\`\\`\\``, \"You are a software quality engineer specializing in writing comprehensive and clear unit tests using Vitest and React Testing Library.\", 0.6);\nexport const formatCodeStream = (code: string) => streamContent(`Format this code:\\n\\n\\`\\`\\`javascript\\n${code}\\n\\`\\`\\``, \"You are a code formatter. Your only purpose is to format code. Respond with only the formatted code, enclosed in a single markdown block.\", 0.2);\nexport const generateComponentFromImageStream = (base64Image: string) => streamContent({ parts: [{ text: \"Generate a single-file React component using Tailwind CSS that looks like this image. Respond with only the code in a markdown block.\" }, { inlineData: { mimeType: 'image/png', data: base64Image } }] }, \"You are an expert frontend developer specializing in React and Tailwind CSS. You create clean, functional components from screenshots.\");\nexport const transcribeAudioToCodeStream = (base64Audio: string, mimeType: string) => streamContent({ parts: [{ text: \"Transcribe my speech into a code snippet. If I describe a function or component, write it out.\" }, { inlineData: { mimeType, data: base64Audio } }] }, \"You are an expert programmer. You listen to a user's voice and transcribe their ideas into code.\");\nexport const transferCodeStyleStream = (args: { code: string, styleGuide: string }) => streamContent(`Rewrite the following code to match the provided style guide.\\n\\nStyle Guide:\\n${args.styleGuide}\\n\\nCode to rewrite:\\n\\`\\`\\`\\n${args.code}\\n\\`\\`\\``, \"You are an AI assistant that rewrites code to match a specific style guide. Respond with only the rewritten code in a markdown block.\", 0.3);\nexport const generateCodingChallengeStream = (_: any) => streamContent(`Generate a new, interesting coding challenge suitable for an intermediate developer. Include a clear problem description, one or two examples, and any constraints. Format it in markdown.`, \"You are an AI that creates unique and interesting coding challenges for software developers.\", 0.9);\nexport const reviewCodeStream = (code: string) => streamContent(`Please perform a detailed code review on the following code snippet. Identify potential bugs, suggest improvements for readability and performance, and point out any anti-patterns. Structure your feedback with clear headings.\\n\\n\\`\\`\\`\\n${code}\\n\\`\\`\\``, \"You are a senior software engineer performing a code review. You are meticulous, helpful, and provide constructive feedback.\", 0.6);\nexport const generateChangelogFromLogStream = (log: string) => streamContent(`Analyze this git log and create a changelog:\\n\\n\\`\\`\\`\\n${log}\\n\\`\\`\\``, \"You are a git expert and project manager. Analyze the provided git log and generate a clean, categorized changelog in Markdown format. Group changes under 'Features' and 'Fixes'.\", 0.6);\nexport const enhanceSnippetStream = (code: string) => streamContent(`Enhance this code snippet. Add comments, improve variable names, and refactor for clarity or performance if possible.\\n\\n\\`\\`\\`\\n${code}\\n\\`\\`\\``, \"You are a senior software engineer who excels at improving code. Respond with only the enhanced code in a markdown block.\", 0.5);\nexport const summarizeNotesStream = (notes: string) => streamContent(`Summarize these developer notes into a bulleted list of key points and action items:\\n\\n${notes}`, \"You are a productivity assistant who is an expert at summarizing technical notes.\", 0.7);\nexport const migrateCodeStream = (code: string, from: string, to: string) => streamContent(`Translate this ${from} code to ${to}. Respond with only the translated code in a markdown block.\\n\\n\\`\\`\\`\\n${code}\\n\\`\\`\\``, `You are an expert polyglot programmer who specializes in migrating code between languages and frameworks.`, 0.4);\nexport const analyzeConcurrencyStream = (code: string) => streamContent(`Analyze this JavaScript code for potential concurrency issues, especially related to Web Workers. Identify race conditions, deadlocks, or inefficient data passing.\\n\\n\\`\\`\\`javascript\\n${code}\\n\\`\\`\\``, \"You are an expert in JavaScript concurrency, web workers, and multi-threaded programming concepts.\", 0.6);\nexport const debugErrorStream = (error: Error) => streamContent(`I encountered an error in my React application. Here are the details:\\n \\n Message: ${error.message}\\n \\n Stack Trace:\\n ${error.stack}\\n \\n Please analyze this error. Provide a brief explanation of the likely cause, followed by a bulleted list of potential solutions or debugging steps. Structure your response in clear, concise markdown.`, \"You are an expert software engineer specializing in debugging React applications. You provide clear, actionable advice to help developers solve errors.\");\nexport const convertJsonToXbrlStream = (json: string) => streamContent(`Convert the following JSON to a simplified, XBRL-like XML format. Use meaningful tags based on the JSON keys. The root element should be <xbrl>. Do not include XML declarations or namespaces.\\n\\nJSON:\\n${json}`, \"You are an expert in data formats who converts JSON to clean, XBRL-like XML.\");\nexport const generateUnitTests = (code: string): Promise<string> => generateContent(`Generate Vitest unit tests for this React component code:\\n\\n\\`\\`\\`tsx\\n${code}\\n\\`\\`\\``, \"You are a software quality engineer specializing in writing unit tests. Respond with only the test code in a markdown block.\", 0.6);\nexport const generateCommitMessage = (diff: string): Promise<string> => generateContent(`Generate a commit message for the following context of new files being added:\\n\\n${diff}`, \"You are an expert programmer who writes excellent, conventional commit messages.\", 0.8);\n\nexport const explainCodeStructured = async (code: string): Promise<StructuredExplanation> => generateJson(`Analyze this code: \\n\\n\\`\\`\\`\\n${code}\\n\\`\\`\\``, \"You are an expert software engineer providing a structured analysis of a code snippet.\", { type: Type.OBJECT, properties: { summary: { type: Type.STRING }, lineByLine: { type: Type.ARRAY, items: { type: Type.OBJECT, properties: { lines: { type: Type.STRING }, explanation: { type: Type.STRING } }, required: [\"lines\", \"explanation\"] } }, complexity: { type: Type.OBJECT, properties: { time: { type: Type.STRING }, space: { type: Type.STRING } }, required: [\"time\", \"space\"] }, suggestions: { type: Type.ARRAY, items: { type: Type.STRING } } }, required: [\"summary\", \"lineByLine\", \"complexity\", \"suggestions\"] });\nexport const generateThemeFromDescription = async (description: string): Promise<ColorTheme> => generateJson(`Generate a color theme for: \"${description}\"`, \"You are a UI/UX design expert specializing in color theory. Generate a color theme based on the user's description. Provide hex codes for each color.\", { type: Type.OBJECT, properties: { primary: { type: Type.STRING }, background: { type: Type.STRING }, surface: { type: Type.STRING }, textPrimary: { type: Type.STRING }, textSecondary: { type: Type.STRING } }, required: [\"primary\", \"background\", \"surface\", \"textPrimary\", \"textSecondary\"] });\nexport const generatePrSummaryStructured = (diff: string): Promise<StructuredPrSummary> => generateJson(`Generate a PR summary for the following diff:\\n\\n\\`\\`\\`diff\\n${diff}\\n\\`\\`\\``, \"You are an expert programmer who writes excellent PR summaries.\", { type: Type.OBJECT, properties: { title: { type: Type.STRING }, summary: { type: Type.STRING }, changes: { type: Type.ARRAY, items: { type: Type.STRING } } }, required: [\"title\", \"summary\", \"changes\"] });\nexport const generateFeature = (prompt: string): Promise<GeneratedFile[]> => generateJson(`Generate the files for the following feature request: \"${prompt}\". Make sure to include a .tsx component file.`, \"You are an AI that generates complete, production-ready React components. Create all necessary files (component, styles, etc.).\", { type: Type.ARRAY, items: { type: Type.OBJECT, properties: { filePath: { type: Type.STRING }, content: { type: Type.STRING }, description: { type: Type.STRING } }, required: [\"filePath\", \"content\", \"description\"] } });\nexport interface CronParts { minute: string; hour: string; dayOfMonth: string; month: string; dayOfWeek: string; }\nexport const generateCronFromDescription = (description: string): Promise<CronParts> => generateJson(`Convert this schedule to a cron expression: \"${description}\"`, \"You are an expert in cron expressions. Convert the user's description into a valid cron expression parts.\", { type: Type.OBJECT, properties: { minute: { type: Type.STRING }, hour: { type: Type.STRING }, dayOfMonth: { type: Type.STRING }, month: { type: Type.STRING }, dayOfWeek: { type: Type.STRING } }, required: [\"minute\", \"hour\", \"dayOfMonth\", \"month\", \"dayOfWeek\"] });\nexport const generateColorPalette = (baseColor: string): Promise<{ colors: string[] }> => generateJson(`Generate a harmonious 6-color palette based on the color ${baseColor}.`, \"You are a color theory expert. Generate a 6-color palette based on the given base color.\", { type: Type.OBJECT, properties: { colors: { type: Type.ARRAY, items: { type: Type.STRING } } }, required: [\"colors\"] });\n\nexport interface CommandResponse { text: string; functionCalls?: { name: string; args: any; }[]; }\nexport const getInferenceFunction = async (prompt: string, functionDeclarations: FunctionDeclaration[], knowledgeBase: string): Promise<CommandResponse> => {\n try {\n const response: GenerateContentResponse = await ai.models.generateContent({ model: \"gemini-2.5-flash\", contents: prompt, config: { systemInstruction: `You are a helpful assistant for a developer tool. The user will ask you to perform a task.\\n Based on your knowledge base of available tools, you must decide which function to call to satisfy the user's request.\\n If no specific tool seems appropriate, you can respond with text.\\n \\n Knowledge Base of Available Tools:\\n ${knowledgeBase}`, tools: [{ functionDeclarations }] } });\n const functionCalls: { name: string, args: any }[] = [];\n const parts = response.candidates?.[0]?.content?.parts ?? [];\n for (const part of parts) { if (part.functionCall) { functionCalls.push({ name: part.functionCall.name, args: part.functionCall.args }); } }\n return { text: response.text, functionCalls: functionCalls.length > 0 ? functionCalls : undefined };\n } catch (error) {\n logError(error as Error, { prompt });\n throw error;\n }\n};\n\nexport const generateImage = async (prompt: string): Promise<string> => {\n const API_URL = \"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-preview-image-generation:generateContent\";\n const API_KEY = process.env.GEMINI_API_KEY;\n if (!API_KEY) { throw new Error(\"Gemini API key not found.\"); }\n const body = { \"contents\": [{ \"parts\": [{ \"text\": prompt }] }], \"generationConfig\": { \"responseModalities\": [\"TEXT\", \"IMAGE\"] } };\n const MAX_RETRIES = 3; let lastError: Error | null = null;\n for (let i = 0; i < MAX_RETRIES; i++) {\n try {\n const response = await fetch(API_URL, { method: 'POST', headers: { 'x-goog-api-key': API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify(body) });\n if (!response.ok) { const errorText = await response.text(); throw new Error(`API request failed with status ${response.status}: ${errorText}`); }\n const data = await response.json();\n const imagePart = data.candidates?.[0]?.content?.parts?.find((part: any) => part.inlineData && part.inlineData.mimeType.startsWith('image/'));\n if (imagePart && imagePart.inlineData.data) { return `data:${imagePart.inlineData.mimeType};base64,${imagePart.inlineData.data}`; }\n const textResponse = data.candidates?.[0]?.content?.parts?.find((p: any) => p.text)?.text;\n if (textResponse) { throw new Error(`API returned text instead of an image: ${textResponse}`); }\n throw new Error(\"API response did not contain valid image data.\");\n } catch (error) {\n lastError = error instanceof Error ? error : new Error(String(error));\n logError(lastError, { context: 'generateImageFetch', attempt: i + 1, prompt });\n console.warn(`Attempt ${i + 1} failed. Retrying in ${Math.pow(2, i)}s...`);\n if (i < MAX_RETRIES - 1) { await sleep(1000 * Math.pow(2, i)); }\n }\n }\n throw new Error(`Failed to generate image after ${MAX_RETRIES} attempts. The service may be busy or the prompt may have been blocked. Please try again with a different prompt. Last error: ${lastError?.message}`);\n};\n\n// --- DB Service ---\nconst DB_NAME = 'devcore-db';\nconst DB_VERSION = 1;\nconst STORE_NAME = 'generated-files';\ninterface DevCoreDB extends DBSchema { [STORE_NAME]: { key: string; value: GeneratedFile; indexes: { 'by-filePath': string }; }; }\nconst dbPromise = openDB<DevCoreDB>(DB_NAME, DB_VERSION, { upgrade(db) { const store = db.createObjectStore(STORE_NAME, { keyPath: 'filePath' }); store.createIndex('by-filePath', 'filePath'); } });\nexport const saveFile = async (file: GeneratedFile): Promise<void> => { const db = await dbPromise; await db.put(STORE_NAME, file); };\nexport const getAllFiles = async (): Promise<GeneratedFile[]> => { const db = await dbPromise; return db.getAll(STORE_NAME); };\nexport const clearAllFiles = async (): Promise<void> => { const db = await dbPromise; await db.clear(STORE_NAME); };\n\n// --- File Utils ---\nconst arrayBufferToBase64 = (buffer: ArrayBuffer): string => {\n let binary = ''; const bytes = new Uint8Array(buffer); const len = bytes.byteLength;\n for (let i = 0; i < len; i++) { binary += String.fromCharCode(bytes[i]); }\n return window.btoa(binary);\n};\nexport const blobToBase64 = (blob: Blob): Promise<string> => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => { resolve(arrayBufferToBase64(reader.result as ArrayBuffer)); };\n reader.onerror = (error) => reject(error);\n reader.readAsArrayBuffer(blob);\n });\n};\nexport const fileToBase64 = (file: File): Promise<string> => blobToBase64(file);\nexport const blobToDataURL = (blob: Blob): Promise<string> => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => { const base64 = arrayBufferToBase64(reader.result as ArrayBuffer); resolve(`data:${blob.type};base64,${base64}`); };\n reader.onerror = (error) => reject(error);\n reader.readAsArrayBuffer(blob);\n });\n};\nexport const downloadFile = (content: string, filename: string, mimeType: string = 'text/plain') => {\n const blob = new Blob([content], { type: mimeType }); const url = URL.createObjectURL(blob); const a = document.createElement('a');\n a.href = url; a.download = filename; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url);\n};\n\n// --- Taxonomy Service ---\nexport interface FeatureTaxonomy { id: string; name: string; description: string; category: string; inputs: string; }\nexport const FEATURE_TAXONOMY: FeatureTaxonomy[] = [\n { id: \"ai-command-center\", name: \"AI Command Center\", description: \"The main entry point. Use natural language to navigate and control the entire toolkit. Can call other tools.\", category: \"Core\", inputs: \"A natural language prompt describing what the user wants to do. Examples: 'explain this code: ...', 'design a theme with space vibes'.\" },\n { id: \"ai-code-explainer\", name: \"AI Code Explainer\", description: \"Accepts a code snippet and provides a detailed, structured analysis including summary, line-by-line breakdown, time/space complexity, and suggestions for improvement.\", category: \"AI Tools\", inputs: \"A string containing a code snippet.\" },\n { id: \"theme-designer\", name: \"AI Theme Designer\", description: \"Generates a complete UI color theme (primary, background, text colors) from a simple text description.\", category: \"AI Tools\", inputs: \"A string describing the desired aesthetic. Example: 'a calm, minimalist theme for a blog'.\" },\n { id: \"regex-sandbox\", name: \"RegEx Sandbox\", description: \"Generates a regular expression from a natural language description. Also allows testing expressions against a string.\", category: \"Testing\", inputs: \"A string describing the pattern to match. Example: 'find all email addresses'.\" },\n { id: \"pr-summary-generator\", name: \"AI PR Summary Generator\", description: \"Takes 'before' and 'after' code snippets, calculates the diff, and generates a structured pull request summary including a title, a prose description, and a bulleted list of changes.\", category: \"AI Tools\", inputs: \"Two strings: 'beforeCode' and 'afterCode'.\" },\n { id: \"visual-git-tree\", name: \"AI Git Log Analyzer\", description: \"Intelligently parses a raw 'git log' output to create a categorized and well-formatted changelog, separating new features from bug fixes.\", category: \"Git\", inputs: \"A string containing the raw output of a 'git log' command.\" },\n { id: \"cron-job-builder\", name: \"AI Cron Job Builder\", description: \"Generates a valid cron expression from a natural language description of a schedule.\", category: \"Deployment\", inputs: \"A string describing a schedule. Example: 'every weekday at 5pm'.\" },\n { id: \"ai-code-migrator\", name: \"AI Code Migrator\", description: \"Translate code between languages & frameworks.\", category: \"AI Tools\", inputs: \"A string of code to convert, a string for the source language, and a string for the target language. e.g. 'migrate this SASS to CSS: ...'\" },\n { id: \"ai-commit-generator\", name: \"AI Commit Message Generator\", description: \"Generates a conventional commit message from a git diff.\", category: \"AI Tools\", inputs: \"A string containing a git diff.\" },\n { id: \"worker-thread-debugger\", name: \"AI Concurrency Analyzer\", description: \"Analyzes JavaScript code for potential Web Worker concurrency issues like race conditions.\", category: \"Testing\", inputs: \"A string of JavaScript code to analyze for concurrency issues.\" },\n { id: \"xbrl-converter\", name: \"XBRL Converter\", description: \"Converts a JSON object into a simplified XBRL-like XML format.\", category: \"Data\", inputs: \"A string containing valid JSON.\" }\n];\n\n// --- Component Loader ---\nexport const lazyWithRetry = <T extends React.ComponentType<any>>(componentImport: () => Promise<{ [key: string]: T }>, exportName: string) => {\n return lazy(async () => {\n const MAX_RETRIES = 3; const RETRY_DELAY_MS = 1000;\n for (let i = 0; i < MAX_RETRIES; i++) {\n try {\n const module = await componentImport();\n if (module[exportName]) { return { default: module[exportName] }; }\n throw new Error(`Named export '${exportName}' not found in module.`);\n } catch (error) {\n console.error(error);\n if (i < MAX_RETRIES - 1) { await new Promise(resolve => setTimeout(resolve, RETRY_DELAY_MS)); } else {\n console.error(\"Failed to load component after multiple retries. Reloading page.\");\n window.location.reload();\n throw error;\n }\n }\n }\n throw new Error('Component failed to load and retries were exhausted.');\n });\n};","import React from 'react';\n\nconst IconWrapper: React.FC<{children: React.ReactNode; className?: string}> = ({ children, className }) => (\n <div className={className ?? 'w-6 h-6'}>{children}</div>\n);\n\n// --- From InterfaceIcons.tsx ---\nexport const CpuChipIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M8.25 21v-1.5M4.5 15.75H3m18 0h-1.5M21 8.25v7.5A2.25 2.25 0 0 1 18.75 18H5.25A2.25 2.25 0 0 1 3 15.75v-7.5A2.25 2.25 0 0 1 5.25 6h13.5A2.25 2.25 0 0 1 21 8.25ZM12 18V6\" /></svg></IconWrapper>;\nexport const DocumentIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z\" /></svg></IconWrapper>;\nexport const FolderIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z\" /></svg></IconWrapper>;\nexport const LinkIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244\" /></svg></IconWrapper>;\nexport const ArchiveBoxIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z\" /></svg></IconWrapper>;\nexport const ClipboardDocumentIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876C9.083 2.25 6.105 5.106 6.105 9.125v3.375c0 .621.504 1.125 1.125 1.125h9.75Z\" /></svg></IconWrapper>;\nexport const ArrowDownTrayIcon: React.FC<{className?: string}> = ({className}) => <IconWrapper className={className}><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3\" /></svg></IconWrapper>;\nexport const XMarkIcon: React.FC<{className?: string}> = ({className}) => <IconWrapper className={className}><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\" /></svg></IconWrapper>;\nexport const PlusIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 4.5v15m7.5-7.5h-15\" /></svg></IconWrapper>;\nexport const TrashIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.134-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.067-2.09 1.02-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0\" /></svg></IconWrapper>;\nexport const PencilIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125\" /></svg></IconWrapper>;\nexport const MagnifyingGlassIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z\" /></svg></IconWrapper>;\nexport const Cog6ToothIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M9.594 3.94c.09-.542.56-1.008 1.11-1.212l2.39-1.062a1.25 1.25 0 0 1 1.415.602l.62 1.24a1.25 1.25 0 0 0 1.282.693l2.394-.852a1.25 1.25 0 0 1 1.415 1.415l-.852 2.394a1.25 1.25 0 0 0 .693 1.282l1.24.62a1.25 1.25 0 0 1 .602 1.415l-1.062 2.39a1.25 1.25 0 0 0-1.212 1.11l-.22 1.319a1.25 1.25 0 0 1-1.393 1.053l-2.32-.82a1.25 1.25 0 0 0-1.353 0l-2.32.82a1.25 1.25 0 0 1-1.393-1.053l-.22-1.319a1.25 1.25 0 0 0-1.212-1.11l-1.062-2.39a1.25 1.25 0 0 1 .602-1.415l1.24-.62a1.25 1.25 0 0 0 .693-1.282l-.852-2.394a1.25 1.25 0 0 1 1.415-1.415l2.394.852a1.25 1.25 0 0 0 1.282-.693l.62-1.24a1.25 1.25 0 0 1 1.415-.602l-2.39 1.062a1.25 1.25 0 0 0-1.11 1.212Z\" /><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\" /></svg></IconWrapper>;\nexport const HomeIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h7.5\" /></svg></IconWrapper>;\nexport const ChevronDownIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m19.5 8.25-7.5 7.5-7.5-7.5\" /></svg></IconWrapper>;\nexport const SunIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z\" /></svg></IconWrapper>;\nexport const MoonIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z\" /></svg></IconWrapper>;\nexport const ArrowLeftOnRectangleIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H5\" /></svg></IconWrapper>;\nexport const ArrowUpOnSquareIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15m0-3-3-3m0 0-3 3m3-3v12\" /></svg></IconWrapper>;\nconst WindowIconWrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => (<div className=\"w-4 h-4\">{children}</div>);\nexport const MinimizeIcon: React.FC = () => <WindowIconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={3} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M5 12h14\" /></svg></WindowIconWrapper>;\nexport const MaximizeIcon: React.FC = () => <WindowIconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={3} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M4.5 4.5h15v15h-15z\" /></svg></WindowIconWrapper>;\nexport const RestoreIcon: React.FC = () => <WindowIconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={3} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M8.5 8.5h11v11h-11z M4.5 4.5h11v11h-11z\" /></svg></WindowIconWrapper>;\n\n// --- From FeatureIcons.tsx ---\nexport const FileCodeIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z\" /></svg></IconWrapper>;\nexport const GitBranchIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 3v4a3 3 0 0 0 3 3h4a3 3 0 0 0 3-3V3M6 21v-4a3 3 0 0 1 3-3h4a3 3 0 0 1 3 3v4M12 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4z\" /></svg></IconWrapper>;\nexport const SparklesIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456Z\" /></svg></IconWrapper>;\nexport const EyeIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2.036 12.322a1.012 1.012 0 0 1 0-.639l4.368-7.28A1.012 1.012 0 0 1 7.105 4.5h9.79a1.012 1.012 0 0 1 .701.293l4.368 7.28c.15.25.228.538.228.828s-.078.578-.228.828l-4.368 7.28a1.012 1.012 0 0 1-.701.293h-9.79a1.012 1.012 0 0 1-.701-.293l-4.368-7.28Z\" /><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\" /></svg></IconWrapper>;\nexport const MapIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M9 6.75V15m6-6v8.25m.5-10.5h-7a.5.5 0 0 0-.5.5v13.5a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5V4.25a.5.5 0 0 0-.5-.5Z\" /></svg></IconWrapper>;\nexport const BeakerIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c.139-.02.28-.032.427-.032.147 0 .288.012.427.032M5 14.5h14M14.25 3.104v5.714c0 .822-.394 1.573-.986 2.05l-2.014.915a2.25 2.25 0 0 0-.659 1.591v5.714m-3.468-18.222.01.001\" /></svg></IconWrapper>;\nexport const CommandLineIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6.75 7.5 3 11.25l3.75 3.75M17.25 7.5 21 11.25l-3.75 3.75\" /></svg></IconWrapper>;\nexport const LockClosedIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M16.5 10.5V6.75a4.5 4.5 0 0 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z\" /></svg></IconWrapper>;\nexport const CodeBracketSquareIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M14.25 9.75 16.5 12l-2.25 2.25m-4.5 0L7.5 12l2.25-2.25M6 20.25h12A2.25 2.25 0 0 0 20.25 18V6A2.25 2.25 0 0 0 18 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25Z\" /></svg></IconWrapper>;\nexport const PhotoIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z\" /></svg></IconWrapper>;\nexport const BellIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0\" /></svg></IconWrapper>;\nexport const ChartBarIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625Zm6.75-5.25c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V3.375Z\" /></svg></IconWrapper>;\nexport const BugAntIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m15.182 16.318A4.5 4.5 0 0 0 18 12a4.5 4.5 0 0 0-3.818-4.318m-3.564 4.318a4.5 4.5 0 0 1 3.564 0M6 12a4.5 4.5 0 0 1 3.818-4.318M12 12a4.5 4.5 0 0 1-3.818-4.318m0 8.636a4.5 4.5 0 0 1 3.818 0M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0 0a8.949 8.949 0 0 0 5.482-1.611m-10.964 0A8.949 8.949 0 0 1 12 21Zm0 0a8.949 8.949 0 0 0-5.482-1.611m10.964 0A8.949 8.949 0 0 0 12 21Zm-5.482 1.61a8.973 8.973 0 0 1-2.18-1.001m10.342 0a8.973 8.973 0 0 0-2.18-1.001m-6-1.611a8.973 8.973 0 0 1-2.18-1.001M18 12a8.973 8.973 0 0 0-2.18-1.001m-6 0a8.973 8.973 0 0 1-2.18-1.001M6 12a8.973 8.973 0 0 0-2.18-1.001m10.342 0a8.973 8.973 0 0 0-2.18-1.001M12 3a8.973 8.973 0 0 1 2.18 1.001m-4.36 0A8.973 8.973 0 0 1 12 3m0 18a8.973 8.973 0 0 0 2.18-1.001m-4.36 0A8.973 8.973 0 0 0 12 21Zm0-18a8.973 8.973 0 0 0-2.18-1.001m4.36 0A8.973 8.973 0 0 0 12 3Z\" /></svg></IconWrapper>;\nexport const TerminalIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6.75 7.5l3.75 3.75L6.75 15m6-7.5h4.5\" /></svg></IconWrapper>;\nexport const ServerStackIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 20.25h12m-7.5-3.75v3.75m3.75-3.75v3.75M12 3c-5.12 0-9.25 4.13-9.25 9.25s4.13 9.25 9.25 9.25 9.25-4.13 9.25-9.25S17.12 3 12 3Z\" /></svg></IconWrapper>;\nexport const CloudIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2.25 15a4.5 4.5 0 0 0 4.5 4.5H18a3.75 3.75 0 0 0 1.332-7.257 3 3 0 0 0-5.056-2.287 4.5 4.5 0 0 0-8.25-2.287 4.5 4.5 0 0 0-1.25 8.25Z\" /></svg></IconWrapper>;\nexport const PaperAirplaneIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5\" /></svg></IconWrapper>;\nexport const ShieldCheckIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.286Z\" /></svg></IconWrapper>;\nexport const ArrowPathIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 11.667 0l3.181-3.183m-4.991-2.691V5.25a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75\" /></svg></IconWrapper>;\nexport const RectangleGroupIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2.25 7.125A2.25 2.25 0 0 1 4.5 4.875h15A2.25 2.25 0 0 1 21.75 7.125v10.5A2.25 2.25 0 0 1 19.5 19.875h-15A2.25 2.25 0 0 1 2.25 17.625v-10.5ZM11.25 4.875v10.5a2.25 2.25 0 0 1-2.25 2.25h-1.5a2.25 2.25 0 0 1-2.25-2.25v-10.5a2.25 2.25 0 0 1 2.25-2.25h1.5a2.25 2.25 0 0 1 2.25 2.25Z\" /></svg></IconWrapper>;\nexport const MusicalNoteIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M9 9V4.5M9 9c0 .54.06.913.175 1.313M9 9H4.5M9.175 10.313C9.06 10.087 9 9.85 9 9.6V4.5a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 .75.75v5.1a.75.75 0 0 1-.75.75h-.625a.75.75 0 0 1-.75-.75V9.75\" /></svg></IconWrapper>;\nexport const VideoCameraIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9A2.25 2.25 0 0 0 13.5 5.25h-9A2.25 2.25 0 0 0 2.25 7.5v9A2.25 2.25 0 0 0 4.5 18.75Z\" /></svg></IconWrapper>;\nexport const DocumentTextIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z\" /></svg></IconWrapper>;\nexport const PaintBrushIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\" /></svg></IconWrapper>;\nexport const PuzzlePieceIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M14.25 6.087c0-1.036-.84-1.875-1.875-1.875s-1.875.84-1.875 1.875v.563c-1.036 0-1.875.84-1.875 1.875v1.5c0 1.036.84 1.875 1.875 1.875h1.5c1.036 0 1.875-.84 1.875-1.875v-1.5c0-1.036-.84-1.875-1.875-1.875v-.563Zm-4.5 0v.563c-1.036 0-1.875.84-1.875 1.875v1.5c0 1.036.84 1.875 1.875 1.875h1.5c1.036 0 1.875-.84 1.875-1.875v-1.5c0-1.036-.84-1.875-1.875-1.875v-.563a1.875 1.875 0 0 0-3.75 0Z\" /></svg></IconWrapper>;\nexport const MicrophoneIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 18.75a6 6 0 0 0 6-6v-1.5m-6 7.5a6 6 0 0 1-6-6v-1.5m12 4.5v-1.5a6 6 0 0 0-12 0v1.5m12 0v-1.5a6 6 0 0 0-12 0v1.5m6 3.75a3 3 0 0 1-3-3V6.75a3 3 0 0 1 6 0v6a3 3 0 0 1-3 3Z\" /></svg></IconWrapper>;\n\n// --- From CustomFeatureIcons.tsx ---\nexport const CommandCenterIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M10 9V5l-7 7 7 7v-4.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/><path d=\"M14 14.5V19l7-7-7-7v4.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/><circle cx=\"12\" cy=\"12\" r=\"3\" fill=\"currentColor\" opacity=\"0.4\"/></svg></IconWrapper>;\nexport const ProjectExplorerIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M3.75 9.75h16.5m-16.5 4.5h16.5m-16.5 4.5h16.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\" /></svg></IconWrapper>;\nexport const ConnectionsIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={1.5} stroke=\"currentColor\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244\" /></svg></IconWrapper>;\nexport const CodeExplainerIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z\"/><path d=\"M14 2v6h6\"/><circle cx=\"12\" cy=\"15\" r=\"3\"/><path d=\"M12 18v2\"/></svg></IconWrapper>;\nexport const FeatureBuilderIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5\"/><path d=\"M2 12l10 5 10-5\"/><path d=\"M17 8.5l-5 2.5-5-2.5\"/><path d=\"M12 17.5V14\"/></svg></IconWrapper>;\nexport const CodeMigratorIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M10 22H5a2 2 0 01-2-2V4a2 2 0 012-2h5\"/><path d=\"M14 2h5a2 2 0 012 2v16a2 2 0 01-2 2h-5\"/><path d=\"M7 8h2m-2 4h4m-4 4h2\"/></svg></IconWrapper>;\nexport const ThemeDesignerIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 2a10 10 0 000 20z\"/><path d=\"M22 12c-5.523 0-10-4.477-10-10\"/></svg></IconWrapper>;\nexport const SnippetVaultIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\" ry=\"2\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/><path d=\"M8 12h8m-4-4v8\"/></svg></IconWrapper>;\nexport const DigitalWhiteboardIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\" /><path d=\"M7 8h4m-4 4h8m-8 4h6\" /></svg></IconWrapper>;\nexport const UnitTestGeneratorIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M4.5 12.5l3-3 3 3 6-6\"/><path d=\"M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"/></svg></IconWrapper>;\nexport const CommitGeneratorIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2\"/><rect x=\"8\" y=\"2\" width=\"8\" height=\"4\" rx=\"1\" ry=\"1\"/></svg></IconWrapper>;\nexport const GitLogAnalyzerIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M6 3v18\"/><path d=\"M18 3v18\"/><path d=\"M12 3v18\"/><circle cx=\"6\" cy=\"6\" r=\"3\" fill=\"currentColor\" opacity=\"0.4\"/><circle cx=\"12\" cy=\"12\" r=\"3\" fill=\"currentColor\" opacity=\"0.4\"/><circle cx=\"18\" cy=\"18\" r=\"3\" fill=\"currentColor\" opacity=\"0.4\"/></svg></IconWrapper>;\nexport const ConcurrencyAnalyzerIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M18 6l-6 6-6-6\"/><path d=\"M18 18l-6-6-6 6\"/></svg></IconWrapper>;\nexport const RegexSandboxIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M15 4l-8 16\"/><path d=\"M22 12H2\"/><path d=\"M10 3L6 21\"/></svg></IconWrapper>;\nexport const PromptCraftPadIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z\"/></svg></IconWrapper>;\nexport const CodeFormatterIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M3 6h3m-3 6h3m-3 6h3M9 6h12M9 12h12M9 18h12\"/></svg></IconWrapper>;\nexport const JsonTreeIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M10 21v-4a2 2 0 012-2h8\"/><path d=\"M10 17H5a2 2 0 01-2-2V5a2 2 0 012-2h8a2 2 0 012 2v2\"/><rect x=\"2\" y=\"2\" width=\"20\" height=\"20\" rx=\"2\" ry=\"2\" opacity=\"0.2\"/></svg></IconWrapper>;\nexport const XbrlConverterIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M8 8l-4 4 4 4m8-8l4 4-4-4\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/><path d=\"M14.5 5.5l-5 13\" strokeLinecap=\"round\"/></svg></IconWrapper>;\nexport const CssGridEditorIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\"/></svg></IconWrapper>;\nexport const SchemaDesignerIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M4 7V4h16v3\"/><path d=\"M4 12h16\"/><path d=\"M4 17h16\"/><rect x=\"2\" y=\"2\" width=\"20\" height=\"20\" rx=\"2\" ry=\"2\" opacity=\"0.2\"/></svg></IconWrapper>;\nexport const PwaManifestEditorIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M12 22a10 10 0 100-20 10 10 0 000 20z\"/><path d=\"M12 12l4-4m-4 8l-4-4\"/></svg></IconWrapper>;\nexport const MarkdownSlidesIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M20 3H4a2 2 0 00-2 2v14a2 2 0 002 2h16a2 2 0 002-2V5a2 2 0 00-2-2z\"/><path d=\"M9 16V8h6\"/></svg></IconWrapper>;\nexport const ScreenshotToComponentIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4\"/><path d=\"M7 10l5-5 5 5m-5 8v-13\"/></svg></IconWrapper>;\nexport const TypographyLabIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M4 7V4h16v3\"/><path d=\"M4 17h16\"/><rect x=\"2\" y=\"2\" width=\"20\" height=\"20\" rx=\"2\" ry=\"2\" opacity=\"0.2\"/></svg></IconWrapper>;\nexport const SvgPathEditorIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M12 20.9l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 20.9z\"/></svg></IconWrapper>;\nexport const StyleTransferIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M12 2.69l.94-2.69.94 2.69L16.5 3l-2.69.94L13 6.58 12 4l-1 2.58L8.31 4 5.62 3l2.69.94.94 2.69.94-2.69z\"/><path d=\"M12 2.69l.94-2.69.94 2.69L16.5 3l-2.69.94L13 6.58 12 4l-1 2.58L8.31 4 5.62 3l2.69.94.94 2.69.94-2.69zM12 2.69l.94-2.69.94 2.69L16.5 3l-2.69.94L13 6.58 12 4l-1 2.58L8.31 4 5.62 3l2.69.94.94 2.69.94-2.69zM3.5 13.5c0-4.694 3.806-8.5 8.5-8.5s8.5 3.806 8.5 8.5-3.806 8.5-8.5 8.5-8.5-3.806-8.5-8.5z\"/></svg></IconWrapper>;\nexport const CodingChallengeIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M12 8V6m0 12v-2m-4-6H6m12 0h-2m-2-4l-1.5-1.5M18 18l-1.5-1.5M6 18l1.5-1.5M6 6l1.5 1.5\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg></IconWrapper>;\nexport const CodeReviewBotIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M12 20V10m0 0V4m0 6h8m-8 0H4\"/><path d=\"M12 20a8 8 0 100-16 8 8 0 000 16z\"/></svg></IconWrapper>;\nexport const AiPullRequestAssistantIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M13 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V9z\"/><path d=\"M13 2v7h7\"/><path d=\"M17.5 2.5l-2-2m2 2l2-2m-2 2v4\"/></svg></IconWrapper>;\nexport const ChangelogGeneratorIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z\"/><path d=\"M14 2v6h6\"/><path d=\"M16 13H8m8 4H8m-1-8l-2-2-2 2\"/></svg></IconWrapper>;\nexport const CronJobBuilderIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z\"/></svg></IconWrapper>;\nexport const AsyncCallTreeIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M3 6h18M3 12h18M3 18h18\"/><path d=\"M6 3v18m12-18v18\"/></svg></IconWrapper>;\nexport const AudioToCodeIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M12 1a3 3 0 00-3 3v8a3 3 0 006 0V4a3 3 0 00-3-3z\"/><path d=\"M19 10v2a7 7 0 01-14 0v-2\"/><path d=\"M12 19v4\"/></svg></IconWrapper>;\nexport const CodeDiffGhostIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M16 16l-4-4 4-4m-8 8l4-4-4-4\"/></svg></IconWrapper>;\nexport const CodeSpellCheckerIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.72\"/><path d=\"M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.72-1.72\"/></svg></IconWrapper>;\nexport const ColorPaletteGeneratorIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z\"/></svg></IconWrapper>;\nexport const LogicFlowBuilderIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M3 6h18m-9 6H3m9 6H3\"/><path d=\"M8 3v18m8-18v18\"/></svg></IconWrapper>;\nexport const MetaTagEditorIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z\"/><path d=\"M7 7h.01\"/></svg></IconWrapper>;\nexport const NetworkVisualizerIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M18 10h4V6h-4V2l-4 4 4 4zM6 14H2v4h4v4l4-4-4-4z\"/><path d=\"M10 14v-4h4v4\"/></svg></IconWrapper>;\nexport const ResponsiveTesterIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"/><path d=\"M21 12a9 9 0 00-9-9m9 9a9 9 0 01-9 9\"/></svg></IconWrapper>;\nexport const SassCompilerIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><path d=\"M21.168 18.168A10 10 0 118.832 2.832m12.336 15.336L8.832 2.832\"/></svg></IconWrapper>;\nexport const ImageGeneratorIcon: React.FC = () => <IconWrapper><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/><circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"/><path d=\"M21 15l-5-5L5 21\"/></svg></IconWrapper>;\nexport const GithubIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fillRule=\"evenodd\" d=\"M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z\" clipRule=\"evenodd\" /></svg></IconWrapper>;\nexport const HuggingFaceIcon: React.FC = () => <IconWrapper><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M20.25,4.01A2.25,2.25,0,0,0,18,1.76H6A2.25,2.25,0,0,0,3.75,4.01V15.5A2.25,2.25,0,0,0,6,17.75H8.6l3.4,3.4,3.4-3.4H18a2.25,2.25,0,0,0,2.25-2.25V4.01ZM8.5,12.06a1,1,0,0,1,1,1,1,1,0,0,1-2,0,1,1,0,0,1,1-1Zm4.9,0a1,1,0,0,1,1,1,1,1,0,0,1-2,0,1,1,0,0,1,1-1Zm2.6,3.44a3.25,3.25,0,0,1-6,0,.75.75,0,0,1,1.5,0,1.75,1.75,0,0,0,3,0,.75.75,0,0,1,1.5,0Z\"/></svg></IconWrapper>;\n","import React, { useState, useEffect } from 'react';\nimport { marked } from 'marked';\n\nexport const LoadingSpinner: React.FC = () => (\n <div className=\"flex items-center justify-center space-x-1\" aria-label=\"Loading\">\n <div className=\"w-2 h-2 rounded-full bg-current animate-pulse\" style={{ animationDelay: '0s' }}></div>\n <div className=\"w-2 h-2 rounded-full bg-current animate-pulse\" style={{ animationDelay: '0.2s' }}></div>\n <div className=\"w-2 h-2 rounded-full bg-current animate-pulse\" style={{ animationDelay: '0.4s' }}></div>\n </div>\n);\n\ninterface MarkdownRendererProps {\n content: string;\n}\n\nexport const MarkdownRenderer: React.FC<MarkdownRendererProps> = ({ content }) => {\n const [sanitizedHtml, setSanitizedHtml] = useState<string | TrustedHTML>('');\n\n useEffect(() => {\n const parse = async () => {\n if (content) {\n const html = await marked.parse(content);\n setSanitizedHtml(html);\n } else {\n setSanitizedHtml('');\n }\n };\n parse();\n }, [content]);\n\n return (\n <div\n className=\"prose prose-sm max-w-none prose-headings:text-text-primary prose-p:text-text-primary prose-strong:text-text-primary prose-code:text-primary prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-50 prose-pre:border prose-pre:border-border prose-pre:p-4 prose-pre:m-0\"\n dangerouslySetInnerHTML={{ __html: sanitizedHtml }}\n />\n );\n};\n","\n\nimport React from 'react';\nimport { logError } from '../services/index.ts';\nimport { debugErrorStream } from '../services/index.ts';\nimport { SparklesIcon } from './icons.tsx';\nimport { MarkdownRenderer, LoadingSpinner } from './shared/index.tsx';\n\ninterface Props {\n children: React.ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n error: Error | null;\n aiHelp: string;\n isAiLoading: boolean;\n}\n\nexport class ErrorBoundary extends React.Component<Props, State> {\n constructor(props: Props) {\n super(props);\n this.state = { hasError: false, error: null, aiHelp: '', isAiLoading: false };\n }\n\n static getDerivedStateFromError(error: Error): Partial<State> {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n logError(error, { componentStack: errorInfo.componentStack });\n }\n \n handleRevert = () => {\n window.location.reload();\n };\n\n handleAskAi = async () => {\n if (!this.state.error) return;\n\n this.setState({ isAiLoading: true, aiHelp: '' });\n try {\n const stream = debugErrorStream(this.state.error);\n let fullResponse = '';\n for await (const chunk of stream) {\n fullResponse += chunk;\n this.setState({ aiHelp: fullResponse });\n }\n } catch (e) {\n this.setState({ aiHelp: 'Sorry, the AI assistant could not be reached.' });\n logError(e as Error, { context: 'AI Error Debugging' });\n } finally {\n this.setState({ isAiLoading: false });\n }\n};\n\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"w-full h-full flex flex-col items-center justify-center p-4 sm:p-6 lg:p-8 bg-background text-text-primary\">\n <div className=\"w-full max-w-4xl bg-surface border border-border rounded-lg p-6 shadow-2xl grid grid-cols-1 md:grid-cols-2 gap-6\">\n {/* Left Column: Error Details & Actions */}\n <div className=\"flex flex-col\">\n <h1 className=\"text-2xl font-bold text-red-600 mb-2\">An Unexpected Error Occurred</h1>\n <p className=\"text-text-secondary mb-4\">A component has crashed. You can try reloading or ask the AI for debugging help.</p>\n \n <details className=\"text-left bg-gray-50 p-2 rounded-md max-w-xl text-xs font-mono mb-4 flex-grow overflow-auto border border-border\">\n <summary className=\"cursor-pointer\">Error Details</summary>\n <pre className=\"mt-2 whitespace-pre-wrap\">{this.state.error?.stack}</pre>\n </details>\n \n <div className=\"flex gap-4 mt-auto\">\n <button\n onClick={this.handleRevert}\n className=\"flex-1 px-4 py-2 bg-yellow-400 text-yellow-900 font-bold rounded-md hover:bg-yellow-300 transition-colors\"\n >\n Reload Application\n </button>\n <button\n onClick={this.handleAskAi}\n disabled={this.state.isAiLoading}\n className=\"btn-primary flex-1 px-4 py-2 flex items-center justify-center gap-2\"\n >\n <SparklesIcon />\n {this.state.isAiLoading ? 'Analyzing...' : 'Ask AI for Help'}\n </button>\n </div>\n </div>\n\n {/* Right Column: AI Help */}\n <div className=\"flex flex-col bg-gray-50 rounded-lg p-4 border border-border\">\n <h2 className=\"text-lg font-bold text-text-primary mb-2\">AI Assistant</h2>\n <div className=\"flex-grow overflow-y-auto\">\n {this.state.isAiLoading && <div className=\"flex justify-center items-center h-full\"><LoadingSpinner /></div>}\n {this.state.aiHelp && <MarkdownRenderer content={this.state.aiHelp} />}\n {!this.state.isAiLoading && !this.state.aiHelp && <p className=\"text-text-secondary text-center pt-10\">Click \"Ask AI\" to get debugging suggestions.</p>}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n return this.props.children;\n }\n}","import React, { createContext, useReducer, useContext, useEffect } from 'react';\nimport type { ViewType, User, FileNode, Theme } from '../types.ts';\n\n// State shape\ninterface GlobalState {\n activeView: ViewType;\n viewProps: any;\n theme: Theme;\n hiddenFeatures: string[];\n isAuthenticated: boolean;\n user: User | null;\n token: string | null;\n isGithubConnected: boolean;\n isHuggingFaceConnected: boolean;\n projectFiles: FileNode | null;\n selectedRepo: { owner: string; repo: string } | null;\n}\n\n// Action types\ntype Action =\n | { type: 'SET_VIEW'; payload: { view: ViewType, props?: any } }\n | { type: 'TOGGLE_FEATURE_VISIBILITY'; payload: { featureId: string } }\n | { type: 'LOGIN'; payload: { user: User, token: string } }\n | { type: 'LOGOUT' }\n | { type: 'SET_GITHUB_CONNECTED'; payload: boolean }\n | { type: 'SET_HUGGINGFACE_CONNECTED'; payload: boolean }\n | { type: 'LOAD_PROJECT_FILES'; payload: FileNode | null }\n | { type: 'SET_SELECTED_REPO'; payload: { owner: string; repo: string } | null };\n\n\nconst initialState: GlobalState = {\n activeView: 'ai-command-center',\n viewProps: {},\n theme: 'light',\n hiddenFeatures: [],\n isAuthenticated: false,\n user: null,\n token: null,\n isGithubConnected: false,\n isHuggingFaceConnected: false,\n projectFiles: null,\n selectedRepo: null,\n};\n\nconst reducer = (state: GlobalState, action: Action): GlobalState => {\n switch (action.type) {\n case 'SET_VIEW':\n return { ...state, activeView: action.payload.view, viewProps: action.payload.props || {} };\n case 'TOGGLE_FEATURE_VISIBILITY': {\n const { featureId } = action.payload;\n const isHidden = state.hiddenFeatures.includes(featureId);\n const newHiddenFeatures = isHidden\n ? state.hiddenFeatures.filter(id => id !== featureId)\n : [...state.hiddenFeatures, featureId];\n return { ...state, hiddenFeatures: newHiddenFeatures };\n }\n case 'LOGIN':\n return { \n ...state, \n isAuthenticated: true, \n user: action.payload.user, \n token: action.payload.token,\n isGithubConnected: true \n };\n case 'LOGOUT':\n return {\n ...initialState,\n theme: state.theme,\n hiddenFeatures: state.hiddenFeatures,\n isAuthenticated: false,\n user: null,\n token: null,\n isGithubConnected: false,\n selectedRepo: null,\n projectFiles: null,\n };\n case 'SET_GITHUB_CONNECTED':\n return { ...state, isGithubConnected: action.payload };\n case 'SET_HUGGINGFACE_CONNECTED':\n return { ...state, isHuggingFaceConnected: action.payload };\n case 'LOAD_PROJECT_FILES':\n return { ...state, projectFiles: action.payload };\n case 'SET_SELECTED_REPO':\n return { ...state, selectedRepo: action.payload, projectFiles: null }; // Reset files on repo change\n default:\n return state;\n }\n};\n\nconst GlobalStateContext = createContext<{\n state: GlobalState;\n dispatch: React.Dispatch<Action>;\n}>({\n state: initialState,\n dispatch: () => null,\n});\n\nconst LOCAL_STORAGE_KEY = 'devcore_snapshot';\nconst CONSENT_KEY = 'devcore_ls_consent';\n\nexport const GlobalStateProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {\n const canPersist = (() => {\n try {\n return localStorage.getItem(CONSENT_KEY) === 'granted';\n } catch (e) {\n return false;\n }\n })();\n\n const [state, dispatch] = useReducer(reducer, initialState, (initial) => {\n if (!canPersist) return initial;\n \n try {\n const storedStateJSON = localStorage.getItem(LOCAL_STORAGE_KEY);\n if (!storedStateJSON) return initial;\n \n const storedState = JSON.parse(storedStateJSON);\n const hydratedState = { ...initial };\n\n // Hydrate state from local storage\n if (storedState.token) hydratedState.token = storedState.token;\n if (storedState.selectedRepo) hydratedState.selectedRepo = storedState.selectedRepo;\n if (storedState.activeView) hydratedState.activeView = storedState.activeView;\n if (storedState.hiddenFeatures) hydratedState.hiddenFeatures = storedState.hiddenFeatures;\n \n return hydratedState;\n } catch (error) {\n console.error(\"Failed to parse state from localStorage\", error);\n return initial;\n }\n });\n\n useEffect(() => {\n if (!canPersist) return;\n\n const handler = setTimeout(() => {\n try {\n const stateToSave = { \n token: state.token,\n selectedRepo: state.selectedRepo,\n activeView: state.activeView,\n hiddenFeatures: state.hiddenFeatures,\n };\n localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(stateToSave));\n } catch (error) {\n console.error(\"Failed to save state to localStorage\", error);\n }\n }, 500);\n \n return () => clearTimeout(handler);\n }, [state, canPersist]);\n\n\n return (\n <GlobalStateContext.Provider value={{ state, dispatch }}>\n {children}\n </GlobalStateContext.Provider>\n );\n};\n\nexport const useGlobalState = () => useContext(GlobalStateContext);","\n\nconst isTelemetryEnabled = true; // Could be controlled by a setting\n\nconst sanitizePayload = (payload: Record<string, any>): Record<string, any> => {\n const sanitized: Record<string, any> = {};\n for (const key in payload) {\n if (Object.prototype.hasOwnProperty.call(payload, key)) {\n const value = payload[key];\n // Truncate long strings to avoid polluting the console (e.g., base64 data)\n if (typeof value === 'string' && value.length > 500) {\n sanitized[key] = `${value.substring(0, 100)}... (truncated)`;\n } else {\n sanitized[key] = value;\n }\n }\n }\n return sanitized;\n};\n\n\nexport const logEvent = (eventName: string, payload: Record<string, any> = {}) => {\n if (!isTelemetryEnabled) return;\n\n console.log(\n `%c[TELEMETRY EVENT]%c ${eventName}`,\n 'color: #84cc16; font-weight: bold;',\n 'color: inherit;',\n sanitizePayload(payload)\n );\n};\n\nexport const logError = (error: Error, context: Record<string, any> = {}) => {\n if (!isTelemetryEnabled) return;\n\n console.error(\n `%c[TELEMETRY ERROR]%c ${error.message}`,\n 'color: #ef4444; font-weight: bold;',\n 'color: inherit;',\n {\n error,\n context: sanitizePayload(context),\n stack: error.stack,\n }\n );\n};\n\nexport const measurePerformance = async <T>(\n metricName: string,\n operation: () => Promise<T>\n): Promise<T> => {\n const start = performance.now();\n try {\n const result = await operation();\n const end = performance.now();\n const duration = end - start;\n\n if (isTelemetryEnabled) {\n console.log(\n `%c[TELEMETRY PERF]%c ${metricName}`,\n 'color: #3b82f6; font-weight: bold;',\n 'color: inherit;',\n { duration: `${duration.toFixed(2)}ms` }\n );\n }\n return result;\n } catch (error) {\n const end = performance.now();\n const duration = end - start;\n if (isTelemetryEnabled) {\n console.warn(\n `%c[TELEMETRY PERF FAILED]%c ${metricName}`,\n 'color: #f97316; font-weight: bold;',\n 'color: inherit;',\n { duration: `${duration.toFixed(2)}ms`, error }\n );\n }\n throw error;\n }\n};","import React from 'react';\nimport {\n CommandCenterIcon, CodeExplainerIcon, FeatureBuilderIcon, CodeMigratorIcon, ThemeDesignerIcon, SnippetVaultIcon,\n UnitTestGeneratorIcon, CommitGeneratorIcon, GitLogAnalyzerIcon, ConcurrencyAnalyzerIcon, RegexSandboxIcon,\n PromptCraftPadIcon, CodeFormatterIcon, JsonTreeIcon, CssGridEditorIcon, SchemaDesignerIcon, PwaManifestEditorIcon,\n MarkdownSlidesIcon, ScreenshotToComponentIcon, SvgPathEditorIcon, StyleTransferIcon, CodingChallengeIcon,\n CodeReviewBotIcon, ChangelogGeneratorIcon, CronJobBuilderIcon,\n AsyncCallTreeIcon, AudioToCodeIcon, CodeDiffGhostIcon, CodeSpellCheckerIcon, ColorPaletteGeneratorIcon, LogicFlowBuilderIcon,\n MetaTagEditorIcon, NetworkVisualizerIcon, ResponsiveTesterIcon, SassCompilerIcon, ImageGeneratorIcon, XbrlConverterIcon,\n DigitalWhiteboardIcon, TypographyLabIcon, AiPullRequestAssistantIcon, ProjectExplorerIcon, ConnectionsIcon\n} from './components/icons.tsx';\n\nexport const CHROME_VIEW_IDS = ['features-list'] as const;\n\nexport const SLOTS = ['Core', 'AI Tools', 'Frontend', 'Testing', 'Database', 'Productivity'] as const;\nexport type SlotCategory = typeof SLOTS[number];\n\nexport const FEATURE_CATEGORIES = ['Core', 'AI Tools', 'Frontend', 'Testing', 'Database', 'Data', 'Productivity', 'Git', 'Deployment', 'Security', 'Workflow'] as const;\nexport type FeatureCategory = typeof FEATURE_CATEGORIES[number];\n\ninterface RawFeature {\n id: string;\n name: string;\n description: string;\n icon: React.ReactNode;\n category: FeatureCategory;\n}\n\n// This is the raw data, to be \"compiled\" by features/index.ts\nexport const RAW_FEATURES: RawFeature[] = [\n { id: \"ai-command-center\", name: \"AI Command Center\", description: \"Use natural language to navigate and control the toolkit.\", icon: React.createElement(CommandCenterIcon), category: \"Core\" },\n { id: \"project-explorer\", name: \"Project Explorer\", description: \"Manage and edit files from your connected repositories.\", icon: React.createElement(ProjectExplorerIcon), category: \"Core\" },\n { id: \"connections\", name: \"Connections\", description: \"Connect to GitHub, Hugging Face, and other services.\", icon: React.createElement(ConnectionsIcon), category: \"Core\" },\n { id: \"ai-image-generator\", name: \"AI Image Generator\", description: \"Generate high-quality images from a text prompt.\", icon: React.createElement(ImageGeneratorIcon), category: \"AI Tools\" },\n { id: \"ai-code-explainer\", name: \"AI Code Explainer\", description: \"Get a structured analysis of code, including complexity.\", icon: React.createElement(CodeExplainerIcon), category: \"AI Tools\" },\n { id: \"ai-feature-builder\", name: \"AI Feature Builder\", description: \"Generate code, tests, and commit messages.\", icon: React.createElement(FeatureBuilderIcon), category: \"AI Tools\" },\n { id: \"ai-code-migrator\", name: \"AI Code Migrator\", description: \"Translate code between languages & frameworks.\", icon: React.createElement(CodeMigratorIcon), category: \"AI Tools\" },\n { id: \"theme-designer\", name: \"AI Theme Designer\", description: \"Generate, fine-tune, and export UI color themes from a text description.\", icon: React.createElement(ThemeDesignerIcon), category: \"AI Tools\" },\n { id: \"portable-snippet-vault\", name: \"Snippet Vault\", description: \"Store, search, tag, and enhance reusable code snippets with AI.\", icon: React.createElement(SnippetVaultIcon), category: \"Productivity\" },\n { id: \"digital-whiteboard\", name: \"Digital Whiteboard\", description: \"Organize ideas with interactive sticky notes and get AI-powered summaries.\", icon: React.createElement(DigitalWhiteboardIcon), category: \"Productivity\" },\n { id: \"ai-unit-test-generator\", name: \"AI Unit Test Generator\", description: \"Generate unit tests from source code.\", icon: React.createElement(UnitTestGeneratorIcon), category: \"AI Tools\" },\n { id: \"ai-commit-generator\", name: \"AI Commit Message Generator\", description: \"Smart, conventional commits via AI.\", icon: React.createElement(CommitGeneratorIcon), category: \"AI Tools\" },\n { id: \"visual-git-tree\", name: \"Visual Git Tree\", description: \"Visually trace your git commit history with an interactive graph and an AI-powered summary.\", icon: React.createElement(GitLogAnalyzerIcon), category: \"Git\" },\n { id: \"worker-thread-debugger\", name: \"AI Concurrency Analyzer\", description: \"Analyze JS for Web Worker issues like race conditions.\", icon: React.createElement(ConcurrencyAnalyzerIcon), category: \"Testing\" },\n { id: \"regex-sandbox\", name: \"RegEx Sandbox\", description: \"Visually test regular expressions, generate them with AI, and inspect match groups.\", icon: React.createElement(RegexSandboxIcon), category: \"Testing\" },\n { id: \"prompt-craft-pad\", name: \"Prompt Craft Pad\", description: \"Save, edit, and manage your custom AI prompts with variable testing.\", icon: React.createElement(PromptCraftPadIcon), category: \"AI Tools\" },\n { id: \"linter-formatter\", name: \"AI Code Formatter\", description: \"AI-powered, real-time code formatting.\", icon: React.createElement(CodeFormatterIcon), category: \"Core\" },\n { id: \"json-tree-navigator\", name: \"JSON Tree Navigator\", description: \"Navigate large JSON objects as a collapsible tree.\", icon: React.createElement(JsonTreeIcon), category: \"Core\" },\n { id: \"xbrl-converter\", name: \"XBRL Converter\", description: \"Convert JSON data to a simplified XBRL-like XML format using AI.\", icon: React.createElement(XbrlConverterIcon), category: \"Data\" },\n { id: \"css-grid-editor\", name: \"CSS Grid Visual Editor\", description: \"Drag-based layout builder for CSS Grid.\", icon: React.createElement(CssGridEditorIcon), category: \"Frontend\" },\n { id: \"schema-designer\", name: \"Schema Designer\", description: \"Visually design a database schema with a drag-and-drop interface and SQL export.\", icon: React.createElement(SchemaDesignerIcon), category: \"Database\" },\n { id: \"pwa-manifest-editor\", name: \"PWA Manifest Editor\", description: \"Configure and preview Progressive Web App manifests with a home screen simulator.\", icon: React.createElement(PwaManifestEditorIcon), category: \"Frontend\" },\n { id: \"markdown-slides-generator\", name: \"Markdown Slides\", description: \"Turn markdown into a fullscreen presentation with an interactive overlay.\", icon: React.createElement(MarkdownSlidesIcon), category: \"Productivity\" },\n { id: \"screenshot-to-component\", name: \"Screenshot-to-Component\", description: \"Turn UI screenshots into functional code via paste or upload.\", icon: React.createElement(ScreenshotToComponentIcon), category: \"AI Tools\" },\n { id: \"typography-lab\", name: \"Typography Lab\", description: \"Preview font pairings and get CSS import rules.\", icon: React.createElement(TypographyLabIcon), category: \"Frontend\" },\n { id: \"svg-path-editor\", name: \"SVG Path Editor\", description: \"Visually create and manipulate SVG path data with an interactive canvas.\", icon: React.createElement(SvgPathEditorIcon), category: \"Frontend\" },\n { id: \"ai-style-transfer\", name: \"AI Code Style Transfer\", description: \"Rewrite code to match a specific style guide.\", icon: React.createElement(StyleTransferIcon), category: \"AI Tools\" },\n { id: \"ai-coding-challenge\", name: \"AI Coding Challenge Generator\", description: \"Generate unique coding exercises.\", icon: React.createElement(CodingChallengeIcon), category: \"AI Tools\" },\n { id: \"code-review-bot\", name: \"AI Code Review Bot\", description: \"Get an automated code review from an AI.\", icon: React.createElement(CodeReviewBotIcon), category: \"AI Tools\" },\n { id: \"ai-pull-request-assistant\", name: \"AI Pull Request Assistant\", description: \"Generate a structured PR summary from code diffs and populate a full template.\", icon: React.createElement(AiPullRequestAssistantIcon), category: \"AI Tools\" },\n { id: \"changelog-generator\", name: \"AI Changelog Generator\", description: \"Auto-build changelogs from raw git logs.\", icon: React.createElement(ChangelogGeneratorIcon), category: \"Git\" },\n { id: \"cron-job-builder\", name: \"AI Cron Job Builder\", description: \"Visually tool to configure cron jobs, with AI.\", icon: React.createElement(CronJobBuilderIcon), category: \"Deployment\" },\n { id: \"async-call-tree-viewer\", name: \"Async Call Tree Viewer\", description: \"Visualize a tree of asynchronous function calls from JSON data.\", icon: React.createElement(AsyncCallTreeIcon), category: \"Testing\" },\n { id: \"audio-to-code\", name: \"AI Audio-to-Code\", description: \"Speak your programming ideas and watch them turn into code.\", icon: React.createElement(AudioToCodeIcon), category: \"AI Tools\" },\n { id: \"code-diff-ghost\", name: \"Code Diff Ghost\", description: \"Visualize code changes with a 'ghost typing' effect.\", icon: React.createElement(CodeDiffGhostIcon), category: \"Git\" },\n { id: \"code-spell-checker\", name: \"Code Spell Checker\", description: \"A spell checker that finds common typos in code.\", icon: React.createElement(CodeSpellCheckerIcon), category: \"Testing\" },\n { id: \"color-palette-generator\", name: \"AI Color Palette Generator\", description: \"Pick a base color and let Gemini design a beautiful palette.\", icon: React.createElement(ColorPaletteGeneratorIcon), category: \"Frontend\" },\n { id: \"logic-flow-builder\", name: \"Logic Flow Builder\", description: \"A visual tool for building application logic flows.\", icon: React.createElement(LogicFlowBuilderIcon), category: \"Workflow\" },\n { id: \"meta-tag-editor\", name: \"Meta Tag Editor\", description: \"Generate SEO/social media meta tags with a live social card preview.\", icon: React.createElement(MetaTagEditorIcon), category: \"Frontend\" },\n { id: \"network-visualizer\", name: \"Network Visualizer\", description: \"Inspect network resources with a summary and visual waterfall chart.\", icon: React.createElement(NetworkVisualizerIcon), category: \"Testing\" },\n { id: \"responsive-tester\", name: \"Responsive Tester\", description: \"Preview your web pages at different screen sizes and custom resolutions.\", icon: React.createElement(ResponsiveTesterIcon), category: \"Frontend\" },\n { id: \"sass-scss-compiler\", name: \"SASS/SCSS Compiler\", description: \"A real-time SASS/SCSS to CSS compiler.\", icon: React.createElement(SassCompilerIcon), category: \"Frontend\" },\n];\n\nexport const ALL_FEATURE_IDS = RAW_FEATURES.map(f => f.id);","import React from 'react';\nimport type { Feature } from '../../types.ts';\nimport { RAW_FEATURES } from '../../constants.ts';\nimport { lazyWithRetry } from '../../services/index.ts';\n\n// Map feature IDs to their components using lazy loading with retry logic\nconst componentMap: Record<string, React.FC<any>> = {\n 'ai-command-center': lazyWithRetry(() => import('./AiCommandCenter.tsx'), 'AiCommandCenter'),\n 'project-explorer': lazyWithRetry(() => import('./ProjectExplorer.tsx'), 'ProjectExplorer'),\n 'connections': lazyWithRetry(() => import('./Connections.tsx'), 'Connections'),\n 'ai-code-explainer': lazyWithRetry(() => import('./AiCodeExplainer.tsx'), 'AiCodeExplainer'),\n 'ai-feature-builder': lazyWithRetry(() => import('./AiFeatureBuilder.tsx'), 'AiFeatureBuilder'),\n 'regex-sandbox': lazyWithRetry(() => import('./RegexSandbox.tsx'), 'RegexSandbox'),\n 'portable-snippet-vault': lazyWithRetry(() => import('./SnippetVault.tsx'), 'SnippetVault'),\n 'css-grid-editor': lazyWithRetry(() => import('./CssGridEditor.tsx'), 'CssGridEditor'),\n 'ai-commit-generator': lazyWithRetry(() => import('./AiCommitGenerator.tsx'), 'AiCommitGenerator'),\n 'json-tree-navigator': lazyWithRetry(() => import('./JsonTreeNavigator.tsx'), 'JsonTreeNavigator'),\n 'xbrl-converter': lazyWithRetry(() => import('./XbrlConverter.tsx'), 'XbrlConverter'),\n 'ai-unit-test-generator': lazyWithRetry(() => import('./AiUnitTestGenerator.tsx'), 'AiUnitTestGenerator'),\n 'prompt-craft-pad': lazyWithRetry(() => import('./PromptCraftPad.tsx'), 'PromptCraftPad'),\n 'linter-formatter': lazyWithRetry(() => import('./CodeFormatter.tsx'), 'CodeFormatter'),\n 'schema-designer': lazyWithRetry(() => import('./SchemaDesigner.tsx'), 'SchemaDesigner'),\n 'pwa-manifest-editor': lazyWithRetry(() => import('./PwaManifestEditor.tsx'), 'PwaManifestEditor'),\n 'markdown-slides-generator': lazyWithRetry(() => import('./MarkdownSlides.tsx'), 'MarkdownSlides'),\n 'screenshot-to-component': lazyWithRetry(() => import('./ScreenshotToComponent.tsx'), 'ScreenshotToComponent'),\n 'digital-whiteboard': lazyWithRetry(() => import('./DigitalWhiteboard.tsx'), 'DigitalWhiteboard'),\n 'theme-designer': lazyWithRetry(() => import('./ThemeDesigner.tsx'), 'ThemeDesigner'),\n 'svg-path-editor': lazyWithRetry(() => import('./SvgPathEditor.tsx'), 'SvgPathEditor'),\n 'ai-style-transfer': lazyWithRetry(() => import('./AiStyleTransfer.tsx'), 'AiStyleTransfer'),\n 'ai-coding-challenge': lazyWithRetry(() => import('./AiCodingChallenge.tsx'), 'AiCodingChallenge'),\n 'typography-lab': lazyWithRetry(() => import('./TypographyLab.tsx'), 'TypographyLab'),\n 'code-review-bot': lazyWithRetry(() => import('./CodeReviewBot.tsx'), 'CodeReviewBot'),\n 'ai-pull-request-assistant': lazyWithRetry(() => import('./AiPullRequestAssistant.tsx'), 'AiPullRequestAssistant'),\n 'changelog-generator': lazyWithRetry(() => import('./ChangelogGenerator.tsx'), 'ChangelogGenerator'),\n 'cron-job-builder': lazyWithRetry(() => import('./CronJobBuilder.tsx'), 'CronJobBuilder'),\n 'ai-code-migrator': lazyWithRetry(() => import('./AiCodeMigrator.tsx'), 'AiCodeMigrator'),\n 'visual-git-tree': lazyWithRetry(() => import('./VisualGitTree.tsx'), 'VisualGitTree'),\n 'worker-thread-debugger': lazyWithRetry(() => import('./WorkerThreadDebugger.tsx'), 'WorkerThreadDebugger'),\n 'ai-image-generator': lazyWithRetry(() => import('./AiImageGenerator.tsx'), 'AiImageGenerator'),\n 'async-call-tree-viewer': lazyWithRetry(() => import('./AsyncCallTreeViewer.tsx'), 'AsyncCallTreeViewer'),\n 'audio-to-code': lazyWithRetry(() => import('./AudioToCode.tsx'), 'AudioToCode'),\n 'code-diff-ghost': lazyWithRetry(() => import('./CodeDiffGhost.tsx'), 'CodeDiffGhost'),\n 'code-spell-checker': lazyWithRetry(() => import('./CodeSpellChecker.tsx'), 'CodeSpellChecker'),\n 'color-palette-generator': lazyWithRetry(() => import('./ColorPaletteGenerator.tsx'), 'ColorPaletteGenerator'),\n 'logic-flow-builder': lazyWithRetry(() => import('./LogicFlowBuilder.tsx'), 'LogicFlowBuilder'),\n 'meta-tag-editor': lazyWithRetry(() => import('./MetaTagEditor.tsx'), 'MetaTagEditor'),\n 'network-visualizer': lazyWithRetry(() => import('./NetworkVisualizer.tsx'), 'NetworkVisualizer'),\n 'responsive-tester': lazyWithRetry(() => import('./ResponsiveTester.tsx'), 'ResponsiveTester'),\n 'sass-scss-compiler': lazyWithRetry(() => import('./SassScssCompiler.tsx'), 'SassScssCompiler'),\n};\n\n// Map feature IDs to specific AI configurations\nconst aiConfigMap: Record<string, Feature['aiConfig']> = {\n 'ai-code-explainer': { model: 'gemini-2.5-flash' },\n 'ai-feature-builder': { model: 'gemini-2.5-flash' },\n 'ai-commit-generator': { model: 'gemini-2.5-flash' },\n 'ai-unit-test-generator': { model: 'gemini-2.5-flash' },\n 'regex-sandbox': { model: 'gemini-2.5-flash' },\n 'screenshot-to-component': { model: 'gemini-2.5-flash' },\n 'theme-designer': { model: 'gemini-2.5-flash' },\n 'ai-style-transfer': { model: 'gemini-2.5-flash' },\n 'ai-coding-challenge': { model: 'gemini-2.5-flash' },\n 'code-review-bot': { model: 'gemini-2.5-flash' },\n 'ai-pull-request-assistant': { model: 'gemini-2.5-flash' },\n 'ai-code-migrator': { model: 'gemini-2.5-flash' },\n 'visual-git-tree': { model: 'gemini-2.5-flash' },\n 'worker-thread-debugger': { model: 'gemini-2.5-flash' },\n 'ai-command-center': { model: 'gemini-2.5-flash' },\n 'ai-image-generator': { model: 'imagen-3.0-generate-002' },\n 'audio-to-code': { model: 'gemini-2.5-flash' },\n 'color-palette-generator': { model: 'gemini-2.5-flash' },\n 'xbrl-converter': { model: 'gemini-2.5-flash' },\n 'digital-whiteboard': { model: 'gemini-2.5-flash' },\n 'project-explorer': { model: 'gemini-2.5-flash' },\n};\n\nexport const ALL_FEATURES: Feature[] = RAW_FEATURES.map(feature => ({\n ...feature,\n component: componentMap[feature.id],\n aiConfig: aiConfigMap[feature.id],\n}));\n\nexport const FEATURES_MAP = new Map(ALL_FEATURES.map(f => [f.id, f]));","import React, { useState } from 'react';\nimport JSZip from 'jszip';\nimport { getAllFiles, commitFiles } from '../services/index.ts';\nimport { ArrowDownTrayIcon, XMarkIcon, GithubIcon } from './icons.tsx';\nimport { LoadingSpinner } from './shared/index.tsx';\nimport { useGlobalState } from '../contexts/GlobalStateContext.tsx';\n\ninterface CommitModalProps {\n fileCount: number;\n repoName: string;\n onCommit: (message: string) => void;\n onClose: () => void;\n isLoading: boolean;\n}\n\nconst CommitModal: React.FC<CommitModalProps> = ({ fileCount, repoName, onCommit, onClose, isLoading }) => {\n const [commitMessage, setCommitMessage] = useState(`feat: Add ${fileCount} new files via DevCore AI`);\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n if (commitMessage.trim()) {\n onCommit(commitMessage);\n }\n };\n\n return (\n <div className=\"fixed inset-0 bg-gray-900/80 backdrop-blur-sm z-40 flex items-center justify-center fade-in\">\n <form \n onSubmit={handleSubmit}\n className=\"bg-surface border border-border rounded-2xl shadow-2xl w-full max-w-lg m-4 p-6 animate-pop-in relative\"\n >\n <button type=\"button\" onClick={onClose} className=\"absolute top-3 right-3 p-1 text-text-secondary hover:bg-gray-100 rounded-full\">\n <XMarkIcon className=\"w-6 h-6\" />\n </button>\n <h2 className=\"text-xl font-bold mb-2\">Commit to Repository</h2>\n <p className=\"text-text-secondary mb-4\">\n You are committing <span className=\"font-bold text-primary\">{fileCount} file(s)</span> to <span className=\"font-bold text-primary\">{repoName}</span>.\n </p>\n <label htmlFor=\"commit-message\" className=\"block text-sm font-medium text-text-secondary mb-1\">Commit Message</label>\n <textarea\n id=\"commit-message\"\n value={commitMessage}\n onChange={(e) => setCommitMessage(e.target.value)}\n required\n className=\"w-full h-28 p-2 bg-background border border-border rounded-md text-sm\"\n placeholder=\"Enter your commit message...\"\n />\n <div className=\"mt-6 flex justify-end gap-3\">\n <button type=\"button\" onClick={onClose} className=\"px-6 py-2 bg-gray-200 text-gray-800 font-semibold rounded-lg hover:bg-gray-300\">\n Cancel\n </button>\n <button type=\"submit\" disabled={isLoading} className=\"btn-primary px-6 py-2 flex items-center justify-center min-w-[100px]\">\n {isLoading ? <LoadingSpinner /> : 'Commit Files'}\n </button>\n </div>\n </form>\n </div>\n );\n};\n\n\nexport const ActionManager: React.FC = () => {\n const { state } = useGlobalState();\n const [isLoading, setIsLoading] = useState<string | null>(null);\n const [isCommitModalOpen, setCommitModalOpen] = useState(false);\n const [filesToCommit, setFilesToCommit] = useState<{filePath: string, content: string}[]>([]);\n\n const handleDownloadZip = async () => {\n setIsLoading('zip');\n try {\n const files = await getAllFiles();\n if (files.length === 0) {\n alert(\"No files have been generated to download.\");\n return;\n }\n const zip = new JSZip();\n files.forEach(file => {\n const pathParts = file.filePath.split('/').filter(p => p);\n let currentFolder: JSZip | null = zip;\n if (pathParts.length > 1) {\n for (let i = 0; i < pathParts.length - 1; i++) {\n const folderName = pathParts[i];\n if (currentFolder) {\n currentFolder = currentFolder.folder(folderName);\n }\n }\n }\n if (currentFolder) {\n currentFolder.file(pathParts[pathParts.length - 1], file.content);\n }\n });\n const zipBlob = await zip.generateAsync({ type: 'blob' });\n const link = document.createElement('a');\n link.href = URL.createObjectURL(zipBlob);\n link.download = 'devcore-project.zip';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n } catch (error) {\n console.error(\"Failed to create ZIP file\", error);\n alert(`Error creating ZIP: ${error instanceof Error ? error.message : 'Unknown error'}`);\n } finally {\n setIsLoading(null);\n }\n };\n\n const handleOpenCommitModal = async () => {\n if (!state.selectedRepo) {\n alert(\"Please select a repository in the 'Connections' tab first.\");\n return;\n }\n setIsLoading('repo-check');\n const files = await getAllFiles();\n if (files.length === 0) {\n alert(\"No files have been generated to save.\");\n setIsLoading(null);\n return;\n }\n setFilesToCommit(files);\n setCommitModalOpen(true);\n setIsLoading(null);\n };\n\n const handleCommit = async (commitMessage: string) => {\n if (!state.selectedRepo) return;\n setIsLoading('repo-commit');\n try {\n await commitFiles(state.selectedRepo.owner, state.selectedRepo.repo, filesToCommit, commitMessage);\n alert(`Successfully committed ${filesToCommit.length} files to ${state.selectedRepo.owner}/${state.selectedRepo.repo}.`);\n setCommitModalOpen(false);\n } catch (error) {\n console.error(\"Failed to save to repository\", error);\n alert(`Error saving to repository: ${error instanceof Error ? error.message : 'Unknown error'}`);\n } finally {\n setIsLoading(null);\n }\n };\n\n return (\n <>\n <div className=\"absolute bottom-[calc(theme(spacing.4)_+_24px)] right-6 z-10 flex flex-col gap-3\">\n <button\n onClick={handleOpenCommitModal}\n disabled={!!isLoading || !state.selectedRepo}\n className=\"w-14 h-14 bg-[#24292e] text-white rounded-full flex items-center justify-center shadow-lg hover:bg-[#333] transition-colors disabled:bg-slate-600 disabled:cursor-not-allowed\"\n aria-label=\"Save generated files to repository\"\n title=\"Save to Repository\"\n >\n {isLoading === 'repo-check' ? <LoadingSpinner /> : <GithubIcon />}\n </button>\n <button\n onClick={handleDownloadZip}\n disabled={!!isLoading}\n className=\"w-14 h-14 bg-primary text-text-on-primary rounded-full flex items-center justify-center shadow-lg hover:opacity-90 transition-colors disabled:bg-slate-600\"\n aria-label=\"Download Project as ZIP\"\n title=\"Download Project as ZIP (Save to Drive)\"\n >\n {isLoading === 'zip' ? <LoadingSpinner /> : <ArrowDownTrayIcon />}\n </button>\n </div>\n {isCommitModalOpen && state.selectedRepo && (\n <CommitModal \n fileCount={filesToCommit.length}\n repoName={`${state.selectedRepo.owner}/${state.selectedRepo.repo}`}\n onCommit={handleCommit}\n onClose={() => setCommitModalOpen(false)}\n isLoading={isLoading === 'repo-commit'}\n />\n )}\n </>\n );\n};","import React from 'react';\nimport type { ViewType, SidebarItem } from '../types.ts';\nimport { useGlobalState } from '../contexts/GlobalStateContext.tsx';\nimport { ArrowLeftOnRectangleIcon } from './icons.tsx';\nimport { logout } from '../services/index.ts';\n\ninterface LeftSidebarProps {\n items: SidebarItem[];\n activeView: ViewType;\n onNavigate: (view: ViewType, props?: any) => void;\n}\n\nconst Tooltip: React.FC<{ text: string, children: React.ReactNode }> = ({ text, children }) => {\n return (\n <div className=\"group relative flex justify-center\">\n {children}\n <span className=\"absolute left-14 p-2 scale-0 transition-all rounded bg-gray-800 border border-gray-900 text-xs text-white group-hover:scale-100 whitespace-nowrap z-50\">\n {text}\n </span>\n </div>\n );\n};\n\nexport const LeftSidebar: React.FC<LeftSidebarProps> = ({ items, activeView, onNavigate }) => {\n const { state, dispatch } = useGlobalState();\n const { user } = state;\n\n const handleLogout = async () => {\n await logout(); // Call the simulated logout service\n dispatch({ type: 'LOGOUT' });\n };\n\n return (\n <nav className=\"w-20 h-full bg-surface border-r border-border flex flex-col py-4 px-2\">\n <div className=\"flex-shrink-0 flex justify-center p-2 mb-4\">\n <svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className=\"text-primary\">\n <path d=\"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n </div>\n <div className=\"flex-1 overflow-y-auto no-scrollbar flex flex-col items-center gap-2 pt-4\">\n {items.map((item) => {\n const isActive = activeView === item.view;\n\n return (\n <Tooltip key={item.id} text={item.label}>\n <button\n onClick={() => {\n if (item.action) {\n item.action();\n } else {\n onNavigate(item.view, item.props);\n }\n }}\n className={`flex items-center justify-center w-12 h-12 rounded-lg transition-colors duration-200\n ${isActive ? 'bg-primary/10 text-primary' : 'text-text-secondary hover:bg-gray-100'}`\n }\n >\n {item.icon}\n </button>\n </Tooltip>\n );\n })}\n </div>\n\n <div className=\"mt-auto flex-shrink-0 flex flex-col items-center gap-2\">\n {user && (\n <Tooltip text={user.name || user.login}>\n <img src={user.avatar_url} alt={user.login} className=\"w-10 h-10 rounded-full border-2 border-border\" />\n </Tooltip>\n )}\n <Tooltip text=\"Logout\">\n <button\n onClick={handleLogout}\n className=\"flex items-center justify-center w-12 h-12 rounded-lg text-text-secondary hover:bg-gray-100\"\n >\n <ArrowLeftOnRectangleIcon />\n </button>\n </Tooltip>\n </div>\n </nav>\n );\n};","import React, { useState, useEffect } from 'react';\nimport { GitBranchIcon, BellIcon } from './icons.tsx';\n\ntype BgImageStatus = 'loading' | 'loaded' | 'error';\n\nconst StatusMessage: React.FC<{ status: BgImageStatus }> = ({ status }) => {\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n setVisible(true);\n if (status === 'error') {\n const timer = setTimeout(() => setVisible(false), 5000);\n return () => clearTimeout(timer);\n }\n }, [status]);\n\n if (!visible || status === 'loaded') {\n return null;\n }\n\n if (status === 'loading') {\n return (\n <div className=\"flex items-center space-x-2\">\n <div className=\"w-2 h-2 rounded-full bg-primary animate-pulse\"></div>\n <span>Generating background...</span>\n </div>\n );\n }\n\n if (status === 'error') {\n return (\n <div className=\"flex items-center space-x-2 text-yellow-600\">\n <span>Background failed. Using fallback.</span>\n </div>\n );\n }\n\n return null;\n};\n\nconst Clock: React.FC = () => {\n const [time, setTime] = useState(() => new Date());\n\n useEffect(() => {\n const timerId = setInterval(() => {\n setTime(new Date());\n }, 1000);\n\n return () => clearInterval(timerId);\n }, []);\n\n return <span>{time.toLocaleTimeString()}</span>\n}\n\n\nexport const StatusBar: React.FC<{ bgImageStatus: BgImageStatus }> = ({ bgImageStatus }) => {\n return (\n <footer className=\"w-full bg-surface/70 backdrop-blur-sm border-t border-border px-4 py-1 flex items-center justify-between text-xs text-text-secondary\">\n <div className=\"flex items-center space-x-4\">\n <div className=\"flex items-center space-x-1 cursor-pointer hover:text-primary transition-colors\">\n <GitBranchIcon />\n <span>main</span>\n </div>\n <StatusMessage status={bgImageStatus} />\n </div>\n <div className=\"flex items-center space-x-4\">\n <Clock />\n <span className=\"hidden sm:block\">Ready</span>\n <div className=\"flex items-center space-x-1 cursor-pointer hover:text-primary transition-colors\">\n <BellIcon />\n <span>0</span>\n </div>\n <span className=\"hidden sm:block\">\n Powered by Gemini\n </span>\n </div>\n </footer>\n );\n};","\nimport React, { useState, useEffect, useMemo } from 'react';\nimport { ALL_FEATURES } from './features/index.ts';\nimport type { ViewType } from '../types.ts';\n\ninterface CommandPaletteProps {\n isOpen: boolean;\n onClose: () => void;\n onSelect: (view: ViewType) => void;\n}\n\nexport const CommandPalette: React.FC<CommandPaletteProps> = ({ isOpen, onClose, onSelect }) => {\n const [searchTerm, setSearchTerm] = useState('');\n const [selectedIndex, setSelectedIndex] = useState(0);\n\n useEffect(() => {\n if (!isOpen) {\n setSearchTerm('');\n setSelectedIndex(0);\n }\n }, [isOpen]);\n \n const commandOptions = useMemo(() => {\n const navigationCommands = [\n { id: 'ai-feature-builder', name: 'Go to AI Builder', category: 'Navigation', icon: <span />, description: ''},\n ];\n \n const featureCommands = ALL_FEATURES.map(f => ({...f, name: `Open: ${f.name}`}));\n\n return [\n ...navigationCommands,\n ...featureCommands,\n ].filter(\n (feature) =>\n feature.name.toLowerCase().includes(searchTerm.toLowerCase()) ||\n feature.category.toLowerCase().includes(searchTerm.toLowerCase())\n );\n }, [searchTerm]);\n\n useEffect(() => {\n setSelectedIndex(0);\n }, [commandOptions.length]);\n\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (!isOpen) return;\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n setSelectedIndex((prev) => (prev + 1) % commandOptions.length);\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n setSelectedIndex((prev) => (prev - 1 + commandOptions.length) % commandOptions.length);\n } else if (e.key === 'Enter') {\n e.preventDefault();\n const selected = commandOptions[selectedIndex];\n if (selected) {\n onSelect(selected.id as ViewType);\n }\n }\n };\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [isOpen, commandOptions, selectedIndex, onSelect]);\n\n if (!isOpen) return null;\n\n return (\n <div className=\"fixed inset-0 bg-gray-900/80 backdrop-blur-sm z-50 flex items-start justify-center pt-20\" onClick={onClose}>\n <div\n className=\"w-full max-w-xl bg-surface border border-border rounded-lg shadow-2xl overflow-hidden\"\n onClick={(e) => e.stopPropagation()}\n >\n <input\n type=\"text\"\n placeholder=\"Type a command or search...\"\n value={searchTerm}\n onChange={(e) => setSearchTerm(e.target.value)}\n autoFocus\n className=\"w-full p-4 bg-surface text-text-primary text-lg focus:outline-none border-b border-border\"\n />\n <ul className=\"max-h-96 overflow-y-auto p-2\">\n {commandOptions.length > 0 ? (\n commandOptions.map((item, index) => (\n <li\n key={item.id + index}\n onMouseDown={() => {\n onSelect(item.id as ViewType);\n }}\n className={`flex items-center justify-between p-3 rounded-md cursor-pointer ${\n selectedIndex === index ? 'bg-primary/10 text-primary' : 'hover:bg-gray-100'\n }`}\n >\n <div className=\"flex items-center space-x-3\">\n <div className=\"text-text-secondary\">{item.icon}</div>\n <span className=\"text-text-primary\">{item.name}</span>\n </div>\n <span className=\"text-xs text-text-secondary bg-gray-100 px-2 py-1 rounded\">{item.category}</span>\n </li>\n ))\n ) : (\n <li className=\"p-4 text-center text-text-secondary\">No results found.</li>\n )}\n </ul>\n </div>\n </div>\n );\n};","import { useState } from 'react';\n\nexport const useLocalStorage = <T,>(key: string, initialValue: T) => {\n const [storedValue, setStoredValue] = useState<T>(() => {\n try {\n const consent = window.localStorage.getItem('devcore_ls_consent');\n if (consent !== 'granted') return initialValue;\n\n const item = window.localStorage.getItem(key);\n return item ? JSON.parse(item) : initialValue;\n } catch (error) {\n console.error(`Error reading localStorage key “${key}”:`, error);\n return initialValue;\n }\n });\n\n const setValue = (value: T | ((val: T) => T)) => {\n try {\n const consent = window.localStorage.getItem('devcore_ls_consent');\n if (consent !== 'granted') {\n // If consent is not granted, only update the in-memory state\n const valueToStore = value instanceof Function ? value(storedValue) : value;\n setStoredValue(valueToStore);\n return;\n };\n\n const valueToStore = value instanceof Function ? value(storedValue) : value;\n setStoredValue(valueToStore);\n window.localStorage.setItem(key, JSON.stringify(valueToStore));\n } catch (error) {\n console.error(`Error setting localStorage key “${key}”:`, error);\n }\n };\n\n return [storedValue, setValue] as const;\n};","import React from 'react';\nimport { useGlobalState } from '../contexts/GlobalStateContext.tsx';\nimport { clearAllFiles } from '../services/index.ts';\nimport { useLocalStorage } from '../hooks/useLocalStorage.ts';\nimport { ALL_FEATURES } from './features/index.ts';\nimport { SunIcon, MoonIcon, TrashIcon, ArrowLeftOnRectangleIcon } from './icons.tsx';\n\nconst ToggleSwitch: React.FC<{ checked: boolean, onChange: () => void }> = ({ checked, onChange }) => {\n return (\n <button\n role=\"switch\"\n aria-checked={checked}\n onClick={onChange}\n className={`${checked ? 'bg-primary' : 'bg-gray-300'} relative inline-flex h-6 w-11 items-center rounded-full transition-colors`}\n >\n <span className={`${checked ? 'translate-x-6' : 'translate-x-1'} inline-block h-4 w-4 transform rounded-full bg-white transition-transform`} />\n </button>\n );\n};\n\nexport const SettingsView: React.FC = () => {\n const { state, dispatch } = useGlobalState();\n const [, setSnippets] = useLocalStorage('devcore_snippets', []);\n const [, setNotes] = useLocalStorage('devcore_moodboard', []);\n const [, setDevNotes] = useLocalStorage('devcore_notes', []);\n\n const handleLogout = () => {\n if (window.confirm(\"Are you sure you want to log out?\")) {\n if (window.google) {\n window.google.accounts.id.disableAutoSelect();\n }\n dispatch({ type: 'LOGOUT' });\n }\n };\n \n const handleClearGeneratedFiles = async () => {\n if (window.confirm(\"Are you sure you want to delete all AI-generated files? This cannot be undone.\")) {\n await clearAllFiles();\n alert(\"Generated files cleared.\");\n }\n };\n \n const handleClearSnippets = () => {\n if (window.confirm(\"Are you sure you want to delete all saved snippets? This cannot be undone.\")) {\n setSnippets([]);\n alert(\"Snippets cleared.\");\n }\n };\n\n const handleClearNotes = () => {\n if (window.confirm(\"Are you sure you want to delete all notes and moodboard items? This cannot be undone.\")) {\n setNotes([]);\n setDevNotes([]);\n alert(\"Notes & Moodboard cleared.\");\n }\n };\n\n return (\n <div className=\"w-full text-text-primary\">\n <header className=\"sticky top-0 z-10 p-4 sm:p-6 lg:p-8 border-b border-border bg-surface/80 backdrop-blur-sm\">\n <div className=\"max-w-4xl mx-auto w-full\">\n <h1 className=\"text-4xl font-extrabold tracking-tight\">Settings</h1>\n <p className=\"mt-2 text-lg text-text-secondary\">Manage application preferences and data.</p>\n </div>\n </header>\n\n <div className=\"p-4 sm:p-6 lg:p-8 space-y-8 max-w-4xl mx-auto w-full\">\n {/* Appearance Section */}\n <section>\n <h2 className=\"text-2xl font-bold border-b border-border pb-2 mb-4\">Appearance</h2>\n <div className=\"flex items-center justify-between p-4 bg-surface border border-border rounded-lg\">\n <span className=\"font-medium\">Theme</span>\n <p className=\"text-sm text-text-secondary\">\n Light mode is enforced in the current version.\n </p>\n </div>\n </section>\n \n {/* Feature Visibility Section */}\n <section>\n <h2 className=\"text-2xl font-bold border-b border-border pb-2 mb-4\">Feature Visibility</h2>\n <p className=\"text-sm text-text-secondary mb-4\">\n Hide or show features in the main sidebar. This does not disable them; they can still be accessed via the AI Command Center.\n </p>\n <div className=\"space-y-2\">\n {ALL_FEATURES.filter(f => f.id !== 'ai-command-center').map(feature => {\n const isVisible = !state.hiddenFeatures.includes(feature.id);\n return (\n <div key={feature.id} className=\"flex items-center justify-between p-4 bg-surface border border-border rounded-lg\">\n <div>\n <p className=\"font-medium\">{feature.name}</p>\n <p className=\"text-sm text-text-secondary\">{feature.description}</p>\n </div>\n <ToggleSwitch \n checked={isVisible}\n onChange={() => dispatch({ type: 'TOGGLE_FEATURE_VISIBILITY', payload: { featureId: feature.id } })}\n />\n </div>\n );\n })}\n </div>\n </section>\n \n {/* Account Section */}\n <section>\n <h2 className=\"text-2xl font-bold border-b border-border pb-2 mb-4\">Account</h2>\n <div className=\"flex items-center justify-between p-4 bg-surface border border-border rounded-lg\">\n <div>\n <p className=\"font-medium\">Sign Out</p>\n <p className=\"text-sm text-text-secondary\">\n {state.user ? `Logged in as ${state.user.login}` : 'Not logged in'}\n </p>\n </div>\n <button onClick={handleLogout} className=\"flex items-center gap-2 px-4 py-2 rounded-md bg-red-500/10 text-red-600 hover:bg-red-500/20 transition-colors\">\n <ArrowLeftOnRectangleIcon /> Logout\n </button>\n </div>\n </section>\n \n {/* Data Management Section */}\n <section>\n <h2 className=\"text-2xl font-bold border-b border-border pb-2 mb-4\">Data Management</h2>\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between p-4 bg-surface border border-border rounded-lg\">\n <div>\n <p className=\"font-medium\">Clear Generated Files</p>\n <p className=\"text-sm text-text-secondary\">Removes all files created by the AI Feature Builder.</p>\n </div>\n <button onClick={handleClearGeneratedFiles} className=\"flex items-center gap-2 px-4 py-2 rounded-md bg-red-500/10 text-red-600 hover:bg-red-500/20 transition-colors\">\n <TrashIcon /> Clear\n </button>\n </div>\n <div className=\"flex items-center justify-between p-4 bg-surface border border-border rounded-lg\">\n <div>\n <p className=\"font-medium\">Clear Snippet Vault</p>\n <p className=\"text-sm text-text-secondary\">Removes all saved code snippets.</p>\n </div>\n <button onClick={handleClearSnippets} className=\"flex items-center gap-2 px-4 py-2 rounded-md bg-red-500/10 text-red-600 hover:bg-red-500/20 transition-colors\">\n <TrashIcon /> Clear\n </button>\n </div>\n <div className=\"flex items-center justify-between p-4 bg-surface border border-border rounded-lg\">\n <div>\n <p className=\"font-medium\">Clear Notes & Moodboard</p>\n <p className=\"text-sm text-text-secondary\">Removes all items from Dev Notes and Moodboard.</p>\n </div>\n <button onClick={handleClearNotes} className=\"flex items-center gap-2 px-4 py-2 rounded-md bg-red-500/10 text-red-600 hover:bg-red-500/20 transition-colors\">\n <TrashIcon /> Clear\n </button>\n </div>\n </div>\n </section>\n\n {/* About Section */}\n <section>\n <h2 className=\"text-2xl font-bold border-b border-border pb-2 mb-4\">About</h2>\n <div className=\"p-4 bg-surface border border-border rounded-lg text-text-secondary\">\n <p><strong>DevCore AI Toolkit</strong></p>\n <p>Version 1.1.0</p>\n <p>Created by James Burvel O'Callaghan III for Citibank Demo Business Inc Powered by Google Gemini</p>\n </div>\n </section>\n </div>\n </div>\n );\n};","import React, { useState, useCallback } from 'react';\nimport { Type, FunctionDeclaration } from \"@google/genai\";\nimport { getInferenceFunction, CommandResponse, FEATURE_TAXONOMY, logError } from '../../services/index.ts';\nimport { useGlobalState } from '../../contexts/GlobalStateContext.tsx';\nimport { CommandLineIcon } from '../icons.tsx';\nimport { LoadingSpinner } from '../shared/index.tsx';\nimport { ALL_FEATURES } from './index.ts';\n\nconst functionDeclarations: FunctionDeclaration[] = [\n {\n name: 'navigateTo',\n description: 'Navigates to a specific feature page.',\n parameters: {\n type: Type.OBJECT,\n properties: {\n featureId: { \n type: Type.STRING, \n description: 'The ID of the feature to navigate to.',\n enum: ALL_FEATURES.map(f => f.id)\n },\n },\n required: ['featureId'],\n },\n },\n {\n name: 'runFeatureWithInput',\n description: 'Navigates to a feature and passes initial data to it.',\n parameters: {\n type: Type.OBJECT,\n properties: {\n featureId: { \n type: Type.STRING, \n description: 'The ID of the feature to run.',\n enum: ALL_FEATURES.map(f => f.id)\n },\n props: {\n type: Type.OBJECT,\n description: 'An object containing the initial properties for the feature, based on its required inputs.',\n properties: {\n initialCode: { type: Type.STRING },\n initialPrompt: { type: Type.STRING },\n beforeCode: { type: Type.STRING },\n afterCode: { type: Type.STRING },\n logInput: { type: Type.STRING },\n diff: { type: Type.STRING },\n codeInput: { type: Type.STRING },\n jsonInput: { type: Type.STRING },\n }\n }\n },\n required: ['featureId', 'props']\n }\n }\n];\n\nconst knowledgeBase = FEATURE_TAXONOMY.map(f => `- ${f.name} (${f.id}): ${f.description} Inputs: ${f.inputs}`).join('\\n');\n\nconst ExamplePromptButton: React.FC<{ text: string, onClick: (text: string) => void }> = ({ text, onClick }) => (\n <button\n onClick={() => onClick(text)}\n className=\"px-3 py-1.5 bg-surface border border-border rounded-full text-xs hover:bg-gray-100 transition-colors\"\n >\n {text}\n </button>\n)\n\nexport const AiCommandCenter: React.FC = () => {\n const { dispatch } = useGlobalState();\n const [prompt, setPrompt] = useState('');\n const [isLoading, setIsLoading] = useState(false);\n const [lastResponse, setLastResponse] = useState('');\n\n const handleCommand = useCallback(async () => {\n if (!prompt.trim()) return;\n\n setIsLoading(true);\n setLastResponse('');\n\n try {\n const response: CommandResponse = await getInferenceFunction(prompt, functionDeclarations, knowledgeBase);\n \n if (response.functionCalls && response.functionCalls.length > 0) {\n const call = response.functionCalls[0];\n const { name, args } = call;\n\n setLastResponse(`Understood! Executing command: ${name}`);\n\n switch (name) {\n case 'navigateTo':\n dispatch({ type: 'SET_VIEW', payload: { view: args.featureId }});\n break;\n case 'runFeatureWithInput':\n dispatch({ type: 'SET_VIEW', payload: { view: args.featureId, props: args.props } });\n break;\n default:\n setLastResponse(`Unknown command: ${name}`);\n }\n setPrompt('');\n } else {\n setLastResponse(response.text);\n }\n\n } catch (err) {\n logError(err as Error, { prompt });\n setLastResponse(err instanceof Error ? err.message : 'An unknown error occurred.');\n } finally {\n setIsLoading(false);\n }\n }, [prompt, dispatch]);\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleCommand();\n }\n };\n \n const handleExampleClick = (text: string) => {\n setPrompt(text);\n }\n\n return (\n <div className=\"h-full flex flex-col p-4 sm:p-6 lg:p-8 text-text-primary\">\n <header className=\"mb-6 text-center\">\n <h1 className=\"text-4xl font-extrabold tracking-tight flex items-center justify-center\">\n <CommandLineIcon />\n <span className=\"ml-3\">AI Command Center</span>\n </h1>\n <p className=\"mt-2 text-lg text-text-secondary\">What would you like to do?</p>\n </header>\n \n <div className=\"flex-grow flex flex-col justify-end max-w-3xl w-full mx-auto\">\n {lastResponse && (\n <div className=\"mb-4 p-4 bg-surface rounded-lg text-text-primary border border-border\">\n <p><strong>AI:</strong> {lastResponse}</p>\n </div>\n )}\n <div className=\"relative\">\n <textarea\n value={prompt}\n onChange={e => setPrompt(e.target.value)}\n onKeyDown={handleKeyDown}\n disabled={isLoading}\n placeholder='Try \"explain this code: const a = 1;\" or \"open the theme designer\"'\n className=\"w-full p-4 pr-28 rounded-lg bg-surface border border-border focus:ring-2 focus:ring-primary focus:outline-none resize-none shadow-sm\"\n rows={2}\n />\n <button\n onClick={handleCommand}\n disabled={isLoading}\n className=\"btn-primary absolute right-3 top-1/2 -translate-y-1/2 px-4 py-2\"\n >\n {isLoading ? <LoadingSpinner/> : 'Send'}\n </button>\n </div>\n <div className=\"flex flex-wrap items-center justify-center gap-2 mt-4\">\n <ExamplePromptButton text=\"Open Theme Designer\" onClick={handleExampleClick} />\n <ExamplePromptButton text=\"Generate a commit for a bug fix\" onClick={handleExampleClick} />\n <ExamplePromptButton text=\"Create a regex for email validation\" onClick={handleExampleClick} />\n </div>\n <p className=\"text-xs text-text-secondary text-center mt-2\">Press Enter to send, Shift+Enter for new line.</p>\n </div>\n </div>\n );\n};","import React from 'react';\n\n// Replace with your GitHub OAuth app client ID\nconst CLIENT_ID = 'Ov23li6nSMUkwPE2HTBX'; \n// The Redirect URI should point back to your app's main page to handle the callback\nconst REDIRECT_URI = window.location.origin;\n\nexport const LoginView: React.FC = () => {\n const handleLogin = () => {\n // We request 'repo' scope for full repository access and 'read:user' for profile info\n const githubAuthURL = `https://github.com/login/oauth/authorize?client_id=${CLIENT_ID}&redirect_uri=${encodeURIComponent(REDIRECT_URI)}&scope=repo,read:user`;\n window.location.href = githubAuthURL;\n };\n\n return (\n <div className=\"h-screen w-screen flex items-center justify-center bg-background text-text-primary font-sans\">\n <div className=\"bg-surface p-8 sm:p-12 rounded-2xl shadow-2xl text-center border border-border animate-pop-in max-w-lg m-4\">\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className=\"text-primary mx-auto mb-4\">\n <path d=\"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n <h1 className=\"text-3xl font-extrabold tracking-tight mb-2\">Welcome to DevCore AI</h1>\n <p className=\"text-text-secondary mb-8\">Sign in with GitHub to continue to your AI-powered toolkit.</p>\n <button\n onClick={handleLogin}\n className=\"bg-[#24292e] text-white border-none px-6 py-3 font-semibold text-lg rounded-lg cursor-pointer flex items-center justify-center gap-3 w-full hover:bg-[#333] transition-colors\"\n aria-label=\"Login with GitHub\"\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" className=\"fill-white w-6 h-6\">\n <path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M12 0C5.372 0 0 5.372 0 12c0 5.302 3.438 9.8 8.205 11.387.6.113.82-.26.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.387-1.333-1.757-1.333-1.757-1.09-.745.083-.73.083-.73 1.205.084 1.84 1.236 1.84 1.236 1.07 1.835 2.807 1.305 3.492.997.108-.776.418-1.305.76-1.605-2.665-.3-5.466-1.335-5.466-5.93 0-1.31.47-2.38 1.235-3.22-.123-.303-.535-1.523.117-3.176 0 0 1.008-.322 3.3 1.23a11.5 11.5 0 0 1 3-.404c1.02.005 2.045.138 3 .404 2.29-1.552 3.296-1.23 3.296-1.23.653 1.653.24 2.873.12 3.176.77.84 1.232 1.91 1.232 3.22 0 4.61-2.807 5.625-5.48 5.92.43.372.823 1.103.823 2.222 0 1.606-.015 2.896-.015 3.286 0 .32.218.694.825.576C20.565 21.795 24 17.298 24 12c0-6.628-5.372-12-12-12z\"/>\n </svg>\n Login with GitHub\n </button>\n </div>\n </div>\n );\n};","import React, { useState, useEffect, useCallback } from 'react';\nimport { useGlobalState } from '../../contexts/GlobalStateContext.tsx';\nimport type { FileNode } from '../../types.ts';\nimport { getRepoTree, getFileContent } from '../../services/index.ts';\nimport { LoadingSpinner } from '../shared/index.tsx';\nimport { FolderIcon, DocumentIcon } from '../icons.tsx';\n\n// Recursive component to render the file tree\nconst FileTree: React.FC<{ node: FileNode, onFileSelect: (path: string) => void, level?: number }> = ({ node, onFileSelect, level = 0 }) => {\n const [isOpen, setIsOpen] = useState(level < 2); // Auto-open first few levels\n const isFolder = node.type === 'folder';\n\n const handleToggle = () => {\n if (isFolder) {\n setIsOpen(!isOpen);\n }\n };\n \n const handleFileClick = (e: React.MouseEvent) => {\n e.stopPropagation();\n if (!isFolder) {\n onFileSelect(node.path);\n } else {\n handleToggle();\n }\n };\n\n return (\n <div className=\"text-sm\">\n <div \n className=\"flex items-center p-1 rounded-md cursor-pointer hover:bg-gray-100\"\n onClick={handleFileClick}\n style={{ paddingLeft: `${level * 16}px`}}\n >\n {isFolder ? <FolderIcon /> : <DocumentIcon />}\n <span className=\"ml-2 truncate\">{node.name}</span>\n </div>\n {isFolder && isOpen && node.children && (\n <div>\n {node.children.sort((a,b) => a.type === 'folder' ? -1 : 1).map(child => (\n <FileTree key={child.path} node={child} onFileSelect={onFileSelect} level={level + 1} />\n ))}\n </div>\n )}\n </div>\n );\n};\n\nexport const ProjectExplorer: React.FC = () => {\n const { state, dispatch } = useGlobalState();\n const { selectedRepo, projectFiles } = state;\n const [isLoading, setIsLoading] = useState(false);\n const [activeFileContent, setActiveFileContent] = useState<string | null>(null);\n const [activeFilePath, setActiveFilePath] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n\n useEffect(() => {\n if (selectedRepo && !projectFiles) {\n setIsLoading(true);\n setError(null);\n getRepoTree(selectedRepo.owner, selectedRepo.repo)\n .then(tree => dispatch({ type: 'LOAD_PROJECT_FILES', payload: tree }))\n .catch(err => {\n console.error(err);\n setError('Could not load repository file tree. It might be empty or you may not have access.');\n })\n .finally(() => setIsLoading(false));\n } else if (!selectedRepo && projectFiles) {\n // Clear files if repo is deselected\n dispatch({ type: 'LOAD_PROJECT_FILES', payload: null });\n }\n }, [selectedRepo, projectFiles, dispatch]);\n \n const handleFileSelect = useCallback(async (path: string) => {\n if (!selectedRepo) return;\n setIsLoading(true);\n setActiveFilePath(path);\n setActiveFileContent(null);\n setError(null);\n try {\n const content = await getFileContent(selectedRepo.owner, selectedRepo.repo, path);\n setActiveFileContent(content);\n } catch (e) {\n console.error(e);\n setError(`Could not load file: ${path}`);\n setActiveFileContent(null);\n } finally {\n setIsLoading(false);\n }\n }, [selectedRepo]);\n\n if (!selectedRepo) {\n return (\n <div className=\"h-full flex flex-col items-center justify-center text-center text-text-secondary p-4\">\n <FolderIcon />\n <h2 className=\"text-lg font-semibold mt-2\">No Repository Selected</h2>\n <p>Please select a repository in the 'Connections' tab to explore its files.</p>\n </div>\n );\n }\n \n if (isLoading && !projectFiles) {\n return (\n <div className=\"h-full flex items-center justify-center\">\n <LoadingSpinner />\n <span className=\"ml-2 text-text-secondary\">Loading repository tree...</span>\n </div>\n )\n }\n\n if (error && !projectFiles) {\n return (\n <div className=\"h-full flex flex-col items-center justify-center text-red-500 p-4\">\n <h2 className=\"text-lg font-semibold\">Error Loading Repository</h2>\n <p>{error}</p>\n </div>\n );\n }\n\n return (\n <div className=\"h-full flex\">\n <aside className=\"w-1/3 max-w-xs bg-surface border-r border-border p-2 overflow-y-auto\">\n {projectFiles && <FileTree node={projectFiles} onFileSelect={handleFileSelect} />}\n </aside>\n <main className=\"flex-1 bg-background p-4 overflow-y-auto\">\n {isLoading && activeFilePath && \n <div className=\"h-full flex items-center justify-center\">\n <LoadingSpinner />\n <span className=\"ml-2 text-text-secondary\">Loading {activeFilePath}...</span>\n </div>\n }\n {error && activeFilePath && <div className=\"p-4 text-red-500\">{error}</div>}\n {!isLoading && activeFileContent !== null && (\n <div className=\"h-full flex flex-col\">\n <h3 className=\"font-mono text-sm mb-2 text-text-secondary flex-shrink-0\">{activeFilePath}</h3>\n <div className=\"flex-grow bg-surface rounded-md border border-border overflow-auto\">\n <pre className=\"p-4 text-sm whitespace-pre-wrap\">\n <code>{activeFileContent}</code>\n </pre>\n </div>\n </div>\n )}\n {!isLoading && activeFileContent === null && !error && (\n <div className=\"h-full flex items-center justify-center text-text-secondary\">\n <p>Select a file to view its content.</p>\n </div>\n )}\n </main>\n </div>\n );\n};\n","import React, { useState, useEffect } from 'react';\nimport { useGlobalState } from '../../contexts/GlobalStateContext.tsx';\nimport { GithubIcon } from '../icons.tsx';\nimport { getRepos, deleteRepo } from '../../services/index.ts';\nimport type { Repo } from '../../types.ts';\nimport { LoadingSpinner } from '../shared/index.tsx';\n\n\nconst ConnectionCard: React.FC<{\n name: string;\n icon: React.ReactNode;\n isConnected: boolean;\n userLogin?: string;\n onDisconnect: () => void;\n}> = ({ name, icon, isConnected, userLogin, onDisconnect }) => {\n return (\n <div className=\"bg-surface border border-border rounded-lg p-6 flex items-center justify-between\">\n <div className=\"flex items-center gap-4\">\n <div className=\"w-10 h-10\">{icon}</div>\n <div>\n <h3 className=\"text-lg font-bold text-text-primary\">{name}</h3>\n <p className={`text-sm ${isConnected ? 'text-green-600' : 'text-text-secondary'}`}>\n {isConnected ? `Connected as ${userLogin}` : 'Not Connected'}\n </p>\n </div>\n </div>\n {isConnected && (\n <button onClick={onDisconnect} className=\"px-4 py-2 bg-red-100 text-red-700 font-semibold rounded-md hover:bg-red-200\">Disconnect</button>\n )}\n </div>\n );\n};\n\nconst RepoSelector: React.FC = () => {\n const { state, dispatch } = useGlobalState();\n const [repos, setRepos] = useState<Repo[]>([]);\n const [isLoading, setIsLoading] = useState(false);\n \n useEffect(() => {\n if (state.isGithubConnected) {\n setIsLoading(true);\n getRepos().then(setRepos).finally(() => setIsLoading(false));\n }\n }, [state.isGithubConnected]);\n\n const handleSelectRepo = (fullName: string) => {\n if (!fullName) {\n dispatch({ type: 'SET_SELECTED_REPO', payload: null });\n dispatch({ type: 'LOAD_PROJECT_FILES', payload: null });\n return;\n }\n const [owner, repo] = fullName.split('/');\n dispatch({ type: 'SET_SELECTED_REPO', payload: { owner, repo } });\n };\n\n const handleDeleteRepo = async () => {\n if (!state.selectedRepo) return;\n const { owner, repo } = state.selectedRepo;\n if (window.confirm(`Are you sure you want to PERMANENTLY DELETE the repository \"${owner}/${repo}\"? This action cannot be undone.`)) {\n try {\n await deleteRepo(owner, repo);\n dispatch({ type: 'SET_SELECTED_REPO', payload: null });\n dispatch({ type: 'LOAD_PROJECT_FILES', payload: null });\n setIsLoading(true);\n getRepos().then(setRepos).finally(() => setIsLoading(false));\n } catch (e) {\n alert(\"Failed to delete repository.\");\n }\n }\n };\n\n return (\n <div className=\"bg-surface border border-border rounded-lg p-6\">\n <h3 className=\"text-lg font-bold text-text-primary mb-2\">Active Repository</h3>\n <p className=\"text-sm text-text-secondary mb-4\">Select a repository for the AI to interact with in the Project Explorer and other tools.</p>\n {isLoading ? <LoadingSpinner /> : (\n <div className=\"flex items-center gap-2\">\n <select\n value={state.selectedRepo ? `${state.selectedRepo.owner}/${state.selectedRepo.repo}` : ''}\n onChange={e => handleSelectRepo(e.target.value)}\n className=\"flex-grow p-2 rounded bg-background border border-border\"\n >\n <option value=\"\">-- Select a Repository --</option>\n {repos.map(r => <option key={r.id} value={r.full_name}>{r.full_name}</option>)}\n </select>\n {state.selectedRepo && (\n <button onClick={handleDeleteRepo} className=\"px-4 py-2 bg-red-100 text-red-700 font-semibold rounded-md hover:bg-red-200\">Delete</button>\n )}\n </div>\n )}\n </div>\n );\n}\n\nexport const Connections: React.FC = () => {\n const { state, dispatch } = useGlobalState();\n const { isGithubConnected, user } = state;\n \n const handleDisconnectGitHub = () => {\n dispatch({ type: 'LOGOUT' });\n };\n\n return (\n <div className=\"h-full p-4 sm:p-6 lg:p-8\">\n <div className=\"max-w-4xl mx-auto\">\n <header className=\"mb-8\">\n <h1 className=\"text-4xl font-extrabold tracking-tight\">Connections</h1>\n <p className=\"mt-2 text-lg text-text-secondary\">Manage your GitHub connection to unlock powerful workflows.</p>\n </header>\n\n <div className=\"space-y-6\">\n <ConnectionCard\n name=\"GitHub\"\n icon={<GithubIcon />}\n isConnected={isGithubConnected}\n userLogin={user?.login}\n onDisconnect={handleDisconnectGitHub}\n />\n {isGithubConnected && <RepoSelector />}\n </div>\n </div>\n </div>\n );\n};","import React, { Suspense, useCallback, useMemo, useState, useEffect } from 'react';\nimport { ErrorBoundary } from './components/ErrorBoundary.tsx';\nimport { useGlobalState } from './contexts/GlobalStateContext.tsx';\nimport { logEvent } from './services/telemetryService.ts';\nimport { ALL_FEATURES, FEATURES_MAP } from './components/features/index.ts';\nimport type { ViewType, FeatureId, SidebarItem } from './types.ts';\nimport { ActionManager } from './components/ActionManager.tsx';\nimport { LeftSidebar } from './components/LeftSidebar.tsx';\nimport { StatusBar } from './components/StatusBar.tsx';\nimport { CommandPalette } from './components/CommandPalette.tsx';\nimport { SettingsView } from './components/SettingsView.tsx';\nimport { Cog6ToothIcon, HomeIcon, FolderIcon, LinkIcon } from './components/icons.tsx';\nimport { AiCommandCenter } from './components/features/AiCommandCenter.tsx';\nimport { LoginView } from './components/LoginView.tsx';\nimport { ProjectExplorer } from './components/features/ProjectExplorer.tsx';\nimport { Connections } from './components/features/Connections.tsx';\n\n\nexport const LoadingIndicator: React.FC = () => (\n <div className=\"w-full h-full flex items-center justify-center bg-surface\">\n <div className=\"flex items-center justify-center space-x-2\">\n <div className=\"w-4 h-4 rounded-full bg-primary animate-pulse\" style={{ animationDelay: '0s' }}></div>\n <div className=\"w-4 h-4 rounded-full bg-primary animate-pulse\" style={{ animationDelay: '0.2s' }}></div>\n <div className=\"w-4 h-4 rounded-full bg-primary animate-pulse\" style={{ animationDelay: '0.4s' }}></div>\n <span className=\"text-text-secondary ml-2\">Loading Feature...</span>\n </div>\n </div>\n);\n\ninterface LocalStorageConsentModalProps {\n onAccept: () => void;\n onDecline: () => void;\n}\n\nconst LocalStorageConsentModal: React.FC<LocalStorageConsentModalProps> = ({ onAccept, onDecline }) => {\n return (\n <div className=\"fixed inset-0 bg-gray-900/80 backdrop-blur-sm z-50 flex items-center justify-center fade-in\">\n <div \n className=\"bg-surface border border-border rounded-2xl shadow-2xl shadow-black/50 w-full max-w-md m-4 p-8 text-center animate-pop-in\"\n >\n <h2 className=\"text-2xl mb-4\">Store Data Locally?</h2>\n <p className=\"text-text-secondary mb-6\">\n This application uses your browser's local storage to save your settings and remember your progress between sessions. This data stays on your computer and is not shared.\n </p>\n <div className=\"flex justify-center gap-4\">\n <button\n onClick={onDecline}\n className=\"px-6 py-2 bg-surface border border-border text-text-primary font-bold rounded-md hover:bg-gray-100 transition-colors\"\n >\n Decline\n </button>\n <button\n onClick={onAccept}\n className=\"btn-primary px-6 py-2\"\n >\n Accept\n </button>\n </div>\n </div>\n </div>\n );\n};\n\nconst App: React.FC = () => {\n const { state, dispatch } = useGlobalState();\n const { activeView, viewProps, hiddenFeatures, isAuthenticated } = state;\n const [isCommandPaletteOpen, setCommandPaletteOpen] = useState(false);\n const [showConsentModal, setShowConsentModal] = useState(false);\n\n useEffect(() => {\n try {\n const consent = localStorage.getItem('devcore_ls_consent');\n if (!consent) {\n setShowConsentModal(true);\n }\n } catch (e) {\n console.warn(\"Could not access localStorage.\", e);\n }\n }, []);\n\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if ((e.metaKey || e.ctrlKey) && e.key === 'k') {\n e.preventDefault();\n setCommandPaletteOpen(isOpen => !isOpen);\n }\n };\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, []);\n\n const handleAcceptConsent = () => {\n try {\n localStorage.setItem('devcore_ls_consent', 'granted');\n window.location.reload();\n } catch (e) {\n console.error(\"Could not write to localStorage.\", e);\n setShowConsentModal(false);\n }\n };\n\n const handleDeclineConsent = () => {\n try {\n localStorage.setItem('devcore_ls_consent', 'denied');\n } catch (e) {\n console.error(\"Could not write to localStorage.\", e);\n }\n setShowConsentModal(false);\n };\n\n const handleViewChange = useCallback((view: ViewType, props: any = {}) => {\n dispatch({ type: 'SET_VIEW', payload: { view, props } });\n logEvent('view_changed', { view });\n setCommandPaletteOpen(false);\n }, [dispatch]);\n\n const sidebarItems: SidebarItem[] = useMemo(() => [\n { id: 'ai-command-center', label: 'Command Center', icon: <HomeIcon />, view: 'ai-command-center' },\n { id: 'project-explorer', label: 'Project Explorer', icon: <FolderIcon />, view: 'project-explorer' },\n ...ALL_FEATURES\n .filter(feature => !hiddenFeatures.includes(feature.id) && !['ai-command-center', 'project-explorer', 'connections'].includes(feature.id))\n .map(feature => ({\n id: feature.id,\n label: feature.name,\n icon: feature.icon,\n view: feature.id as ViewType,\n })),\n { id: 'connections', label: 'Connections', icon: <LinkIcon />, view: 'connections' },\n { id: 'settings', label: 'Settings', icon: <Cog6ToothIcon />, view: 'settings' },\n ], [hiddenFeatures]);\n\n const ActiveComponent = useMemo(() => {\n if (activeView === 'settings') return SettingsView;\n if (activeView === 'project-explorer') return ProjectExplorer;\n if (activeView === 'connections') return Connections;\n // Fallback to command center if no view is matched.\n return FEATURES_MAP.get(activeView as string)?.component ?? AiCommandCenter;\n }, [activeView]);\n\n if (!isAuthenticated) {\n return <LoginView />;\n }\n \n return (\n <div className=\"h-screen w-screen font-sans overflow-hidden bg-background\">\n {showConsentModal && <LocalStorageConsentModal onAccept={handleAcceptConsent} onDecline={handleDeclineConsent} />}\n <div className=\"relative flex h-full w-full\">\n <LeftSidebar items={sidebarItems} activeView={state.activeView} onNavigate={handleViewChange} />\n <div className=\"flex-1 flex min-w-0\">\n <div className=\"flex-1 flex flex-col min-w-0\">\n <main className=\"relative flex-1 min-w-0 bg-surface/50 overflow-y-auto\">\n <ErrorBoundary>\n <Suspense fallback={<LoadingIndicator />}>\n <div key={activeView} className=\"fade-in w-full h-full\">\n <ActiveComponent {...viewProps} />\n </div>\n </Suspense>\n </ErrorBoundary>\n <ActionManager />\n </main>\n <StatusBar bgImageStatus=\"loaded\" />\n </div>\n </div>\n <CommandPalette isOpen={isCommandPaletteOpen} onClose={() => setCommandPaletteOpen(false)} onSelect={handleViewChange} />\n </div>\n </div>\n );\n};\n\nexport default App;","\n/**\n * @license\n * SPDX-License-Identifier: Apache-2.0\n*/\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport App from './App.tsx';\nimport { GlobalStateProvider } from './contexts/GlobalStateContext.tsx';\nimport './index.css';\n\nconst rootElement = document.getElementById('root');\nif (!rootElement) {\n throw new Error(\"Could not find root element to mount to\");\n}\n\nconst root = ReactDOM.createRoot(rootElement);\nroot.render(\n <React.StrictMode>\n <GlobalStateProvider>\n <App />\n </GlobalStateProvider>\n </React.StrictMode>\n);\n"],"file":"assets/index-Ykf-MVva.js"}