Repository navigation
Conversation
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
There was a problem hiding this comment.
Pull request overview
This PR adds a new projects CLI command that displays project statistics including session counts, last activity timestamps, and worktree status. The implementation focuses on full path visibility with text wrapping instead of truncation, aligned table formatting across terminal widths, and proper locale-aware time formatting.
Key changes:
- New
projectsCLI command with sorting, filtering, and limit options - Display function that wraps long paths without truncation and maintains table frame alignment
- Unit test verifying wrapping behavior, frame alignment, and locale time formatting
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| packages/opencode/test/cli/projects.test.ts | Adds test for displayProjectStats verifying path wrapping, frame alignment, and locale time formatting |
| packages/opencode/src/index.ts | Registers new ProjectsCommand in CLI |
| packages/opencode/src/cli/cmd/projects.ts | Implements projects command with aggregation, sorting, filtering, and table display logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…reads to avoid FS overload and compute lastActive safely, improved wrapText to prefer separators/spaces and avoid truncation. - tests: Added reusable createProject helper and new coverage for empty list, multiple projects with totals, missing lastActive (“never”), and clamped narrow width while keeping path wrapping and frame alignment.
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
|
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
|
Can I re-open this? would still love to use it. |
|
@allen-n can you reopen this pr please? |
What does this PR do?
Adds a projects CLI command that lists all known projects with session counts, last-activity timestamps, and worktree status. Output now wraps full paths (no truncation), aligns with existing CLI patterns (UI.println, Locale.todayTimeOrDateTime), supports sorting/limit/active-only flags, and keeps the table frame intact across terminal widths (clamped to 80–120, defaults to 100 when unknown).
How did you verify your code works?
bun test --cwd packages/opencode test/cli/projects.test.ts(verifies wrapping, no ellipsis, locale time, aligned frame)bun run --cwd packages/opencode src/index.ts projects --sort activityto see live output in the terminal.Fixes #7545