@trops/dash-core 0.1.695 → 0.1.696

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
@@ -55722,7 +55722,9 @@ var BotDetail = function BotDetail(_ref) {
55722
55722
  _ref$gaps = _ref.gaps,
55723
55723
  gaps = _ref$gaps === void 0 ? null : _ref$gaps,
55724
55724
  _ref$canShowOnDashboa = _ref.canShowOnDashboard,
55725
- canShowOnDashboard = _ref$canShowOnDashboa === void 0 ? false : _ref$canShowOnDashboa;
55725
+ canShowOnDashboard = _ref$canShowOnDashboa === void 0 ? false : _ref$canShowOnDashboa,
55726
+ _ref$header = _ref.header,
55727
+ header = _ref$header === void 0 ? null : _ref$header;
55726
55728
  var _useState = React.useState(true),
55727
55729
  _useState2 = _slicedToArray(_useState, 2),
55728
55730
  showOnDashboard = _useState2[0],
@@ -56260,7 +56262,7 @@ var BotDetail = function BotDetail(_ref) {
56260
56262
  className: "flex flex-col flex-1 min-h-0",
56261
56263
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
56262
56264
  className: "flex-1 overflow-y-auto px-6 py-4 flex flex-col gap-4",
56263
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
56265
+ children: [header, /*#__PURE__*/jsxRuntime.jsxs("div", {
56264
56266
  className: "flex flex-col gap-2",
56265
56267
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
56266
56268
  className: "text-sm font-medium",
@@ -56280,6 +56282,10 @@ var BotDetail = function BotDetail(_ref) {
56280
56282
  onChange: setInstructions,
56281
56283
  placeholder: "What should this bot do?",
56282
56284
  rows: 5
56285
+ // Grow with the text — the form already scrolls; no scroll
56286
+ // inside a scroll.
56287
+ ,
56288
+ autoGrow: true
56283
56289
  })]
56284
56290
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
56285
56291
  className: "flex flex-col gap-2",
@@ -56637,76 +56643,81 @@ var DraftBanner = function DraftBanner(_ref) {
56637
56643
  });
56638
56644
  var dropped = draft.dropped || [];
56639
56645
  var notes = draft.notes || [];
56640
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
56641
- className: "mx-5 mt-4 rounded-lg border px-4 py-3 flex flex-col gap-2 text-sm ".concat(hairline),
56642
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
56643
- className: "flex flex-row items-start justify-between gap-3",
56646
+ return (
56647
+ /*#__PURE__*/
56648
+ // Rendered at the top of the bot form's scroll area (BotDetail header),
56649
+ // which supplies the side padding — no outer margin of its own.
56650
+ jsxRuntime.jsxs("div", {
56651
+ className: "rounded-lg border px-4 py-3 flex flex-col gap-2 text-sm ".concat(hairline),
56644
56652
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
56645
- className: "flex flex-col gap-1",
56653
+ className: "flex flex-row items-start justify-between gap-3",
56654
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
56655
+ className: "flex flex-col gap-1",
56656
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
56657
+ className: "font-medium",
56658
+ children: "Drafted by your team lead"
56659
+ }), draft.reasoning ? /*#__PURE__*/jsxRuntime.jsx("span", {
56660
+ className: muted,
56661
+ children: draft.reasoning
56662
+ }) : null]
56663
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button3, {
56664
+ title: "Discard draft",
56665
+ size: "xs",
56666
+ onClick: onDiscard
56667
+ })]
56668
+ }), draft.duplicateOf ? /*#__PURE__*/jsxRuntime.jsxs("span", {
56669
+ className: "text-amber-300",
56670
+ children: ["The team already has a bot named \"", draft.duplicateOf, "\" \u2014 you may want to adjust that one instead."]
56671
+ }) : null, suggestions.length ? /*#__PURE__*/jsxRuntime.jsxs("div", {
56672
+ className: "flex flex-col gap-0.5",
56646
56673
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
56647
- className: "font-medium",
56648
- children: "Drafted by your team lead"
56649
- }), draft.reasoning ? /*#__PURE__*/jsxRuntime.jsx("span", {
56650
- className: muted,
56651
- children: draft.reasoning
56674
+ className: "text-xs ".concat(muted),
56675
+ children: "Suggested providers and tools"
56676
+ }), suggestions.map(function (s) {
56677
+ return /*#__PURE__*/jsxRuntime.jsx("span", {
56678
+ className: "font-mono text-xs",
56679
+ children: "".concat(s.provider, ": ").concat(s.tools.length ? s.tools.join(", ") : "any tools").concat(s.toolsChecked ? "" : " (couldn't check these tools)")
56680
+ }, s.provider);
56681
+ })]
56682
+ }) : null, missing.length ? /*#__PURE__*/jsxRuntime.jsxs("div", {
56683
+ className: "flex flex-row flex-wrap items-center gap-2",
56684
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
56685
+ className: "text-amber-300",
56686
+ children: ["Needs a provider you don't have: ", missing.join(", ")]
56687
+ }), onOpenSettings ? /*#__PURE__*/jsxRuntime.jsx(DashReact.Button3, {
56688
+ title: "Open Settings \u203A Providers",
56689
+ size: "xs",
56690
+ onClick: function onClick() {
56691
+ return onOpenSettings("providers");
56692
+ }
56652
56693
  }) : null]
