feat: add option to persist API keys on non-localhost (opt-in security feature)

This commit is contained in:
Xiaohan-Tian
2026-01-17 13:54:15 -08:00
parent 2a0d128d0f
commit e8b79efde7
5 changed files with 54 additions and 12 deletions
+3 -3
View File
@@ -36,7 +36,7 @@ A lightweight, browserbased DAW with an AI Agent "K.G.Studio Musician Assista
- K.G.Studio is fully clientside. It connects to the network only to:
- Download instrument soundfonts from the configured CDN
- Communicate with your chosen LLM provider (OpenAI or OpenAIcompatible)
- API keys are not persisted when running from a nonlocal host (to reduce XSS risk). Youll be prompted to reenter them on each start in that scenario.
- API keys are not persisted when running from a nonlocal host (to reduce XSS risk). You'll be prompted to reenter them on each start in that scenario. To optin to persistence on nonlocal hosts, enable "Persist API Keys on Non-Localhost" in Settings > General (not recommended for shared/production environments).
- Important: While K.G.Studio does not collect your data, different LLM providers may have different dataretention policies. Review the policy of the provider you select before use.
## 5. User Interface Tour
@@ -125,10 +125,10 @@ A lightweight, browserbased DAW with an AI Agent "K.G.Studio Musician Assista
- If loading stalls, the overlay will time out; refresh to retry downloading.
## 13. Settings
- General: LLM provider (OpenAI or OpenAIcompatible), API key, model, soundfont base URL.
- General: LLM provider (OpenAI or OpenAIcompatible), API key, model, soundfont base URL, Persist API Keys on Non-Localhost.
- Behavior: chatbox default open at startup.
- Templates: custom instructions for the AI.
- Settings persist in IndexedDB (local); API keys are not persisted on nonlocal hosts.
- Settings persist in IndexedDB (local); API keys are not persisted on nonlocal hosts unless you optin via the "Persist API Keys on Non-Localhost" setting (not recommended for shared/production environments).
## 14. AI Agent "K.G.Studio Musician Assistant"
- Open the chat (toolbar). Describe goals in natural language (e.g., “Can you help me write a 4bar chord progression for the melody?”).