mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +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 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 { getAutomakerDir } from '@automaker/platform';
|
||||
|
||||
@@ -42,10 +42,10 @@ export class CursorConfigManager {
|
||||
logger.warn('Failed to load config:', error);
|
||||
}
|
||||
|
||||
// Return default config
|
||||
// Return default config with all available models
|
||||
return {
|
||||
defaultModel: 'auto',
|
||||
models: ['auto', 'claude-sonnet-4', 'gpt-4o-mini'],
|
||||
models: getAllCursorModelIds(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ export class CursorConfigManager {
|
||||
reset(): void {
|
||||
this.config = {
|
||||
defaultModel: 'auto',
|
||||
models: ['auto', 'claude-sonnet-4', 'gpt-4o-mini'],
|
||||
models: getAllCursorModelIds(),
|
||||
};
|
||||
this.saveConfig();
|
||||
logger.info('Config reset to defaults');
|
||||
|
||||
Reference in New Issue
Block a user