43ee47751b4f7b497e64431e3940bd72b23dbfc4
新增时间戳与日期时间相互转换的功能,包括输入框、选择器和转换按钮。 同时将侧边栏默认状态设为关闭,并完善相关样式和逻辑。 此外,增强复制功能的上下文检查以提升稳定性。
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%