mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
fix: use tick() for assistantMessageAction and update edit-mode accent colors
- Wrap assistantMessageAction in tick() to resolve race condition with streaming indicator removal - Replace interactive-accent with alt-interactive-accent for edit-mode UI elements - Add alt-interactive-accent CSS variables as color-mixed variants of interactive-accent
This commit is contained in:
parent
eeceda00e1
commit
c71f18d5c2
4 changed files with 21 additions and 7 deletions
|
|
@ -24,7 +24,11 @@
|
|||
if (lastAssistantMessageElement && lastAssistantMessageElement.offsetHeight <
|
||||
chatContainer.offsetHeight - parseFloat(getComputedStyle(chatContainer).padding) * 2) {
|
||||
// Recalculate padding when streaming ends to fix race condition with streaming indicator removal
|
||||
assistantMessageAction(lastAssistantMessageElement);
|
||||
tick().then(() => {
|
||||
if (lastAssistantMessageElement) {
|
||||
assistantMessageAction(lastAssistantMessageElement);
|
||||
}
|
||||
});
|
||||
|
||||
// use an interval to complete scrolling once the dom has finished updating
|
||||
const scrollInterval: number = plugin.registerInterval(window.setInterval(() => {
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@
|
|||
}
|
||||
|
||||
#input-container.edit-mode {
|
||||
border-color: var(--interactive-accent);
|
||||
border-color: var(--alt-interactive-accent);
|
||||
transition: border-color 0.5s ease-out;
|
||||
}
|
||||
|
||||
|
|
@ -279,8 +279,8 @@
|
|||
}
|
||||
|
||||
#input-field.edit-mode:focus {
|
||||
border-color: var(--interactive-accent);
|
||||
box-shadow: 0px 0px 3px 1px var(--interactive-accent);
|
||||
border-color: var(--alt-interactive-accent);
|
||||
box-shadow: 0px 0px 3px 1px var(--alt-interactive-accent);
|
||||
transition: border-color 0.5s ease-out;
|
||||
}
|
||||
|
||||
|
|
@ -320,11 +320,11 @@
|
|||
}
|
||||
|
||||
#submit-button.edit-mode {
|
||||
background-color: var(--interactive-accent);
|
||||
background-color: var(--alt-interactive-accent);
|
||||
}
|
||||
|
||||
#submit-button.edit-mode:not(:disabled):hover {
|
||||
cursor: pointer;
|
||||
background-color: var(--interactive-accent-hover);
|
||||
background-color: var(--alt-interactive-accent-hover);
|
||||
}
|
||||
</style>
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
}
|
||||
|
||||
.container.edit-mode {
|
||||
--streaming-color: var(--interactive-accent);
|
||||
--streaming-color: var(--alt-interactive-accent);
|
||||
}
|
||||
|
||||
.📦 {
|
||||
|
|
|
|||
10
styles.css
10
styles.css
|
|
@ -115,6 +115,16 @@ body {
|
|||
--checkbox-border: var(--background-modifier-border);
|
||||
--checkbox-checked-bg: var(--interactive-accent);
|
||||
--footnote-border: var(--background-modifier-border);
|
||||
--alt-interactive-accent: color-mix(
|
||||
in hsl shorter hue,
|
||||
var(--interactive-accent) 50%,
|
||||
hsl(180, 100%, 50%) 50%
|
||||
);
|
||||
--alt-interactive-accent-hover: color-mix(
|
||||
in hsl shorter hue,
|
||||
var(--interactive-accent-hover) 50%,
|
||||
hsl(180 100% 50%) 50%
|
||||
);
|
||||
}
|
||||
|
||||
/* ============================== */
|
||||
|
|
|
|||
Loading…
Reference in a new issue