multiple agents
This commit is contained in:
1 parent
ec391bd7ed
commit
a399e1f365
6 files changed
+499
-658
No files matched your search
@@ -637,22 +637,18 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Sort tabs by history index (most recent first)
|
||||
// Sort tabs by ID for stable, deterministic output
|
||||
sort.Slice(tabs, func(i, j int) bool {
|
||||
return tabs[i].HistoryIndex > tabs[j].HistoryIndex
|
||||
return tabs[i].ID < tabs[j].ID
|
||||
})
|
||||
|
||||
// Print the tabs
|
||||
if len(tabs) == 0 {
|
||||
fmt.Println("No tabs open")
|
||||
} else {
|
||||
fmt.Println("Open tabs (in order of recent use):")
|
||||
fmt.Println("Open tabs:")
|
||||
for _, tab := range tabs {
|
||||
currentMarker := " "
|
||||
if tab.IsCurrent {
|
||||
currentMarker = "*"
|
||||
}
|
||||
fmt.Printf("%s %s: %s\n", currentMarker, tab.ID, tab.URL)
|
||||
fmt.Printf(" %s: %s\n", tab.ID, tab.URL)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user