@copilotkit/web-inspector 1.70.3 → 1.71.1

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/dist/index.umd.js CHANGED
@@ -43,6 +43,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
43
43
  this.snapshot = null;
44
44
  this.setupActive = false;
45
45
  this.copyState = "idle";
46
+ this.recopyState = "idle";
46
47
  this.setupPrompt = "";
47
48
  this.promptOpen = false;
48
49
  this.promptTrigger = null;
@@ -146,6 +147,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
146
147
  <div class="step-header"><span class="step-number">✓</span></div>
147
148
  <h3>Copy the setup prompt</h3>
148
149
  <p>Nice work. You’ve completed the first step.</p>
150
+ <button
151
+ class="copy-again"
152
+ type="button"
153
+ aria-live="polite"
154
+ @click=${() => this.emit("learning-recopy-setup")}
155
+ >
156
+ ${this.recopyState === "copied" ? "✓ Copied!" : this.recopyState === "error" ? "Try copying again" : "Copy prompt again"}
157
+ </button>
149
158
  </li>
150
159
  <li
151
160
  class="step ${attention ? "error current" : mode === "setup" ? "current" : "complete"}"
@@ -512,9 +521,18 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
512
521
  <h1>Learning</h1>
513
522
  <p>Your Agent learns from conversations and improves over time.</p>
514
523
  </div>
515
- ${this.refreshing ? lit.html`
516
- <span class="refreshing" role="status">Refreshing</span>
517
- ` : lit.nothing}
524
+ <div class="pane-actions">
525
+ ${state === "setup" && this.setupActive ? lit.html`<button
526
+ class="secondary"
527
+ type="button"
528
+ @click=${() => this.emit("learning-go-back")}
529
+ >
530
+ ← Go back
531
+ </button>` : lit.nothing}
532
+ ${this.refreshing ? lit.html`
533
+ <span class="refreshing" role="status">Refreshing</span>
534
+ ` : lit.nothing}
535
+ </div>
518
536
  </header>
519
537
  ${retry}
520
538
  ${content}
@@ -572,6 +590,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
572
590
  snapshot: { attribute: false },
573
591
  setupActive: { type: Boolean },
574
592
  copyState: { attribute: false },
593
+ recopyState: { attribute: false },
575
594
  setupPrompt: { attribute: false }
576
595
  };
