bc1943dc16a7193ba33f404e6db5e8645db8e615
feat(dev): 添加开发服务器与热重载支持 - 新增 `npm run dev` 命令,启动带热重载的开发服务器 - 集成 rollup watch 模式与 LiveReload 实现自动刷新 - 添加开发指南 DEVELOPMENT.md,说明项目结构、预览方式及构建流程 - 新增开发预览页面 index.html,用于嵌入展示 sidepanel 内容 - 更新 package.json 和 package-lock.json,引入相关开发依赖 ```
Using the Gemini API in a Chrome Extension.
This sample demonstrates how to use the Gemini Cloud API in a Chrome Extension.
Overview
The extension provides a chat interface for the Gemini API. To learn more about the API head over to https://ai.google.dev/.
Running this extension
- Clone this repository.
- Download the Gemini API client by running:
npm install - Retrieve an API key and update functional-samples/ai.gemini-in-the-cloud/sidepanel/index.js (only for testing).
- Compile the JS bundle for the sidepanel implementation by running:
npm run build - Load this directory in Chrome as an unpacked extension.
- Click the extension icon.
- Interact with the prompt API in the sidebar.
Languages
TypeScript
98.9%
CSS
0.5%
JavaScript
0.4%
HTML
0.2%