Repository navigation
fix: commands you put in the terminal send their output back to the agent - #621
Merged
Merged
Conversation
…gent An agent's "Put in terminal" card stopped tracking the command when the user pressed Enter, and only Run sent output back by itself, so nothing ever reached the agent. The terminal now follows an entered insert until the command it started ends: PowerShell's prompt marker, or a POSIX shell's line editor coming back on while a fresh process table shows the shell in front of its terminal again (`+` in its ps state, so a REPL, ssh or nested shell keeps it going and a background job doesn't). A builtin waiting for input isn't ended by idle polls, a line typed ahead ends it at the first prompt, and the output stops where that prompt began. Request cards now send their output by itself in both modes, behind a new `followsInsertedCommands` capability. "Send output so far" shows for running commands that would send by themselves, and an old "submitted" run no longer blocks moving a thread.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
When an agent asked you to run a command and you used Put in terminal and pressed Enter, the output never went back to the agent. The card stopped following the command at Enter (status
submitted), and only Run sent output back by itself.What changed
apps/server/src/terminal/Layers/Manager.ts,FollowedInsert). The run goesrunning→finished(no exit code, since a shell doesn't report one), with the tab's output from the insert up to the prompt that came back.+in itspsstate). A REPL, ssh or nested shell in front keeps it going; a job left in the background doesn't.read) isn't ended by idle polls. A line typed ahead ends it at the first prompt only when the shell takes that line right away (an ssh password doesn't count).CommandRuns.ts), behind a new capabilityfollowsInsertedCommands, so newer clients only promise it to servers that do it. Agent-facing tool text updated.CommandRuns.tsx): "fx gets the output when it finishes" on insert cards; a finished insert reads "Ran in Terminal 1 · 3s" with no pass/fail dot. "Send output so far" now shows for a running command that would send by itself, Run included, since a dev server never finishes.submittedrun is final and no longer counts as live work, which blocked moving a thread forever.docs/terminal-command-runs.md, including the known limits (read -e/vared, shells without job control, a command started within the moment of the process check).Testing
read, typed ahead with output cut at the prompt, ssh password, PowerShell marker). Each guard was broken on purpose to confirm a test fails without it.ps: normal command,cd, nested shell, background job,read, typed ahead, tab closed mid-command.vp fmt,vp lint,vp run typecheck; full server (3,312), web unit (2,991), shared (531), contracts (109) suites, plus the CommandRuns and ChatMarkdown browser tests.