Merge pull request #16004 from Budibase/BUDI-9238/frontend-tweaks

AI frontend tweaks
This commit is contained in:
Adria Navarro 2025-04-24 15:19:39 +02:00 committed by GitHub
commit 53c37a7d4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -31,6 +31,8 @@
$: disabled = !aiEnabled || creditsExceeded || readonly || promptLoading
$: animateBorder = !disabled && expanded
$: canSubmit = !readonly && !!value
function collapse() {
dispatch("collapse")
expanded = expandedOnly
@ -62,7 +64,7 @@
}
async function onPromptSubmit() {
if (readonly) {
if (!canSubmit) {
return
}
promptLoading = true
@ -155,6 +157,7 @@
? "#6E56FF"
: "var(--spectrum-global-color-gray-600)"}
size="S"
disabled={!canSubmit}
hoverable={!readonly}
hoverColor="#6E56FF"
name={promptLoading ? "StopCircle" : "PlayCircle"}
@ -265,6 +268,7 @@
.ai-icon {
width: 18px;
height: 18px;
margin-left: 4px;
margin-right: 8px;
flex-shrink: 0;
cursor: var(--ai-icon-cursor, pointer);