fix: address Task 2 review findings (stderr + cookie flags)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-21 10:52:30 -04:00
parent e76254912a
commit a62cd05f6c
3 changed files with 56 additions and 18 deletions

View File

@@ -7,12 +7,24 @@ export interface DependencyStatus {
installCommand: string;
}
export type CookieSource =
| { type: 'browser'; browser: string }
| { type: 'file'; path: string }
| { type: 'none' };
const DEFAULT_COOKIE_SOURCE: CookieSource = {
type: 'browser',
browser: 'firefox',
};
type InstallEvent =
| { event: 'output'; data: { line: string } }
| { event: 'finished'; data: { success: boolean } };
export async function checkDependencies(): Promise<DependencyStatus[]> {
return invoke<DependencyStatus[]>('check_dependencies');
export async function checkDependencies(
cookieSource: CookieSource = DEFAULT_COOKIE_SOURCE
): Promise<DependencyStatus[]> {
return invoke<DependencyStatus[]>('check_dependencies', { cookieSource });
}
export async function installDependency(