feat(cli): add tab profile lifecycle commands (#1397)

Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Nikolatesla-lj <Nikolatesla-lj@users.noreply.github.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
This commit is contained in:
Nikolatesla-lj
2026-05-04 23:01:15 -07:00
committed by GitHub
co-authored by Orca Nikolatesla-lj Jinwoo-H
parent f90da6ea37
commit 9bf339eeb9
10 changed files with 320 additions and 1 deletions
+14
View File
@@ -1,4 +1,5 @@
import type {
BrowserProfileListResult,
BrowserScreenshotResult,
BrowserSnapshotResult,
BrowserTabListResult,
@@ -247,3 +248,16 @@ export function formatTabList(result: BrowserTabListResult): string {
})
.join('\n')
}
export function formatBrowserProfileList(result: BrowserProfileListResult): string {
if (result.profiles.length === 0) {
return 'No browser profiles found.'
}
return result.profiles
.map((profile) => {
const marker = profile.scope === 'default' ? '* ' : ' '
const source = profile.source?.browserFamily ?? 'none'
return `${marker}${profile.id} ${profile.label} ${profile.scope} source:${source}`
})
.join('\n')
}