mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-12-15 00:26:23 +00:00
Update AppImage
This commit is contained in:
@@ -6,7 +6,7 @@ import { Button } from "@/components/ui/button"
|
|||||||
import { Input } from "@/components/ui/input"
|
import { Input } from "@/components/ui/input"
|
||||||
import { Label } from "@/components/ui/label"
|
import { Label } from "@/components/ui/label"
|
||||||
import { X, CheckCircle2, XCircle, Loader2 } from "lucide-react"
|
import { X, CheckCircle2, XCircle, Loader2 } from "lucide-react"
|
||||||
import { TerminalPanel } from "./terminal-panel"
|
import { TerminalPanel, type TerminalPanelHandle } from "./terminal-panel"
|
||||||
import { API_PORT } from "@/lib/api-config"
|
import { API_PORT } from "@/lib/api-config"
|
||||||
|
|
||||||
interface WebInteraction {
|
interface WebInteraction {
|
||||||
@@ -42,7 +42,7 @@ export function ScriptTerminalModal({
|
|||||||
const [exitCode, setExitCode] = useState<number | null>(null)
|
const [exitCode, setExitCode] = useState<number | null>(null)
|
||||||
const [currentInteraction, setCurrentInteraction] = useState<WebInteraction | null>(null)
|
const [currentInteraction, setCurrentInteraction] = useState<WebInteraction | null>(null)
|
||||||
const [interactionInput, setInteractionInput] = useState("")
|
const [interactionInput, setInteractionInput] = useState("")
|
||||||
const terminalRef = useRef<any>(null)
|
const terminalRef = useRef<TerminalPanelHandle>(null)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log("[v0] currentInteraction changed:", currentInteraction)
|
console.log("[v0] currentInteraction changed:", currentInteraction)
|
||||||
@@ -106,14 +106,8 @@ export function ScriptTerminalModal({
|
|||||||
|
|
||||||
console.log("[v0] Sending interaction response:", response)
|
console.log("[v0] Sending interaction response:", response)
|
||||||
|
|
||||||
// Access the terminal instance to send the response
|
terminalRef.current.sendMessage(response)
|
||||||
const terminal = terminalRef.current
|
console.log("[v0] Response sent successfully")
|
||||||
if (terminal?.terminals?.[0]?.ws) {
|
|
||||||
terminal.terminals[0].ws.send(response)
|
|
||||||
console.log("[v0] Response sent successfully")
|
|
||||||
} else {
|
|
||||||
console.log("[v0] Could not send response - no WebSocket available")
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log("[v0] Clearing currentInteraction after response")
|
console.log("[v0] Clearing currentInteraction after response")
|
||||||
setCurrentInteraction(null)
|
setCurrentInteraction(null)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user