mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-25 04:54:07 +00:00
Enhance MCP tool functionality and improve logging capabilities
- Introduced new MCP tools for executing Luau code, inserting models, and retrieving console output, enhancing the plugin's capabilities for user interaction. - Implemented a logging system to capture console output and provide detailed feedback during code execution and play mode operations. - Updated the MCP stream to handle passthrough commands, allowing for better integration of tool commands and improved error handling. - Enhanced the TODO list to reflect new tasks related to documentation for the added MCP tools and logging features. These changes aim to improve the overall functionality and user experience of the MCP integration, particularly in script execution and model management.
This commit is contained in:
parent
fd49602adb
commit
fd990b86c6
24 changed files with 1464 additions and 12 deletions
|
|
@ -38,6 +38,7 @@ local Dictionary = require(Plugin.Dictionary)
|
|||
local ServeSession = require(Plugin.ServeSession)
|
||||
local ApiContext = require(Plugin.ApiContext)
|
||||
local McpStream = require(Plugin.McpStream)
|
||||
local McpTools = require(Plugin.McpTools)
|
||||
local PatchSet = require(Plugin.PatchSet)
|
||||
local PatchTree = require(Plugin.PatchTree)
|
||||
local preloadAssets = require(Plugin.preloadAssets)
|
||||
|
|
@ -214,6 +215,24 @@ function App:init()
|
|||
onGetScriptCommand = function(requestId, data)
|
||||
return self:handleMcpGetScript(requestId, data)
|
||||
end,
|
||||
onToolCommand = function(requestId, toolType, args)
|
||||
return Promise.new(function(resolve)
|
||||
local ok, result = pcall(McpTools.dispatch, toolType, args)
|
||||
if ok then
|
||||
resolve({
|
||||
requestId = requestId,
|
||||
status = "success",
|
||||
response = result or "",
|
||||
})
|
||||
else
|
||||
resolve({
|
||||
requestId = requestId,
|
||||
status = "error",
|
||||
response = tostring(result),
|
||||
})
|
||||
end
|
||||
end)
|
||||
end,
|
||||
getPluginConfig = function(key)
|
||||
return Settings:get(key)
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue