Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable default GitHub Copilot message in empty Jupyter notebook cells?

I use GitHub Copilot and GitHub Copilot Chat extensions in VSCode. Recently, in empty cells of Jupyter notebooks, the following message started appearing:

enter image description here

Press Ctrl+K I to ask GitHub Copilot Chat to do something. Start typing to dismiss.

I find it distracting and would like to disable it. How can I do that? Is there a dedicated option?


Update. The versions I currently use:

  • VSCode v1.81.1 (2023-11-06)
  • GitHub Copilot Chat v0.10.1 (Last updated 2023-11-06, 21:55:36);
  • GitHub Copilot v1.135.0 (Last updated 2023-11-08, 13:01:28);
like image 566
GegznaV Avatar asked Dec 21 '25 14:12

GegznaV


1 Answers

TL;DR

Use the workbench.editor.empty.hint setting.

Ordinarily, I'd vote to close this as a duplicate (of VSCode | New Window select language) for this reason, but I think there's some fun extra info that can be given for this particular question.

Listen to starball ramble

Ah ok. I needed to search differently: "start typing to dismiss." org:microsoft, which turns up VS Code's src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.ts in the _getHintInlineChat function (I.e. it's behaviour of VS Code and not of the GitHub Copilot extension in particular). At the time of this writing (VS Code 1.84), the line of code is:

let ariaLabel = `Ask ${providerName} something or start typing to dismiss.`;

See also the line in getDomNode() that goes "const { hintElement, ariaLabel } = !inlineChatProviders.length ? this._getHintDefault() : this._getHintInlineChat(inlineChatProviders);".

To disable the message, you could figure it out by guessing (or being familiar with VS Code settings), but let's do the fun way: there's a _shouldRenderHint function, and if you read it, you'll see it does const configValue = this.configurationService.getValue(emptyTextEditorHintSetting);, which is defined to workbench.editor.empty.hint. So there's your setting.

Because of how the code works, I'm pretty sure there's no way to make it be the non-inline-chat version without disabling all your inline chat providers. There is the inlineChat.lineEmptyHint, but I'm pretty sure that's something else.

As for why it differs slightly from what you show in your question post, you mention you're on VS Code 1.81. The file was originally located at src/vs/workbench/contrib/codeEditor/browser/untitledTextEditorHint/untitledTextEditorHint.ts, but interestingly, I don't see such a string template in there... I don't know.

like image 133
starball Avatar answered Dec 24 '25 02:12

starball



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!