Skip to content

Commit 2f2b837

Browse files
authored
fix: use static historyApiUrl (#98)
History endpoint should be static and not using the ai runtime which doesn't support history yet.
1 parent 05f8562 commit 2f2b837

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/config/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ export const SIGN_MESSAGE_PORT = 6969;
3030
export const SIGN_MESSAGE = "Register Bitte Agent!";
3131
export const BITTE_CONFIG_ENV_KEY = "BITTE_CONFIG";
3232
export const BITTE_KEY_ENV_KEY = "BITTE_KEY";
33+
export const BITTE_HISTORY_API_URL = "https://api.bitte.ai/v1/history";
3334

3435
export const DEFAULT_PORT = 3000;

src/services/server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { promises as fs } from "node:fs";
33
import path from "node:path";
44

55
import { type ApiConfig } from "../commands/dev";
6+
import { BITTE_HISTORY_API_URL } from "../config/constants";
67

78
export async function startUIServer(
89
apiConfig: ApiConfig,
@@ -93,7 +94,7 @@ export async function startUIServer(
9394
if (!id) {
9495
throw new Error("No history id on request.");
9596
}
96-
const url = `${apiConfig.url}/history?id=${id}`;
97+
const url = `${BITTE_HISTORY_API_URL}?id=${id}`;
9798

9899
const response = await fetch(url, {
99100
headers: {

0 commit comments

Comments
 (0)