@copilotkit/web-inspector 1.70.3 → 1.71.0
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/components/learning-view.cjs +38 -3
- package/dist/components/learning-view.cjs.map +1 -1
- package/dist/components/learning-view.mjs +38 -3
- package/dist/components/learning-view.mjs.map +1 -1
- package/dist/index.cjs +48 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +6 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +48 -3
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +87 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.mjs +1 -1
- package/package.json +3 -3
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
|
-
|
|
516
|
-
|
|
517
|
-
|
|
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
|
}
|
|
@@ -2381,7 +2416,7 @@ Implement the smallest complete integration: wire every feature-required client
|
|
|
2381
2416
|
|
|
2382
2417
|
//#endregion
|
|
2383
2418
|
//#region package.json
|
|
2384
|
-
var version = "1.
|
|
2419
|
+
var version = "1.71.0";
|
|
2385
2420
|
|
|
2386
2421
|
//#endregion
|
|
2387
2422
|
//#region src/lib/telemetry.ts
|
|
@@ -2866,6 +2901,7 @@ Implement the smallest complete integration: wire every feature-required client
|
|
|
2866
2901
|
* "memories" for persistence and telemetry stability.
|
|
2867
2902
|
*/
|
|
2868
2903
|
const LEARNING_VIEW_LABEL = "Learning";
|
|
2904
|
+
const LEARNING_RECOPY_CONFIRMATION_MS = 2e3;
|
|
2869
2905
|
/**
|
|
2870
2906
|
* User-facing label for the What's new view. Its menu key stays `whats-new`
|
|
2871
2907
|
* for persistence and telemetry stability, following the `memories`/"Memory"
|
|
@@ -7787,8 +7823,11 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
|
|
|
7787
7823
|
this.learningPollTimer = null;
|
|
7788
7824
|
this.learningPollFailureCount = 0;
|
|
7789
7825
|
this.learningSetupMarker = null;
|
|
7826
|
+
this.learningSetupCopyRequest = 0;
|
|
7790
7827
|
this.learningSetupUnsubscribe = null;
|
|
7791
7828
|
this.learningPromptCopyState = "idle";
|
|
7829
|
+
this.learningPromptRecopyState = "idle";
|
|
7830
|
+
this.learningPromptRecopyTimer = null;
|
|
7792
7831
|
this.learningViewedState = null;
|
|
7793
7832
|
this._recallResults = null;
|
|
7794
7833
|
this._recallLoading = false;
|
|
@@ -7952,6 +7991,7 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
|
|
|
7952
7991
|
this.launcherHudIntroStartTimer = null;
|
|
7953
7992
|
this.launcherHudIntroEndTimer = null;
|
|
7954
7993
|
this.inspectorDismissedUntil = null;
|
|
7994
|
+
this.lastReportedInspectorVisibility = null;
|
|
7955
7995
|
this.inspectorDismissalTimer = null;
|
|
7956
7996
|
this.hudLandingMenu = null;
|
|
7957
7997
|
this.pillOutcome = null;
|
|
@@ -8136,18 +8176,31 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
|
|
|
8136
8176
|
return false;
|
|
8137
8177
|
}
|
|
8138
8178
|
};
|
|
8139
|
-
this.handleLearningSetupCopy = async (event) => {
|
|
8179
|
+
this.handleLearningSetupCopy = async (event, recopy = false) => {
|
|
8140
8180
|
var _this$core;
|
|
8141
8181
|
const service = this.getHomeFeaturePromptTarget("threads");
|
|
8142
8182
|
if (!service || !((_this$core = this.core) === null || _this$core === void 0 ? void 0 : _this$core.runtimeUrl)) return;
|
|
8183
|
+
const request = ++this.learningSetupCopyRequest;
|
|
8143
8184
|
const copied = await this.copyFeaturePromptToClipboard(service, event, this.getOnboardingRunId());
|
|
8185
|
+
if (request !== this.learningSetupCopyRequest) return;
|
|
8144
8186
|
if (!this.core.telemetryDisabled) trackLearningSetupPromptClicked({ outcome: copied ? "success" : "failure" });
|
|
8145
8187
|
if (!copied) {
|
|
8146
|
-
|
|
8188
|
+
if (recopy) {
|
|
8189
|
+
this.cancelLearningPromptRecopyReset();
|
|
8190
|
+
this.learningPromptRecopyState = "error";
|
|
8191
|
+
} else this.learningPromptCopyState = "error";
|
|
8147
8192
|
this.requestUpdate();
|
|
8148
8193
|
return;
|
|
8149
8194
|
}
|
|
8150
|
-
|
|
8195
|
+
if (recopy) {
|
|
8196
|
+
this.cancelLearningPromptRecopyReset();
|
|
8197
|
+
this.learningPromptRecopyState = "copied";
|
|
8198
|
+
this.learningPromptRecopyTimer = setTimeout(() => {
|
|
8199
|
+
this.learningPromptRecopyTimer = null;
|
|
8200
|
+
this.learningPromptRecopyState = "idle";
|
|
8201
|
+
this.requestUpdate();
|
|
8202
|
+
}, LEARNING_RECOPY_CONFIRMATION_MS);
|
|
8203
|
+
} else this.learningPromptCopyState = "copied";
|
|
8151
8204
|
this.learningSetupMarker = writeLearningSetupMarker({
|
|
8152
8205
|
runtimeUrl: this.core.runtimeUrl,
|
|
8153
8206
|
agentId: this.getLearningAgentId()
|
|
@@ -8157,6 +8210,17 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
|
|
|
8157
8210
|
this.requestUpdate();
|
|
8158
8211
|
this.refreshLearningSnapshot({ preserve: false });
|
|
8159
8212
|
};
|
|
8213
|
+
this.handleLearningGoBack = () => {
|
|
8214
|
+
this.learningSetupCopyRequest += 1;
|
|
8215
|
+
this.cancelLearningPromptRecopyReset();
|
|
8216
|
+
clearLearningSetupMarker();
|
|
8217
|
+
this.learningSetupMarker = null;
|
|
8218
|
+
this.learningPromptCopyState = "idle";
|
|
8219
|
+
this.learningPromptRecopyState = "idle";
|
|
8220
|
+
this.cancelLearningPoll();
|
|
8221
|
+
this.requestUpdate();
|
|
8222
|
+
this.trackLearningViewState();
|
|
8223
|
+
};
|
|
8160
8224
|
this.handleLearningPage = (event) => {
|
|
8161
8225
|
var _this$learningSnapsho3, _this$learningSnapsho4, _this$learningSnapsho5, _this$learningSnapsho6, _this$core2;
|
|
8162
8226
|
const { section, page } = event.detail;
|
|
@@ -9650,6 +9714,12 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
|
|
|
9650
9714
|
(_this$learningAbortCo2 = this.learningAbortController) === null || _this$learningAbortCo2 === void 0 || _this$learningAbortCo2.abort();
|
|
9651
9715
|
this.learningAbortController = null;
|
|
9652
9716
|
}
|
|
9717
|
+
cancelLearningPromptRecopyReset() {
|
|
9718
|
+
if (this.learningPromptRecopyTimer !== null) {
|
|
9719
|
+
clearTimeout(this.learningPromptRecopyTimer);
|
|
9720
|
+
this.learningPromptRecopyTimer = null;
|
|
9721
|
+
}
|
|
9722
|
+
}
|
|
9653
9723
|
detachFromCore() {
|
|
9654
9724
|
var _this$_memoryUnsub;
|
|
9655
9725
|
this.threadCapabilityGeneration += 1;
|
|
@@ -9672,6 +9742,8 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
|
|
|
9672
9742
|
this._memoriesRealtimeStatus = "connecting";
|
|
9673
9743
|
this._memorySubscribed = false;
|
|
9674
9744
|
this._memoryStoreUnsupported = false;
|
|
9745
|
+
this.cancelLearningPromptRecopyReset();
|
|
9746
|
+
this.learningPromptRecopyState = "idle";
|
|
9675
9747
|
this._recallSeq += 1;
|
|
9676
9748
|
this._recallResults = null;
|
|
9677
9749
|
this._recallLoading = false;
|
|
@@ -10343,6 +10415,11 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
|
|
|
10343
10415
|
else this.removeAttribute("data-docked");
|
|
10344
10416
|
}
|
|
10345
10417
|
updated() {
|
|
10418
|
+
const visible = !this.isInspectorDismissed;
|
|
10419
|
+
if (visible !== this.lastReportedInspectorVisibility) {
|
|
10420
|
+
this.lastReportedInspectorVisibility = visible;
|
|
10421
|
+
this.dispatchEvent(new CustomEvent("cpk-inspector-visibility-change", { detail: { visible } }));
|
|
10422
|
+
}
|
|
10346
10423
|
this.syncInspectorPortal();
|
|
10347
10424
|
this.syncThreadsExampleOverviewVideo();
|
|
10348
10425
|
this.maybeTrackInspectorMetadataViews();
|
|
@@ -14375,9 +14452,12 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(parsed))}</pre
|
|
|
14375
14452
|
.snapshot=${this.learningSnapshot}
|
|
14376
14453
|
.setupActive=${this.isLearningSetupActive()}
|
|
14377
14454
|
.copyState=${this.learningPromptCopyState}
|
|
14455
|
+
.recopyState=${this.learningPromptRecopyState}
|
|
14378
14456
|
.setupPrompt=${this.getHomeFeaturePromptTarget("threads") ? homeFeatureImplementationPrompt(this.getHomeFeaturePromptTarget("threads"), { onboardingRunId: this.getOnboardingRunId() }) : ""}
|
|
14379
14457
|
@learning-retry=${() => this.refreshLearningSnapshot({ preserve: this.learningSnapshot !== null })}
|
|
14380
14458
|
@learning-copy-setup=${(event) => this.handleLearningSetupCopy(event)}
|
|
14459
|
+
@learning-recopy-setup=${(event) => this.handleLearningSetupCopy(event, true)}
|
|
14460
|
+
@learning-go-back=${this.handleLearningGoBack}
|
|
14381
14461
|
@learning-page=${(event) => this.handleLearningPage(event)}
|
|
14382
14462
|
@learning-open-evidence=${(event) => this.handleLearningEvidence(event)}
|
|
14383
14463
|
@learning-evidence-opened=${() => {
|