rbxstudio-mcp 1.12.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/studio-plugin/plugin.luau +35 -3
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -22,6 +22,38 @@ local actionHistory = {} -- Stack of actions that can be undone
|
|
|
22
22
|
local redoHistory = {} -- Stack of actions that can be redone
|
|
23
23
|
local MAX_ACTION_HISTORY = 100
|
|
24
24
|
|
|
25
|
+
-- Helper to serialize values nicely for logging
|
|
26
|
+
local function serializeValue(value)
|
|
27
|
+
local t = typeof(value)
|
|
28
|
+
if t == "Vector3" then
|
|
29
|
+
return string.format("Vector3(%.2f, %.2f, %.2f)", value.X, value.Y, value.Z)
|
|
30
|
+
elseif t == "Vector2" then
|
|
31
|
+
return string.format("Vector2(%.2f, %.2f)", value.X, value.Y)
|
|
32
|
+
elseif t == "Color3" then
|
|
33
|
+
return string.format("Color3(%.2f, %.2f, %.2f)", value.R, value.G, value.B)
|
|
34
|
+
elseif t == "BrickColor" then
|
|
35
|
+
return "BrickColor(" .. value.Name .. ")"
|
|
36
|
+
elseif t == "UDim2" then
|
|
37
|
+
return string.format("UDim2(%.2f, %d, %.2f, %d)", value.X.Scale, value.X.Offset, value.Y.Scale, value.Y.Offset)
|
|
38
|
+
elseif t == "UDim" then
|
|
39
|
+
return string.format("UDim(%.2f, %d)", value.Scale, value.Offset)
|
|
40
|
+
elseif t == "CFrame" then
|
|
41
|
+
return string.format("CFrame(%.1f, %.1f, %.1f)", value.X, value.Y, value.Z)
|
|
42
|
+
elseif t == "table" then
|
|
43
|
+
if #value > 0 then
|
|
44
|
+
local parts = {}
|
|
45
|
+
for i, v in ipairs(value) do
|
|
46
|
+
if i > 3 then table.insert(parts, "...") break end
|
|
47
|
+
table.insert(parts, serializeValue(v))
|
|
48
|
+
end
|
|
49
|
+
return "{" .. table.concat(parts, ", ") .. "}"
|
|
50
|
+
end
|
|
51
|
+
return "{...}"
|
|
52
|
+
else
|
|
53
|
+
return tostring(value)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
25
57
|
-- Helper to log an action for undo tracking
|
|
26
58
|
local function logAction(actionType, target, summary, details)
|
|
27
59
|
-- Clear redo history when a new action is performed
|
|
@@ -79,7 +111,7 @@ local screenGui = plugin:CreateDockWidgetPluginGuiAsync(
|
|
|
79
111
|
"MCPServerInterface",
|
|
80
112
|
DockWidgetPluginGuiInfo.new(Enum.InitialDockState.Float, false, false, 400, 500, 350, 450)
|
|
81
113
|
)
|
|
82
|
-
screenGui.Title = "MCP Server v1.12.
|
|
114
|
+
screenGui.Title = "MCP Server v1.12.1"
|
|
83
115
|
|
|
84
116
|
local mainFrame = Instance.new("Frame")
|
|
85
117
|
mainFrame.Size = UDim2.new(1, 0, 1, 0)
|
|
@@ -132,7 +164,7 @@ local versionLabel = Instance.new("TextLabel")
|
|
|
132
164
|
versionLabel.Size = UDim2.new(1, 0, 0, 16)
|
|
133
165
|
versionLabel.Position = UDim2.new(0, 0, 0, 32)
|
|
134
166
|
versionLabel.BackgroundTransparency = 1
|
|
135
|
-
versionLabel.Text = "AI Integration • v1.12.
|
|
167
|
+
versionLabel.Text = "AI Integration • v1.12.1"
|
|
136
168
|
versionLabel.TextColor3 = Color3.fromRGB(191, 219, 254)
|
|
137
169
|
versionLabel.TextScaled = false
|
|
138
170
|
versionLabel.TextSize = 12
|
|
@@ -1490,7 +1522,7 @@ handlers.setProperty = function(requestData)
|
|
|
1490
1522
|
|
|
1491
1523
|
if success and result ~= false then
|
|
1492
1524
|
-- Log for undo tracking
|
|
1493
|
-
logAction("set_property", instancePath, propertyName .. " = " ..
|
|
1525
|
+
logAction("set_property", instancePath, propertyName .. " = " .. serializeValue(propertyValue), {
|
|
1494
1526
|
propertyName = propertyName,
|
|
1495
1527
|
newValue = propertyValue
|
|
1496
1528
|
})
|