Files
baserow/web-frontend/modules/agent/components/AgentChatIntro.vue
Davide Silvestri 992054e30f feat(agent): suggested messages and public chat appearance (#6874)
* feat(agent): suggest messages to start a conversation with

An agent gets up to four suggested messages, edited in its Instructions.
A new conversation shows them as cards, on the agent's page and on its
public chat, and a click puts the message in the box, ready to send.

* feat(agent): let builders style their public chat page

A public chat gets a font, an accent color, a plain or gradient
background and a "Powered by Baserow" switch, set in its card. The page,
password screen included, uses them; the core chat styles take their
accent from CSS variables so the page only sets the color.

* feat(agent): introduce an empty public chat with its title and welcome text

An empty chat shows a mark in the accent colour, the title, the welcome text and the suggested messages in the middle, like the member chat. The header with the title only appears once a conversation exists.

The welcome text is rendered as markdown on the server, so it no longer appears after the page has loaded.

* fix(agent): fall back to a generic font family on the public chat

A quoted generic family is read as a font name, so the page showed a serif font until the chosen one loaded.

* feat(agent): keep a public chat's appearance on a copy

A duplicated, restored, exported or templated agent's public chat keeps its font, colours, background and Powered by switch. A value from a file that the API would refuse falls back to the default.

* fix(agent): check an imported agent's suggested messages

A file could carry suggested messages the API refuses, and a value that isn't a list broke the workspace's application list. An import now keeps them only when the API would accept them. The copy tests also cover suggested messages and a user template.

* fix(agent): give public chats a neutral default appearance

* fix(agent): label suggested messages and cover when they can be used
2026-11-26 20:42:31 +01:00

22 lines
608 B
Vue

<template>
<div class="agent-chat__intro">
<div class="agent-chat__avatar">
<img :src="agentOrb" alt="" />
</div>
<i18n-t scope="global" keypath="agent.talkTo" tag="h1">
<template #name>
<span class="agent-chat__intro-name">{{ name }}</span>
</template>
</i18n-t>
<p>{{ $t('agent.chatDescription') }}</p>
<slot />
</div>
</template>
<script setup>
import agentOrb from '@baserow/modules/agent/assets/images/agent-orb.svg?url'
/** What an Agent's chat shows before its first message. */
defineProps({ name: { type: String, required: true } })
</script>