dsh-github-copilot 0.4.0-alpha.125 → 0.4.0-alpha.127

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
@@ -356,6 +356,110 @@ window.__ModuleLoader__.load({
356
356
  }
357
357
  };
358
358
  }
359
+ //#endregion
360
+ //#region lib/types/native-settings-style.js
361
+ const nativeSettingsStyle = {
362
+ fontFamily: "var(--dsw-font-family, system-ui)",
363
+ fontSize: 14,
364
+ lineHeight: "22px",
365
+ fontWeight: 400,
366
+ color: "var(--dsw-alias-label-primary, CanvasText)",
367
+ minWidth: 0,
368
+ colorScheme: "inherit"
369
+ };
370
+ const nativeHeadingStyle = {
371
+ margin: 0,
372
+ fontSize: 14,
373
+ lineHeight: "22px",
374
+ fontWeight: 500
375
+ };
376
+ const nativeCaptionStyle = {
377
+ fontSize: 12,
378
+ lineHeight: "18px",
379
+ color: "var(--dsw-alias-label-secondary, GrayText)"
380
+ };
381
+ const nativeButtonStyle = {
382
+ appearance: "none",
383
+ boxSizing: "border-box",
384
+ display: "inline-flex",
385
+ alignItems: "center",
386
+ justifyContent: "center",
387
+ gap: 4,
388
+ justifySelf: "start",
389
+ fontFamily: "var(--dsw-font-family, system-ui)",
390
+ fontSize: 14,
391
+ lineHeight: "22px",
392
+ fontWeight: 400,
393
+ minHeight: 36,
394
+ padding: "0 14px",
395
+ maxWidth: "100%",
396
+ whiteSpace: "normal",
397
+ overflowWrap: "anywhere",
398
+ cursor: "pointer",
399
+ color: "var(--dsw-alias-label-primary, CanvasText)",
400
+ background: "transparent",
401
+ border: "0.5px solid var(--dsw-alias-border-l3, ButtonBorder)",
402
+ borderRadius: "var(--dsw-radius-md, 12px)",
403
+ colorScheme: "inherit"
404
+ };
405
+ const nativeCompactButtonStyle = {
406
+ ...nativeButtonStyle,
407
+ fontSize: 12,
408
+ lineHeight: "18px",
409
+ minHeight: 28,
410
+ padding: "0 10px",
411
+ borderRadius: "var(--dsw-radius-sm, 8px)"
412
+ };
413
+ const nativeInputStyle = {
414
+ fontFamily: "var(--dsw-font-family, system-ui)",
415
+ fontSize: 14,
416
+ lineHeight: "22px",
417
+ fontWeight: 400,
418
+ minHeight: 32,
419
+ padding: "0 10px",
420
+ boxSizing: "border-box",
421
+ minWidth: 0,
422
+ border: "0.5px solid var(--dsw-alias-border-l4, ButtonBorder)",
423
+ borderRadius: "var(--dsw-radius-md, 12px)",
424
+ colorScheme: "inherit",
425
+ background: "var(--dsw-alias-bg-layer-1, Canvas)",
426
+ color: "var(--dsw-alias-label-primary, CanvasText)"
427
+ };
428
+ const nativeCardStyle = {
429
+ ...nativeSettingsStyle,
430
+ padding: "12px 14px",
431
+ border: "0.5px solid var(--dsw-alias-settings-card-stroke, ButtonBorder)",
432
+ borderRadius: "var(--dsw-radius-xl, 20px)",
433
+ background: "var(--dsw-alias-settings-card-fill, Canvas)"
434
+ };
435
+ const nativeSettingsCss = `
436
+ [data-copilot-native-ui] :is(h3, strong, th) { font-weight: 500; }
437
+ [data-copilot-native-ui] button:not(:disabled):hover {
438
+ background: var(--dsw-alias-interactive-bg-hover, var(--dsw-specific-settings-secondary-hover-solid, ButtonFace));
439
+ }
440
+ [data-copilot-native-ui] :is(button, input, select, textarea, summary, a):focus-visible {
441
+ outline: 2px solid var(--dsw-focus-ring-color, Highlight); outline-offset: 2px;
442
+ }
443
+ [data-copilot-native-ui] :is(button, input, select, textarea):disabled { opacity: 0.4; cursor: not-allowed; }
444
+ [data-copilot-native-ui] summary {
445
+ width: fit-content; max-width: 100%; padding: 2px 4px; margin-left: -4px;
446
+ border-radius: var(--dsw-radius-sm, 8px); cursor: pointer;
447
+ font-size: 12px; line-height: 18px; font-weight: 500;
448
+ color: var(--dsw-alias-label-secondary, GrayText); list-style: none;
449
+ }
450
+ [data-copilot-native-ui] summary::-webkit-details-marker { display: none; }
451
+ [data-copilot-native-ui] summary::before {
452
+ content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 8px;
453
+ border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
454
+ transform: rotate(-45deg); transition: transform 120ms ease;
455
+ }
456
+ [data-copilot-native-ui] details[open] > summary::before,
457
+ [data-copilot-native-ui][open] > summary::before { transform: rotate(45deg); }
458
+ [data-copilot-native-ui] summary:hover { background: var(--dsw-alias-interactive-bg-hover, ButtonFace); }
459
+ @media (prefers-reduced-motion: reduce) {
460
+ [data-copilot-native-ui] summary::before { transition: none; }
461
+ }
462
+ `;
359
463
  //#endregion
360
464
  //#region node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
361
465
  function getEnumValues(entries) {
@@ -6884,7 +6988,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6884
6988
  };
6885
6989
  //#endregion
6886
6990
  //#region package.json
6887
- var version = "0.4.0-alpha.125";
6991
+ var version = "0.4.0-alpha.127";
6888
6992
  //#endregion
6889
6993
  //#region lib/types/diagnostics-client.js
6890
6994
  let owner;
@@ -7055,23 +7159,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7055
7159
  //#endregion
7056
7160
  //#region lib/types/diagnostics-card.js
7057
7161
  const section = {
7162
+ ...nativeSettingsStyle,
7058
7163
  marginTop: 24,
7059
- paddingTop: 18,
7164
+ paddingTop: 12,
7060
7165
  borderTop: "1px solid color-mix(in srgb, currentColor 20%, transparent)",
7061
7166
  display: "grid",
7062
7167
  gap: 12,
7063
7168
  minWidth: 0
7064
7169
  };
7065
- const button$3 = {
7066
- font: "inherit",
7067
- color: "inherit",
7068
- cursor: "pointer",
7069
- padding: "8px 12px",
7070
- minHeight: 44,
7071
- borderRadius: 8,
7072
- border: "1px solid color-mix(in srgb, currentColor 30%, transparent)",
7073
- background: "color-mix(in srgb, currentColor 6%, transparent)"
7074
- };
7170
+ const button$3 = nativeButtonStyle;
7075
7171
  function DiagnosticsCard({ remote }) {
7076
7172
  const [view, setView] = (0, react.useState)();
7077
7173
  const [busy, setBusy] = (0, react.useState)(false);
@@ -7131,8 +7227,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7131
7227
  }, label);
