Allow configuring environmental variables in panel (#626)

- [ ] Add test cases
This commit is contained in:
Will Chen
2025-07-11 10:52:52 -07:00
committed by GitHub
parent 4b84b12fe3
commit 2c284d0f20
18 changed files with 1212 additions and 7 deletions

View File

@@ -38,6 +38,8 @@ import type {
AppUpgrade,
ProblemReport,
EditAppFileReturnType,
GetAppEnvVarsParams,
SetAppEnvVarsParams,
} from "./ipc_types";
import type { AppChatContext, ProposalResult } from "@/lib/schemas";
import { showError } from "@/lib/toast";
@@ -183,6 +185,16 @@ export class IpcClient {
return this.ipcRenderer.invoke("get-app", appId);
}
public async getAppEnvVars(
params: GetAppEnvVarsParams,
): Promise<{ key: string; value: string }[]> {
return this.ipcRenderer.invoke("get-app-env-vars", params);
}
public async setAppEnvVars(params: SetAppEnvVarsParams): Promise<void> {
return this.ipcRenderer.invoke("set-app-env-vars", params);
}
public async getChat(chatId: number): Promise<Chat> {
try {
const data = await this.ipcRenderer.invoke("get-chat", chatId);