Dhanji R. Prasanna
9325a43ff3
feat(cli): shorten file paths in tool output display
Add three-level path shortening hierarchy for cleaner CLI output:
1. Project path -> <project_name>/... (when project loaded via /project)
2. Workspace path -> ./... (relative to current working directory)
3. Home path -> ~/... (fallback for paths under home directory)
Changes:
- Add shorten_path() and shorten_paths_in_command() functions in display.rs
- Add project_path/project_name fields to ConsoleUiWriter
- Add set_workspace_path(), set_project_path(), clear_project() to UiWriter trait
- Add ui_writer() getter to Agent struct
- Wire up project path setting in /project and /unproject commands
- Set workspace path when creating agents in all CLI modes
Before: ● read_file | /Users/dhanji/icloud/butler/projects/appa_estate/status.md
After: ● read_file | appa_estate/status.md (with project loaded)
● read_file | ./src/main.rs (workspace-relative)
● read_file | ~/Documents/file.txt (home-relative)
2026-01-21 21:27:16 +05:30
..
2026-01-21 21:27:16 +05:30
2026-01-21 06:54:31 +05:30
2026-01-17 09:48:10 +05:30
2026-01-21 21:27:16 +05:30
2025-12-22 16:27:35 +11:00
2026-01-20 09:50:55 +05:30
2026-01-19 14:44:30 +05:30
2026-01-16 07:30:27 +05:30