Conversation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a reusable formatError() helper to standardize CLI error output with an error code, message, and optional hint list, and updates multiple commands to use it.
Changes:
- Added
formatError(code, message, hints?)tosrc/lib/output.tsfor structured, colored error formatting. - Updated auth, document, collection, and skill commands to emit structured errors (with codes + hints) for common failure cases.
- Added unit tests covering
formatErrorbehavior with/without hints.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/output.ts | Introduces the new formatError() helper used across commands. |
| src/commands/skill.ts | Replaces unknown-agent error output with formatError(...) + actionable hints. |
| src/commands/document.ts | Uses formatError(...) for missing --confirm deletion confirmation. |
| src/commands/collection.ts | Uses formatError(...) for missing --confirm deletion confirmation. |
| src/commands/auth.ts | Uses formatError(...) for missing token and auth verification failures. |
| src/tests/output.test.ts | Adds test coverage for formatError across hint scenarios. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
github-actions Bot
pushed a commit
that referenced
this pull request
Mar 25, 2026
# 1.0.0 (2026-03-25) ### Bug Fixes * broaden CI detection to handle all truthy values ([7dc2806](7dc2806)) * exclude dist from biome checks ([0dc49a3](0dc49a3)) ### Features * add API Spinner Proxy ([#17](#17)) ([a3bc75a](a3bc75a)) * add fuzzy reference resolution ([#19](#19)) ([6c1c6f9](6c1c6f9)) * add npm publishing, new agent skills, and skill auto-update ([#36](#36)) ([bcb2e75](bcb2e75)), closes [Doist/todoist-cli#176](Doist/todoist-cli#176) [Doist/bob-cli#17](Doist/bob-cli#17) [Doist/twist-cli#101](Doist/twist-cli#101) * add structured error formatting with codes and hints ([#18](#18)) ([17658d2](17658d2)) * implement OAuth PKCE browser login ([#20](#20)) ([b7f6eec](b7f6eec)), closes [#7](#7) [outline/outline#11254](outline/outline#11254) * improve oauth login inputs and callback UX ([#31](#31)) ([3011b28](3011b28))
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
formatError()function tosrc/lib/output.tsfor structured error messages with error codes and hintsformatErrorfunctionTest plan
npm run type-check- passesnpm test- all 39 tests passCloses #12
🤖 Generated with Claude Code