[PR #1339] fix(cli): preserve path context in file tool display #1320

Open
opened 2026-02-16 09:18:43 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagents/pull/1339
Author: @OiPunk
Created: 2/14/2026
Status: 🔄 Open

Base: mainHead: codex/deepagents-1142-show-full-tool-path


📝 Commits (1)

  • a57eb9b fix(cli): keep full path context in tool call display

📊 Changes

2 files changed (+32 additions, -3 deletions)

View changed files

📝 libs/cli/deepagents_cli/ui.py (+18 -3)
📝 libs/cli/tests/unit_tests/test_ui.py (+14 -0)

📄 Description

Summary

Fixes #1142 by preserving directory context for long file paths in tool call display output.

What changed

  • Updated format_tool_display path abbreviation logic in libs/cli/deepagents_cli/ui.py.
  • For long paths, display now keeps both path prefix and filename (middle truncation) instead of collapsing to basename only.
  • Added regression test in libs/cli/tests/unit_tests/test_ui.py.

Why this helps

In monorepos and worktree setups, showing only basename is ambiguous. Keeping path context makes it clear which file is being read/edited.

Validation

  • uv run --project libs/cli ruff check libs/cli/deepagents_cli/ui.py libs/cli/tests/unit_tests/test_ui.py
  • uv run --project libs/cli pytest libs/cli/tests/unit_tests/test_ui.py -q

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagents/pull/1339 **Author:** [@OiPunk](https://github.com/OiPunk) **Created:** 2/14/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/deepagents-1142-show-full-tool-path` --- ### 📝 Commits (1) - [`a57eb9b`](https://github.com/langchain-ai/deepagents/commit/a57eb9b217682b452f41a01d262af55619d97966) fix(cli): keep full path context in tool call display ### 📊 Changes **2 files changed** (+32 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `libs/cli/deepagents_cli/ui.py` (+18 -3) 📝 `libs/cli/tests/unit_tests/test_ui.py` (+14 -0) </details> ### 📄 Description ## Summary Fixes #1142 by preserving directory context for long file paths in tool call display output. ## What changed - Updated `format_tool_display` path abbreviation logic in `libs/cli/deepagents_cli/ui.py`. - For long paths, display now keeps both path prefix and filename (middle truncation) instead of collapsing to basename only. - Added regression test in `libs/cli/tests/unit_tests/test_ui.py`. ## Why this helps In monorepos and worktree setups, showing only basename is ambiguous. Keeping path context makes it clear which file is being read/edited. ## Validation - `uv run --project libs/cli ruff check libs/cli/deepagents_cli/ui.py libs/cli/tests/unit_tests/test_ui.py` - `uv run --project libs/cli pytest libs/cli/tests/unit_tests/test_ui.py -q` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 09:18:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagents#1320