SSH connection status indicators
- Add Connected bool field to vfs.Entry and RemoteMount - Track connection status in sshState.connectedHosts - Show status icon (connected/disconnected) in pane header when browsing remote host - Async SSH connection test with cancel support for Add Host dialog - Colored labels and styled help text in SSH dialogs - Confirmation dialog when deleting manually-added SSH hosts
This commit is contained in:
parent
df4df6b8f6
commit
1ed2d3defb
224 changed files with 33447 additions and 236 deletions
|
|
@ -3,7 +3,10 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
|
||||
|
|
@ -21,15 +24,34 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Set up debug logging to a file in /tmp
|
||||
logDir := filepath.Join(os.TempDir(), "vcom-logs")
|
||||
if err := os.MkdirAll(logDir, 0755); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "warning: cannot create log dir %s: %v\n", logDir, err)
|
||||
}
|
||||
logPath := filepath.Join(logDir, fmt.Sprintf("vcom-%s.log", time.Now().Format("2006-01-02_15-04-05")))
|
||||
f, err := tea.LogToFile(logPath, "")
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "warning: cannot set up log file %s: %v\n", logPath, err)
|
||||
} else {
|
||||
defer f.Close()
|
||||
log.Printf("[INIT] Logging to %s", logPath)
|
||||
log.Printf("[INIT] vcom starting — config: %s, resolved: %s", *configPath, resolvedPath)
|
||||
}
|
||||
|
||||
model, err := ui.NewModel(cfg, resolvedPath)
|
||||
if err != nil {
|
||||
log.Printf("[FATAL] startup error: %v", err)
|
||||
fmt.Fprintf(os.Stderr, "startup error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
program := tea.NewProgram(model, tea.WithAltScreen(), tea.WithMouseCellMotion())
|
||||
log.Printf("[INIT] Bubble Tea program started")
|
||||
if _, err := program.Run(); err != nil {
|
||||
log.Printf("[FATAL] runtime error: %v", err)
|
||||
fmt.Fprintf(os.Stderr, "runtime error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
log.Printf("[INIT] vcom exited cleanly")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue