@nextclaw/agent-chat-ui 0.4.4 → 0.4.6
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 +11 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -568,7 +568,7 @@ function ChatInputBarSkillPicker(props) {
|
|
|
568
568
|
children: [
|
|
569
569
|
/* @__PURE__ */ jsx(BrainCircuit, { className: "h-4 w-4" }),
|
|
570
570
|
/* @__PURE__ */ jsx("span", {
|
|
571
|
-
className: "hidden sm:inline",
|
|
571
|
+
className: "nextclaw-chat-skill-picker-label hidden sm:inline [@container_nextclaw-chat-input-bar_(max-width:440px)]:hidden",
|
|
572
572
|
children: picker.title
|
|
573
573
|
}),
|
|
574
574
|
selectedCount > 0 ? /* @__PURE__ */ jsx("span", {
|
|
@@ -695,7 +695,7 @@ function AccessoryIcon({ icon }) {
|
|
|
695
695
|
return icon === "paperclip" ? /* @__PURE__ */ jsx(Paperclip, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ToolbarIcon, { icon });
|
|
696
696
|
}
|
|
697
697
|
const TRIGGER_WIDTH_BY_KEY = {
|
|
698
|
-
model: "min-w-0 flex-1 sm:
|
|
698
|
+
model: "min-w-0 max-w-full flex-1 basis-[12rem] sm:max-w-[320px]",
|
|
699
699
|
"session-type": "shrink-0",
|
|
700
700
|
thinking: "shrink-0"
|
|
701
701
|
};
|
|
@@ -720,17 +720,19 @@ function ToolbarSelect({ item }) {
|
|
|
720
720
|
onValueChange: item.onValueChange,
|
|
721
721
|
disabled: item.disabled,
|
|
722
722
|
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
723
|
-
|
|
723
|
+
"aria-label": item.selectedLabel ? `${item.placeholder}: ${item.selectedLabel}` : item.placeholder,
|
|
724
|
+
title: item.selectedLabel,
|
|
725
|
+
className: `nextclaw-chat-toolbar-select-trigger h-8 w-auto rounded-lg border-0 bg-transparent px-2 text-xs font-medium text-gray-600 shadow-none hover:bg-gray-100 focus:ring-0 sm:px-3 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!basis-8 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!justify-center [@container_nextclaw-chat-input-bar_(max-width:440px)]:!max-w-8 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!min-w-8 [@container_nextclaw-chat-input-bar_(max-width:440px)]:!px-0 ${TRIGGER_WIDTH_BY_KEY[item.key] ?? ""}`,
|
|
724
726
|
children: item.selectedLabel ? /* @__PURE__ */ jsxs("div", {
|
|
725
727
|
className: "flex min-w-0 items-center gap-2 text-left",
|
|
726
728
|
children: [
|
|
727
729
|
/* @__PURE__ */ jsx(ToolbarIcon, { icon: item.icon }),
|
|
728
730
|
/* @__PURE__ */ jsx("span", {
|
|
729
|
-
className: "truncate text-xs font-semibold text-gray-700 sm:hidden",
|
|
731
|
+
className: "nextclaw-chat-toolbar-mobile-label truncate text-xs font-semibold text-gray-700 sm:hidden [@container_nextclaw-chat-input-bar_(max-width:440px)]:hidden",
|
|
730
732
|
children: mobileSelectedLabel
|
|
731
733
|
}),
|
|
732
734
|
/* @__PURE__ */ jsx("span", {
|
|
733
|
-
className: "hidden truncate text-xs font-semibold text-gray-700 sm:inline",
|
|
735
|
+
className: "nextclaw-chat-toolbar-label hidden truncate text-xs font-semibold text-gray-700 sm:inline [@container_nextclaw-chat-input-bar_(max-width:440px)]:hidden",
|
|
734
736
|
children: item.selectedLabel
|
|
735
737
|
})
|
|
736
738
|
]
|
|
@@ -770,9 +772,9 @@ function ToolbarSelect({ item }) {
|
|
|
770
772
|
function ChatInputBarToolbar({ actions, accessories, selects, skillPicker }) {
|
|
771
773
|
const { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } = ChatUiPrimitives;
|
|
772
774
|
return /* @__PURE__ */ jsxs("div", {
|
|
773
|
-
className: "flex items-
|
|
775
|
+
className: "flex flex-wrap items-end justify-between gap-2 px-3 pb-3",
|
|
774
776
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
775
|
-
className: "flex min-w-
|
|
777
|
+
className: "flex min-w-[12rem] flex-1 flex-wrap items-center gap-1 overflow-hidden",
|
|
776
778
|
children: [
|
|
777
779
|
skillPicker ? /* @__PURE__ */ jsx(ChatInputBarSkillPicker, { picker: skillPicker }) : null,
|
|
778
780
|
selects.map((item) => /* @__PURE__ */ jsx(ToolbarSelect, { item }, item.key)),
|
|
@@ -1934,9 +1936,9 @@ const ChatInputBar = forwardRef(function ChatInputBar(props, ref) {
|
|
|
1934
1936
|
focusComposerAtEnd: () => composerRef.current?.focusComposerAtEnd()
|
|
1935
1937
|
}), []);
|
|
1936
1938
|
return /* @__PURE__ */ jsx("div", {
|
|
1937
|
-
className: "border-t border-gray-200/80 bg-white
|
|
1939
|
+
className: "border-t border-gray-200/80 bg-white px-3 py-3 sm:px-4 sm:py-4",
|
|
1938
1940
|
children: /* @__PURE__ */ jsx("div", {
|
|
1939
|
-
className: "mx-auto w-full max-w-[min(1120px,100%)]",
|
|
1941
|
+
className: "nextclaw-chat-input-bar-shell mx-auto w-full max-w-[min(1120px,100%)] [container:nextclaw-chat-input-bar/inline-size]",
|
|
1940
1942
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1941
1943
|
className: "overflow-hidden rounded-2xl border border-gray-200 bg-white shadow-card",
|
|
1942
1944
|
children: [
|