di-sukharev / di-sukharev/opencommit
[Bug]: json (malformed?) output when there is a lot of changes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 445
- Avg merge
- 18m
- Merged PRs (30d)
- 2
Description
Opencommit Version
3.2.7
Node Version
23.9.0
NPM Version
10.9.2
What OS are you seeing the problem on?
Mac
What happened?
hello
When I make big changes in the code, I get malformed commit messages.
what am i doing wrong?
~/.opencommit:
OCO_ONE_LINE_COMMIT=false
OCO_MODEL=qwen2.5-coder
OCO_API_URL=http://127.0.0.1:11434/api/chat
OCO_API_KEY=none
OCO_AI_PROVIDER=ollama
OCO_TOKENS_MAX_INPUT=40960
OCO_TOKENS_MAX_OUTPUT=4096
OCO_DESCRIPTION=false
OCO_EMOJI=false
OCO_LANGUAGE=en
OCO_MESSAGE_TEMPLATE_PLACEHOLDER=$msg
OCO_PROMPT_MODULE=conventional-commit
OCO_TEST_MOCK_TYPE=commit-message
OCO_OMIT_SCOPE=undefined
OCO_GITPUSH=false
OCO_WHY=false
Expected Behavior
The provided code snippet appears to be part of a larger project that has been significantly refactored or deleted. The files and their contents have been removed, leaving only the directory structure and some variable declarations. It's unclear what specific functionality was contained in these files without additional context. If you need assistance with understanding or recovering from this situation, please provide more details about your goals or any relevant information about the project.
Current Behavior
[master c4aaadc] json { "response": "The provided code snippet appears to be part of a larger project that has been significantly refactored or deleted. The files and their contents have been removed, leaving only the directory structure and some variable declarations. It's unclear what specific functionality was contained in these files without additional context. If you need assistance with understanding or recovering from this situation, please provide more details about your goals or any relevant information about the project." }
Possible Solution
No response
Steps to Reproduce
- remove all from ./src/ in codebase
- commit
- malformed output
- put everything back
- commit
- malformed output
Relevant log output
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
Reproduce the issue by removing and restoring the contents of ./src/ with the listed Ollama configuration, then inspect the commit-message generation flow in src/. Compare the model response with the malformed commit output; done means large changes produce a valid commit message rather than embedded JSON or explanatory text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, javascript, node.js, ollama
- Domain
- ai, cli, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100