mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* feat(agent): preview template Agents like the real page, with example conversations A template preview showed an Agent as a plain list. Official templates can now carry shared conversations as examples, which visitors read but an install never copies. * test: list the conversations a template preview may read * fix(agent): address template preview review findings Mark pending ask-first tools in the preview, keep user-template conversations private in the core template manager, drop tool steps from example conversations, and show load errors with a retry. * feat(agent): carry pinned shared conversations as examples in exports and templates Davide and Bram chose to export user-started, pinned and shared conversations in every export and template, import them as examples, and show them in user template previews too. * fix(agent): drop the official Agent template and show preview tools read-only The template would list an Agent to every instance while the Agent builder is behind its flag. Visitors can now open the tool groups without changing them. * fix(agent): keep example conversations read-only and skip broken ones on import A message sent to an installed example would leave with the next export, so examples take none. Pinning a shared conversation now says it becomes an example.
50 lines
1.2 KiB
Vue
50 lines
1.2 KiB
Vue
<template>
|
|
<Modal
|
|
ref="modal"
|
|
small
|
|
role="dialog"
|
|
aria-modal="true"
|
|
:aria-labelledby="titleId"
|
|
:aria-describedby="`${descriptionId} ${noteId}`"
|
|
>
|
|
<template #content>
|
|
<h2 :id="titleId" class="box__title">
|
|
{{ $t('agent.shareConversation') }}
|
|
</h2>
|
|
<p :id="descriptionId">{{ $t('agent.shareConversationWarning') }}</p>
|
|
<p :id="noteId">{{ $t('agent.shareConversationExportNote') }}</p>
|
|
<div class="actions actions--right actions--gap">
|
|
<Button type="secondary" @click="modal.hide()">
|
|
{{ $t('action.cancel') }}
|
|
</Button>
|
|
<Button @click="share">{{ $t('agent.share') }}</Button>
|
|
</div>
|
|
</template>
|
|
</Modal>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref, useId } from 'vue'
|
|
|
|
/** Confirms sharing a private conversation, which can't be undone. */
|
|
const emit = defineEmits(['share'])
|
|
|
|
const modal = ref(null)
|
|
const conversation = ref(null)
|
|
const titleId = useId()
|
|
const descriptionId = useId()
|
|
const noteId = useId()
|
|
|
|
function show(item) {
|
|
conversation.value = item
|
|
modal.value.show()
|
|
}
|
|
|
|
function share() {
|
|
emit('share', conversation.value)
|
|
modal.value.hide()
|
|
}
|
|
|
|
defineExpose({ show })
|
|
</script>
|