Enhance MCP sync functionality and improve documentation

- Updated the TODO list to include a task for ensuring well-formed MCP route documentation, enhancing agent usability.
- Modified the MCP stream handling to support additional parameters for sync commands, including mode and overrides for better control during sync operations.
- Introduced a new function to enrich sync changes with filesystem paths, improving traceability of changes.
- Updated API documentation to reflect new sync modes and override capabilities, providing clearer guidance for users.

These changes aim to improve the overall functionality and user experience of the MCP integration and sync process.
This commit is contained in:
Joe 2026-03-01 09:19:41 -06:00
parent 5d86b1ebdf
commit 9aa3145b06
5 changed files with 801 additions and 42 deletions

View file

@ -94,9 +94,13 @@ function McpStream:_tryConnect()
end
if data.type == "sync" and data.requestId then
Log.info("MCP stream: received sync command (requestId={})", data.requestId)
Log.info(
"MCP stream: received sync command (requestId={}, mode={})",
data.requestId,
data.mode or "standard"
)
local resultPromise = self._onSyncCommand(data.requestId)
local resultPromise = self._onSyncCommand(data.requestId, data.mode or "standard", data.overrides or {})
resultPromise
:andThen(function(result)