@copilotkit/react-core 1.56.5-canary.1777990461 → 1.56.5-canary.1777996081
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/{copilotkit-DLxvRryA.cjs → copilotkit-BP4xj-n_.cjs} +7 -36
- package/dist/copilotkit-BP4xj-n_.cjs.map +1 -0
- package/dist/{copilotkit--McKbFME.mjs → copilotkit-Bbrd6bmt.mjs} +7 -36
- package/dist/copilotkit-Bbrd6bmt.mjs.map +1 -0
- package/dist/{copilotkit-Qi61QzGV.d.cts → copilotkit-BdvkFjRB.d.cts} +6 -18
- package/dist/{copilotkit-Qi61QzGV.d.cts.map → copilotkit-BdvkFjRB.d.cts.map} +1 -1
- package/dist/{copilotkit-BMR_j11U.d.mts → copilotkit-CDvf9E_O.d.mts} +6 -18
- package/dist/{copilotkit-BMR_j11U.d.mts.map → copilotkit-CDvf9E_O.d.mts.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.css +1 -1
- package/dist/v2/index.d.cts +1 -1
- package/dist/v2/index.d.mts +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/index.umd.js +10 -40
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +6 -6
- package/src/v2/components/intelligence-indicator/IntelligenceIndicator.tsx +9 -61
- package/src/v2/styles/globals.css +6 -0
- package/dist/copilotkit--McKbFME.mjs.map +0 -1
- package/dist/copilotkit-DLxvRryA.cjs.map +0 -1
|
@@ -5671,28 +5671,16 @@ const DEFAULT_TOOL_PATTERNS = [/^bash$/];
|
|
|
5671
5671
|
* in the SDK's run-tracking map.)
|
|
5672
5672
|
*
|
|
5673
5673
|
* Phase machine (per-instance, all timers local):
|
|
5674
|
-
* - `spinner` while
|
|
5675
|
-
* - → `check`
|
|
5676
|
-
*
|
|
5677
|
-
*
|
|
5678
|
-
* true while prose streams) OR when `agent.isRunning` falls
|
|
5679
|
-
* (debounced 500 ms to absorb step-boundary
|
|
5680
|
-
* `RUN_FINISHED → RUN_STARTED` blips inside one user turn) — the
|
|
5681
|
-
* `agent.isRunning` path is the safety net for runs that end
|
|
5682
|
-
* without ever emitting prose (errors, max-step bail-out)
|
|
5674
|
+
* - `spinner` while `agent.isRunning`
|
|
5675
|
+
* - → `check` after `agent.isRunning` falls (debounced 500 ms to
|
|
5676
|
+
* absorb step-boundary `RUN_FINISHED → RUN_STARTED` blips inside
|
|
5677
|
+
* one user turn)
|
|
5683
5678
|
* - → `fading` after a brief hold ({@link CHECK_HOLD_MS})
|
|
5684
5679
|
* - → `hidden` after the fade animation
|
|
5685
5680
|
* ({@link FADE_OUT_ANIMATION_MS})
|
|
5686
5681
|
*
|
|
5687
|
-
* Mounting on a *historical* match (no live run): the indicator skips
|
|
5688
|
-
* the lifecycle entirely and starts in `"hidden"`. Old assistant-with-
|
|
5689
|
-
* tool-call messages in a previously-finished thread still satisfy
|
|
5690
|
-
* gates 2 + 3 when the thread is reopened, but there is no live work
|
|
5691
|
-
* to celebrate; replaying spinner → check → fade on every navigation
|
|
5692
|
-
* would be visual noise.
|
|
5693
|
-
*
|
|
5694
5682
|
* The "exactly one pill at a time" guarantee is structural — only one
|
|
5695
|
-
* message at any moment satisfies gates 2–
|
|
5683
|
+
* message at any moment satisfies gates 2–4 — so no shared coordination
|
|
5696
5684
|
* state is required.
|
|
5697
5685
|
*/
|
|
5698
5686
|
function IntelligenceIndicator(props) {
|
|
@@ -5715,7 +5703,7 @@ function IntelligenceIndicator(props) {
|
|
|
5715
5703
|
}, ISRUNNING_POLL_MS);
|
|
5716
5704
|
return () => clearInterval(interval);
|
|
5717
5705
|
}, [agent]);
|
|
5718
|
-
const [phase, setPhase] = (0, react.useState)(agent.isRunning ? "spinner" : "
|
|
5706
|
+
const [phase, setPhase] = (0, react.useState)(agent.isRunning ? "spinner" : "check");
|
|
5719
5707
|
(0, react.useEffect)(() => {
|
|
5720
5708
|
if (phase === "hidden") return void 0;
|
|
5721
5709
|
if (agent.isRunning) {
|
|
@@ -5725,23 +5713,6 @@ function IntelligenceIndicator(props) {
|
|
|
5725
5713
|
const t = setTimeout(() => setPhase("check"), RUN_IDLE_DEBOUNCE_MS);
|
|
5726
5714
|
return () => clearTimeout(t);
|
|
5727
5715
|
}, [agent.isRunning, phase]);
|
|
5728
|
-
(0, react.useEffect)(() => {
|
|
5729
|
-
if (phase !== "spinner") return void 0;
|
|
5730
|
-
const ourIdx = agent.messages.findIndex((m) => m.id === message.id);
|
|
5731
|
-
if (ourIdx < 0) return void 0;
|
|
5732
|
-
if (agent.messages.slice(ourIdx + 1).some((m) => {
|
|
5733
|
-
if (m.role !== "assistant") return false;
|
|
5734
|
-
if (!(typeof m.content === "string" && m.content.trim().length > 0)) return false;
|
|
5735
|
-
return !(Array.isArray(m.toolCalls) ? m.toolCalls : []).some((tc) => {
|
|
5736
|
-
const name = tc?.function?.name;
|
|
5737
|
-
return typeof name === "string" && DEFAULT_TOOL_PATTERNS.some((p) => p.test(name));
|
|
5738
|
-
});
|
|
5739
|
-
})) setPhase("check");
|
|
5740
|
-
}, [
|
|
5741
|
-
agent.messages,
|
|
5742
|
-
message.id,
|
|
5743
|
-
phase
|
|
5744
|
-
]);
|
|
5745
5716
|
(0, react.useEffect)(() => {
|
|
5746
5717
|
if (phase !== "check") return void 0;
|
|
5747
5718
|
const t = setTimeout(() => setPhase("fading"), CHECK_HOLD_MS);
|
|
@@ -10453,4 +10424,4 @@ Object.defineProperty(exports, 'useToast', {
|
|
|
10453
10424
|
return useToast;
|
|
10454
10425
|
}
|
|
10455
10426
|
});
|
|
10456
|
-
//# sourceMappingURL=copilotkit-
|
|
10427
|
+
//# sourceMappingURL=copilotkit-BP4xj-n_.cjs.map
|