@copilotkitnext/react 0.0.15 → 0.0.16

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.mjs CHANGED
@@ -2238,7 +2238,8 @@ function CopilotChatAssistantMessage({
2238
2238
  }
2239
2239
  );
2240
2240
  const hasContent = !!(message.content && message.content.trim().length > 0);
2241
- const shouldShowToolbar = toolbarVisible && hasContent;
2241
+ const isLatestAssistantMessage = message.role === "assistant" && messages?.[messages.length - 1]?.id === message.id;
2242
+ const shouldShowToolbar = toolbarVisible && hasContent && !(isRunning && isLatestAssistantMessage);
2242
2243
  if (children) {
2243
2244
  return /* @__PURE__ */ jsx12(Fragment3, { children: children({
2244
2245
  markdownRenderer: boundMarkdownRenderer,