mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
PR Feedback
This commit is contained in:
parent
9075ff08e0
commit
2e5c2a88dd
|
@ -284,12 +284,18 @@ const activatePane = () => {
|
||||||
emit('activatePane');
|
emit('activatePane');
|
||||||
};
|
};
|
||||||
|
|
||||||
const shouldShowWarning = computed(() => {
|
const didNotUseTools = computed(() => {
|
||||||
if (!node.value) return false;
|
if (!node.value) return false;
|
||||||
|
|
||||||
const parents = props.workflow.getParentNodes(node.value.name, NodeConnectionType.AiTool, 1);
|
const toolsAvailable = props.workflow.getParentNodes(
|
||||||
const active = parents.filter((x) => !!workflowRunData.value?.[x]?.[props.runIndex]);
|
node.value.name,
|
||||||
return parents.length > 0 && active.length === 0;
|
NodeConnectionType.AiTool,
|
||||||
|
1,
|
||||||
|
);
|
||||||
|
const toolsUsedInLatestRun = toolsAvailable.filter(
|
||||||
|
(x) => !!workflowRunData.value?.[x]?.[props.runIndex],
|
||||||
|
);
|
||||||
|
return toolsAvailable.length > 0 && toolsUsedInLatestRun.length === 0;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -384,7 +390,7 @@ const shouldShowWarning = computed(() => {
|
||||||
<RunDataAi :node="node" :run-index="runIndex" :workflow="workflow" />
|
<RunDataAi :node="node" :run-index="runIndex" :workflow="workflow" />
|
||||||
</template>
|
</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">
|
<div :class="$style.noToolsUsedAlert" data-test-id="no-tools-used-callout">
|
||||||
<N8nCallout theme="secondary">
|
<N8nCallout theme="secondary">
|
||||||
{{ i18n.baseText('ndv.output.noToolUsedInfo') }}
|
{{ i18n.baseText('ndv.output.noToolUsedInfo') }}
|
||||||
|
|
Loading…
Reference in a new issue