Add warning banner if user is not on main branch (#91)

This commit is contained in:
Will Chen
2025-05-06 11:06:27 -07:00
committed by GitHub
parent 1fcb58a141
commit 43ec6a4563
5 changed files with 216 additions and 34 deletions

View File

@@ -22,6 +22,7 @@ import type {
TokenCountParams,
TokenCountResult,
ChatLogsData,
BranchResult,
} from "./ipc_types";
import type { CodeProposal, ProposalResult } from "@/lib/schemas";
import { showError } from "@/lib/toast";
@@ -478,6 +479,14 @@ export class IpcClient {
}
}
// Get the current branch of an app
public async getCurrentBranch(appId: number): Promise<BranchResult> {
const result = await this.ipcRenderer.invoke("get-current-branch", {
appId,
});
return result;
}
// Get user settings
public async getUserSettings(): Promise<UserSettings> {
try {