fix: theme in ui attach

This commit is contained in:
Cristina Poncela Cubeiro
2026-06-18 16:11:04 +02:00
parent 337de9b078
commit 1d5fd23568
4 changed files with 31 additions and 6 deletions
+8 -1
View File
@@ -5,6 +5,7 @@ import type {
RpcExtensionUIResponse,
} from "@earendil-works/pi-coding-agent";
import type {
AttachHostContextRequest,
AttachReadyResponse,
AttachRequest,
AttachRpcResponse,
@@ -136,7 +137,9 @@ export function attachIpcInstance(
onUiRequest: (request: RpcExtensionUIRequest) => void,
):
| {
handleRequest(request: { type: "attach_rpc"; command: RpcCommand } | RpcExtensionUIResponse): Promise<void>;
handleRequest(
request: { type: "attach_rpc"; command: RpcCommand } | AttachHostContextRequest | RpcExtensionUIResponse,
): Promise<void>;
close(): void;
}
| undefined {
@@ -152,6 +155,10 @@ export function attachIpcInstance(
onResponse({ type: "attach_rpc_result", response });
return;
}
if (request.type === "attach_host_context") {
handle.setHostTheme(request.theme);
return;
}
handle.handleUiResponse(request);
},
close(): void {