@@ -161,12 +161,12 @@ local function setup_slash_commands(opts)
161
161
stdout :close ()
162
162
stderr :close ()
163
163
if code == 0 then
164
- chat :add_reference ({
164
+ chat :add_context ({
165
165
role = " user" ,
166
166
content = string.format (" Selected commit (%s) full content:\n ```\n %s\n ```" , choice .hash , output ),
167
167
}, " git" , " <git_commit>" )
168
168
else
169
- chat :add_reference (
169
+ chat :add_context (
170
170
{ role = " user" , content = " Error: Failed to get commit content.\n " .. error_output },
171
171
" git" ,
172
172
" <git_error>"
@@ -230,11 +230,11 @@ local function setup_slash_commands(opts)
230
230
end
231
231
end
232
232
if # items == 0 then
233
- return chat :add_reference ({ role = " user" , content = " No commits found." }, " git" , " <git_error>" )
233
+ return chat :add_context ({ role = " user" , content = " No commits found." }, " git" , " <git_error>" )
234
234
end
235
235
select_commit (chat , items )
236
236
else
237
- chat :add_reference (
237
+ chat :add_context (
238
238
{ role = " user" , content = " Error: Failed to get git log\n " .. error_output },
239
239
" git" ,
240
240
" <git_error>"
@@ -266,7 +266,7 @@ local function setup_slash_commands(opts)
266
266
description = " Select a commit and insert its full content (message + diff)" ,
267
267
callback = function (chat )
268
268
if not Git .is_repository () then
269
- return chat :add_reference ({ role = " user" , content = " Error: Not in a git repository" }, " git" , " <git_error>" )
269
+ return chat :add_context ({ role = " user" , content = " Error: Not in a git repository" }, " git" , " <git_error>" )
270
270
end
271
271
get_commit_list (chat , opts )
272
272
end ,
0 commit comments