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:
co-authored by
Orca
Nikolatesla-lj
Jinwoo-H
parent
f90da6ea37
commit
9bf339eeb9
@@ -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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user