From 1ca32b0964bcd6c6f10bcb3acd5097d05cd3fc6a Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Thu, 25 Sep 2025 03:53:09 -0400 Subject: [PATCH] debug logging --- frontend/libs/api/src/lib/UsersApi.ts | 6 ++---- frontend/libs/api/src/lib/config/StorytellerApiHostStore.ts | 4 ++++ .../libs/components/promptbox/src/lib/PromptBoxImage.tsx | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/libs/api/src/lib/UsersApi.ts b/frontend/libs/api/src/lib/UsersApi.ts index bbed26ebd4..72ce5e9aaf 100644 --- a/frontend/libs/api/src/lib/UsersApi.ts +++ b/frontend/libs/api/src/lib/UsersApi.ts @@ -98,15 +98,15 @@ export class UsersApi extends ApiManager { usernameOrEmail: string; password: string; }): Promise> { - console.log("Logging in with usernameOrEmail:", usernameOrEmail); + console.log("libs/api - Logging in with usernameOrEmail:", usernameOrEmail); const endpoint = `${this.getApiSchemeAndHost()}/v1/login`; + console.log("libs/api - Login endpoint", endpoint); const body = { username_or_email: usernameOrEmail, password: password, }; try { - console.log("calling auth fetch") const response = await this.authFetch< { username_or_email: string; password: string }, { @@ -119,8 +119,6 @@ export class UsersApi extends ApiManager { method: "POST", body: body, }); - console.log(response) - console.log("Auth fetch response!!! above") return { success: response.success, data: response.success diff --git a/frontend/libs/api/src/lib/config/StorytellerApiHostStore.ts b/frontend/libs/api/src/lib/config/StorytellerApiHostStore.ts index 7855e911f7..5cce2cea63 100644 --- a/frontend/libs/api/src/lib/config/StorytellerApiHostStore.ts +++ b/frontend/libs/api/src/lib/config/StorytellerApiHostStore.ts @@ -30,14 +30,18 @@ export class StorytellerApiHostStore { * This is used to sync with Tauri for enabling easier development. */ public setApiSchemeAndHost(apiSchemeAndHost: string) { + console.warn("StorytellerApiHostStore.setApiSchemeAndHost()", apiSchemeAndHost); + // TODO(bt,2025-07-06): Actually parse URL. if (!apiSchemeAndHost.startsWith("http://") && !apiSchemeAndHost.startsWith("https://")) { throw new Error(`Scheme not included in URL: ${apiSchemeAndHost}`); } + const FINAL_VALID_SLASH = "https://".lastIndexOf("/"); if (apiSchemeAndHost.lastIndexOf("/") > FINAL_VALID_SLASH) { throw new Error(`Path components should not be included in URL: ${apiSchemeAndHost}`); } + this.apiSchemeAndHost = apiSchemeAndHost; } diff --git a/frontend/libs/components/promptbox/src/lib/PromptBoxImage.tsx b/frontend/libs/components/promptbox/src/lib/PromptBoxImage.tsx index c6729de157..3fa6c4793e 100644 --- a/frontend/libs/components/promptbox/src/lib/PromptBoxImage.tsx +++ b/frontend/libs/components/promptbox/src/lib/PromptBoxImage.tsx @@ -64,7 +64,7 @@ export const PromptBoxImage = ({ }: PromptBoxImageProps) => { useSignals(); - console.log("Selected model:", selectedModel); + console.debug("Selected model:", selectedModel); useEffect(() => { if (imageMediaId && url) {