-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(editor): Add Info Note to NDV Output Panel if no existing Tools were used during Execution #11672
base: master
Are you sure you want to change the base?
feat(editor): Add Info Note to NDV Output Panel if no existing Tools were used during Execution #11672
Conversation
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
…d-a-warning-when-no-tool-is-called
@@ -1360,6 +1360,9 @@ defineExpose({ enterEditMode }); | |||
<N8nText v-n8n-html="hint.message" size="small"></N8nText> | |||
</N8nCallout> | |||
|
|||
<div v-if="hasNodeRun"> | |||
<slot name="panel-callout-info"></slot> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The slot here allows us to inject components for different panels, but the callout here could be reused for different features and panels. Because we might want to reuse this in the future, it would be best to add the Callout component here and the message as a prop.
Also this would get rid of the unnecessary empty div in the test/render.
<N8nCallout v-if="props.calloutMessageKey" "props.:key="calloutMessageKey" />
padding-left: var(--spacing-s); | ||
padding-right: var(--spacing-s); | ||
padding-bottom: var(--spacing-xs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit/optional - could use padding:
:key="props.calloutMessageKey" | ||
:class="$style.callout" | ||
theme="secondary" | ||
data-test-id="no-tools-used-callout" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test-id needs to be more generic now.
n8n Run #7870
Run Properties:
|
Project |
n8n
|
Branch Review |
ADO-2753/feature-add-a-warning-when-no-tool-is-called
|
Run status |
Passed #7870
|
Run duration | 04m 23s |
Commit |
a6445ade5c: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 CharlieKolb 🗃️ e2e/*
|
Committer | Charlie Kolb |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
2
|
Skipped |
0
|
Passing |
468
|
View all changes introduced in this branch ↗︎ |
✅ All Cypress E2E specs passed |
…d-a-warning-when-no-tool-is-called
…d-a-warning-when-no-tool-is-called
const allToolsWereUnusedNotice = computed(() => { | ||
if (!node.value || runsCount.value === 0) return undefined; | ||
|
||
const toolsAvailable = props.workflow.getParentNodes( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to get parents from props.runIndex
here? Would this track between runs or could this use current parents (and thus tools) with an outdated runIndex if pinned or selecting between multiple executions of the node?
Summary
Add an info notice to the output panel if the AI Node had tools available but used none.
With calculator tool:
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/ADO-2753/feature-add-a-warning-when-no-tool-is-called
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)