@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.js CHANGED
@@ -2279,7 +2279,8 @@ function CopilotChatAssistantMessage({
2279
2279
  }
2280
2280
  );
2281
2281
  const hasContent = !!(message.content && message.content.trim().length > 0);
2282
- const shouldShowToolbar = toolbarVisible && hasContent;
2282
+ const isLatestAssistantMessage = message.role === "assistant" && messages?.[messages.length - 1]?.id === message.id;
2283
+ const shouldShowToolbar = toolbarVisible && hasContent && !(isRunning && isLatestAssistantMessage);
2283
2284
  if (children) {
2284
2285
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, { children: children({
2285
2286
  markdownRenderer: boundMarkdownRenderer,