Skip to content

Conversation

@Mewyk
Copy link
Owner

@Mewyk Mewyk commented Dec 25, 2025

This pull request expands and refines the SDK documentation for image generation, coverage, and usage services. It introduces a comprehensive guide for the Coverage Service, improves job management documentation, updates multilingual README files with practical SDK usage examples, and enhances navigation in the documentation table of contents. These changes help users better understand and utilize the SDK’s capabilities for resource checking, job submission, and usage tracking.

SDK Documentation Improvements

  • Added a new guide: sdk-coverage.md, detailing how to check model and resource availability before submitting jobs, including API usage, error handling, caching strategies, batching, and resource discovery.
  • Updated sdk-introduction.md to clarify job creation, querying, and management with fluent builders, and improved the "Next Steps" section to reference new guides for jobs, coverage, usage, and AIR identifiers. [1] [2]
  • Changed job submission method from .SubmitAsync() to .ExecuteAsync() in code samples for consistency with the new builder pattern.

Multilingual Example Expansion

  • Added detailed SDK usage examples for image generation (Jobs), coverage, and usage services in Spanish (README.es-AR.md) and Japanese (README.ja.md), including code for querying job status, checking resource availability, and monitoring consumption. [1] [2]

Documentation Navigation

  • Updated toc.yml to include direct links to the new Jobs Service, Coverage Service, and Usage Service guides for easier access.

Replaced explicit ImmutableDictionary/ImmutableList.Empty initializations with collection expressions for conciseness. Changed 'Type' property in TextToImageJobRequest to static. Updated lock object type in SdkApiStringRegistry for thread safety improvements.
Copilot AI review requested due to automatic review settings December 25, 2025 15:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request represents a major architectural refactoring of the SDK's job submission and management API, transitioning from a service-based pattern to an immutable builder-based pattern. It also introduces comprehensive documentation for the Coverage, Jobs, and Usage services across multiple languages.

Key Changes:

  • Replaced IJobsService/JobsService with a new JobsBuilder entry point that exposes fluent, immutable builders for creating (TextToImageBuilder) and querying (JobQueryBuilder) jobs
  • Changed job submission method from SubmitAsync() to ExecuteAsync() for consistency with the builder pattern
  • Added comprehensive SDK documentation guides (sdk-coverage.md, sdk-jobs.md, sdk-usage.md) with detailed examples, best practices, and API references
  • Enhanced multilingual README files (English, Japanese, Spanish) with practical SDK usage examples for image generation, coverage checking, and usage monitoring

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
Sdk/Request/TextToImageBuilder.cs New immutable, thread-safe builder for text-to-image job creation with fluent API and direct HTTP execution
Sdk/Request/JobsBuilder.cs New entry point for job operations providing factory methods for job creation and cached query builder
Sdk/Request/JobQueryBuilder.cs New immutable builder for fluent job querying with filtering, cancellation, and tainting capabilities
Sdk/Services/JobsService.cs Removed in favor of new builder pattern
Sdk/Services/IJobsService.cs Removed in favor of new builder pattern
Sdk/SdkClient.cs Updated Jobs property type from IJobsService to JobsBuilder
Sdk/ISdkClient.cs Updated interface to reflect new JobsBuilder return type
Sdk/Models/Jobs/TextToImageJobRequest.cs Changed Type property from instance to static
Tests/CivitaiSharp.Sdk.Tests/Request/TextToImageJobBuilderTests.cs Removed comprehensive tests for old builder (437 lines)
Documentation/Guides/sdk-jobs.md New comprehensive guide for Jobs service (520 lines)
Documentation/Guides/sdk-coverage.md New guide for Coverage service with caching and batching strategies (325 lines)
Documentation/Guides/sdk-usage.md New guide for Usage service with monitoring patterns (412 lines)
Documentation/Guides/sdk-introduction.md Updated with new builder-based API examples and fluent query patterns
Documentation/Guides/toc.yml Added navigation links to new service guides
README.md Added SDK usage examples for Jobs, Coverage, and Usage services
README.ja.md Added Japanese translations of SDK usage examples
README.es-AR.md Added Spanish translations of SDK usage examples
Sdk/Extensions/SdkApiStringRegistry.cs Updated lock implementation to use .NET 9's Lock type

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Repository owner deleted a comment from Copilot AI Dec 25, 2025
Repository owner deleted a comment from Copilot AI Dec 25, 2025
Repository owner deleted a comment from Copilot AI Dec 25, 2025
Repository owner deleted a comment from Copilot AI Dec 25, 2025
Repository owner deleted a comment from Copilot AI Dec 25, 2025
Repository owner deleted a comment from Copilot AI Dec 25, 2025
Repository owner deleted a comment from Copilot AI Dec 25, 2025
@Mewyk
Copy link
Owner Author

Mewyk commented Dec 25, 2025

All of copilots suggestions were beyond stupid and incorrect; useless garbage.

@Mewyk Mewyk merged commit 9f1cc34 into alpha Dec 25, 2025
1 check passed
@Mewyk Mewyk deleted the development branch December 25, 2025 16:19
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.

2 participants