Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions packages/cli/src/config/settingsSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,16 @@ describe('SettingsSchema', () => {
});
});

it('should define context.importFormat as tree or flat', () => {
const importFormat = getSettingsSchema().context?.properties.importFormat;

expect(importFormat.type).toBe('enum');
expect(importFormat.options).toEqual([
{ value: 'tree', label: 'Tree' },
{ value: 'flat', label: 'Flat' },
]);
});

it('should have loadFromIncludeDirectories setting in schema', () => {
expect(
getSettingsSchema().context?.properties.loadFromIncludeDirectories,
Expand Down Expand Up @@ -389,5 +399,16 @@ describe('SettingsSchema', () => {
.description,
).toBe('Enable debug logging of keystrokes to the console.');
});

it('should define advanced.dnsResolutionOrder as ipv4first or verbatim', () => {
const dnsResolutionOrder =
getSettingsSchema().advanced.properties.dnsResolutionOrder;

expect(dnsResolutionOrder.type).toBe('enum');
expect(dnsResolutionOrder.options).toEqual([
{ value: 'ipv4first', label: 'IPv4 First' },
{ value: 'verbatim', label: 'Verbatim' },
]);
});
});
});
12 changes: 10 additions & 2 deletions packages/cli/src/config/settingsSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1387,13 +1387,17 @@ const SETTINGS_SCHEMA = {
},
},
importFormat: {
type: 'string',
type: 'enum',
label: 'Memory Import Format',
category: 'Context',
requiresRestart: false,
default: undefined as MemoryImportFormat | undefined,
description: 'The format to use when importing memory.',
showInDialog: false,
options: [
{ value: 'tree', label: 'Tree' },
{ value: 'flat', label: 'Flat' },
],
},
includeDirectories: {
type: 'array',
Expand Down Expand Up @@ -2310,13 +2314,17 @@ const SETTINGS_SCHEMA = {
showInDialog: false,
},
dnsResolutionOrder: {
type: 'string',
type: 'enum',
label: 'DNS Resolution Order',
category: 'Advanced',
requiresRestart: true,
default: undefined as DnsResolutionOrder | undefined,
description: 'The DNS resolution order.',
showInDialog: false,
options: [
{ value: 'ipv4first', label: 'IPv4 First' },
{ value: 'verbatim', label: 'Verbatim' },
],
},
excludedEnvVars: {
type: 'array',
Expand Down
14 changes: 10 additions & 4 deletions packages/vscode-ide-companion/schemas/settings.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,11 @@
"description": "The name of the context file or files."
},
"importFormat": {
"description": "The format to use when importing memory.",
"type": "string"
"description": "The format to use when importing memory. Options: tree, flat",
"enum": [
"tree",
"flat"
]
},
"includeDirectories": {
"description": "Additional directories to include in the workspace context. Missing directories will be skipped with a warning.",
Expand Down Expand Up @@ -1074,8 +1077,11 @@
"default": false
},
"dnsResolutionOrder": {
"description": "The DNS resolution order.",
"type": "string"
"description": "The DNS resolution order. Options: ipv4first, verbatim",
"enum": [
"ipv4first",
"verbatim"
]
},
"excludedEnvVars": {
"description": "Environment variables to exclude from project context.",
Expand Down
Loading