mirror of
https://github.com/stablyai/orca.git
synced 2026-09-25 16:02:38 +00:00
Register Helium (imput, bundle id net.imput.helium) so it is auto-detected and importable from the picker on macOS like Chrome/Edge/Arc/Brave/Comet, instead of only via the "From File..." JSON path. Reuses the existing macOS Chromium decryption path unchanged. Helium quirks (verified on a real install): its Keychain entry is service "Helium Storage Key" / account "Helium" (not the usual "<Browser> Safe Storage"), it stores data under its bundle id, and it keeps cookies at the legacy <Profile>/Cookies path. Mac-only for now; Windows/Linux data dirs are unverified so winRoot/linuxRoot are omitted and the source defaults off there. Claude-Session: https://claude.ai/code/session_01SZzX6ktZaaCUg5PWnzniuC
31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
/** Human-readable import sources aligned with CHROMIUM_BROWSERS in
|
|
* browser-cookie-import.ts plus Firefox/Safari detection. */
|
|
const CHROMIUM_COOKIE_IMPORT_SOURCES = [
|
|
{ label: 'Google Chrome', mac: true, win: true, linux: true },
|
|
{ label: 'Microsoft Edge', mac: true, win: true, linux: true },
|
|
{ label: 'Arc', mac: true, win: false, linux: false },
|
|
{ label: 'Brave', mac: true, win: true, linux: true },
|
|
{ label: 'Comet', mac: true, win: true, linux: false },
|
|
{ label: 'Helium', mac: true, win: false, linux: false }
|
|
] as const
|
|
|
|
export function getBrowserCookieImportSourceLabels(
|
|
platform: 'darwin' | 'win32' | 'linux'
|
|
): string[] {
|
|
const labels: string[] = []
|
|
for (const source of CHROMIUM_COOKIE_IMPORT_SOURCES) {
|
|
if (platform === 'darwin' && source.mac) {
|
|
labels.push(source.label)
|
|
} else if (platform === 'win32' && source.win) {
|
|
labels.push(source.label)
|
|
} else if (platform === 'linux' && source.linux) {
|
|
labels.push(source.label)
|
|
}
|
|
}
|
|
labels.push('Firefox')
|
|
if (platform === 'darwin') {
|
|
labels.push('Safari')
|
|
}
|
|
return labels
|
|
}
|