Files

1 line
5.5 KiB
JSON

{"repo": "aitkn/ai-tab-manager", "files": {"src/config/config.js": {"a06b62c7121157c3f644b4fd859634daefed5c51": {"t": 1785846890.0765648, "n": 5302, "h": "461b25395feabe50", "c": "/*\n * AI Tab Manager - Copyright (c) 2025 AI Tech Knowledge LLC\n * Proprietary License - See LICENSE file\n * support@aitkn.com\n */\n\n// Configuration for the extension\nconst CONFIG = {\n // LLM Provider configurations\n PROVIDERS: {\n Claude: {\n name: 'Claude',\n apiUrl: 'https://api.anthropic.com/v1/messages',\n modelsUrl: 'https://api.anthropic.com/v1/models',\n apiKeyPlaceholder: 'sk-ant-api03-...',\n apiKeyUrl: 'https://console.anthropic.com/settings/keys',\n headers: {\n 'anthropic-version': '2023-06-01',\n 'anthropic-dangerous-direct-browser-access': 'true'\n },\n models: [] // Will be fetched dynamically\n },\n OpenAI: {\n name: 'OpenAI',\n apiUrl: 'https://api.openai.com/v1/chat/completions',\n modelsUrl: 'https://api.openai.com/v1/models',\n apiKeyPlaceholder: 'sk-...',\n apiKeyUrl: 'https://platform.openai.com/api-keys',\n headers: {},\n models: [] // Will be fetched dynamically\n },\n Gemini: {\n name: 'Gemini',\n apiUrl: 'https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent',\n modelsUrl: 'https://generativelanguage.googleapis.com/v1beta/models',\n apiKeyPlaceholder: 'AIza...',\n apiKeyUrl: 'https://aistudio.google.com/app/apikey',\n headers: {},\n models: [] // Will be fetched dynamically\n },\n DeepSeek: {\n name: 'DeepSeek',\n apiUrl: 'https://api.deepseek.com/v1/chat/completions',\n modelsUrl: 'https://api.deepseek.com/v1/models',\n apiKeyPlaceholder: 'sk-...',\n apiKeyUrl: 'https://platform.deepseek.com/api_keys',\n headers: {},\n models: [] // Will be fetched dynamically\n },\n Grok: {\n name: 'Grok',\n apiUrl: 'https://api.x.ai/v1/chat/completions',\n modelsUrl: 'https://api.x.ai/v1/models',\n apiKeyPlaceholder: 'xai-...',\n apiKeyUrl: 'https://console.x.ai/team',\n headers: {},\n models: [] // Will be fetched dynamically\n }\n },\n \n // Default settings\n DEFAULT_PROVIDER: 'Claude',\n DEFAULT_MODEL: '', // Will be set dynamically\n \n // Default domains to consider as \"frequently opened\"\n FREQUENT_DOMAINS: [\n 'mail.google.com',\n 'gmail.com',\n 'x.com',\n 'twitter.com',\n 'youtube.com',\n 'google.com',\n 'facebook.com',\n 'instagram.com',\n 'linkedin.com',\n 'reddit.com',\n 'github.com'\n ],\n \n // Prompt versioning - increment this when you update the default prompt\n PROMPT_VERSION: 3,\n \n // Default categorization prompt (user-editable part)\n DEFAULT_PROMPT: `You are a tab categorization assistant. Categorize browser tabs based on how difficult they would be to find again if closed.\n\n Categories:\n 1. Easy to Refind (can be closed): Takes less than 10 seconds to get back to this exact page\n 2. Moderate Effort to Refind (save for later): Takes 10 seconds to 2 minutes to find again\n 3. Hard to Refind (must save): Takes more than 2 minutes or might be impossible to find again\n\n Category 1 - Easy to Refind:\n - Well-known domains everyone uses (google.com, youtube.com, gmail.com, amazon.com, etc.)\n - Login/authentication pages of major services\n - Empty tabs, new tabs, error pages\n - Simple Google searches\n - Major news sites, social media homepages\n\n Category 2 - Moderate Effort to Refind:\n - Less common domains that aren't household names\n - Articles/videos you could find with specific search terms\n - Product pages from any company (even unknown ones)\n - Social media posts from accounts you could find again\n - General documentation or guides\n - Any .ai, .dev, .io domains (unless extremely well-known like github.io)\n\n Category 3 - Hard to Refind:\n - Deep links to specific conversations, sessions, or states\n - URLs with unique IDs or session tokens\n - Specific social media posts (hard to search for exact tweets/posts)\n - Complex search results after multiple refinements\n - Dynamically generated content or temporary links\n - Pages reached through multiple navigation steps\n - Work in progress or unsaved content\n\n Key considerations:\n 1. Domain familiarity: Is this a domain the average person visits regularly?\n 2. URL complexity: Does the URL contain unique IDs, parameters, or session info?\n 3. Search difficulty: What would you need to remember to find this exact page?\n\n Examples:\n - devin.ai → Category 2 (not a well-known domain)\n - github.com/user/repo → Category 2 (specific but searchable)\n - claude.ai/chat/[unique-id] → Category 3 (specific conversation)\n - youtube.com → Category 1 (well-known homepage)`,\n \n // System-enforced prompt suffix (not user-editable)\n // This ensures LLMs always return properly formatted JSON responses\n PROMPT_SYSTEM_SUFFIX: `\n\n For each tab, assign a category (1, 2, or 3) based on the title and URL.\n\n Tabs data:\n {TABS_DATA}\n\n Respond with ONLY a JSON object where keys are tab IDs and values are category numbers (1, 2, or 3).\n Example: {\"0\": 1, \"1\": 3, \"2\": 2}`,\n \n // Database maintenance settings\n DATABASE: {\n // URL retention period in seconds (default: 1 year = 365 * 24 * 60 * 60)\n // Set to a small value (e.g., 60) for testing\n URL_RETENTION_SECONDS: 365 * 24 * 60 * 60\n }\n};\n\n// Make CONFIG available globally\nif (typeof window !== 'undefined') {\n window.CONFIG = CONFIG;\n}"}}}}