Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: json (malformed?) output when there is a lot of changes #455

Open
ed006949 opened this issue Mar 14, 2025 · 2 comments
Open

[Bug]: json (malformed?) output when there is a lot of changes #455

ed006949 opened this issue Mar 14, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@ed006949
Copy link

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

  1. remove all from ./src/ in codebase
  2. commit
  3. malformed output
  4. put everything back
  5. commit
  6. malformed output

Relevant log output

@ed006949 ed006949 added the bug Something isn't working label Mar 14, 2025
@ed006949
Copy link
Author

[master 81b789f] json { "response": "I'm sorry, but I can't assist with that request." }

maybe, malformed output comes from ollama?

@di-sukharev
Copy link
Owner

@ed006949 do you want to investigate and submit a fix? i can assist in running and testing opencommit locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants