TabNine icon indicating copy to clipboard operation
TabNine copied to clipboard

Don't open Tabnine welcome when extension is installed via settings sync

Open eamodio opened this issue 5 years ago • 4 comments

Currently, it Tabnine, seems to open a welcome url in the browser when installed. While this is fine for the initial install, it is not desirable when the extension is sync'd to other machines (especially Codespaces).

The extension could store some synchronized state (using the vscode apis), to ensure that the welcome experience is only shown once per "user".

eamodio avatar Feb 23 '21 22:02 eamodio

Thank you for your feedback,

We currently open the welcome page when there is no tabnine_config.json file exists (in the user preferences directory). It is the first complaint we heard about this matter, so we are not going to address it for the time being. If it's urgent for you, you are welcome to open a PR that fixes this behavior.

talcodota avatar Feb 24 '21 15:02 talcodota

@talcodota While I can certainly understand that -- I would just recommend looking into this sooner than later. Given more and more users are using VS Code with containers, remote boxes, and Codespaces, this issue with IMO quickly become a blocker for them. It caused me to disable the extension while I was working in Codespaces for a few days because every time I opened a new one, I got taken out of the Codespace browser tab to a new Tabnine Welcome tab (which is very disruptive).

While I'm largely asking about this for me (and your users), we on the VS Code team are also trying to encourage extensions to adopt the new sync mechanisms to improve the welcome experiences that extensions show to their users -- to keep them as a desired experience rather than undesired.

You can see an example of this in my GitLens extension:

https://github.com/eamodio/vscode-gitlens/blob/e27da912e1adaa2617a209c81872079b60417879/src/extension.ts#L191-L198

There I setup some data storage keys to be synchronized, so that I can read them (in the standard way) on the other machines and avoid the welcome and other experiences.

Thanks for your consideration.

eamodio avatar Feb 25 '21 22:02 eamodio

I think it is a good idea to add this feature, I agree with @eamodio, the number of developers using VS Code with containers is increasing day by day. In the meantime, and while TabNine doesn't solve this problem, you can add this to your .devcontainer/devcontainer.json file. It is more like a monkey patch, but it is better than nothing.

"postCreateCommand": "mkdir -p $HOME/.config/TabNine && touch $HOME/.config/TabNine/tabnine_config.json"

juanlb avatar Nov 24 '21 11:11 juanlb

I came across the same issue but i didn't just want to create an empty file. I also wanted to have my model linked into my containers. I had to do some tricks with mounting the directories and creating symlinks so that other stuff did not break. Here are the relevant parts of my devcontainer.json

{
	"name": "xxx",
	"extensions": [
		"TabNine.tabnine-vscode"
	],
	// mounts for using TabNine in Devcointainer
	"mounts": [
		"source=${localEnv:HOME}/.config/TabNine/,target=/home/vscode/tabnineConfig/,type=bind,consistency=cached",
		"source=${localEnv:HOME}/.local/share/TabNine/,target=/home/vscode/tabnineApp/,type=bind,consistency=cached"
	],
	"onCreateCommand": "mkdir -p /home/vscode/.config/TabNine && mkdir -p /home/vscode/.local/share/TabNine",
	"postCreateCommand": "ln -s /home/vscode/tabnineConfig/* /home/vscode/.config/TabNine/ && ln -s /home/vscode/tabnineApp/* /home/vscode/.local/share/TabNine/",
	"remoteUser": "vscode"
}

This gives me the same experience like working locally and it does not open the welcome page.

LindezaGrey avatar Jan 12 '22 21:01 LindezaGrey

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 03 '22 09:10 stale[bot]