mirror of
https://github.com/baserow/baserow.git
synced 2026-12-05 00:38:35 +00:00
* fix: keep agent approval controls visible on every pending call * fix: show private tool failure details to agent builders * fix: align approval buttons and wrap them as a group * fix: highlight failed tool calls and show the reason on demand * fix: preserve native disclosure buttons in tool history * fix: label the batch action Always approve all * fix: simplify approval rows and open tool errors in a context * fix: give the always approve action more room * fix: show failed tool calls once in approval cards * feat: show live tool execution status in agent conversations * fix: align tool status icons across approval rows * fix: shorten batch button to Always approve * fix: explain future tool access in approval tooltips * fix: right-align tool statuses with trailing icons * fix: match the tool spinner to the status icons * fix: give approval buttons equal widths * fix: explain email failures at the agent boundary * fix: map known integration failures to safe agent messages * fix: wrap tool statuses and refresh private diagnostics on demand * fix: order the agent diagnostics migration and verify finish payloads
53 lines
1.3 KiB
Vue
53 lines
1.3 KiB
Vue
<template>
|
|
<button
|
|
ref="trigger"
|
|
type="button"
|
|
class="chat-tool-failure"
|
|
aria-haspopup="dialog"
|
|
:aria-expanded="context?.open ?? false"
|
|
:aria-controls="contextId"
|
|
@click="context.toggle($event.currentTarget, 'bottom', 'right')"
|
|
>
|
|
<i class="iconoir-warning-triangle" aria-hidden="true" />
|
|
{{ $t('toolPresentation.statusFailed') }}
|
|
</button>
|
|
<Context
|
|
:id="contextId"
|
|
:key="reason"
|
|
ref="context"
|
|
class="context--error-message"
|
|
role="dialog"
|
|
tabindex="-1"
|
|
:aria-label="$t('toolPresentation.statusFailed')"
|
|
:aria-describedby="reasonId"
|
|
:horizontal-viewport-margin="12"
|
|
@shown="focusContext"
|
|
@keydown.esc.stop="dismiss"
|
|
>
|
|
<p :id="reasonId" class="chat-tool-failure__reason">{{ reason }}</p>
|
|
</Context>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { nextTick, ref, useId } from 'vue'
|
|
import Context from '@baserow/modules/core/components/Context'
|
|
|
|
defineProps({ reason: { type: String, required: true } })
|
|
const trigger = ref(null)
|
|
const context = ref(null)
|
|
const contextId = useId()
|
|
const reasonId = useId()
|
|
|
|
async function focusContext() {
|
|
await nextTick()
|
|
if (context.value?.open) {
|
|
context.value.getTeleportedElement().focus({ preventScroll: true })
|
|
}
|
|
}
|
|
|
|
function dismiss() {
|
|
context.value.hide()
|
|
trigger.value.focus({ preventScroll: true })
|
|
}
|
|
</script>
|