Refactor campfire list to use getDockTools helper#281
Conversation
Review carefully before merging. Consider a major version bump. |
There was a problem hiding this comment.
Pull request overview
This PR refactors dock parsing for campfire listing by extracting a reusable getDockTools helper (plus a shared not-found error builder) and rewiring campfire list to use it, while also improving list output summaries and standardizing breadcrumbs to --campfire syntax.
Changes:
- Extract
getDockToolsanddockToolNotFoundErrorfromgetDockToolIDto enable reuse and reduce inline dock parsing. - Update
campfire list(project-scoped) to usegetDockTools, and adjust summaries for single vs multi-campfire projects. - Standardize list-related breadcrumbs to use
--campfirelong-flag syntax (includinglist --all).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/commands/helpers.go | Introduces getDockTools + dockToolNotFoundError and refactors getDockToolID to use them. |
| internal/commands/helpers_test.go | Adds unit tests for getDockTools behavior and a regression test for ambiguous dock tool selection. |
| internal/commands/campfire.go | Refactors project-scoped campfire list to use getDockTools, improves summaries, and updates breadcrumbs to --campfire. |
| internal/commands/campfire_test.go | Adds tests covering new breadcrumb syntax and summary behavior for single/multiple campfires and --all. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1b778b2 to
46de6d7
Compare
46de6d7 to
9fafc5d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Splits dock resolution into composable helpers so callers that need the full tool list (like campfire list) can use getDockTools directly without going through getDockToolID's single-ID contract.
Replaces inline dock parsing with the shared getDockTools helper. Adds title-based summary for single campfire, count-based for multiple. Fixes breadcrumbs to use --campfire flag syntax throughout (list, list --all, and campfireListBreadcrumbs helper).
Update messages, post, upload, show, and delete breadcrumbs to use `--chat <id>` instead of positional `chat <id> <action>`.
e65dad9 to
72eb59e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
getDockToolsanddockToolNotFoundErrorfromgetDockToolIDin helpers.go, so chat list can use the lower-level helper directly instead of duplicating dock parsing inlinerunChatListproject-scoped path to callgetDockTools, replacing the inline dock parsing added in Fixcampfire liston multi-campfire projects #275--chatlong flag syntax instead of positionalchat <id> <action>Builds on #275 which added core multi-chat support.
Test plan
bin/cipasses (unit tests, e2e, lint, surface snapshot, skill drift)TestGetDockTools_*— new helper returns correct enabled/all partitionsTestGetDockToolID_AmbiguousMultipleReturnsError— regression guard for messages/post pathsTestChatListMultipleChatsBreadcrumbs—--chatsyntax in multi-chat breadcrumbsTestChatListSingleChatSummary— title summary + concrete ID breadcrumbsTestChatListAllBreadcrumbSyntax—--allbreadcrumbs use--chatnot positional