mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
feat(settings): add settings.env field for environment variable configuration
Add support for defining environment variables in settings.json files. These variables are loaded with the lowest priority: 1. System/process environment variables (highest) 2. .env files 3. settings.env (lowest/fallback) This allows users to configure default environment variables in their user or workspace settings without conflicting with existing env vars or .env file values. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
36931e1eab
commit
5f8884b60c
3 changed files with 224 additions and 4 deletions
|
|
@ -116,6 +116,19 @@ const SETTINGS_SCHEMA = {
|
|||
mergeStrategy: MergeStrategy.REPLACE,
|
||||
},
|
||||
|
||||
// Environment variables fallback
|
||||
env: {
|
||||
type: 'object',
|
||||
label: 'Environment Variables',
|
||||
category: 'Advanced',
|
||||
requiresRestart: true,
|
||||
default: {} as Record<string, string>,
|
||||
description:
|
||||
'Environment variables to set as fallback defaults. These are loaded with the lowest priority: system environment variables > .env files > settings.env.',
|
||||
showInDialog: false,
|
||||
mergeStrategy: MergeStrategy.SHALLOW_MERGE,
|
||||
},
|
||||
|
||||
general: {
|
||||
type: 'object',
|
||||
label: 'General',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue