remove console logs

This commit is contained in:
Test 2024-11-13 18:26:54 -08:00
parent 2119391b15
commit cd0e1b3b48
3 changed files with 6 additions and 20 deletions

View file

@ -64,9 +64,14 @@ export type EditStatus =
| "accepting:full-diff"
| "done";
export type ApplyStateStatus =
| "streaming" // Changes are being applied to the file
| "done" // All changes have been applied, awaiting user to accept/reject
| "closed"; // All changes have been applied. Note that for new files, we immediately set the status to "closed"
export interface ApplyState {
streamId: string;
status?: "streaming" | "done" | "closed";
status?: ApplyStateStatus;
numDiffs?: number;
filepath?: string;
fileContent?: string;

View file

@ -162,10 +162,6 @@ const Layout = () => {
useWebviewListener(
"updateApplyState",
async (state) => {
// console.log({
// filepath: state.filepath,
// content: state.fileContent,
// });
dispatch(
updateCurCheckpoint({
filepath: state.filepath,

View file

@ -442,21 +442,6 @@ export const stateSlice = createSlice({
state,
{ payload }: PayloadAction<{ filepath: string; content: string }>,
) => {
// If the user has explicitly checked out a given checkpoint, `curCheckpointIndex` will be set to that index.
// Else, we assume the current checkpoint index is the end of the checkpoints array.
// const index =
// state.curCheckpointIndex === -1
// ? state.history.length / 2 - 1
// : state.curCheckpointIndex;
console.log("updating checkpoint");
console.log({
index: state.curCheckpointIndex,
historyLength: state.history.length,
filepath: payload.filepath,
content: payload.content,
});
state.checkpoints[state.curCheckpointIndex] = {
...state.checkpoints[state.curCheckpointIndex],
[payload.filepath]: payload.content,