From 8bf84b26f352b56a1007e798d696029dc9ab32a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=C2=B7Dong?= <98630204+GeorgeDong32@users.noreply.github.com> Date: Tue, 22 Jul 2025 00:45:13 +0800 Subject: [PATCH] feat(constant): add Godot scene files(.tscn) (#8362) * feat(constant): add Godot scene files(.tscn) * fix(AttachmentPreview): consolidate file extension checks --- packages/shared/config/constant.ts | 3 ++- src/renderer/src/pages/home/Inputbar/AttachmentPreview.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/shared/config/constant.ts b/packages/shared/config/constant.ts index fc118b6b87..6aa276a7c0 100644 --- a/packages/shared/config/constant.ts +++ b/packages/shared/config/constant.ts @@ -348,7 +348,8 @@ const textExtsByCategory = new Map([ '.x3d', // X3D文件 '.gltf', // glTF JSON '.prefab', // Unity预制体 (YAML格式) - '.meta' // Unity元数据文件 (YAML格式) + '.meta', // Unity元数据文件 (YAML格式) + '.tscn' // Godot场景文件 ] ], [ diff --git a/src/renderer/src/pages/home/Inputbar/AttachmentPreview.tsx b/src/renderer/src/pages/home/Inputbar/AttachmentPreview.tsx index b2004994df..678140c78f 100644 --- a/src/renderer/src/pages/home/Inputbar/AttachmentPreview.tsx +++ b/src/renderer/src/pages/home/Inputbar/AttachmentPreview.tsx @@ -61,7 +61,7 @@ export const getFileIcon = (type?: string) => { return } - if (['.txt', '.json', '.log', '.yml', '.yaml', '.xml', '.csv'].includes(ext)) { + if (['.txt', '.json', '.log', '.yml', '.yaml', '.xml', '.csv', '.tscn', '.gd'].includes(ext)) { return }