File tree Expand file tree Collapse file tree
lua/vectorcode/integrations/codecompanion/prompts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -306,6 +306,9 @@ require('codecompanion').setup{
306306}
307307```
308308
309+ The first time will take some extra time for computing the embeddings, but the
310+ subsequent runs should be a lot faster.
311+
309312### [ CopilotC-Nvim/CopilotChat.nvim] ( https://github.com/CopilotC-Nvim/CopilotChat.nvim )
310313
311314[ CopilotC-Nvim/CopilotChat.nvim] ( https://github.com/CopilotC-Nvim/CopilotChat.nvim )
Original file line number Diff line number Diff line change 11local M = {}
22
33local vc_config = require (" vectorcode.config" )
4+ local cc_common = require (" vectorcode.integrations.codecompanion.common" )
45local utils = require (" vectorcode.utils" )
56local constants = require (" codecompanion.config" ).config .constants
67
@@ -88,6 +89,9 @@ Here's my question:
8889 opts = {
8990 ignore_system_prompt = opts .system_prompt ~= nil ,
9091 pre_hook = function ()
92+ vim .notify (
93+ string.format (" Add files under `%s` to the database." , opts .project_root )
94+ )
9195 M .vectorise_files (
9296 vim .iter (opts .file_patterns ):map (function (p )
9397 if vim .fn .isabsolutepath (p ) == 1 then
@@ -97,19 +101,24 @@ Here's my question:
97101 end
98102 end ),
99103 opts .project_root ,
100- function (result , _ , _ , _ )
101- if
102- result ~= nil
103- and not vim .tbl_isempty (result )
104- and vc_config .get_user_config ().notify
105- then
104+ function (result , err , _ , _ )
105+ if result ~= nil and not vim .tbl_isempty (result ) then
106106 vim .schedule_wrap (vim .notify )(
107107 string.format (
108108 " Vectorised %d files at `%s`." ,
109109 result .add or 0 ,
110110 opts .project_root
111111 )
112112 )
113+ elseif err ~= nil then
114+ err = cc_common .flatten_table_to_string (err )
115+ if err ~= " " then
116+ vim .schedule_wrap (vim .notify )(
117+ err ,
118+ vim .log .levels .WARN ,
119+ vc_config .notify_opts
120+ )
121+ end
113122 end
114123 end
115124 )
You can’t perform that action at this time.
0 commit comments