andy-stack_vaultkeeper-ai/Components/ThoughtIndicator.svelte
Andrew Beal 275f548914 refactor: streamline planning UX and strengthen complexity gate
Restructure system prompt to enforce mandatory complexity evaluation before action. Replace verbose multi-step planning framework with concise gate-based decision model. Add UI for execution plan visibility. Improve planning/execution separation by blocking execution tools during planning phase. Remove cancellation indicator component. Fix conversation deletion bug preventing saves after delete. Strengthen type safety for AIFunction names. Simplify function summary format for planning agent. Update test mocks for new callback signatures.
2026-01-03 11:15:32 +00:00

74 lines
No EOL
1.8 KiB
Svelte

<script lang="ts">
import { fade } from "svelte/transition";
export let thought: string | null = null;
export let thoughtIndicatorElement: HTMLElement | undefined = undefined;
$: isVisible = thought !== null && thought.trim().length > 0;
</script>
{#if isVisible}
<div class="ai-thought-container" in:fade={{ duration: 200 }} out:fade={{ duration: 200 }} bind:this={thoughtIndicatorElement}>
<div class="ai-thought-bubble">
<span>{thought}</span>
</div>
</div>
{/if}
<style>
.ai-thought-container {
margin-top: 0.25rem;
margin-bottom: 0.25rem;
}
.ai-thought-bubble {
--border-width: 1px;
position: relative;
display: inline-flex;
align-items: center;
border-radius: 10px;
max-width: 100%;
}
.ai-thought-bubble span {
position: relative;
z-index: 1;
background: var(--background-primary-alt);
border-radius: 10px;
padding: 0.75rem 1rem;
font-size: var(--font-smallest);
color: var(--text-muted);
font-style: italic;
word-wrap: break-word;
width: 100%;
}
.ai-thought-bubble::after {
position: absolute;
content: "";
top: calc(-1 * var(--border-width));
left: calc(-1 * var(--border-width));
z-index: 0;
width: calc(100% + var(--border-width) * 2);
height: calc(100% + var(--border-width) * 2);
background: linear-gradient(
60deg,
hsl(224, 85%, 66%),
hsl(269, 85%, 66%),
hsl(314, 85%, 66%),
hsl(359, 85%, 66%),
hsl(44, 85%, 66%),
hsl(89, 85%, 66%),
hsl(134, 85%, 66%),
hsl(179, 85%, 66%)
);
background-size: 300% 300%;
background-position: 0 50%;
border-radius: 10px;
animation: moveGradient 3s alternate infinite;
}
@keyframes moveGradient {
50% {
background-position: 100% 50%;
}
}
</style>