Commit Graph

13 Commits

Author SHA1 Message Date
Xiaohan-Tian 7d53a9cd82 feat: add instrument listing, track creation and update tools to AI agent 2026-06-04 23:14:15 -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 5c5a07b839 feat: separated efficient agent mode (lite mode) for small language models 2026-06-04 16:45:06 -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 5aacf01457 feat: add agent todo tool and inline todo snapshot cards in chat 2026-06-02 21:52:44 -07:00
Xiaohan-Tian 395032390a feat: add read_chord_progression tool for the Agent 2026-05-26 17:56:55 -07:00
Xiaohan-Tian 26b7510178 fix: rename start_beat to start and end_beat to end in 3 tools. 2026-04-05 21:28:19 -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 fc151c818f remove debug info from AttemptCompletionTool. 2025-08-12 23:19:28 -07:00
Xiaohan-Tian e2e992cbda when converting KGTrack to ABC Notation Music Sheet, we should display the drum instrument name instead of the real track name in case the real track name can't indicate the track is using drum pitch notes. 2025-08-12 20:01:51 -07:00
Xiaohan-Tian 4fc2d773fd when exporting KGProject to ABC Notation Music Sheet, we need to export all the tracks including the track contains user selected region, but we should skip the track with no region or no note. 2025-08-12 18:56:55 -07:00
Xiaohan-Tian de51967b49 initial public release. 2025-08-11 18:37:21 -07:00