Improve
This commit is contained in:
@@ -4,8 +4,9 @@
|
|||||||
import Accordion from "./gradio/app/Accordion.svelte";
|
import Accordion from "./gradio/app/Accordion.svelte";
|
||||||
import uiState from '$lib/stores/uiState';
|
import uiState from '$lib/stores/uiState';
|
||||||
import type { ComfyNodeDefInputType } from "$lib/ComfyNodeDef";
|
import type { ComfyNodeDefInputType } from "$lib/ComfyNodeDef";
|
||||||
import type { INodeInputSlot, LGraphNode, Subgraph } from "@litegraph-ts/core";
|
import type { INodeInputSlot, LGraphNode, Subgraph } from "@litegraph-ts/core";
|
||||||
import { UpstreamNodeLocator } from "./ComfyPromptSerializer";
|
import { UpstreamNodeLocator } from "./ComfyPromptSerializer";
|
||||||
|
import JsonView from "./JsonView.svelte";
|
||||||
|
|
||||||
export let app: ComfyApp;
|
export let app: ComfyApp;
|
||||||
export let errors: ComfyGraphErrors;
|
export let errors: ComfyGraphErrors;
|
||||||
@@ -84,7 +85,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="error-details">
|
<div class="error-details">
|
||||||
<button class="jump-to-error" class:execution-error={isExecutionError} on:click={() => jumpToError(error)}><span>⮎</span></button>
|
<button class="jump-to-error" class:execution-error={isExecutionError} on:click={() => jumpToError(error)}><span>⮎</span></button>
|
||||||
<div>
|
<div class="error-details-wrapper">
|
||||||
<span class="error-message" class:execution-error={isExecutionError}>{error.message}</span>
|
<span class="error-message" class:execution-error={isExecutionError}>{error.message}</span>
|
||||||
{#if error.exceptionType}
|
{#if error.exceptionType}
|
||||||
<span>({error.exceptionType})</span>
|
<span>({error.exceptionType})</span>
|
||||||
@@ -94,7 +95,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{#if error.input}
|
{#if error.input}
|
||||||
<div class="error-input">
|
<div class="error-input">
|
||||||
<span>Input: `{error.input.name}`</span>
|
<span>Input: <b>{error.input.name}</b></span>
|
||||||
{#if error.input.config}
|
{#if error.input.config}
|
||||||
<span>({getInputTypeName(error.input.config[0])})</span>
|
<span>({getInputTypeName(error.input.config[0])})</span>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -105,6 +106,28 @@
|
|||||||
<span>Find disconnected input</span>
|
<span>Find disconnected input</span>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{#if error.input.receivedValue}
|
||||||
|
<div>
|
||||||
|
<span>Received value: <b>{error.input.receivedValue}</b></span>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{#if error.input.receivedType}
|
||||||
|
<div>
|
||||||
|
<span>Received type: <b>{error.input.receivedType}</b></span>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{#if error.input.config}
|
||||||
|
<div class="error-traceback-wrapper">
|
||||||
|
<Accordion label="Input Config" open={true}>
|
||||||
|
<div class="error-traceback">
|
||||||
|
<div class="error-traceback-contents">
|
||||||
|
<JsonView json={error.input.config[1]} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Accordion>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -188,6 +211,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.error-details {
|
.error-details {
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: var(--spacing-md);
|
gap: var(--spacing-md);
|
||||||
@@ -202,6 +226,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error-details-wrapper {
|
||||||
|
flex: 5 1 0%;
|
||||||
|
}
|
||||||
|
|
||||||
.error-message {
|
.error-message {
|
||||||
color: #F66;
|
color: #F66;
|
||||||
&.execution-error {
|
&.execution-error {
|
||||||
@@ -246,19 +274,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.error-traceback-wrapper {
|
.error-traceback-wrapper {
|
||||||
|
width: 100%;
|
||||||
margin-top: 1.0rem;
|
margin-top: 1.0rem;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
border: 1px solid #888;
|
border: 1px solid #888;
|
||||||
|
|
||||||
.error-traceback {
|
.error-traceback {
|
||||||
font-size: 11pt;
|
font-size: 10pt;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background: #333;
|
background: #333;
|
||||||
|
|
||||||
.error-traceback-contents {
|
.error-traceback-contents {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-family: monospace;
|
font-family: monospace !important;
|
||||||
padding: 1.0rem;
|
padding: 1.0rem;
|
||||||
|
|
||||||
> div {
|
> div {
|
||||||
|
|||||||
Reference in New Issue
Block a user