Skip to content

Commit f0f3c00

Browse files
Zhe YuDavidyz
authored andcommitted
docs: Clarify API documentation for synchronous vs. async retrieval
1 parent 9238f9e commit f0f3c00

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ model output and reduce hallucination.
4444
4545
- For the setup and usage of the command-line tool, see [the CLI documentation](./docs/cli/README.md);
4646
- For neovim users, after you've gone through the CLI documentation, please refer to
47-
[the neovim plugin documentation](./docs/neovim/README.md) for further instructions.
47+
[the neovim plugin documentation](./docs/neovim/README.md) and [lua API reference](./docs/neovim/api_references.md)
48+
for further instructions.
4849
- Additional resources:
4950
- the [wiki](https://github.com/Davidyz/VectorCode/wiki) for extra tricks and
5051
tips that will help you get the most out of VectorCode;

docs/neovim/api_references.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# Lua API References
22

3-
This plugin provides 2 sets of high-level APIs that provides similar functionalities. The
3+
This plugin provides 2 sets of _high-level APIs_ that provides similar functionalities. The
44
synchronous APIs provide more up-to-date retrieval results at the cost of
55
blocking the main neovim UI, while the async APIs use a caching mechanism to
66
provide asynchronous retrieval results almost instantaneously, but the result
77
may be slightly out-of-date. For some tasks like chat, the main UI being
88
blocked/frozen doesn't hurt much because you spend the time waiting for response
99
anyway, and you can use the synchronous API in this case. For other tasks like
10-
completion, the async API will minimise the interruption to your workflow.
10+
completion, the cached API will minimise the interruption to your workflow, but
11+
at a cost of providing less up-to-date results.
1112

12-
These APIs are wrappers around the lower-level
13-
[job runner API](https://github.com/Davidyz/VectorCode/tree/main/lua/vectorcode/jobrunner),
13+
These APIs are wrappers around the _lower-level
14+
[job runner API](https://github.com/Davidyz/VectorCode/tree/main/lua/vectorcode/jobrunner)_,
1415
which provides a unified interface for calling VectorCode commands that can be
1516
executed by either the LSP or the generic CLI backend. If the high-level APIs
16-
are sufficient for your usecase, it's usually not necessary to use the job
17+
are sufficient for your use-case, it's usually not necessary to use the job
1718
runners directly.
1819

1920
<!-- mtoc-start -->

0 commit comments

Comments
 (0)