ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import picomatch from 'picomatch';
import type vscode from 'vscode';
import * as path from '../vs/base/common/path';
import { isWindows } from '../vs/base/common/platform';
import { URI } from '../vs/base/common/uri';
export function isMatch(uri: URI, glob: vscode.GlobPattern): boolean {
if (typeof glob === 'string') {
return picomatch.isMatch(uri.fsPath, glob, { dot: true, windows: isWindows });
} else {
if (uri.fsPath === glob.baseUri.fsPath && glob.pattern === '*') {
return true;
}
const relativePath = path.relative(glob.baseUri.fsPath, uri.fsPath);
if (!relativePath.startsWith('..')) {
return picomatch.isMatch(relativePath, glob.pattern, { dot: true, windows: isWindows });
}
return picomatch.isMatch(uri.fsPath, glob.pattern, { dot: true, windows: isWindows });
}
}
export interface GlobIncludeOptions {
/**
* Globs for files to explicitly include in the search.
*
* If this is provided, only files matching these globs will be included.
*/
readonly include?: readonly vscode.GlobPattern[];
/**
* Globs for files to exclude from the search.
*
* This takes precedence over the {@linkcode include} globs.
*/
readonly exclude?: readonly vscode.GlobPattern[];
}
export function shouldInclude(uri: URI, options: GlobIncludeOptions | undefined): boolean {
if (!options) {
return true;
}
if (options.exclude?.some(x => isMatch(uri, x))) {
return false;
}
if (options.include) {
return options.include.some(x => isMatch(uri, x));
}
return true;
}