File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
lua/codecompanion/_extensions/gitcommit Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -19,18 +19,10 @@ local CONSTANTS = {
1919--- @param adapter string ? The adapter to use for generation
2020--- @param model string ? The model of the adapter to use for generation
2121function Generator .setup (adapter , model )
22- -- Get the adapter configuration properly
23- local chat_config = codecompanion_config .strategies .chat
24-
25- -- Handle adapter as a table (with name and model) or string
26- if type (chat_config .adapter ) == " table" then
27- _adapter = adapter or chat_config .adapter .name
28- _model = model or chat_config .adapter .model or chat_config .model
29- else
30- _adapter = adapter or chat_config .adapter
31- _model = model or chat_config .model
32- end
22+ _adapter = adapter
23+ _model = model
3324end
25+
3426--- @param commit_history ? string[] Array of recent commit messages for context (optional )
3527function Generator .generate_commit_message (diff , lang , commit_history , callback )
3628 -- Setup adapter with proper resolution
You can’t perform that action at this time.
0 commit comments