@lukeashford/aurelius 3.4.0 → 3.5.0

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
@@ -4461,7 +4461,7 @@ ChatView.displayName = "ChatView";
4461
4461
 
4462
4462
  // src/components/chat/ChatInput.tsx
4463
4463
  import React59, { useCallback as useCallback13, useEffect as useEffect10, useRef as useRef8, useState as useState13 } from "react";
4464
- import { Paperclip, Send, Square } from "lucide-react";
4464
+ import { Paperclip, Send, Square, X as X5 } from "lucide-react";
4465
4465
 
4466
4466
  // src/components/chat/types.ts
4467
4467
  function isImageFile(file) {
@@ -4643,6 +4643,8 @@ var ChatInput = React59.forwardRef(
4643
4643
  onAttachmentsChange,
4644
4644
  showAttachmentButton = true,
4645
4645
  acceptedFileTypes,
4646
+ notice,
4647
+ onInputChange,
4646
4648
  className,
4647
4649
  ...rest
4648
4650
  }, ref) => {
@@ -4689,10 +4691,11 @@ var ChatInput = React59.forwardRef(
4689
4691
  );
4690
4692
  const handleChange = useCallback13((e) => {
4691
4693
  setValue(e.target.value);
4694
+ onInputChange?.(e.target.value);
4692
4695
  const textarea = e.target;
4693
4696
  textarea.style.height = "auto";
4694
4697
  textarea.style.height = `${Math.min(textarea.scrollHeight, 200)}px`;
4695
- }, []);
4698
+ }, [onInputChange]);
4696
4699
  useEffect10(() => {
4697
4700
  if (!disabled && !isStreaming && textareaRef.current) {
4698
4701
  textareaRef.current.focus();
@@ -4776,6 +4779,23 @@ var ChatInput = React59.forwardRef(
4776
4779
  ...rest
4777
4780
  },
4778
4781
  isCentered && helperText && /* @__PURE__ */ React59.createElement("p", { className: "text-silver text-sm mb-4 text-center" }, helperText),
4782
+ notice && /* @__PURE__ */ React59.createElement("div", { className: cx(
4783
+ "w-full flex items-start gap-2 px-3 py-2 mb-1 text-xs",
4784
+ isCentered && "max-w-lg",
4785
+ notice.variant === "warning" ? "bg-gold/5 border border-gold/20 text-gold/80" : "bg-error/10 border border-error/30 text-error"
4786
+ ) }, /* @__PURE__ */ React59.createElement("span", { className: "flex-1" }, notice.content), (notice.dismissible ?? notice.variant === "warning") && notice.onDismiss && /* @__PURE__ */ React59.createElement(
4787
+ "button",
4788
+ {
4789
+ type: "button",
4790
+ onClick: notice.onDismiss,
4791
+ "aria-label": "Dismiss",
4792
+ className: cx(
4793
+ "shrink-0 opacity-60 hover:opacity-100 transition-opacity",
4794
+ notice.variant === "warning" ? "text-gold" : "text-error"
4795
+ )
4796
+ },
4797
+ /* @__PURE__ */ React59.createElement(X5, { className: "w-3 h-3" })
4798
+ )),
4779
4799
  /* @__PURE__ */ React59.createElement(
4780
4800
  "div",
4781
4801
  {
@@ -6121,8 +6141,17 @@ ToolSidebar.displayName = "ToolSidebar";
6121
6141
  // src/components/chat/ToolPanelContainer.tsx
6122
6142
  import React72, { useCallback as useCallback17, useEffect as useEffect13, useRef as useRef11, useState as useState18 } from "react";
6123
6143
  var ToolPanelContainer = React72.forwardRef(
6124
- ({ topContent, bottomContent, width, onResizeStart, side = "right", className, ...rest }, ref) => {
6125
- const [topPercent, setTopPercent] = useState18(60);
6144
+ ({
6145
+ topContent,
6146
+ bottomContent,
6147
+ width,
6148
+ onResizeStart,
6149
+ side = "right",
6150
+ className,
6151
+ initialTopPercent = 60,
6152
+ ...rest
6153
+ }, ref) => {
6154
+ const [topPercent, setTopPercent] = useState18(initialTopPercent);
6126
6155
  const [isResizingHeight, setIsResizingHeight] = useState18(false);
6127
6156
  const containerRef = useRef11(null);
6128
6157
  const lastY = useRef11(null);
@@ -6324,6 +6353,8 @@ var ChatInterface = React73.forwardRef(
6324
6353
  tasks = [],
6325
6354
  tasksTitle,
6326
6355
  onStopAllTasks,
6356
+ inputNotice,
6357
+ onInputChange,
6327
6358
  tools: externalTools = [],
6328
6359
  className,
6329
6360
  ...rest
@@ -6353,9 +6384,9 @@ var ChatInterface = React73.forwardRef(
6353
6384
  width: rightToolsWidth,
6354
6385
  startResizing: startResizingRightTools
6355
6386
  } = useResizable({
6356
- initialWidthPercent: 50,
6357
- minWidthPercent: 25,
6358
- maxWidthPercent: 70,
6387
+ initialWidthPercent: 40,
6388
+ minWidthPercent: 30,
6389
+ maxWidthPercent: 80,
6359
6390
  direction: "left"
6360
6391
  });
6361
6392
  const {
@@ -6448,10 +6479,7 @@ var ChatInterface = React73.forwardRef(
6448
6479
  if (c.status !== p.status || c.label !== p.label) {
6449
6480
  return true;
6450
6481
  }
6451
- if (c.subtasks && hasNewOrUpdatedTask(c.subtasks, p?.subtasks || [])) {
6452
- return true;
6453
- }
6454
- return false;
6482
+ return !!(c.subtasks && hasNewOrUpdatedTask(c.subtasks, p?.subtasks || []));
6455
6483
  });
6456
6484
  };
6457
6485
  if (hasNewOrUpdatedTask(tasks, prevTasksRef.current) && !dismissedToolsRef.current.has("todos")) {
@@ -6584,7 +6612,15 @@ var ChatInterface = React73.forwardRef(
6584
6612
  }
6585
6613
  );
6586
6614
  case "todos":
6587
- return tasks.length > 0 ? /* @__PURE__ */ React73.createElement(TodosList, { tasks, title: tasksTitle, onStopAllTasks, className: "h-full" }) : /* @__PURE__ */ React73.createElement("div", { className: "h-full flex flex-col" }, /* @__PURE__ */ React73.createElement("div", { className: "flex items-center p-4 border-b border-ash/40 shrink-0" }, /* @__PURE__ */ React73.createElement("h3", { className: "text-xs font-medium text-white" }, "Tasks")), /* @__PURE__ */ React73.createElement("div", { className: "flex-1 flex items-center justify-center" }, /* @__PURE__ */ React73.createElement("p", { className: "text-xs text-silver/60" }, "No tasks")));
6615
+ return tasks.length > 0 ? /* @__PURE__ */ React73.createElement(
6616
+ TodosList,
6617
+ {
6618
+ tasks,
6619
+ title: tasksTitle,
6620
+ onStopAllTasks,
6621
+ className: "h-full"
6622
+ }
6623
+ ) : /* @__PURE__ */ React73.createElement("div", { className: "h-full flex flex-col" }, /* @__PURE__ */ React73.createElement("div", { className: "flex items-center p-4 border-b border-ash/40 shrink-0" }, /* @__PURE__ */ React73.createElement("h3", { className: "text-xs font-medium text-white" }, "Tasks")), /* @__PURE__ */ React73.createElement("div", { className: "flex-1 flex items-center justify-center" }, /* @__PURE__ */ React73.createElement("p", { className: "text-xs text-silver/60" }, "No tasks")));
6588
6624
  default: {
6589
6625
  const externalTool = externalTools.find((t) => t.id === toolId);
6590
6626
  return externalTool?.content ?? null;
@@ -6614,7 +6650,8 @@ var ChatInterface = React73.forwardRef(
6614
6650
  bottomContent: renderToolContent(activeTools["bottom-left"]),
6615
6651
  width: leftToolsWidth,
6616
6652
  onResizeStart: startResizingLeftTools,
6617
- side: "left"
6653
+ side: "left",
6654
+ initialTopPercent: 30
6618
6655
  }
6619
6656
  ),
6620
6657
  /* @__PURE__ */ React73.createElement("div", { className: "flex-1 flex flex-col min-w-0 relative" }, /* @__PURE__ */ React73.createElement("div", { className: cx(
@@ -6650,7 +6687,9 @@ var ChatInterface = React73.forwardRef(
6650
6687
  onStop,
6651
6688
  showAttachmentButton,
6652
6689
  attachments: propsAttachments,
6653
- onAttachmentsChange
6690
+ onAttachmentsChange,
6691
+ notice: inputNotice,
6692
+ onInputChange
6654
6693
  }
6655
6694
  )), /* @__PURE__ */ React73.createElement("div", { className: cx(
6656
6695
  "transition-all duration-500 ease-in-out",
@@ -6663,7 +6702,8 @@ var ChatInterface = React73.forwardRef(
6663
6702
  bottomContent: renderToolContent(activeTools["bottom-right"]),
6664
6703
  width: rightToolsWidth,
6665
6704
  onResizeStart: startResizingRightTools,
6666
- side: "right"
6705
+ side: "right",
6706
+ initialTopPercent: 70
6667
6707
  }
6668
6708
  ),
6669
6709
  hasRightTools && /* @__PURE__ */ React73.createElement(
@@ -6682,7 +6722,7 @@ ChatInterface.displayName = "ChatInterface";
6682
6722
 
6683
6723
  // src/components/chat/MessageActions.tsx
6684
6724
  import React74, { useCallback as useCallback20, useState as useState21 } from "react";
6685
- import { Check as Check3, Copy, Pencil, RotateCcw, Send as Send2, X as X5 } from "lucide-react";
6725
+ import { Check as Check3, Copy, Pencil, RotateCcw, Send as Send2, X as X6 } from "lucide-react";
6686
6726
  var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */ React74.createElement(
6687
6727
  "button",
6688
6728
  {
@@ -6803,7 +6843,7 @@ var MessageActions = React74.forwardRef(
6803
6843
  label: "Cancel edit",
6804
6844
  className: "text-silver/60 hover:text-error"
6805
6845
  },
6806
- /* @__PURE__ */ React74.createElement(X5, { className: "w-4 h-4" })
6846
+ /* @__PURE__ */ React74.createElement(X6, { className: "w-4 h-4" })
6807
6847
  ), /* @__PURE__ */ React74.createElement(
6808
6848
  ActionButton2,
6809
6849
  {