From 13adec21fe47476a4d1ff73bfa064a1ec61df438 Mon Sep 17 00:00:00 2001 From: KoushikBaagh Date: Wed, 6 Aug 2025 18:16:32 +0530 Subject: [PATCH 1/3] Added showcase for Sonar Chromium Browser --- docs/showcase/sonar-chromium-browser.mdx | 67 ++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 docs/showcase/sonar-chromium-browser.mdx diff --git a/docs/showcase/sonar-chromium-browser.mdx b/docs/showcase/sonar-chromium-browser.mdx new file mode 100644 index 0000000..3fbd80a --- /dev/null +++ b/docs/showcase/sonar-chromium-browser.mdx @@ -0,0 +1,67 @@ +--- +| title | description | sidebar_position | keywords | +|-------------------------------|-----------------------------------------------------------------------------------------------|------------------|----------------------------------------------------------------| +| Sonar Chromium Browser | Chromium browser with native Perplexity Sonar API integration: omnibox answers & context-menu summarization | 9 | sonar, chromium, omnibox, context-menu, summarize, hackathon, api | + +--- + +## 🚀 Project: Sonar Chromium Browser + +**GitHub Repo:** [KoushikBaagh/perplexity-hackathon-chromium](https://github.com/KoushikBaagh/perplexity-hackathon-chromium) + +### 📖 Project Overview + +This Chrome browser patch integrates Perplexity’s Sonar API directly into Chromium, enabling: + +- **Omnibox Answers:** Type `sonar your question` in the address bar to get instant AI responses as autocomplete suggestions. +- **Context-menu Summarization:** Select any text on a page, right-click **Summarize with Sonar**, and view a concise summary in a new tab. + + + +### 🎥 Demonstration Video + +[![Watch the demo](https://img.youtube.com/vi/nFhciodeQ-c/0.jpg)](https://youtu.be/nFhciodeQ-c) + +### 🔍 What This Does + +1. **Sonar-Powered Omnibox Answers** + + - Detects the `sonar` keyword in the omnibox + - Debounces input and queries the Sonar API + - Renders the AI’s answer inline as a high-relevance suggestion + +2. **Context-menu “Summarize with Sonar”** + - Activates when text is selected + - Sends selection to Sonar API with a “Please summarize” prompt + - Opens a new `data:` URL tab showing original text + summary + +### 🛠 Key Features & Use Cases + +- **Instant Research:** Get definitions, explanations, and summaries without leaving your tab. +- **Developer Productivity:** Quickly test API integrations inside the browser. +- **Custom Browser Builds:** See how to hook into Chromium’s omnibox and context menus. + +### ⚙️ How It Uses Perplexity Sonar + +```js +// Omnibox query (model=sonar-pro) +await client.chat.completions.create({ + model: "sonar-pro", + messages: [ + { role: "system", content: "Be precise and concise." }, + { role: "user", content: "What is quantum tunneling?" }, + ], +}); + +// Context-menu summarization (model=sonar) +await client.chat.completions.create({ + model: "sonar", + messages: [ + { role: "system", content: "Summarize the following text concisely." }, + { role: "user", content: selectedText }, + ], +}); +``` From 92ed99f95805f5b2d67de9906ae0c78a9f2502d8 Mon Sep 17 00:00:00 2001 From: KoushikBaagh Date: Wed, 6 Aug 2025 18:25:07 +0530 Subject: [PATCH 2/3] Added showcase for Sonar Chromium Browser --- docs/showcase/sonar-chromium-browser.mdx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/showcase/sonar-chromium-browser.mdx b/docs/showcase/sonar-chromium-browser.mdx index 3fbd80a..d4c1a52 100644 --- a/docs/showcase/sonar-chromium-browser.mdx +++ b/docs/showcase/sonar-chromium-browser.mdx @@ -1,13 +1,15 @@ --- | title | description | sidebar_position | keywords | |-------------------------------|-----------------------------------------------------------------------------------------------|------------------|----------------------------------------------------------------| -| Sonar Chromium Browser | Chromium browser with native Perplexity Sonar API integration: omnibox answers & context-menu summarization | 9 | sonar, chromium, omnibox, context-menu, summarize, hackathon, api | +| Sonar Chromium Browser | Chromium browser with native Perplexity Sonar API integration: omnibox answers & context-menu summarization | 3 | sonar, chromium, omnibox, context-menu, summarize, hackathon, api | --- ## 🚀 Project: Sonar Chromium Browser -**GitHub Repo:** [KoushikBaagh/perplexity-hackathon-chromium](https://github.com/KoushikBaagh/perplexity-hackathon-chromium) +**GitHub Repo:** [KoushikBaagh/sonar-chromium-browser](https://github.com/KoushikBaagh/perplexity-hackathon-chromium) + +**Chromium Gerrit Repo:** [KoushikBaagh/google-gerrit-repo](https://chromium-review.googlesource.com/c/chromium/src/+/6778540) ### 📖 Project Overview @@ -16,11 +18,6 @@ This Chrome browser patch integrates Perplexity’s Sonar API directly into Chro - **Omnibox Answers:** Type `sonar your question` in the address bar to get instant AI responses as autocomplete suggestions. - **Context-menu Summarization:** Select any text on a page, right-click **Summarize with Sonar**, and view a concise summary in a new tab. - - ### 🎥 Demonstration Video [![Watch the demo](https://img.youtube.com/vi/nFhciodeQ-c/0.jpg)](https://youtu.be/nFhciodeQ-c) From b2f5249ef3bf78ac45e6e2ab966c7d144e2975e5 Mon Sep 17 00:00:00 2001 From: KoushikBaagh Date: Wed, 6 Aug 2025 18:26:25 +0530 Subject: [PATCH 3/3] Added showcase for Sonar Chromium Browser --- docs/showcase/sonar-chromium-browser.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/showcase/sonar-chromium-browser.mdx b/docs/showcase/sonar-chromium-browser.mdx index d4c1a52..c19d2b3 100644 --- a/docs/showcase/sonar-chromium-browser.mdx +++ b/docs/showcase/sonar-chromium-browser.mdx @@ -1,7 +1,7 @@ --- | title | description | sidebar_position | keywords | |-------------------------------|-----------------------------------------------------------------------------------------------|------------------|----------------------------------------------------------------| -| Sonar Chromium Browser | Chromium browser with native Perplexity Sonar API integration: omnibox answers & context-menu summarization | 3 | sonar, chromium, omnibox, context-menu, summarize, hackathon, api | +| Sonar Chromium Browser | Chromium browser with native Perplexity Sonar API integration: omnibox answers & context-menu summarization | 9 | sonar, chromium, omnibox, context-menu, summarize, hackathon, api | ---