mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 20:03:37 +00:00
feat: Add Cursor CLI configuration and status endpoints
- Implemented new routes for managing Cursor CLI configuration, including getting current settings and updating default models. - Created status endpoint to check Cursor CLI installation and authentication status. - Updated HttpApiClient to include methods for interacting with the new Cursor API endpoints. - Marked completion of the setup routes and status endpoints phase in the integration plan.
This commit is contained in:
@@ -508,6 +508,59 @@ export class HttpApiClient implements ElectronAPI {
|
||||
error?: string;
|
||||
}> => this.get('/api/setup/gh-status'),
|
||||
|
||||
// Cursor CLI methods
|
||||
getCursorStatus: (): Promise<{
|
||||
success: boolean;
|
||||
installed?: boolean;
|
||||
version?: string | null;
|
||||
path?: string | null;
|
||||
auth?: {
|
||||
authenticated: boolean;
|
||||
method: string;
|
||||
};
|
||||
installCommand?: string;
|
||||
loginCommand?: string;
|
||||
error?: string;
|
||||
}> => this.get('/api/setup/cursor-status'),
|
||||
|
||||
getCursorConfig: (
|
||||
projectPath: string
|
||||
): Promise<{
|
||||
success: boolean;
|
||||
config?: {
|
||||
defaultModel?: string;
|
||||
models?: string[];
|
||||
mcpServers?: string[];
|
||||
rules?: string[];
|
||||
};
|
||||
availableModels?: Array<{
|
||||
id: string;
|
||||
label: string;
|
||||
description: string;
|
||||
hasThinking: boolean;
|
||||
tier: 'free' | 'pro';
|
||||
}>;
|
||||
error?: string;
|
||||
}> => this.get(`/api/setup/cursor-config?projectPath=${encodeURIComponent(projectPath)}`),
|
||||
|
||||
setCursorDefaultModel: (
|
||||
projectPath: string,
|
||||
model: string
|
||||
): Promise<{
|
||||
success: boolean;
|
||||
model?: string;
|
||||
error?: string;
|
||||
}> => this.post('/api/setup/cursor-config/default-model', { projectPath, model }),
|
||||
|
||||
setCursorModels: (
|
||||
projectPath: string,
|
||||
models: string[]
|
||||
): Promise<{
|
||||
success: boolean;
|
||||
models?: string[];
|
||||
error?: string;
|
||||
}> => this.post('/api/setup/cursor-config/models', { projectPath, models }),
|
||||
|
||||
onInstallProgress: (callback: (progress: unknown) => void) => {
|
||||
return this.subscribeToEvent('agent:stream', callback);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user