You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(nvim): Allow the codecompanion tool to send chunks instead of full documents. (#180)
* Add an option to return only chunks to LLMs
* refactor(nvim): improve chunk handling and option resolution.
* refactor(nvim): Improve options handling and mode-specific messages
* refactor(nvim): Allow table type for `max_num` in tool options
* docs(nvim): Add type annotations to documentation for setup options
* Auto generate docs
* fix(nvim): fix tool option type conversions
* feat(nvim): clarify line number usage in code chunk descriptions
---------
Co-authored-by: Jacob Segal <jacob.e.segal@gmail.com>
Co-authored-by: Davidyz <Davidyz@users.noreply.github.com>
" - The path of a retrieved file will be wrapped in `<path>` and `</path>` tags. Its content will be right after the `</path>` tag, wrapped by `<content>` and `</content>` tags. Do not include the `<path>``</path>` tags in your answers when you mention the paths.",
194
+
" - The results may also be chunks of the source code. In this case, the text chunks will be wrapped in <chunk></chunk>. If the starting and ending line ranges are available, they will be wrapped in <start_line></start_line> and <end_line></end_line> tags. Make use of the line numbers (NOT THE XML TAGS) when you're quoting the source code.",
191
195
" - If you used the tool, tell users that they may need to wait for the results and there will be a virtual text indicator showing the tool is still running",
192
196
" - Include one single command call for VectorCode each time. You may include multiple keywords in the command",
193
197
" - VectorCode is the name of this tool. Do not include it in the query unless the user explicitly asks",
Copy file name to clipboardExpand all lines: lua/vectorcode/types.lua
+31-1Lines changed: 31 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,10 @@
1
1
---Type definition of the retrieval result.
2
2
---@classVectorCode.Result
3
3
---@fieldpathstring Path to the file
4
-
---@fielddocumentstring Content of the file
4
+
---@fielddocumentstring? Content of the file
5
+
---@fieldchunkstring?
6
+
---@fieldstart_lineinteger?
7
+
---@fieldend_lineinteger?
5
8
6
9
---Type definitions for the cache of a buffer.
7
10
---@classVectorCode.Cache
@@ -53,3 +56,30 @@
53
56
---@fieldbuf_is_enabledfun(bufnr: integer?): boolean Checks if a buffer has been enabled.
54
57
---@fieldmake_prompt_componentfun(bufnr: integer?, component_cb: (fun(result: VectorCode.Result): string)?): {content: string, count: integer} Compile the retrieval results into a string.
55
58
---@fieldasync_checkfun(check_item: string?, on_success: fun(out: vim.SystemCompleted)?, on_failure: fun(out: vim.SystemCompleted)?) Checks if VectorCode has been configured properly for your project.
59
+
60
+
--- This class defines the options available to the CodeCompanion tool.
61
+
---@classVectorCode.CodeCompanion.ToolOpts
62
+
--- Maximum number of results provided to the LLM.
63
+
--- You may set this to a table to configure different values for document/chunk mode.
64
+
--- When set to negative values, it means unlimited.
0 commit comments