| 1 | import { createAsyncThunk } from "@reduxjs/toolkit"; |
| 2 | import { resetNextCodeBlockToApplyIndex } from "../slices/sessionSlice"; |
| 3 | import { ThunkApiType } from "../store"; |
| 4 | |
| 5 | export const resetStateForNewMessage = createAsyncThunk< |
| 6 | void, |
| 7 | undefined, |
| 8 | ThunkApiType |
| 9 | >("chat/resetStateForNewMessage", async (_, { dispatch }) => { |
| 10 | dispatch(resetNextCodeBlockToApplyIndex()); |
| 11 | }); |