Files
FabledGrimoire/frontend/src/components/SearchBar.vue
T
bvandeusenandClaude Opus 4.6 fb18d2c41d Add note context visibility in chat and standardize UI design tokens
Improve chat context: build_context() now returns metadata about auto-found
notes, emitted as an SSE event so the frontend can display context pills
showing which notes influenced the response. Users can promote notes for
deeper context (+) or exclude irrelevant ones (x). A note picker lets users
manually attach notes. Multi-word search uses per-term AND matching, and
auto-search iterates keywords individually for broader OR-style coverage.

Standardize styling: introduce CSS design tokens (--radius-sm/md/lg/pill,
--color-success/warning/overlay, --focus-ring) and migrate all components
to use them. Fix header alignment to full-width, add active nav link state,
replace hardcoded colors with CSS variables, and normalize button padding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 06:49:12 -05:00

38 lines
778 B
Vue

<script setup lang="ts">
import { ref, watch } from "vue";
const emit = defineEmits<{ search: [query: string] }>();
const query = ref("");
let timeout: ReturnType<typeof setTimeout>;
watch(query, (val) => {
clearTimeout(timeout);
timeout = setTimeout(() => emit("search", val), 300);
});
</script>
<template>
<input
v-model="query"
type="text"
placeholder="Search notes..."
class="search-input"
/>
</template>
<style scoped>
.search-input {
width: 100%;
padding: 0.5rem 0.75rem;
border: 1px solid var(--color-input-border);
border-radius: var(--radius-sm);
font-size: 1rem;
box-sizing: border-box;
background: var(--color-bg-card);
color: var(--color-text);
}
.search-input::placeholder {
color: var(--color-text-muted);
}
</style>