mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
feat(shell): enable PTY by default and various enhancements
### Shell & Interactive Terminal Improvements - PTY shell is now enabled by default instead of disabled - Improved shell output rendering, process termination, and added fallback warning - Background commands now properly capture subprocess PIDs on non-Windows ### Coding Plan Improvements - Simplified auth message, added /model tip, improved system info display - Reordered model list to prioritize glm-5, kimi-k2.5, MiniMax-M2.5 - Model selection is now preserved when updating if the model still exists ### Other Changes - Added shared symlink utility; debug logs now have latest alias - Unknown settings warnings go to debug log instead of user-facing warnings - Fixed subagent confirmation state detection - Removed debug UI from AgentCreationWizard Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
991ae9febc
commit
b48e3caa75
31 changed files with 729 additions and 314 deletions
|
|
@ -448,7 +448,7 @@ describe('Settings Loading and Merging', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('should warn about unknown top-level keys in a v2 settings file', () => {
|
||||
it('should silently ignore unknown top-level keys in a v2 settings file', () => {
|
||||
(mockFsExistsSync as Mock).mockImplementation(
|
||||
(p: fs.PathLike) => p === USER_SETTINGS_PATH,
|
||||
);
|
||||
|
|
@ -466,13 +466,7 @@ describe('Settings Loading and Merging', () => {
|
|||
|
||||
const settings = loadSettings(MOCK_WORKSPACE_DIR);
|
||||
|
||||
expect(getSettingsWarnings(settings)).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.stringContaining(
|
||||
"Unknown setting 'someUnknownKey' will be ignored",
|
||||
),
|
||||
]),
|
||||
);
|
||||
expect(getSettingsWarnings(settings)).toEqual([]);
|
||||
});
|
||||
|
||||
it('should not warn for valid v2 container keys', () => {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import {
|
|||
QWEN_DIR,
|
||||
getErrorMessage,
|
||||
Storage,
|
||||
createDebugLogger,
|
||||
} from '@qwen-code/qwen-code-core';
|
||||
import stripJsonComments from 'strip-json-comments';
|
||||
import { DefaultLight } from '../ui/themes/default-light.js';
|
||||
|
|
@ -32,6 +33,8 @@ import { customDeepMerge, type MergeableObject } from '../utils/deepMerge.js';
|
|||
import { updateSettingsFilePreservingFormat } from '../utils/commentJson.js';
|
||||
import { writeStderrLine } from '../utils/stdioHelpers.js';
|
||||
|
||||
const debugLogger = createDebugLogger('SETTINGS');
|
||||
|
||||
function getMergeStrategyForPath(path: string[]): MergeStrategy | undefined {
|
||||
let current: SettingDefinition | undefined = undefined;
|
||||
let currentSchema: SettingsSchema | undefined = getSettingsSchema();
|
||||
|
|
@ -564,7 +567,7 @@ function getSettingsFileKeyWarnings(
|
|||
);
|
||||
}
|
||||
|
||||
// Unknown top-level keys.
|
||||
// Unknown top-level keys — log silently to debug output.
|
||||
const schemaKeys = new Set(Object.keys(getSettingsSchema()));
|
||||
for (const key of Object.keys(settings)) {
|
||||
if (key === SETTINGS_VERSION_KEY) {
|
||||
|
|
@ -577,8 +580,8 @@ function getSettingsFileKeyWarnings(
|
|||
continue;
|
||||
}
|
||||
|
||||
warnings.push(
|
||||
`Warning: Unknown setting '${key}' will be ignored in ${settingsFilePath}.`,
|
||||
debugLogger.warn(
|
||||
`Unknown setting '${key}' will be ignored in ${settingsFilePath}.`,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -822,9 +822,9 @@ const SETTINGS_SCHEMA = {
|
|||
label: 'Interactive Shell (PTY)',
|
||||
category: 'Tools',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
default: true,
|
||||
description:
|
||||
'Use node-pty for an interactive shell experience. Fallback to child_process still applies.',
|
||||
'Use node-pty for an interactive shell experience. Falls back to child_process if PTY is unavailable.',
|
||||
showInDialog: true,
|
||||
},
|
||||
pager: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue