Skip to content

fix: improve git commit prompt to handle staged changes better#533

Merged
tusharmath merged 6 commits into
mainfrom
debug-statements
Mar 18, 2025
Merged

fix: improve git commit prompt to handle staged changes better#533
tusharmath merged 6 commits into
mainfrom
debug-statements

Conversation

@tusharmath

Copy link
Copy Markdown
Collaborator

Overview

This PR adds comprehensive debug logging to the Anthropic provider and standardizes naming conventions by renaming open_router/api.rs to provider.rs.

Purpose

These changes improve the debugging experience when troubleshooting API interactions with Anthropic and ensure consistent naming patterns across provider implementations.

Implementation

  • Added strategic debug log points in the Anthropic provider to capture:
    • API connection details (URL and model information)
    • Response status reporting
    • Detailed error information with status codes and headers
  • Reorganized the models() method by extracting a fetch_models() helper function
  • Improved error handling with more informative debug messages
  • Renamed OpenRouter's api.rs to provider.rs for naming consistency

Testing

The changes have been tested locally to ensure:

  • Debug logs appear correctly when running in debug mode
  • Error handling remains functional
  • The provider service continues to work as expected
  • Module references correctly point to the renamed file

Related Issues

No specific issues linked, but these changes address general debugging needs identified during development.

Changelog

Added

  • Detailed debug logging in Anthropic provider
  • New fetch_models() helper method for better error handling

Changed

  • Renamed open_router/api.rs to provider.rs
  • Updated module references in open_router/mod.rs
  • Enhanced error handling for API responses

Suggested Reviewers

Developers familiar with the provider implementations and API integrations would be most helpful in reviewing these changes.

Enhances the Anthropic provider implementation with debug logging statements
to improve troubleshooting capabilities. Includes:
- Added debug logs for API calls and responses
- Improved error handling for better diagnostics
- Refactored model fetching into separate method
Improves code organization by renaming the OpenRouter implementation file
from api.rs to provider.rs to be more consistent with other provider
implementations in the codebase. Updates the corresponding module
references.
@tusharmath tusharmath changed the title Add detailed debug logging and standardize provider naming chore: add detailed debug logging and standardize provider naming Mar 17, 2025
@github-actions github-actions Bot added the type: chore Routine tasks like conversions, reorganization, and maintenance work. label Mar 17, 2025
@tusharmath tusharmath changed the title chore: add detailed debug logging and standardize provider naming fix: imple git commit prompt to handle staged changes better Mar 18, 2025
@tusharmath tusharmath changed the title fix: imple git commit prompt to handle staged changes better fix: improve git commit prompt to handle staged changes better Mar 18, 2025
@tusharmath
tusharmath enabled auto-merge (squash) March 18, 2025 03:16
@tusharmath
tusharmath merged commit b94206f into main Mar 18, 2025
@amitksingh1490
amitksingh1490 deleted the debug-statements branch November 14, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore Routine tasks like conversions, reorganization, and maintenance work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant