Skip to content
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

fix(editor): Don't show toolsUnused notice if run had errors #12529

Merged
merged 4 commits into from
Jan 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions packages/editor-ui/src/components/OutputPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,15 @@ const hasAiMetadata = computed(() => {
return false;
});

// Determine the initial output mode to logs if the node has an error and the logs are available
const defaultOutputMode = computed<OutputType>(() => {
const hasError =
const hasError = computed(
() =>
workflowRunData.value &&
node.value &&
(workflowRunData.value[node.value.name]?.[props.runIndex]?.error as NodeError);
(workflowRunData.value[node.value.name]?.[props.runIndex]?.error as NodeError),
);

// Determine the initial output mode to logs if the node has an error and the logs are available
const defaultOutputMode = computed<OutputType>(() => {
return Boolean(hasError) && hasAiMetadata.value ? OUTPUT_TYPE.LOGS : OUTPUT_TYPE.REGULAR;
});

Expand Down Expand Up @@ -216,7 +218,7 @@ const canPinData = computed(() => {
});

const allToolsWereUnusedNotice = computed(() => {
if (!node.value || runsCount.value === 0) return undefined;
if (!node.value || runsCount.value === 0 || hasError) return undefined;

// With pinned data there's no clear correct answer for whether
// we should use historic or current parents, so we don't show the notice,
Expand Down
Loading