Allow manual context management (#376)

This commit is contained in:
Will Chen
2025-06-10 13:52:20 -07:00
committed by GitHub
parent e7941bc6f7
commit 534cbad909
55 changed files with 3296 additions and 114 deletions

View File

@@ -3,9 +3,9 @@ import {
type ChatSummary,
ChatSummariesSchema,
type UserSettings,
type ContextPathResults,
} from "../lib/schemas";
import type {
App,
AppOutput,
Chat,
ChatResponseEnd,
@@ -32,8 +32,9 @@ import type {
RenameBranchParams,
UserBudgetInfo,
CopyAppParams,
App,
} from "./ipc_types";
import type { ProposalResult } from "@/lib/schemas";
import type { AppChatContext, ProposalResult } from "@/lib/schemas";
import { showError } from "@/lib/toast";
export interface ChatStreamCallbacks {
@@ -847,4 +848,17 @@ export class IpcClient {
public async getUserBudget(): Promise<UserBudgetInfo | null> {
return this.ipcRenderer.invoke("get-user-budget");
}
public async getChatContextResults(params: {
appId: number;
}): Promise<ContextPathResults> {
return this.ipcRenderer.invoke("get-context-paths", params);
}
public async setChatContext(params: {
appId: number;
chatContext: AppChatContext;
}): Promise<void> {
return this.ipcRenderer.invoke("set-context-paths", params);
}
}