diff --git a/frontend/src/components/AgentControlBar.tsx b/frontend/src/components/AgentControlBar.tsx index ff52b5071be9..b917f8a2515a 100644 --- a/frontend/src/components/AgentControlBar.tsx +++ b/frontend/src/components/AgentControlBar.tsx @@ -11,7 +11,6 @@ import { clearMessages } from "#/state/chatSlice"; import { clearCells } from "#/state/jupyterSlice"; import Session from "#/services/session"; import { clearCommands } from "#/state/commandSlice"; -import { useTerminal } from "#/hooks/useTerminal"; import { clearCurentStep } from "#/state/agentSlice"; const IgnoreTaskStateMap: { [k: string]: AgentState[] } = { @@ -81,8 +80,7 @@ function AgentControlBar() { const { curAgentState } = useSelector((state: RootState) => state.agent); const [desiredState, setDesiredState] = React.useState(AgentState.INIT); const [isLoading, setIsLoading] = React.useState(false); - const { clearTerminal } = useTerminal([]); - + // const { clearTerminal } = useTerminal([]); const handleAction = (action: AgentState) => { if (IgnoreTaskStateMap[action].includes(curAgentState)) { @@ -98,7 +96,7 @@ function AgentControlBar() { store.dispatch(clearCells()); store.dispatch(clearCommands()); store.dispatch(clearCurentStep()); - clearTerminal(); + // clearTerminal(); } else { setIsLoading(true); } diff --git a/frontend/src/hooks/useTerminal.ts b/frontend/src/hooks/useTerminal.ts index 61a8d8bd52f1..31c3c07bcae8 100644 --- a/frontend/src/hooks/useTerminal.ts +++ b/frontend/src/hooks/useTerminal.ts @@ -14,7 +14,7 @@ export const useTerminal = (commands: Command[] = []) => { const fitAddon = React.useRef(null); const ref = React.useRef(null); const lastCommandIndex = React.useRef(0); - let lastCommand = React.useRef(""); + const lastCommand = React.useRef(""); React.useEffect(() => { /* Create a new terminal instance */