fix(code): tool spinner, result formatting, and expand-hint fixes - #3661
Merged
Merged
Conversation
Mason Daugherty (mdrxy)
added a commit
that referenced
this pull request
May 30, 2026
> [!CAUTION] > Merging this PR will automatically publish to **PyPI** and create a **GitHub release**. For the full release process, see [`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md). --- _Everything below this line will be the GitHub release body._ --- ## [0.1.7](deepagents-code==0.1.6...deepagents-code==0.1.7) (2026-05-30) ### Features * Add toggleable message timestamp footers ([#3662](#3662)) ([977e110](977e110)) ### Bug Fixes * Fix zero tool MCP server rendering ([#3649](#3649)) ([7e7a567](7e7a567)) * Centralize debug logging setup to package root ([#3650](#3650)) ([5145ed1](5145ed1)) * Char-truncate execute tool preview output ([#3627](#3627)) ([bb276e2](bb276e2)) * Handle stale slash-command `Enter` before completion popup renders ([#3647](#3647)) ([9a28742](9a28742)) * Keep chat input focused when clicking a message ([#3655](#3655)) ([daf6571](daf6571)) * Mention `Ctrl+R` in MCP reconnect toast ([#3622](#3622)) ([3b4b086](3b4b086)) * Prevent duplicate-id crash on MCP reconnect and clipboard `NoScreen` ([#3632](#3632)) ([6b9a3c0](6b9a3c0)) * Reconstruct message counts for `DeltaChannel` threads from writes table ([#3668](#3668)) ([27e1940](27e1940)) * Render MCP tool errors and drop empty-string optional params ([#3624](#3624)) ([fdf3db4](fdf3db4)) * Respect line width in tool output previews ([#3646](#3646)) ([ba1ad2d](ba1ad2d)) * Restore resumed thread model ([#3651](#3651)) ([550a8ab](550a8ab)) * Tool spinner, result formatting, and expand-hint fixes ([#3661](#3661)) ([54485a3](54485a3)) --- _Everything above this line will be the GitHub release body._ --- > [!NOTE] > A **New Contributors** section is appended to the GitHub release notes automatically at publish time (see [Release Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline), step 2). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mason Daugherty <mason@langchain.dev> Co-authored-by: Mason Daugherty <github@mdrxy.com>
Marcelo5444
pushed a commit
to Marcelo5444/deepagents
that referenced
this pull request
Jul 30, 2026
…ngchain-ai#3661) Several display fixes for the TUI, centered on auto-executed read tools (`grep`, `glob`, `read_file`, `ls`). Previously these sat idle with no spinner until results arrived, scoped searches were indistinguishable in the transcript, and the expand/collapse hint frequently promised an expansion that revealed nothing. ## Changes - Show a per-tool running spinner the moment an auto-executed tool mounts, instead of falling back to the global "Thinking" spinner. Tools that then block on HITL approval or `ask_user` are paused via a new `ToolCallMessage.pause_running`, which reverts the row to its pending look and resets the elapsed timer so it doesn't misleadingly read "Running…"; the approve branches call `set_running` to resume. - Append the scoped `path` to `grep`/`glob` displays when it's non-default via `_format_scope_path` in `tool_display.py` — the glob default (`"/"`) and grep default (`None`) are omitted, so two otherwise-identical calls on different directories are now distinguishable. - Compact `read_file`'s `cat -n` gutter for display via `ToolCallMessage._compact_line_gutter`: line numbers are right-justified to the widest number present plus two spaces, replacing the raw 6-wide-plus-tab format, while preserving source indentation and passing non-numbered lines through untouched. - Fix the expand/collapse affordance so it only appears when the formatter actually hides content. The raw size threshold alone could trip on long single-line `grep`/`glob` output that truncates by line count, and force-expanded errors have no smaller collapsed form — both cases previously showed a misleading hint. `_has_expandable_output` now gates this in both directions. - Drop the leading four-space indent from `glob`/`grep` result lines so they sit flush left.
Marcelo5444
pushed a commit
to Marcelo5444/deepagents
that referenced
this pull request
Jul 30, 2026
> [!CAUTION] > Merging this PR will automatically publish to **PyPI** and create a **GitHub release**. For the full release process, see [`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md). --- _Everything below this line will be the GitHub release body._ --- ## [0.1.7](langchain-ai/deepagents@deepagents-code==0.1.6...deepagents-code==0.1.7) (2026-05-30) ### Features * Add toggleable message timestamp footers ([langchain-ai#3662](langchain-ai#3662)) ([977e110](langchain-ai@977e110)) ### Bug Fixes * Fix zero tool MCP server rendering ([langchain-ai#3649](langchain-ai#3649)) ([7e7a567](langchain-ai@7e7a567)) * Centralize debug logging setup to package root ([langchain-ai#3650](langchain-ai#3650)) ([5145ed1](langchain-ai@5145ed1)) * Char-truncate execute tool preview output ([langchain-ai#3627](langchain-ai#3627)) ([bb276e2](langchain-ai@bb276e2)) * Handle stale slash-command `Enter` before completion popup renders ([langchain-ai#3647](langchain-ai#3647)) ([9a28742](langchain-ai@9a28742)) * Keep chat input focused when clicking a message ([langchain-ai#3655](langchain-ai#3655)) ([daf6571](langchain-ai@daf6571)) * Mention `Ctrl+R` in MCP reconnect toast ([langchain-ai#3622](langchain-ai#3622)) ([3b4b086](langchain-ai@3b4b086)) * Prevent duplicate-id crash on MCP reconnect and clipboard `NoScreen` ([langchain-ai#3632](langchain-ai#3632)) ([6b9a3c0](langchain-ai@6b9a3c0)) * Reconstruct message counts for `DeltaChannel` threads from writes table ([langchain-ai#3668](langchain-ai#3668)) ([27e1940](langchain-ai@27e1940)) * Render MCP tool errors and drop empty-string optional params ([langchain-ai#3624](langchain-ai#3624)) ([fdf3db4](langchain-ai@fdf3db4)) * Respect line width in tool output previews ([langchain-ai#3646](langchain-ai#3646)) ([ba1ad2d](langchain-ai@ba1ad2d)) * Restore resumed thread model ([langchain-ai#3651](langchain-ai#3651)) ([550a8ab](langchain-ai@550a8ab)) * Tool spinner, result formatting, and expand-hint fixes ([langchain-ai#3661](langchain-ai#3661)) ([54485a3](langchain-ai@54485a3)) --- _Everything above this line will be the GitHub release body._ --- > [!NOTE] > A **New Contributors** section is appended to the GitHub release notes automatically at publish time (see [Release Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline), step 2). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mason Daugherty <mason@langchain.dev> Co-authored-by: Mason Daugherty <github@mdrxy.com>
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.
Several display fixes for the TUI, centered on auto-executed read tools (
grep,glob,read_file,ls). Previously these sat idle with no spinner until results arrived, scoped searches were indistinguishable in the transcript, and the expand/collapse hint frequently promised an expansion that revealed nothing.Changes
ask_userare paused via a newToolCallMessage.pause_running, which reverts the row to its pending look and resets the elapsed timer so it doesn't misleadingly read "Running…"; the approve branches callset_runningto resume.pathtogrep/globdisplays when it's non-default via_format_scope_pathintool_display.py— the glob default ("/") and grep default (None) are omitted, so two otherwise-identical calls on different directories are now distinguishable.read_file'scat -ngutter for display viaToolCallMessage._compact_line_gutter: line numbers are right-justified to the widest number present plus two spaces, replacing the raw 6-wide-plus-tab format, while preserving source indentation and passing non-numbered lines through untouched.grep/globoutput that truncates by line count, and force-expanded errors have no smaller collapsed form — both cases previously showed a misleading hint._has_expandable_outputnow gates this in both directions.glob/grepresult lines so they sit flush left.