File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
lua/vectorcode/integrations/codecompanion Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,10 @@ return check_cli_wrap(function(opts)
7878 then
7979 vim .list_extend (args , { " --project_root" , action .options .project_root })
8080 else
81- agent . chat : add_message (
82- { role = " user " , content = " INVALID PROJECT ROOT! USE THE LS COMMAND! " } ,
83- { visible = false }
84- )
81+ return {
82+ status = " error " ,
83+ data = " INVALID PROJECT ROOT! USE THE LS COMMAND! " ,
84+ }
8585 end
8686 end
8787
@@ -244,7 +244,7 @@ return check_cli_wrap(function(opts)
244244 stderr = cc_common .flatten_table_to_string (stderr )
245245 agent .chat :add_tool_output (
246246 self ,
247- string.format (" **VectorCode Tool**: Failed with error:\n " , stderr )
247+ string.format (" **VectorCode Tool**: Failed with error:\n ``` \n %s \n ``` " , stderr )
248248 )
249249 end ,
250250 --- @param agent CodeCompanion.Agent
Original file line number Diff line number Diff line change @@ -70,10 +70,10 @@ return check_cli_wrap(function(opts)
7070 vim .list_extend (args , { " --project_root" , action .options .project_root })
7171 vim .list_extend (args , { " --absolute" })
7272 else
73- agent . chat : add_message (
74- { role = " user " , content = " INVALID PROJECT ROOT! USE THE LS COMMAND! " } ,
75- { visible = false }
76- )
73+ return {
74+ status = " error " ,
75+ data = " INVALID PROJECT ROOT! USE THE LS COMMAND! " ,
76+ }
7777 end
7878 end
7979
@@ -281,7 +281,7 @@ Remember:
281281 agent .chat :add_message ({
282282 role = " user" ,
283283 content = string.format (
284- " VectorCode tool failed with the following error:\n " ,
284+ " VectorCode tool failed with the following error:\n ``` \n %s \n ``` " ,
285285 stderr
286286 ),
287287 }, { visible = false })
You can’t perform that action at this time.
0 commit comments