diff --git a/entrypoints/background.ts b/entrypoints/background.ts index c18be55..a2e117b 100644 --- a/entrypoints/background.ts +++ b/entrypoints/background.ts @@ -53,11 +53,10 @@ function getSystemPrompt(action: string): string { 'You are an experienced writer. Expand the provided text with more detail, context, and supporting points. ' + 'Make it richer and more informative while staying on topic. ' + 'Return ONLY the expanded text.', - tone: - 'You are a writing coach. Analyze the tone of the provided text. ' + - 'Describe the tone characteristics (e.g. formal, casual, aggressive, passive, confident, etc.) ' + - 'and note any issues like passive voice, wordiness, or emotional bias. ' + - 'Return a brief, clear analysis — no rewriting, no extra commentary.', + explain: + 'You are a helpful teacher. Explain the following text in simple, easy-to-understand language. ' + + 'Break down complex terms, jargon, or concepts so anyone can understand. ' + + 'Be concise but clear. Return only the explanation, no extra commentary.', }; return prompts[action] ?? prompts.grammar; } @@ -411,8 +410,8 @@ export default defineBackground(() => { contexts: ['selection'], }); chrome.contextMenus.create({ - id: 'lexai-tone', - title: '⚡ LexAI: Analyze Tone', + id: 'lexai-explain', + title: '⚡ LexAI: Explain', contexts: ['selection'], }); }); diff --git a/entrypoints/content.ts b/entrypoints/content.ts index 4eac928..109cdfd 100644 --- a/entrypoints/content.ts +++ b/entrypoints/content.ts @@ -199,7 +199,7 @@ export default defineContentScript({ { label: '↺ Rephrase', action: 'rephrase', color: '#89b4fa' }, { label: '↓ Shorten', action: 'shorten', color: '#fab387' }, { label: '↑ Expand', action: 'expand', color: '#cba6f7' }, - { label: '🎭 Tone', action: 'tone', color: '#2dd4bf' }, + { label: '💡 Explain', action: 'explain', color: '#2dd4bf' }, ]; actions.forEach(({ label, action, color }) => { @@ -618,10 +618,10 @@ export default defineContentScript({ showModal(`❌ ${response.error}`, null, snapStart, snapEnd, snapElement, snapRange); } else { // Tone analysis is display-only — no Replace button (pass null for originalText) - const isToneAction = action === 'tone'; + const isExplainAction = action === 'explain'; showModal( response?.result ?? '(no result)', - isToneAction ? null : textToProcess, + isExplainAction ? null : textToProcess, snapStart, snapEnd, snapElement, snapRange, ); } diff --git a/lexai-chrome-mv3.zip b/lexai-chrome-mv3.zip index 350be27..231ab18 100644 Binary files a/lexai-chrome-mv3.zip and b/lexai-chrome-mv3.zip differ