56653
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button3, {
56654
- title: "Discard draft",
56655
- size: "xs",
56656
- onClick: onDiscard
56657
- })]
56658
- }), draft.duplicateOf ? /*#__PURE__*/jsxRuntime.jsxs("span", {
56659
- className: "text-amber-300",
56660
- children: ["The team already has a bot named \"", draft.duplicateOf, "\" \u2014 you may want to adjust that one instead."]
56661
- }) : null, suggestions.length ? /*#__PURE__*/jsxRuntime.jsxs("div", {
56662
- className: "flex flex-col gap-0.5",
56663
- children: [/*#__PURE__*/jsxRuntime.jsx("span", {
56664
- className: "text-xs ".concat(muted),
56665
- children: "Suggested providers and tools"
56666
- }), suggestions.map(function (s) {
56667
- return /*#__PURE__*/jsxRuntime.jsx("span", {
56668
- className: "font-mono text-xs",
56669
- children: "".concat(s.provider, ": ").concat(s.tools.length ? s.tools.join(", ") : "any tools").concat(s.toolsChecked ? "" : " (couldn't check these tools)")
56670
- }, s.provider);
56671
- })]
56672
- }) : null, missing.length ? /*#__PURE__*/jsxRuntime.jsxs("div", {
56673
- className: "flex flex-row flex-wrap items-center gap-2",
56674
- children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
56675
- className: "text-amber-300",
56676
- children: ["Needs a provider you don't have: ", missing.join(", ")]
56677
- }), onOpenSettings ? /*#__PURE__*/jsxRuntime.jsx(DashReact.Button3, {
56678
- title: "Open Settings \u203A Providers",
56679
- size: "xs",
56680
- onClick: function onClick() {
56681
- return onOpenSettings("providers");
56682
- }
56683
- }) : null]
56684
- }) : null, notes.length ? /*#__PURE__*/jsxRuntime.jsxs("div", {
56685
- className: "flex flex-col gap-0.5",
56686
- children: [/*#__PURE__*/jsxRuntime.jsx("span", {
56687
- className: "text-xs ".concat(muted),
56688
- children: "Notes from the lead"
56689
- }), notes.map(function (n, i) {
56690
- return /*#__PURE__*/jsxRuntime.jsx("span", {
56691
- children: n
56692
- }, i);
56693
- })]
56694
- }) : null, dropped.length ? /*#__PURE__*/jsxRuntime.jsxs("div", {
56695
- className: "flex flex-col gap-0.5",
56696
- children: [/*#__PURE__*/jsxRuntime.jsx("span", {
56697
- className: "text-xs ".concat(muted),
56698
- children: "Left out"
56699
- }), dropped.map(function (d, i) {
56700
- return /*#__PURE__*/jsxRuntime.jsx("span", {
56694
+ }) : null, notes.length ? /*#__PURE__*/jsxRuntime.jsxs("div", {
56695
+ className: "flex flex-col gap-0.5",
56696
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
56701
56697
  className: "text-xs ".concat(muted),
56702
- children: d
56703
- }, i);
56698
+ children: "Notes from the lead"
56699
+ }), notes.map(function (n, i) {
56700
+ return /*#__PURE__*/jsxRuntime.jsx("span", {
56701
+ children: n
56702
+ }, i);
56703
+ })]
56704
+ }) : null, dropped.length ? /*#__PURE__*/jsxRuntime.jsxs("div", {
56705
+ className: "flex flex-col gap-0.5",
56706
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
56707
+ className: "text-xs ".concat(muted),
56708
+ children: "Left out"
56709
+ }), dropped.map(function (d, i) {
56710
+ return /*#__PURE__*/jsxRuntime.jsx("span", {
56711
+ className: "text-xs ".concat(muted),
56712
+ children: d
56713
+ }, i);
56714
+ })]
56715
+ }) : null, /*#__PURE__*/jsxRuntime.jsx("span", {
56716
+ className: "text-xs ".concat(muted),
56717
+ children: "Nothing is turned on until you accept it below and Save. Providers and tools start unselected."
56704
56718
  })]
