# @aldveylor/dsh-intellisense 中文文档

规范地址：https://npmcn.com/package/%40aldveylor/dsh-intellisense/

版本：0\.3\.2
npm 元数据更新时间：2026-10-30T13:10:05.204Z
中文译文更新时间：2026-11-06T17:14:07.213Z
软件包许可：Apache-2\.0

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40aldveylor/dsh-intellisense
原文对照：https://npmcn.com/package/%40aldveylor/dsh-intellisense/?lang=original
项目主页：https://github.com/aldveylor/dsh-intellisense#readme
源码仓库：https://github.com/aldveylor/dsh-intellisense

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：6.6 MB，482 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- Node.js 要求：\>=24
- 运行依赖：5 个
- peer 依赖：@deepseek-ai/dsh \>=0\.2\.1-rc\.2，@deepseek-ai/cordis \>=4\.0\.5，@deepseek-ai/dsh-llm \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-agent \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-scope \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-tools \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-session \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-storage \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-subagent \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-ptc-runtime \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-client-locale \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-system-prompt \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-client-connection \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-tool-executor-ptc \>=0\.2\.2-alpha\.2，@deepseek-ai/dsh-client-ui-primitives \>=0\.2\.1-rc\.2，@deepseek-ai/dsh-tool-executor-native \>=0\.2\.2-alpha\.2，@deepseek-ai/dsh-agent-preset-registry \>=0\.2\.1-rc\.2
- 首次发布：2026-10-26T09:29:25.823Z
- 最新版本发布：2026-10-30T13:10:04.564Z
- 近 30 天下载量：2621（2026-10-06 至 2026-11-04，npm 官方下载统计）
- 已发布版本数：13（近 12 个月 13 个）

## 中文简介

命名基于空间的DSML 和孤立的 JavaScript/ TypeScript 执行, 并按需 IntelliSense for DeepSeek Harness

## 安装

```sh
npm install @aldveylor/dsh-intellisense
```

也可以使用：`pnpm add @aldveylor/dsh-intellisense`、`yarn add @aldveylor/dsh-intellisense`、`bun add @aldveylor/dsh-intellisense`

## README

