Commit Graph

33 Commits

Author SHA1 Message Date
Xiaohan-Tian 4f11fe8e25 feat: added region color customization feature 2026-07-01 22:31:35 -07:00
Xiaohan-Tian 8ee7ddac77 feat: add track-aware tool targeting and new agent tools, lifted the requirement of selection a MIDI region to use AI Agent
Introduces a shared `toolTargeting.ts` module that resolves the active MIDI
region/track from the user's current selection, enabling tools to operate on
the correct target without requiring explicit track IDs in most cases.

Adds two new read-only tools — `list_all_tracks` and
`get_user_selected_music_range_and_track` — so the agent can inspect
available tracks and the current selection context before acting.

Also refactors `AddNotesTool` to auto-create MIDI regions when no region
exists, refactors `RemoveNotesTool`, `ReadMusicTool`, and
`ReadChordProgressionTool` to use the new targeting helpers, adds a
`buildToolHistoryContent` hook to `BaseTool` for cleaner chat history
display, and updates system prompts and tests throughout.
2026-06-04 19:29:37 -07:00
Xiaohan-Tian ad1e0c2aa8 feat: implemented confirmation mechanism for tool invokation 2026-06-03 17:05:42 -07:00
Xiaohan-Tian 6b0de74acd refactor: added UI-only tool result summary to all the tools; move summary generation logic to tool's own ts file 2026-06-02 23:13:25 -07:00
Xiaohan-Tian 4bdd0d5ea7 feat: minor UI adjustments 2026-06-02 22:31:29 -07:00
Xiaohan-Tian 5aacf01457 feat: add agent todo tool and inline todo snapshot cards in chat 2026-06-02 21:52:44 -07:00
Xiaohan-Tian c1d9f4c9fb feat: add manual/auto conversation compaction and preserve full export history 2026-06-01 19:55:59 -07:00
Xiaohan-Tian 957f6db950 feat: added i18n support; added Simplified Chinese support 2026-05-30 20:02:55 -07:00
Xiaohan-Tian c4e4470182 feat: added waveform view for audio regions 2026-05-26 23:23:01 -07:00
Xiaohan-Tian 742b2fecf3 fix: restore main content global track updates after refactor 2026-05-25 15:41:00 -07:00
Xiaohan-Tian b36ea5a312 refactor: split MainContent into focused hooks and fix audio debug build 2026-05-25 14:17:10 -07:00
Xiaohan-Tian 4b5b5c8d76 feat: preview all the notes/regions during resizing/moving multiple notes and regions 2026-05-19 17:35:09 -07:00
Xiaohan-Tian 97dad696b2 feat: added shortcut N for sheet music view 2026-05-18 19:12:08 -07:00
Xiaohan-Tian 4cf474be7e feat: added split notes function 2026-05-18 19:00:21 -07:00
Xiaohan-Tian d10965066f feat: added shortcut for split and merge regions 2026-05-18 18:39:42 -07:00
Xiaohan-Tian 288af15ee9 fix: when resizing an unselected note, we should clear selected note(s) and select the current note being updated 2026-05-17 13:27:16 -07:00
Xiaohan-Tian 2bd6925f27 fix: switch to processing status when receiving response tokens from LLM 2026-05-14 21:37:06 -07:00
Xiaohan-Tian eb1c7bd2fc feat: added performance statistics info when using embedded LLM 2026-05-14 19:05:13 -07:00
Xiaohan-Tian 490cd19f68 feat: added audio recording feature 2026-05-09 15:57:46 -07:00
Xiaohan-Tian 6e5d9466f4 feat: implemented editable automation lane in piano roll window 2026-05-08 14:39:45 -07:00
Xiaohan-Tian 6d952b5b0b feat: allow user to multi-select regions. 2026-05-04 17:59:35 -07:00
Xiaohan-Tian fc304ac349 feat: added a shortcut E to open/close piano roll 2026-05-04 16:53:48 -07:00
Xiaohan-Tian 7a6e7558ce fix: pause button while recording should stop recoding 2026-05-02 23:02:37 -07:00
Xiaohan-Tian 9be96cd957 feat: add R as shortcut of recording button; fixed linter errors. 2026-05-01 14:29:27 -07:00
Xiaohan-Tian 83f4bfe47f fix: missing media files when renaming + saving the project 2026-04-10 12:14:20 -07:00
Xiaohan-Tian fc84edfc59 feat: add audio track support with WAV/MP3 playback and looping
Introduce KGAudioTrack and KGAudioRegion as new track/region types
alongside existing MIDI tracks. Users can import WAV, MP3, OGG, FLAC,
and AAC files into audio tracks with full playback, looping, and
solo/mute/volume support.

