mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 09:13:08 +00:00
refactor: Update default model configuration to use dynamic model IDs
- Replaced hardcoded model IDs with a call to `getAllCursorModelIds()` for dynamic retrieval of available models. - Updated comments to reflect the change in configuration logic, enhancing clarity on the default model setup.
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import type { CursorCliConfig, CursorModelId } from '@automaker/types';
|
import { getAllCursorModelIds, type CursorCliConfig, type CursorModelId } from '@automaker/types';
|
||||||
import { createLogger } from '@automaker/utils';
|
import { createLogger } from '@automaker/utils';
|
||||||
import { getAutomakerDir } from '@automaker/platform';
|
import { getAutomakerDir } from '@automaker/platform';
|
||||||
|
|
||||||
@@ -42,10 +42,10 @@ export class CursorConfigManager {
|
|||||||
logger.warn('Failed to load config:', error);
|
logger.warn('Failed to load config:', error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return default config
|
// Return default config with all available models
|
||||||
return {
|
return {
|
||||||
defaultModel: 'auto',
|
defaultModel: 'auto',
|
||||||
models: ['auto', 'claude-sonnet-4', 'gpt-4o-mini'],
|
models: getAllCursorModelIds(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,7 +175,7 @@ export class CursorConfigManager {
|
|||||||
reset(): void {
|
reset(): void {
|
||||||
this.config = {
|
this.config = {
|
||||||
defaultModel: 'auto',
|
defaultModel: 'auto',
|
||||||
models: ['auto', 'claude-sonnet-4', 'gpt-4o-mini'],
|
models: getAllCursorModelIds(),
|
||||||
};
|
};
|
||||||
this.saveConfig();
|
this.saveConfig();
|
||||||
logger.info('Config reset to defaults');
|
logger.info('Config reset to defaults');
|
||||||
|
|||||||
Reference in New Issue
Block a user