rojo/plugin/src/init.server.lua
Joe fd990b86c6 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.
2026-03-01 11:56:05 -06:00

46 lines
1.1 KiB
Lua

if not plugin then
return
end
local RunService = game:GetService("RunService")
local Rojo = script:FindFirstAncestor("Rojo")
local Packages = Rojo.Packages
local Log = require(Packages.Log)
local Roact = require(Packages.Roact)
local Settings = require(script.Settings)
local Config = require(script.Config)
local App = require(script.App)
local ConsoleOutput = require(script.McpTools.Utils.ConsoleOutput)
local GameStopUtil = require(script.McpTools.Utils.GameStopUtil)
GameStopUtil.setPlugin(plugin)
Log.setLogLevelThunk(function()
return Log.Level[Settings:get("logLevel")] or Log.Level.Info
end)
if RunService:IsRunning() and RunService:IsServer() then
task.spawn(GameStopUtil.monitorForStopPlay)
end
local consoleOutputConn = ConsoleOutput.startListener()
local app = Roact.createElement(App, {
plugin = plugin,
})
local tree = Roact.mount(app, game:GetService("CoreGui"), "Atlas UI")
plugin.Unloading:Connect(function()
Roact.unmount(tree)
consoleOutputConn:Disconnect()
end)
if Config.isDevBuild then
local TestEZ = require(script.Parent.TestEZ)
require(script.runTests)(TestEZ)
end