Download packages/core/src/test-utils/config.ts from SaylorTwift/gemini-cli: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/core/src/test-utils/config.ts
- Command line
-
hf download hf://SaylorTwift/gemini-cli/packages/core/src/test-utils/config.ts
-
curl -L -o config.ts https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/core/src/test-utils/config.ts
1.09 kB
| /** | |
| * @license | |
| * Copyright 2025 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import { Config, type ConfigParameters } from '../config/config.js'; | |
| /** | |
| * 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: '/', | |
| }; | |
| /** | |
| * Produces a config. Default parameters are set to | |
| * {@link DEFAULT_CONFIG_PARAMETERS}, optionally, fields can be specified to | |
| * override those defaults. | |
| */ | |
| export function makeFakeConfig( | |
| config: Partial<ConfigParameters> = { | |
| ...DEFAULT_CONFIG_PARAMETERS, | |
| }, | |
| ): Config { | |
| const cfg = new Config({ | |
| ...DEFAULT_CONFIG_PARAMETERS, | |
| ...config, | |
| }); | |
| Object.defineProperty(cfg.storage, 'projectIdentifier', { | |
| get: () => 'test-project-id', | |
| configurable: true, | |
| }); | |
| Object.defineProperty(cfg.storage, 'getPlansDir', { | |
| value: () => '/mocked/plans/dir', | |
| configurable: true, | |
| }); | |
| return cfg; | |
| } | |