client-exec CLI

This commit is contained in:
Ian Gulliver
2026-10-21 10:48:59 -07:00
parent 48a05d92de
commit fab6ce5831
16 changed files with 760 additions and 364 deletions
+1 -11
View File
@@ -10,7 +10,6 @@ import (
"os"
"os/exec"
"path/filepath"
"sort"
"strings"
"time"
@@ -220,17 +219,8 @@ func (m *Manager) clientTools(l *live) []mcp.Tool {
}
}
func (m *Manager) recentClients() []clients.Client {
rows := m.clients.List()
sort.SliceStable(rows, func(i, j int) bool {
a, b := rows[i].LastActionAt, rows[j].LastActionAt
return a != nil && (b == nil || a.After(*b))
})
return rows
}
func (m *Manager) listClients() string {
rows := m.recentClients()
rows := m.clients.Recent()
if len(rows) == 0 {
return "No client Macs are connected."
}