Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

feat(context-link): contextLink.info IPC exposes the CLI shim path

enesc4e237a8e4cc
diff --git a/src/main/context-link.ts b/src/main/context-link.ts
index 22a39042c..ba38d2b6a 100644
--- a/src/main/context-link.ts
+++ b/src/main/context-link.ts
@@ -185,6 +185,7 @@ export function initContextLink(win: BrowserWindow, ptyManager: PtyManager): voi
writeChain = writeChain.then(() => writeLinkFiles(map && typeof map === 'object' ? map : {}))
return writeChain
})
+ ipcMain.handle(IPC.contextLinkInfo, () => ({ shimPath: cliShimPath() }))
// win is reserved for future link-activity events; referenced to satisfy noUnusedParameters.
void win
}
diff --git a/src/preload/index.ts b/src/preload/index.ts
index d8d0c3dd3..cdb3e4a2a 100644
--- a/src/preload/index.ts
+++ b/src/preload/index.ts
@@ -360,7 +360,8 @@ const api: NodeTerminalApi = {
revokeDevice: (id) => ipcRenderer.invoke(IPC.pairingRevokeDevice, id)
},
contextLink: {
- setLinks: (map) => ipcRenderer.invoke(IPC.contextLinkSetLinks, map)
+ setLinks: (map) => ipcRenderer.invoke(IPC.contextLinkSetLinks, map),
+ info: () => ipcRenderer.invoke(IPC.contextLinkInfo)
},
// Per-node subscriptions (each terminal/editor listens) — multiplexed so they don't pile up
// ipcRenderer listeners and trip the MaxListeners warning.
diff --git a/src/shared/ipc.ts b/src/shared/ipc.ts
index 2d98b1f7b..f60e8ff7c 100644
--- a/src/shared/ipc.ts
+++ b/src/shared/ipc.ts
@@ -39,6 +39,7 @@ export const IPC = {
agentControl: 'agent:control',
agentControlResult: 'agent:control-result',
contextLinkSetLinks: 'context-link:set-links',
+ contextLinkInfo: 'context-link:info',
appUpdateAvailable: 'app:update-available',
appUpdateDownloaded: 'app:update-downloaded',
appUpdateProgress: 'app:update-progress',
diff --git a/src/shared/types.ts b/src/shared/types.ts
index ae8e655ca..74691cdfe 100644
--- a/src/shared/types.ts
+++ b/src/shared/types.ts
@@ -654,6 +654,8 @@ export type ContextLinkMap = Record<string, ContextLinkInfo[]>
export interface ContextLinkApi {
/** Push the current link map to main; main rewrites the per-node link files. */
setLinks(map: ContextLinkMap): Promise<void>
+ /** Static facts the renderer needs to compose link messages: the CLI shim's absolute path. */
+ info(): Promise<{ shimPath: string }>
}
/** One usage window (5h session or 7d weekly) as shown in the indicator. */