fix: capture editor launch output and expose view_log tool (issue #106)#107
Open
twinlunarstarz-dev wants to merge 1 commit into
Open
Conversation
…ing-Solo#106) - Add editorLogLines buffer to GodotServer class for capturing stdout/stderr during editor launches - Modify handleLaunchEditor to pipe process output into log buffer with [stdout]/[stderr] prefixes - Return immediately after spawn instead of waiting, preventing timeout on slow startups - Add new view_log tool that returns configurable number of trailing lines from the log buffer (default 50, max 1000) - Update launch_editor return message to prompt AI to use view_log for checking startup errors This fixes issue Coding-Solo#106 where parse errors and other Godot console output during editor launch were invisible to the AI consumer. Now the AI can call view_log after launch_editor to inspect what Godot printed, including ERROR lines.
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
Fixes issue #106 — Godot editor launch errors (e.g., parse errors) were invisible to the AI consumer because
launch_editoronly returned "launched successfully" without capturing console output.Changes Made (
src/index.ts)1. Added in-memory log buffer
editorLogLines: string[]onGodotServerclass stores stdout/stderr lines from editor launches (non-persistent, cleared on new launch).2. Modified
handleLaunchEditoreditorLogLinesbuffer line-by-line with[stdout]/[stderr]prefixes.3. New
view_logtoollineCountparameter (default: 50, max: 1000).Direct Modifications
editorLogLinesfield to classhandleLaunchEditor)view_logtool schema withlineCountparameter and description"view_log"routing tohandleViewLog, removed unused"get_debug_output"/"stop_project"cases, updated default error messagehandleViewLog()— validates lineCount param and returns trailing lines as[stdout].../[stderr]...prefixed textTesting
view_logtool successfully captures startup output (engine version, GPU info) immediately afterlaunch_editor.Note: I do not have extensive TypeScript knowledge — please inspect the code changes carefully to verify correctness and ensure no edge cases are missed.