![Intellisense — Tool discovery, on demand.](https://raw.githubusercontent.com/aldveylor/dsh-intellisense/master/assets/banner.png)

# dsh-intellisense

[English](https://npmcn.com/package/%40aldveylor/dsh-intellisense/README.md) | 简体中文

![NPM Version](https://img.shields.io/npm/v/@aldveylor/dsh-intellisense)

dsh-intellisense 帮助你在 DeepSeek Harness 中整理和查找工具。你可以为工具分组、设置清晰的名称与说明，并将配置保存为可复用的 Profile，适应不同任务。Agent 会按需查询所需工具。

## 使用方法

查看[使用文档](https://npmcn.com/package/%40aldveylor/dsh-intellisense/docs/zh-cn/usage.md)，了解工具分组、Agent 可见范围和界面操作；也可从插件配置页打开。

## 安装

**官方 DSH 桌面端：** 打开应用中的 **设置 → 插件**，搜索 `@aldveylor/dsh-intellisense`，通过应用的插件管理器安装，无需使用命令行。

**常规 dsh web：** 执行以下命令，然后重启 dsh web：

```sh
dsh plugin --profile web add @aldveylor/dsh-intellisense
```

**自定义运行配置：** 将命令中的 `web` 替换为宿主实际使用的运行配置名称：

```sh
dsh plugin --profile <profile> add @aldveylor/dsh-intellisense
```

按照宿主的说明重启。

插件包包含独立的 **Intellisense Preset** 组件（ID 为 `intellisense/preset`，入口为 `@aldveylor/dsh-intellisense/preset`），仅负责注册 Intellisense 和 Intellisense PTC agent 预设。主组件提供命名空间与执行能力，预设由独立组件注册。

## 开发（Development）

查看[开发文档](https://npmcn.com/package/%40aldveylor/dsh-intellisense/docs/zh-cn/development.md)，了解 agent preset 的 `config.mode` / `config.profile` 配置与内置工具接口。

需要 Node.js >=24、DeepSeek Harness >=0.2.1-rc.2。

### 通过 npm 安装

先启动一次 DeepSeek Harness，初始化准备使用的运行配置（profile），然后停止运行。在该运行配置的目录（包含其 `package.json` 的目录）中执行：

```sh
npm install @aldveylor/dsh-intellisense
```

在同一个 `package.json` 中，将 `"@aldveylor/dsh-intellisense"` 追加到已有的 `dsh.profile.bundles` 列表，保留其他条目。随后使用该运行配置重新启动 DeepSeek Harness。

也可以打开 DeepSeek Harness 侧边栏的 **插件** 页面，从 npm 注册表安装 `@aldveylor/dsh-intellisense` 并启用该插件包。此方式会为当前运行配置完成安装和启用。

### 从源码启动

安装 pnpm 后，在项目根目录执行：

```sh
pnpm install --frozen-lockfile
./run.sh
```

此方式使用独立的开发运行配置，方便在本地体验插件。

使用精确的 DSH 版本号测试不同版本的宿主：

```sh
./run.sh --dsh-version 0.2.1-rc.2
node run.mjs --dsh-version 0.2.2-alpha.2
```

首次运行会将对应宿主安装到 `build/dsh_versions/<version>`，之后复用安装结果并刷新本地插件副本。每个版本使用独立的开发运行配置，项目依赖及锁文件保持不变。两个入口均支持 `--plugin <目录>`，其他参数传递给 DSH；使用 `--` 结束启动器选项。

## 工具管理

查看[使用文档](https://npmcn.com/package/%40aldveylor/dsh-intellisense/docs/zh-cn/usage.md)，也可从配置页内打开。下方截图统一使用浅色模式。

### 命名空间管理

命名空间树展示工具分组、调用名称与工具说明。悬停命名空间可查看名称、完整路径和注释；悬停命令可查看简化注释、完整文档及调用统计，其原始命令名可打开第二层工具详情。可展开分组、双击名称或注释进行编辑，拖动同级条目调整顺序，并设置固定提示级别；顶部可切换、保存或另存为 Profile，方便复用不同的工具配置。

![工具命名空间表：Profile 选择与树形工具管理](https://raw.githubusercontent.com/aldveylor/dsh-intellisense/master/assets/zh/namespace_table.png)

### 添加工具

点击“命名空间树”标题后的工具图标打开添加工具界面；未挂载工具数量入口可筛选尚未挂载的工具。可按名称、路径或描述搜索，点击普通工具卡片加入当前节点，再在树中调整名称和分组。本插件内置命令以灰色禁用卡片显示，不能重复挂载。

![添加工具：搜索、排序和灰色内置命令卡片](https://raw.githubusercontent.com/aldveylor/dsh-intellisense/master/assets/zh/tools.png)

### 工具详情

悬停工具卡片可查看原始名称、描述、参数、返回类型和调用统计。参数类型拥有二层 Tooltip，类型直接显示表达式；参数与统计标题置于表格外，列宽按内容自适应。按住 Ctrl 固定提示，移入可手动滚动。

![Bash 工具详情与类型展示](https://raw.githubusercontent.com/aldveylor/dsh-intellisense/master/assets/zh/tooltip.png)

## 许可

[Apache License 2.0](https://npmcn.com/package/%40aldveylor/dsh-intellisense/LICENSE)

## 常见问题

### @aldveylor/dsh-intellisense 是什么？

命名基于空间的DSML 和孤立的 JavaScript/ TypeScript 执行, 并按需 IntelliSense for DeepSeek Harness

### 如何安装 @aldveylor/dsh-intellisense？

在项目目录运行 npm install @aldveylor/dsh-intellisense，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：@deepseek-ai/dsh（\>=0\.2\.1-rc\.2）、@deepseek-ai/cordis（\>=4\.0\.5）、@deepseek-ai/dsh-llm（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-agent（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-scope（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-tools（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-session（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-storage（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-subagent（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-ptc-runtime（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-client-locale（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-system-prompt（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-client-connection（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-client-ui-primitives（\>=0\.2\.1-rc\.2）、@deepseek-ai/dsh-agent-preset-registry（\>=0\.2\.1-rc\.2）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @aldveylor/dsh-intellisense 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @aldveylor/dsh-intellisense 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @aldveylor/dsh-intellisense 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=24。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @aldveylor/dsh-intellisense 可以商用吗？

@aldveylor/dsh-intellisense 使用 Apache-2\.0 许可。宽松许可：允许商业使用、修改和再分发，并附带明确的专利授权；分发时需保留许可与 NOTICE 文件，修改过的文件要注明改动。以上为概括，不构成法律意见，请以许可原文为准。

### @aldveylor/dsh-intellisense 的下载量有多少？

根据 npm 官方下载统计，@aldveylor/dsh-intellisense 在 2026/10/06 – 2026/11/04 这 30 天内被下载 2,621 次，日均约 87 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @aldveylor/dsh-intellisense 还在维护吗？

最新版本 0\.3\.2 发布于 2026/10/30（8 天前）；至今共发布 13 个版本，其中过去 12 个月发布了 13 个；首次发布于 2026/10/26。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

