di-sukharev / di-sukharev/opencommit
๐ [Feature]: Proposal for Configurable Backend Integration
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 445
- Avg merge
- 18m
- Merged PRs (30d)
- 2
Description
Description
Hello wonderful OpenCommit family! ๐ Before diving in, I must express my admiration for the code owners and contributors of OpenCommit. You folks rock! ๐ธ Now, I have another proposal aimed at amplifying OpenCommit's flexibility and interoperability. ๐
OpenCommit is currently restricted to using OpenAI as the backend. Allowing configuration for alternative backends would greatly increase the project's scope and applicability. ๐
https://github.com/di-sukharev/opencommit/issues/150
Suggested Solution
Implement a configuration mechanism that allows users to connect to any backend.
- Define a configuration schema with fields like
backend_url,api_key, andrequest_format. - Store this configuration in a file (e.g.,
backend-config.json) in~/.opencommit/. - Read the configuration at startup to determine the backend.
- Create an abstract
BackendInterfacein TypeScript for backend integrations. - Develop specific backend classes that implement this interface.
- Use dependency injection to use the correct backend based on the configuration (?).
Alternatives
- Hardcoding multiple backend options, but this lacks scalability.
- Providing only a few select backends as options, but this limits the choice for users. (Self-hosted LLMs...)
Additional Context
This proposal opens up OpenCommit to a wider audience by supporting a variety of backend services. Users can connect to the backend that best fits their needs or preferences.
๐ก I am excited to know what you think! Your feedback and ideas are invaluable. ๐
Thank you, OpenCommit family! ๐
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up โ it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the startup configuration loading and the current OpenAI backend entry point. Review the proposed backend-config.json in ~/.opencommit/, BackendInterface, backend classes, and dependency-injection approach; done means users can select an alternative backend through configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100