dsh-github-copilot 0.4.0-alpha.118 → 0.4.0-alpha.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +10 -6
- package/README.zh.md +9 -6
- package/deployment-baseline.json +7 -1
- package/docs/copilot-accounts.md +35 -0
- package/lib/client.js +54 -8
- package/lib/client.js.map +1 -1
- package/lib/index.js +22 -6
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2998,7 +2998,7 @@ function createAccountProvider(descriptors, guard, baseURL) {
|
|
|
2998
2998
|
var package_default = {
|
|
2999
2999
|
name: "dsh-github-copilot",
|
|
3000
3000
|
description: "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
|
|
3001
|
-
version: "0.4.0-alpha.
|
|
3001
|
+
version: "0.4.0-alpha.120",
|
|
3002
3002
|
publishConfig: {
|
|
3003
3003
|
"access": "public",
|
|
3004
3004
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -3589,7 +3589,8 @@ var CopilotAccountsHost = class {
|
|
|
3589
3589
|
binding.assertCurrent();
|
|
3590
3590
|
}
|
|
3591
3591
|
acquire(signal, requireManaged = true, accountId) {
|
|
3592
|
-
|
|
3592
|
+
const selectorOnly = this.operation === "switching" && accountId !== void 0;
|
|
3593
|
+
if (this.operation !== void 0 && !selectorOnly || this.ctx.get("authorization")?.describe(recordKey("canonical"))?.inFlight === true) fail("COPILOT_ACCOUNTS_BUSY");
|
|
3593
3594
|
if (signal?.aborted) fail("COPILOT_ACCOUNTS_CHANGED");
|
|
3594
3595
|
const binding = accountId === void 0 ? this.capture() : this.captureAccount(accountId);
|
|
3595
3596
|
if (requireManaged && binding.accountId !== "canonical") {
|
|
@@ -3948,10 +3949,25 @@ var CopilotAccountsHost = class {
|
|
|
3948
3949
|
fenced = true;
|
|
3949
3950
|
if (!(await this.membership()).some((row) => row.id === accountId && row.configured)) fail("COPILOT_ACCOUNTS_SELECTED_MISSING");
|
|
3950
3951
|
const binding = this.capture(accountId);
|
|
3951
|
-
const
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3952
|
+
const preflightAbort = new AbortController();
|
|
3953
|
+
const signal = AbortSignal.any([
|
|
3954
|
+
this.abort.signal,
|
|
3955
|
+
preflightAbort.signal,
|
|
3956
|
+
AbortSignal.timeout(6e4)
|
|
3957
|
+
]);
|
|
3958
|
+
const identity = (async () => {
|
|
3959
|
+
await this.identity(binding, signal);
|
|
3960
|
+
return this.identities.get(accountId)?.key;
|
|
3961
|
+
})();
|
|
3962
|
+
const models = this.validateModels(binding, signal);
|
|
3963
|
+
let identityKey;
|
|
3964
|
+
try {
|
|
3965
|
+
[identityKey] = await Promise.all([identity, models]);
|
|
3966
|
+
} catch (error) {
|
|
3967
|
+
preflightAbort.abort(error);
|
|
3968
|
+
await Promise.allSettled([identity, models]);
|
|
3969
|
+
throw error;
|
|
3970
|
+
}
|
|
3955
3971
|
await this.assertIdentityCurrent(binding, identityKey);
|
|
3956
3972
|
binding.assertCurrent();
|
|
3957
3973
|
const finalRoute = this.routeDiagnostic();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-github-copilot",
|
|
3
3
|
"description": "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
|
|
4
|
-
"version": "0.4.0-alpha.
|
|
4
|
+
"version": "0.4.0-alpha.120",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"registry": "https://registry.npmjs.org/",
|