From 6553737c78fc2075176821dff3c8b1db0421705f Mon Sep 17 00:00:00 2001 From: JasonJason-oy Date: Sun, 2 Aug 2026 11:58:24 +0800 Subject: [PATCH] fix(tui): render Windows file:// plugin names correctly in /status --- packages/tui/src/component/dialog-status.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/tui/src/component/dialog-status.tsx b/packages/tui/src/component/dialog-status.tsx index 6c8fabdbb3a3..2804d239e90e 100644 --- a/packages/tui/src/component/dialog-status.tsx +++ b/packages/tui/src/component/dialog-status.tsx @@ -19,9 +19,9 @@ export function DialogStatus() { const result = list.map((item) => { const value = typeof item === "string" ? item : item[0] if (value.startsWith("file://")) { - const path = fileURLToPath(value) - const parts = path.split("/") - const filename = parts.pop() || path + const filePath = fileURLToPath(value) + const parts = filePath.split(/[\\/]/) + const filename = parts.pop() || filePath if (!filename.includes(".")) return { name: filename } const basename = filename.split(".")[0] if (basename === "index") { @@ -166,3 +166,4 @@ export function DialogStatus() { ) } +