Updates the Puppeteer tutorial to use the `action.openPopup()`
method to open the popup, and then `asPage()` to access the popup
as a page target.
A basic service worker has been added to the history sample to
give us a context to call `action.openPopup()` in.
* Migrate to latest version of the language model
* Update readme to better describe the sample.
* More readme updates
* Consistent API naming and format lists
* Use <number>.<number> format for Google Analytics client ID
With the `ENFORCE_RECOMMENDATIONS` [validation behavior](https://developers.google.com/analytics/devguides/collection/protocol/ga4/validating-events?client_type=firebase#send_events_for_validation), Google Analytics warns about client IDs not in the <number>.<number> format.
This is not an issue in practice - that recommendation is for compatibility with existing client IDs and events are still processed with a client ID in any format. Additionally, the validation is not enabled by default.
However, this PR updates our sample code to use a consistent ID regardless to reduce noise if the validation is enabled. We use a random ID concatenated with a UNIX timestamp to match other GA client libraries.
* Run eslint
* Update README.md
Fixed the 'unpacked extension' link and revised wording for clarity
* Update README.md
Revised wording [2]
* Clarify README
Better wording on the first two sentences
* Fix prompt format for image description in prompt array
* [Bug] Fix syntax error (#1515)
* Fix syntax error
* Fix prompt format for audio transcription in session.promptStreaming
* Fix formatting
---------
Co-authored-by: Sebastian Benz <sbenz@google.com>
In the move to new infrastructure for https://developer.chrome.com/, the
site became an SPA which can soft navigate outside of browser
navigations. Therefore, we need to update the sample to watch for
changes to content after the content script is injected.
* Replaced clearbit API (deprecated) with Google's favicon snatcher
* Updated UI designs for optional_permissions examples of both mv2 and mv3
Using chrome's build in favicon provider for optional_permissions examples
* Run linter
---------
Co-authored-by: Oliver Dunk <oliverdunk@google.com>
* Partial fixes for sample list generator
A number of fixes for the sample list generator:
- Removes a comment from one of our manifest files, as we don't
currently support JSONC.
- Ignores the `node_modules` folder since we have recently added some AI
samples with a build step.
- Adds the `aiOriginTrial` API to the list of recognised APIs.
- Updates `extension-apis.json` with the latest data from the
`chrome-types` package.
Updating recognised extension APIs still requires access to a
non-existent storage bucket, so this does not fully fix the process.
* Fix linter issue
* Add permissions.addSiteAccessRequest() demo
Adds an example of using the permissions.addSiteAccessRequest() API to
request access to a checkout page. This matches the example used in our
upcoming blog post.
* Add banner to show that the extension has access.
* Link to latest articles
* Add systemprompt to prompt sample to provide better guidance on simple
prompts such as 'hello'.
* Limit default topK to 3 (the default is currently set too high, this
will change).
* Fix setup instructions in the readmes.
* Format markdown output
* updates & fixes
* Styles and config
* Some CSS love with open props
* Make summary configurable
* Update functional-samples/ai.gemini-on-device-summarization/sidepanel/index.js
Shorter and worker-compatible
Co-authored-by: Thomas Steiner <tomac@google.com>
* Update functional-samples/ai.gemini-on-device-summarization/manifest.json
Co-authored-by: Thomas Steiner <tomac@google.com>
---------
Co-authored-by: Thomas Steiner <tomac@google.com>
* add an example that shows how to polyfill XHR in an extension
* updates from feedback
* update based on third party OSS requirements
* update readme links
* Add scaffolding for Prompt API OT example
* Rewrite existing example to use the OT
* Add trial token and key
* Update error message, add `minimum_chrome_version`
* Fix feature detection
* Some README refinements
* Correct instructions
* OT refinement
* Add on device summary sample
* small tweaks and clean up
* more clean up
* Add link to blog post
* show correct error when ai is not supported in browser
* addressed comments
* fix path