Skip to content

Commit d93e9c4

Browse files
nsxdavidarul28
authored andcommitted
feat(windows): port desktop sync and remote clients from #999
Based-on: nsxdavid/ADE#999
1 parent 48634b8 commit d93e9c4

122 files changed

Lines changed: 664 additions & 453 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/desktop/src/main/services/automations/automationPlannerService.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ async function runCodexExec(args: {
451451
env,
452452
stdio: ["ignore", "pipe", "pipe"],
453453
windowsVerbatimArguments: invocation.windowsVerbatimArguments,
454+
windowsHide: true,
454455
});
455456

456457
let stderr = "";
@@ -534,6 +535,7 @@ async function runClaudeHeadless(args: {
534535
env,
535536
stdio: ["ignore", "pipe", "pipe"],
536537
windowsVerbatimArguments: invocation.windowsVerbatimArguments,
538+
windowsHide: true,
537539
});
538540

539541
let stdout = "";

apps/desktop/src/main/services/automations/automationService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2419,7 +2419,8 @@ export function createAutomationService({
24192419
const child = spawn(shellFile, shellArgs, {
24202420
cwd: args.cwd,
24212421
env: process.env,
2422-
stdio: ["ignore", "pipe", "pipe"]
2422+
stdio: ["ignore", "pipe", "pipe"],
2423+
windowsHide: true,
24232424
});
24242425
let stdout = "";
24252426
let stderr = "";

apps/desktop/src/main/services/builtInBrowser/desktopBridgeServer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
import type { Logger } from "../logging/logger";
2020
import { resolveBuiltInBrowserActorCapability } from "./builtInBrowserActorCapabilities";
2121
import type { BuiltInBrowserService } from "./builtInBrowserService";
22+
import { localIpcListenOptions } from "../../../../../ade-cli/src/services/runtime/localIpcListenOptions";
2223

2324
/**
2425
* Side-channel JSON-RPC server that exposes the desktop's
@@ -111,7 +112,7 @@ export function startBuiltInBrowserDesktopBridgeServer(args: {
111112
});
112113

113114
try {
114-
server.listen(socketPath, () => {
115+
server.listen(localIpcListenOptions(socketPath), () => {
115116
if (!isNamedPipe) {
116117
try {
117118
fs.chmodSync(socketPath, 0o600);

apps/desktop/src/main/services/chat/agentChatService.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,7 +2308,7 @@ describe("createAgentChatService", () => {
23082308
allowed: false,
23092309
state: "exhausted",
23102310
code: "disk_full",
2311-
message: "Your Mac is almost out of storage. ADE paused new agent work to protect your chats and projects. Free up space, then resume.",
2311+
message: "Your computer is almost out of storage. ADE paused new agent work to protect your chats and projects. Free up space, then resume.",
23122312
})),
23132313
},
23142314
onEvent: (event: AgentChatEventEnvelope) => events.push(event),
@@ -2338,7 +2338,7 @@ describe("createAgentChatService", () => {
23382338
allowed: false,
23392339
state: "exhausted" as const,
23402340
code: "disk_full" as const,
2341-
message: "Your Mac is almost out of storage. ADE paused new agent work to protect your chats and projects. Free up space, then resume.",
2341+
message: "Your computer is almost out of storage. ADE paused new agent work to protect your chats and projects. Free up space, then resume.",
23422342
}));
23432343
const { service } = createService({
23442344
diskPressureMonitor: { canPerform },
@@ -26387,7 +26387,7 @@ describe("createAgentChatService", () => {
2638726387
allowed: false,
2638826388
state: "exhausted",
2638926389
code: "disk_full",
26390-
message: "Your Mac is almost out of storage.",
26390+
message: "Your computer is almost out of storage.",
2639126391
}),
2639226392
},
2639326393
onEvent: (event: AgentChatEventEnvelope) => events.push(event),
@@ -38107,7 +38107,7 @@ describe("explicit provider-thread continuity recovery", () => {
3810738107
allowed: false,
3810838108
state: "exhausted",
3810938109
code: "disk_full",
38110-
message: "Your Mac is almost out of storage. ADE paused new agent work to protect your chats and projects. Free up space, then resume.",
38110+
message: "Your computer is almost out of storage. ADE paused new agent work to protect your chats and projects. Free up space, then resume.",
3811138111
})),
3811238112
},
3811338113
onEvent: (event: AgentChatEventEnvelope) => events.push(event),

apps/desktop/src/main/services/chat/agentChatService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26485,6 +26485,7 @@ export function createAgentChatService(args: {
2648526485
stdio: ["pipe", "pipe", "pipe"],
2648626486
detached: process.platform !== "win32",
2648726487
windowsVerbatimArguments: invocation.windowsVerbatimArguments,
26488+
windowsHide: true,
2648826489
});
2648926490

2649026491
const reader = readline.createInterface({ input: proc.stdout });

apps/desktop/src/main/services/chat/crossMachineForkTransport.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export const runCliCapture = (
7575
const child = spawn(bin, args, {
7676
cwd: opts.cwd,
7777
stdio: ["pipe", "pipe", "pipe"],
78+
windowsHide: true,
7879
});
7980
const stdoutChunks: Buffer[] = [];
8081
const stderrChunks: Buffer[] = [];

apps/desktop/src/main/services/conflicts/conflictService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3560,6 +3560,7 @@ export function createConflictService({
35603560
env: process.env,
35613561
stdio: ["ignore", "pipe", "pipe"],
35623562
detached: process.platform !== "win32",
3563+
windowsHide: true,
35633564
windowsVerbatimArguments: invocation.windowsVerbatimArguments,
35643565
});
35653566
let stdout = "";

apps/desktop/src/main/services/externalSessions/externalSessionsService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ export function createExternalSessionsService(args: ExternalSessionsServiceArgs)
432432
timeout: 1500,
433433
encoding: "utf8",
434434
env: args.env ?? process.env,
435+
windowsHide: true,
435436
}, (_error, stdout, stderr) => {
436437
droidForkProbe = /(^|\s)--fork\b/u.test(`${stdout ?? ""}\n${stderr ?? ""}`);
437438
resolve(droidForkProbe);

apps/desktop/src/main/services/files/fileService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,8 @@ async function runGitCheckIgnoreBatch(args: { cwd: string; paths: string[]; time
372372
return await new Promise<Set<string>>((resolve) => {
373373
const child = spawn("git", ["check-ignore", "--stdin"], {
374374
cwd: args.cwd,
375-
stdio: ["pipe", "pipe", "ignore"]
375+
stdio: ["pipe", "pipe", "ignore"],
376+
windowsHide: true,
376377
});
377378

378379
let settled = false;

apps/desktop/src/main/services/git/ghOpenPrLookup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ function runGhPrList(args: {
5858
cwd: args.worktreePath,
5959
env: process.env,
6060
stdio: ["ignore", "pipe", "pipe"],
61+
windowsHide: true,
6162
},
6263
);
6364
const finish = (value: string | null) => {

0 commit comments

Comments
 (0)