mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
fix: correct schema field name for context.loadFromIncludeDirectories
The schema incorrectly defined the field as 'loadMemoryFromIncludeDirectories' while the migration map and documentation specified 'loadFromIncludeDirectories'. This caused user configurations to be ignored. Changes: - Rename schema field from loadMemoryFromIncludeDirectories to loadFromIncludeDirectories - Update all references in config loading and UI components - Update test cases to reflect the correct field name Fixes #1603
This commit is contained in:
parent
32cddc272f
commit
0eee42fa6a
5 changed files with 13 additions and 15 deletions
|
|
@ -932,7 +932,7 @@ export async function loadCliConfig(
|
|||
targetDir: cwd,
|
||||
includeDirectories,
|
||||
loadMemoryFromIncludeDirectories:
|
||||
settings.context?.loadMemoryFromIncludeDirectories || false,
|
||||
settings.context?.loadFromIncludeDirectories || false,
|
||||
importFormat: settings.context?.importFormat || 'tree',
|
||||
debugMode,
|
||||
question,
|
||||
|
|
|
|||
|
|
@ -218,14 +218,14 @@ describe('SettingsSchema', () => {
|
|||
},
|
||||
context: {
|
||||
includeDirectories: ['/path/to/dir'],
|
||||
loadMemoryFromIncludeDirectories: true,
|
||||
loadFromIncludeDirectories: true,
|
||||
},
|
||||
};
|
||||
|
||||
// TypeScript should not complain about these properties
|
||||
expect(settings.ui?.theme).toBe('dark');
|
||||
expect(settings.context?.includeDirectories).toEqual(['/path/to/dir']);
|
||||
expect(settings.context?.loadMemoryFromIncludeDirectories).toBe(true);
|
||||
expect(settings.context?.loadFromIncludeDirectories).toBe(true);
|
||||
});
|
||||
|
||||
it('should have includeDirectories setting in schema', () => {
|
||||
|
|
@ -243,21 +243,19 @@ describe('SettingsSchema', () => {
|
|||
).toEqual([]);
|
||||
});
|
||||
|
||||
it('should have loadMemoryFromIncludeDirectories setting in schema', () => {
|
||||
it('should have loadFromIncludeDirectories setting in schema', () => {
|
||||
expect(
|
||||
getSettingsSchema().context?.properties
|
||||
.loadMemoryFromIncludeDirectories,
|
||||
getSettingsSchema().context?.properties.loadFromIncludeDirectories,
|
||||
).toBeDefined();
|
||||
expect(
|
||||
getSettingsSchema().context?.properties.loadMemoryFromIncludeDirectories
|
||||
.type,
|
||||
getSettingsSchema().context?.properties.loadFromIncludeDirectories.type,
|
||||
).toBe('boolean');
|
||||
expect(
|
||||
getSettingsSchema().context?.properties.loadMemoryFromIncludeDirectories
|
||||
getSettingsSchema().context?.properties.loadFromIncludeDirectories
|
||||
.category,
|
||||
).toBe('Context');
|
||||
expect(
|
||||
getSettingsSchema().context?.properties.loadMemoryFromIncludeDirectories
|
||||
getSettingsSchema().context?.properties.loadFromIncludeDirectories
|
||||
.default,
|
||||
).toBe(false);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -687,7 +687,7 @@ const SETTINGS_SCHEMA = {
|
|||
showInDialog: false,
|
||||
mergeStrategy: MergeStrategy.CONCAT,
|
||||
},
|
||||
loadMemoryFromIncludeDirectories: {
|
||||
loadFromIncludeDirectories: {
|
||||
type: 'boolean',
|
||||
label: 'Load Memory From Include Directories',
|
||||
category: 'Context',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue