diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index ec4b320b2..d7e41bfde 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -180,7 +180,7 @@ export function Chat() { isMetaEquivalentKeyPressed(e) && !e.shiftKey ) { - dispatch(setInactive()); + dispatch(cancelGeneration()); } }; window.addEventListener("keydown", listener); @@ -502,3 +502,6 @@ export function Chat() { ); } +function cancelGeneration(): any { + throw new Error("Function not implemented."); +} diff --git a/gui/src/redux/slices/stateSlice.ts b/gui/src/redux/slices/stateSlice.ts index 9adac23fd..ff5db6c02 100644 --- a/gui/src/redux/slices/stateSlice.ts +++ b/gui/src/redux/slices/stateSlice.ts @@ -178,6 +178,8 @@ export const stateSlice = createSlice({ contextItems: [], }); + state.currentToolCallState = {}; + // https://github.com/continuedev/continue/pull/1021 state.active = true; }, @@ -261,6 +263,11 @@ export const stateSlice = createSlice({ state.isGatheringContext = false; state.active = false; }, + cancelGeneration: (state) => { + state.isGatheringContext = false; + state.active = false; + state.currentToolCallState = {}; + }, abortStream: (state) => { state.streamAborter.abort(); state.streamAborter = new AbortController(); @@ -312,6 +319,7 @@ export const stateSlice = createSlice({ state.active = false; state.isGatheringContext = false; state.isMultifileEdit = false; + state.currentToolCallState = {}; if (payload) { state.history = payload.history as any; state.title = payload.title;