Skip to content

Commit 03b75ae

Browse files
committed
feat(content): add handler for summarizing selected text
Add support for processing selected text via context menu action, enabling users to summarize highlighted content directly.
1 parent 554c7aa commit 03b75ae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

content.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,6 +1715,13 @@ async function checkChromeBuiltinSupport(): Promise<boolean> {
17151715
}
17161716
);
17171717
}
1718+
} else if (request.action === 'summarize_selected_text') {
1719+
// Handle context menu selection summarization
1720+
isGeneratingSummary = true;
1721+
chrome.runtime.sendMessage({
1722+
action: 'process_content',
1723+
content: request.selectedText,
1724+
});
17181725
} else if (request.action === 'model_switched') {
17191726
const modelSelect = document.getElementById(
17201727
'ai-summary-model-selector'

0 commit comments

Comments
 (0)