fix(server): preload macros for Windows dev CLI

This commit is contained in:
Relakkes Yang 2026-04-25 13:58:02 +08:00
parent f911d9e79d
commit 55c11b481b
2 changed files with 5 additions and 1 deletions

View File

@ -229,7 +229,9 @@ describe('ConversationService', () => {
if (process.platform === 'win32') {
expect(args[0]).toBe(process.execPath)
expect(args[1]).toContain(path.join('src', 'entrypoints', 'cli.tsx'))
expect(args[1]).toBe('--preload')
expect(args[2]).toContain('preload.ts')
expect(args[3]).toContain(path.join('src', 'entrypoints', 'cli.tsx'))
} else {
expect(args[0]).toContain(path.join('bin', 'claude-haha'))
}

View File

@ -703,6 +703,8 @@ export class ConversationService {
if (process.platform === 'win32') {
return [
process.execPath,
'--preload',
path.resolve(import.meta.dir, '../../../preload.ts'),
path.resolve(import.meta.dir, '../../entrypoints/cli.tsx'),
...baseArgs,
]