Skip to content

Commit f3cb823

Browse files
committed
Add profile option to persistent config
1 parent d0e5cf6 commit f3cb823

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/cli/src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { command as testSentryCommand } from './commands/test-sentry.js';
1111
import { command as testProfileCommand } from './commands/test-profile.js';
1212
import { command as toolsCommand } from './commands/tools.js';
1313
import { sharedOptions } from './options.js';
14+
import { getConfig } from './settings/config.js';
1415
import { initSentry, captureException } from './sentry/index.js';
1516
import { enableProfiling, mark, reportTimings } from './utils/performance.js';
1617

@@ -28,8 +29,11 @@ const main = async () => {
2829
// Parse argv early to check for profiling flag
2930
const parsedArgv = await yargs(hideBin(process.argv)).options(sharedOptions).parse();
3031

31-
// Enable profiling if --profile flag is set
32-
enableProfiling(Boolean(parsedArgv.profile));
32+
// Get config to check for profile setting
33+
const config = getConfig();
34+
35+
// Enable profiling if --profile flag is set or if enabled in config
36+
enableProfiling(Boolean(parsedArgv.profile) || Boolean(config.profile));
3337

3438
mark('Main function start');
3539

packages/cli/src/settings/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const defaultConfig = {
1616
modelName: 'claude-3-7-sonnet-20250219',
1717
ollamaBaseUrl: 'http://localhost:11434/api',
1818
customPrompt: '',
19+
profile: false,
1920
};
2021

2122
export type Config = typeof defaultConfig;

0 commit comments

Comments
 (0)