feat: ui attach rpc support

This commit is contained in:
Cristina Poncela Cubeiro
2026-06-18 15:55:35 +02:00
parent 4806b8f9f4
commit c4e89b0337
7 changed files with 369 additions and 34 deletions
+4
View File
@@ -35,6 +35,7 @@ export interface IpcRequestHandler {
instanceId: string,
onEvent: (response: AttachRpcResponse) => void,
onSessionEvent: (event: import("@earendil-works/pi-coding-agent").AgentSessionEvent) => void,
onUiRequest: (request: import("@earendil-works/pi-coding-agent").RpcExtensionUIRequest) => void,
):
| {
handleRequest(request: AttachClientRequest): Promise<void>;
@@ -80,6 +81,9 @@ export async function startIpcServer(handler: IpcRequestHandler): Promise<Server
(event) => {
socket.write(encodeMessage({ type: "attach_event", event }));
},
(request) => {
socket.write(encodeMessage(request));
},
);
if (!attachment) {
socket.end(