7132
7228
  return (0, react.createElement)("section", {
7133
7229
  "aria-label": "Local diagnostics",
7230
+ "data-copilot-native-ui": true,
7134
7231
  style: section
7135
- }, (0, react.createElement)("h3", { style: { margin: 0 } }, "Local diagnostics"), (0, react.createElement)("p", { style: {
7232
+ }, (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("h3", { style: nativeHeadingStyle }, "Local diagnostics"), (0, react.createElement)("p", { style: {
7136
7233
  margin: 0,
7137
7234
  lineHeight: 1.5,
7138
7235
  maxWidth: "70ch"
@@ -7201,8 +7298,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7201
7298
  "unknown"
7202
7299
  ], population))))))) : null, view && !populations.length ? (0, react.createElement)("p", null, "No retained operation observations. This is not evidence of zero failures.") : null, view ? (0, react.createElement)("p", { style: {
7203
7300
  margin: 0,
7204
- fontSize: 13,
7205
- lineHeight: 1.5
7301
+ fontSize: 12,
7302
+ lineHeight: "18px"
7206
7303
  } }, `Host pending: ${view.snapshot.pending.reduce((sum, row) => sum + row.count, 0)}. Host dropped: ${view.snapshot.dropped}; Client dropped: ${view.snapshot.clientDropped}; Client unconfirmed: ${view.snapshot.clientUnconfirmed}; evicted/expired: ${view.snapshot.evicted}; saturated: ${view.snapshot.saturated}. Retention: 14 days, at most 4,096 aggregate rows and 2 MiB. Client pending samples are periodic observations, not a live outstanding count. Other settled includes policy rejection, revocation, environment faults and unknown/no-checkpoint results; JSON preserves each category. Stock/custom-engine physical summaries, native recovery opt-out, OAuth, quota and unwrapped RPCs are not covered.`) : null, view ? (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Review aggregate-only JSON"), (0, react.createElement)("p", null, "Review before sharing. This includes build versions, hour windows and fixed diagnostic counts, never account or Session identifiers."), control("Prepare current JSON", () => setExported(true)), exported ? (0, react.createElement)("textarea", {
7207
7304
  "aria-label": "Local diagnostics aggregate JSON",
7208
7305
  readOnly: true,
@@ -8565,14 +8662,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8565
8662
  color: "var(--dsw-alias-label-secondary, GrayText)"
8566
8663
  };
8567
8664
  const selectStyle = {
8665
+ ...nativeInputStyle,
8568
8666
  ...optionStyle,
8569
8667
  width: "100%",
8570
8668
  minWidth: 0,
8571
- boxSizing: "border-box",
8572
- padding: "9px 11px",
8573
- borderRadius: "9px",
8574
- border: "1px solid var(--dsw-alias-border-l2, ButtonBorder)",
8575
- font: "inherit"
8669
+ boxSizing: "border-box"
8576
8670
  };
