From 95363a5b52f3bf73531ac76b00178fa79ca97661 Mon Sep 17 00:00:00 2001 From: Nate Sesti <33237525+sestinj@users.noreply.github.com> Date: Thu, 28 Sep 2023 01:02:52 -0700 Subject: Past input (#513) * feat: :construction: use ComboBox in place of UserInputContainer * feat: :construction: adding context to previous inputs steps * feat: :sparkles: preview context items on click * feat: :construction: more work on context items ui * style: :construction: working out the details of ctx item buttons * feat: :sparkles: getting the final details * fix: :bug: fix height of ctx items bar * fix: :bug: last couple of details * fix: :bug: pass model param through to hf inference api * fix: :loud_sound: better logging for timeout * feat: :sparkles: option to set the meilisearch url * fix: :bug: fix height of past inputs --- .../react-app/src/redux/slices/serverStateReducer.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'extension/react-app/src/redux/slices/serverStateReducer.ts') diff --git a/extension/react-app/src/redux/slices/serverStateReducer.ts b/extension/react-app/src/redux/slices/serverStateReducer.ts index 9b3a780c..1f4836cb 100644 --- a/extension/react-app/src/redux/slices/serverStateReducer.ts +++ b/extension/react-app/src/redux/slices/serverStateReducer.ts @@ -98,6 +98,21 @@ export const serverStateSlice = createSlice({ temporarilyPushToUserInputQueue: (state, action) => { state.user_input_queue = [...state.user_input_queue, action.payload]; }, + temporarilyCreateNewUserInput: (state, action) => { + state.history.timeline = [ + ...state.history.timeline, + { + step: { + description: action.payload, + name: "User Input", + hide: false, + }, + depth: 0, + active: false, + context_used: state.selected_context_items, + }, + ]; + }, temporarilyClearSession: (state, action) => { state.history.timeline = []; state.selected_context_items = []; @@ -114,5 +129,6 @@ export const { setServerState, temporarilyPushToUserInputQueue, temporarilyClearSession, + temporarilyCreateNewUserInput, } = serverStateSlice.actions; export default serverStateSlice.reducer; -- cgit v1.2.3-70-g09d2