Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 40 additions & 13 deletions docs/code-search/code-navigation/inference_configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,27 +105,54 @@ This auto-indexing-specific library defines the following two functions.
- Type:
```
({
-- List of patterns to match against paths in the repository
"patterns": array[pattern],
-- List of patterns to match against paths in the repository
-- for getting contents (see contents_by_path below)
"patterns_for_content": array[pattern],
"generate": (registration_api, paths: array[string], contents_by_path: table[string, string]) -> array[index_job],
-- Callback function invoked with paths requested by patterns above
-- for creating index jobs
"generate": (
registration_api,
-- List of paths obtained from 'patterns' and
-- 'patterns_for_content' combined.
paths: array[string],
-- Table mapping paths to contents for paths matched by
-- 'patterns_for_content'
contents_by_path: table[string, string]
) -> array[index_job],
}) -> recognizer
```
where `index_job` is an object with the following shape:
```
index_job = {
"indexer": string, -- Docker image for the indexer
"root": string, -- working directory for invoking the indexer
"steps": array[{ -- preparatory steps to run before invoking the indexer (e.g. installing dependencies)
"root": string, -- working directory for this step
"image": string -- Docker image to use for preparatory step
"commands": array[string] -- List of commands to run inside the Docker image
-- Docker image for the indexer
"indexer": string,
-- Working directory for invoking the indexer
"root": string,
-- Preparatory steps to run before invoking the indexer
-- such as installing dependencies
"steps": array[{
-- Working directory for this step
"root": string,
-- Docker image to use for this step
"image": string,
-- List of commands to run inside the Docker image
"commands": array[string]
}],
"local_steps": array[string] -- List of commands to run inside the indexer image at "root" before invoking
-- the indexer (e.g. to install dependencies)
"indexer_args": array[string], -- command-line invocation for the indexer
"outfile": string, -- path to the index generated by the indexer
"requested_envvars": array[string], -- List of environment variables needed. These are made accessible
-- to steps, local_steps, and the indexer_args command.
-- List of commands to run inside the indexer image at "root"
-- before invoking the indexer, such as installing dependencies.
"local_steps": array[string],
-- Command-line invocation for the indexer
"indexer_args": array[string],
-- Path to the index generated by the indexer
"outfile": string,
-- Names of necessary environment variables. These are
-- made accessible to steps, local_steps, and the
-- indexer_args command.
--
-- These are generally used for passing secrets.
"requested_envvars": array[string],
}
```
For installing dependencies, if the indexer image contains the relevant package manager(s),
Expand Down
Loading