Skip to content

Commit a6bb8cc

Browse files
authored
Fix and use external runtime (#93)
1 parent ac6d7e2 commit a6bb8cc

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

src/commands/dev.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ async function findAvailablePort(startPort: number): Promise<number> {
3737

3838
const API_CONFIG: ApiConfig = {
3939
key: process.env.BITTE_API_KEY!,
40-
url: process.env.BITTE_API_URL || "https://wallet.bitte.ai/api/v1",
40+
url:
41+
process.env.BITTE_API_URL ||
42+
"https://ai-runtime-446257178793.europe-west1.run.app",
4143
serverPort: DEFAULT_PORT,
4244
};
4345

src/playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@bitte-ai/chat": "^0.0.21",
13+
"@bitte-ai/chat": "^0.0.20",
1414
"@bitte-ai/react": "^0.6.6-beta-prerelease.40",
1515
"@near-wallet-selector/modal-ui": "^8.9.15",
1616
"@tanstack/react-query": "^5.66.0",

src/playground/pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/deployed-url.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ export function getVercelDeploymentUrl(): string {
55
case "production":
66
return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`;
77
case "preview":
8-
return `https://${process.env.VERCEL_BRANCH_URL || process.env.VERCEL_URL}`;
8+
return `https://${
9+
process.env.VERCEL_BRANCH_URL || process.env.VERCEL_URL
10+
}`;
911
default:
1012
console.warn(
1113
`Unrecognized VERCEL_ENV=${process.env.VERCEL_ENV} using fallback url (localhost)`,

tests/utils/env.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ describe("validateEnv", () => {
4141
requiredEnvVars.forEach((key) => delete process.env[key]);
4242

4343
expect(() => validateEnv()).toThrow(
44-
`Missing required environment variables: ${requiredEnvVars.join(", ")}\n` +
45-
"Please ensure these are set in your .env file",
44+
`Missing required environment variables: ${requiredEnvVars.join(
45+
", ",
46+
)}\n` + "Please ensure these are set in your .env file",
4647
);
4748
});
4849
});

0 commit comments

Comments
 (0)