jiebi/CodeConvo huggingface dataset:
Code change:
this.configurationRegistry.updateConfigurations({ add: [this.configurationNode], remove: oldConfigurationNode ? [oldConfigurationNode] : [] }); } } <ins> export class DefaultBinaryEditorConfiguration extends Disposable implements IWorkbenchContribution { private configurationRegistry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration); private configurationNode: IConfigurationNode | undefined; constructor( @IEditorResolverService private readonly editorResolverService: IEditorResolverService, @IExtensionService extensionService: IExtensionService, ) { super(); // Editor configurations are getting updated very aggressively // (atleast 20 times) while the extensions are getting registered. // As such push out the default binary editor configuration // until after extensions registered. (async () => { await extensionService.whenInstalledExtensionsRegistered(); this.updateConfiguration(); this.registerListeners(); })(); } private registerListeners(): void { // Registered editors this._register(this.editorResolverService.onDidChangeEditorRegistrations(() => this.updateConfiguration())); } private updateConfiguration(): void { // Get registered editors const editorIds = this.editorResolverService.getEditors().filter(e => e.priority !== RegisteredEditorPriority.exclusive).map(editor => editor.id); const oldConfigurationNode = this.configurationNode; this.configurationNode = { ...workbenchConfigurationNodeBase, properties: { 'workbench.editor.defaultBinaryEditor': { type: 'string', // This allows for intellisense autocompletion enum: editorIds, description: localize('workbench.editor.defaultBinaryEditor', "The default editor for files detected as binary. If undefined the user will be presented with a picker."), } } }; this.configurationRegistry.updateConfigurations({ add: [this.configurationNode], remove: oldConfigurationNode ? [oldConfigurationNode] : [] }); } } </ins>

Related discussion:
text: We don't want to officially have the hex editor be recommended for non-textual files, but what about a setting like that can be used to open a binary file in a given editor instead of showing the "binary file" message? ! I would love it if I could have all non-text files automatically opened in the hex editor.
To verify ensure the setting works as expected. Setting it to a custom editor should automatically have that editor be opened when a file is detected as binary.
Code change:
__vsc_original_prompt_command=${PROMPT_COMMAND[@]} fi <del> if [[ -n "$__vsc_original_prompt_command" && "$__vsc_original_prompt_command" != "__vsc_prompt_cmd" ]]; then PROMPT_COMMAND=__vsc_prompt_cmd_original else PROMPT_COMMAND=__vsc_prompt_cmd </del> <ins> if [[ -z "${bash_preexec_imported:-}" ]]; then if [[ -n "$__vsc_original_prompt_command" && "$__vsc_original_prompt_command" != "__vsc_prompt_cmd" ]]; then PROMPT_COMMAND=__vsc_prompt_cmd_original else PROMPT_COMMAND=__vsc_prompt_cmd fi </ins> fi

Related discussion:
text: <!-- Do Not Delete This! featurerequesttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Describe the feature you'd like. --The vscode shell integration currently needs to be turned off or disabled for anyone with complex prompt commands, or any trap DEBUG. Please consider supporting some kind of chaining model so we can work with the shell integration as needed. Even better - use the defacto package that has already been written. VSCode is the 3rd script that wants to mess with prompts and traps - but it's the first to completely ignore Please consider shipping this along side and sourcing/using it. If that is unacceptable, consider at least detecting this module has been loaded as documented in the repo - and using it: fwiw: iterm2 has very very similar functionality to the vscode shell integration, but I've been able to work with it. Although they embedded the script directly, they kept the compatible function names and mechanisms and interop fine.
I believe we have already fixed this: Adding to make sure
Well, line 100 breaks my prompt. Adding the line as the 1st line of vscpreexec shows why. I think perhaps there needs to be 1 more state 'not in prompt' that causes preexec to bail until all promptcommand processing is done. Alternatively, if this is all to send vsccommandoutputstart - it seems like using PS0 on bash = 4.4 would be a lot cleaner?
Hi This was on 1.67.2 with dropped in place.
We've made some big changes in the past few days around debug trap and PS1 handling in bash, I believe the issues here are fixed. We may at some point hook into similar to but for now that will just increase the number of cases we would need to test for (contributions very welcome).
Actually I'll keep this open with help wanted to track integrating with bash-preexec.
OK. Pulling the - Things look better, but not quite right. The problems I see (only when DEBUG trap is being used): Still seems to be not preserving $? for promptcommand Seems to execute the trap twice. repro with setup instructions below: Do 'cd' into some directory. The command '..' should then pop one directory up, but it will try to process twice and pop twice.
Code change:
__vsc_original_prompt_command=${PROMPT_COMMAND[@]} fi <del> if [[ -n "$__vsc_original_prompt_command" && "$__vsc_original_prompt_command" != "__vsc_prompt_cmd" ]]; then PROMPT_COMMAND=__vsc_prompt_cmd_original else PROMPT_COMMAND=__vsc_prompt_cmd </del> <ins> if [[ -z "${bash_preexec_imported:-}" ]]; then if [[ -n "$__vsc_original_prompt_command" && "$__vsc_original_prompt_command" != "__vsc_prompt_cmd" ]]; then PROMPT_COMMAND=__vsc_prompt_cmd_original else PROMPT_COMMAND=__vsc_prompt_cmd fi </ins> fi

Related discussion:
text: Instead of 'success dots' in the gutter, all commands seem to think there are fail exit status. Here are my dotfiles: and a branch to help debug: The debug branch just build an array of what commands were that triggered the trap and print them at the start and end of building the prompt. It does show the trap being called twice when shell integration is enabled - and once otherwise. The repro environment/steps: Repros in OSX and WSL Ubuntu 22.04 for me. It uses dotbot. In a scratch user directory you can run ./install to link everything into ~/. Pass to ./install to avoid installing extra tooling it finds missing (pygments/tmux/coreutils)There is a script that get's sourced . This is the root of all evil. It's on the hacky side. The function is small and is (I believe) the only relevant part. I should stop using it, but it's sooooo_ ingrained into my muscle memory. To verify: Removing from makes everything work great with none of the above mentioned problems. One hack, that seems irrelevant is that uses debug trap directly, but also detects and uses the pre-exec infrastructure if it has been loaded (to not break iTerm2's shell integration). I appreciate the time and effort going into this feature. It's becoming a shockingly advanced embedded shell environment.
thanks again, planning on tackling this in June
I use just merged in a fix for this. It would be great if someone could help verify in tomorrow's insiders build as I'm not normally a user of bash-preexec.
Still some problems around . Very simple repro: clean environment. My bash and vscode versions are: use this .bashrc: For me (In WSL, repros in plain OSX): ! Without ! If extdebug works, then this would be the next simplest test (I think). Same clean environment. The following
Are there verif steps for this?
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
Code change:
__vsc_original_prompt_command=${PROMPT_COMMAND[@]} fi <del> if [[ -n "$__vsc_original_prompt_command" && "$__vsc_original_prompt_command" != "__vsc_prompt_cmd" ]]; then PROMPT_COMMAND=__vsc_prompt_cmd_original else PROMPT_COMMAND=__vsc_prompt_cmd </del> <ins> if [[ -z "${bash_preexec_imported:-}" ]]; then if [[ -n "$__vsc_original_prompt_command" && "$__vsc_original_prompt_command" != "__vsc_prompt_cmd" ]]; then PROMPT_COMMAND=__vsc_prompt_cmd_original else PROMPT_COMMAND=__vsc_prompt_cmd fi </ins> fi

