Vue component
Ship the complete chat experience
Persistence, streaming, session restoration, Markdown and context compaction are already wired together.<script setup lang="ts">
import { ref } from "vue";
import { PromptApi } from "@desource/browser-ai-vue";
import "@desource/browser-ai-vue/assets/lib.css";
const starterMessages = [{
id: "welcome",
role: "assistant" as const,
content: "## Ready\nAsk me anything about this page."
}];
</script>
<template>
<PromptApi
:initial-messages="starterMessages"
system-prompt="Answer clearly and use Markdown."
@prompt-complete="({ response }) => console.log(response)" />
</template>