mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
refactor: streamline non-interactive session handling by removing settings parameter and introducing minimal settings instance
This commit is contained in:
@@ -484,6 +484,27 @@ export class LoadedSettings {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a minimal LoadedSettings instance with empty settings.
|
||||
* Used in stream-json mode where settings are ignored.
|
||||
*/
|
||||
export function createMinimalSettings(): LoadedSettings {
|
||||
const emptySettingsFile: SettingsFile = {
|
||||
path: '',
|
||||
settings: {},
|
||||
originalSettings: {},
|
||||
rawJson: '{}',
|
||||
};
|
||||
return new LoadedSettings(
|
||||
emptySettingsFile,
|
||||
emptySettingsFile,
|
||||
emptySettingsFile,
|
||||
emptySettingsFile,
|
||||
false,
|
||||
new Set(),
|
||||
);
|
||||
}
|
||||
|
||||
function findEnvFile(startDir: string): string | null {
|
||||
let currentDir = path.resolve(startDir);
|
||||
while (true) {
|
||||
|
||||
Reference in New Issue
Block a user