@ciridae/ui-agent 0.3.0 → 0.3.2
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/components/agentic/agent-queue.js +1 -1
- package/dist/components/agentic/artifact.js +4 -4
- package/dist/components/agentic/attachments.js +3 -3
- package/dist/components/agentic/code-block.js +4 -4
- package/dist/components/agentic/message.js +11 -11
- package/dist/components/agentic/prompt-input.js +7 -6
- package/dist/components/agentic/sources.js +9 -9
- package/package.json +4 -4
|
@@ -39,7 +39,7 @@ function AgentQueueItemActions({ className, ...props }) {
|
|
|
39
39
|
return (_jsx("div", { "data-slot": "agent-queue-item-actions", className: cn("flex gap-1", className), ...props }));
|
|
40
40
|
}
|
|
41
41
|
function AgentQueueItemAction({ className, type = "button", ...props }) {
|
|
42
|
-
return (_jsx(Button, { className: cn("size-7 opacity-0 group-
|
|
42
|
+
return (_jsx(Button, { className: cn("size-7 opacity-0 group-focus-within:opacity-100 group-hover:opacity-100 focus-visible:opacity-100", className), size: "icon-sm", type: type, variant: "ghost", ...props }));
|
|
43
43
|
}
|
|
44
44
|
function AgentQueueItemAttachment({ className, ...props }) {
|
|
45
45
|
return (_jsx("div", { "data-slot": "agent-queue-item-attachment", className: cn("ml-6 flex flex-wrap gap-2", className), ...props }));
|
|
@@ -25,11 +25,11 @@ const artifactHeaderClassName = css({
|
|
|
25
25
|
borderBottomStyle: "solid",
|
|
26
26
|
borderBottomWidth: "default",
|
|
27
27
|
display: "flex",
|
|
28
|
-
gap: "
|
|
28
|
+
gap: "3",
|
|
29
29
|
justifyContent: "space-between",
|
|
30
30
|
minWidth: 0,
|
|
31
|
-
paddingBlock: "
|
|
32
|
-
paddingInline: "
|
|
31
|
+
paddingBlock: "3",
|
|
32
|
+
paddingInline: "4",
|
|
33
33
|
});
|
|
34
34
|
const artifactTitleClassName = css({
|
|
35
35
|
fontSize: "sm",
|
|
@@ -52,7 +52,7 @@ const artifactContentClassName = css({
|
|
|
52
52
|
flex: 1,
|
|
53
53
|
minHeight: 0,
|
|
54
54
|
overflow: "auto",
|
|
55
|
-
padding: "
|
|
55
|
+
padding: "4",
|
|
56
56
|
});
|
|
57
57
|
function Artifact({ className, ...props }) {
|
|
58
58
|
return _jsx("div", { "data-slot": "artifact", className: cn(artifactClassName, className), ...props });
|
|
@@ -202,7 +202,7 @@ function Attachment({ attachment, children, className, data, onRemove, ...props
|
|
|
202
202
|
if (!contextValue)
|
|
203
203
|
return null;
|
|
204
204
|
return (_jsx(AttachmentItemContext.Provider, { value: contextValue, children: _jsx("div", { "data-kind": contextValue.data.kind, "data-slot": "attachment", "data-status": contextValue.data.status, "data-variant": variant, className: cn("group/attachment relative min-w-0 text-sm text-foreground", variant === "grid" && "size-24 overflow-hidden rounded-lg border bg-muted/40", variant === "inline" && [
|
|
205
|
-
"flex h-8 max-w-full cursor-pointer
|
|
205
|
+
"flex h-8 max-w-full cursor-pointer items-center gap-1.5 rounded-md border bg-background px-1.5 select-none",
|
|
206
206
|
"font-medium transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
207
207
|
], variant === "list" && [
|
|
208
208
|
"flex w-full items-center gap-3 rounded-lg border bg-background p-3 transition-colors",
|
|
@@ -250,11 +250,11 @@ function AttachmentRemove({ attachmentId, children, className, label = "Remove",
|
|
|
250
250
|
controller?.remove(resolvedAttachmentId);
|
|
251
251
|
}, size: size ?? getAttachmentRemoveSize(attachmentVariant), type: type, variant: buttonVariant, className: cn(attachmentVariant === "grid" && [
|
|
252
252
|
"absolute top-2 right-2 size-6 rounded-full bg-background/90 p-0 opacity-0 shadow-sm transition-opacity",
|
|
253
|
-
"group-
|
|
253
|
+
"group-focus-within/attachment:opacity-100 group-hover/attachment:opacity-100",
|
|
254
254
|
"hover:bg-background [&>svg]:size-3",
|
|
255
255
|
], attachmentVariant === "inline" && [
|
|
256
256
|
"absolute top-1/2 right-0.5 size-4 -translate-y-1/2 rounded p-0 opacity-0 transition-opacity",
|
|
257
|
-
"group-
|
|
257
|
+
"group-focus-within/attachment:opacity-100 group-hover/attachment:opacity-100",
|
|
258
258
|
"[&>svg]:size-2.5",
|
|
259
259
|
], attachmentVariant === "list" && "size-8 shrink-0 rounded p-0 [&>svg]:size-4", className), ...props, children: [children ?? _jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: label })] }));
|
|
260
260
|
}
|
|
@@ -24,11 +24,11 @@ const codeBlockHeaderClassName = css({
|
|
|
24
24
|
borderBottomStyle: "solid",
|
|
25
25
|
borderBottomWidth: "default",
|
|
26
26
|
display: "flex",
|
|
27
|
-
gap: "
|
|
27
|
+
gap: "3",
|
|
28
28
|
justifyContent: "space-between",
|
|
29
29
|
minWidth: 0,
|
|
30
|
-
paddingBlock: "
|
|
31
|
-
paddingInline: "
|
|
30
|
+
paddingBlock: "2",
|
|
31
|
+
paddingInline: "3",
|
|
32
32
|
});
|
|
33
33
|
const codeBlockTitleClassName = css({
|
|
34
34
|
fontSize: "sm",
|
|
@@ -65,7 +65,7 @@ const codeBlockContentInnerClassName = css({
|
|
|
65
65
|
fontFamily: "mono",
|
|
66
66
|
lineHeight: "1.5rem",
|
|
67
67
|
minWidth: "max-content",
|
|
68
|
-
padding: "
|
|
68
|
+
padding: "4",
|
|
69
69
|
});
|
|
70
70
|
const codeBlockLanguageTriggerClassName = css({
|
|
71
71
|
height: "control.sm",
|
|
@@ -27,7 +27,7 @@ const messageResponseAnimation = {
|
|
|
27
27
|
const messageClassName = css({
|
|
28
28
|
display: "flex",
|
|
29
29
|
flexDirection: "column",
|
|
30
|
-
gap: "
|
|
30
|
+
gap: "2",
|
|
31
31
|
width: "full",
|
|
32
32
|
"&[data-role='user']": {
|
|
33
33
|
alignItems: "flex-end",
|
|
@@ -37,7 +37,7 @@ const messageClassName = css({
|
|
|
37
37
|
},
|
|
38
38
|
"&[data-role='system']": {
|
|
39
39
|
alignItems: "flex-start",
|
|
40
|
-
paddingBlock: "
|
|
40
|
+
paddingBlock: "1",
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
43
|
const messageContentVariants = cva({
|
|
@@ -55,8 +55,8 @@ const messageContentVariants = cva({
|
|
|
55
55
|
boxShadow: "xs",
|
|
56
56
|
color: "secondary.foreground",
|
|
57
57
|
maxWidth: "min(34rem, 78%)",
|
|
58
|
-
paddingBlock: "
|
|
59
|
-
paddingInline: "
|
|
58
|
+
paddingBlock: "3",
|
|
59
|
+
paddingInline: "4",
|
|
60
60
|
},
|
|
61
61
|
".group\\/message[data-role='assistant'] &": {
|
|
62
62
|
color: "foreground",
|
|
@@ -70,8 +70,8 @@ const messageContentVariants = cva({
|
|
|
70
70
|
color: "muted.foreground",
|
|
71
71
|
fontSize: "xs",
|
|
72
72
|
maxWidth: "full",
|
|
73
|
-
paddingBlock: "
|
|
74
|
-
paddingInline: "
|
|
73
|
+
paddingBlock: "2",
|
|
74
|
+
paddingInline: "3",
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
variants: {
|
|
@@ -85,8 +85,8 @@ const messageContentVariants = cva({
|
|
|
85
85
|
borderWidth: "default",
|
|
86
86
|
boxShadow: "xs",
|
|
87
87
|
color: "card.foreground",
|
|
88
|
-
paddingBlock: "
|
|
89
|
-
paddingInline: "
|
|
88
|
+
paddingBlock: "3",
|
|
89
|
+
paddingInline: "4",
|
|
90
90
|
},
|
|
91
91
|
},
|
|
92
92
|
},
|
|
@@ -100,7 +100,7 @@ const messageActionsClassName = css({
|
|
|
100
100
|
gap: "gap.1",
|
|
101
101
|
});
|
|
102
102
|
const messageResponseCodeBlockClassName = css({
|
|
103
|
-
marginBlock: "
|
|
103
|
+
marginBlock: "4",
|
|
104
104
|
});
|
|
105
105
|
const messageResponseCodeTitleClassName = css({
|
|
106
106
|
color: "muted.foreground",
|
|
@@ -110,9 +110,9 @@ const messageResponseCodeTitleClassName = css({
|
|
|
110
110
|
const messageToolbarClassName = css({
|
|
111
111
|
alignItems: "center",
|
|
112
112
|
display: "flex",
|
|
113
|
-
gap: "
|
|
113
|
+
gap: "3",
|
|
114
114
|
justifyContent: "space-between",
|
|
115
|
-
marginTop: "
|
|
115
|
+
marginTop: "1",
|
|
116
116
|
maxWidth: "full",
|
|
117
117
|
width: "full",
|
|
118
118
|
".group\\/message[data-role='user'] &": {
|
|
@@ -26,9 +26,9 @@ const promptInputClassName = css({
|
|
|
26
26
|
borderWidth: "default",
|
|
27
27
|
boxShadow: "xs",
|
|
28
28
|
display: "grid",
|
|
29
|
-
gap: "
|
|
29
|
+
gap: "2",
|
|
30
30
|
outline: "none",
|
|
31
|
-
padding: "
|
|
31
|
+
padding: "2",
|
|
32
32
|
transitionProperty: "color, box-shadow",
|
|
33
33
|
width: "full",
|
|
34
34
|
"&:focus-within": {
|
|
@@ -44,6 +44,7 @@ const promptInputBodyClassName = css({
|
|
|
44
44
|
backgroundColor: "transparent",
|
|
45
45
|
borderWidth: 0,
|
|
46
46
|
boxShadow: "none",
|
|
47
|
+
flexDirection: "column",
|
|
47
48
|
minHeight: "6rem",
|
|
48
49
|
_dark: {
|
|
49
50
|
backgroundColor: "transparent",
|
|
@@ -53,8 +54,8 @@ const promptInputTextareaClassName = css({
|
|
|
53
54
|
fontSize: "sm",
|
|
54
55
|
lineHeight: "relaxed",
|
|
55
56
|
minHeight: "6rem",
|
|
56
|
-
paddingBlock: "
|
|
57
|
-
paddingInline: "
|
|
57
|
+
paddingBlock: "2",
|
|
58
|
+
paddingInline: "2",
|
|
58
59
|
"&::placeholder": {
|
|
59
60
|
color: "muted.foreground/70",
|
|
60
61
|
},
|
|
@@ -130,7 +131,7 @@ function getPromptInputFormText(form, fallback = "") {
|
|
|
130
131
|
return typeof message === "string" ? message : fallback;
|
|
131
132
|
}
|
|
132
133
|
function PromptInputBody({ className, ...props }) {
|
|
133
|
-
return (_jsx(InputGroup, { "data-slot": "prompt-input-body", className: cn(promptInputBodyClassName, className), ...props }));
|
|
134
|
+
return (_jsx(InputGroup, { "data-slot": "prompt-input-body", className: cn(promptInputBodyClassName, "items-stretch!", className), ...props }));
|
|
134
135
|
}
|
|
135
136
|
function PromptInputTextarea({ className, disabled, onKeyDown, onPaste, onValueChange, value, ...props }) {
|
|
136
137
|
const context = React.useContext(PromptInputContext);
|
|
@@ -184,7 +185,7 @@ function PromptInputFooter({ className, ...props }) {
|
|
|
184
185
|
return (_jsx("div", { "data-slot": "prompt-input-footer", className: cn("flex min-w-0 items-center justify-between gap-2 px-1", className), ...props }));
|
|
185
186
|
}
|
|
186
187
|
function PromptInputTools({ align = "block-end", className, ...props }) {
|
|
187
|
-
return (_jsx(InputGroupAddon, { align: align, "data-slot": "prompt-input-tools", className: cn("min-w-0 justify-between gap-2 px-0 pb-0", className), ...props }));
|
|
188
|
+
return (_jsx(InputGroupAddon, { align: align, "data-slot": "prompt-input-tools", className: cn("min-w-0 justify-between! gap-2 px-0 pb-0", className), ...props }));
|
|
188
189
|
}
|
|
189
190
|
function PromptInputButton({ children, className, label, size = "icon-sm", tooltip, variant = "ghost", ...props }) {
|
|
190
191
|
const button = (_jsx(InputGroupButton, { "aria-label": label ?? tooltip, "data-slot": "prompt-input-button", size: size, variant: variant, className: cn("shrink-0 text-muted-foreground", className), ...props, children: children }));
|
|
@@ -13,10 +13,10 @@ const sourcesTriggerClassName = css({
|
|
|
13
13
|
color: "card.foreground",
|
|
14
14
|
display: "flex",
|
|
15
15
|
fontSize: "sm",
|
|
16
|
-
gap: "
|
|
16
|
+
gap: "3",
|
|
17
17
|
justifyContent: "space-between",
|
|
18
|
-
paddingBlock: "
|
|
19
|
-
paddingInline: "
|
|
18
|
+
paddingBlock: "2",
|
|
19
|
+
paddingInline: "3",
|
|
20
20
|
transitionProperty: "color, background-color",
|
|
21
21
|
width: "full",
|
|
22
22
|
"&:hover": {
|
|
@@ -31,7 +31,7 @@ const sourcesTriggerClassName = css({
|
|
|
31
31
|
const sourcesTriggerLabelClassName = css({
|
|
32
32
|
alignItems: "center",
|
|
33
33
|
display: "flex",
|
|
34
|
-
gap: "
|
|
34
|
+
gap: "2",
|
|
35
35
|
minWidth: 0,
|
|
36
36
|
});
|
|
37
37
|
const sourcesIconClassName = css({
|
|
@@ -57,8 +57,8 @@ const sourcesChevronClassName = css({
|
|
|
57
57
|
});
|
|
58
58
|
const sourcesContentClassName = css({
|
|
59
59
|
display: "grid",
|
|
60
|
-
gap: "
|
|
61
|
-
marginTop: "
|
|
60
|
+
gap: "2",
|
|
61
|
+
marginTop: "2",
|
|
62
62
|
overflow: "hidden",
|
|
63
63
|
"&[data-state='closed']": {
|
|
64
64
|
animationName: "fade-out",
|
|
@@ -74,10 +74,10 @@ const sourceClassName = css({
|
|
|
74
74
|
color: "foreground",
|
|
75
75
|
display: "flex",
|
|
76
76
|
fontSize: "sm",
|
|
77
|
-
gap: "
|
|
77
|
+
gap: "2",
|
|
78
78
|
minWidth: 0,
|
|
79
|
-
paddingBlock: "
|
|
80
|
-
paddingInline: "
|
|
79
|
+
paddingBlock: "2",
|
|
80
|
+
paddingInline: "3",
|
|
81
81
|
transitionProperty: "color, background-color",
|
|
82
82
|
"&:hover": {
|
|
83
83
|
backgroundColor: "accent",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ciridae/ui-agent",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -162,7 +162,8 @@
|
|
|
162
162
|
],
|
|
163
163
|
"peerDependencies": {
|
|
164
164
|
"react": ">=18",
|
|
165
|
-
"react-dom": ">=18"
|
|
165
|
+
"react-dom": ">=18",
|
|
166
|
+
"use-stick-to-bottom": "^1.1.6"
|
|
166
167
|
},
|
|
167
168
|
"dependencies": {
|
|
168
169
|
"@streamdown/cjk": "^1.0.3",
|
|
@@ -173,7 +174,6 @@
|
|
|
173
174
|
"lucide-react": "^1.23.0",
|
|
174
175
|
"shiki": "^4.3.0",
|
|
175
176
|
"streamdown": "^2.5.0",
|
|
176
|
-
"
|
|
177
|
-
"@ciridae/ui": "0.3.0"
|
|
177
|
+
"@ciridae/ui": "0.3.2"
|
|
178
178
|
}
|
|
179
179
|
}
|