mergeable configs + cleanup (#8378)
This commit is contained in:
@@ -747,29 +747,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/backup": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"super::routes::config_management"
|
||||
],
|
||||
"operationId": "backup_config",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Config file backed up",
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/canonical-model-info": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@@ -1065,29 +1042,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/init": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"super::routes::config_management"
|
||||
],
|
||||
"operationId": "init_config",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Config initialization check completed",
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/permissions": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@@ -1485,29 +1439,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/recover": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"super::routes::config_management"
|
||||
],
|
||||
"operationId": "recover_config",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Config recovery attempted",
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/remove": {
|
||||
"post": {
|
||||
"tags": [
|
||||
|
||||
@@ -273,29 +273,6 @@ describe('App Component - Brand New State', () => {
|
||||
expect(mockNavigate).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should handle config recovery gracefully', async () => {
|
||||
// Mock config error that triggers recovery
|
||||
const { readAllConfig, recoverConfig } = await import('./api');
|
||||
console.log(recoverConfig);
|
||||
vi.mocked(readAllConfig).mockRejectedValueOnce(new Error('Config read error'));
|
||||
|
||||
mockElectron.getConfig.mockReturnValue({
|
||||
GOOSE_DEFAULT_PROVIDER: null,
|
||||
GOOSE_DEFAULT_MODEL: null,
|
||||
GOOSE_ALLOWLIST_WARNING: false,
|
||||
});
|
||||
|
||||
render(<AppInner />, { wrapper: IntlTestWrapper });
|
||||
|
||||
// Wait for initialization and recovery
|
||||
await waitFor(() => {
|
||||
expect(mockElectron.reactReady).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
// App should still initialize without any navigation calls
|
||||
expect(mockNavigate).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should seed recipe sessions with the recipe prompt when no initial message is provided', () => {
|
||||
expect(
|
||||
resolveSessionInitialMessage(
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -2235,29 +2235,6 @@ export type ReadAllConfigResponses = {
|
||||
|
||||
export type ReadAllConfigResponse = ReadAllConfigResponses[keyof ReadAllConfigResponses];
|
||||
|
||||
export type BackupConfigData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/config/backup';
|
||||
};
|
||||
|
||||
export type BackupConfigErrors = {
|
||||
/**
|
||||
* Internal server error
|
||||
*/
|
||||
500: unknown;
|
||||
};
|
||||
|
||||
export type BackupConfigResponses = {
|
||||
/**
|
||||
* Config file backed up
|
||||
*/
|
||||
200: string;
|
||||
};
|
||||
|
||||
export type BackupConfigResponse = BackupConfigResponses[keyof BackupConfigResponses];
|
||||
|
||||
export type GetCanonicalModelInfoData = {
|
||||
body: ModelInfoQuery;
|
||||
path?: never;
|
||||
@@ -2478,29 +2455,6 @@ export type RemoveExtensionResponses = {
|
||||
|
||||
export type RemoveExtensionResponse = RemoveExtensionResponses[keyof RemoveExtensionResponses];
|
||||
|
||||
export type InitConfigData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/config/init';
|
||||
};
|
||||
|
||||
export type InitConfigErrors = {
|
||||
/**
|
||||
* Internal server error
|
||||
*/
|
||||
500: unknown;
|
||||
};
|
||||
|
||||
export type InitConfigResponses = {
|
||||
/**
|
||||
* Config initialization check completed
|
||||
*/
|
||||
200: string;
|
||||
};
|
||||
|
||||
export type InitConfigResponse = InitConfigResponses[keyof InitConfigResponses];
|
||||
|
||||
export type UpsertPermissionsData = {
|
||||
body: UpsertPermissionsQuery;
|
||||
path?: never;
|
||||
@@ -2815,29 +2769,6 @@ export type ReadConfigResponses = {
|
||||
200: unknown;
|
||||
};
|
||||
|
||||
export type RecoverConfigData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/config/recover';
|
||||
};
|
||||
|
||||
export type RecoverConfigErrors = {
|
||||
/**
|
||||
* Internal server error
|
||||
*/
|
||||
500: unknown;
|
||||
};
|
||||
|
||||
export type RecoverConfigResponses = {
|
||||
/**
|
||||
* Config recovery attempted
|
||||
*/
|
||||
200: string;
|
||||
};
|
||||
|
||||
export type RecoverConfigResponse = RecoverConfigResponses[keyof RecoverConfigResponses];
|
||||
|
||||
export type RemoveConfigData = {
|
||||
body: ConfigKeyQuery;
|
||||
path?: never;
|
||||
|
||||
Reference in New Issue
Block a user