mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* feat(agent-builder): answer messages with background replies Each message starts a core chat run that streams the configured model's reply and saves it with its turn: status, error code, model messages, usage, and the provider and model that answered. Messages record their author. One reply runs per conversation, and BASEROW_AGENT_MAX_ACTIVE_RUNS_PER_WORKSPACE caps a workspace (default 5). Copies keep turns and authors and end replies still running. * feat(agent-builder): stream, stop and resume replies in the chat The chat follows each reply through the core run stream, shows authors, lets the user stop a reply, resumes after a reload or in another tab, and explains replies that did not finish. * refactor(agent): keep replies focused on chat * refactor(agent): keep each reply's outcome on its message A reply is an assistant message created empty with its prompt, and the run writing it saves its text, status and error code there, replacing the turn table. Send responses name the run they started, so a reply that ends before the response is still followed. Retries read the run before the reply, listed replies that still look unfinished are read again from the primary, and blank replies are saved empty. * feat(chat): add shared chat components Store-free message, markdown, composer and copy button components styled after the agent builder designs, so the Agent chat and later Kuma can share one UI. Replies render markdown without images, which could carry conversation data to any URL, and app links open in the router. * feat(agent-builder): show replies with the shared chat components Replies render in place from the conversation history under the agent's name and avatar, with Thinking and Writing above the composer while they run, a note when stopped and an error card when they fail. Stop stays available while a reply runs, even when the configuration stops being ready. * feat(agent): hand finished replies to followers and announce reply runs A finished run carries the saved reply as the messages list shows it, so followers can apply it without reading the messages again. Conversations expose the run writing a reply, and agent_conversation_updated carries that run's id when a reply starts and null when it ends, with the conversation's updated_on to order them, so every session can show it without requests. A blank model answer now ends the reply as failed, and replies reuse ChatRunStatus. Reply permission checks move to the service, sends check the agent-builder flag, finishing a reply relies on the engine's run lock instead of a row lock, and the workspace limit defaults to 10. * feat(chat): share Kuma's typing and loading indicators Kuma's bouncing dots and reasoning spinner move to core as ChatTyping and ChatLoading, and Kuma renders them from there with the same look. ChatComposer's status prop becomes activity and keeps focus on the input when Send and Stop swap, ChatMessage drops its author props until conversations can be shared, and markdown leaves mailto and other non-web links to the browser. * feat(agent-builder): show reply progress like Kuma and apply replies in place A reply shows the typing dots until its first text, then a spinner beside the streaming text. The finished run's saved reply replaces it in place, a run's start no longer reads the messages, and a streamed chunk re-renders only the reply being written. Realtime updates set a listed conversation's run without reading the list again, so its dot pulses grey while it replies, in every session, and the page drops its chat subscription when no conversation is open. * fix(agent): handle empty replies and legacy message retries * fix(agent): address reply review feedback * refactor(chat): share response UI with Kuma * fix(assistant): separate thinking from streamed answers * feat(chat): share message footers with Kuma * fix(chat): keep thinking blue and streamed answers expanded
32 lines
604 B
Vue
32 lines
604 B
Vue
<template>
|
|
<button
|
|
v-tooltip="$t('action.copy')"
|
|
type="button"
|
|
class="chat-message__action"
|
|
:aria-label="$t('action.copy')"
|
|
@click="copy"
|
|
>
|
|
<i class="iconoir-copy"></i>
|
|
<Copied ref="copied" />
|
|
</button>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref } from 'vue'
|
|
|
|
const props = defineProps({ text: { type: String, required: true } })
|
|
const emit = defineEmits(['error'])
|
|
|
|
const copied = ref(null)
|
|
|
|
async function copy() {
|
|
try {
|
|
await navigator.clipboard.writeText(props.text)
|
|
} catch (error) {
|
|
emit('error', error)
|
|
return
|
|
}
|
|
copied.value?.show()
|
|
}
|
|
</script>
|