Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate how to supported dedicated Copilot Environments (Org Tenants) #114

Open
TerminalFi opened this issue Jun 26, 2023 · 6 comments
Labels
question Asking usage questions

Comments

@TerminalFi
Copy link
Owner

At the Organization I work at, we are looking to use Copilot with a dedicated tenant. This begs the question, how can this be supported at the plugin level.

Will update here as I get more thoughts.

I am going to review the VS Code plugin and see if there is a missed setting for specifying tenant or how it may work

@TerminalFi TerminalFi added the question Asking usage questions label Jun 26, 2023
@TerminalFi
Copy link
Owner Author

Copilot has Advanced configurations. Here we can see that it checks the config setting of path advanced.authProvider

It looks for the value github-enterprise, if it matches it gets the value of uri else defaults to https://github.com

			61405: (e, t, n) => {
				"use strict";
				Object.defineProperty(t, "__esModule", { value: !0 }),
					(t.onDidChangeConfigurationHandler = t.VSCodeNetworkConfiguration =
						void 0);
				const r = n(89496),
					i = n(44197),
					o = n(42512),
					s = n(30047),
					a = "github-enterprise",
					c = "https://github.com";
				function l() {
					return r.workspace
						.getConfiguration(i.CopilotConfigPrefix)
						.get("advanced")?.authProvider === s.AuthProviderId.GitHubEnterprise
						? ra.workspace.getConfiguration(a).get("uri") ?? c
						: c;
				}

@timfjord
Copy link
Collaborator

I guess we could use the project settings(*sublime-project) for that

@TerminalFi
Copy link
Owner Author

I think we can have it at both locations. Main settings and project level settings. I am working to update this today as I start testing. I think it is pretty straight forward in that we only need these settings present and no other changes are required.

@raffeyang
Copy link

Any plan to release this update, reference VS Code. I think it's easy to add some config like:

 "github.copilot.advanced": {
    "authProvider": "github-enterprise",
},
"github-enterprise.uri": "",

@jfcherng
Copy link
Collaborator

Any plan to release this update, reference VS Code. I think it's easy to add some config like:

 "github.copilot.advanced": {
    "authProvider": "github-enterprise",
},
"github-enterprise.uri": "",

Feel free a create a PR if in your test, it's just to add a config to make it work.

@TerminalFi
Copy link
Owner Author

@raffeyang I've not fully tested but I believe this is already supported

Just add to your settings

{
	"command": [
		"${node_bin}",
		"${server_path}",
		"--stdio"
	],
	"schemes": [
		"file",
		"buffer",
		"res"
	],
	"settings": {
		"auto_ask_completions": true,
		"debug": false,
		"hook_to_auto_complete_command": false,
		"local_checks": false,
		"telemetry": false,
		"proxy": "",
		"completion_style": "popup",
		"github-enterprise": {
			"uri": "URI HERE"
		}
	},
	// ST4 configuration
	"selector": "source | text | embedding"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking usage questions
Projects
None yet
Development

No branches or pull requests

4 participants