dsh-github-copilot 0.4.0-alpha.23 → 0.4.0-alpha.25

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/client.js CHANGED
@@ -5366,6 +5366,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5366
5366
  return /* @__PURE__ */ _superRefine(fn, params);
5367
5367
  }
5368
5368
  //#endregion
5369
+ //#region lib/types/remote-codec.js
5370
+ /** Client-safe bridge between legacy schema codecs and alpha.2 create factories. */
5371
+ function strictRemoteCodec(typeSymbol, schema) {
5372
+ return {
5373
+ mode: "strict",
5374
+ typeSymbol,
5375
+ schema,
5376
+ create: () => schema
5377
+ };
5378
+ }
5379
+ //#endregion
5369
5380
  //#region lib/types/dual-model-remote.js
5370
5381
  const id = string().min(1).max(512);
5371
5382
  const revision = number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
@@ -5409,11 +5420,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5409
5420
  method: "view",
5410
5421
  invocation: { kind: "direct" },
5411
5422
  parameters: [],
5412
- result: {
5413
- mode: "strict",
5414
- typeSymbol: "dsh-github-copilot#DualModelView",
5415
- schema: DualModelViewSchema
5416
- }
5423
+ result: strictRemoteCodec("dsh-github-copilot#DualModelView", DualModelViewSchema)
5417
5424
  },
5418
5425
  {
5419
5426
  id: "dsh-github-copilot:githubCopilotDualModel.save",
@@ -5425,17 +5432,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5425
5432
  name: "input",
5426
5433
  wire: "input",
5427
5434
  source: "json",
5428
- codec: {
5429
- mode: "strict",
5430
- typeSymbol: "dsh-github-copilot#DualModelSaveRequest",
5431
- schema: DualModelSaveSchema
5432
- }
5435
+ codec: strictRemoteCodec("dsh-github-copilot#DualModelSaveRequest", DualModelSaveSchema)
5433
5436
  }],
5434
- result: {
5435
- mode: "strict",
5436
- typeSymbol: "dsh-github-copilot#DualModelView",
5437
- schema: DualModelViewSchema
5438
- }
5437
+ result: strictRemoteCodec("dsh-github-copilot#DualModelView", DualModelViewSchema)
5439
5438
  },
5440
5439
  {
5441
5440
  id: "dsh-github-copilot:githubCopilotDualModel.create",
@@ -5447,17 +5446,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5447
5446
  name: "input",
5448
5447
  wire: "input",
5449
5448
  source: "json",
5450
- codec: {
5451
- mode: "strict",
5452
- typeSymbol: "dsh-github-copilot#DualModelCreateRequest",
5453
- schema: DualModelCreateSchema
5454
- }
5449
+ codec: strictRemoteCodec("dsh-github-copilot#DualModelCreateRequest", DualModelCreateSchema)
5455
5450
  }],
5456
- result: {
5457
- mode: "strict",
5458
- typeSymbol: "dsh-github-copilot#DualModelCreateResult",
5459
- schema: DualModelCreateResultSchema
5460
- }
5451
+ result: strictRemoteCodec("dsh-github-copilot#DualModelCreateResult", DualModelCreateResultSchema)
5461
5452
  }
5462
5453
  ]
5463
5454
  };
@@ -5476,11 +5467,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5476
5467
  method: "providers",
5477
5468
  invocation: { kind: "direct" },
5478
5469
  parameters: [],
5479
- result: {
5480
- mode: "strict",
5481
- typeSymbol: "dsh-github-copilot#SearchProviderCatalog",
5482
- schema: SearchProviderCatalogSchema
5483
- }
5470
+ result: strictRemoteCodec("dsh-github-copilot#SearchProviderCatalog", SearchProviderCatalogSchema)
5484
5471
  }]
5485
5472
  };
5486
5473
  //#endregion
@@ -5560,11 +5547,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5560
5547
  }).strict().optional(),
5561
5548
  error: string().optional()
5562
5549
  }).strict();
5563
- const result = {
5564
- mode: "strict",
5565
- typeSymbol: GITHUB_COPILOT_AUTHORIZATION_VIEW_TYPE_SYMBOL,
5566
- schema: GitHubCopilotAuthorizationViewSchema
5567
- };
5550
+ const result = strictRemoteCodec(GITHUB_COPILOT_AUTHORIZATION_VIEW_TYPE_SYMBOL, GitHubCopilotAuthorizationViewSchema);
5568
5551
  const GITHUB_COPILOT_MIGRATION_STATUS_TYPE_SYMBOL = "dsh-github-copilot#GitHubCopilotMigrationStatus";
5569
5552
  const selectionSchema = object({
5570
5553
  provider: string().min(1).max(512),
@@ -5638,11 +5621,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5638
5621
  method: "migrationStatus",
5639
5622
  invocation: direct,
5640
5623
  parameters: [],
5641
- result: {
5642
- mode: "strict",
5643
- typeSymbol: GITHUB_COPILOT_MIGRATION_STATUS_TYPE_SYMBOL,
5644
- schema: GitHubCopilotMigrationStatusSchema
5645
- }
5624
+ result: strictRemoteCodec(GITHUB_COPILOT_MIGRATION_STATUS_TYPE_SYMBOL, GitHubCopilotMigrationStatusSchema)
5646
5625
  },
5647
5626
  ...contribution$2.descriptors,
5648
5627
  ...contribution$1.descriptors
@@ -7852,6 +7831,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7852
7831
  const searchUi = ctx.inject([
7853
7832
  "remote.githubCopilot",
7854
7833
  "remote.settings",
7834
+ "remote.githubCopilotSearchRouting",
7855
7835
  "slots"
7856
7836
  ], registerSearchUi);
7857
7837
  const dualModelUi = ctx.inject(["remote.githubCopilotDualModel", "slots"], registerDualModelUi);