dsh-at-file README

The project's README from github.com/FSMargoo/dsh-at-file. As one markdown file: README.md.

dsh-at-file

[!IMPORTANT] The latest official DeepSeek Harness release now includes built-in @file and @session reference features. Prefer the official implementation for new installations. This plugin remains available for existing setups and will be maintained occasionally on a best-effort basis.

Workspace path references for the DeepSeek Harness web interface. Type @ in the composer to search the current workspace and insert a file or directory path.

@ path picker

File reference in the composer

Usage

Choose a result from the @ menu. The selected path remains visible in the draft and can be opened or removed from the reference bar.

Review @docs/spec.pdf

Before the agent starts a step, the plugin confirms that the path exists inside the active workspace. It then adds a short reference message:

<workspace-reference path="docs/spec.pdf" kind="file" />

The reference contains the workspace-relative path and its kind. The plugin does not open the referenced file or list the contents of a referenced directory. The agent can inspect the path with the tools available in the current session when the task requires it.

Pasted text is treated as ordinary text by default. An @path copied from another application does not open the picker, appear in the reference bar, or create a workspace-reference marker. Turn off Ignore @ mentions in pasted text in Settings -> File mentions if you need the older behavior.

File format and file size do not change this behavior. A PDF follows the same path-reference flow as any other workspace file.

This mechanism applies to version 0.3.0 and later. Earlier releases read file content during submission and enforced file-size limits.

Path Picker

Plain queries match filenames. Exact names, prefixes, and compact matches rank ahead of looser results, without matching letters scattered across a long directory path.

With an empty query, shallow paths appear before deeper entries; directories appear before files at the same depth. The scrollable menu exposes up to 50 candidates, so root-level files are not displaced by deeply nested directories.

A query containing / matches path segments in order. For example, src/view can find src/client/view.ts. A trailing slash such as src/ searches within that path.

When a directory is highlighted, press ArrowRight to enter it. The draft advances to @path/ without a trailing space, and the candidate menu stays open for the next selection. Enter and pointer selection keep the existing behavior and finish the directory reference.

Each result shows the complete filename first and its parent directory underneath. The menu expands to its 537px design width when space permits, and long filenames wrap instead of being ellipsized. Duplicate filenames also include the parent directory in the main label. Built-in SVG icons distinguish folders, source files, text, PDFs, images, data and configuration files, archives, and other files.

The default index skips common version-control directories, IDE metadata, dependency trees, caches, and build output. The list covers VS Code, Visual Studio, JetBrains IDEs, Fleet, Eclipse, Android and Gradle, Xcode, CMake, Flutter, .NET, Unity, Unreal, and common JavaScript and Python output directories. OS metadata files named desktop.ini, Thumbs.db, and .DS_Store are excluded by default.

Install or Update

dsh plugin --profile web add https://github.com/omdsh-dev/dsh-at-file/archive/refs/tags/v0.7.0.tar.gz

Use the same command to update an existing installation. Restart dsh web after installation so the Host and browser client load version 0.7.0.

Version 0.7.0 supports both the 0.1.1 and 0.1.2 Harness client package layouts. It also restores the default file ignores for installations that persisted an empty legacy list; clearing the list again in 0.7.0 remains an explicit choice.

File Filters

Open Settings -> File mentions to manage file-name filters.

File mention settings with Exact and Regex rules

Each rule has its own matching mode and case setting:

Rules are added and removed individually. An invalid regular expression is shown before saving and is also rejected by the Host. Restore defaults resets the global list to the built-in file names. Clear workspace rules removes only the selected workspace's additions.

Settings are saved in the DSH web profile through the plugin's own Host connection. Existing string values in ignoreFiles and workspace lists continue to work as case-insensitive Exact rules. A change clears the affected index cache, so the next @ search uses the saved rules.

Configuration

The available options apply to the path picker index:

Add the complete configuration to the selected profile's cordis.patch.yml. The usual path is ~/.dsh/profiles/web/cordis.patch.yml.

- id: dsh-at-file
  config:
    maxIndexedFiles: 10000

Omitting ignoreDirs keeps the built-in list. When you provide it, include every directory name you want excluded.

Path Handling

The active agent may lack a tool for a particular file format. DSH provides read for UTF-8 text and read_image for supported images. PDF support depends on the tools available in the session.

Development

pnpm install
pnpm run check
pnpm run test
pnpm run build

The development setup expects the official deepseek-ai/deepseek-harness repository at ../deepseek-harness, its default clone directory. Built files under lib/ are committed so profile installation does not require package build scripts.

License

MIT

dsh-at-file (FSMargoo/dsh-at-file)

Searching Database…

这是什么?dsh-at-file 是一个 DeepSeek Harness(DSH)插件,为网页编辑器添加 Codex 风格的 @file 提及:输入 @ 即可搜索当前工作区,并把文件或目录路径插入你的提示词。
这是独立应用,还是其他软件的插件?它是 DeepSeek Harness 网页界面的插件,不是独立应用;它只扩展编辑器的 @ 提及菜单和引用栏。
怎么安装或更新它?把它安装到你的 DSH 配置文件中,之后重启 dsh web;同一个命令也用于把现有安装更新到新版本。
我需要先让 DeepSeek Harness 跑起来吗?需要。这个插件只能在现有的 DeepSeek Harness 网页环境中工作;从源码构建还需要把官方的 deepseek-ai/deepseek-harness 仓库克隆到同级目录。
如果我是首次配置 DSH,还应该用它吗?不应该。最新的官方 DeepSeek Harness 版本已内置 @file 和 @session 引用,新安装应直接使用官方功能;这个插件只保留给现有环境使用,仅做尽力而为的维护。
从其他应用粘贴 @path 会触发文件选择器吗?不会。默认情况下粘贴的文本按普通文本处理,不会打开选择器、出现在引用栏中,也不会创建工作区引用标记,除非关闭这项默认设置。
文件名过滤器是怎么工作的?全局规则适用于所有工作区,而工作区规则为单个工作区添加额外的过滤条件;每条规则可按精确文件名(Exact basename)或正则(Regex)匹配,并可选择区分大小写。
插件能打开或读取它引用的文件吗?不能。它只确认路径存在并插入一条简短的引用消息;要真正查看内容,智能体必须使用自己的会话工具(如 read 或 readimage)。
在哪里调整最大索引文件数之类的设置?通过配置文件的 cordis.patch.yml(通常是 ~/.dsh/profiles/web/cordis.patch.yml),使用 maxIndexedFiles、ignoreDirs 等选项。
Creator
FSMargoo
Size
2.2 MB
Stars
524
Updated
CommitSep 01
Age
2mo
Commits · 90 Days