Problems: auto-fix & problem panel (#541)

Test cases:
- [x] create-ts-errors
  - [x] with auto-fix
  - [x] without auto-fix 
- [x] create-unfixable-ts-errors
- [x] manually edit file & click recheck
- [x] fix all
- [x] delete and rename case

THINGS
- [x] error handling for checkProblems isn't working as expected
- [x] make sure it works for both default templates (add tests) 
- [x] fix bad animation
- [x] change file context (prompt/files)

IF everything passes in Windows AND defensive try catch... then enable
by default
- [x] enable auto-fix by default
This commit is contained in:
Will Chen
2025-07-02 15:43:26 -07:00
committed by GitHub
parent 52205be9db
commit 678cd3277e
65 changed files with 5068 additions and 189 deletions

View File

@@ -9,6 +9,7 @@ import type {
AppOutput,
Chat,
ChatResponseEnd,
ChatProblemsEvent,
CreateAppParams,
CreateAppResult,
ListAppsResponse,
@@ -35,6 +36,7 @@ import type {
App,
ComponentSelection,
AppUpgrade,
ProblemReport,
} from "./ipc_types";
import type { AppChatContext, ProposalResult } from "@/lib/schemas";
import { showError } from "@/lib/toast";
@@ -233,6 +235,7 @@ export class IpcClient {
onUpdate: (messages: Message[]) => void;
onEnd: (response: ChatResponseEnd) => void;
onError: (error: string) => void;
onProblems?: (problems: ChatProblemsEvent) => void;
},
): void {
const {
@@ -934,4 +937,10 @@ export class IpcClient {
public async openAndroid(params: { appId: number }): Promise<void> {
return this.ipcRenderer.invoke("open-android", params);
}
public async checkProblems(params: {
appId: number;
}): Promise<ProblemReport> {
return this.ipcRenderer.invoke("check-problems", params);
}
}