Skip to content

Commit

Permalink
remember what interaction mode you are in
Browse files Browse the repository at this point in the history
  • Loading branch information
aliasaria committed Sep 16, 2024
1 parent 4556a63 commit 85336f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer/components/Experiment/Interact/Interact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ export default function Chat({
experimentInfo,
experimentInfoMutate,
setRagEngine,
mode,
setMode,
}) {
const { models, isError, isLoading } = chatAPI.useModelStatus();
const [mode, setMode] = React.useState('chat');
const [conversationId, setConversationId] = React.useState(null);
const [chats, setChats] = React.useState([]);
const [isThinking, setIsThinking] = React.useState(false);
Expand Down
5 changes: 5 additions & 0 deletions src/renderer/components/MainAppPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import ExperimentNotes from './Experiment/ExperimentNotes';
import TransformerLabSettings from './TransformerLabSettings';
import Logs from './Logs';
import FoundationHome from './Experiment/Foundation';
import { useState } from 'react';

// This component renders the main content of the app that is shown
// On the rightmost side, regardless of what menu items are selected
Expand All @@ -37,6 +38,8 @@ export default function MainAppPanel({
experimentInfoMutate,
}) {
const navigate = useNavigate();
const [selectedInteractSubpage, setSelectedInteractSubpage] =
useState('chat');

function setFoundation(model) {
let model_name = '';
Expand Down Expand Up @@ -176,6 +179,8 @@ export default function MainAppPanel({
experimentInfo={experimentInfo}
experimentInfoMutate={experimentInfoMutate}
setRagEngine={setRagEngine}
mode={selectedInteractSubpage}
setMode={setSelectedInteractSubpage}
/>
}
/>
Expand Down

0 comments on commit 85336f2

Please sign in to comment.