ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Visual Studio Code is built with a layered architecture using TypeScript, web APIs and Electron, combining web technologies with native app capabilities. The codebase is organized into key architectural layers:
src/: Main TypeScript source code with unit tests in src/vs/*/test/ foldersbuild/: Build scripts and CI/CD toolsextensions/: Built-in extensions that ship with VS Codetest/: Integration tests and test infrastructurescripts/: Development and build scriptsresources/: Static resources (icons, themes, etc.)out/: Compiled JavaScript output (generated during build)src/ folder)src/vs/base/ - Foundation utilities and cross-platform abstractionssrc/vs/platform/ - Platform services and dependency injection infrastructuresrc/vs/editor/ - Text editor implementation with language services, syntax highlighting, and editing featuressrc/vs/workbench/ - Main application workbench for web and desktopworkbench/browser/ - Core workbench UI components (parts, layout, actions)workbench/services/ - Service implementationsworkbench/contrib/ - Feature contributions (git, debug, search, terminal, etc.)workbench/api/ - Extension host and VS Code API implementationsrc/vs/code/ - Electron main process specific implementationsrc/vs/server/ - Server specific implementationsrc/vs/sessions/ - Agent sessions window, a dedicated workbench layer for agentic workflows (sits alongside vs/workbench, may import from it but not vice versa)The core architecture follows these principles:
base, platform, editor, to workbenchextensions/ folder)The extensions/ directory contains first-party extensions that ship with VS Code:
typescript-language-features/, html-language-features/, css-language-features/, etc.git/, debug-auto-launch/, emmet/, markdown-language-features/theme-* folders for default color themesextension-editing/, vscode-api-tests/Each extension follows the standard VS Code extension structure with package.json, TypeScript sources, and contribution points to extend the workbench through the Extension API.
1. Semantic search first: Use file search for general concepts 2. Grep for exact strings: Use grep for error messages or specific function names 3. Follow imports: Check what files import the problematic module 4. Check test files: Often reveal usage patterns and expected behavior
Choose validation based on the scope and risk of the change. Large-scale builds and typechecking can be slow, and consume significant resources, so minimize their use. Prefer existing editor or watch-task diagnostics and the smallest targeted tests that cover the changed behavior. Do not start build or watch tasks, run broad type checks, or make type checking a prerequisite for targeted tests solely as a completion ritual.
When running in a VS Code editor window with a workspace folder, use the VS Code task tools for build and watch workflows: inspect the existing task output first, and run an existing task instead of invoking its equivalent shell command. Do not start a duplicate build or watch process when the workspace task already provides current diagnostics. Agents window chats and isolated worktree sessions may not have access to the editor's workspace tasks; use the repository commands directly in those contexts.
Run a targeted type check or build when you are not fully confident in the change, and the change is broad or cross-cutting, it affects build or type configuration, or another validation step reports a compilation problem. When task tools are unavailable or no suitable task exists, useful commands include:
npm run typecheck-client for the main sources under src/npm run gulp compile-extensions for built-in extensionsnpm run typecheck from the build folder for build toolingDevelopment compile tasks already type-check their inputs. Do not run npm run typecheck-client immediately before npm run compile or npm run compile-client; choose the command that covers the required validation. When tests only need fresh output files, use the fast one-shot npm run transpile-client instead of compiling.
Use scripts/test.sh (or scripts\test.bat on Windows) for unit tests and scripts/test-integration.sh (or scripts\test-integration.bat on Windows) for integration tests. Add a targeted selector such as --grep whenever possible. Run npm run valid-layers-check only when a change may affect module layering.
We use tabs, not spaces.
type namesenum valuesfunction and method namesproperty names and local variablestypes or functions unless you need to share it across multiple componentstypes or values to the global namespacefunctions, interfaces, enums, and classesvs/nls module{0}).=> over anonymous function expressions(x) => x + x is wrong but the following are correct:x => x + x
(x, y) => x + y
<T>(x: T, y: T) => x === yfor (let i = 0, n = str.length; i < 10; i++) {
if (x < 10) {
foo();
}
}
function f(x: number, y: string): void { }export function x(…) {…} instead of export const x = (…) => {…}. One advantage of using the function keyword is that the stack trace shows a good name when debugging.async and await over Promise and then callsnls.localize() method)describe and test consistently with existing patternsany or unknown as the type for variables, parameters, or return values unless absolutely necessary. If they need type annotations, they should have proper types or interfaces defined.DisposableStore, MutableDisposableassert.deepStrictEqual over multiple precise assertions, as they are much more difficult to understand and to update.(mainWindow as any).ResizeObserver = ...) or use any casts to install fakes in tests. Instead, make the dependency injectable: add an optional constructor parameter on the production class that defaults to the real implementation (e.g. targetWindow.ResizeObserver), and have the test pass a fake that implements the real interface.DisposableMapIDisposableIEditorService to open editors instead of IEditorGroupsService.activeGroup.openEditor to ensure that the editor opening logic is properly followed and to avoid bypassing important features such as revealIfOpened or preserveFocus.bind(), call() and apply() solely to control this or partially apply arguments; prefer arrow functions or closures to capture the necessary context, and use these methods only when required by an API or interoperability.IInstantiationService at any other point in time.