From 4f4328d97cd9c8a1d2295221822f540ae0893595 Mon Sep 17 00:00:00 2001 From: Nitesh <84944042+niteshbalusu11@users.noreply.github.com> Date: Tue, 5 Aug 2025 17:19:23 -0400 Subject: [PATCH] Add swift files to fallback list (#6724) --- src/services/code-index/processors/__tests__/parser.vb.spec.ts | 1 + src/services/code-index/shared/supported-extensions.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/services/code-index/processors/__tests__/parser.vb.spec.ts b/src/services/code-index/processors/__tests__/parser.vb.spec.ts index 3448ed6737..3b17e0d67f 100644 --- a/src/services/code-index/processors/__tests__/parser.vb.spec.ts +++ b/src/services/code-index/processors/__tests__/parser.vb.spec.ts @@ -243,6 +243,7 @@ describe("Fallback Extensions Configuration", () => { // Extensions that should use fallback expect(shouldUseFallbackChunking(".vb")).toBe(true) expect(shouldUseFallbackChunking(".scala")).toBe(true) + expect(shouldUseFallbackChunking(".swift")).toBe(true) // Extensions that should not use fallback (have working parsers) expect(shouldUseFallbackChunking(".js")).toBe(false) diff --git a/src/services/code-index/shared/supported-extensions.ts b/src/services/code-index/shared/supported-extensions.ts index 16afddf828..80dd7102ff 100644 --- a/src/services/code-index/shared/supported-extensions.ts +++ b/src/services/code-index/shared/supported-extensions.ts @@ -21,6 +21,7 @@ export const scannerExtensions = allExtensions export const fallbackExtensions = [ ".vb", // Visual Basic .NET - no dedicated WASM parser ".scala", // Scala - uses fallback chunking instead of Lua query workaround + ".swift", // Swift - uses fallback chunking due to parser instability ] /**