2025-08-12 14:31:59 -04:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2025-08-26 00:04:53 +02:00
|
|
|
import type { ConfigParameters } from '../config/config.js';
|
|
|
|
|
import { Config } from '../config/config.js';
|
2025-08-12 14:31:59 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Default parameters used for {@link FAKE_CONFIG}
|
|
|
|
|
*/
|
|
|
|
|
export const DEFAULT_CONFIG_PARAMETERS: ConfigParameters = {
|
|
|
|
|
usageStatisticsEnabled: true,
|
|
|
|
|
debugMode: false,
|
|
|
|
|
sessionId: 'test-session-id',
|
|
|
|
|
proxy: undefined,
|
|
|
|
|
model: 'gemini-9001-super-duper',
|
|
|
|
|
targetDir: '/',
|
|
|
|
|
cwd: '/',
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
2025-11-20 00:29:12 +01:00
|
|
|
* Produces a config. Default parameters are set to
|
2025-08-12 14:31:59 -04:00
|
|
|
* {@link DEFAULT_CONFIG_PARAMETERS}, optionally, fields can be specified to
|
|
|
|
|
* override those defaults.
|
|
|
|
|
*/
|
|
|
|
|
export function makeFakeConfig(
|
|
|
|
|
config: Partial<ConfigParameters> = {
|
|
|
|
|
...DEFAULT_CONFIG_PARAMETERS,
|
|
|
|
|
},
|
|
|
|
|
): Config {
|
|
|
|
|
return new Config({
|
|
|
|
|
...DEFAULT_CONFIG_PARAMETERS,
|
|
|
|
|
...config,
|
|
|
|
|
});
|
|
|
|
|
}
|