Related discussion:
text: With the more complicated scenario, the decorations don't seem to show blue and red anymore. ! I realize that in the screenshot I forgot to add , but that didn't make a difference.
what is your exact debug trap when that happens?
Code change:
class Trait<T> implements ISpliceable<boolean>, IDisposable { <del> private length = 0; private indexes: number[] = []; private sortedIndexes: number[] = []; </del> <ins> protected indexes: number[] = []; protected sortedIndexes: number[] = []; </ins> private readonly _onChange = new Emitter<ITraitChangeEvent>(); readonly onChange: Event<ITraitChangeEvent> = this._onChange.event;

Related discussion:
text: Type: <bBug</bWhen pressing to collapse all nodes in a list view it leaves selection in such a state that you cannot expand nodes with until you do something to change the selection. ! I believe what's happening is is leaving the originally selected node selected. So after executing the command you end up with 2 selections, your original selection plus the last root node in the list. The original selection is the primary selection, and if it has no children does not have anything to expand and is a no-op. As a user it looks like you have the root node selected, which has children to expand, but pressing does nothing. Pressing then expands the list to reveal your original selection and you see that you unexpectedly have multiple selections. The current behavior of appears to be: Leave the originally selected node selected Add a second selection to the last root node in the list The expected behavior here is: Move selection to the root node of your currently selected node Ideally this also retains multiple selection: each selection is moved to the root node of that selection. VS Code version: Code - Insiders 1.76.0-insider (, 2023-02-10T16:22:19.445Z) OS version: WindowsNT x64 10.0. Modes: Sandboxed: Yes <details<summarySystem Info</summary </detailsExtensions: none<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
Looking at this again in the File Explorer it looks like the selection highlight is left on the where the original selection was despite the fact that the node is now in a different position. However, the "real" selection is still on the node. This means it looks like one thing is highlighted and pressing opens a different thing.
Just submitted a PR for this. Could you please review it?
What is the behavior supposed to be? Here's what I see: keyboard to focus a tree node that has a parent to collapse all moves to the whole tree and arrow down takes me to the first tree element. Right arrow does nothing.
The current behavior sort-of fixes the issue, insofar as is dodges it by doing something less desirable - moves selection to the whole tree. Imo, selection should remain on the root node(s) of whichever tree branch selection is currently in.
Code change:
class Trait<T> implements ISpliceable<boolean>, IDisposable { <del> private length = 0; private indexes: number[] = []; private sortedIndexes: number[] = []; </del> <ins> protected indexes: number[] = []; protected sortedIndexes: number[] = []; </ins> private readonly _onChange = new Emitter<ITraitChangeEvent>(); readonly onChange: Event<ITraitChangeEvent> = this._onChange.event;

Related discussion:
text: I think this is what the previous behavior was trying to do, it just had an issue with leaving selection in a bad state. A couple examples ([x] denotes current selection): Start state End state, after Stat state End state
I agree, feel free to send an issue for it. Your observations are the fixed state. Here's the entire story: Marking it as verified.
Code change:
class Trait<T> implements ISpliceable<boolean>, IDisposable { <del> private length = 0; private indexes: number[] = []; private sortedIndexes: number[] = []; </del> <ins> protected indexes: number[] = []; protected sortedIndexes: number[] = []; </ins> private readonly _onChange = new Emitter<ITraitChangeEvent>(); readonly onChange: Event<ITraitChangeEvent> = this._onChange.event;

Related discussion:
text: Testing focus on trusted URI list of items tab to navigate to the X to remove an item. Press to trigger removal nicely gets removed from the list, however focus is lost Focus should be preserved in the list on the neighbour item (example: checkout how Explorer does that when deleting a file). I thought this would be tackled via
The trust editor does a lot of full page re-rendering which I should improve (remove) so I doubt this is an issue with the table widget itself.
Code change:
@IUserDataSyncWorkbenchService private readonly userDataSyncWorkbenchService: IUserDataSyncWorkbenchService, @IUserDataSyncEnablementService private readonly userDataSyncEnablementService: IUserDataSyncEnablementService, @IWorkspaceTrustManagementService private readonly workspaceTrustManagementService: IWorkspaceTrustManagementService, <del> @IExtensionService private readonly extensionService: IExtensionService </del> <ins> @IExtensionService private readonly extensionService: IExtensionService, @ILanguageService private readonly languageService: ILanguageService </ins> ) { super(SettingsEditor2.ID, telemetryService, themeService, storageService); this.delayedFilterLogging = new Delayer<void>(1000);

Related discussion:
text: Testing Type in the settings editor. It would be nice if there was autocomplete for a list of languages. This is a finite list which we should be able to suggest fyi !
It's easier to discover language overrides in the editor because there is autocomplete there: !
Thanks to for pointing out the language service to me the other day. PR ready above.
/verified? The autocomplete works but no matter what I write there I get the same set of settings? I suppose all of these apply to all languages. ! !
Yep, the idea is for it to show all language-configurable settings. Then, the user can read and write settings for that language. I plan on making it so that the tab says which language you're on, for extra confirmation.
Code change:
name: result.variable.name, value: result.variable.value, type: result.variable.type, <ins> language: result.variable.language, expression: result.variable.expression, </ins> hasNamedChildren: result.hasNamedChildren, indexedChildrenCount: result.indexedChildrenCount, extensionId: obj.extensionId.value,

Related discussion:
text: similar to the 'open in data viewer' command from the jupyter variables view, we should allow extensions to contribute a view for a variables for specific language/types on the built in tree view.
That would essentially be number 6 in this screenshot from the Julia extension , right?
Same idea, either with an icon like that or through the context menu on that item. In the jupyter extension's case, we are planning to allow contributions for data viewers from extensions that didn't necessarily provide the variables.
Cool. I think icon and context menu would be great ;) It might also make sense to think a bit ahead there: there are probably some kind of viewers that are relevant for a lot of languages (tabular data, plots) and others that are very language specific. From our end, we would love it if VS Code at some point gained a generic tabular viewer, and a plot viewer that we could utilize and get rid of our custom implementations as well :) So maybe some kind of API design where in the future one could hook into a as of yet not existing generic tabular/plot viewer.
Example implementation here The menu contribution point name will likely change names when we expand the usage beyond notebooks, but any needed migration will be pretty straight forward.
I created a sample extension and cannot see any variables showing up. Do I need to enable something in VS Code for this feature to work. I couldn't find any settings/experiments that had to be enabled for this.
Found that I needed to enable a VS Code experiment (I was looking for Jupyter experiments). Not sure the API is useful in its current form. Currently when i create a viewer for DataFrames, lists, objects, anything I do not get the name of the variable. Hence I have no idea what I'm looking at, all I get is a value, and thats basically a stringified version of the value. Thus its not really possible to create any viewer, unless of course I'm missing something here.
Moving to March for now. Feel free to move back to February if the issue has been verified or once steps are provided and the issue is verifiable in the latest Insiders. Edit: I confirmed using the sample extension that the viewer does not report the variable name.
Code change:
name: result.variable.name, value: result.variable.value, type: result.variable.type, <ins> language: result.variable.language, expression: result.variable.expression, </ins> hasNamedChildren: result.hasNamedChildren, indexedChildrenCount: result.indexedChildrenCount, extensionId: obj.extensionId.value,

Related discussion:
text: verification: sure you have jupyter and python extensions enabled the notebook variable view the or create your own some notebook cells that create variables and open the debug sidebar to see the notebook variable view that the command contributed to the menu is provided information about the variable ( should be the expression that would access that variable)
Code change:
<link rel="stylesheet" href="${escapeAttribute(this.extensionResource('media', 'imagePreview.css'))}" type="text/css" media="screen" nonce="${nonce}"> <del> <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';"> </del> <ins> <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; connect-src ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';"> </ins> <meta id="image-preview-settings" data-settings="${escapeAttribute(JSON.stringify(settings))}"> </head> <del> <body class="container image scale-to-fit loading"> </del> <ins> <body class="container image scale-to-fit loading" data-vscode-context='{ "preventDefaultContextMenuItems": true }'> </ins> <div class="loading-indicator"></div> <div class="image-load-error"> <p>${vscode.l10n.t("An error occurred while loading the image.")}</p>

Related discussion:
text: <!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes/No <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: Version: 1.74.3 (on ) OS Version: Linux, Gnome, Chrome Steps to Reproduce: an image in the media-preview extension click on the image and select copy to paste the image somewhere Nothing happens. Also note that Cut and Paste make no sense here as menu items. I assume that these are just the default context menu options from - perhaps these should be removed entirely from the preview extension and we could manually implement copy?
Hey I would like to work on this issue.
assign this to me
Are these the correct steps to reproduce the issue? I'm unable to verify it on my mac. Can you provide more information? I previewed the image and then copied and pasted it. <img width="950" alt="image" src="https://user-"
I would like to wokr on this issue.
I would like to try solving this issue.
You right-click an image and select "copy", then you click a folder in VSCode's explorer and select "paste". The image should be pasted into that folder but it doesn't.
I would like to work on this issuse. here, I tried to copy and paste (Ctrl+v) it. But it doesn't work. https://user-
After a day of researching, I think I can explain why this issue happens.
Code change:
<link rel="stylesheet" href="${escapeAttribute(this.extensionResource('media', 'imagePreview.css'))}" type="text/css" media="screen" nonce="${nonce}"> <del> <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';"> </del> <ins> <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; connect-src ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';"> </ins> <meta id="image-preview-settings" data-settings="${escapeAttribute(JSON.stringify(settings))}"> </head> <del> <body class="container image scale-to-fit loading"> </del> <ins> <body class="container image scale-to-fit loading" data-vscode-context='{ "preventDefaultContextMenuItems": true }'> </ins> <div class="loading-indicator"></div> <div class="image-load-error"> <p>${vscode.l10n.t("An error occurred while loading the image.")}</p>

Related discussion:
text: Basically in the core webview module (see ), three default context menu actions (cut, copy and paste) are to the menu, which are accessible throughout all webviews, and happens to be one of them, so after you right-click anywhere in a image previewer, you will be able to see these three actions. After you clicks one of these actions, the editor will post an message to the image previewer, telling it to cut, copy or paste. If there is a correspondent listener for this perpose, the image will be actually cut, copied, pasted, but unfortunately there is no such listeners defined. This problem has existed for quite a bit of time. The original modification that cause this problem is from here . It is origianlly meant to allow users to copy selected text within an extension's README page. There is also a closed issue that describe such issue in . Personally I think providing action cut, copy and paste for all webviews is a little bit hasty, since there are not universally required for each webview, and even some of them need, the subject to be copied may vary from different webviews, or even different places in a same webview. I can solve it by disabling the default actions first (there is a option to achieve this), then let image previewer to implement its own copy and cut functionality, but I think this is rather a quick and sloppy solution. There should be another better way to solve this issue.
What about adding a handler :
Here's what I tried VSC insiders without any extensions Open a folder with a .png file Open the png file in vscode Right click and select Paste into folder in vscode = does not work Paste into markdown cell in vscode = does not work What am i doing wrong?
Pasting image data into folders isn't supported by VS Code. Pasting into a notebook cells works fine for me though. To verify though you can also paste into an external image editor