PR Feedback

This commit is contained in:
Charlie Kolb 2024-11-12 09:42:38 +01:00
parent 9075ff08e0
commit 2e5c2a88dd
No known key found for this signature in database

View file

@ -284,12 +284,18 @@ const activatePane = () => {
emit('activatePane');
};
const shouldShowWarning = computed(() => {
const didNotUseTools = computed(() => {
if (!node.value) return false;
const parents = props.workflow.getParentNodes(node.value.name, NodeConnectionType.AiTool, 1);
const active = parents.filter((x) => !!workflowRunData.value?.[x]?.[props.runIndex]);
return parents.length > 0 && active.length === 0;
const toolsAvailable = props.workflow.getParentNodes(
node.value.name,
NodeConnectionType.AiTool,
1,
);
const toolsUsedInLatestRun = toolsAvailable.filter(
(x) => !!workflowRunData.value?.[x]?.[props.runIndex],
);
return toolsAvailable.length > 0 && toolsUsedInLatestRun.length === 0;
});
</script>
@ -384,7 +390,7 @@ const shouldShowWarning = computed(() => {
<RunDataAi :node="node" :run-index="runIndex" :workflow="workflow" />
</template>
<template v-if="shouldShowWarning" #panel-callout-info>
<template v-if="didNotUseTools" #panel-callout-info>
<div :class="$style.noToolsUsedAlert" data-test-id="no-tools-used-callout">
<N8nCallout theme="secondary">
{{ i18n.baseText('ndv.output.noToolUsedInfo') }}