From 948704055b2fccc7eeaabbd30488854387c93b5c Mon Sep 17 00:00:00 2001 From: ZacharyZcR Date: Wed, 17 Sep 2025 01:18:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E8=B0=83=E8=AF=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=EF=BC=8C=E4=BF=9D=E6=8C=81=E4=BB=A3=E7=A0=81=E6=95=B4?= =?UTF-8?q?=E6=B4=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/backend/ssh/terminal.ts | 8 -------- .../Desktop/Apps/File Manager/FileManagerModern.tsx | 10 ---------- .../Apps/File Manager/components/TerminalWindow.tsx | 6 ------ src/ui/Desktop/Apps/Terminal/Terminal.tsx | 12 +----------- 4 files changed, 1 insertion(+), 35 deletions(-) diff --git a/src/backend/ssh/terminal.ts b/src/backend/ssh/terminal.ts index 2e847a64..e01a00aa 100644 --- a/src/backend/ssh/terminal.ts +++ b/src/backend/ssh/terminal.ts @@ -108,14 +108,6 @@ wss.on("connection", (ws: WebSocket) => { executeCommand?: string; }) { const { cols, rows, hostConfig, initialPath, executeCommand } = data; - - sshLogger.debug("Terminal connection data received", { - operation: "terminal_connect_data", - hasInitialPath: !!initialPath, - initialPath, - hasExecuteCommand: !!executeCommand, - executeCommand - }); const { id, ip, diff --git a/src/ui/Desktop/Apps/File Manager/FileManagerModern.tsx b/src/ui/Desktop/Apps/File Manager/FileManagerModern.tsx index d4fc3613..0769b90c 100644 --- a/src/ui/Desktop/Apps/File Manager/FileManagerModern.tsx +++ b/src/ui/Desktop/Apps/File Manager/FileManagerModern.tsx @@ -1145,7 +1145,6 @@ function FileManagerContent({ initialHost, onClose }: FileManagerModernProps) { return; } - console.log('Opening terminal at path:', path); // 创建终端窗口 const windowCount = Date.now() % 10; @@ -1188,20 +1187,11 @@ function FileManagerContent({ initialHost, onClose }: FileManagerModernProps) { return; } - console.log('Running executable file:', file.path); - // 获取文件所在目录 const fileDir = file.path.substring(0, file.path.lastIndexOf('/')); const fileName = file.name; const executeCmd = `./${fileName}`; - console.log('Execute command details:', { - filePath: file.path, - fileDir, - fileName, - executeCommand: executeCmd - }); - // 创建执行用的终端窗口 const windowCount = Date.now() % 10; const offsetX = 250 + (windowCount * 40); diff --git a/src/ui/Desktop/Apps/File Manager/components/TerminalWindow.tsx b/src/ui/Desktop/Apps/File Manager/components/TerminalWindow.tsx index 6af26512..8208c4f8 100644 --- a/src/ui/Desktop/Apps/File Manager/components/TerminalWindow.tsx +++ b/src/ui/Desktop/Apps/File Manager/components/TerminalWindow.tsx @@ -34,12 +34,6 @@ export function TerminalWindow({ initialY = 150, executeCommand }: TerminalWindowProps) { - console.log('TerminalWindow props:', { - windowId, - initialPath, - executeCommand, - hasExecuteCommand: !!executeCommand - }); const { closeWindow, minimizeWindow, maximizeWindow, focusWindow, windows } = useWindowManager(); // 获取当前窗口状态 diff --git a/src/ui/Desktop/Apps/Terminal/Terminal.tsx b/src/ui/Desktop/Apps/Terminal/Terminal.tsx index 12f017cc..09c708e3 100644 --- a/src/ui/Desktop/Apps/Terminal/Terminal.tsx +++ b/src/ui/Desktop/Apps/Terminal/Terminal.tsx @@ -29,13 +29,6 @@ export const Terminal = forwardRef(function SSHTerminal( { hostConfig, isVisible, splitScreen = false, onClose, initialPath, executeCommand }, ref, ) { - console.log('Terminal component props:', { - hasHostConfig: !!hostConfig, - isVisible, - initialPath, - executeCommand, - hasExecuteCommand: !!executeCommand - }); const { t } = useTranslation(); const { instance: terminal, ref: xtermRef } = useXTerm(); const fitAddonRef = useRef(null); @@ -258,13 +251,10 @@ export const Terminal = forwardRef(function SSHTerminal( } }, 10000); - const connectionData = { cols, rows, hostConfig, initialPath, executeCommand }; - console.log('Sending terminal connection data:', connectionData); - ws.send( JSON.stringify({ type: "connectToHost", - data: connectionData, + data: { cols, rows, hostConfig, initialPath, executeCommand }, }), ); terminal.onData((data) => {