mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 20:50:34 +00:00
Merge branch 'main' into feat/extension
This commit is contained in:
commit
bc7e586028
161 changed files with 4488 additions and 3277 deletions
|
|
@ -132,7 +132,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: false,
|
||||
default: undefined as string | undefined,
|
||||
description: 'The preferred editor to open files in.',
|
||||
showInDialog: false,
|
||||
showInDialog: true,
|
||||
},
|
||||
vimMode: {
|
||||
type: 'boolean',
|
||||
|
|
@ -163,13 +163,13 @@ const SETTINGS_SCHEMA = {
|
|||
},
|
||||
gitCoAuthor: {
|
||||
type: 'boolean',
|
||||
label: 'Git Co-Author',
|
||||
label: 'Attribution: commit',
|
||||
category: 'General',
|
||||
requiresRestart: false,
|
||||
default: true,
|
||||
description:
|
||||
'Automatically add a Co-authored-by trailer to git commit messages when commits are made through Qwen Code.',
|
||||
showInDialog: false,
|
||||
showInDialog: true,
|
||||
},
|
||||
checkpointing: {
|
||||
type: 'object',
|
||||
|
|
@ -198,13 +198,13 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Enable debug logging of keystrokes to the console.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
language: {
|
||||
type: 'enum',
|
||||
label: 'Language',
|
||||
label: 'Language: UI',
|
||||
category: 'General',
|
||||
requiresRestart: false,
|
||||
requiresRestart: true,
|
||||
default: 'auto',
|
||||
description:
|
||||
'The language for the user interface. Use "auto" to detect from system settings. ' +
|
||||
|
|
@ -219,9 +219,20 @@ const SETTINGS_SCHEMA = {
|
|||
{ value: 'de', label: 'Deutsch (German)' },
|
||||
],
|
||||
},
|
||||
outputLanguage: {
|
||||
type: 'string',
|
||||
label: 'Language: Model',
|
||||
category: 'General',
|
||||
requiresRestart: true,
|
||||
default: 'auto',
|
||||
description:
|
||||
'The language for LLM output. Use "auto" to detect from system settings, ' +
|
||||
'or set a specific language (e.g., "English", "中文", "日本語").',
|
||||
showInDialog: true,
|
||||
},
|
||||
terminalBell: {
|
||||
type: 'boolean',
|
||||
label: 'Terminal Bell',
|
||||
label: 'Terminal Bell Notification',
|
||||
category: 'General',
|
||||
requiresRestart: false,
|
||||
default: true,
|
||||
|
|
@ -257,7 +268,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: false,
|
||||
default: 'text',
|
||||
description: 'The format of the CLI output.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
options: [
|
||||
{ value: 'text', label: 'Text' },
|
||||
{ value: 'json', label: 'JSON' },
|
||||
|
|
@ -280,9 +291,9 @@ const SETTINGS_SCHEMA = {
|
|||
label: 'Theme',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: undefined as string | undefined,
|
||||
default: 'Qwen Dark' as string,
|
||||
description: 'The color theme for the UI.',
|
||||
showInDialog: false,
|
||||
showInDialog: true,
|
||||
},
|
||||
customThemes: {
|
||||
type: 'object',
|
||||
|
|
@ -300,7 +311,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Hide the window title bar',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
showStatusInTitle: {
|
||||
type: 'boolean',
|
||||
|
|
@ -310,7 +321,7 @@ const SETTINGS_SCHEMA = {
|
|||
default: false,
|
||||
description:
|
||||
'Show Qwen Code status and thoughts in the terminal window title',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
hideTips: {
|
||||
type: 'boolean',
|
||||
|
|
@ -321,89 +332,13 @@ const SETTINGS_SCHEMA = {
|
|||
description: 'Hide helpful tips in the UI',
|
||||
showInDialog: true,
|
||||
},
|
||||
hideBanner: {
|
||||
type: 'boolean',
|
||||
label: 'Hide Banner',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Hide the application banner',
|
||||
showInDialog: true,
|
||||
},
|
||||
hideContextSummary: {
|
||||
type: 'boolean',
|
||||
label: 'Hide Context Summary',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description:
|
||||
'Hide the context summary (QWEN.md, MCP servers) above the input.',
|
||||
showInDialog: true,
|
||||
},
|
||||
footer: {
|
||||
type: 'object',
|
||||
label: 'Footer',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: {},
|
||||
description: 'Settings for the footer.',
|
||||
showInDialog: false,
|
||||
properties: {
|
||||
hideCWD: {
|
||||
type: 'boolean',
|
||||
label: 'Hide CWD',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description:
|
||||
'Hide the current working directory path in the footer.',
|
||||
showInDialog: true,
|
||||
},
|
||||
hideSandboxStatus: {
|
||||
type: 'boolean',
|
||||
label: 'Hide Sandbox Status',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Hide the sandbox status indicator in the footer.',
|
||||
showInDialog: true,
|
||||
},
|
||||
hideModelInfo: {
|
||||
type: 'boolean',
|
||||
label: 'Hide Model Info',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Hide the model name and context usage in the footer.',
|
||||
showInDialog: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
hideFooter: {
|
||||
type: 'boolean',
|
||||
label: 'Hide Footer',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Hide the footer from the UI',
|
||||
showInDialog: true,
|
||||
},
|
||||
showMemoryUsage: {
|
||||
type: 'boolean',
|
||||
label: 'Show Memory Usage',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Display memory usage information in the UI',
|
||||
showInDialog: true,
|
||||
},
|
||||
showLineNumbers: {
|
||||
type: 'boolean',
|
||||
label: 'Show Line Numbers',
|
||||
label: 'Show Line Numbers in Code',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Show line numbers in the chat.',
|
||||
description: 'Show line numbers in the code output.',
|
||||
showInDialog: true,
|
||||
},
|
||||
showCitations: {
|
||||
|
|
@ -413,7 +348,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Show citations for generated text in the chat.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
customWittyPhrases: {
|
||||
type: 'array',
|
||||
|
|
@ -426,7 +361,7 @@ const SETTINGS_SCHEMA = {
|
|||
},
|
||||
enableWelcomeBack: {
|
||||
type: 'boolean',
|
||||
label: 'Enable Welcome Back',
|
||||
label: 'Show Welcome Back Dialog',
|
||||
category: 'UI',
|
||||
requiresRestart: false,
|
||||
default: true,
|
||||
|
|
@ -460,7 +395,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Disable loading phrases for accessibility',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
screenReader: {
|
||||
type: 'boolean',
|
||||
|
|
@ -470,7 +405,7 @@ const SETTINGS_SCHEMA = {
|
|||
default: undefined as boolean | undefined,
|
||||
description:
|
||||
'Render output in plain-text to be more screen reader accessible',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -497,7 +432,7 @@ const SETTINGS_SCHEMA = {
|
|||
properties: {
|
||||
enabled: {
|
||||
type: 'boolean',
|
||||
label: 'IDE Mode',
|
||||
label: 'Auto-connect to IDE',
|
||||
category: 'IDE',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
|
|
@ -532,7 +467,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: true,
|
||||
default: true,
|
||||
description: 'Enable collection of usage statistics',
|
||||
showInDialog: false,
|
||||
showInDialog: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -573,7 +508,7 @@ const SETTINGS_SCHEMA = {
|
|||
default: -1,
|
||||
description:
|
||||
'Maximum number of user/model/tool turns to keep in a session. -1 means unlimited.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
summarizeToolOutput: {
|
||||
type: 'object',
|
||||
|
|
@ -611,7 +546,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: false,
|
||||
default: true,
|
||||
description: 'Skip the next speaker check.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
skipLoopDetection: {
|
||||
type: 'boolean',
|
||||
|
|
@ -620,7 +555,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Disable all loop detection checks (streaming and LLM).',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
skipStartupContext: {
|
||||
type: 'boolean',
|
||||
|
|
@ -630,7 +565,7 @@ const SETTINGS_SCHEMA = {
|
|||
default: false,
|
||||
description:
|
||||
'Avoid sending the workspace startup context at the beginning of each session.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
enableOpenAILogging: {
|
||||
type: 'boolean',
|
||||
|
|
@ -639,7 +574,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Enable OpenAI logging.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
openAILoggingDir: {
|
||||
type: 'string',
|
||||
|
|
@ -649,7 +584,7 @@ const SETTINGS_SCHEMA = {
|
|||
default: undefined as string | undefined,
|
||||
description:
|
||||
'Custom directory path for OpenAI API logs. If not specified, defaults to logs/openai in the current working directory.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
generationConfig: {
|
||||
type: 'object',
|
||||
|
|
@ -669,7 +604,7 @@ const SETTINGS_SCHEMA = {
|
|||
description: 'Request timeout in milliseconds.',
|
||||
parentKey: 'generationConfig',
|
||||
childKey: 'timeout',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
maxRetries: {
|
||||
type: 'number',
|
||||
|
|
@ -680,7 +615,7 @@ const SETTINGS_SCHEMA = {
|
|||
description: 'Maximum number of retries for failed requests.',
|
||||
parentKey: 'generationConfig',
|
||||
childKey: 'maxRetries',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
disableCacheControl: {
|
||||
type: 'boolean',
|
||||
|
|
@ -691,7 +626,7 @@ const SETTINGS_SCHEMA = {
|
|||
description: 'Disable cache control for DashScope providers.',
|
||||
parentKey: 'generationConfig',
|
||||
childKey: 'disableCacheControl',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
schemaCompliance: {
|
||||
type: 'enum',
|
||||
|
|
@ -703,7 +638,7 @@ const SETTINGS_SCHEMA = {
|
|||
'The compliance mode for tool schemas sent to the model. Use "openapi_30" for strict OpenAPI 3.0 compatibility (e.g., for Gemini).',
|
||||
parentKey: 'generationConfig',
|
||||
childKey: 'schemaCompliance',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
options: [
|
||||
{ value: 'auto', label: 'Auto (Default)' },
|
||||
{ value: 'openapi_30', label: 'OpenAPI 3.0 Strict' },
|
||||
|
|
@ -759,7 +694,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Whether to load memory files from include directories.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
fileFiltering: {
|
||||
type: 'object',
|
||||
|
|
@ -795,7 +730,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: true,
|
||||
default: true,
|
||||
description: 'Enable recursive file search functionality',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
disableFuzzySearch: {
|
||||
type: 'boolean',
|
||||
|
|
@ -804,7 +739,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Disable fuzzy search when searching for files.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -841,7 +776,7 @@ const SETTINGS_SCHEMA = {
|
|||
properties: {
|
||||
enableInteractiveShell: {
|
||||
type: 'boolean',
|
||||
label: 'Enable Interactive Shell',
|
||||
label: 'Interactive Shell (PTY)',
|
||||
category: 'Tools',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
|
|
@ -866,20 +801,10 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: false,
|
||||
default: false,
|
||||
description: 'Show color in shell output.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
autoAccept: {
|
||||
type: 'boolean',
|
||||
label: 'Auto Accept',
|
||||
category: 'Tools',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description:
|
||||
'Automatically accept and execute tool calls that are considered safe (e.g., read-only operations).',
|
||||
showInDialog: true,
|
||||
},
|
||||
core: {
|
||||
type: 'array',
|
||||
label: 'Core Tools',
|
||||
|
|
@ -911,7 +836,7 @@ const SETTINGS_SCHEMA = {
|
|||
},
|
||||
approvalMode: {
|
||||
type: 'enum',
|
||||
label: 'Approval Mode',
|
||||
label: 'Tool Approval Mode',
|
||||
category: 'Tools',
|
||||
requiresRestart: false,
|
||||
default: ApprovalMode.DEFAULT,
|
||||
|
|
@ -925,6 +850,16 @@ const SETTINGS_SCHEMA = {
|
|||
{ value: ApprovalMode.YOLO, label: 'YOLO' },
|
||||
],
|
||||
},
|
||||
autoAccept: {
|
||||
type: 'boolean',
|
||||
label: 'Auto Accept',
|
||||
category: 'Tools',
|
||||
requiresRestart: false,
|
||||
default: false,
|
||||
description:
|
||||
'Automatically accept and execute tool calls that are considered safe (e.g., read-only operations) without explicit user confirmation.',
|
||||
showInDialog: false,
|
||||
},
|
||||
discoveryCommand: {
|
||||
type: 'string',
|
||||
label: 'Tool Discovery Command',
|
||||
|
|
@ -951,7 +886,7 @@ const SETTINGS_SCHEMA = {
|
|||
default: true,
|
||||
description:
|
||||
'Use ripgrep for file content search instead of the fallback implementation. Provides faster search performance.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
useBuiltinRipgrep: {
|
||||
type: 'boolean',
|
||||
|
|
@ -961,7 +896,7 @@ const SETTINGS_SCHEMA = {
|
|||
default: true,
|
||||
description:
|
||||
'Use the bundled ripgrep binary. When set to false, the system-level "rg" command will be used instead. This setting is only effective when useRipgrep is true.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
enableToolOutputTruncation: {
|
||||
type: 'boolean',
|
||||
|
|
@ -970,7 +905,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: true,
|
||||
default: true,
|
||||
description: 'Enable truncation of large tool outputs.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
truncateToolOutputThreshold: {
|
||||
type: 'number',
|
||||
|
|
@ -980,7 +915,7 @@ const SETTINGS_SCHEMA = {
|
|||
default: DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
|
||||
description:
|
||||
'Truncate tool output if it is larger than this many characters. Set to -1 to disable.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
truncateToolOutputLines: {
|
||||
type: 'number',
|
||||
|
|
@ -989,7 +924,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: true,
|
||||
default: DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES,
|
||||
description: 'The number of lines to keep when truncating tool output.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -1066,7 +1001,7 @@ const SETTINGS_SCHEMA = {
|
|||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Setting to track whether Folder trust is enabled.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -1219,7 +1154,7 @@ const SETTINGS_SCHEMA = {
|
|||
properties: {
|
||||
skills: {
|
||||
type: 'boolean',
|
||||
label: 'Skills',
|
||||
label: 'Experimental: Skills',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
|
|
@ -1235,7 +1170,7 @@ const SETTINGS_SCHEMA = {
|
|||
default: true,
|
||||
description:
|
||||
'Enable vision model support and auto-switching functionality. When disabled, vision models like qwen-vl-max-latest will be hidden and auto-switching will not occur.',
|
||||
showInDialog: true,
|
||||
showInDialog: false,
|
||||
},
|
||||
vlmSwitchMode: {
|
||||
type: 'string',
|
||||
|
|
@ -1270,9 +1205,3 @@ type InferSettings<T extends SettingsSchema> = {
|
|||
};
|
||||
|
||||
export type Settings = InferSettings<SettingsSchemaType>;
|
||||
|
||||
export interface FooterSettings {
|
||||
hideCWD?: boolean;
|
||||
hideSandboxStatus?: boolean;
|
||||
hideModelInfo?: boolean;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue