A browser extension that lets you summarize any webpage and ask questions using AI.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Config-driven summarize label and revised quick summary prompt

- Add CONFIG.EXTENSION.QUICK_SUMMARY_LABEL and apply it in popup branding and button state.
- Restructure QUICK_SUMMARY prompt: opening takeaway, then Key Points section.

+17 -9
+8 -6
popup/popup.js
··· 157 157 const SYSTEM_PROMPT_SUMMARIZER = CONFIG.PROMPTS.SYSTEM_SUMMARIZER; 158 158 const SYSTEM_PROMPT_CHAT = CONFIG.PROMPTS.SYSTEM_CHAT; 159 159 const QUICK_SUMMARY_PROMPT = CONFIG.PROMPTS.QUICK_SUMMARY; 160 + const QUICK_SUMMARY_LABEL = CONFIG.EXTENSION.QUICK_SUMMARY_LABEL; 160 161 161 162 const API_SETTINGS_DEFAULTS = { 162 163 apiMode: CONFIG.API.MODE, ··· 403 404 if (initialSub) initialSub.textContent = ext.EMPTY_SUB; 404 405 if (chatInput) 405 406 chatInput.placeholder = `Ask ${ext.NAME} about this page…`; 407 + if (summarizeLabel) summarizeLabel.textContent = ext.QUICK_SUMMARY_LABEL; 406 408 } 407 409 408 410 document.addEventListener("DOMContentLoaded", async () => { ··· 506 508 cachedContent.extractionSource || "reddit-unsupported"; 507 509 isExtracting = false; 508 510 summarizeBtn.disabled = false; 509 - setSummarizeLabel("Quick Summary"); 511 + setSummarizeLabel(QUICK_SUMMARY_LABEL); 510 512 showRedditUnsupportedError(extractionUnsupportedReason); 511 513 return; 512 514 } ··· 551 553 renderChatMessages(); 552 554 } else { 553 555 // No summaries yet - check if we should auto-summarize 554 - setSummarizeLabel("Quick Summary"); 556 + setSummarizeLabel(QUICK_SUMMARY_LABEL); 555 557 if ( 556 558 (autoSummarize || shouldAutoSummarize) && 557 559 !isLoading && ··· 572 574 } 573 575 574 576 summarizeBtn.disabled = false; 575 - setSummarizeLabel("Quick Summary"); 577 + setSummarizeLabel(QUICK_SUMMARY_LABEL); 576 578 577 579 // Check if we should auto-trigger summarize (from keyboard shortcut, context menu, or auto-summarize setting) 578 580 if ( ··· 608 610 chatContainer.classList.add("hidden"); 609 611 footer.classList.remove("hidden"); 610 612 chatInput.value = ""; 611 - setSummarizeLabel("Quick Summary"); 613 + setSummarizeLabel(QUICK_SUMMARY_LABEL); 612 614 summarizeBtn.disabled = false; 613 615 isLoading = false; 614 616 isChatLoading = false; ··· 1577 1579 if (loading) { 1578 1580 setSummarizeLabel("Thinking…"); 1579 1581 } else { 1580 - // When done loading, show "Regenerate" if we have a summary, otherwise "Quick Summary" 1581 - setSummarizeLabel(quickSummary ? "Regenerate" : "Quick Summary"); 1582 + // When done loading, show "Regenerate" if we have a summary, otherwise the configured label 1583 + setSummarizeLabel(quickSummary ? "Regenerate" : QUICK_SUMMARY_LABEL); 1582 1584 } 1583 1585 } 1584 1586
+9 -3
scripts/config.js
··· 90 90 "You are Lede, a helpful assistant that summarizes webpages concisely. Foreground the main point (the lede) before supporting detail.", 91 91 SYSTEM_CHAT: 92 92 "You are Lede, a helpful assistant answering questions about a webpage. Use the provided page content and summary to give accurate, concise answers. You may use short sentences, sections, and bullet points to answer. Avoid long paragraphs and tables. ONLY answer based on the provided page content and summary, not any external knowledge or information.", 93 - QUICK_SUMMARY: `Please provide a "Quick Summary" of this webpage. Focus on the main points and key takeaways. Use markdown formatting (headings, bullet points, etc.). 93 + QUICK_SUMMARY: `You are to provide a "Quick Summary" of this webpage. 94 + 95 + Start with very brief sentence that provides the most important takeaway or piece of information. This section should have no title. A few key words should be **bolded** so people can quickly scan. 94 96 95 - The "Quick Summary" should be 3-5 **short** one-sentence bullet points. Each of these bullet points should have key points/takeaways **bolded** so people can quickly scan.`, 97 + Then, create a section called "Key Points". Focus on the main points and key takeaways. Use markdown formatting (headings, bullet points, etc.). Avoid repeating the same information from previous sections. 98 + 99 + The "Key Points" should be 3-4 **short** one-sentence bullet points. Each of these bullet points should have key points/takeaways **bolded** so people can quickly scan.`, 96 100 SUGGESTIONS: `Based on the summary provided, generate 2 natural follow-up questions that a reader might want to ask (besides "Why would this be worth reading?"). Keep questions short (5-8 words), like these examples: 97 101 - What are some key quotes? 98 102 - Explain this simply ··· 110 114 }, 111 115 112 116 /** 113 - * Display strings wired in `options/options.js` and `popup/popup.js` (titles, taglines, empty state). 117 + * Display strings wired in `options/options.js` and `popup/popup.js` (titles, taglines, empty state, summarize button). 114 118 * Name / tagline: keep aligned with manifest `name` and `description`. Shortcuts: same chord as manifest `commands.summarize-page.suggested_key`. 115 119 * Extension version lives only in the manifest(s); use `chrome.runtime.getManifest().version` in code if needed. 116 120 */ ··· 128 132 SETTINGS_MOTTO: "Let Lede lead the way.", 129 133 SHORTCUT: "Ctrl+Shift+U", 130 134 SHORTCUT_MAC: "Cmd+Shift+U", 135 + /** Footer primary button when no summary yet (and after errors / reset). */ 136 + QUICK_SUMMARY_LABEL: "Summarize", 131 137 }, 132 138 133 139 /**