Closed alexllao closed 1 year ago
It's kinda possible :)
just run oc hook set
and you can then click "Enter" key in the empty Source Control input and VSCode will open a file for editing the commit.
If VSCode doesn't open the commit editing window — you should probably turn on this setting:
Hi!!!
✖ Error: EPERM: operation not permitted, symlink 'C:\xxxxxxxxxxxxxxxxxxxxxxxx\node_modules\opencommit\out\cli.cjs' -> 'C:\Uxxxxxxxxxxxxxxxxxxxxxxx.git\hooks\prepare-commit-msg'
I've pre-commit with husky like this:
. "$(dirname -- "$0")/_/husky.sh" npx pretty-quick --staged npx --no-install lint-staged
looks like an issue, shouldn't be conflicting with your hook. Anyway, do you want to research locally and make a PR? At least showing an error if it's a conflict.
ufff i'm a newbye.
I've this in my package.json
"husky": { "hooks": { "pre-commit": "lint-staged" } }, "lint-staged": { "**/*.{ts,tsx,md,js,jsx,json}": [ "prettier --write \"**/*.{ts,tsx,md,js,jsx,json}\"" ] },
It would be interesting if by committing within VSCode, with the "SoureControl" plugin, and not passing any message to it, it would already do everything automatically.
Is it possible to define it in commit language?
I think that issue may come from Windows.
will investigate, thanks bro
Besides CLI there is should be a vscode extension, openai key should be configured in vscode settings. also, it should not include any functionality besides comparing a diff of already staged files, it should have an icon button that suggests a text in the commit message window that I can edit.
I don't want to install anything globally, and while configuring an API key I've got an execution policy error on windows.
Could you provide error message pls
any ways to auto oc hook set
?
any ways to auto
oc hook set
?
i don't think it's a good idea, people could have their own hooks set, config true/false
is ok here
I have a similar issue with VSCode remote development. I run oc on the remote machine from the integrated terminal in VSCode and don't get a suggested message in VSCode. The hook is set viia oc hook set
I have a similar issue with VSCode remote development. I run oc on the remote machine from the integrated terminal in VSCode and don't get a suggested message in VSCode. The hook is set viia
oc hook set
any error messages? how does the issue look? :)
When I run oc
I get a commit message generated but cannot edit or see it inside VSCode. No error messages.
@mze9412 you should enable setting in VSCode https://github.com/di-sukharev/opencommit/issues/1#issuecomment-1463546118
Although I very much like the prompt and results from opencommit, I'd also like the ease of the GUI shortcut like some others have implemented:
Perhaps it could be as easy as forking one of those repos and stripping gptcommit
out of it and swapping it by opencommit
?
Would it be possible to integrate it into VSCode? In this way, when making the commits from there, we would not have to go through the terminal.