opencode-idea 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ide-guidance.js +9 -8
- package/src/mcp/idea.js +2 -2
package/package.json
CHANGED
package/src/ide-guidance.js
CHANGED
|
@@ -61,15 +61,16 @@ export function buildIdeGuidance(projectPath) {
|
|
|
61
61
|
`- \`idea_execute_run_configuration\`:跑已有配置;Shell Script 要 \`EXECUTE_IN_TERMINAL: false\`;覆盖参数(\`programArguments\` / \`workingDirectory\` / \`envs\`)需配置支持 \`supportsDynamicLaunchOverrides\`。`,
|
|
62
62
|
``,
|
|
63
63
|
`### 终端`,
|
|
64
|
-
`- \`idea_execute_terminal_command
|
|
65
|
-
`
|
|
66
|
-
`
|
|
67
|
-
`
|
|
68
|
-
`
|
|
69
|
-
` -
|
|
64
|
+
`- \`idea_execute_terminal_command\` 用于项目的开发语言与开发工具链;原生 \`shell\` 用于操作系统级的杂活。`,
|
|
65
|
+
` - 走 IDE 终端:执行本项目开发语言的运行时与开发工具,语言按项目类型认定 ——`,
|
|
66
|
+
` \`pom.xml\` / \`build.gradle\` → \`java\` / \`mvn\` / \`gradle\`;\`package.json\` → \`node\` / \`npm\` / \`pnpm\` / \`yarn\` / \`npx\`;`,
|
|
67
|
+
` \`pyproject.toml\` / \`requirements.txt\` → \`python\` / \`pip\` / \`uv\` / \`poetry\` / \`pytest\`;\`go.mod\` → \`go\`;\`Cargo.toml\` → \`cargo\`;\`composer.json\` → \`php\` / \`composer\`;`,
|
|
68
|
+
` 前端项目 → \`vite\` / \`webpack\` / \`esbuild\` / \`tsc\` 等构建与测试命令。`,
|
|
69
|
+
` - 走原生 \`shell\`:\`ls\` / \`cd\` / \`cp\` / \`rm\` / \`git\` / \`grep\` / \`jq\` / \`ps\` / \`curl\` / \`wc\` 等操作系统级通用命令;`,
|
|
70
|
+
` 以及把语言当一次性脚本干非开发任务的杂活(如 \`python3 -c\` 改一个文件、\`node -e\` 打印一段内容)。`,
|
|
71
|
+
` - \`executeInShell: true\`:在用户真实 shell 里执行,继承 IDE 配好的运行时环境;原生 shell 可能用错版本。`,
|
|
70
72
|
` - 按预期耗时传 \`timeout\`(毫秒),长任务给足;必要时传 \`maxLinesCount\` 控制返回行数。`,
|
|
71
|
-
` - 连续命令传 \`reuseExistingTerminalWindow: true
|
|
72
|
-
` - 结果带 \`command_exit_code\` 与 \`command_output\`;\`cd\` 不跨调用保留,多步时在一条命令里用 \`&&\`。`,
|
|
73
|
+
` - 连续命令传 \`reuseExistingTerminalWindow: true\`;结果带 \`command_exit_code\` 与 \`command_output\`,\`cd\` 不跨调用保留,多步用 \`&&\`。`,
|
|
73
74
|
``,
|
|
74
75
|
`### 数据库 (数据源由用户在 IDE 里配置:不要自己建/改,不要向用户索取数据库凭据)`,
|
|
75
76
|
`- \`idea_list_database_connections\`:先看有没有现成数据源;每条给 \`id\` / \`dbms\` / \`jdbcUrl\` / \`readOnly\` / \`isDDL\`。`,
|
package/src/mcp/idea.js
CHANGED
|
@@ -146,7 +146,7 @@ export async function probePort(port, options = {}) {
|
|
|
146
146
|
params: {
|
|
147
147
|
protocolVersion: PROTOCOL_VERSION,
|
|
148
148
|
capabilities: {},
|
|
149
|
-
clientInfo: { name: 'opencode-idea', version: '0.0.
|
|
149
|
+
clientInfo: { name: 'opencode-idea', version: '0.0.13' },
|
|
150
150
|
},
|
|
151
151
|
}),
|
|
152
152
|
signal: controller.signal,
|
|
@@ -217,7 +217,7 @@ export async function callTool(port, projectPath, name, args = {}, options = {})
|
|
|
217
217
|
params: {
|
|
218
218
|
protocolVersion: PROTOCOL_VERSION,
|
|
219
219
|
capabilities: {},
|
|
220
|
-
clientInfo: { name: 'opencode-idea', version: '0.0.
|
|
220
|
+
clientInfo: { name: 'opencode-idea', version: '0.0.13' },
|
|
221
221
|
},
|
|
222
222
|
});
|
|
223
223
|
// The IDE's Streamable-HTTP endpoint binds follow-up requests to the session
|