@cerebriline/ui 0.0.0-stage → 4.100.313
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/ADOPTION.md +833 -0
- package/LICENSE +201 -0
- package/RADIX-COLORS-LICENSE +21 -0
- package/README.md +427 -2
- package/components/agent-approval-card.css +70 -0
- package/components/agent-approval-card.tsx +109 -0
- package/components/agent-ask-question.css +103 -0
- package/components/agent-ask-question.tsx +276 -0
- package/components/agent-aurora.css +228 -0
- package/components/agent-aurora.tsx +96 -0
- package/components/agent-changes.css +13 -0
- package/components/agent-changes.tsx +167 -0
- package/components/agent-chat/agent-chat.css +556 -0
- package/components/agent-chat/index.tsx +1037 -0
- package/components/agent-chat/tool-diff.tsx +165 -0
- package/components/agent-chat/tool-summary/agents.ts +114 -0
- package/components/agent-chat/tool-summary/diff.ts +152 -0
- package/components/agent-chat/tool-summary/index.ts +928 -0
- package/components/agent-chat/tool-summary/parsers.ts +611 -0
- package/components/agent-chat/tool-summary/paths.ts +84 -0
- package/components/agent-chat/tool-summary/team.ts +401 -0
- package/components/agent-command-output.tsx +63 -0
- package/components/agent-composer.tsx +263 -0
- package/components/agent-context-usage.tsx +181 -0
- package/components/agent-conversation-layout.tsx +139 -0
- package/components/agent-hero-heading.css +53 -0
- package/components/agent-hero-heading.tsx +45 -0
- package/components/agent-image-lightbox.tsx +48 -0
- package/components/agent-prompt-queue.css +20 -0
- package/components/agent-prompt-queue.tsx +350 -0
- package/components/agent-pull-request-bar.css +13 -0
- package/components/agent-pull-request-bar.tsx +346 -0
- package/components/agent-quick-actions.css +19 -0
- package/components/agent-quick-actions.tsx +70 -0
- package/components/agent-session-row.tsx +183 -0
- package/components/agent-welcome-hero-pointer.ts +199 -0
- package/components/agent-welcome-hero.css +205 -0
- package/components/agent-welcome-hero.tsx +68 -0
- package/components/attachment-drop-zone.tsx +154 -0
- package/components/badge.tsx +21 -0
- package/components/button.tsx +324 -0
- package/components/generated-media.tsx +173 -0
- package/components/github-icon.tsx +19 -0
- package/components/index.ts +133 -0
- package/components/markdown.css +490 -0
- package/components/markdown.ts +365 -0
- package/components/mermaid-block.tsx +722 -0
- package/components/mermaid-diagram.ts +1260 -0
- package/components/mermaid-dom.ts +301 -0
- package/components/message-scroller.css +118 -0
- package/components/message-scroller.tsx +114 -0
- package/components/search-combobox.css +67 -0
- package/components/search-combobox.tsx +433 -0
- package/components/session-status.css +19 -0
- package/components/session-status.tsx +39 -0
- package/components/switch.css +221 -0
- package/components/switch.tsx +48 -0
- package/components.css +16 -0
- package/dist/components/agent-approval-card.d.ts +14 -0
- package/dist/components/agent-approval-card.d.ts.map +1 -0
- package/dist/components/agent-approval-card.js +12 -0
- package/dist/components/agent-approval-card.js.map +1 -0
- package/dist/components/agent-ask-question.d.ts +18 -0
- package/dist/components/agent-ask-question.d.ts.map +1 -0
- package/dist/components/agent-ask-question.js +101 -0
- package/dist/components/agent-ask-question.js.map +1 -0
- package/dist/components/agent-aurora.d.ts +3 -0
- package/dist/components/agent-aurora.d.ts.map +1 -0
- package/dist/components/agent-aurora.js +60 -0
- package/dist/components/agent-aurora.js.map +1 -0
- package/dist/components/agent-changes.d.ts +26 -0
- package/dist/components/agent-changes.d.ts.map +1 -0
- package/dist/components/agent-changes.js +19 -0
- package/dist/components/agent-changes.js.map +1 -0
- package/dist/components/agent-chat/disclosure.d.ts +25 -0
- package/dist/components/agent-chat/disclosure.d.ts.map +1 -0
- package/dist/components/agent-chat/disclosure.js +39 -0
- package/dist/components/agent-chat/disclosure.js.map +1 -0
- package/dist/components/agent-chat/index.d.ts +140 -0
- package/dist/components/agent-chat/index.d.ts.map +1 -0
- package/dist/components/agent-chat/index.js +379 -0
- package/dist/components/agent-chat/index.js.map +1 -0
- package/dist/components/agent-chat/tool-diff.d.ts +32 -0
- package/dist/components/agent-chat/tool-diff.d.ts.map +1 -0
- package/dist/components/agent-chat/tool-diff.js +97 -0
- package/dist/components/agent-chat/tool-diff.js.map +1 -0
- package/dist/components/agent-chat/tool-summary/agents.d.ts +10 -0
- package/dist/components/agent-chat/tool-summary/agents.d.ts.map +1 -0
- package/dist/components/agent-chat/tool-summary/agents.js +100 -0
- package/dist/components/agent-chat/tool-summary/agents.js.map +1 -0
- package/dist/components/agent-chat/tool-summary/diff.d.ts +22 -0
- package/dist/components/agent-chat/tool-summary/diff.d.ts.map +1 -0
- package/dist/components/agent-chat/tool-summary/diff.js +127 -0
- package/dist/components/agent-chat/tool-summary/diff.js.map +1 -0
- package/dist/components/agent-chat/tool-summary/index.d.ts +145 -0
- package/dist/components/agent-chat/tool-summary/index.d.ts.map +1 -0
- package/dist/components/agent-chat/tool-summary/index.js +663 -0
- package/dist/components/agent-chat/tool-summary/index.js.map +1 -0
- package/dist/components/agent-chat/tool-summary/parsers.d.ts +114 -0
- package/dist/components/agent-chat/tool-summary/parsers.d.ts.map +1 -0
- package/dist/components/agent-chat/tool-summary/parsers.js +502 -0
- package/dist/components/agent-chat/tool-summary/parsers.js.map +1 -0
- package/dist/components/agent-chat/tool-summary/paths.d.ts +10 -0
- package/dist/components/agent-chat/tool-summary/paths.d.ts.map +1 -0
- package/dist/components/agent-chat/tool-summary/paths.js +88 -0
- package/dist/components/agent-chat/tool-summary/paths.js.map +1 -0
- package/dist/components/agent-chat/tool-summary/team.d.ts +16 -0
- package/dist/components/agent-chat/tool-summary/team.d.ts.map +1 -0
- package/dist/components/agent-chat/tool-summary/team.js +283 -0
- package/dist/components/agent-chat/tool-summary/team.js.map +1 -0
- package/dist/components/agent-command-output.d.ts +14 -0
- package/dist/components/agent-command-output.d.ts.map +1 -0
- package/dist/components/agent-command-output.js +22 -0
- package/dist/components/agent-command-output.js.map +1 -0
- package/dist/components/agent-composer.d.ts +34 -0
- package/dist/components/agent-composer.d.ts.map +1 -0
- package/dist/components/agent-composer.js +65 -0
- package/dist/components/agent-composer.js.map +1 -0
- package/dist/components/agent-context-usage.d.ts +28 -0
- package/dist/components/agent-context-usage.d.ts.map +1 -0
- package/dist/components/agent-context-usage.js +51 -0
- package/dist/components/agent-context-usage.js.map +1 -0
- package/dist/components/agent-conversation-layout.d.ts +30 -0
- package/dist/components/agent-conversation-layout.d.ts.map +1 -0
- package/dist/components/agent-conversation-layout.js +24 -0
- package/dist/components/agent-conversation-layout.js.map +1 -0
- package/dist/components/agent-hero-heading.d.ts +2 -0
- package/dist/components/agent-hero-heading.d.ts.map +1 -0
- package/dist/components/agent-hero-heading.js +20 -0
- package/dist/components/agent-hero-heading.js.map +1 -0
- package/dist/components/agent-image-lightbox.d.ts +11 -0
- package/dist/components/agent-image-lightbox.d.ts.map +1 -0
- package/dist/components/agent-image-lightbox.js +8 -0
- package/dist/components/agent-image-lightbox.js.map +1 -0
- package/dist/components/agent-prompt-queue.d.ts +14 -0
- package/dist/components/agent-prompt-queue.d.ts.map +1 -0
- package/dist/components/agent-prompt-queue.js +114 -0
- package/dist/components/agent-prompt-queue.js.map +1 -0
- package/dist/components/agent-pull-request-bar.d.ts +72 -0
- package/dist/components/agent-pull-request-bar.d.ts.map +1 -0
- package/dist/components/agent-pull-request-bar.js +90 -0
- package/dist/components/agent-pull-request-bar.js.map +1 -0
- package/dist/components/agent-quick-actions.d.ts +14 -0
- package/dist/components/agent-quick-actions.d.ts.map +1 -0
- package/dist/components/agent-quick-actions.js +12 -0
- package/dist/components/agent-quick-actions.js.map +1 -0
- package/dist/components/agent-session-row.d.ts +45 -0
- package/dist/components/agent-session-row.d.ts.map +1 -0
- package/dist/components/agent-session-row.js +34 -0
- package/dist/components/agent-session-row.js.map +1 -0
- package/dist/components/agent-welcome-hero-pointer.d.ts +3 -0
- package/dist/components/agent-welcome-hero-pointer.d.ts.map +1 -0
- package/dist/components/agent-welcome-hero-pointer.js +169 -0
- package/dist/components/agent-welcome-hero-pointer.js.map +1 -0
- package/dist/components/agent-welcome-hero.d.ts +9 -0
- package/dist/components/agent-welcome-hero.d.ts.map +1 -0
- package/dist/components/agent-welcome-hero.js +14 -0
- package/dist/components/agent-welcome-hero.js.map +1 -0
- package/dist/components/attachment-drop-zone.d.ts +15 -0
- package/dist/components/attachment-drop-zone.d.ts.map +1 -0
- package/dist/components/attachment-drop-zone.js +64 -0
- package/dist/components/attachment-drop-zone.js.map +1 -0
- package/dist/components/badge.d.ts +5 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +7 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.d.ts +27 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +209 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/generated-media.d.ts +12 -0
- package/dist/components/generated-media.d.ts.map +1 -0
- package/dist/components/generated-media.js +105 -0
- package/dist/components/generated-media.js.map +1 -0
- package/dist/components/github-icon.d.ts +3 -0
- package/dist/components/github-icon.d.ts.map +1 -0
- package/dist/components/github-icon.js +6 -0
- package/dist/components/github-icon.js.map +1 -0
- package/dist/components/index.d.ts +24 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +25 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/markdown.d.ts +48 -0
- package/dist/components/markdown.d.ts.map +1 -0
- package/dist/components/markdown.js +264 -0
- package/dist/components/markdown.js.map +1 -0
- package/dist/components/mermaid-block.d.ts +14 -0
- package/dist/components/mermaid-block.d.ts.map +1 -0
- package/dist/components/mermaid-block.js +339 -0
- package/dist/components/mermaid-block.js.map +1 -0
- package/dist/components/mermaid-diagram.d.ts +264 -0
- package/dist/components/mermaid-diagram.d.ts.map +1 -0
- package/dist/components/mermaid-diagram.js +999 -0
- package/dist/components/mermaid-diagram.js.map +1 -0
- package/dist/components/mermaid-dom.d.ts +51 -0
- package/dist/components/mermaid-dom.d.ts.map +1 -0
- package/dist/components/mermaid-dom.js +246 -0
- package/dist/components/mermaid-dom.js.map +1 -0
- package/dist/components/message-scroller.d.ts +23 -0
- package/dist/components/message-scroller.d.ts.map +1 -0
- package/dist/components/message-scroller.js +31 -0
- package/dist/components/message-scroller.js.map +1 -0
- package/dist/components/search-combobox.d.ts +44 -0
- package/dist/components/search-combobox.d.ts.map +1 -0
- package/dist/components/search-combobox.js +191 -0
- package/dist/components/search-combobox.js.map +1 -0
- package/dist/components/session-status.d.ts +9 -0
- package/dist/components/session-status.d.ts.map +1 -0
- package/dist/components/session-status.js +11 -0
- package/dist/components/session-status.js.map +1 -0
- package/dist/components/switch.d.ts +7 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +14 -0
- package/dist/components/switch.js.map +1 -0
- package/package.json +177 -5
- package/theme/base.css +83 -0
- package/theme/component-theme.css +126 -0
- package/theme/index.css +3 -0
- package/theme/palette.css +347 -0
- package/theme/scoped-tokens.css +503 -0
- package/theme/theme.css +90 -0
- package/theme/tokens.css +165 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
.cline-ui-agent-aurora {
|
|
2
|
+
position: absolute;
|
|
3
|
+
inset: 0;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
pointer-events: none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.cline-ui-agent-aurora__horizon,
|
|
9
|
+
.cline-ui-agent-aurora__current,
|
|
10
|
+
.cline-ui-agent-aurora__blob,
|
|
11
|
+
.cline-ui-agent-aurora__star {
|
|
12
|
+
position: absolute;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Avoid filter: blur; it forced full-surface repaints below 10fps. */
|
|
16
|
+
.cline-ui-agent-aurora__soft-band {
|
|
17
|
+
-webkit-mask-image: linear-gradient(
|
|
18
|
+
to bottom,
|
|
19
|
+
transparent,
|
|
20
|
+
black 32%,
|
|
21
|
+
black 68%,
|
|
22
|
+
transparent
|
|
23
|
+
);
|
|
24
|
+
mask-image: linear-gradient(
|
|
25
|
+
to bottom,
|
|
26
|
+
transparent,
|
|
27
|
+
black 32%,
|
|
28
|
+
black 68%,
|
|
29
|
+
transparent
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.cline-ui-agent-aurora__horizon {
|
|
34
|
+
right: -8%;
|
|
35
|
+
bottom: -3%;
|
|
36
|
+
left: -8%;
|
|
37
|
+
height: 40%;
|
|
38
|
+
background: linear-gradient(
|
|
39
|
+
90deg,
|
|
40
|
+
color-mix(in oklab, var(--brand-lilac) 58%, transparent),
|
|
41
|
+
color-mix(in oklab, var(--brand-magenta) 62%, transparent) 42%,
|
|
42
|
+
color-mix(in oklab, var(--brand-periwinkle) 72%, transparent) 78%,
|
|
43
|
+
color-mix(in oklab, var(--brand-cyan) 58%, transparent)
|
|
44
|
+
);
|
|
45
|
+
opacity: 0.6;
|
|
46
|
+
animation: cline-ui-agent-aurora-horizon 8s ease-in-out -3s infinite alternate;
|
|
47
|
+
transform-origin: center bottom;
|
|
48
|
+
will-change: opacity, transform;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.cline-ui-agent-aurora__current {
|
|
52
|
+
animation-name: cline-ui-agent-aurora-current;
|
|
53
|
+
animation-timing-function: ease-in-out;
|
|
54
|
+
animation-iteration-count: infinite;
|
|
55
|
+
animation-direction: alternate;
|
|
56
|
+
will-change: opacity, transform;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.cline-ui-agent-aurora__current--left {
|
|
60
|
+
bottom: 3%;
|
|
61
|
+
left: -45%;
|
|
62
|
+
width: 125%;
|
|
63
|
+
height: 30%;
|
|
64
|
+
background: linear-gradient(
|
|
65
|
+
105deg,
|
|
66
|
+
transparent 12%,
|
|
67
|
+
color-mix(in oklab, var(--brand-magenta) 66%, transparent) 38%,
|
|
68
|
+
color-mix(in oklab, var(--brand-periwinkle) 72%, transparent) 58%,
|
|
69
|
+
transparent 82%
|
|
70
|
+
);
|
|
71
|
+
opacity: 0.5;
|
|
72
|
+
animation-duration: 9s;
|
|
73
|
+
animation-delay: -2s;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.cline-ui-agent-aurora__current--right {
|
|
77
|
+
right: -42%;
|
|
78
|
+
bottom: -5%;
|
|
79
|
+
width: 120%;
|
|
80
|
+
height: 34%;
|
|
81
|
+
background: linear-gradient(
|
|
82
|
+
75deg,
|
|
83
|
+
transparent 10%,
|
|
84
|
+
color-mix(in oklab, var(--brand-cyan) 62%, transparent) 42%,
|
|
85
|
+
color-mix(in oklab, var(--brand-violet) 70%, transparent) 64%,
|
|
86
|
+
transparent 88%
|
|
87
|
+
);
|
|
88
|
+
opacity: 0.45;
|
|
89
|
+
animation-duration: 12s;
|
|
90
|
+
animation-delay: -6s;
|
|
91
|
+
animation-direction: alternate-reverse;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.cline-ui-agent-aurora__blob {
|
|
95
|
+
animation-name: cline-ui-agent-aurora-drift;
|
|
96
|
+
animation-timing-function: ease-in-out;
|
|
97
|
+
animation-iteration-count: infinite;
|
|
98
|
+
animation-direction: alternate;
|
|
99
|
+
will-change: opacity, transform;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.cline-ui-agent-aurora__blob--left {
|
|
103
|
+
bottom: -40%;
|
|
104
|
+
left: -20%;
|
|
105
|
+
width: 70%;
|
|
106
|
+
height: 80%;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.cline-ui-agent-aurora__blob--right {
|
|
110
|
+
right: -15%;
|
|
111
|
+
bottom: -40%;
|
|
112
|
+
width: 65%;
|
|
113
|
+
height: 85%;
|
|
114
|
+
animation-name: cline-ui-agent-aurora-drift-reverse;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.cline-ui-agent-aurora__star {
|
|
118
|
+
border-radius: 1px;
|
|
119
|
+
animation-name: cline-ui-agent-aurora-twinkle;
|
|
120
|
+
animation-timing-function: ease-in-out;
|
|
121
|
+
animation-iteration-count: infinite;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media (prefers-reduced-motion: reduce) {
|
|
125
|
+
.cline-ui-agent-aurora__blob,
|
|
126
|
+
.cline-ui-agent-aurora__current,
|
|
127
|
+
.cline-ui-agent-aurora__horizon,
|
|
128
|
+
.cline-ui-agent-aurora__star {
|
|
129
|
+
/* biome-ignore lint/complexity/noImportantStyles: overrides inline timing */
|
|
130
|
+
animation: none !important;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.cline-ui-agent-aurora__horizon {
|
|
134
|
+
opacity: 0.68;
|
|
135
|
+
transform: translate3d(0, -1%, 0) scale(1.05);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.cline-ui-agent-aurora__blob,
|
|
139
|
+
.cline-ui-agent-aurora__current {
|
|
140
|
+
opacity: 0.58;
|
|
141
|
+
transform: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.cline-ui-agent-aurora__blob,
|
|
145
|
+
.cline-ui-agent-aurora__current,
|
|
146
|
+
.cline-ui-agent-aurora__horizon {
|
|
147
|
+
will-change: auto;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@keyframes cline-ui-agent-aurora-drift {
|
|
152
|
+
0% {
|
|
153
|
+
opacity: 0.55;
|
|
154
|
+
transform: translate3d(-8%, 5%, 0) scale(0.94);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
50% {
|
|
158
|
+
opacity: 0.92;
|
|
159
|
+
transform: translate3d(13%, -10%, 0) scale(1.11);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
100% {
|
|
163
|
+
opacity: 0.62;
|
|
164
|
+
transform: translate3d(-5%, -2%, 0) scale(1.02);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@keyframes cline-ui-agent-aurora-drift-reverse {
|
|
169
|
+
0% {
|
|
170
|
+
opacity: 0.62;
|
|
171
|
+
transform: translate3d(10%, -6%, 0) scale(1.08);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
50% {
|
|
175
|
+
opacity: 0.9;
|
|
176
|
+
transform: translate3d(-12%, -12%, 0) scale(0.96);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
100% {
|
|
180
|
+
opacity: 0.58;
|
|
181
|
+
transform: translate3d(6%, 2%, 0) scale(1.04);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@keyframes cline-ui-agent-aurora-horizon {
|
|
186
|
+
0% {
|
|
187
|
+
opacity: 0.48;
|
|
188
|
+
transform: translate3d(-3%, 9%, 0) scale(0.96, 0.84);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
50% {
|
|
192
|
+
opacity: 0.88;
|
|
193
|
+
transform: translate3d(3%, -5%, 0) scale(1.08, 1.16);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
100% {
|
|
197
|
+
opacity: 0.58;
|
|
198
|
+
transform: translate3d(-1%, 2%, 0) scale(1.02, 0.96);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@keyframes cline-ui-agent-aurora-current {
|
|
203
|
+
0% {
|
|
204
|
+
opacity: 0.28;
|
|
205
|
+
transform: translate3d(-16%, 8%, 0) scaleX(0.84);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
50% {
|
|
209
|
+
opacity: 0.72;
|
|
210
|
+
transform: translate3d(17%, -8%, 0) scaleX(1.08);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
100% {
|
|
214
|
+
opacity: 0.38;
|
|
215
|
+
transform: translate3d(28%, 4%, 0) scaleX(0.94);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@keyframes cline-ui-agent-aurora-twinkle {
|
|
220
|
+
0%,
|
|
221
|
+
100% {
|
|
222
|
+
opacity: 0.15;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
50% {
|
|
226
|
+
opacity: 0.78;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
interface AuroraStar {
|
|
4
|
+
color: string;
|
|
5
|
+
delay: string;
|
|
6
|
+
duration: string;
|
|
7
|
+
left: string;
|
|
8
|
+
opacity: number;
|
|
9
|
+
size: number;
|
|
10
|
+
top: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const BLOBS = [
|
|
14
|
+
{
|
|
15
|
+
delay: "0s",
|
|
16
|
+
gradient:
|
|
17
|
+
"radial-gradient(ellipse at center, color-mix(in oklab, var(--brand-periwinkle) 64%, transparent), color-mix(in oklab, var(--brand-periwinkle) 30%, transparent) 42%, transparent 70%)",
|
|
18
|
+
id: "periwinkle-left",
|
|
19
|
+
position: "left",
|
|
20
|
+
duration: "11s",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
delay: "-12s",
|
|
24
|
+
gradient:
|
|
25
|
+
"radial-gradient(ellipse at center, color-mix(in oklab, var(--brand-violet) 58%, transparent), color-mix(in oklab, var(--brand-violet) 27%, transparent) 42%, transparent 70%)",
|
|
26
|
+
id: "violet-right",
|
|
27
|
+
position: "right",
|
|
28
|
+
duration: "12.5s",
|
|
29
|
+
},
|
|
30
|
+
] as const;
|
|
31
|
+
|
|
32
|
+
function seededUnit(index: number, salt: number): number {
|
|
33
|
+
let value =
|
|
34
|
+
Math.imul(index + 1, 0x9e3779b1) ^ Math.imul(salt + 1, 0x85ebca6b);
|
|
35
|
+
value ^= value >>> 16;
|
|
36
|
+
value = Math.imul(value, 0x7feb352d);
|
|
37
|
+
value ^= value >>> 15;
|
|
38
|
+
value = Math.imul(value, 0x846ca68b);
|
|
39
|
+
value ^= value >>> 16;
|
|
40
|
+
return (value >>> 0) / 0x1_0000_0000;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const STARS = Array.from({ length: 32 }, (_, index): AuroraStar => {
|
|
44
|
+
const vertical = seededUnit(index, 1);
|
|
45
|
+
const size = seededUnit(index, 3);
|
|
46
|
+
return {
|
|
47
|
+
color:
|
|
48
|
+
seededUnit(index, 7) > 0.78
|
|
49
|
+
? "var(--brand-cyan)"
|
|
50
|
+
: "color-mix(in oklab, white 92%, var(--brand-lilac))",
|
|
51
|
+
delay: `${seededUnit(index, 4) * -5}s`,
|
|
52
|
+
duration: `${3.5 + seededUnit(index, 5) * 3.5}s`,
|
|
53
|
+
left: `${seededUnit(index, 2) * 100}%`,
|
|
54
|
+
opacity: 0.35 + seededUnit(index, 6) * 0.6,
|
|
55
|
+
size: size < 0.14 ? 4 : size < 0.52 ? 3 : 2,
|
|
56
|
+
top: `${100 - (1 - vertical * vertical) * 45}%`,
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/** Decorative layer that fills its nearest positioned ancestor. */
|
|
61
|
+
export function AgentAurora() {
|
|
62
|
+
return (
|
|
63
|
+
<div aria-hidden="true" className="cline-ui-agent-aurora">
|
|
64
|
+
<div className="cline-ui-agent-aurora__horizon cline-ui-agent-aurora__soft-band" />
|
|
65
|
+
<div className="cline-ui-agent-aurora__current cline-ui-agent-aurora__current--left cline-ui-agent-aurora__soft-band" />
|
|
66
|
+
<div className="cline-ui-agent-aurora__current cline-ui-agent-aurora__current--right cline-ui-agent-aurora__soft-band" />
|
|
67
|
+
{BLOBS.map((blob) => (
|
|
68
|
+
<div
|
|
69
|
+
className={`cline-ui-agent-aurora__blob cline-ui-agent-aurora__blob--${blob.position}`}
|
|
70
|
+
key={blob.id}
|
|
71
|
+
style={{
|
|
72
|
+
animationDelay: blob.delay,
|
|
73
|
+
animationDuration: blob.duration,
|
|
74
|
+
background: blob.gradient,
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
))}
|
|
78
|
+
{STARS.map((star) => (
|
|
79
|
+
<span
|
|
80
|
+
className="cline-ui-agent-aurora__star"
|
|
81
|
+
key={`${star.left}-${star.top}`}
|
|
82
|
+
style={{
|
|
83
|
+
animationDelay: star.delay,
|
|
84
|
+
animationDuration: star.duration,
|
|
85
|
+
background: star.color,
|
|
86
|
+
height: star.size,
|
|
87
|
+
left: star.left,
|
|
88
|
+
opacity: star.opacity,
|
|
89
|
+
top: star.top,
|
|
90
|
+
width: star.size,
|
|
91
|
+
}}
|
|
92
|
+
/>
|
|
93
|
+
))}
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* Dashboard touch targets; desktop retains its existing compact controls. */
|
|
2
|
+
@media (pointer: coarse) {
|
|
3
|
+
.cline-ui-agent-changes--touch .cline-ui-agent-changes__action {
|
|
4
|
+
min-width: 2.75rem;
|
|
5
|
+
min-height: 2.75rem;
|
|
6
|
+
}
|
|
7
|
+
.cline-ui-agent-changes--touch .cline-ui-agent-changes__toggle {
|
|
8
|
+
min-height: 2.75rem;
|
|
9
|
+
}
|
|
10
|
+
.cline-ui-agent-changes--touch .cline-ui-agent-changes__copy {
|
|
11
|
+
opacity: 1;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Check, ChevronDown, ChevronRight, Copy, X } from "lucide-react";
|
|
4
|
+
import { type HTMLAttributes, type ReactNode, type Ref, useState } from "react";
|
|
5
|
+
|
|
6
|
+
export interface AgentChangesPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
title: string;
|
|
8
|
+
fileCount: number | string;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
closeButtonRef?: Ref<HTMLButtonElement>;
|
|
11
|
+
notice?: ReactNode;
|
|
12
|
+
emptyMessage?: ReactNode;
|
|
13
|
+
renderScroll?: (content: ReactNode) => ReactNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Presentation only: hosts own the source of changes and conversation focus. */
|
|
17
|
+
export function AgentChangesPanel({
|
|
18
|
+
title,
|
|
19
|
+
fileCount,
|
|
20
|
+
onClose,
|
|
21
|
+
closeButtonRef,
|
|
22
|
+
notice,
|
|
23
|
+
emptyMessage,
|
|
24
|
+
renderScroll,
|
|
25
|
+
children,
|
|
26
|
+
className = "",
|
|
27
|
+
...props
|
|
28
|
+
}: AgentChangesPanelProps) {
|
|
29
|
+
const content = (
|
|
30
|
+
<>
|
|
31
|
+
{notice && (
|
|
32
|
+
<div className="cline-ui-agent-changes__notice px-4 py-3 text-cline-ui-xs text-cline-ui-muted-foreground">
|
|
33
|
+
{notice}
|
|
34
|
+
</div>
|
|
35
|
+
)}
|
|
36
|
+
{emptyMessage ? (
|
|
37
|
+
<div className="cline-ui-agent-changes__empty flex h-full items-center justify-center px-4 py-16 text-cline-ui-sm text-cline-ui-muted-foreground">
|
|
38
|
+
{emptyMessage}
|
|
39
|
+
</div>
|
|
40
|
+
) : (
|
|
41
|
+
children
|
|
42
|
+
)}
|
|
43
|
+
</>
|
|
44
|
+
);
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
{...props}
|
|
48
|
+
className={`cline-ui-agent-changes flex h-full min-h-0 flex-col overflow-hidden ${className}`}
|
|
49
|
+
>
|
|
50
|
+
<div className="cline-ui-agent-changes__header flex h-10 shrink-0 items-center justify-between border-b border-cline-ui-border bg-cline-ui-card px-4">
|
|
51
|
+
<div className="cline-ui-agent-changes__heading flex items-center gap-3">
|
|
52
|
+
<span className="text-cline-ui-xs font-medium text-cline-ui-foreground">
|
|
53
|
+
{title}
|
|
54
|
+
</span>
|
|
55
|
+
<span className="cline-ui-agent-changes__count rounded bg-cline-ui-secondary px-1.5 py-0.5 text-[10px] font-cline-ui-mono text-cline-ui-muted-foreground">
|
|
56
|
+
Files: {fileCount}
|
|
57
|
+
</span>
|
|
58
|
+
</div>
|
|
59
|
+
<div className="flex items-center gap-2 text-cline-ui-xs font-cline-ui-mono">
|
|
60
|
+
<button
|
|
61
|
+
ref={closeButtonRef}
|
|
62
|
+
className="cline-ui-agent-changes__action rounded-md p-1 text-cline-ui-muted-foreground hover:bg-cline-ui-surface-hover hover:text-cline-ui-foreground transition-colors"
|
|
63
|
+
aria-label="Close diff view"
|
|
64
|
+
type="button"
|
|
65
|
+
onClick={onClose}
|
|
66
|
+
>
|
|
67
|
+
<X className="h-4 w-4" />
|
|
68
|
+
</button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
{renderScroll ? (
|
|
72
|
+
renderScroll(content)
|
|
73
|
+
) : (
|
|
74
|
+
<div className="cline-ui-agent-changes__scroll min-h-0 flex-1 overflow-auto">
|
|
75
|
+
{content}
|
|
76
|
+
</div>
|
|
77
|
+
)}
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface AgentChangedFileProps {
|
|
83
|
+
path: string;
|
|
84
|
+
additions: number;
|
|
85
|
+
deletions: number;
|
|
86
|
+
onCopyPath: () => void;
|
|
87
|
+
copied?: boolean;
|
|
88
|
+
expanded?: boolean;
|
|
89
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
90
|
+
/** Host-specific actions, such as a native editor menu. */
|
|
91
|
+
actions?: ReactNode;
|
|
92
|
+
children: ReactNode;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function AgentChangedFile({
|
|
96
|
+
path,
|
|
97
|
+
additions,
|
|
98
|
+
deletions,
|
|
99
|
+
onCopyPath,
|
|
100
|
+
copied = false,
|
|
101
|
+
expanded: controlledExpanded,
|
|
102
|
+
onExpandedChange,
|
|
103
|
+
actions,
|
|
104
|
+
children,
|
|
105
|
+
}: AgentChangedFileProps) {
|
|
106
|
+
const [localExpanded, setLocalExpanded] = useState(true);
|
|
107
|
+
const expanded = controlledExpanded ?? localExpanded;
|
|
108
|
+
const toggle = () => {
|
|
109
|
+
setLocalExpanded(!expanded);
|
|
110
|
+
onExpandedChange?.(!expanded);
|
|
111
|
+
};
|
|
112
|
+
return (
|
|
113
|
+
<div className="cline-ui-agent-changes__file border-b border-cline-ui-border">
|
|
114
|
+
{/* group preserves hover reveal for host-provided native actions. */}
|
|
115
|
+
<div className="cline-ui-agent-changes__file-header group flex w-full items-center gap-2 bg-cline-ui-card/80 px-4 py-2 hover:bg-cline-ui-surface-hover-lighter transition-colors">
|
|
116
|
+
<button
|
|
117
|
+
aria-expanded={expanded}
|
|
118
|
+
className="cline-ui-agent-changes__toggle flex min-w-0 shrink items-center gap-2 text-left"
|
|
119
|
+
onClick={toggle}
|
|
120
|
+
type="button"
|
|
121
|
+
>
|
|
122
|
+
{expanded ? (
|
|
123
|
+
<ChevronDown className="h-3.5 w-3.5 shrink-0 text-cline-ui-muted-foreground" />
|
|
124
|
+
) : (
|
|
125
|
+
<ChevronRight className="h-3.5 w-3.5 shrink-0 text-cline-ui-muted-foreground" />
|
|
126
|
+
)}
|
|
127
|
+
<span className="min-w-0 truncate font-cline-ui-mono text-cline-ui-xs text-cline-ui-foreground">
|
|
128
|
+
{path}
|
|
129
|
+
</span>
|
|
130
|
+
</button>
|
|
131
|
+
<button
|
|
132
|
+
className={`cline-ui-agent-changes__action cline-ui-agent-changes__copy shrink-0 rounded-md p-1 transition-opacity hover:bg-cline-ui-surface-hover hover:text-cline-ui-foreground focus-visible:opacity-100 group-hover:opacity-100 ${copied ? "opacity-100 text-cline-ui-primary" : "opacity-0 text-cline-ui-muted-foreground"}`}
|
|
133
|
+
data-copied={copied || undefined}
|
|
134
|
+
aria-label={`Copy file path for ${path}`}
|
|
135
|
+
title="Copy file path"
|
|
136
|
+
type="button"
|
|
137
|
+
onClick={onCopyPath}
|
|
138
|
+
>
|
|
139
|
+
{copied ? (
|
|
140
|
+
<Check className="h-3.5 w-3.5" />
|
|
141
|
+
) : (
|
|
142
|
+
<Copy className="h-3.5 w-3.5" />
|
|
143
|
+
)}
|
|
144
|
+
</button>
|
|
145
|
+
<button
|
|
146
|
+
aria-hidden
|
|
147
|
+
className="cline-ui-agent-changes__spacer h-6 min-w-0 flex-1 cursor-pointer"
|
|
148
|
+
onClick={toggle}
|
|
149
|
+
tabIndex={-1}
|
|
150
|
+
type="button"
|
|
151
|
+
/>
|
|
152
|
+
{actions}
|
|
153
|
+
<span className="cline-ui-agent-changes__additions shrink-0 font-cline-ui-mono text-[11px] text-cline-ui-primary">
|
|
154
|
+
+{additions}
|
|
155
|
+
</span>
|
|
156
|
+
<span className="cline-ui-agent-changes__deletions shrink-0 font-cline-ui-mono text-[11px] text-cline-ui-destructive">
|
|
157
|
+
-{deletions}
|
|
158
|
+
</span>
|
|
159
|
+
</div>
|
|
160
|
+
{expanded && (
|
|
161
|
+
<div className="cline-ui-agent-changes__content space-y-2 border-t border-cline-ui-border bg-cline-ui-card/40 px-4 py-3">
|
|
162
|
+
{children}
|
|
163
|
+
</div>
|
|
164
|
+
)}
|
|
165
|
+
</div>
|
|
166
|
+
);
|
|
167
|
+
}
|