@trops/dash-core 0.1.316 → 0.1.317

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
@@ -53787,11 +53787,36 @@ var WorkspaceMenu = function WorkspaceMenu(_ref) {
53787
53787
  * StreamingText
53788
53788
  *
53789
53789
  * Renders partial text with a blinking cursor while streaming is active.
53790
+ * Shows "Thinking..." when streaming has started but no text has arrived yet.
53790
53791
  */
53791
53792
  var StreamingText = function StreamingText(_ref) {
53792
53793
  var text = _ref.text,
53793
53794
  isStreaming = _ref.isStreaming;
53794
53795
  if (!text && !isStreaming) return null;
53796
+ if (isStreaming && !text) {
53797
+ return /*#__PURE__*/jsxRuntime.jsxs("span", {
53798
+ className: "flex items-center gap-2 text-gray-400 text-sm",
53799
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
53800
+ className: "inline-flex gap-1",
53801
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
53802
+ className: "w-1.5 h-1.5 rounded-full bg-indigo-400 animate-bounce",
53803
+ style: {
53804
+ animationDelay: "0ms"
53805
+ }
53806
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
53807
+ className: "w-1.5 h-1.5 rounded-full bg-indigo-400 animate-bounce",
53808
+ style: {
53809
+ animationDelay: "150ms"
53810
+ }
53811
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
53812
+ className: "w-1.5 h-1.5 rounded-full bg-indigo-400 animate-bounce",
53813
+ style: {
53814
+ animationDelay: "300ms"
53815
+ }
53816
+ })]
53817
+ }), "Thinking..."]
53818
+ });
53819
+ }
53795
53820
  return /*#__PURE__*/jsxRuntime.jsxs("span", {
53796
53821
  className: "whitespace-pre-wrap break-words",
53797
53822
  children: [text, isStreaming && /*#__PURE__*/jsxRuntime.jsx("span", {
@@ -53891,15 +53916,18 @@ var MessageBubble = function MessageBubble(_ref2) {
53891
53916
  }).map(function (c) {
53892
53917
  return c.text;
53893
53918
  }).join("") : "";
53894
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
53895
- className: "mb-4 pt-3 border-t border-gray-700/30",
53896
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
53897
- className: "text-[10px] font-semibold uppercase tracking-wider text-indigo-400 mb-1.5",
53898
- children: "You"
53899
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
53900
- className: "text-sm text-gray-100 whitespace-pre-wrap break-words leading-relaxed",
53901
- children: text
53902
- })]
53919
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53920
+ className: "flex justify-end mb-4",
53921
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
53922
+ className: "max-w-[85%]",
53923
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
53924
+ className: "text-[10px] font-semibold uppercase tracking-wider text-indigo-400 mb-1 text-right",
53925
+ children: "You"
53926
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
53927
+ className: "px-3 py-2 rounded-lg bg-indigo-700/40 text-sm text-gray-100 whitespace-pre-wrap break-words leading-relaxed",
53928
+ children: text
53929
+ })]
53930
+ })
53903
53931
  });
53904
53932
  }
53905
53933
  if (role === "assistant") {
@@ -53940,10 +53968,10 @@ var MessageBubble = function MessageBubble(_ref2) {
53940
53968
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
53941
53969
  className: "mb-4",
53942
53970
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
53943
- className: "text-[10px] font-semibold uppercase tracking-wider text-gray-500 mb-1.5",
53971
+ className: "text-[10px] font-semibold uppercase tracking-wider text-gray-500 mb-1",
53944
53972
  children: "Assistant"
53945
53973
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
53946
- className: "text-sm leading-relaxed",
53974
+ className: "text-sm leading-relaxed px-3 py-2 rounded-lg bg-gray-800/40",
53947
53975
  children: [isStreaming && /*#__PURE__*/jsxRuntime.jsx("div", {
53948
53976
  className: "text-gray-200",
53949
53977
  children: /*#__PURE__*/jsxRuntime.jsx(StreamingText, {
@@ -54161,7 +54189,9 @@ function ChatCore(_ref) {
54161
54189
  _ref$backend = _ref.backend,
54162
54190
  backend = _ref$backend === void 0 ? "anthropic" : _ref$backend,
54163
54191
  _ref$onPublishEvent = _ref.onPublishEvent,
54164
- onPublishEvent = _ref$onPublishEvent === void 0 ? null : _ref$onPublishEvent;
54192
+ onPublishEvent = _ref$onPublishEvent === void 0 ? null : _ref$onPublishEvent,
54193
+ _ref$hideToolsBanner = _ref.hideToolsBanner,
54194
+ hideToolsBanner = _ref$hideToolsBanner === void 0 ? false : _ref$hideToolsBanner;
54165
54195
  var mainApi = window.mainApi;
54166
54196
 
54167
54197
  // Conversation state
@@ -54626,7 +54656,7 @@ function ChatCore(_ref) {
54626
54656
  className: "px-3 py-1 text-xs rounded bg-yellow-800/60 hover:bg-yellow-700/60 text-yellow-200 border border-yellow-600/50 transition-colors",
54627
54657
  children: "Check Again"
54628
54658
  })]
54629
- }), isAnthropicBackend && !hasTools && apiKey && messages.length === 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
54659
+ }), !hideToolsBanner && isAnthropicBackend && !hasTools && apiKey && messages.length === 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
54630
54660
  className: "mx-3 mt-2 p-2 bg-gray-800/50 border border-gray-700 rounded text-gray-400 text-xs",
54631
54661
  children: "No MCP tools connected. Connect providers (GitHub, Slack, etc.) to enable tool-use."
54632
54662
  }), isCliBackend && cliAvailable && messages.length === 0 && /*#__PURE__*/jsxRuntime.jsx("div", {