feat: add persistent desktop assistant workspace
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent
698a15ad14
commit
6ef1795b81
@@ -0,0 +1,53 @@
|
||||
import { join } from 'node:path'
|
||||
|
||||
export type BundledRuntimePaths = {
|
||||
opencode: string
|
||||
continue: string
|
||||
}
|
||||
|
||||
export function resolveBundledRuntimePaths(input: {
|
||||
appPath: string
|
||||
resourcesPath: string
|
||||
packaged: boolean
|
||||
platform?: NodeJS.Platform
|
||||
}): BundledRuntimePaths {
|
||||
const packagedExecutable =
|
||||
(input.platform ?? process.platform) === 'win32'
|
||||
? 'opencode.exe'
|
||||
: 'opencode'
|
||||
if (input.packaged) {
|
||||
return {
|
||||
opencode: join(
|
||||
input.resourcesPath,
|
||||
'runtimes',
|
||||
'opencode',
|
||||
packagedExecutable
|
||||
),
|
||||
continue: join(
|
||||
input.resourcesPath,
|
||||
'runtimes',
|
||||
'continue',
|
||||
'dist',
|
||||
'cn.js'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
opencode: join(
|
||||
input.appPath,
|
||||
'node_modules',
|
||||
'opencode-ai',
|
||||
'bin',
|
||||
'opencode.exe'
|
||||
),
|
||||
continue: join(
|
||||
input.appPath,
|
||||
'node_modules',
|
||||
'@continuedev',
|
||||
'cli',
|
||||
'dist',
|
||||
'cn.js'
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user