Skip to content

Conversation

@hediet
Copy link
Member

@hediet hediet commented Nov 3, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 3, 2025 09:09
@hediet hediet self-assigned this Nov 3, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Vite support for faster development builds and hot reload functionality to the VS Code project. It introduces infrastructure changes to enable running VS Code with Vite's dev server, including configuration files, build tooling updates, and environment variable support for dev mode.

Key Changes

  • Added Vite and tsx dependencies for build tooling and TypeScript execution
  • Introduced hot reload infrastructure and dev server configuration
  • Added new rendering views for inline completions (long distance hints, layout utilities)
  • Exposed new editor events (onDidChangeViewZones) to support reactive view updates

Reviewed Changes

Copilot reviewed 36 out of 41 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
vite.config.ts New Vite configuration with hot class support plugin
package.json Added vite and tsx dependencies
src/main-js.js, src/bootstrap-fork.js New entry points for tsx-based TypeScript execution
src/vs/editor/browser/observableCodeEditor.ts Added view zones and line height observables for reactive updates
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/ New long-distance hint views and layout utilities
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.ts Renamed InlineEditModel to ModelPerInlineEdit
src/vs/platform/windows/electron-main/windowImpl.ts Added DEV_WINDOW_SRC environment variable support
src/vs/code/electron-browser/workbench/workbench.ts Added Vite source root support
src/vs/base/browser/dom.ts Moved hover observables from ObserverNodeWithElement to ObserverNode

/**
* Warning: This is not per inline edit id and gets created often.
*/
export class ModelPerInlineEdit implements ModelPerInlineEdit {
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class ModelPerInlineEdit implements itself, which is circular and incorrect. It should either implement an interface with a different name, or the implements clause should be removed if this is meant to be a concrete class without an interface.

Suggested change
export class ModelPerInlineEdit implements ModelPerInlineEdit {
export class ModelPerInlineEdit {

Copilot uses AI. Check for mistakes.
vite.config.ts Outdated
Comment on lines 7 to 10
//import { defineConfig } from 'vite';

// use defineConfig({...})
export default {
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The commented-out import and instruction suggest using defineConfig, but the actual export doesn't use it. Either use defineConfig for better type safety and IDE support, or remove the comment to avoid confusion.

Copilot uses AI. Check for mistakes.
vite.config.ts Outdated
Comment on lines 37 to 40
code = code + `\n
if (import.meta.hot) {
import.meta.hot.accept();
}`;
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template string starts on line 37 but the content begins on line 38, creating an awkward line break. Use a proper template literal: code = code + `\\nif (import.meta.hot) {\\n\\timport.meta.hot.accept();\\n}`;

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +12
/**
* The tower areas are arranged from left to right, touch and are aligned at the bottom.
* The requested tower is placed at the requested left offset.
*/
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation says 'touch and are aligned' which is grammatically awkward. Consider: 'The tower areas are arranged from left to right, touching each other and aligned at the bottom.'

Copilot uses AI. Check for mistakes.
Comment on lines 7 to 11
const layout = distributeFlexBoxLayout(1000, {
spaceBefore: { min: 10, max: 100, priority: 2, share: 1 },
content: [{ min: 50, max: 100, priority: 2, share: 2 }, { min: 100, max: 500, priority: 1 }],
spaceAfter: {},
});
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be leftover test/example code at the top level of the module. It should be removed or moved into a test file or commented out as an example.

Copilot uses AI. Check for mistakes.
Comment on lines 426 to 427
return new OffsetRange(55, 400);
return new OffsetRange(0, editor.getContentWidth());
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 426 has a hardcoded return value and line 427 is unreachable code. Remove line 426 to make the function return the actual content width.

Copilot uses AI. Check for mistakes.
* **Note:** use `dom.ts#asCSSUrl` whenever the URL is to be used in CSS context.
*/
asBrowserUri(resourcePath: AppResourcePath | ''): URI {
// For webworkers
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment 'For webworkers' is vague. It should explain why this special case exists for files ending with 'Main.js' and what the purpose of using the SRC_ROOT is in this context.

Suggested change
// For webworkers
/**
* Special handling for web worker entry points:
* Files ending with 'Main.js' are typically entry scripts for web workers.
* In certain environments (such as when running in a browser or with dynamic loading),
* worker scripts must be loaded from a specific source root that may differ from the
* standard resource resolution logic. The global variable `_VSCODE_SRC_ROOT` is set at runtime
* to provide the correct base path for loading these worker scripts.
* This ensures that worker entry points are resolved relative to the actual source root,
* allowing them to be loaded correctly regardless of deployment or bundling configuration.
*/

Copilot uses AI. Check for mistakes.
@hediet hediet force-pushed the hediet/long-distance-hints branch from d8b9527 to 3d182cf Compare November 12, 2025 17:59
@hediet hediet marked this pull request as ready for review November 12, 2025 18:00
@vs-code-engineering
Copy link

vs-code-engineering bot commented Nov 12, 2025

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/base/browser/dom.ts

@hediet hediet enabled auto-merge (squash) November 12, 2025 18:00
@vs-code-engineering vs-code-engineering bot added this to the November 2025 milestone Nov 12, 2025
@hediet hediet merged commit 771bfcf into main Nov 12, 2025
28 checks passed
@hediet hediet deleted the hediet/long-distance-hints branch November 12, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants