Improve Assistent UX: send from Generate, drag-drop, resize.
Add Send to Assistent media button, paste/drop vision image, pane splitter, and polish layout for Krea collaborative chat. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+172
-40
@@ -3,71 +3,148 @@
|
||||
flex-direction: column;
|
||||
height: calc(100vh - 8rem);
|
||||
min-height: 28rem;
|
||||
padding: 0.5rem;
|
||||
padding: 0.5rem 0.65rem 0.65rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sa-gate {
|
||||
padding: 1.25rem;
|
||||
opacity: 0.9;
|
||||
padding: 1.25rem 1.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
border-radius: 0.5rem;
|
||||
border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
|
||||
background: color-mix(in srgb, currentColor 6%, transparent);
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
.sa-layout {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
gap: 0.75rem;
|
||||
gap: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.sa-image-pane {
|
||||
flex: 0 0 32%;
|
||||
max-width: 22rem;
|
||||
flex: 0 0 var(--sa-image-width, 34%);
|
||||
max-width: 40%;
|
||||
min-width: 11rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
min-width: 12rem;
|
||||
}
|
||||
|
||||
.sa-splitter {
|
||||
flex: 0 0 0.45rem;
|
||||
margin: 0 0.15rem;
|
||||
cursor: col-resize;
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, currentColor 12%, transparent);
|
||||
transition: background 0.15s ease;
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
.sa-splitter:hover,
|
||||
.sa-splitter.sa-dragging {
|
||||
background: color-mix(in srgb, currentColor 35%, transparent);
|
||||
}
|
||||
|
||||
.sa-image-frame {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
|
||||
border-radius: 0.35rem;
|
||||
border: 1px dashed color-mix(in srgb, currentColor 28%, transparent);
|
||||
border-radius: 0.55rem;
|
||||
overflow: hidden;
|
||||
background: color-mix(in srgb, currentColor 6%, transparent);
|
||||
background:
|
||||
radial-gradient(ellipse at 30% 20%, color-mix(in srgb, currentColor 8%, transparent), transparent 55%),
|
||||
color-mix(in srgb, currentColor 4%, transparent);
|
||||
min-height: 14rem;
|
||||
outline: none;
|
||||
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
|
||||
.sa-image-frame:focus-visible {
|
||||
box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 35%, transparent);
|
||||
}
|
||||
|
||||
.sa-image-frame.sa-has-image {
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.sa-image-frame.sa-dragover {
|
||||
border-color: color-mix(in srgb, currentColor 70%, transparent);
|
||||
box-shadow: inset 0 0 0 2px color-mix(in srgb, currentColor 25%, transparent);
|
||||
}
|
||||
|
||||
.sa-image-frame img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sa-image-empty {
|
||||
padding: 1rem;
|
||||
padding: 1.25rem 1rem;
|
||||
text-align: center;
|
||||
opacity: 0.65;
|
||||
font-size: 0.95rem;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.sa-empty-title {
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.02em;
|
||||
margin-bottom: 0.35rem;
|
||||
}
|
||||
|
||||
.sa-empty-hint {
|
||||
font-size: 0.88rem;
|
||||
line-height: 1.4;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.sa-drop-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: color-mix(in srgb, currentColor 18%, transparent);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.sa-vision-chip {
|
||||
position: absolute;
|
||||
top: 0.45rem;
|
||||
left: 0.45rem;
|
||||
padding: 0.15rem 0.45rem;
|
||||
border-radius: 999px;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
background: color-mix(in srgb, currentColor 16%, transparent);
|
||||
border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
|
||||
}
|
||||
|
||||
.sa-image-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
gap: 0.45rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sa-chat-pane {
|
||||
flex: 1 1 68%;
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
|
||||
border-radius: 0.35rem;
|
||||
border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
|
||||
border-radius: 0.55rem;
|
||||
background: color-mix(in srgb, currentColor 3%, transparent);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sa-chat-header {
|
||||
@@ -75,13 +152,14 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.5rem;
|
||||
padding: 0.45rem 0.65rem;
|
||||
border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent);
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
|
||||
background: color-mix(in srgb, currentColor 5%, transparent);
|
||||
}
|
||||
|
||||
.sa-chat-title {
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.02em;
|
||||
font-weight: 650;
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
|
||||
.sa-header-right {
|
||||
@@ -99,8 +177,8 @@
|
||||
.sa-settings {
|
||||
display: grid;
|
||||
gap: 0.45rem;
|
||||
padding: 0.65rem;
|
||||
border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent);
|
||||
padding: 0.7rem 0.75rem;
|
||||
border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
|
||||
background: color-mix(in srgb, currentColor 5%, transparent);
|
||||
}
|
||||
|
||||
@@ -117,72 +195,107 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sa-header-right .sa-select {
|
||||
width: auto;
|
||||
min-width: 9rem;
|
||||
max-width: 12rem;
|
||||
}
|
||||
|
||||
.sa-check {
|
||||
flex-direction: row !important;
|
||||
align-items: center;
|
||||
gap: 0.4rem !important;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.sa-messages {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
padding: 0.75rem;
|
||||
padding: 0.85rem 0.9rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.65rem;
|
||||
gap: 0.7rem;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
.sa-msg {
|
||||
max-width: 95%;
|
||||
padding: 0.55rem 0.7rem;
|
||||
border-radius: 0.35rem;
|
||||
max-width: 92%;
|
||||
padding: 0.6rem 0.8rem;
|
||||
border-radius: 0.75rem;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
line-height: 1.35;
|
||||
line-height: 1.4;
|
||||
box-shadow: 0 1px 0 color-mix(in srgb, currentColor 8%, transparent);
|
||||
}
|
||||
|
||||
.sa-msg.user {
|
||||
align-self: flex-end;
|
||||
background: color-mix(in srgb, currentColor 12%, transparent);
|
||||
border-bottom-right-radius: 0.25rem;
|
||||
background: color-mix(in srgb, currentColor 14%, transparent);
|
||||
}
|
||||
|
||||
.sa-msg.assistant {
|
||||
align-self: flex-start;
|
||||
border-bottom-left-radius: 0.25rem;
|
||||
background: color-mix(in srgb, currentColor 7%, transparent);
|
||||
}
|
||||
|
||||
.sa-msg.error {
|
||||
align-self: stretch;
|
||||
border: 1px solid color-mix(in srgb, #c44 50%, transparent);
|
||||
border: 1px solid color-mix(in srgb, #c44 55%, transparent);
|
||||
background: color-mix(in srgb, #c44 12%, transparent);
|
||||
}
|
||||
|
||||
.sa-msg.sa-system {
|
||||
align-self: center;
|
||||
max-width: 100%;
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.75;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sa-patch {
|
||||
margin-top: 0.5rem;
|
||||
padding-top: 0.45rem;
|
||||
margin-top: 0.55rem;
|
||||
padding-top: 0.5rem;
|
||||
border-top: 1px dashed color-mix(in srgb, currentColor 25%, transparent);
|
||||
font-size: 0.9rem;
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
.sa-patch pre {
|
||||
margin: 0;
|
||||
max-height: 10rem;
|
||||
overflow: auto;
|
||||
padding: 0.45rem 0.55rem;
|
||||
border-radius: 0.35rem;
|
||||
background: color-mix(in srgb, currentColor 6%, transparent);
|
||||
}
|
||||
|
||||
.sa-patch-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.35rem;
|
||||
margin-top: 0.4rem;
|
||||
margin-top: 0.45rem;
|
||||
}
|
||||
|
||||
.sa-composer {
|
||||
border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent);
|
||||
padding: 0.55rem;
|
||||
border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
|
||||
padding: 0.6rem 0.7rem 0.7rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.4rem;
|
||||
gap: 0.45rem;
|
||||
background: color-mix(in srgb, currentColor 4%, transparent);
|
||||
}
|
||||
|
||||
.sa-composer textarea {
|
||||
width: 100%;
|
||||
resize: vertical;
|
||||
box-sizing: border-box;
|
||||
min-height: 4rem;
|
||||
min-height: 4.25rem;
|
||||
border-radius: 0.45rem;
|
||||
padding: 0.55rem 0.65rem;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.sa-composer-actions {
|
||||
@@ -192,9 +305,14 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sa-primary {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sa-status {
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.75;
|
||||
margin-left: 0.15rem;
|
||||
}
|
||||
|
||||
.sa-disabled {
|
||||
@@ -202,6 +320,16 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.sa-flash {
|
||||
animation: sa-flash 0.85s ease;
|
||||
}
|
||||
|
||||
@keyframes sa-flash {
|
||||
0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); }
|
||||
40% { box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 20%, transparent); }
|
||||
100% { box-shadow: 0 0 0 0 transparent; }
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.sa-layout {
|
||||
flex-direction: column;
|
||||
@@ -209,6 +337,10 @@
|
||||
.sa-image-pane {
|
||||
flex: 0 0 auto;
|
||||
max-width: none;
|
||||
max-height: 40%;
|
||||
max-height: 38%;
|
||||
width: 100% !important;
|
||||
}
|
||||
.sa-splitter {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user