From bf085dacf25fd12763a0e8a17bebc52c2e035cbf Mon Sep 17 00:00:00 2001 From: Xiaohan-Tian <157918347+Xiaohan-Tian@users.noreply.github.com> Date: Mon, 11 Aug 2025 22:35:51 -0700 Subject: [PATCH] introduce `BASE_URL` to the app and set it to `/kgstudio/`. --- index.html | 10 +++++----- src/agent/core/SystemPrompts.ts | 2 +- src/components/InstrumentSelection.tsx | 2 +- src/components/Toolbar.tsx | 2 +- src/components/track/TrackInfoItem.tsx | 2 +- src/core/config/ConfigManager.ts | 2 +- src/util/messageFilter/UserMessageFilter.ts | 12 ++++++------ vite.config.ts | 1 + 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index 0773718..83f8327 100644 --- a/index.html +++ b/index.html @@ -2,15 +2,15 @@ - - - - + + + + K.G.Studio
- + diff --git a/src/agent/core/SystemPrompts.ts b/src/agent/core/SystemPrompts.ts index c731ea3..1f20d2d 100644 --- a/src/agent/core/SystemPrompts.ts +++ b/src/agent/core/SystemPrompts.ts @@ -34,7 +34,7 @@ export class SystemPrompts { } try { - const response = await fetch('/prompts/system.md'); + const response = await fetch(`${import.meta.env.BASE_URL}prompts/system.md`); if (!response.ok) { throw new Error(`Failed to load system prompt: ${response.status}`); } diff --git a/src/components/InstrumentSelection.tsx b/src/components/InstrumentSelection.tsx index 949c155..6d98609 100644 --- a/src/components/InstrumentSelection.tsx +++ b/src/components/InstrumentSelection.tsx @@ -65,7 +65,7 @@ const InstrumentSelection: React.FC = () => {
{previewAlt.toString()} {
- DAW Logo + DAW Logo
= ({
{String(FLUIDR3_INSTRUMENT_MAP[currentInstrument { try { - const response = await fetch('/config.json'); + const response = await fetch(`${import.meta.env.BASE_URL}config.json`); if (!response.ok) { throw new Error(`Failed to fetch config.json: ${response.status}`); } diff --git a/src/util/messageFilter/UserMessageFilter.ts b/src/util/messageFilter/UserMessageFilter.ts index 7d4d856..47c9a4e 100644 --- a/src/util/messageFilter/UserMessageFilter.ts +++ b/src/util/messageFilter/UserMessageFilter.ts @@ -57,7 +57,7 @@ export async function processUserMessage(originalMessage: string): Promise