feat(ui): add clear action to prompt input

This commit is contained in:
Shantur Rathore
2026-03-26 23:10:02 +00:00
parent 0dc5867fb3
commit b7d4f8f869
9 changed files with 98 additions and 45 deletions

View File

@@ -37,7 +37,7 @@
.prompt-input {
@apply w-full pt-2.5 border text-sm resize-none outline-none transition-colors;
padding-inline-start: 0.75rem;
padding-inline-end: 5.5rem;
padding-inline-end: 7.5rem;
font-family: inherit;
background-color: var(--surface-base);
color: var(--text-primary);
@@ -90,22 +90,32 @@
inset-inline-end: 0.25rem;
bottom: 0.25rem;
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: flex-start;
flex-direction: row;
align-items: flex-start;
justify-content: flex-end;
gap: 0.125rem;
z-index: 2;
}
.prompt-nav-top-row {
.prompt-nav-column {
display: flex;
align-items: center;
justify-content: flex-end;
flex-direction: column;
align-items: flex-end;
justify-content: flex-start;
gap: 0.125rem;
}
.prompt-nav-column-left {
min-width: 1.75rem;
}
.prompt-nav-column-right {
min-width: 1.75rem;
}
.prompt-expand-button,
.prompt-history-button {
.prompt-history-button,
.prompt-clear-button {
@apply w-7 h-7 flex items-center justify-center rounded-md;
color: var(--text-muted);
background-color: var(--control-ghost-bg);
@@ -115,7 +125,8 @@
}
.prompt-expand-button:hover:not(:disabled),
.prompt-history-button:hover:not(:disabled) {
.prompt-history-button:hover:not(:disabled),
.prompt-clear-button:hover:not(:disabled) {
background-color: var(--surface-secondary);
color: var(--text-primary);
}
@@ -127,7 +138,8 @@
}
.prompt-expand-button:disabled,
.prompt-history-button:disabled {
.prompt-history-button:disabled,
.prompt-clear-button:disabled {
opacity: 0.4;
cursor: not-allowed;
}
@@ -397,7 +409,7 @@
.prompt-input {
min-height: 0;
padding: 0.5rem 0.75rem;
padding-inline-end: 5.5rem;
padding-inline-end: 7.5rem;
padding-bottom: 0.75rem;
}