Commit Graph

3 Commits

Author SHA1 Message Date
Hermes 8b5dacda58 fix: terminal command output not displaying - add diagnostics
User reported: '已连接, 但终端啥也不显示'
Likely cause: command ran but stdout was empty / scrolled to wrong place
/ output widget didn't refresh before worker finished.

Changes:
- Eagerly show the typed command in the output area (\$ <cmd>) so user
  sees the input was received even if the worker hangs/fails
- Show '(stdout 为空)' placeholder when worker returns no output, so it's
  clear the worker actually ran
- Force output.repaint() and ensureCursorVisible() after append
- Add 2 diagnostic buttons in terminal bottom bar:
    * [🔍 诊断]  prints current SSH connection / worker state
    * [▶ 测试命令]  pre-fills a known-good test command
- Make CommandWorker explicitly check conn.connected before exec
- Surface full traceback in stderr on exception instead of bare str(e)

All 15 existing tests still pass (core 6/6 + UI 3/3 + E2E 6/6).
2026-07-28 21:18:21 +08:00
Hermes 01c8d3581a fix: rebuild build_windows.bat without Chinese / dangerous cmd patterns
- Remove all non-ASCII text (cmd default GBK mangles UTF-8)
- Replace 'if errorlevel 1 (' multi-line blocks with 'goto :label'
- Replace 'echo(' with 'echo.'
- Use 'for %%I' to get file size (avoid UTF-8 console findstr issues)
- All error paths now end with explicit exit /b 1

Fixes #1: '涓嬭浇鍦板潃' (mojibake) and '('") parse errors.
2026-07-28 21:04:09 +08:00
Hermes a57dbc0252 feat: SSHClient v1.0.0 - PyQt5 + paramiko 跨平台 SSH 客户端
功能:
- 多主机管理 (增删改查, 密码/私钥双认证, 导入导出)
- 远程终端 (命令执行 + 常用命令快捷栏 + 超时控制)
- SFTP 文件浏览 (上传/下载带进度, 新建/删除/重命名)
- 实时监控 (CPU/内存/磁盘/网络, 1-10秒可调刷新)
- AI Agent (OpenAI 兼容 API, 5 工具自动调用: 命令/指标/列文件/读文件/上传)

技术栈: PyQt5 + paramiko + psutil + requests + PyInstaller
打包: build_windows.bat / build.sh 一键产出 ~57MB 单文件 exe
测试: core 6/6 + UI 3/3 + E2E 6/6 全部通过
2026-07-28 21:01:31 +08:00