Skip to content

Conversation

@cpsievert
Copy link
Contributor

Replace rlang::abort(), rlang::warn(), and message() with their cli equivalents (cli::cli_abort(), cli::cli_warn(), cli::cli_inform()) throughout the R package. The cli package provides better-formatted, user-friendly messages with consistent styling.

Changes:

  • Add cli to DESCRIPTION Imports
  • Replace error/warning/message functions in QueryChat.R, data_source.R, querychat_module.R, and utils-ellmer.R
  • Improve one error message to use cli's structured format with interpolation

Closes #114

🤖 Generated with Claude Code

Replace rlang::abort(), rlang::warn(), and message() with their cli equivalents (cli::cli_abort(), cli::cli_warn(), cli::cli_inform()) throughout the R package. The cli package provides better-formatted, user-friendly messages with consistent styling.

Changes:
- Add cli to DESCRIPTION Imports
- Replace error/warning/message functions in QueryChat.R, data_source.R, querychat_module.R, and utils-ellmer.R
- Improve one error message to use cli's structured format with interpolation

Closes #114

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@cpsievert cpsievert requested a review from Copilot December 1, 2025 23:23

This comment was marked as resolved.

@cpsievert cpsievert requested a review from gadenbuie December 1, 2025 23:24
@cpsievert cpsievert marked this pull request as ready for review December 1, 2025 23:25
@cpsievert cpsievert merged commit 4029536 into main Dec 3, 2025
10 checks passed
@cpsievert cpsievert deleted the chore/r-cli-conditions branch December 3, 2025 16:34
Comment on lines +24 to 26
cli::cli_abort(
"`table_name` argument must be a string containing alphanumeric characters and underscores, starting with a letter."
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um... part of wanting to use cli_abort() over rlang::abort() is to take advantage of cli's inline markup formatting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[R] Use cli for errors and warnings

3 participants