跳到主内容

dsh-file-reference-local/packages/context/file-reference-local官方

175.3kStar19.0kFork0Issue752Watching

实现本地文件系统的 ctx.fileReferences,为 agent 提供 bounded fuzzy 索引的文件引用补全,支持路径排名和索引失效机制

机审证据3/5方法论数据来源安装命令持续维护DSH 版本风险扫描
机审证据安装命令仓库已核验dsh-plugin Topic许可证READMEAI 百科

ⓘ 此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。

语言
TypeScript
License
MIT
分支
master
ai-agentscordisdshdsh-plugin

安装

命令web profile
$ dsh plugin --profile web add npm:@deepseek-ai/dsh-file-reference-local

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

对话式安装

帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/context/file-reference-local:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。

把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。

English | 中文

Local-filesystem implementation of ctx.fileReferences. It maintains one bounded WorkspaceFileSearch per agent, rooted at that session's cwd and falling back to the host process cwd. The index ranks direct directory listings for queries containing /, otherwise fuzzy-ranks a bounded recursive index; it never follows directory symlinks.

Tool-result events invalidate the addressed agent's reusable index so later completion observes likely workspace mutations. Agent disposal releases that index and its scoped prompt contribution; plugin disposal awaits every prompt fiber and releases all cached searches.

Configuration

KeyDefaultContract
maxResults20Maximum ranked candidates returned for one query.
maxEntries10000Maximum files and directories indexed per agent workspace.
excludedDirectories[".git", "node_modules"]Directory basenames omitted from traversal and candidates.

Every numeric value must be a positive safe integer. Excluded names must be non-empty basenames without / or \.

Model Experience

File-reference guidance when read is available

What the model sees

When the addressed agent has an effective read tool, the provider contributes this stable system-prompt section:

File-reference instruction
Paths prefixed with @ are files explicitly referenced by the user. Use the read tool when their contents are needed; do not claim to have inspected a file before reading it.

Token effect

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.

KV Cache effect

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 invalidations do not.

Known Limitations and Deferred Work

  • Host-local namespace — the provider scans the Harness host filesystem, so remote or virtual read implementations require a provider whose namespace matches the tool.
  • Bounded advisory index — very large workspaces may omit paths after maxEntries, and excluded or unreadable directories do not appear.
  • No ignore-file semantics — .gitignore and other project ignore files do not influence discovery; only configured directory basenames are excluded.

查看使用指南 →

该插件的安装步骤、关键要点、FAQ 与兼容性说明(基于已收录字段派生)。

收录徽章

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/context/file-reference-local)

把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。

返回插件目录