New core models:
- KGAudioTrack (extends KGTrack with TrackType.Wave)
- KGAudioRegion (extends KGRegion with audio file reference)
- KGAudioPlayerBus (Tone.Gain + ToneBufferSource-based playback)
- KGAudioFileStorage (OPFS media/ directory for binary audio files)

New commands:
- AddAudioTrackCommand (create audio track with player bus)
- ImportAudioCommand (import audio file, create region at playhead,
auto-expand maxBars)

Playback features:
- Audio regions scheduled via Tone.Transport alongside MIDI events
- Loop support with duration capping at loop boundaries
- Resume safety offset to prevent ToneBufferSource timing misses
- Cross-track buffer copy when moving audio regions between tracks
- Proper buffer cleanup on track deletion and project switch

UI changes:
- Separate "+ MIDI" and "+ Audio" buttons in top-left spacer
- Audio track shows upload button instead of instrument selector
- FileImportModal reused for audio file drag-and-drop upload
- Real waveform rendering on audio region canvas
- Green color scheme for audio regions (vs blue for MIDI)
- Pencil icon and resize handles hidden for audio regions
- Cross-type region moves blocked (MIDI ↔ Audio)
- Piano roll blocked for audio regions
- Audio region deletion support

Infrastructure:
- Project structure version bumped to 4 (no-op migration)
- class-transformer discriminators updated for new subtypes
- RemoveTrackCommand updated to clean up audio player buses
2026-04-09 21:54:54 -07:00
Xiaohan-Tian ee31ca087e fix: minor UI enhancements. 2026-04-05 19:59:49 -07:00
Xiaohan-Tian 2cd976ff96 refactor: migrate agent system from XML tool calling to OpenAI SDK with native function calling
- Replace custom XML-based tool parsing (XMLToolExecutor) with OpenAI SDK's
  native tool_calls via `openai` npm package (dangerouslyAllowBrowser)
- Consolidate 4 LLM providers (OpenAI, Claude, Gemini, ClaudeOpenRouter)
  into a single OpenAI SDK-based LLMProvider compatible with any
  OpenAI-style API (OpenAI, OpenRouter, Ollama, vLLM)
- Move agentic tool execution loop from ChatBox into AgentCore
- Update Message type to support tool roles, tool_calls, and tool_call_id
- Update system prompt to remove XML formatting instructions (~45% smaller)
- Remove AttemptCompletionTool (replaced by stop_reason detection),
  ThinkTool, and ThinkingTool
- Polish tool descriptions for OpenAI function calling schema compliance
- Normalize base URLs by stripping /chat/completions suffix
2026-04-05 18:59:25 -07:00
Xiaohan-Tian 78b798e138 feat: added a hotkey for loop button 2026-01-22 19:05:22 -08:00
Xiaohan-Tian 54b227c1be feat: implemented the logic to automatically create a chord when a suitable guide chord is highlighted. 2025-12-15 21:59:56 -08:00
Xiaohan-Tian 6445325f3a feat: implemented select all notes feature. 2025-08-28 19:23:21 -07:00
Xiaohan-Tian 8b0ddae58d optimized ChatBox component. 2025-08-16 17:35:40 -07:00
Xiaohan-Tian de51967b49 initial public release. 2025-08-11 18:37:21 -07:00