add rag-view frontend

This commit is contained in:
2026-02-27 20:50:03 +01:00
parent f20c422f01
commit 65ade24e1b
80 changed files with 9923 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
import fetchAddNewUserEntry from "../../fetch-async/fetchAddNewUserEntry";
import { MESSAGE_ROLE } from "../../constants";
export const buildNewEntryExtraReducers = (builder) => {
builder
.addCase(fetchAddNewUserEntry.pending, (state, action) => {
const { content } = action.meta.arg;
state.messages.push({ role: MESSAGE_ROLE.USER, content });
state.isWaitingResponse = true;
})
.addCase(fetchAddNewUserEntry.fulfilled, (state) => {
state.isWaitingResponse = false;
})
.addCase(fetchAddNewUserEntry.rejected, (state, action) => {
state.isWaitingResponse = false;
console.log("fetchAddNewUserEntry error:", action.payload?.status);
});
};