Direct models now use bundled ripgrep for workspace discovery, read files through resumable pages, and edit multiple files with apply_patch. Ask can search and read while Execute retains write access, and fixed total input limits no longer constrain these tools. Release note: 直连模型现可使用随包 ripgrep 搜索项目、分页读取任意大小的文本,并通过多文件补丁修改代码;设置中的相关能力统一显示为工作区文件和开发工具。
95 lines
2.0 KiB
TypeScript
95 lines
2.0 KiB
TypeScript
import { join } from 'node:path'
|
|
|
|
export type BundledRuntimePaths = {
|
|
opencode: string
|
|
opencodeConfig?: string
|
|
ripgrep: string
|
|
continue: string
|
|
deepseekHarness: string
|
|
}
|
|
|
|
export const bundledContinueVersion = '1.5.47'
|
|
export const bundledDeepSeekHarnessVersion = '0.1.2-rc.1'
|
|
|
|
export function resolveBundledRuntimePaths(input: {
|
|
appPath: string
|
|
resourcesPath: string
|
|
packaged: boolean
|
|
platform?: NodeJS.Platform
|
|
arch?: NodeJS.Architecture
|
|
}): BundledRuntimePaths {
|
|
const packagedExecutable =
|
|
(input.platform ?? process.platform) === 'win32'
|
|
? 'opencode.exe'
|
|
: 'opencode'
|
|
const ripgrepExecutable =
|
|
(input.platform ?? process.platform) === 'win32' ? 'rg.exe' : 'rg'
|
|
if (input.packaged) {
|
|
return {
|
|
opencode: join(
|
|
input.resourcesPath,
|
|
'runtimes',
|
|
'opencode',
|
|
packagedExecutable
|
|
),
|
|
opencodeConfig: join(
|
|
input.resourcesPath,
|
|
'runtimes',
|
|
'opencode-config'
|
|
),
|
|
ripgrep: join(
|
|
input.resourcesPath,
|
|
'runtimes',
|
|
'opencode',
|
|
ripgrepExecutable
|
|
),
|
|
continue: join(
|
|
input.resourcesPath,
|
|
'runtimes',
|
|
'continue',
|
|
'dist',
|
|
'cn.js'
|
|
),
|
|
deepseekHarness: join(
|
|
input.resourcesPath,
|
|
'app.asar.unpacked',
|
|
'out',
|
|
'main',
|
|
'deepseek-harness-host-bootstrap.js'
|
|
)
|
|
}
|
|
}
|
|
|
|
return {
|
|
opencode: join(
|
|
input.appPath,
|
|
'node_modules',
|
|
'opencode-ai',
|
|
'bin',
|
|
'opencode.exe'
|
|
),
|
|
ripgrep: join(
|
|
input.appPath,
|
|
'node_modules',
|
|
'@vscode',
|
|
`ripgrep-${input.platform ?? process.platform}-${input.arch ?? process.arch}`,
|
|
'bin',
|
|
ripgrepExecutable
|
|
),
|
|
continue: join(
|
|
input.appPath,
|
|
'node_modules',
|
|
'@continuedev',
|
|
'cli',
|
|
'dist',
|
|
'cn.js'
|
|
),
|
|
deepseekHarness: join(
|
|
input.appPath,
|
|
'out',
|
|
'main',
|
|
'deepseek-harness-host-bootstrap.js'
|
|
)
|
|
}
|
|
}
|