dsh-tool-open-in-idea
开发工具 活跃维护

dsh-tool-open-in-idea

gunduziba/dsh-tool-open-in-idea

DeepSeek Harness (DSH) 官方原生侧边栏与界面专属的 IntelliJ IDEA 直连与文件跳转插件,基于 Streamable HTTP MCP 协议

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
51 KB
仓库大小
2 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:gunduziba/dsh-tool-open-in-idea
git clone https://github.com/gunduziba/dsh-tool-open-in-idea.git
git clone git@github.com:gunduziba/dsh-tool-open-in-idea.git
README.md main

dsh-tool-open-in-idea

⚡️ DeepSeek Harness (DSH) 官方原生侧边栏与界面专属的 IntelliJ IDEA 直连与文件跳转插件,基于 JetBrains Streamable HTTP MCP 协议。


📋 环境与依赖要求

依赖项 最低版本要求 说明
DeepSeek Harness (DSH) >= 0.1.5-rc.1 需要 DSH 0.1.5-rc.1+ 的 settings.section 与 slots 客户端插槽机制
Node.js >= 18.0.0 运行时环境
IntelliJ IDEA / JetBrains IDE 启用 MCP 插件/服务 默认端口 64342(可在 DSH 设置面板中可视化修改)

🌟 核心特性

  • 纯原生设计:深度集成 DSH 官方文件树 (ui-sidebar-files)、文档预览顶栏 (ui-sidebar-documentpreview)、会话产出文件胶囊及交付产物卡片。
  • 直连 MCP 通信:基于 JetBrains 官方 Streamable HTTP MCP 协议(默认端口 64342),直接与正在运行的 IntelliJ IDEA 实例进行毫秒级 RPC 交互。
  • 代码行号精准定位:支持在点击文件胶囊或文档跳转时携带特定行号与列号,自动在 IDEA 中定位并高亮目标代码行。
  • 智能路径解析:自动向上探测 Git 仓库根目录,支持绝对路径与工作区相对路径无缝换算与跳转。
  • 平滑全域兜底:当目标文件所在项目未在当前 IDEA 中打开时,自动平滑降级为系统原生命令拉起,保障 100% 打开成功率。
  • 可视化设置面板:在 DSH 设置页 (settings.section) 中无缝集成专属配置项,支持实时探测 IDEA MCP 连通状态与动态修改端口。
  • 全局快捷键支持:随时按下 Cmd + Shift + O (macOS) 或 Ctrl + Shift + O (Windows/Linux) 即可将当前激活文件在 IDEA 中打开。
  • TypeScript 强类型架构:全量采用 TypeScript 编写,严格遵循 Cordis 插件规范与高内聚低耦合架构。

🚀 安装与启用

1. 安装至 DSH Web Profile

在 ~/.dsh/profiles/web/package.json 的 dependencies 中引入:

{
  "dependencies": {
    "dsh-tool-open-in-idea": "^0.1.0"
  }
}

或通过 Git 源码引入:

{
  "dependencies": {
    "dsh-tool-open-in-idea": "github:gunduziba/dsh-tool-open-in-idea"
  }
}

2. 启用插件

在 DSH Web Profile 的插件配置文件(如 dsh.config.yml)中添加:

plugins:
  dsh-tool-open-in-idea:
    port: 64342

🛠 HTTP API 接口

路径 方法 说明
/open-in-idea/open POST 打开指定文件 { path: string, line?: number, column?: number, cwd?: string }
/open-in-idea/status GET 查询 IntelliJ IDEA MCP 连通性、就绪状态与当前打开项目列表
/open-in-idea/settings POST 动态修改 MCP 监听端口

⌨️ 快捷键

  • Cmd + Shift + O (macOS) / Ctrl + Shift + O (Windows/Linux):在 IntelliJ IDEA 中打开当前激活的文件。

📄 开源许可

MIT License