fix: address Task 2 review findings (stderr + cookie flags)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user