From 480a0bd6d23989f6c9e4fac387359e9ebfaacccf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 31 Mar 2026 03:24:46 +0000 Subject: [PATCH] feat: listen to napi-rs-worker-error on window and display it Agent-Logs-Url: https://github.com/rolldown/repl/sessions/06af9076-1e83-436e-95cb-0e8c6cc2f085 Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com> --- app/components/OutputContainer.vue | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/app/components/OutputContainer.vue b/app/components/OutputContainer.vue index 40b753c..58001fd 100644 --- a/app/components/OutputContainer.vue +++ b/app/components/OutputContainer.vue @@ -166,6 +166,20 @@ watch(error, (newError) => { bundlerError.value = newError }) +const napiWorkerError = ref<{ + message?: string + stack?: string +} | null>(null) +useEventListener(globalThis, 'napi-rs-worker-error', (event: CustomEvent) => { + napiWorkerError.value = event.detail +}) + +watch(status, (newStatus) => { + if (newStatus === 'pending') { + napiWorkerError.value = null + } +}) + const isLoading = computed(() => status.value === 'pending') const isLoadingDebounced = useDebounce(isLoading, 100) @@ -233,6 +247,26 @@ const sourcemapLinks = computed(() => {
     
+    
+ +
+