prefix string — REQUIREDContent that appears before the cursor in the editor window. |
suffix stringContent that appears after the cursor in the editor window. |
filepath stringThe relative path of the file that is being edited.
- When [Segments::git_url] is set, this is the path of the file in the git repository.
- When [Segments::git_url] is empty, this is the path of the file in the workspace.
|
git_url stringThe remote URL of the current git repository.
Leave this empty if the file is not in a git repository,
or the git repository does not have a remote URL. |
declarations object[]The relevant declaration code snippets provided by the editor's LSP,
contain declarations of symbols extracted from [Segments::prefix]. filepath string — REQUIREDFilepath of the file where the snippet is from.
- When the file belongs to the same workspace as the current file,
this is a relative filepath, use the same rule as [Segments::filepath].
- When the file located outside the workspace, such as in a dependency package,
this is a file URI with an absolute filepath.
| body string — REQUIRED |
|
relevant_snippets_from_changed_files object[]The relevant code snippets extracted from recently edited files.
These snippets are selected from candidates found within code chunks
based on the edited location.
The current editing file is excluded from the search candidates. When provided alongside [Segments::declarations], the snippets have
already been deduplicated to ensure no duplication with entries
in [Segments::declarations]. Sorted in descending order of [Snippet::score]. filepath string — REQUIRED | body string — REQUIRED | score float — REQUIRED |
|
clipboard stringClipboard content when requesting code completion. |