Skip to content

Commit 1820ace

Browse files
authored
refactor(nvim): Update tool descriptions for better loading time (#245)
1 parent 708f0eb commit 1820ace

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

lua/vectorcode/integrations/codecompanion/ls_tool.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---@module "codecompanion"
22

33
local cc_common = require("vectorcode.integrations.codecompanion.common")
4-
local vectorcode = require("vectorcode")
54
local vc_config = require("vectorcode.config")
65
local logger = vc_config.logger
76

@@ -60,10 +59,10 @@ return function(opts)
6059
type = "function",
6160
["function"] = {
6261
name = tool_name,
63-
description = string.format(
64-
"Retrieve a list of projects accessible via the VectorCode tools.\n%s",
65-
table.concat(vectorcode.prompts("ls"), "\n")
66-
),
62+
description = [[
63+
Retrieve a list of projects accessible via the VectorCode tools.
64+
Where relevant, use paths from this tool as the `project_root` parameter in other vectorcode tools.
65+
]],
6766
},
6867
},
6968
output = {

lua/vectorcode/integrations/codecompanion/vectorise_tool.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---@module "codecompanion"
22

33
local cc_common = require("vectorcode.integrations.codecompanion.common")
4-
local vectorcode = require("vectorcode")
54
local vc_config = require("vectorcode.config")
65
local logger = vc_config.logger
76

@@ -43,10 +42,10 @@ return function(opts)
4342
type = "function",
4443
["function"] = {
4544
name = tool_name,
46-
description = string.format(
47-
"Vectorise files in a project so that they'll be available from the vectorcode_query tool\n%s",
48-
table.concat(vectorcode.prompts("vectorise"), "\n")
49-
),
45+
description = [[
46+
Vectorise files in a project so that they'll be available from the `vectorcode_query` tool.
47+
The paths should be accurate (DO NOT ASSUME A PATH EXIST) and case case-sensitive.
48+
]],
5049
parameters = {
5150
type = "object",
5251
properties = {

0 commit comments

Comments
 (0)