refactor(api): update PromptsChatPreferences interface and getBaseUrl function

This commit is contained in:
Fatih Kadir Akın
2026-01-20 00:29:30 +03:00
parent b610fabede
commit 7ec117a5d2
+4 -3
View File
@@ -1,11 +1,12 @@
import { getPreferenceValues } from "@raycast/api";
import type { Prompt, PromptsResponse } from "./types";
// Preferences are auto-generated in raycast-env.d.ts
import type { Preferences } from "@raycast/api";
interface PromptsChatPreferences {
baseUrl?: string;
}
function getBaseUrl(): string {
const { baseUrl } = getPreferenceValues<Preferences>();
const { baseUrl } = getPreferenceValues<PromptsChatPreferences>();
return baseUrl?.replace(/\/$/, "") || "https://prompts.chat";
}