[PR #686] [MERGED] CLI Refactor to Textual #825

Closed
opened 2026-02-16 09:17:16 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagents/pull/686
Author: @vtrivedy
Created: 1/8/2026
Status: Merged
Merged: 1/8/2026
Merged by: @vtrivedy

Base: masterHead: cli-push


📝 Commits (10+)

  • 9c885ef first draft of porting to textual, hitl not working rn, will do some specific ui for diffs, todos, subagents
  • 3d57a9c changes so far
  • 8ebc778 more progress on @, /, interrupts, theming, keybindings
  • 6287f2e better file matching, paste support, better diffs
  • 9d28e49 fix autocomplete matching
  • 840ef50 tests
  • 0c5610c big fixes, share with others, then split to small PRs
  • e646968 fix ui nits on small terminal size, shift+tab for approve mode
  • c785f19 make tool outputs nicer, fix spacing
  • c1dce1e make scrolling chiller

📊 Changes

27 files changed (+5602 additions, -1541 deletions)

View changed files

📝 .gitignore (+5 -0)
📝 libs/deepagents-cli/deepagents_cli/agent.py (+7 -1)
libs/deepagents-cli/deepagents_cli/app.py (+664 -0)
libs/deepagents-cli/deepagents_cli/app.tcss (+167 -0)
libs/deepagents-cli/deepagents_cli/clipboard.py (+94 -0)
libs/deepagents-cli/deepagents_cli/commands.py (+0 -89)
libs/deepagents-cli/deepagents_cli/execution.py (+0 -698)
📝 libs/deepagents-cli/deepagents_cli/main.py (+173 -308)
libs/deepagents-cli/deepagents_cli/sessions.py (+214 -0)
libs/deepagents-cli/deepagents_cli/textual_adapter.py (+594 -0)
📝 libs/deepagents-cli/deepagents_cli/ui.py (+18 -422)
libs/deepagents-cli/deepagents_cli/widgets/__init__.py (+27 -0)
libs/deepagents-cli/deepagents_cli/widgets/approval.py (+199 -0)
libs/deepagents-cli/deepagents_cli/widgets/autocomplete.py (+522 -0)
libs/deepagents-cli/deepagents_cli/widgets/chat_input.py (+537 -0)
libs/deepagents-cli/deepagents_cli/widgets/diff.py (+194 -0)
libs/deepagents-cli/deepagents_cli/widgets/history.py (+152 -0)
libs/deepagents-cli/deepagents_cli/widgets/loading.py (+161 -0)
libs/deepagents-cli/deepagents_cli/widgets/messages.py (+507 -0)
libs/deepagents-cli/deepagents_cli/widgets/status.py (+233 -0)

...and 7 more files

📄 Description

Summary

Full Textual-based terminal UI replacing the Rich console implementation, with persistent session support via SQLite.

Features

Multi-line input - Enter to send, Ctrl+J for newlines
Fuzzy file completion - Type @ to autocomplete files
Slash commands - /help, /clear, /quit with autocomplete
Bash mode - Type !ls to run shell commands directly
Tool approval UI - y/n/a quick keys, Escape to cancel
Auto-approve mode - Shift+Tab to toggle
Session persistence - Resume conversations with -r

Usage

deepagents # New session
deepagents -r # Resume most recent
deepagents -r abc123 # Resume specific thread
deepagents threads list # List sessions
deepagents threads delete ID # Delete session

Changes

Added app.py, textual_adapter.py, and widgets/ for Textual UI
Added sessions.py for SQLite-backed thread persistence
Removed commands.py, execution.py (legacy Rich CLI)
Trimmed ui.py (~1,200 lines of dead code removed)

Tests

139 tests passing


🔄 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/686 **Author:** [@vtrivedy](https://github.com/vtrivedy) **Created:** 1/8/2026 **Status:** ✅ Merged **Merged:** 1/8/2026 **Merged by:** [@vtrivedy](https://github.com/vtrivedy) **Base:** `master` ← **Head:** `cli-push` --- ### 📝 Commits (10+) - [`9c885ef`](https://github.com/langchain-ai/deepagents/commit/9c885efe6b0b026a44f507667fd4ea5c35cd2db8) first draft of porting to textual, hitl not working rn, will do some specific ui for diffs, todos, subagents - [`3d57a9c`](https://github.com/langchain-ai/deepagents/commit/3d57a9c8fa0c8dc4ae1c961a535c055109b9473d) changes so far - [`8ebc778`](https://github.com/langchain-ai/deepagents/commit/8ebc778750c9925cd30b3b55b8c21635116756e5) more progress on @, /, interrupts, theming, keybindings - [`6287f2e`](https://github.com/langchain-ai/deepagents/commit/6287f2e936c2f7aa4292da2fb0bab2efb7fb6da5) better file matching, paste support, better diffs - [`9d28e49`](https://github.com/langchain-ai/deepagents/commit/9d28e49cf47aa4acb17183511103721d9f2c8216) fix autocomplete matching - [`840ef50`](https://github.com/langchain-ai/deepagents/commit/840ef50b97ac927f2b017fcbabb7f5b5ad8afa47) tests - [`0c5610c`](https://github.com/langchain-ai/deepagents/commit/0c5610cf4d370baa818e6fbb34f3d18ca4f0b059) big fixes, share with others, then split to small PRs - [`e646968`](https://github.com/langchain-ai/deepagents/commit/e646968bb698d5d0d40b42837511881ce13612e8) fix ui nits on small terminal size, shift+tab for approve mode - [`c785f19`](https://github.com/langchain-ai/deepagents/commit/c785f19480730283536ca993e9eec20ff8dda790) make tool outputs nicer, fix spacing - [`c1dce1e`](https://github.com/langchain-ai/deepagents/commit/c1dce1e27e1f7bbdb2960916eb8e1d4b30e95ac4) make scrolling chiller ### 📊 Changes **27 files changed** (+5602 additions, -1541 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+5 -0) 📝 `libs/deepagents-cli/deepagents_cli/agent.py` (+7 -1) ➕ `libs/deepagents-cli/deepagents_cli/app.py` (+664 -0) ➕ `libs/deepagents-cli/deepagents_cli/app.tcss` (+167 -0) ➕ `libs/deepagents-cli/deepagents_cli/clipboard.py` (+94 -0) ➖ `libs/deepagents-cli/deepagents_cli/commands.py` (+0 -89) ➖ `libs/deepagents-cli/deepagents_cli/execution.py` (+0 -698) 📝 `libs/deepagents-cli/deepagents_cli/main.py` (+173 -308) ➕ `libs/deepagents-cli/deepagents_cli/sessions.py` (+214 -0) ➕ `libs/deepagents-cli/deepagents_cli/textual_adapter.py` (+594 -0) 📝 `libs/deepagents-cli/deepagents_cli/ui.py` (+18 -422) ➕ `libs/deepagents-cli/deepagents_cli/widgets/__init__.py` (+27 -0) ➕ `libs/deepagents-cli/deepagents_cli/widgets/approval.py` (+199 -0) ➕ `libs/deepagents-cli/deepagents_cli/widgets/autocomplete.py` (+522 -0) ➕ `libs/deepagents-cli/deepagents_cli/widgets/chat_input.py` (+537 -0) ➕ `libs/deepagents-cli/deepagents_cli/widgets/diff.py` (+194 -0) ➕ `libs/deepagents-cli/deepagents_cli/widgets/history.py` (+152 -0) ➕ `libs/deepagents-cli/deepagents_cli/widgets/loading.py` (+161 -0) ➕ `libs/deepagents-cli/deepagents_cli/widgets/messages.py` (+507 -0) ➕ `libs/deepagents-cli/deepagents_cli/widgets/status.py` (+233 -0) _...and 7 more files_ </details> ### 📄 Description ### Summary Full Textual-based terminal UI replacing the Rich console implementation, with persistent session support via SQLite. ### Features Multi-line input - Enter to send, Ctrl+J for newlines Fuzzy file completion - Type @ to autocomplete files Slash commands - /help, /clear, /quit with autocomplete Bash mode - Type !ls to run shell commands directly Tool approval UI - y/n/a quick keys, Escape to cancel Auto-approve mode - Shift+Tab to toggle Session persistence - Resume conversations with -r ### Usage deepagents # New session deepagents -r # Resume most recent deepagents -r abc123 # Resume specific thread deepagents threads list # List sessions deepagents threads delete ID # Delete session ### Changes Added app.py, textual_adapter.py, and widgets/ for Textual UI Added sessions.py for SQLite-backed thread persistence Removed commands.py, execution.py (legacy Rich CLI) Trimmed ui.py (~1,200 lines of dead code removed) ### Tests 139 tests passing --- <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:17:16 -05:00
yindo closed this issue 2026-02-16 09:17:16 -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#825