feat: integrate K.G.One music generation panel
- ConfigManager: add `general.kgone` config block (enabled toggle +
base URL); add `setKGOneManagedByServer()` / `isKGOneServerManaged()`
for managed deployments that supply a `kgone-server.txt` override
- App.tsx: probe for `kgone-server.txt` on startup (Content-Type guard
to avoid Vite SPA fallback false-positive)
- GeneralSettings: new K.G.One section with enable toggle + base URL
input; fields disabled when server-managed
- Toolbar: magic wand button (FaWandMagicSparkles) that toggles the
panel; disabled with reduced opacity when K.G.One is turned off;
mutually exclusive with the Chat panel
- projectStore: add `showKGOnePanel` state + `toggleKGOnePanel` action
- KGOnePanel (new): three-tab panel (Clip / Full Song / Separator)
- Clip: prompt + advanced params → POST /v1/clip/generate → poll
/v1/clip/result → download WAV → AudioPlayer preview
- Full Song: caption + lyrics + advanced params → POST
/v1/fullsong/generate → poll /v1/fullsong/result (live progress %
from nested JSON string) → download MP3 → AudioPlayer preview
- Separator: reads selected audio region from OPFS via
KGAudioFileStorage → POST /v1/separator/separate (multipart) →
poll /v1/separator/result → parallel-download all stem files →
multiple labeled AudioPlayer instances rendered vertically
- Shared: custom AudioPlayer (play/pause, clickable seek bar),
spinner + hint text, error card, AbortController cleanup,
DEBUG_MODE.KGONE-gated REQ/RES console logging
This commit is contained in:
@@ -14,6 +14,7 @@ export const DEBUG_MODE = {
|
||||
REGION_ITEM: true,
|
||||
PIANO_ROLL: true,
|
||||
MIDI_IMPORT: true,
|
||||
KGONE: true,
|
||||
};
|
||||
|
||||
// Toolbar related constants
|
||||
@@ -39,9 +40,9 @@ export const PIANO_ROLL_CONSTANTS = {
|
||||
|
||||
// notes
|
||||
NOTE_EDGE_OFFSET: 5,
|
||||
|
||||
|
||||
// Minimum note length in beats (1/64 beat)
|
||||
MIN_NOTE_LENGTH: 1/64,
|
||||
MIN_NOTE_LENGTH: 1 / 64,
|
||||
|
||||
// Dragging threshold for note selection
|
||||
DRAG_THRESHOLD: 5,
|
||||
|
||||
Reference in New Issue
Block a user