56705
- }) : null, /*#__PURE__*/jsxRuntime.jsx("span", {
56706
- className: "text-xs ".concat(muted),
56707
- children: "Nothing is turned on until you accept it below and Save. Providers and tools start unselected."
56708
- })]
56709
- });
56719
+ })
56720
+ );
56710
56721
  };
56711
56722
 
56712
56723
  function ownKeys$v(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -58829,13 +58840,16 @@ var BotsView = function BotsView(_ref3) {
58829
58840
  onChangeModel: function onChangeModel() {
58830
58841
  return switchTab("settings");
58831
58842
  }
58832
- }) : null, tab === "settings" ? /*#__PURE__*/jsxRuntime.jsxs("div", {
58843
+ }) : null, tab === "settings" ? /*#__PURE__*/jsxRuntime.jsx("div", {
58833
58844
  className: "flex-1 min-h-0 flex flex-col",
58834
- children: [selectedDraft ? /*#__PURE__*/jsxRuntime.jsx(DraftBanner, {
58835
- draft: selectedDraft,
58836
- onDiscard: discardDraft,
58837
- onOpenSettings: onOpenSettings
58838
- }) : null, /*#__PURE__*/jsxRuntime.jsx(BotDetail, {
58845
+ children: /*#__PURE__*/jsxRuntime.jsx(BotDetail
58846
+ // The lead's banner scrolls with the form (not pinned).
58847
+ , {
58848
+ header: selectedDraft ? /*#__PURE__*/jsxRuntime.jsx(DraftBanner, {
58849
+ draft: selectedDraft,
58850
+ onDiscard: discardDraft,
58851
+ onOpenSettings: onOpenSettings
58852
+ }) : null,
58839
58853
  bot: selected || selectedDraft && selectedDraft.definition || null,
58840
58854
  isCreating: !selected,
58841
58855
  suggestions: selectedDraft ? selectedDraft.suggestions : null,
@@ -58854,7 +58868,7 @@ var BotsView = function BotsView(_ref3) {
58854
58868
  return k + 1;
58855
58869
  });
58856
58870
  }
58857
- }, "".concat(selected ? selected.id : selectedId || NEW_BOT, "-").concat(formKey))]
58871
+ }, "".concat(selected ? selected.id : selectedId || NEW_BOT, "-").concat(formKey))
58858
58872
  }) : null]
58859
58873
  })]
58860
58874
  }), /*#__PURE__*/jsxRuntime.jsx(DashReact.ConfirmationModal, {