microsoft / microsoft/monaco-editor

[Bug] MultiDiff not work

Open
#4,584 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Reproducible in vscode.dev or in VS Code Desktop?
  • Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.50.0#XQAAAAJpAgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw10_kGqDTilUrSvZdCEkJoct6e5xymsgchVewcCURwZhxLRheEW-k71pa4P8iJPI2Z1mCU61lnXIJThP5sajV1G0U95cq4xFMv0zKkKHKUV4UdCb9PYdHaMbZFaEmJOt12q3yQx89GBy1okUapPVdMokGflkKPL8MSp1KMo0vOmvmBC2C9s8sc5mkZoaJ6jGHCGSU2AZ4tERGtx1UjTjIVkQvM_2JbbN0gI6oHXVLPq_SGq5wVn_2aAR_b5GvEgWdv0zs32PvEl7jk69kzNKXUOdppdfoKO9mI7pHvtI5L7cfAjFpxygM2PBmkHBBQDnPFQLyiCSE3tqvWnO31ZxWU_U5iUuq_6r7RNw

Monaco Editor Playground Code

No response

Reproduction Steps

Hi, I noticed that vscode can do multi-file diff and I found that there is createMultiFileDiffEditor API in monaco-editor, when I looked at the source code, I found that I need to create the required multiFileDiffEditor instances through multiFileDiffEditor instances, but when I called the creation method, I found that they are removed by tree-shake, so I would like to know how I can use this api. multiDiffModelView, but when I call the create method, I find that they have been removed by tree-shake, so I'm trying to figure out how I can use this api.

Actual (Problematic) Behavior

cannot access to createViewModel or setViewModel

image image
Expected Behavior

call these method to create/set viewModel for multiDiffEditor without error

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Monaco Editor Playground reproduction and inspect the createMultiFileDiffEditor and multiFileDiffEditor entry points mentioned in the report. Trace why createViewModel and setViewModel are removed by tree-shaking, then verify that a multi-file diff editor can create and set its view model without error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
api, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.