description: "Local-workspace @file completion provider for users and maintainers enabling, sizing, or debugging ctx.fileReferences discovery."
English | 中文
Agents and host UIs can complete @file mentions with ranked paths from each agent's local workspace, with bounded discovery that stays responsive in large repositories. Results refresh after tool activity without blocking completion, and directory symlinks are never followed. When read is available, the model also receives stable guidance for interpreting referenced paths. Choose this package when read uses the Harness host filesystem; remote or virtual namespaces need matching discovery.
Mount this provider when @file completion should discover the Harness host's own filesystem — the namespace the shipped read tool operates on. Each agent's workspace is indexed from its session working directory, falling back to the host process directory when the session has none.
The defaults suit a typical workspace, so the minimal mount needs no configuration:
- name: '@deepseek-ai/dsh-file-reference-local'
config:
maxResults: 20
Typing @ in a host UI returns up to maxResults ranked path candidates for the addressed agent. A query containing / lists the matching directory's entries directly; a bare query fuzzy-ranks the bounded recursive index. Directory candidates keep the mention open with a trailing slash. After any tool result the agent's index is marked stale: the next query still answers from it and its replacement builds in the background, so a rebuild never sits in front of the caret.
| Field | Default | Meaning |
|---|---|---|
maxResults |
20 |
Maximum ranked candidates returned for one query |
maxEntries |
50000 |
Maximum files and directories indexed per agent workspace |
excludedDirectories |
['.git', 'node_modules', 'dist', 'build', 'out', 'coverage', 'target', '.next', '.nuxt', '.turbo', '.venv', '__pycache__', '.pytest_cache', '.mypy_cache', '.gradle'] |
Directory basenames omitted from traversal and candidates |
Every numeric value must be a positive safe integer, and every excluded name must be a non-empty basename without / or \.
Read these pages when the package-level contract is not enough. They move from the seam this provider implements to the tools its candidates point at.
@file grammar this provider implements.read tool whose namespace discovery must match.When the addressed agent has an effective read tool, the provider contributes this stable system-prompt section:
Tokens prefixed with @ are workspace paths the user explicitly referenced, relative to the workspace root. A trailing slash marks a directory: list it when its contents matter. Anything else is a file: use the read tool when its contents are needed, and do not claim to have inspected it before reading. @"..." quotes a path containing spaces.
Conditional and fixed: the one sentence is present while read is visible to the addressed agent; candidate lookup itself adds no tokens, and a selected path contributes only its ordinary user-message characters.
The stable sentence joins the system-prompt prefix. Mounting or removing this provider, or changing whether read is visible, changes that prefix; queries, candidates, and index staleness do not.
These limits define when the provider is a poor fit. They are current package constraints.
read implementations require a provider whose namespace matches the tool.maxEntries, and excluded or unreadable directories do not appear. The default exclusions name only build outputs no ecosystem also uses for sources; lib is deliberately absent, so a workspace that builds into it adds that name through excludedDirectories..gitignore and other project ignore files do not influence discovery; only configured directory basenames are excluded.