577
596
  CpkLearningView.styles = lit.css`
@@ -710,6 +729,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
710
729
  font-size: 14px;
711
730
  line-height: 1.5;
712
731
  }
732
+ .pane-actions {
733
+ display: flex;
734
+ align-items: center;
735
+ gap: 12px;
736
+ }
713
737
  .refreshing {
714
738
  color: var(--learning-muted-strong);
715
739
  font-size: 11px;
@@ -825,6 +849,17 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
825
849
  font-size: 12px;
826
850
  line-height: 1.45;
827
851
  }
852
+ .copy-again {
853
+ margin-top: 12px;
854
+ padding: 0;
855
+ color: var(--learning-secondary-ink);
856
+ background: none;
857
+ border: 0;
858
+ font-size: 11px;
859
+ font-weight: 750;
860
+ text-decoration: underline;
861
+ cursor: pointer;
862
+ }
828
863
  .setup-support {
829
864
  margin-top: 14px;
830
865
  }
@@ -1990,19 +2025,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1990
2025
 
1991
2026
  //#endregion
1992
2027
  //#region src/lib/home-briefing.ts
1993
- /**
1994
- * A self-contained handoff for a coding agent. It answers the onboarding
1995
- * workflow's session and feedback consent gates up front, while keeping the
1996
- * feature guide—not a generic product-onboarding branch—in control of the
1997
- * implementation plan.
1998
- */
1999
- function homeFeatureImplementationPrompt(service, context) {
2000
- return `Identify your coding-agent slug (for example, \`codex\` or \`claude-code\`). From the target project root, run \`npx copilotkit@latest onboard start --run ${context.onboardingRunId} --coding-agent <coding-agent-slug>\` and use its output as onboarding context. If it requires a CopilotKit CLI session check, you have permission to run it; never reveal credentials or send optional diagnostic feedback reports.
2001
-
2002
- This task is specifically to enable ${service.label}, not to re-onboard the application. First inspect the existing CopilotKit runtime, provider, agent, and UI wiring, and confirm that ${service.label} is not already enabled. Then read the ${service.label} guide (${service.docsUrl}) and make a short plan before editing. Preserve the project's framework, package manager, installed CopilotKit version, existing agent IDs, routes, provider layout, and working behavior. Do not create, select, or alter a CopilotKit Intelligence project—or add Intelligence configuration—unless this feature's official guide explicitly requires it or the user asks.
2003
-
2004
- Implement the smallest complete integration: wire every feature-required client and runtime configuration into the chat-to-agent path people already use, reuse local patterns, and do not invent environment values or hardcode secrets. Add or update focused tests and run the relevant project checks. Finish only after local validation proves ${service.label} works—not merely that the code compiles. Use a feature-specific runtime or Inspector capability check and, when the feature supports one, a representative UI interaction that proves the user-facing result. If the project overrides default rendering (for example, with a wildcard tool renderer), make that override compatible with this feature; a capability flag alone is not success. Summarize the changed files, validation, and any manual setup still required.`;
2005
- }
2006
2028
  const SERVICE_DOCS_URL = {
2007
2029
  threads: "https://docs.copilotkit.ai/threads",
2008
2030
  memory: "https://docs.copilotkit.ai/intelligence/intelligence-platform",
@@ -2381,7 +2403,7 @@ Implement the smallest complete integration: wire every feature-required client
2381
2403
 
2382
2404
  //#endregion
2383
2405
  //#region package.json
2384
- var version = "1.70.3";
2406
+ var version = "1.71.1";
2385
2407
 
2386
2408
  //#endregion
2387
2409
  //#region src/lib/telemetry.ts
@@ -2827,9 +2849,26 @@ Implement the smallest complete integration: wire every feature-required client
2827
2849
  * Intelligence app (`apps/app-frontend/react-shell/src/home/intelligence-home.tsx`).
2828
2850
  * The CLI resolves `onboard start` against a prompt graph, so the two surfaces
2829
2851
  * must not drift — if the CLI's entry point changes, both change together.
2852
+ *
2853
+ * Two lines, and deliberately nothing else. It used to open by telling the
2854
+ * agent to identify itself and pass the slug as a flag -- two sentences of
2855
+ * instruction to a machine, in the one piece of text a human reads, decides on
2856
+ * and pastes. The graph asks for the slug itself now, with `onboard identify`,
2857
+ * which is the surface that talks to the agent for the rest of the run
2858
+ * (Intelligence OSS-1157).
2859
+ *
2860
+ * This one stays generic, and so do the docs and Intelligence web-app copies
2861
+ * of it (OSS-1150). Those three are entry points for a developer with no
2862
+ * CopilotKit app yet, and every `--intent` route requires an existing app: it
2863
+ * inspects for one first and reads `feature/stop` when it is missing. The
2864
+ * feature buttons on Home are the surface that knows which feature the
2865
+ * developer is looking at, so they are the surface that names an intent — see
2866
+ * `FEATURE_ONBOARDING_PROMPT_TEMPLATE` below.
2830
2867
  */
2831
2868
  const RUN_ID_PLACEHOLDER = "<run-id>";
2832
- const ONBOARDING_PROMPT_TEMPLATE = `Identify which coding-agent product you are, using a short slug such as \`codex\` or \`claude-code\`. From the root of the project where you want CopilotKit, run \`npx --yes copilotkit@latest onboard start --run ${RUN_ID_PLACEHOLDER} --coding-agent <coding-agent-slug>\`. Follow the Markdown instructions it prints until onboarding is complete.`;
2869
+ const ONBOARDING_PROMPT_TEMPLATE = `Help me get started with CopilotKit. Run this command and follow the instructions:
2870
+
2871
+ npx --yes copilotkit@latest onboard start --run ${RUN_ID_PLACEHOLDER}`;
2833
2872
  /** Length and alphabet are the CLI's, so a run id copied here resolves there. */
2834
2873
  const RUN_ID_LENGTH = 12;
2835
2874
  /**
@@ -2856,6 +2895,53 @@ Implement the smallest complete integration: wire every feature-required client
2856
2895
  function createOnboardingPrompt(runId) {
2857
2896
  return ONBOARDING_PROMPT_TEMPLATE.replace(RUN_ID_PLACEHOLDER, runId);
2858
2897
  }
2898
+ /**
2899
+ * Which feature outcome each Home tile asks the CLI for.
2900
+ *
2901
+ * The two vocabularies stay separate on purpose. A `HomeServiceId` names a
2902
+ * tile and the pane behind it, so `websocket` and `audio` are the right words
2903
+ * for it; an intent names the work to be done, so `add-realtime-sync` and
2904
+ * `add-voice` are the right words for that. One table maps between them, and
2905
+ * `Record<HomeServiceId, OnboardingIntent>` makes a new tile or a renamed
2906
+ * slug a type error rather than a missing button.
2907
+ *
2908
+ * `memory` maps to `add-learning` because the tile is the Learning tile: it is
2909
+ * enabled by a *configured Learning container* (see `learningOn` in
2910
+ * `index.ts`), which is exactly what `feature/learning` sets up. The tile id
2911
+ * and the `memories` menu key are older names for that same pane.
2912
+ */
2913
+ const FEATURE_ONBOARDING_INTENT = {
2914
+ threads: "add-rich-threads",
2915
+ memory: "add-learning",
2916
+ a2ui: "add-a2ui",
2917
+ "open-gen-ui": "add-open-generative-ui",
2918
+ suggestions: "add-chat-suggestions",
2919
+ audio: "add-voice",
2920
+ websocket: "add-realtime-sync"
2921
+ };
2922
+ const INTENT_PLACEHOLDER = "<intent>";
2923
+ /**
2924
+ * The prompt a Home feature button copies.
2925
+ *
2926
+ * It carries no feature-specific instruction, and it must not gain any. The
2927
+ * `--intent` route owns the plan, the guide links, the per-phase check-ins,
2928
+ * the refusal when a prerequisite is missing, and the proof step; prose copied
2929
+ * here would duplicate all of that and then drift from it the next time the
2930
+ * underlying API changes.
2931
+ *
2932
+ * What is left is the caller's own business: identify yourself, run this
2933
+ * command, and the standing permission for the session check that the
2934
+ * developer granted by copying the prompt.
2935
+ */
2936
+ const FEATURE_ONBOARDING_PROMPT_TEMPLATE = `Help me set this up in my CopilotKit app. Run this command and follow the instructions:
2937
+
2938
+ npx --yes copilotkit@latest onboard start --run ${RUN_ID_PLACEHOLDER} --intent ${INTENT_PLACEHOLDER}
2939
+
2940
+ If it requires a CopilotKit CLI session check, you have permission to run it. Never reveal credentials or send optional diagnostic feedback reports.`;
2941
+ /** Bind one run id and one tile's feature outcome into the copied prompt. */
2942
+ function createFeatureOnboardingPrompt(serviceId, runId) {
2943
+ return FEATURE_ONBOARDING_PROMPT_TEMPLATE.replace(RUN_ID_PLACEHOLDER, runId).replace(INTENT_PLACEHOLDER, FEATURE_ONBOARDING_INTENT[serviceId]);
2944
+ }
2859
2945
 
2860
2946
  //#endregion
2861
2947
  //#region src/index.ts
@@ -2866,6 +2952,7 @@ Implement the smallest complete integration: wire every feature-required client
2866
2952
  * "memories" for persistence and telemetry stability.
2867
2953
  */
2868
2954
  const LEARNING_VIEW_LABEL = "Learning";
2955
+ const LEARNING_RECOPY_CONFIRMATION_MS = 2e3;
2869
2956
  /**
2870
2957
  * User-facing label for the What's new view. Its menu key stays `whats-new`
2871
2958
  * for persistence and telemetry stability, following the `memories`/"Memory"
@@ -3340,6 +3427,10 @@ Implement the smallest complete integration: wire every feature-required client
3340
3427
  "ACTIVITY_SNAPSHOT",
3341
3428
  "ACTIVITY_DELTA"
3342
3429
  ];
3430
+ const THREADS_LOCKED_COPY = {
3431
+ heading: "Production-grade chat threads without the complexity. Self hostable.",
3432
+ description: "Chat threads that go beyond text with generative UI and multimodal inputs, built to replay missed events and stay in sync across tabs, sessions, and devices."
3433
+ };
3343
3434
  const EMPTY_INSPECTOR_MESSAGES = [];
3344
3435
  function textFromUnknownContent(content) {
3345
3436
  if (typeof content === "string") return content;
@@ -7787,8 +7878,11 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
7787
7878
  this.learningPollTimer = null;
7788
7879
  this.learningPollFailureCount = 0;
7789
7880
  this.learningSetupMarker = null;
7881
+ this.learningSetupCopyRequest = 0;
7790
7882
  this.learningSetupUnsubscribe = null;
7791
7883
  this.learningPromptCopyState = "idle";
7884
+ this.learningPromptRecopyState = "idle";
7885
+ this.learningPromptRecopyTimer = null;
7792
7886
  this.learningViewedState = null;
7793
7887
  this._recallResults = null;
7794
7888
  this._recallLoading = false;
@@ -7952,6 +8046,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
7952
8046
  this.launcherHudIntroStartTimer = null;
7953
8047
  this.launcherHudIntroEndTimer = null;
7954
8048
  this.inspectorDismissedUntil = null;
8049
+ this.lastReportedInspectorVisibility = null;
7955
8050
  this.inspectorDismissalTimer = null;
7956
8051
  this.hudLandingMenu = null;
7957
8052
  this.pillOutcome = null;
@@ -8130,24 +8225,37 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
8130
8225
  const clipboard = this.getClipboard(event);
8131
8226
  if (!(clipboard === null || clipboard === void 0 ? void 0 : clipboard.writeText)) return false;
8132
8227
  try {
8133
- await clipboard.writeText(homeFeatureImplementationPrompt(service, { onboardingRunId }));
8228
+ await clipboard.writeText(createFeatureOnboardingPrompt(service.id, onboardingRunId));
8134
8229
  return true;
8135
8230
  } catch (_unused4) {
8136
8231
  return false;
8137
8232
  }
8138
8233
  };
8139
- this.handleLearningSetupCopy = async (event) => {
8234
+ this.handleLearningSetupCopy = async (event, recopy = false) => {
8140
8235
  var _this$core;
8141
- const service = this.getHomeFeaturePromptTarget("threads");
8236
+ const service = this.getHomeFeaturePromptTarget("memory");
8142
8237
  if (!service || !((_this$core = this.core) === null || _this$core === void 0 ? void 0 : _this$core.runtimeUrl)) return;
8238
+ const request = ++this.learningSetupCopyRequest;
8143
8239
  const copied = await this.copyFeaturePromptToClipboard(service, event, this.getOnboardingRunId());
8240
+ if (request !== this.learningSetupCopyRequest) return;
8144
8241
  if (!this.core.telemetryDisabled) trackLearningSetupPromptClicked({ outcome: copied ? "success" : "failure" });
8145
8242
  if (!copied) {
8146
- this.learningPromptCopyState = "error";
8243
+ if (recopy) {
8244
+ this.cancelLearningPromptRecopyReset();
8245
+ this.learningPromptRecopyState = "error";
8246
+ } else this.learningPromptCopyState = "error";
8147
8247
  this.requestUpdate();
8148
8248
  return;
8149
8249
  }
8150
- this.learningPromptCopyState = "copied";
8250
+ if (recopy) {
8251
+ this.cancelLearningPromptRecopyReset();
8252
+ this.learningPromptRecopyState = "copied";
8253
+ this.learningPromptRecopyTimer = setTimeout(() => {
8254
+ this.learningPromptRecopyTimer = null;
8255
+ this.learningPromptRecopyState = "idle";
8256
+ this.requestUpdate();
8257
+ }, LEARNING_RECOPY_CONFIRMATION_MS);
8258
+ } else this.learningPromptCopyState = "copied";
8151
8259
  this.learningSetupMarker = writeLearningSetupMarker({
8152
8260
  runtimeUrl: this.core.runtimeUrl,
8153
8261
  agentId: this.getLearningAgentId()
@@ -8157,6 +8265,17 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
8157
8265
  this.requestUpdate();
8158
8266
  this.refreshLearningSnapshot({ preserve: false });
8159
8267
  };
8268
+ this.handleLearningGoBack = () => {
8269
+ this.learningSetupCopyRequest += 1;
8270
+ this.cancelLearningPromptRecopyReset();
8271
+ clearLearningSetupMarker();
8272
+ this.learningSetupMarker = null;
8273
+ this.learningPromptCopyState = "idle";
8274
+ this.learningPromptRecopyState = "idle";
8275
+ this.cancelLearningPoll();
8276
+ this.requestUpdate();
8277
+ this.trackLearningViewState();
8278
+ };
8160
8279
  this.handleLearningPage = (event) => {
8161
8280
  var _this$learningSnapsho3, _this$learningSnapsho4, _this$learningSnapsho5, _this$learningSnapsho6, _this$core2;
8162
8281
  const { section, page } = event.detail;
@@ -9650,6 +9769,12 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
9650
9769
  (_this$learningAbortCo2 = this.learningAbortController) === null || _this$learningAbortCo2 === void 0 || _this$learningAbortCo2.abort();
9651
9770
  this.learningAbortController = null;
9652
9771
  }
9772
+ cancelLearningPromptRecopyReset() {
9773
+ if (this.learningPromptRecopyTimer !== null) {
9774
+ clearTimeout(this.learningPromptRecopyTimer);
9775
+ this.learningPromptRecopyTimer = null;
9776
+ }
9777
+ }
9653
9778
  detachFromCore() {
9654
9779
  var _this$_memoryUnsub;
9655
9780
  this.threadCapabilityGeneration += 1;
@@ -9672,6 +9797,8 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
9672
9797
  this._memoriesRealtimeStatus = "connecting";
9673
9798
  this._memorySubscribed = false;
9674
9799
  this._memoryStoreUnsupported = false;
9800
+ this.cancelLearningPromptRecopyReset();
9801
+ this.learningPromptRecopyState = "idle";
9675
9802
  this._recallSeq += 1;
9676
9803
  this._recallResults = null;
9677
9804
  this._recallLoading = false;
@@ -10343,6 +10470,11 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
10343
10470
  else this.removeAttribute("data-docked");
10344
10471
  }
10345
10472
  updated() {
10473
+ const visible = !this.isInspectorDismissed;
10474
+ if (visible !== this.lastReportedInspectorVisibility) {
10475
+ this.lastReportedInspectorVisibility = visible;
10476
+ this.dispatchEvent(new CustomEvent("cpk-inspector-visibility-change", { detail: { visible } }));
10477
+ }
10346
10478
  this.syncInspectorPortal();
10347
10479
  this.syncThreadsExampleOverviewVideo();
10348
10480
  this.maybeTrackInspectorMetadataViews();
@@ -10660,6 +10792,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
10660
10792
  return titleCharacters.length > HUD_ANNOUNCEMENT_TITLE_LIMIT ? `${titleCharacters.slice(0, HUD_ANNOUNCEMENT_TITLE_LIMIT).join("").trimEnd()}...` : title;
10661
10793
  }
10662
10794
  renderHudRow(args) {
10795
+ if (args.connected) return lit.nothing;
10663
10796
  const detailId = `cpk-hud-detail-${args.id}`;
10664
10797
  return lit.html`
10665
10798
  <li
@@ -10731,11 +10864,13 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
10731
10864
  const learningOn = homeModel.services.some((service) => service.id === "memory" && service.enabled);
10732
10865
  const announcementTitle = this.getUnreadAnnouncementTitle();
10733
10866
  const featureBlockIntroIndex = announcementTitle ? 1 : 0;
10867
+ const dismissOnly = !announcementTitle && threadsOn && learningOn;
10734
10868
  return lit.html`
10735
10869
  <div
10736
10870
  class="cpk-launcher-hud"
10737
10871
  id="cpk-launcher-hud"
10738
10872
  data-cpk-launcher-hud
10873
+ ?data-cpk-hud-dismiss-only=${dismissOnly}
10739
10874
  data-cpk-hud-side=${this.launcherHudSide}
10740
10875
  data-cpk-hud-vertical=${this.contextState.button.anchor.vertical}
10741
10876
  data-cpk-hud-intro=${this.launcherHudIntro ? "true" : lit.nothing}
@@ -10745,7 +10880,9 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
10745
10880
  "--cpk-launcher-hud-waterfall-duration": `${LAUNCHER_HUD_INTRO_MS.waterfallDuration}ms`
10746
10881
  })}
10747
10882
  >
10748
- <span class="cpk-launcher-hud__arrow" aria-hidden="true"></span>
10883
+ ${dismissOnly ? lit.nothing : lit.html`
10884
+ <span class="cpk-launcher-hud__arrow" aria-hidden="true"></span>
10885
+ `}
10749
10886
  <div class="cpk-launcher-hud__card">
10750
10887
  ${announcementTitle ? lit.html`
10751
10888
  <div
@@ -10784,31 +10921,33 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
10784
10921
  </div>
10785
10922
  </div>
10786
10923
  ` : lit.nothing}
10787
- <ul
10788
- class="cpk-launcher-hud__list cpk-launcher-hud__feature-list"
10789
- role="list"
10790
- style=${(0, lit_directives_style_map_js.styleMap)({ "--cpk-hud-waterfall-delay": launcherHudWaterfallDelay(featureBlockIntroIndex) })}
10791
- >
10792
- ${this.renderHudRow({
10924
+ ${threadsOn && learningOn ? lit.nothing : lit.html`
10925
+ <ul
10926
+ class="cpk-launcher-hud__list cpk-launcher-hud__feature-list"
10927
+ role="list"
10928
+ style=${(0, lit_directives_style_map_js.styleMap)({ "--cpk-hud-waterfall-delay": launcherHudWaterfallDelay(featureBlockIntroIndex) })}
10929
+ >
10930
+ ${this.renderHudRow({
10793
10931
  id: "threads",
10794
10932
  label: HUD_THREADS_LABEL,
10795
10933
  icon: "MessageSquare",
10796
10934
  connected: threadsOn,
10797
10935
  introIndex: featureBlockIntroIndex + 1
10798
10936
  })}
10799
- ${this.renderHudRow({
10937
+ ${this.renderHudRow({
10800
10938
  id: "learning",
10801
10939
  label: HUD_LEARNING_LABEL,
10802
10940
  icon: "Brain",
10803
10941
  connected: learningOn,
10804
- introIndex: featureBlockIntroIndex + 2
10942
+ introIndex: featureBlockIntroIndex + (threadsOn ? 1 : 2)
10805
10943
  })}
10806
- </ul>
10944
+ </ul>
10945
+ `}
10807
10946
  <button
10808
10947
  type="button"
10809
10948
  class="cpk-launcher-hud__dismiss-day"
10810
10949
  data-cpk-dismiss-inspector="day"
10811
- style=${(0, lit_directives_style_map_js.styleMap)({ "--cpk-hud-waterfall-delay": launcherHudWaterfallDelay(featureBlockIntroIndex + 3) })}
10950
+ style=${(0, lit_directives_style_map_js.styleMap)({ "--cpk-hud-waterfall-delay": launcherHudWaterfallDelay(dismissOnly ? 0 : featureBlockIntroIndex + Number(!threadsOn) + Number(!learningOn) + 1) })}
10812
10951
  @click=${this.handleHudDismissDayClick}
10813
10952
  @pointerdown=${(event) => event.stopPropagation()}
10814
10953
  >
@@ -14293,23 +14432,6 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
14293
14432
  </div>
14294
14433
  `;
14295
14434
  }
14296
- getThreadsLockedCopy() {
14297
- switch (this.inspectorMetadataProjection.licenseState) {
14298
- case "valid": return {
14299
- heading: "Finish setting up Rich Threads",
14300
- description: "Copy this prompt into your coding agent to finish the setup."
14301
- };
14302
- case "none":
14303
- case "unknown": return {
14304
- heading: "Production-grade chat threads without the complexity. Self hostable.",
14305
- description: "Chat threads that go beyond text with generative UI and multimodal inputs, built to replay missed events and stay in sync across tabs, sessions, and devices."
14306
- };
14307
- case "expired": return {
14308
- heading: "Renew Intelligence to inspect Threads.",
14309
- description: "Your Intelligence access has expired. Renew it to inspect saved thread history."
14310
- };
14311
- }
14312
- }
14313
14435
  /**
14314
14436
  * Renders the realtime-connection indicator in the memory-store header.
14315
14437
  * Only `"connected"` shows the live (green-dot) state; `"connecting"` shows a
@@ -14360,7 +14482,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
14360
14482
  videoTitle: "CopilotKit Learning overview",
14361
14483
  outlineItems: LEARNING_LOCKED_FEATURE_OUTLINE,
14362
14484
  setupPrompt: {
14363
- serviceId: "threads",
14485
+ serviceId: "memory",
14364
14486
  copyState: this.learningPromptCopyState,
14365
14487
  onClick: (event) => void this.handleLearningSetupCopy(event)
14366
14488
  }
@@ -14375,9 +14497,12 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
14375
14497
  .snapshot=${this.learningSnapshot}
14376
14498
  .setupActive=${this.isLearningSetupActive()}
14377
14499
  .copyState=${this.learningPromptCopyState}
14378
- .setupPrompt=${this.getHomeFeaturePromptTarget("threads") ? homeFeatureImplementationPrompt(this.getHomeFeaturePromptTarget("threads"), { onboardingRunId: this.getOnboardingRunId() }) : ""}
14500
+ .recopyState=${this.learningPromptRecopyState}
14501
+ .setupPrompt=${createFeatureOnboardingPrompt("memory", this.getOnboardingRunId())}
14379
14502
  @learning-retry=${() => this.refreshLearningSnapshot({ preserve: this.learningSnapshot !== null })}
14380
14503
  @learning-copy-setup=${(event) => this.handleLearningSetupCopy(event)}
14504
+ @learning-recopy-setup=${(event) => this.handleLearningSetupCopy(event, true)}
14505
+ @learning-go-back=${this.handleLearningGoBack}
14381
14506
  @learning-page=${(event) => this.handleLearningPage(event)}
14382
14507
  @learning-open-evidence=${(event) => this.handleLearningEvidence(event)}
14383
14508
  @learning-evidence-opened=${() => {
@@ -14619,12 +14744,11 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
14619
14744
  var _visibleThreads$find, _this$_core$runtimeUr2, _this$_core20, _this$_core$headers, _this$_core21, _this$_core22, _this$liveMessageVers2, _this$agentEvents$get6, _this$_core23;
14620
14745
  if (!this.areThreadEndpointsAvailable()) {
14621
14746
  this.trackThreadsViewStateOnce("locked");
14622
- const lockedCopy = this.getThreadsLockedCopy();
14623
14747
  return this.renderLockedFeatureOverview({
14624
14748
  serviceId: "threads",
14625
14749
  featureName: "Rich Threads",
14626
- heading: lockedCopy.heading,
14627
- description: lockedCopy.description,
14750
+ heading: THREADS_LOCKED_COPY.heading,
14751
+ description: THREADS_LOCKED_COPY.description,
14628
14752
  videoUrl: THREADS_LOCKED_VIDEO_URL,
14629
14753
  videoTitle: "Rich Threads overview",
14630
14754
  outlineItems: THREADS_LOCKED_FEATURE_OUTLINE
@@ -17971,6 +18095,24 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
17971
18095
  );
17972
18096
  }
17973
18097
 
18098
+ /* With no news or setup actions, the dismissal is the whole HUD. */
18099
+ .cpk-launcher-hud[data-cpk-hud-dismiss-only] {
18100
+ --hud-dismiss-day-height: 36px;
18101
+ width: max-content;
18102
+ }
18103
+
18104
+ .cpk-launcher-hud[data-cpk-hud-dismiss-only][data-cpk-hud-vertical="top"] {
18105
+ top: calc((var(--cpk-launcher-size) - var(--hud-dismiss-day-height)) / 2);
18106
+ }
18107
+
18108
+ .cpk-launcher-hud[data-cpk-hud-dismiss-only][data-cpk-hud-vertical="bottom"] {
18109
+ bottom: calc((var(--cpk-launcher-size) - var(--hud-dismiss-day-height)) / 2);
18110
+ }
18111
+
18112
+ .cpk-launcher-hud[data-cpk-hud-dismiss-only] .cpk-launcher-hud__card {
18113
+ width: max-content;
18114
+ }
18115
+
17974
18116
  .cpk-launcher-hud__list {
17975
18117
  margin: 0;
17976
18118
  padding: 0;
@@ -18137,6 +18279,11 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
18137
18279
  color 120ms ease;
18138
18280
  }
18139
18281
 
18282
+ .cpk-launcher-hud[data-cpk-hud-dismiss-only] .cpk-launcher-hud__dismiss-day {
18283
+ font-size: 11px;
18284
+ white-space: nowrap;
18285
+ }
18286
+
18140
18287
  .cpk-launcher-hud__dismiss-day:hover,
18141
18288
  .cpk-launcher-hud__dismiss-day:focus-visible {
18142
18289
  border-color: var(--hud-accent);