mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
feat(permissions): add workspace directory management tab
- Add Workspace tab to PermissionsDialog with full directory management UI
- Directory list view: initial (non-removable) dirs shown inline,
runtime-added dirs selectable; "Add directory…" always first
- Add directory input view: filesystem autocomplete with ↑/↓ navigation
and Tab-to-complete; path validation (existence, type, duplicate,
subdirectory checks)
- Remove directory confirmation view
- Save directly to project settings (SettingScope.Workspace), no scope
selection step
- Add onTab/onUp/onDown props to TextInput to intercept keys before buffer
- Add removeDirectory() and isInitialDirectory() to WorkspaceContext
- Add --add-dir CLI alias for --include-directories
- Add /add-dir slash command (alias for /directory add)
- Add permissions.additionalDirectories settings field
- Add i18n keys for all workspace directory UI strings (en/zh/de/ja/pt/ru)"
This commit is contained in:
parent
217d59c892
commit
e793e82729
14 changed files with 780 additions and 13 deletions
|
|
@ -32,7 +32,7 @@ import {
|
|||
NativeLspService,
|
||||
} from '@qwen-code/qwen-code-core';
|
||||
import { extensionsCommand } from '../commands/extensions.js';
|
||||
import type { Settings , LoadedSettings } from './settings.js';
|
||||
import type { Settings, LoadedSettings } from './settings.js';
|
||||
import { SettingScope } from './settings.js';
|
||||
import {
|
||||
resolveCliGenerationConfig,
|
||||
|
|
@ -378,6 +378,7 @@ export async function parseArguments(): Promise<CliArgs> {
|
|||
description: 'List all available extensions and exit.',
|
||||
})
|
||||
.option('include-directories', {
|
||||
alias: 'add-dir',
|
||||
type: 'array',
|
||||
string: true,
|
||||
description:
|
||||
|
|
@ -715,7 +716,14 @@ export async function loadCliConfig(
|
|||
|
||||
const includeDirectories = (settings.context?.includeDirectories || [])
|
||||
.map(resolvePath)
|
||||
.concat((argv.includeDirectories || []).map(resolvePath));
|
||||
.concat((argv.includeDirectories || []).map(resolvePath))
|
||||
.concat(
|
||||
(
|
||||
((settings.permissions as Record<string, unknown> | undefined)?.[
|
||||
'additionalDirectories'
|
||||
] as string[] | undefined) ?? []
|
||||
).map(resolvePath),
|
||||
);
|
||||
|
||||
// LSP configuration: enabled only via --experimental-lsp flag
|
||||
const lspEnabled = argv.experimentalLsp === true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue