This commit is contained in:
LPF
2026-02-26 09:01:18 +08:00
parent 4d13e38908
commit 6ec3942e87
5 changed files with 3 additions and 27 deletions

View File

@@ -1,9 +1 @@
# GEMINI_API_KEY: Required for Gemini AI API calls.
# AI Studio automatically injects this at runtime from user secrets.
# Users configure this via the Secrets panel in the AI Studio UI.
GEMINI_API_KEY="MY_GEMINI_API_KEY"
# APP_URL: The URL where this applet is hosted.
# AI Studio automatically injects this at runtime with the Cloud Run service URL.
# Used for self-referential links, OAuth callbacks, and API endpoints.
APP_URL="MY_APP_URL"

View File

@@ -1,13 +1,3 @@
<div align="center">
<img width="1200" height="475" alt="GHBanner" src="https://github.com/user-attachments/assets/0aa67016-6eaf-458a-adb2-6e31a0763ed6" />
</div>
# Run and deploy your AI Studio app
This contains everything you need to run your app locally.
View your app in AI Studio: https://ai.studio/apps/f87daef4-01f5-4bfc-be46-985e52d7c763
## Run Locally
**Prerequisites:** Node.js
@@ -15,6 +5,5 @@ View your app in AI Studio: https://ai.studio/apps/f87daef4-01f5-4bfc-be46-985e5
1. Install dependencies:
`npm install`
2. Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key
3. Run the app:
2. Run the app:
`npm run dev`

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Google AI Studio App</title>
<title>ClawGo</title>
</head>
<body>
<div id="root"></div>

View File

@@ -1,5 +1,5 @@
{
"name": "react-example",
"name": "clawgo",
"private": true,
"version": "0.0.0",
"type": "module",

View File

@@ -8,17 +8,12 @@ export default defineConfig(({mode}) => {
return {
base: '/webui/',
plugins: [react(), tailwindcss()],
define: {
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY),
},
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
},
},
server: {
// HMR is disabled in AI Studio via DISABLE_HMR env var.
// Do not modify file watching is disabled to prevent flickering during agent edits.
hmr: process.env.DISABLE_HMR !== 'true',
},
};