mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-10-04 20:43:04 +00:00
c030c9ee4b
Embedding: - Persist embedding_max_tokens. It was dropped when saving the provider config and always reset to the 8192 default, so self-hosted models with a smaller limit kept getting rejected. - Split embedding requests to stay under the provider's item and token caps. A large snippet or URL import used to go in one request, hit the cap, fail, and get retried every minute forever. - Skip blank chunks. An empty input string makes the API reject the whole batch. - Add the tiktoken tokenizer (cl100k_base) with tests for token counting. Agent prompt: - Move contact fields, the conversation subject, and custom attributes out of the system prompt and into a delimited user-role block, so a crafted name or subject can't act as an instruction. Frontend: - Switch the primary and sidebar colors to a green theme. - Show a "summarizing" info toast while the AI summary runs, and add an info toast variant. - Make the snippet content box taller and the snippet dialog wider. - Drop a hardcoded dark hover color on the scroll-to-bottom button.
43 lines
1.2 KiB
Vue
43 lines
1.2 KiB
Vue
<template>
|
|
<Transition
|
|
enter-active-class="transition ease-out duration-200"
|
|
enter-from-class="opacity-0 translate-y-1"
|
|
enter-to-class="opacity-100 translate-y-0"
|
|
leave-active-class="transition ease-in duration-150"
|
|
leave-from-class="opacity-100 translate-y-0"
|
|
leave-to-class="opacity-0 translate-y-1"
|
|
>
|
|
<div v-show="!isAtBottom" class="absolute bottom-5 right-6 z-10">
|
|
<button
|
|
@click="$emit('scroll-to-bottom')"
|
|
class="w-10 h-10 rounded-full flex items-center justify-center shadow-lg border bg-background text-primary transition-colors duration-200 hover:bg-accent"
|
|
>
|
|
<ChevronDown class="w-4 h-4" />
|
|
</button>
|
|
<span
|
|
v-if="unreadCount > 0"
|
|
class="absolute -top-1 -right-1 min-w-[20px] h-5 px-1.5 rounded-full bg-green-500 text-primary-foreground text-xs font-medium flex items-center justify-center"
|
|
>
|
|
{{ unreadCount }}
|
|
</span>
|
|
</div>
|
|
</Transition>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ChevronDown } from 'lucide-vue-next'
|
|
|
|
defineProps({
|
|
isAtBottom: {
|
|
type: Boolean,
|
|
required: true
|
|
},
|
|
unreadCount: {
|
|
type: Number,
|
|
default: 0
|
|
}
|
|
})
|
|
|
|
defineEmits(['scroll-to-bottom'])
|
|
</script>
|