vscode-extension: LuaMap Tools for VS Code over LuaBridge - #13
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
TypeScript extension: net.Socket NDJSON client (protocol v1), status-bar badge, activity-bar sidebar (session actions, live NPC inspector, script runner), eval console, world.getblock query, Lua autocomplete+snippets, LuaMap: Connect/Disconnect/Reconnect/Run Script/Evaluate Lua/Query Block commands. 14 node:test unit tests over a mock loopback NDJSON server. ide-plugin marked deprecated (retained; Gradle/launcher wiring unchanged). Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
vscode-extension/, a TypeScript VS Code extension that speaks the existing LuaBridge loopback NDJSON protocol (v1) — the new supported IDE path. The IntelliJ plugin (ide-plugin/) is marked deprecated but retained: Gradle composite build, launcherfatJarbundling, and--setup-ide/--ideare untouched, so nothing regresses.Extension contents:
src/luabridge.ts— vscode-free protocol layer:encodeRequest/LineFramer(incremental NDJSON decode) andBridgeClient(net.Socket, pipelined requests matched byid, state machinedisconnected→connecting→connected|error, close/drop callbacks). All I/O is event-driven — nothing blocks the extension host UI.src/session.ts—LuaBridgeSessioncontroller: connect/disconnect/reconnect, ~1.5 s auto-reconnect, periodic poll (status+ anevalof annpc.list()CSV snippet — no mod/protocol change needed), plusparseStatus/parseNpcs/replyTextshared helpers.src/sidebar.ts— activity-bar container with three tree views: Session (state + Connect/Disconnect/Reconnect/Run/Evaluate/Query actions), NPCs (live inspector: name + x/y/z, refreshes each poll), Scripts (listresults, click to run).src/completion.ts— Lua completion + snippets forworld.*,npc.*,player.*,chat,log,print.src/extension.ts— commandsLuaMap: Connect/Disconnect/Reconnect/Run Script/Evaluate Lua/Query Block/Refresh NPCs, status-bar badge,LuaMapoutput channel as the eval/console log, settingsluamap.bridge.host/port(defaults127.0.0.1:25575),luamap.autoReconnect,luamap.pollIntervalSeconds. Disposal kills sockets + timers.Tests: 14
node:testcases over a mock loopback NDJSON server — framing (partial/coalesced/blank/malformed lines), v1 wire format, id-matched pipelining, connect/drop/reconnect + session polling, status/NPC/block/error reply parsing.npm test=tsc+node --test, no VS Code instance needed.Verification
npm test— 14/14 green./gradlew clean build— BUILD SUCCESSFUL, all existing tests green;verifyPluginXml+verifyLauncherJarranvsce package→luamap-vscode-0.4.0.vsix(20 KB, 15 files)Limitations
--setup-ide/--idestill provision IntelliJ + the deprecated plugin; a follow-up could swap that tocode --install-extensiononce this path has soaked.Link to Devin session: https://app.devin.ai/sessions/f2c11399d60948a394f9836472375e2f
Open in Devin Desktop: https://app.devin.ai/desktop/session/f2c11399d60948a394f9836472375e2f?variant=devin
Requested by: @CommunityPoke