Files
alamin-br fc1131bc62 feat(agent): support Agents in templates and import/export (#6789)
* feat(agent): skip Agents when importing with the feature flag off

* feat(agent): use an enabled model when an imported Agent's model isn't available

* feat(agent): keep an imported Agent's tool choices until an identity is picked

* feat(agent): tell the editor an imported Agent's tools turn on with an identity

* feat(agent): let template previews read an Agent's configuration

* feat(agent): show Agents in the template preview

* fix(agent): check the configuration permission when copying an Agent into a user template

* fix(agent): let signed out visitors preview an Agent in a template

* fix(agent): sync a template again once its Agents can be imported

* fix(agent): make an installed Agent's data-changing tools ask first

* fix(agent): list only MCP servers as connected apps in the template preview

* test(agent): cover blank imported models and duplicates without their identity

* fix(agent): keep pending tools when tools are saved without an identity

Tools stay off without an identity, so a full-config save from an API client
shouldn't throw away the choices an imported Agent is waiting to apply.

* fix(agent): fail a template install when every application is left out

With the agent builder flag off, a template holding only Agents installed
nothing yet reported success and counted the install.

* fix(agent): say why a template with nothing to install fails

"The content of the template was removed" sent people looking for a broken
template when the real cause is a feature turned off on this instance.

* docs(agent): say a user template copy refuses an Agent the owner can't read

* fix(agent): import Agents for users granted the flag

Feature flags can now be granted per user, so the import checks the user it's for instead of only the instance.

* fix(agent): sign up with a template of only Agents while their flag is off

The signup install raised TemplateHasNothingToInstall and returned a 500 without creating the account.

* fix(agent): refuse a user template when none of its applications can be copied

An owner without the Agent flag got an empty template that no one could install.

* fix(agent): refuse a user template that would leave out a selected Agent

A mixed selection lost its Agents without notice, and every update lost them again.

* fix(agent): skip templates with nothing to install in fill_workspaces

* fix(agent): name the applications a user template can't copy

The job failed with a generic message, and checking before the copy creates nothing.

* fix(agent): don't offer hidden applications to export or save as a template

Agents without their feature flag were listed, so Select all always failed.

* chore(agent): log the templates fill_workspaces skips

* fix(agent): filter pickers by type availability, not by permissions

Permissions can load after the update form preselects, which dropped builders and automations.

* fix(agent): keep the count check after a user template copy

* fix(agent): don't count unusable applications as template content

* fix(agent): import Agents whatever the importer's feature flags

A user's early access must not change what an import saves. Agents are
now kept by template sync, template installs, user template copies and
workspace file imports, so someone who gets the flag later finds them
with their configuration. Also moves is_template_storage after the
existing ImportExportConfig fields, so positional arguments keep their
meaning.

* fix(agent): hide Agents in template previews and install toasts without the flag

The preview opens another application when the preferred one is a hidden
Agent, and the install toast links to the first application the user can
see.
2026-11-20 13:57:09 +00:00

36 lines
952 B
Vue

<template>
<li class="tree__item">
<div
class="tree__action"
:class="{ 'tree__action--highlighted': application._.selected }"
>
<a class="tree__link" @click="select">
<i class="tree__icon" :class="application._.type.iconClass"></i>
<span class="tree__link-text">{{ application.name }}</span>
</a>
</div>
</li>
</template>
<script setup>
import { AGENT_APPLICATION_TYPE } from '@baserow/modules/agent/constants'
/** Lists an Agent in the sidebar of a template preview. */
const props = defineProps({
application: { type: Object, required: true },
page: {
required: true,
validator: (prop) => typeof prop === 'object' || prop === null,
},
})
const emit = defineEmits(['selected', 'selected-page'])
function select() {
emit('selected', props.application)
emit('selected-page', {
application: AGENT_APPLICATION_TYPE,
value: { agent: props.application },
})
}
</script>