8577
8671
  const disabledSelectStyle = {
8578
8672
  ...selectStyle,
@@ -8591,20 +8685,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8591
8685
  const GITHUB_COPILOT_SEARCH_PROVIDER = "github-copilot-hosted";
8592
8686
  const DEEPSEEK_SEARCH_PROVIDER = "deepseek-official";
8593
8687
  const cardStyle = {
8688
+ ...nativeCardStyle,
8594
8689
  display: "grid",
8595
- gap: "14px",
8596
- padding: "18px",
8597
- marginTop: "16px",
8598
- minWidth: 0,
8599
- border: "1px solid color-mix(in srgb, currentColor 20%, transparent)",
8600
- borderRadius: "14px",
8601
- background: "color-mix(in srgb, currentColor 4%, transparent)"
8690
+ gap: "12px",
8691
+ marginTop: "16px"
8602
8692
  };
8603
8693
  const restartBannerStyle = {
8604
8694
  padding: "12px 14px",
8605
- borderRadius: "10px",
8606
- fontSize: "13px",
8607
- lineHeight: 1.5,
8695
+ borderRadius: "var(--dsw-radius-md, 12px)",
8696
+ fontSize: "12px",
8697
+ lineHeight: "18px",
8608
8698
  border: "1px solid color-mix(in srgb, var(--dsw-alias-color-warning, #e3a300) 40%, transparent)",
8609
8699
  background: "color-mix(in srgb, var(--dsw-alias-color-warning, #e3a300) 12%, transparent)",
8610
8700
  display: "grid",
@@ -8626,16 +8716,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8626
8716
  gap: "8px",
8627
8717
  flexWrap: "wrap"
8628
8718
  };
8629
- const buttonStyle = {
8630
- justifySelf: "start",
8631
- padding: "9px 16px",
8632
- borderRadius: "999px",
8633
- cursor: "pointer",
8634
- border: "1px solid color-mix(in srgb, currentColor 30%, transparent)",
8635
- background: "color-mix(in srgb, currentColor 10%, transparent)",
8636
- color: "inherit",
8637
- font: "inherit"
8638
- };
8719
+ const buttonStyle = nativeButtonStyle;
8639
8720
  const hintStyle = {
8640
8721
  opacity: .8,
8641
8722
  fontSize: "12px",
@@ -8834,11 +8915,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8834
8915
  };
8835
8916
  return (0, react.createElement)("details", {
8836
8917
  "data-dsh-copilot-search-options": true,
8918
+ "data-copilot-native-ui": true,
8837
8919
  style: cardStyle
8838
- }, (0, react.createElement)("summary", { style: {
8839
- cursor: "pointer",
8840
- fontWeight: 600
8841
- } }, "Copilot hosted-search options"), (0, react.createElement)("p", { style: hintStyle }, "These settings affect Copilot only. Disabling capability verification explicitly trusts the provider protocol. The allowlist restricts routes; it does not choose a search model."), ...[
8920
+ }, (0, react.createElement)("summary", null, "Copilot hosted-search options"), (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("p", { style: hintStyle }, "These settings affect Copilot only. Disabling capability verification explicitly trusts the provider protocol. The allowlist restricts routes; it does not choose a search model."), ...[
8842
8921
  ["enabled", "Enable Copilot hosted search"],
8843
8922
  ["routeWebSearch", "Route web search through this plugin"],
8844
8923
  ["includeSources", "Include citations in inline requests"],
@@ -9142,26 +9221,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9142
9221
  return (0, react.createElement)("section", {
9143
9222
  style: cardStyle,
9144
9223
  "data-dsh-web-search-routing": true,
9224
+ "data-copilot-native-ui": true,
9145
9225
  "aria-busy": loading || saving !== void 0
9146
- }, (0, react.createElement)("div", {
9226
+ }, (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("div", {
9147
9227
  role: "note",
9148
9228
  style: lifecycleNoticeStyle,
9149
9229
  "data-dsh-web-search-lifecycle-notice": true
9150
- }, (0, react.createElement)("strong", { style: { fontWeight: 600 } }, "Desktop 0.2.0-rc.2 lifecycle note / Desktop 0.2.0-rc.2 生命周期提示"), (0, react.createElement)("span", { style: { opacity: .85 } }, "After disabling, removing, or upgrading this plugin, fully exit and restart Desktop to complete Web service recomposition. If the native manager shows only pending entries waiting for a service and this plugin is Off, restart instead of toggling it repeatedly. / 停用、移除或升级本插件后,请完全退出并重新启动 Desktop,以完成 Web 服务重编排。若原生管理器仅显示等待某项服务的 pending 条目且本插件已为 Off,请直接重启,不要反复切换。")), restartRequired ? (0, react.createElement)("div", {
9230
+ }, (0, react.createElement)("strong", { style: { fontWeight: 500 } }, "Desktop 0.2.0-rc.2 lifecycle note / Desktop 0.2.0-rc.2 生命周期提示"), (0, react.createElement)("span", { style: { opacity: .85 } }, "After disabling, removing, or upgrading this plugin, fully exit and restart Desktop to complete Web service recomposition. If the native manager shows only pending entries waiting for a service and this plugin is Off, restart instead of toggling it repeatedly. / 停用、移除或升级本插件后,请完全退出并重新启动 Desktop,以完成 Web 服务重编排。若原生管理器仅显示等待某项服务的 pending 条目且本插件已为 Off,请直接重启,不要反复切换。")), restartRequired ? (0, react.createElement)("div", {
9151
9231
  role: "alert",
9152
9232
  style: restartBannerStyle,
9153
9233
  "data-dsh-web-search-restart-banner": true
9154
- }, (0, react.createElement)("strong", { style: { fontWeight: 600 } }, "Restart required to complete update / 检测到更新,请重启 Desktop 完成生效"), (0, react.createElement)("span", { style: { opacity: .85 } }, "Web search service composition requires a full application restart to rebind components. / Web 搜索服务组件更新需退出并重新启动 Desktop 以完成重编排。")) : null, (0, react.createElement)("div", null, (0, react.createElement)("h3", { style: {
9155
- margin: 0,
9156
- fontSize: "16px"
9157
- } }, "Web search"), (0, react.createElement)("p", { style: {
9158
- margin: "5px 0 0",
9159
- opacity: .8,
9160
- fontSize: "13px",
9161
- lineHeight: 1.5
9234
+ }, (0, react.createElement)("strong", { style: { fontWeight: 500 } }, "Restart required to complete update / 检测到更新,请重启 Desktop 完成生效"), (0, react.createElement)("span", { style: { opacity: .85 } }, "Web search service composition requires a full application restart to rebind components. / Web 搜索服务组件更新需退出并重新启动 Desktop 以完成重编排。")) : null, (0, react.createElement)("div", null, (0, react.createElement)("h3", { style: nativeHeadingStyle }, "Web search"), (0, react.createElement)("p", { style: {
9235
+ margin: "4px 0 0",
9236
+ color: "var(--dsw-alias-label-secondary, GrayText)",
9237
+ fontSize: "14px",
9238
+ lineHeight: "22px"
9162
9239
  } }, "Choose who runs web searches. This does not change your Chat model.")), (0, react.createElement)("label", { style: fieldStyle }, (0, react.createElement)("span", { style: {
9163
- fontSize: "13px",
9164
- fontWeight: 600
9240
+ ...nativeCaptionStyle,
9241
+ fontWeight: 500
9165
9242
  } }, "Search provider"), (0, react.createElement)("select", {
9166
9243
  style: nativeSelectStyle(disabled),
9167
9244
  disabled,
@@ -9182,8 +9259,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9182
9259
  value: "none",
9183
9260
  style: nativeOptionStyle()
9184
9261
  }, "Disabled — saved configuration") : null, ...providerOptions(), unavailableOption(draft.primary, primaryKnown)), (0, react.createElement)("span", { style: hintStyle }, "Auto follows the Chat provider when it supports search. A selected provider stays fixed when you switch Chat models.")), (0, react.createElement)("label", { style: fieldStyle }, (0, react.createElement)("span", { style: {
9185
- fontSize: "13px",
9186
- fontWeight: 600
9262
+ ...nativeCaptionStyle,
9263
+ fontWeight: 500
9187
9264
  } }, "Fallback provider"), (0, react.createElement)("select", {
9188
9265
  style: nativeSelectStyle(disabled),
9189
9266
  disabled,
@@ -9206,10 +9283,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9206
9283
  }, "No search providers are registered. Enable a search provider, then reload settings.") : null, catalogReady && missingProvider ? (0, react.createElement)("p", {
9207
9284
  role: "status",
9208
9285
  style: hintStyle
9209
- }, "A saved provider is no longer registered. Choose an available entry; it has not been replaced automatically.") : null, draft.legacy && catalogReady ? (0, react.createElement)("p", { style: hintStyle }, "Saving adopts the selected fallback for new searches. Cancellation and account-proof invalidation never trigger fallback.") : null, usesCopilot ? (0, react.createElement)("p", { style: hintStyle }, "Copilot handles search model selection. No model setup is needed here. A signed-in account and a model with verified search support are required when searching.") : null, usesCopilot && override.model ? (0, react.createElement)("details", { "data-dsh-copilot-search-override": true }, (0, react.createElement)("summary", { style: {
9210
- cursor: "pointer",
9211
- fontSize: "13px"
9212
- } }, "Existing Copilot model override"), (0, react.createElement)("div", { style: {
9286
+ }, "A saved provider is no longer registered. Choose an available entry; it has not been replaced automatically.") : null, draft.legacy && catalogReady ? (0, react.createElement)("p", { style: hintStyle }, "Saving adopts the selected fallback for new searches. Cancellation and account-proof invalidation never trigger fallback.") : null, usesCopilot ? (0, react.createElement)("p", { style: hintStyle }, "Copilot handles search model selection. No model setup is needed here. A signed-in account and a model with verified search support are required when searching.") : null, usesCopilot && override.model ? (0, react.createElement)("details", { "data-dsh-copilot-search-override": true }, (0, react.createElement)("summary", null, "Existing Copilot model override"), (0, react.createElement)("div", { style: {
9213
9287
  ...fieldStyle,
9214
9288
  marginTop: "8px"
9215
9289
  } }, (0, react.createElement)("p", { style: hintStyle }, "Your saved override ", (0, react.createElement)("code", null, override.model), " is preserved. Saving providers does not change it."), (0, react.createElement)("button", {
@@ -9255,15 +9329,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9255
9329
  //#endregion
9256
9330
  //#region lib/types/parent-model-follow-card.js
9257
9331
  const ns = "github-copilot";
9258
- const button$2 = {
9259
- font: "inherit",
9260
- color: "inherit",
9261
- background: "transparent",
9262
- padding: "8px 14px",
9263
- border: "1px solid currentColor",
9264
- borderRadius: "6px",
9265
- minHeight: "40px"
9266
- };
9332
+ const button$2 = nativeButtonStyle;
9267
9333
  async function readParentFollowSettings(settings) {
9268
9334
  const result = await settings.describe();
9269
9335
  if (!result.ok) throw new Error("Could not load subagent settings. Reload to retry.");
@@ -9378,18 +9444,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9378
9444
  };
9379
9445
  return (0, react.createElement)("section", {
9380
9446
  "data-dsh-parent-model-follow": true,
9447
+ "data-copilot-native-ui": true,
9381
9448
  "aria-busy": busy,
9382
9449
  style: {
9383
- padding: "18px",
9450
+ ...nativeSettingsStyle,
9451
+ padding: "12px 14px",
9384
9452
  marginTop: "16px",
9385
9453
  display: "grid",
9386
- gap: "14px",
9387
- minWidth: 0
9454
+ gap: "12px"
9388
9455
  }
9389
- }, (0, react.createElement)("h3", { style: {
9390
- margin: 0,
9391
- fontSize: "16px"
9392
- } }, "Subagent models"), (0, react.createElement)("label", { style: {
9456
+ }, (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("h3", { style: nativeHeadingStyle }, "Subagent models"), (0, react.createElement)("label", { style: {
9393
9457
  display: "flex",
9394
9458
  gap: "12px",
9395
9459
  alignItems: "center",
@@ -9407,15 +9471,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9407
9471
  }), (0, react.createElement)("strong", null, "Follow parent model")), (0, react.createElement)("div", {
9408
9472
  id: descriptionId,
9409
9473
  style: {
9410
- fontSize: "13px",
9411
- lineHeight: 1.6,
9474
+ fontSize: "14px",
9475
+ lineHeight: "22px",
9412
9476
  maxWidth: "70ch"
9413
9477
  }
9414
9478
  }, (0, react.createElement)("p", { style: { margin: 0 } }, "Apply to existing and new supported Copilot subagents and Team mates."), (0, react.createElement)("p", { style: { margin: "6px 0 0" } }, "Fixed parent: follow its model next turn. Auto parent: each child chooses using its own context."), (0, react.createElement)("p", { style: { margin: "6px 0 0" } }, "Running turns stay unchanged. Replaces creation-time model choices; a child’s own manual selection still wins.")), saved?.legacy ? (0, react.createElement)("p", {
9415
9479
  role: "note",
9416
9480
  style: {
9417
9481
  margin: 0,
9418
- fontSize: "13px"
9482
+ fontSize: "12px",
9483
+ lineHeight: "18px"
9419
9484
  }
9420
9485
  }, "Existing per-child bindings remain active even when this switch is off. They have not been changed.") : null, (0, react.createElement)("div", { style: {
9421
9486
  display: "flex",
@@ -9448,8 +9513,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9448
9513
  "aria-atomic": true,
9449
9514
  style: {
9450
9515
  margin: 0,
9451
- fontSize: "13px",
9452
- lineHeight: 1.6
9516
+ fontSize: "12px",
9517
+ lineHeight: "18px"
9453
9518
  }
9454
9519
  }, message || (busy ? "Loading subagent settings…" : "")));
9455
9520
  }
@@ -9508,17 +9573,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9508
9573
  }, [props.open, trigger]);
9509
9574
  return (0, react.createElement)("div", {
9510
9575
  "data-copilot-account-dropdown": "",
9576
+ "data-copilot-native-ui": true,
9511
9577
  style: {
9578
+ ...nativeSettingsStyle,
9512
9579
  position: "relative",
9513
- minWidth: 0,
9514
9580
  flexShrink: 0
9515
9581
  }
9516
- }, (0, react.createElement)("style", null, `
9582
+ }, (0, react.createElement)("style", null, nativeSettingsCss + `
9517
9583
  [data-copilot-account-dropdown] > button::after { content: ' ▾'; padding-left: 6px; font-size: 11px }
9518
9584
  [data-copilot-dropdown-option]::before { content: ''; width: 16px; flex-shrink: 0 }
9519
9585
  [data-copilot-dropdown-option][aria-pressed=true]::before { content: '✓' }
9520
9586
  [data-copilot-dropdown-option]:hover { background: var(--dsw-alias-bg-layer-2, ButtonFace) !important }
9521
- [data-copilot-account-dropdown] button:focus-visible { outline: 2px solid var(--dsw-alias-label-primary, CanvasText); outline-offset: -2px }
9522
9587
  `), (0, react.createElement)("button", {
9523
9588
  ref: trigger,
9524
9589
  type: "button",
@@ -9540,6 +9605,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9540
9605
  "aria-busy": props.busy,
9541
9606
  "data-copilot-account-selector": "",
9542
9607
  style: {
9608
+ ...nativeSettingsStyle,
9543
9609
  position: "fixed",
9544
9610
  inset: "auto",
9545
9611
  margin: 0,
@@ -9555,7 +9621,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9555
9621
  background: "linear-gradient(var(--dsw-specific-menu, Canvas), var(--dsw-specific-menu, Canvas)), Canvas",
9556
9622
  color: "var(--dsw-alias-label-primary, CanvasText)",
9557
9623
  colorScheme: "inherit",
9558
- font: "inherit",
9559
9624
  boxShadow: "0 10px 28px rgb(0 0 0 / 24%)"
9560
9625
  },
9561
9626
  onKeyDown: (event) => {
@@ -9710,23 +9775,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9710
9775
  const account = view?.accounts.find((item) => item.id === view.activeAccountId);
9711
9776
  return account?.configured === true && account.identityState === "ready" && account.identity !== void 0 ? `@${account.identity.login}` : void 0;
9712
9777
  }
9713
- const secondary$1 = "var(--dsw-alias-label-secondary, GrayText)";
9714
9778
  const border$1 = "1px solid var(--dsw-alias-border-main, color-mix(in srgb, currentColor 20%, transparent))";
9715
- const button$1 = {
9716
- font: "inherit",
9717
- color: "inherit",
9718
- background: "transparent",
9719
- border: border$1,
9720
- borderRadius: 8,
9721
- padding: "6px 10px",
9722
- minHeight: 32,
9723
- cursor: "pointer",
9724
- colorScheme: "inherit"
9725
- };
9779
+ const button$1 = nativeCompactButtonStyle;
9726
9780
  const muted$1 = {
9727
- color: secondary$1,
9728
- fontSize: 13,
9729
- lineHeight: 1.5,
9781
+ ...nativeCaptionStyle,
9730
9782
  margin: "6px 0"
9731
9783
  };
9732
9784
  const accountCopy = {
@@ -10159,12 +10211,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10159
10211
  });
10160
10212
  return (0, react.createElement)("div", {
10161
10213
  "data-copilot-accounts": "",
10214
+ "data-copilot-native-ui": true,
10162
10215
  "aria-busy": pending,
10163
10216
  style: {
10164
- minWidth: 0,
10217
+ ...nativeSettingsStyle,
10165
10218
  overflowWrap: "anywhere"
10166
10219
  }
10167
- }, !props.expanded ? (0, react.createElement)("p", {
10220
+ }, props.expanded ? (0, react.createElement)("style", null, nativeSettingsCss) : null, !props.expanded ? (0, react.createElement)("p", {
10168
10221
  style: muted$1,
10169
10222
  role: "status",
10170
10223
  "aria-live": "polite",
@@ -10178,10 +10231,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10178
10231
  gap: 10,
10179
10232
  marginBlock: 12
10180
10233
  }
10181
- }, props.addOnly ? null : (0, react.createElement)("h3", { style: {
10182
- margin: 0,
10183
- fontSize: 16
10184
- } }, text.accounts), props.addOnly ? null : (0, react.createElement)("p", { style: muted$1 }, text.scope), props.addOnly || !identityChecking ? null : (0, react.createElement)("p", {
10234
+ }, props.addOnly ? null : (0, react.createElement)("h3", { style: nativeHeadingStyle }, text.accounts), props.addOnly ? null : (0, react.createElement)("p", { style: muted$1 }, text.scope), props.addOnly || !identityChecking ? null : (0, react.createElement)("p", {
10185
10235
  role: "status",
10186
10236
  "aria-live": "polite",
10187
10237
  "data-copilot-identity-checking": true,
@@ -10224,10 +10274,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10224
10274
  flexWrap: "wrap",
10225
10275
  alignItems: "center",
10226
10276
  gap: 8
10227
- } }, (0, react.createElement)("span", { style: {
10228
- color: secondary$1,
10229
- fontSize: 13
10230
- } }, text.codeLabel), (0, react.createElement)("code", {
10277
+ } }, (0, react.createElement)("span", { style: nativeCaptionStyle }, text.codeLabel), (0, react.createElement)("code", {
10231
10278
  "data-copilot-account-device-code": "",
10232
10279
  style: {
10233
10280
  userSelect: "all",
@@ -10250,10 +10297,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10250
10297
  gap: 8
10251
10298
  } }, control(cancelRequested ? text.cancelling : authorizationIntent === "reauthorize" ? text.cancelReauthorize : text.cancelAdd, cancelAuthorization, busy || cancelRequested)) : null), view?.diagnostic === void 0 ? null : (0, react.createElement)("details", {
10252
10299
  "data-copilot-account-diagnostic": "",
10253
- style: {
10254
- color: secondary$1,
10255
- fontSize: 13
10256
- }
10300
+ style: nativeCaptionStyle
10257
10301
  }, (0, react.createElement)("summary", { style: { cursor: "pointer" } }, text.technicalDetails), (0, react.createElement)("code", { style: { overflowWrap: "anywhere" } }, view.diagnostic)), props.addOnly && !authorizationOperation ? control(text.add, () => {
10258
10302
  if (props.remote !== void 0) startAdd();
10259
10303
  }, pending || view?.writable !== true || view?.switchable !== true) : null, props.addOnly && (failed || !pending && view?.switchable === false) ? control(text.retry, () => {
@@ -10447,28 +10491,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10447
10491
  };
10448
10492
  const secondary = "var(--dsw-alias-label-secondary, GrayText)";
10449
10493
  const border = "1px solid var(--dsw-alias-border-main, color-mix(in srgb, currentColor 20%, transparent))";
10450
- const button = {
10451
- font: "inherit",
10452
- color: "inherit",
10453
- cursor: "pointer",
10454
- border,
10455
- borderRadius: 8,
10456
- background: "var(--dsw-alias-bg-layer-1, Canvas)",
10457
- padding: "5px 9px",
10458
- colorScheme: "inherit"
10459
- };
10460
- const formStyles = `
10494
+ const button = nativeCompactButtonStyle;
10495
+ const formStyles = nativeSettingsCss + `
10461
10496
  [data-copilot-usage-panel] :is(input, select, textarea, button) { color-scheme: inherit; }
10462
10497
  [data-copilot-usage-panel] option { background: Canvas; color: CanvasText; }
10463
- [data-copilot-usage-panel] :is(input, select, textarea, button, a, summary):focus-visible {
10464
- outline: 2px solid Highlight; outline-offset: 2px;
10465
- }
10466
- [data-copilot-usage-panel] :is(input, select, textarea, button):disabled { opacity: 0.65; }
10467
10498
  `;
10468
10499
  const muted = {
10469
10500
  color: secondary,
10470
10501
  fontSize: 12,
10471
- lineHeight: 1.5,
10502
+ lineHeight: "18px",
10472
10503
  margin: 0
10473
10504
  };
10474
10505
  const row = {
@@ -10907,8 +10938,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10907
10938
  "aria-describedby": `${id}-scope`,
10908
10939
  popover: "manual",
10909
10940
  "data-copilot-usage-panel": "",
10941
+ "data-copilot-native-ui": true,
10910
10942
  style: {
10911
- colorScheme: "light dark",
10943
+ ...nativeSettingsStyle,
10912
10944
  position: "fixed",
10913
10945
  inset: "auto",
10914
10946
  margin: 0,
@@ -10926,8 +10958,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10926
10958
  borderRadius: 14,
10927
10959
  color: "var(--dsw-alias-label-primary, CanvasText)",
10928
10960
  background: "linear-gradient(var(--dsw-specific-menu, Canvas), var(--dsw-specific-menu, Canvas)), Canvas",
10929
- fontFamily: "var(--dsw-font-family, inherit)",
10930
- fontSize: 13,
10931
10961
  boxShadow: "0 8px 32px rgb(0 0 0 / 24%)",
10932
10962
  overflowWrap: "anywhere"
10933
10963
  }
@@ -11107,6 +11137,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11107
11137
  borderRadius: "var(--dsw-radius-md, 8px)",
11108
11138
  background: "var(--dsw-alias-interactive-bg-hover, transparent)"
11109
11139
  };
11140
+ const composerNoticeQuietButtonStyle = {
11141
+ fontFamily: "inherit",
11142
+ fontSize: "inherit",
11143
+ fontWeight: "inherit",
11144
+ lineHeight: "inherit",
11145
+ color: "inherit",
11146
+ background: "transparent",
11147
+ border: 0,
11148
+ padding: "6px 10px",
11149
+ cursor: "pointer",
11150
+ maxWidth: "100%"
11151
+ };
11110
11152
  const composerNoticeParagraphStyle = {
11111
11153
  marginBlock: 8,
11112
11154
  maxWidth: "38rem"
@@ -11126,20 +11168,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11126
11168
  };
11127
11169
  //#endregion
11128
11170
  //#region lib/types/session-continuation-ui.js
11129
- const control = {
11130
- font: "inherit",
11131
- color: "var(--dsw-alias-label-primary, CanvasText)",
11132
- background: "var(--dsw-alias-bg-layer-1, Canvas)",
11133
- colorScheme: "inherit",
11134
- border: "1px solid var(--dsw-alias-border-main, GrayText)",
11135
- borderRadius: 6,
11136
- padding: "6px 10px"
11137
- };
11138
- const paragraph = {
11139
- color: "var(--dsw-alias-label-secondary, GrayText)",
11140
- fontSize: 13,
11141
- lineHeight: 1.5
11142
- };
11171
+ const control = nativeCompactButtonStyle;
11172
+ const paragraph = nativeCaptionStyle;
11143
11173
  function SessionContinuationCard({ sessionId, remote, locale = "en", running = false, onEnabledChange, expanded = false, recovery = false, onCancel }) {
11144
11174
  const zh = locale.startsWith("zh");
11145
11175
  const body = recovery ? composerNoticeParagraphStyle : paragraph;
@@ -11231,8 +11261,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11231
11261
  return (0, react.createElement)("details", {
11232
11262
  open: expanded || void 0,
11233
11263
  "data-copilot-continuation-settings": "",
11234
- style: { fontSize: 13 }
11235
- }, (0, react.createElement)("summary", { style: { cursor: "pointer" } }, zh ? "降级续聊" : "Visible-history continuation", " · ", !view ? zh ? "状态待确认" : "Unknown" : view.enabled ? zh ? "开启" : "On" : view.nextTurnAuthorized ? zh ? "仅下一轮" : "Next turn only" : zh ? "关闭" : "Off"), loss, (0, react.createElement)("label", { style: {
11264
+ "data-copilot-native-ui": true,
11265
+ style: nativeSettingsStyle
11266
+ }, (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("summary", { style: { cursor: "pointer" } }, zh ? "降级续聊" : "Visible-history continuation", " · ", !view ? zh ? "状态待确认" : "Unknown" : view.enabled ? zh ? "开启" : "On" : view.nextTurnAuthorized ? zh ? "仅下一轮" : "Next turn only" : zh ? "关闭" : "Off"), loss, (0, react.createElement)("label", { style: {
11236
11267
  display: "flex",
11237
11268
  gap: 8,
11238
11269
  alignItems: "center",
@@ -11312,7 +11343,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11312
11343
  if (generation === lifetime.current) setBusy(false);
11313
11344
  }
11314
11345
  };
11315
- return (0, react.createElement)("details", null, (0, react.createElement)("summary", null, zh ? "新 Session 降级默认" : "New Session continuation default"), (0, react.createElement)("label", null, (0, react.createElement)("input", {
11346
+ return (0, react.createElement)("details", {
11347
+ "data-copilot-native-ui": true,
11348
+ style: nativeSettingsStyle
11349
+ }, (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("summary", null, zh ? "新 Session 降级默认" : "New Session continuation default"), (0, react.createElement)("label", null, (0, react.createElement)("input", {
11316
11350
  type: "checkbox",
11317
11351
  checked: view?.enabled ?? false,
11318
11352
  disabled: busy || !view,
@@ -11827,36 +11861,105 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11827
11861
  }
11828
11862
  //#endregion
11829
11863
  //#region lib/types/compaction-continuation-ui.js
11830
- function CompactionContinuationNotice({ sessionId, remote, lifecycle, locale = "en" }) {
11864
+ const successLifetimeMs = 8e3;
11865
+ /** Presentation only, retained across incidental mounts by the Client slot registration. */
11866
+ var CompactionNoticePresentation = class {
11867
+ entries = /* @__PURE__ */ new Map();
11868
+ listeners = /* @__PURE__ */ new Set();
11869
+ version = 0;
11870
+ subscribe = (listener) => {
11871
+ this.listeners.add(listener);
11872
+ return () => {
11873
+ this.listeners.delete(listener);
11874
+ };
11875
+ };
11876
+ snapshot = () => this.version;
11877
+ key(sessionId, id, state) {
11878
+ return JSON.stringify([
11879
+ sessionId,
11880
+ id,
11881
+ state
11882
+ ]);
11883
+ }
11884
+ remember(key, entry) {
11885
+ this.entries.set(key, entry);
11886
+ while (this.entries.size > 128) this.entries.delete(this.entries.keys().next().value);
11887
+ }
11888
+ observe(sessionId, id, state) {
11889
+ const key = this.key(sessionId, id, state);
11890
+ if (state === "completed" && !this.entries.has(key)) this.remember(key, {
11891
+ dismissed: false,
11892
+ expiresAt: Date.now() + successLifetimeMs
11893
+ });
11894
+ }
11895
+ remaining(sessionId, id) {
11896
+ const expiresAt = this.entries.get(this.key(sessionId, id, "completed"))?.expiresAt;
11897
+ return expiresAt === void 0 ? void 0 : Math.max(0, expiresAt - Date.now());
11898
+ }
11899
+ visible(sessionId, id, state) {
11900
+ if (state === "running") return true;
11901
+ const entry = this.entries.get(this.key(sessionId, id, state));
11902
+ return !entry?.dismissed && (entry?.expiresAt === void 0 || entry.expiresAt > Date.now());
11903
+ }
11904
+ dismiss(sessionId, id, state) {
11905
+ if (state === "running") return;
11906
+ const key = this.key(sessionId, id, state);
11907
+ this.remember(key, {
11908
+ ...this.entries.get(key),
11909
+ dismissed: true
11910
+ });
11911
+ this.version++;
11912
+ for (const listener of this.listeners) listener();
11913
+ }
11914
+ dispose() {
11915
+ this.entries.clear();
11916
+ this.listeners.clear();
11917
+ }
11918
+ };
11919
+ function CompactionContinuationNotice({ sessionId, remote, lifecycle, locale = "en", presentation: sharedPresentation }) {
11920
+ const [localPresentation] = (0, react.useState)(() => new CompactionNoticePresentation());
11921
+ const presentation = sharedPresentation ?? localPresentation;
11922
+ const version = (0, react.useSyncExternalStore)(presentation.subscribe, presentation.snapshot, presentation.snapshot);
11923
+ const [, refresh] = (0, react.useState)(0);
11831
11924
  const parsed = CompactionContinuationLifecycleSchema.safeParse(lifecycle);
11832
11925
  const id = parsed.success ? parsed.data.id : null;
11833
11926
  const running = parsed.success && parsed.data.running;
11834
- const [status, setStatus] = (0, react.useState)();
11835
- const [error, setError] = (0, react.useState)(false);
11836
- const [dismissed, setDismissed] = (0, react.useState)();
11927
+ const [result, setResult] = (0, react.useState)();
11928
+ const currentResult = result?.sessionId === sessionId && result.id === id && result.remote === remote && result.running === running ? result : void 0;
11929
+ const status = currentResult?.status;
11930
+ const error = currentResult?.error === true;
11931
+ const state = error ? "unavailable" : status?.state;
11932
+ (0, react.useEffect)(() => () => localPresentation.dispose(), [localPresentation]);
11837
11933
  (0, react.useEffect)(() => {
11838
11934
  let current = true;
11839
11935
  let timer;
11840
- setStatus(void 0);
11841
- setError(false);
11842
- if (!id || !remote) return;
11936
+ setResult(void 0);
11937
+ if (!id) return;
11938
+ const publish = (status, error) => {
11939
+ if (!current) return;
11940
+ if (status) presentation.observe(sessionId, id, status.state);
11941
+ setResult({
11942
+ sessionId,
11943
+ id,
11944
+ running,
11945
+ remote,
11946
+ status,
11947
+ error
11948
+ });
11949
+ };
11950
+ if (!remote) {
11951
+ publish(void 0, true);
11952
+ return;
11953
+ }
11843
11954
  const read = async () => {
11844
11955
  try {
11845
11956
  const result = await remote.get(sessionId);
11846
11957
  const view = result.ok ? SessionContinuationViewSchema.safeParse(result.value) : void 0;
11847
11958
  if (!current) return;
11848
- if (!view?.success) {
11849
- setError(true);
11850
- setStatus(void 0);
11851
- } else {
11852
- setError(false);
11853
- setStatus(view.data.compaction?.id === id ? view.data.compaction : void 0);
11854
- }
11959
+ if (!view?.success) publish(void 0, true);
11960
+ else publish(view.data.compaction?.id === id ? view.data.compaction : void 0, false);
11855
11961
  } catch {
11856
- if (current) {
11857
- setError(true);
11858
- setStatus(void 0);
11859
- }
11962
+ publish(void 0, true);
11860
11963
  } finally {
11861
11964
  if (current && running) timer = setTimeout(() => void read(), 1e3);
11862
11965
  }
@@ -11870,11 +11973,35 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11870
11973
  sessionId,
11871
11974
  remote,
11872
11975
  id,
11873
- running
11976
+ running,
11977
+ presentation
11978
+ ]);
11979
+ (0, react.useEffect)(() => {
11980
+ if (!id || state !== "completed" || running || !presentation.visible(sessionId, id, state)) return;
11981
+ const remaining = presentation.remaining(sessionId, id);
11982
+ if (remaining === void 0) return;
11983
+ const timer = setTimeout(() => refresh((value) => value + 1), remaining);
11984
+ return () => clearTimeout(timer);
11985
+ }, [
11986
+ sessionId,
11987
+ id,
11988
+ state,
11989
+ running,
11990
+ presentation,
11991
+ version
11874
11992
  ]);
11875
11993
  const zh = locale.startsWith("zh");
11876
- if (!status && !error) return null;
11877
- if (status?.state === "blocked") return dismissed === status.id ? null : (0, react.createElement)("section", {
11994
+ if (!id || !state || !running && !presentation.visible(sessionId, id, state)) return null;
11995
+ const dismiss = () => {
11996
+ if (!running) presentation.dismiss(sessionId, id, state);
11997
+ };
11998
+ const close = !running && state !== "running" ? (0, react.createElement)("button", {
11999
+ type: "button",
12000
+ style: composerNoticeQuietButtonStyle,
12001
+ onClick: dismiss,
12002
+ "aria-label": zh ? "关闭压缩提示" : "Close compaction notice"
12003
+ }, zh ? "关闭" : "Close") : null;
12004
+ if (status?.state === "blocked") return (0, react.createElement)("section", {
11878
12005
  "data-copilot-composer-notice": "compaction-continuation",
11879
12006
  style: composerNoticeSurfaceStyle
11880
12007
  }, (0, react.createElement)("p", {
@@ -11885,15 +12012,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11885
12012
  remote,
11886
12013
  locale,
11887
12014
  recovery: true,
11888
- onCancel: () => setDismissed(status.id)
11889
- }));
12015
+ running,
12016
+ onCancel: dismiss
12017
+ }), close);
11890
12018
  const text = error ? zh ? "无法确认压缩降级状态;请查看原生压缩结果。" : "Compaction recovery status is unavailable; check the native compaction result." : status?.state === "running" ? zh ? "正在使用可见历史降级压缩,隐藏推理上下文可能丢失。" : "Compacting with visible history; hidden reasoning context may be lost." : status?.state === "completed" ? zh ? "可见历史压缩已提交;隐藏推理上下文未带入摘要。" : "Visible-history compaction committed; hidden reasoning context was omitted from the summary." : status?.state === "cancelled" ? zh ? "可见历史压缩已取消;未确认提交恢复摘要。" : "Visible-history compaction cancelled; no recovery summary commit is confirmed." : zh ? "可见历史压缩失败;Session 尚未恢复。请查看原生失败原因。" : "Visible-history compaction failed; the Session is not recovered. Check the native failure.";
11891
12019
  return (0, react.createElement)("section", {
11892
12020
  "data-copilot-composer-notice": "compaction-continuation",
11893
12021
  role: error || status?.state === "failed" ? "alert" : "status",
11894
12022
  "aria-live": "polite",
11895
12023
  style: composerNoticeSurfaceStyle
11896
- }, (0, react.createElement)("p", { style: composerNoticeParagraphStyle }, text));
12024
+ }, (0, react.createElement)("p", { style: composerNoticeParagraphStyle }, text), close);
11897
12025
  }
11898
12026
  //#endregion
11899
12027
  //#region lib/types/replay-recovery-ui.js
@@ -12028,7 +12156,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12028
12156
  function isRuntime(value) {
12029
12157
  return record(value) && typeof value.sessionId === "string" && value.sessionId !== "" && typeof value.useSession === "function" && typeof value.useProjection === "function";
12030
12158
  }
12031
- function Surface({ runtime, remote, continuation, locale }) {
12159
+ function Surface({ runtime, remote, continuation, locale, presentation }) {
12032
12160
  const valid = runtime.useSession((value) => record(value) && value.sessionId === runtime.sessionId && value.removed === false && value.openState === "open");
12033
12161
  const selected = runtime.useProjection("modelSelection");
12034
12162
  const compaction = runtime.useProjection(COMPACTION_CONTINUATION);
@@ -12040,7 +12168,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12040
12168
  sessionId: runtime.sessionId,
12041
12169
  remote: continuation,
12042
12170
  lifecycle: compaction,
12043
- locale: language
12171
+ locale: language,
12172
+ presentation
12044
12173
  }), (0, react.createElement)(ReplayRecoveryCard, {
12045
12174
  key: JSON.stringify([runtime.sessionId, selected.next.model]),
12046
12175
  sessionId: runtime.sessionId,
@@ -12058,11 +12187,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12058
12187
  return noop;
12059
12188
  }
12060
12189
  const slots = candidate;
12190
+ const presentation = new CompactionNoticePresentation();
12061
12191
  let faces;
12062
12192
  const language = ctx.get("locale");
12063
12193
  const locale = isLocale(language) ? language : void 0;
12064
12194
  const name = "conversation.input.dock";
12065
- return slots.inject(name, () => {
12195
+ const remove = slots.inject(name, () => {
12066
12196
  const spec = slots.spec(name);
12067
12197
  if (spec?.kind !== "list" || spec.scope !== "session") {
12068
12198
  ctx.logger.warn("COPILOT_REPLAY_RECOVERY_SLOT_UNAVAILABLE");
@@ -12086,24 +12216,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12086
12216
  runtime: props,
12087
12217
  remote,
12088
12218
  continuation,
12089
- locale
12219
+ locale,
12220
+ presentation
12090
12221
  });
12091
12222
  });
12092
12223
  });
12224
+ return () => {
12225
+ remove();
12226
+ presentation.dispose();
12227
+ };
12093
12228
  }
12094
12229
  //#endregion
12095
12230
  //#region lib/types/model-preferences-card.js
12096
- const controlStyle = {
12097
- color: "inherit",
12098
- background: "transparent",
12099
- font: "inherit",
12100
- fontSize: "14px",
12101
- border: "1px solid var(--dsw-alias-border-main, ButtonBorder)",
12102
- colorScheme: "inherit",
12103
- borderRadius: "8px",
12104
- padding: "7px 12px",
12105
- minHeight: "36px"
12106
- };
12231
+ const controlStyle = nativeCompactButtonStyle;
12107
12232
  const MAX_QUEUED_EDITS = 32;
12108
12233
  function preferenceMessage(code) {
12109
12234
  switch (code) {
@@ -12291,7 +12416,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12291
12416
  }
12292
12417
  await completed;
12293
12418
  };
12294
- return (0, react.createElement)("details", { "data-dsh-github-copilot-model-preferences": true }, (0, react.createElement)("summary", null, settingsKnown ? `Model preferences · ${visibleCount} enabled · ${excluded.size} excluded` : "Model preferences · Read-only"), (0, react.createElement)("p", { style: {
12419
+ return (0, react.createElement)("details", {
12420
+ "data-dsh-github-copilot-model-preferences": true,
12421
+ "data-copilot-native-ui": true,
12422
+ style: nativeSettingsStyle
12423
+ }, (0, react.createElement)("style", null, nativeSettingsCss), (0, react.createElement)("summary", null, settingsKnown ? `Model preferences · ${visibleCount} enabled · ${excluded.size} excluded` : "Model preferences · Read-only"), (0, react.createElement)("p", { style: {
12295
12424
  fontSize: "14px",
12296
12425
  marginBlock: "12px"
12297
12426
  } }, "Exclusions are shared across GitHub Copilot accounts; availability below reflects the current account. Newly discovered models are enabled by default. Unavailable saved exclusions are retained and apply again if that model returns. Excluded models disappear from the managed picker and cannot start a new turn, including Auto. An admitted turn keeps its model. Fixed selections are not changed; select another model before the next turn. Restoring a model does not select it."), (0, react.createElement)("p", { style: {
@@ -12313,13 +12442,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12313
12442
  }, busyModel === "" ? "Reading settings…" : "Retry"))), (0, react.createElement)("label", { style: {
12314
12443
  display: "grid",
12315
12444
  gap: "6px",
12316
- fontSize: "14px"
12445
+ fontSize: "12px",
12446
+ lineHeight: "18px"
12317
12447
  } }, "Search models", (0, react.createElement)("input", {
12318
12448
  type: "search",
12319
12449
  value: query,
12320
12450
  style: {
12321
- ...controlStyle,
12322
- fontSize: "16px",
12451
+ ...nativeInputStyle,
12323
12452
  width: "100%",
12324
12453
  boxSizing: "border-box",
12325
12454
  minWidth: 0,
@@ -12352,8 +12481,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12352
12481
  onClick: () => setFilter(value),
12353
12482
  style: {
12354
12483
  ...controlStyle,
12355
- fontWeight: filter === value ? 600 : 400,
12356
- background: filter === value ? "color-mix(in srgb, currentColor 12%, transparent)" : "transparent"
12484
+ fontWeight: filter === value ? 500 : 400,
12485
+ background: filter === value ? "var(--dsw-alias-interactive-bg-hover, ButtonFace)" : "transparent"
12357
12486
  }
12358
12487
  }, value === "all" ? `All (${rows.length})` : value === "enabled" ? `Enabled (${settingsKnown ? visibleCount : "?"})` : value === "excluded" ? `Excluded (${settingsKnown ? excluded.size : "?"})` : value === "available" ? `Available (${availabilityKnown ? available.length : "?"})` : `Unavailable (${availabilityKnown ? unavailableCount : "?"})`))), filtered.length === 0 ? (0, react.createElement)("p", { role: "status" }, rows.length === 0 ? "No account models to display. Use Refresh models to read account metadata." : "No models match this filter or search.") : (0, react.createElement)("ul", {
12359
12488
  "aria-label": "Account models",
@@ -12376,11 +12505,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12376
12505
  borderBottom: "1px solid color-mix(in srgb, currentColor 18%, transparent)"
12377
12506
  }
12378
12507
  }, (0, react.createElement)("span", { style: {
12379
- flex: 1,
12508
+ flex: "1 1 240px",
12380
12509
  minWidth: 0,
12381
12510
  overflowWrap: "anywhere",
12382
12511
  fontSize: "14px"
12383
- } }, (0, react.createElement)("strong", null, model.name), (0, react.createElement)("br"), (0, react.createElement)("code", null, model.id), (0, react.createElement)("span", null, ` · ${!availabilityKnown ? "Current account availability unconfirmed" : model.available ? "Available on current account" : "Currently unavailable on current account; saved preferences retained"}`), (0, react.createElement)("span", null, ` · ${!settingsKnown ? "Exclusion status unknown" : isExcluded ? "Excluded" : "Enabled"}`), errorModel === model.id && error !== void 0 ? (0, react.createElement)("span", {
12512
+ } }, (0, react.createElement)("strong", null, model.name), (0, react.createElement)("br"), (0, react.createElement)("code", { style: nativeCaptionStyle }, model.id), (0, react.createElement)("span", { style: nativeCaptionStyle }, ` · ${!availabilityKnown ? "Current account availability unconfirmed" : model.available ? "Available on current account" : "Currently unavailable on current account; saved preferences retained"}`), (0, react.createElement)("span", { style: nativeCaptionStyle }, ` · ${!settingsKnown ? "Exclusion status unknown" : isExcluded ? "Excluded" : "Enabled"}`), errorModel === model.id && error !== void 0 ? (0, react.createElement)("span", {
12384
12513
  role: "status",
12385
12514
  style: {
12386
12515
  display: "block",
@@ -12974,21 +13103,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12974
13103
  "data-dsh-github-copilot-discovery-error": true
12975
13104
  }, error), snapshot === void 0 ? null : (0, react.createElement)(GitHubCopilotAccountModelsSummary, { snapshot }));
12976
13105
  }
12977
- const compactButtonStyle = {
12978
- appearance: "none",
12979
- border: "1px solid color-mix(in srgb, currentColor 24%, transparent)",
12980
- borderRadius: "999px",
12981
- background: "transparent",
12982
- color: "inherit",
12983
- fontFamily: "inherit",
12984
- fontSize: "13px",
12985
- lineHeight: "18px",
12986
- padding: "6px 12px",
12987
- minHeight: "32px",
12988
- maxWidth: "100%",
12989
- cursor: "pointer"
12990
- };
12991
- const modelsControlCss = `
13106
+ const compactButtonStyle = nativeCompactButtonStyle;
13107
+ const modelsControlCss = nativeSettingsCss + `
12992
13108
  [data-dsh-github-copilot-compact-account] :is(input, select, button) {
12993
13109
  color-scheme: inherit;
12994
13110
  }
@@ -13000,10 +13116,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13000
13116
  background: Canvas;
13001
13117
  color: CanvasText;
13002
13118
  }
13003
- [data-dsh-github-copilot-compact-account] :is(input, select, button, summary, a):focus-visible {
13004
- outline: 2px solid Highlight;
13005
- outline-offset: 2px;
13006
- }
13007
13119
  [data-dsh-github-copilot-compact-account] :is(input, select, button):disabled {
13008
13120
  color: var(--dsw-alias-label-secondary, GrayText);
13009
13121
  cursor: not-allowed;
@@ -13062,7 +13174,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13062
13174
  const accountSettings = (0, react.createElement)("div", { style: {
13063
13175
  display: "grid",
13064
13176
  gap: 8
13065
- } }, routeStatusMessage(view) === void 0 ? null : (0, react.createElement)("p", { role: "status" }, routeStatusMessage(view)), view?.route?.state === "needs-repair" && signedIn ? actionButton("Repair model configuration", account.reconcile, pendingAction) : null, signedIn ? actionButton(state.operation === "signOut" ? "Signing out…" : "Sign out", account.signOut, pendingAction || view?.writable === false) : null, view?.writable === false ? (0, react.createElement)("p", { style: { fontSize: "13px" } }, "Credentials are read-only in this profile.") : null);
13177
+ } }, routeStatusMessage(view) === void 0 ? null : (0, react.createElement)("p", { role: "status" }, routeStatusMessage(view)), view?.route?.state === "needs-repair" && signedIn ? actionButton("Repair model configuration", account.reconcile, pendingAction) : null, signedIn ? actionButton(state.operation === "signOut" ? "Signing out…" : "Sign out", account.signOut, pendingAction || view?.writable === false) : null, view?.writable === false ? (0, react.createElement)("p", { style: nativeCaptionStyle }, "Credentials are read-only in this profile.") : null);
13066
13178
  const continuationSettings = props.continuationSettings ?? (0, react.createElement)(ContinuationDefaultCard, {
13067
13179
  remote: props.continuationRemote,
13068
13180
  locale: props.locale,
@@ -13070,51 +13182,36 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13070
13182
  });
13071
13183
  return (0, react.createElement)("section", {
13072
13184
  "data-dsh-github-copilot-compact-account": true,
13185
+ "data-copilot-native-ui": true,
13073
13186
  "data-dsh-github-copilot-embedded": props.embedded === true ? true : void 0,
13074
13187
  "aria-label": props.embedded === true ? "GitHub Copilot account" : void 0,
13075
13188
  style: props.embedded === true ? {
13076
- minWidth: 0,
13077
- marginTop: "8px",
13078
- colorScheme: "light dark"
13189
+ ...nativeSettingsStyle,
13190
+ marginTop: "8px"
13079
13191
  } : {
13080
- minWidth: 0,
13081
- padding: "12px 14px",
13082
- margin: "12px 0",
13083
- borderRadius: "16px",
13084
- border: "1px solid color-mix(in srgb, currentColor 24%, transparent)",
13085
- background: "transparent",
13086
- colorScheme: "light dark"
13192
+ ...nativeCardStyle,
13193
+ margin: "12px 0"
13087
13194
  }
13088
13195
  }, (0, react.createElement)("style", null, modelsControlCss), (0, react.createElement)("div", { style: {
13089
13196
  display: "flex",
13090
13197
  alignItems: "center",
13091
13198
  flexWrap: "wrap",
13092
- gap: "10px",
13093
- minHeight: "42px"
13199
+ gap: "8px",
13200
+ minHeight: "28px"
13094
13201
  } }, (0, react.createElement)("div", { style: {
13095
13202
  display: "flex",
13096
13203
  alignItems: "baseline",
13097
13204
  flexWrap: "wrap",
13098
13205
  gap: "8px",
13099
13206
  minWidth: 0
13100
- } }, props.embedded === true ? null : (0, react.createElement)("h3", { style: {
13101
- margin: 0,
13102
- fontSize: "16px",
13103
- lineHeight: "24px"
13104
- } }, "GitHub Copilot"), (0, react.createElement)("span", {
13207
+ } }, props.embedded === true ? null : (0, react.createElement)("h3", { style: nativeHeadingStyle }, "GitHub Copilot"), (0, react.createElement)("span", {
13105
13208
  role: "status",
13106
13209
  "aria-live": "polite",
13107
- style: {
13108
- fontSize: "13px",
13109
- opacity: .75
13110
- }
13210
+ style: nativeCaptionStyle
13111
13211
  }, status), modelStatus === void 0 ? null : (0, react.createElement)("span", {
13112
13212
  role: "status",
13113
13213
  "aria-live": "polite",
13114
- style: {
13115
- fontSize: "12px",
13116
- opacity: .7
13117
- }
13214
+ style: nativeCaptionStyle
13118
13215
  }, modelStatus), signedIn ? (0, react.createElement)(GitHubCopilotAccountModelsUpdatedAt, { discoveredAt: models?.discoveredAt }) : null), (0, react.createElement)("div", { style: {
13119
13216
  display: "flex",
13120
13217
  flexWrap: "wrap",
@@ -13129,8 +13226,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13129
13226
  role: "alert",
13130
13227
  "data-dsh-github-copilot-account-error": state.error,
13131
13228
  style: {
13229
+ ...nativeCaptionStyle,
13132
13230
  margin: "8px 0 0",
13133
- fontSize: "13px",
13134
13231
  overflowWrap: "anywhere"
13135
13232
  }
13136
13233
  }, compactErrorMessage(state.error, view?.authorizationMilestone)), authorizing ? (0, react.createElement)("div", {
@@ -13169,27 +13266,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13169
13266
  locale: props.locale,
13170
13267
  accountSettings,
13171
13268
  continuationSettings
13172
- }), manageOpen && props.accountsRemote === void 0 ? (0, react.createElement)("section", { "aria-label": "Account management" }, (0, react.createElement)("h3", { style: {
13173
- margin: 0,
13174
- fontSize: 16
13175
- } }, "Account management"), accountSettings, continuationSettings) : null, manageOpen ? (0, react.createElement)("section", {
13269
+ }), manageOpen && props.accountsRemote === void 0 ? (0, react.createElement)("section", { "aria-label": "Account management" }, (0, react.createElement)("h3", { style: nativeHeadingStyle }, "Account management"), accountSettings, continuationSettings) : null, manageOpen ? (0, react.createElement)("section", {
13176
13270
  "data-dsh-github-copilot-model-management": true,
13177
13271
  "aria-label": "Model preferences",
13178
13272
  style: {
13179
13273
  display: "grid",
13180
- gap: 10,
13181
- marginTop: 18,
13182
- paddingTop: 16,
13274
+ gap: 12,
13275
+ marginTop: 16,
13276
+ paddingTop: 12,
13183
13277
  borderTop: "1px solid color-mix(in srgb, currentColor 18%, transparent)"
13184
13278
  }
13185
- }, (0, react.createElement)("h3", { style: {
13186
- margin: 0,
13187
- fontSize: 16
13188
- } }, "Model preferences"), signedIn ? (0, react.createElement)(GitHubCopilotModelPreferencesPanel, {
13279
+ }, (0, react.createElement)("h3", { style: nativeHeadingStyle }, "Model preferences"), signedIn ? (0, react.createElement)(GitHubCopilotModelPreferencesPanel, {
13189
13280
  remote: props.remote,
13190
13281
  models,
13191
13282
  preferences: view?.modelPreferences
13192
- }) : (0, react.createElement)("p", { role: "status" }, "Sign in to manage model preferences."), (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Discovery details"), (0, react.createElement)("p", { style: { fontSize: "13px" } }, "Signing in here fetches your account models once. Opening this view refreshes missing or stale metadata when needed. No manual model definitions are needed. Refresh models updates account metadata; it does not verify a model call or change your selected model."), models === void 0 ? (0, react.createElement)("p", { style: { fontSize: "13px" } }, "Account model metadata is not available yet.") : (0, react.createElement)(GitHubCopilotAccountModelsSummary, { snapshot: models })), signedIn ? actionButton(refreshing ? "Refreshing models…" : "Refresh models", account.refreshModels, pendingAction, { "data-dsh-github-copilot-refresh-models": true }) : null, signedIn && state.error === "COPILOT_MODEL_DISCOVERY_FAILED" ? actionButton("Retry", account.refreshModels, pendingAction, { "data-dsh-github-copilot-retry-models": true }) : null) : null));
13283
+ }) : (0, react.createElement)("p", { role: "status" }, "Sign in to manage model preferences."), (0, react.createElement)("details", null, (0, react.createElement)("summary", null, "Discovery details"), (0, react.createElement)("p", { style: nativeCaptionStyle }, "Signing in here fetches your account models once. Opening this view refreshes missing or stale metadata when needed. No manual model definitions are needed. Refresh models updates account metadata; it does not verify a model call or change your selected model."), models === void 0 ? (0, react.createElement)("p", { style: nativeCaptionStyle }, "Account model metadata is not available yet.") : (0, react.createElement)(GitHubCopilotAccountModelsSummary, { snapshot: models })), signedIn ? actionButton(refreshing ? "Refreshing models…" : "Refresh models", account.refreshModels, pendingAction, { "data-dsh-github-copilot-refresh-models": true }) : null, signedIn && state.error === "COPILOT_MODEL_DISCOVERY_FAILED" ? actionButton("Retry", account.refreshModels, pendingAction, { "data-dsh-github-copilot-retry-models": true }) : null) : null));
13193
13284
  }
13194
13285
  /** Standalone footer presentation; registered Models seats use the shared surface coordinator. */
13195
13286
  function GitHubCopilotPreviewFooter(props) {