dsh-github-copilot 0.4.0-alpha.118 → 0.4.0-alpha.119

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/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.118",
3001
+ version: "0.4.0-alpha.119",
3002
3002
  publishConfig: {
3003
3003
  "access": "public",
3004
3004
  "registry": "https://registry.npmjs.org/",
@@ -3948,10 +3948,25 @@ var CopilotAccountsHost = class {
3948
3948
  fenced = true;
3949
3949
  if (!(await this.membership()).some((row) => row.id === accountId && row.configured)) fail("COPILOT_ACCOUNTS_SELECTED_MISSING");
3950
3950
  const binding = this.capture(accountId);
3951
- const signal = AbortSignal.any([this.abort.signal, AbortSignal.timeout(6e4)]);
3952
- await this.identity(binding, signal);
3953
- const identityKey = this.identities.get(accountId)?.key;
3954
- await this.validateModels(binding, signal);
3951
+ const preflightAbort = new AbortController();
3952
+ const signal = AbortSignal.any([
3953
+ this.abort.signal,
3954
+ preflightAbort.signal,
3955
+ AbortSignal.timeout(6e4)
3956
+ ]);
3957
+ const identity = (async () => {
3958
+ await this.identity(binding, signal);
3959
+ return this.identities.get(accountId)?.key;
3960
+ })();
3961
+ const models = this.validateModels(binding, signal);
3962
+ let identityKey;
3963
+ try {
3964
+ [identityKey] = await Promise.all([identity, models]);
3965
+ } catch (error) {
3966
+ preflightAbort.abort(error);
3967
+ await Promise.allSettled([identity, models]);
3968
+ throw error;
3969
+ }
3955
3970
  await this.assertIdentityCurrent(binding, identityKey);
3956
3971
  binding.assertCurrent();
3957
3972
  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.118",
4
+ "version": "0.4.0-alpha.119",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "registry": "https://registry.npmjs.org/",