Skip to content

Commit

Permalink
disable terminal only when loading
Browse files Browse the repository at this point in the history
  • Loading branch information
SmartManoj committed Feb 18, 2025
1 parent 99bdf58 commit 0ac09d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/features/terminal/terminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useSelector } from "react-redux";
import { RootState } from "#/store";
import { useTerminal } from "#/hooks/use-terminal";
import "@xterm/xterm/css/xterm.css";
import { RUNTIME_INACTIVE_STATES } from "#/types/agent-state";
import { AgentState, RUNTIME_INACTIVE_STATES } from "#/types/agent-state";

interface TerminalProps {
secrets: string[];
Expand All @@ -15,7 +15,7 @@ function Terminal({ secrets }: TerminalProps) {
const { ref } = useTerminal({
commands,
secrets,
disabled: RUNTIME_INACTIVE_STATES.includes(curAgentState),
disabled: curAgentState === AgentState.LOADING,
});

return (
Expand Down

0 comments on commit 0ac09d1

Please sign in to comment.