@copilotkit/core 1.56.4-canary.1777538870 → 1.56.5
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.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/index.umd.js
CHANGED
|
@@ -1317,14 +1317,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1317
1317
|
var _agent$messages$lengt, _agent$messages;
|
|
1318
1318
|
this.clearSuggestions(agentId);
|
|
1319
1319
|
const agent = consumerAgent !== null && consumerAgent !== void 0 ? consumerAgent : this.core.getAgent(agentId);
|
|
1320
|
-
|
|
1321
|
-
const messageCount = (_agent$messages$lengt = (_agent$messages = agent.messages) === null || _agent$messages === void 0 ? void 0 : _agent$messages.length) !== null && _agent$messages$lengt !== void 0 ? _agent$messages$lengt : 0;
|
|
1320
|
+
const messageCount = (_agent$messages$lengt = agent === null || agent === void 0 || (_agent$messages = agent.messages) === null || _agent$messages === void 0 ? void 0 : _agent$messages.length) !== null && _agent$messages$lengt !== void 0 ? _agent$messages$lengt : 0;
|
|
1322
1321
|
let hasAnySuggestions = false;
|
|
1323
1322
|
for (const config of Object.values(this._suggestionsConfig)) {
|
|
1324
1323
|
if (config.consumerAgentId !== void 0 && config.consumerAgentId !== "*" && config.consumerAgentId !== agentId) continue;
|
|
1325
1324
|
if (!this.shouldShowSuggestions(config, messageCount)) continue;
|
|
1326
1325
|
const suggestionId = (0, _copilotkit_shared.randomUUID)();
|
|
1327
1326
|
if (isDynamicSuggestionsConfig(config)) {
|
|
1327
|
+
if (!agent) continue;
|
|
1328
1328
|
if (!hasAnySuggestions) {
|
|
1329
1329
|
hasAnySuggestions = true;
|
|
1330
1330
|
this.notifySuggestionsStartedLoading(agentId);
|