diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25109b01d2..eed6ba5aac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -180,12 +180,46 @@ jobs: clerk_cli_oauth_client_id: ${{ steps.public_config.outputs.clerk_cli_oauth_client_id }} relay_url: ${{ steps.public_config.outputs.relay_url }} env: + CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} RELAY_DOMAIN: ${{ vars.RELAY_DOMAIN }} RELAY_API_ZONE_NAME: ${{ vars.RELAY_API_ZONE_NAME }} CLERK_PUBLISHABLE_KEY: ${{ vars.CLERK_PUBLISHABLE_KEY }} CLERK_JWT_TEMPLATE: ${{ vars.CLERK_JWT_TEMPLATE }} CLERK_CLI_OAUTH_CLIENT_ID: ${{ vars.CLERK_CLI_OAUTH_CLIENT_ID }} steps: + - name: Checkout + uses: actions/checkout@v6 + with: + ref: ${{ needs.preflight.outputs.ref }} + + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@v1 + with: + node-version-file: package.json + cache: true + run-install: | + args: + - --filter=t3code-relay... + + - id: relay_state + name: Read production relay tracing config + shell: bash + run: | + vp run --filter t3code-relay deploy \ + --stage prod \ + --read-state \ + --github-output \ + --github-env-file "$RUNNER_TEMP/relay-client-tracing.env" + + - name: Upload relay client tracing config + uses: actions/upload-artifact@v7 + with: + name: relay-client-tracing-config + path: ${{ runner.temp }}/relay-client-tracing.env + if-no-files-found: error + retention-days: 1 + - id: public_config name: Resolve production relay public config shell: bash @@ -326,6 +360,20 @@ jobs: cache: true run-install: true + - name: Download relay client tracing config + uses: actions/download-artifact@v8 + with: + name: relay-client-tracing-config + path: ${{ runner.temp }}/relay-client-tracing + + - name: Load relay client tracing config + shell: bash + run: | + config_path="$RUNNER_TEMP/relay-client-tracing/relay-client-tracing.env" + tracing_token="$(sed -n 's/^T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=//p' "$config_path")" + echo "::add-mask::$tracing_token" + cat "$config_path" >> "$GITHUB_ENV" + - name: Align package versions to release version run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}" @@ -573,6 +621,20 @@ jobs: - --filter=@t3tools/web... - --filter=@t3tools/scripts... + - name: Download relay client tracing config + uses: actions/download-artifact@v8 + with: + name: relay-client-tracing-config + path: ${{ runner.temp }}/relay-client-tracing + + - name: Load relay client tracing config + shell: bash + run: | + config_path="$RUNNER_TEMP/relay-client-tracing/relay-client-tracing.env" + tracing_token="$(sed -n 's/^T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=//p' "$config_path")" + echo "::add-mask::$tracing_token" + cat "$config_path" >> "$GITHUB_ENV" + - name: Align package versions to release version run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}" @@ -735,6 +797,20 @@ jobs: - --filter=@t3tools/scripts... - --filter=@t3tools/web... + - name: Download relay client tracing config + uses: actions/download-artifact@v8 + with: + name: relay-client-tracing-config + path: ${{ runner.temp }}/relay-client-tracing + + - name: Load relay client tracing config + shell: bash + run: | + config_path="$RUNNER_TEMP/relay-client-tracing/relay-client-tracing.env" + tracing_token="$(sed -n 's/^T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=//p' "$config_path")" + echo "::add-mask::$tracing_token" + cat "$config_path" >> "$GITHUB_ENV" + - name: Align package versions to release version run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}" @@ -781,6 +857,9 @@ jobs: --build-env "T3CODE_CLERK_PUBLISHABLE_KEY=${T3CODE_CLERK_PUBLISHABLE_KEY:-}" \ --build-env "T3CODE_CLERK_JWT_TEMPLATE=${T3CODE_CLERK_JWT_TEMPLATE:-}" \ --build-env "T3CODE_RELAY_URL=${T3CODE_RELAY_URL:-}" \ + --build-env "T3CODE_RELAY_CLIENT_OTLP_TRACES_URL=${T3CODE_RELAY_CLIENT_OTLP_TRACES_URL:-}" \ + --build-env "T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET=${T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET:-}" \ + --build-env "T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=${T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN:-}" \ --build-env "VITE_HOSTED_APP_URL=$router_url" \ --build-env "VITE_HOSTED_APP_CHANNEL=$channel_name" )" diff --git a/apps/desktop/src/preview/Manager.test.ts b/apps/desktop/src/preview/Manager.test.ts index ac32d74ec6..d7252d3f8d 100644 --- a/apps/desktop/src/preview/Manager.test.ts +++ b/apps/desktop/src/preview/Manager.test.ts @@ -189,6 +189,55 @@ describe("PreviewManager", () => { ), ); + effectIt.effect("keeps element picking active during subframe navigation", () => + withManager((manager) => + Effect.gen(function* () { + const listeners = new Map void>(); + fromId.mockReturnValue({ + id: 42, + isDestroyed: () => false, + getType: () => "webview", + getURL: () => "https://example.com", + getTitle: () => "Example", + isLoading: () => false, + isFocused: () => true, + getZoomFactor: () => 1, + setZoomFactor: vi.fn(), + on: vi.fn((event: string, listener: (...args: unknown[]) => void) => { + listeners.set(event, listener); + }), + once: vi.fn((event: string, listener: (...args: unknown[]) => void) => { + listeners.set(event, listener); + }), + off: vi.fn(), + ipc: { on: vi.fn(), off: vi.fn(), removeListener: vi.fn() }, + send: webviewSend, + navigationHistory: { canGoBack: () => false, canGoForward: () => false }, + setWindowOpenHandler: vi.fn(), + debugger: { + isAttached: () => false, + attach: vi.fn(), + sendCommand: vi.fn(async () => undefined), + on: vi.fn(), + off: vi.fn(), + }, + } as never); + + yield* manager.createTab("tab_1"); + yield* manager.registerWebview("tab_1", 42); + const pick = yield* manager.pickElement("tab_1").pipe(Effect.forkChild); + yield* Effect.yieldNow; + + listeners.get("did-start-navigation")?.({}, "about:blank", false, false); + yield* Effect.yieldNow; + expect(pick.pollUnsafe()).toBeUndefined(); + + listeners.get("did-start-navigation")?.({}, "https://example.com/next", false, true); + expect(yield* Fiber.join(pick)).toBeNull(); + }), + ), + ); + effectIt.effect("reveals only files inside the configured browser artifact directory", () => withManager((manager) => Effect.gen(function* () { diff --git a/apps/desktop/src/preview/Manager.ts b/apps/desktop/src/preview/Manager.ts index f82741d908..2c4096e8cf 100644 --- a/apps/desktop/src/preview/Manager.ts +++ b/apps/desktop/src/preview/Manager.ts @@ -1344,7 +1344,14 @@ const makeNativeOperations = Effect.fn("PreviewManager.makeOperations")(function ); }; const onDestroyed = () => settle(null); - const onNavigated = () => settle(null); + const onNavigated = ( + _event: Electron.Event, + _url: string, + _isInPlace: boolean, + isMainFrame: boolean, + ) => { + if (isMainFrame) settle(null); + }; const registerPickElement = Effect.fn("PreviewManager.registerPickElement")(function* () { yield* attempt("pickElement.register", () => { wc.ipc.on(ELEMENT_PICKED_CHANNEL, onMessage); diff --git a/apps/desktop/src/window/DesktopWindow.test.ts b/apps/desktop/src/window/DesktopWindow.test.ts index b14c2dedce..75beaefba1 100644 --- a/apps/desktop/src/window/DesktopWindow.test.ts +++ b/apps/desktop/src/window/DesktopWindow.test.ts @@ -68,6 +68,7 @@ function makeFakeBrowserWindow() { once: vi.fn(), restore: vi.fn(), setBackgroundColor: vi.fn(), + setAutoHideCursor: vi.fn(), setTitle: vi.fn(), setTitleBarOverlay: vi.fn(), show: vi.fn(), @@ -78,6 +79,7 @@ function makeFakeBrowserWindow() { window: window as unknown as Electron.BrowserWindow, loadURL: window.loadURL, openDevTools: webContents.openDevTools, + setAutoHideCursor: window.setAutoHideCursor, webContentsListeners, }; } @@ -134,10 +136,17 @@ function makeTestLayer(input: { readonly window: Electron.BrowserWindow; readonly createCount: Ref.Ref; readonly mainWindow: Ref.Ref>; + readonly createdWindowOptions?: Electron.BrowserWindowConstructorOptions[]; readonly openedExternalUrls?: unknown[]; }) { const electronWindowLayer = Layer.succeed(ElectronWindow.ElectronWindow, { - create: () => Ref.update(input.createCount, (count) => count + 1).pipe(Effect.as(input.window)), + create: (options) => + Effect.sync(() => { + input.createdWindowOptions?.push(options); + }).pipe( + Effect.andThen(Ref.update(input.createCount, (count) => count + 1)), + Effect.as(input.window), + ), main: Ref.get(input.mainWindow), currentMainOrFirst: Ref.get(input.mainWindow), focusedMainOrFirst: Ref.get(input.mainWindow), @@ -278,10 +287,12 @@ describe("DesktopWindow", () => { const fakeWindow = makeFakeBrowserWindow(); const createCount = yield* Ref.make(0); const mainWindow = yield* Ref.make>(Option.none()); + const createdWindowOptions: Electron.BrowserWindowConstructorOptions[] = []; const layer = makeTestLayer({ window: fakeWindow.window, createCount, mainWindow, + createdWindowOptions, }); yield* Effect.gen(function* () { @@ -291,6 +302,8 @@ describe("DesktopWindow", () => { yield* desktopWindow.handleBackendReady(new URL("http://127.0.0.1:3773")); assert.equal(yield* Ref.get(createCount), 1); + assert.isTrue(createdWindowOptions[0]?.disableAutoHideCursor); + assert.deepEqual(fakeWindow.setAutoHideCursor.mock.calls, [[false]]); assert.deepEqual(fakeWindow.loadURL.mock.calls[0], ["http://127.0.0.1:5733/"]); assert.equal(fakeWindow.openDevTools.mock.calls.length, 1); }).pipe(Effect.provide(layer)); diff --git a/apps/desktop/src/window/DesktopWindow.ts b/apps/desktop/src/window/DesktopWindow.ts index d9334500aa..af2d516584 100644 --- a/apps/desktop/src/window/DesktopWindow.ts +++ b/apps/desktop/src/window/DesktopWindow.ts @@ -258,6 +258,7 @@ const make = Effect.gen(function* () { minHeight: 620, show: false, autoHideMenuBar: true, + ...(environment.platform === "darwin" ? { disableAutoHideCursor: true } : {}), backgroundColor: getInitialWindowBackgroundColor(shouldUseDarkColors), ...iconOption, title: environment.displayName, @@ -271,6 +272,10 @@ const make = Effect.gen(function* () { }, }); + if (environment.platform === "darwin") { + window.setAutoHideCursor(false); + } + yield* previewManager.setMainWindow(window); window.webContents.on("will-attach-webview", (event, webPreferences, params) => { if ( diff --git a/apps/mobile/clerk-theme.json b/apps/mobile/clerk-theme.json index 52941785f3..119927a04d 100644 --- a/apps/mobile/clerk-theme.json +++ b/apps/mobile/clerk-theme.json @@ -13,7 +13,7 @@ "neutral": "#F5F5F5", "border": "#E5E5EA", "ring": "#A3A3A3", - "muted": "#F5F5F5", + "muted": "#F2F2F7", "shadow": "#000000" }, "darkColors": { @@ -30,7 +30,7 @@ "neutral": "#1C1C1C", "border": "#2A2A2A", "ring": "#525252", - "muted": "#1C1C1C", + "muted": "#0E0E0E", "shadow": "#000000" }, "design": { diff --git a/apps/mobile/global.css b/apps/mobile/global.css index 4642879451..0fbf4fb3c9 100644 --- a/apps/mobile/global.css +++ b/apps/mobile/global.css @@ -18,7 +18,7 @@ --color-foreground: #262626; --color-foreground-secondary: #525252; --color-foreground-muted: #737373; - --color-foreground-tertiary: #a3a3a3; + --color-foreground-tertiary: #8e8e93; /* Borders & separators */ --color-border: rgba(0, 0, 0, 0.08); @@ -28,6 +28,9 @@ /* Subtle backgrounds (badges, pills, overlays) */ --color-subtle: rgba(0, 0, 0, 0.04); --color-subtle-strong: rgba(0, 0, 0, 0.08); + --color-inline-skill-background: rgba(217, 70, 239, 0.12); + --color-inline-skill-border: rgba(217, 70, 239, 0.25); + --color-inline-skill-foreground: #a21caf; /* Primary action */ --color-primary: #262626; @@ -58,6 +61,8 @@ /* Header / glass chrome */ --color-header: rgba(255, 255, 255, 0.97); --color-header-border: rgba(0, 0, 0, 0.06); + --color-glass-surface: rgba(255, 255, 255, 0.72); + --color-glass-tint: rgba(255, 255, 255, 0.18); /* StatusBar */ --color-status-bar: #f2f2f7; @@ -105,8 +110,8 @@ /* Text */ --color-foreground: #f5f5f5; --color-foreground-secondary: #a3a3a3; - --color-foreground-muted: #737373; - --color-foreground-tertiary: #525252; + --color-foreground-muted: #8e8e93; + --color-foreground-tertiary: #636366; /* Borders & separators */ --color-border: rgba(255, 255, 255, 0.06); @@ -116,6 +121,9 @@ /* Subtle backgrounds (badges, pills, overlays) */ --color-subtle: rgba(255, 255, 255, 0.04); --color-subtle-strong: rgba(255, 255, 255, 0.08); + --color-inline-skill-background: rgba(217, 70, 239, 0.12); + --color-inline-skill-border: rgba(217, 70, 239, 0.25); + --color-inline-skill-foreground: #f0abfc; /* Primary action */ --color-primary: #f5f5f5; @@ -136,16 +144,18 @@ /* Inputs */ --color-input: #141414; --color-input-border: rgba(255, 255, 255, 0.08); - --color-placeholder: #737373; + --color-placeholder: #8e8e93; /* Icons */ --color-icon: #f5f5f5; --color-icon-muted: #a3a3a3; - --color-icon-subtle: #737373; + --color-icon-subtle: #8e8e93; /* Header / glass chrome */ --color-header: rgba(10, 10, 10, 0.97); --color-header-border: rgba(255, 255, 255, 0.06); + --color-glass-surface: rgba(23, 23, 23, 0.78); + --color-glass-tint: rgba(23, 23, 23, 0.24); /* StatusBar */ --color-status-bar: #0a0a0a; diff --git a/apps/mobile/modules/t3-composer-editor/LICENSE b/apps/mobile/modules/t3-composer-editor/LICENSE new file mode 100644 index 0000000000..30b20e3b5f --- /dev/null +++ b/apps/mobile/modules/t3-composer-editor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-present 650 Industries, Inc. (aka Expo) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/apps/mobile/modules/t3-composer-editor/expo-module.config.json b/apps/mobile/modules/t3-composer-editor/expo-module.config.json new file mode 100644 index 0000000000..0d6384cd91 --- /dev/null +++ b/apps/mobile/modules/t3-composer-editor/expo-module.config.json @@ -0,0 +1,6 @@ +{ + "platforms": ["apple"], + "apple": { + "modules": ["T3ComposerEditorModule"] + } +} diff --git a/apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditor.podspec b/apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditor.podspec new file mode 100644 index 0000000000..57c09fa953 --- /dev/null +++ b/apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditor.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = 'T3ComposerEditor' + s.version = '1.0.0' + s.summary = 'Native attributed composer editor for T3 Code mobile.' + s.description = 'UIKit-backed rich text composer with atomic skill and file tokens.' + s.author = 'T3 Tools' + s.homepage = 'https://t3tools.com' + s.platforms = { + :ios => '16.4', + } + s.source = { :path => '.' } + s.static_framework = true + + s.dependency 'ExpoModulesCore' + # Swift/Objective-C compatibility + s.pod_target_xcconfig = { + 'DEFINES_MODULE' => 'YES', + } + + s.source_files = "**/*.{h,m,mm,swift,hpp,cpp}" +end diff --git a/apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorModule.swift b/apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorModule.swift new file mode 100644 index 0000000000..5d3b33094c --- /dev/null +++ b/apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorModule.swift @@ -0,0 +1,71 @@ +import ExpoModulesCore + +public class T3ComposerEditorModule: Module { + public func definition() -> ModuleDefinition { + Name("T3ComposerEditor") + + View(T3ComposerEditorView.self) { + Prop("value") { (view: T3ComposerEditorView, value: String) in + view.setValue(value) + } + Prop("tokensJson") { (view: T3ComposerEditorView, tokensJson: String) in + view.setTokensJson(tokensJson) + } + Prop("selectionJson") { (view: T3ComposerEditorView, selectionJson: String) in + view.setSelectionJson(selectionJson) + } + Prop("themeJson") { (view: T3ComposerEditorView, themeJson: String) in + view.setThemeJson(themeJson) + } + Prop("placeholder") { (view: T3ComposerEditorView, placeholder: String) in + view.setPlaceholder(placeholder) + } + Prop("fontFamily") { (view: T3ComposerEditorView, fontFamily: String) in + view.setFontFamily(fontFamily) + } + Prop("fontSize") { (view: T3ComposerEditorView, fontSize: Double) in + view.setFontSize(CGFloat(fontSize)) + } + Prop("lineHeight") { (view: T3ComposerEditorView, lineHeight: Double) in + view.setLineHeight(CGFloat(lineHeight)) + } + Prop("contentInsetVertical") { (view: T3ComposerEditorView, contentInsetVertical: Double) in + view.setContentInsetVertical(CGFloat(contentInsetVertical)) + } + Prop("editable") { (view: T3ComposerEditorView, editable: Bool) in + view.setEditable(editable) + } + Prop("scrollEnabled") { (view: T3ComposerEditorView, scrollEnabled: Bool) in + view.setScrollEnabled(scrollEnabled) + } + Prop("autoFocus") { (view: T3ComposerEditorView, autoFocus: Bool) in + view.setAutoFocus(autoFocus) + } + Prop("autoCorrect") { (view: T3ComposerEditorView, autoCorrect: Bool) in + view.setAutoCorrect(autoCorrect) + } + Prop("spellCheck") { (view: T3ComposerEditorView, spellCheck: Bool) in + view.setSpellCheck(spellCheck) + } + + Events( + "onComposerChange", + "onComposerSelectionChange", + "onComposerFocus", + "onComposerBlur", + "onComposerPasteImages", + "onComposerContentSizeChange" + ) + + AsyncFunction("focus") { (view: T3ComposerEditorView) in + view.focusEditor() + } + AsyncFunction("blur") { (view: T3ComposerEditorView) in + view.blurEditor() + } + AsyncFunction("setSelection") { (view: T3ComposerEditorView, start: Int, end: Int) in + view.setSelection(start: start, end: end) + } + } + } +} diff --git a/apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift b/apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift new file mode 100644 index 0000000000..a88acbc31f --- /dev/null +++ b/apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift @@ -0,0 +1,819 @@ +import ExpoModulesCore +import UIKit + +private struct ComposerTokenPayload: Decodable { + let type: String + let source: String + let label: String + let iconUri: String? + let start: Int + let end: Int +} + +private struct ComposerSelectionPayload: Decodable { + let start: Int + let end: Int +} + +private struct ComposerThemePayload: Decodable { + let text: String + let placeholder: String + let chipBackground: String + let chipBorder: String + let chipText: String + let skillBackground: String + let skillBorder: String + let skillText: String + let fileTint: String +} + +private struct ComposerChipStyle { + let tint: UIColor + let backgroundColor: UIColor + let borderColor: UIColor + let textColor: UIColor +} + +private final class ComposerTextAttachment: NSTextAttachment { + let source: String + + init(source: String, image: UIImage, size: CGSize, baselineOffset: CGFloat) { + self.source = source + super.init(data: nil, ofType: nil) + self.image = image + bounds = CGRect(x: 0, y: baselineOffset, width: size.width, height: size.height) + } + + required init?(coder: NSCoder) { + nil + } +} + +private final class ComposerTextView: UITextView { + private static let pastedImageDirectoryName = "t3-composer-paste" + private static let stalePastedImageAge: TimeInterval = 60 * 60 + + var onPasteImages: (([String]) -> Void)? + var onAttributedMutation: (() -> Void)? + + override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool { + if action == #selector(paste(_:)) { + let pasteboard = UIPasteboard.general + if pasteboard.hasImages || + pasteboard.itemProviders.contains(where: { + $0.canLoadObject(ofClass: UIImage.self) + }) { + return true + } + } + return super.canPerformAction(action, withSender: sender) + } + + override func paste(_ sender: Any?) { + let pasteboard = UIPasteboard.general + let imageProviders = pasteboard.itemProviders.filter { + $0.canLoadObject(ofClass: UIImage.self) + } + if !imageProviders.isEmpty { + loadImages(from: imageProviders) + return + } + + let images = pasteboard.images ?? [] + if !images.isEmpty { + let urls = images.compactMap(Self.writeTemporaryImage) + if !urls.isEmpty { + onPasteImages?(urls) + return + } + } + super.paste(sender) + } + + override func deleteBackward() { + guard selectedRange.length == 0, selectedRange.location > 0 else { + super.deleteBackward() + return + } + + let previousOffset = selectedRange.location - 1 + if textStorage.attribute(.attachment, at: previousOffset, effectiveRange: nil) + is ComposerTextAttachment { + replaceDisplayRange(NSRange(location: previousOffset, length: 1)) + return + } + + super.deleteBackward() + } + + private func replaceDisplayRange(_ range: NSRange) { + guard let start = position(from: beginningOfDocument, offset: range.location), + let end = position(from: start, offset: range.length), + let textRange = textRange(from: start, to: end) else { + return + } + replace(textRange, withText: "") + } + + private func loadImages(from providers: [NSItemProvider]) { + let group = DispatchGroup() + let lock = NSLock() + var images = [UIImage?](repeating: nil, count: providers.count) + + for (index, provider) in providers.enumerated() { + group.enter() + provider.loadObject(ofClass: UIImage.self) { object, _ in + defer { group.leave() } + guard let image = object as? UIImage else { + return + } + lock.lock() + images[index] = image + lock.unlock() + } + } + + group.notify(queue: .main) { [weak self] in + let urls = images.compactMap { $0 }.compactMap(Self.writeTemporaryImage) + if !urls.isEmpty { + self?.onPasteImages?(urls) + } + } + } + + override func copy(_ sender: Any?) { + guard selectedRange.length > 0 else { + return super.copy(sender) + } + UIPasteboard.general.string = serializedText(in: selectedRange) + } + + override func cut(_ sender: Any?) { + guard isEditable, selectedRange.length > 0 else { + return super.cut(sender) + } + copy(sender) + textStorage.replaceCharacters(in: selectedRange, with: "") + selectedRange = NSRange(location: selectedRange.location, length: 0) + onAttributedMutation?() + } + + func serializedText() -> String { + serializedText(in: NSRange(location: 0, length: attributedText.length)) + } + + func serializedText(in range: NSRange) -> String { + guard range.length > 0 else { + return "" + } + + let source = NSMutableString() + let nsString = attributedText.string as NSString + var cursor = range.location + let end = NSMaxRange(range) + attributedText.enumerateAttribute(.attachment, in: range) { value, attachmentRange, _ in + if attachmentRange.location > cursor { + source.append( + nsString.substring( + with: NSRange(location: cursor, length: attachmentRange.location - cursor) + ) + ) + } + if let attachment = value as? ComposerTextAttachment { + source.append(attachment.source) + } else { + source.append(nsString.substring(with: attachmentRange)) + } + cursor = NSMaxRange(attachmentRange) + } + if cursor < end { + source.append(nsString.substring(with: NSRange(location: cursor, length: end - cursor))) + } + return source as String + } + + func sourceOffset(forDisplayOffset displayOffset: Int) -> Int { + let boundedOffset = max(0, min(attributedText.length, displayOffset)) + if boundedOffset == 0 { + return 0 + } + + var sourceOffset = 0 + let range = NSRange(location: 0, length: boundedOffset) + attributedText.enumerateAttribute(.attachment, in: range) { value, attributeRange, _ in + if let attachment = value as? ComposerTextAttachment { + sourceOffset += (attachment.source as NSString).length + } else { + sourceOffset += attributeRange.length + } + } + return sourceOffset + } + + private static func writeTemporaryImage(_ image: UIImage) -> String? { + guard let data = image.pngData() else { + return nil + } + let directory = FileManager.default.temporaryDirectory + .appendingPathComponent(pastedImageDirectoryName, isDirectory: true) + do { + try FileManager.default.createDirectory( + at: directory, + withIntermediateDirectories: true + ) + removeStaleTemporaryImages(in: directory) + let url = directory.appendingPathComponent("\(UUID().uuidString).png") + try data.write(to: url, options: .atomic) + return url.absoluteString + } catch { + return nil + } + } + + private static func removeStaleTemporaryImages(in directory: URL) { + let cutoff = Date().addingTimeInterval(-stalePastedImageAge) + guard let urls = try? FileManager.default.contentsOfDirectory( + at: directory, + includingPropertiesForKeys: [.contentModificationDateKey, .isRegularFileKey], + options: [.skipsHiddenFiles] + ) else { + return + } + + for url in urls { + guard + let values = try? url.resourceValues( + forKeys: [.contentModificationDateKey, .isRegularFileKey] + ), + values.isRegularFile == true, + let modifiedAt = values.contentModificationDate, + modifiedAt < cutoff + else { + continue + } + try? FileManager.default.removeItem(at: url) + } + } +} + +public final class T3ComposerEditorView: ExpoView, UITextViewDelegate { + private let textView = ComposerTextView() + private let placeholderLabel = UILabel() + private var value = "" + private var tokensJson = "[]" + private var tokens: [ComposerTokenPayload] = [] + private var requestedSelection: ComposerSelectionPayload? + private var theme = ComposerThemePayload( + text: "#262626", + placeholder: "#8e8e93", + chipBackground: "#f2f2f7", + chipBorder: "#dedee3", + chipText: "#262626", + skillBackground: "#f9e8fb", + skillBorder: "#e5a6eb", + skillText: "#a21caf", + fileTint: "#737373" + ) + private var fontFamily = "DMSans_400Regular" + private var fontSize: CGFloat = 15 + private var lineHeight: CGFloat = 22 + private var contentInsetVertical: CGFloat = 0 + private var shouldAutoFocus = false + private var didAutoFocus = false + private var isApplyingControlledValue = false + private var lastContentSize = CGSize.zero + private var iconImages: [String: UIImage] = [:] + private var pendingIconUris = Set() + private var tokensNeedRebuild = false + + let onComposerChange = EventDispatcher() + let onComposerSelectionChange = EventDispatcher() + let onComposerFocus = EventDispatcher() + let onComposerBlur = EventDispatcher() + let onComposerPasteImages = EventDispatcher() + let onComposerContentSizeChange = EventDispatcher() + + public required init(appContext: AppContext? = nil) { + super.init(appContext: appContext) + + clipsToBounds = false + textView.delegate = self + textView.backgroundColor = .clear + textView.textContainerInset = .zero + textView.textContainer.lineFragmentPadding = 0 + textView.keyboardDismissMode = .interactive + textView.alwaysBounceVertical = false + textView.showsVerticalScrollIndicator = true + textView.adjustsFontForContentSizeCategory = true + textView.onPasteImages = { [weak self] urls in + self?.onComposerPasteImages(["uris": urls]) + } + textView.onAttributedMutation = { [weak self] in + self?.emitTextChange() + } + addSubview(textView) + + placeholderLabel.numberOfLines = 0 + placeholderLabel.adjustsFontForContentSizeCategory = true + addSubview(placeholderLabel) + applyTypography() + applyTheme() + } + + public override func layoutSubviews() { + super.layoutSubviews() + textView.frame = bounds + let placeholderX = textView.textContainerInset.left + textView.textContainer.lineFragmentPadding + let placeholderY = textView.textContainerInset.top + let placeholderWidth = max( + 0, + bounds.width - placeholderX - textView.textContainerInset.right - + textView.textContainer.lineFragmentPadding + ) + placeholderLabel.frame = CGRect( + x: placeholderX, + y: placeholderY, + width: placeholderWidth, + height: max(lineHeight, placeholderLabel.font.lineHeight) + ) + emitContentSizeIfNeeded() + } + + public override func didMoveToWindow() { + super.didMoveToWindow() + guard window != nil, shouldAutoFocus, !didAutoFocus else { + return + } + didAutoFocus = true + DispatchQueue.main.async { [weak self] in + self?.textView.becomeFirstResponder() + } + } + + func setValue(_ value: String) { + self.value = value + applyControlledDocument(force: tokensNeedRebuild) + if tokensMatchCurrentValue() { + tokensNeedRebuild = false + } + } + + func setTokensJson(_ tokensJson: String) { + guard self.tokensJson != tokensJson else { + return + } + self.tokensJson = tokensJson + tokens = decode([ComposerTokenPayload].self, from: tokensJson) ?? [] + tokensNeedRebuild = true + applyControlledDocument(force: true) + if tokensMatchCurrentValue() { + tokensNeedRebuild = false + } + } + + func setSelectionJson(_ selectionJson: String) { + requestedSelection = decode(ComposerSelectionPayload.self, from: selectionJson) + applyRequestedSelection() + } + + func setThemeJson(_ themeJson: String) { + guard let nextTheme = decode(ComposerThemePayload.self, from: themeJson) else { + return + } + theme = nextTheme + applyTheme() + applyControlledDocument(force: true) + } + + func setPlaceholder(_ placeholder: String) { + placeholderLabel.text = placeholder + setNeedsLayout() + } + + func setFontFamily(_ fontFamily: String) { + self.fontFamily = fontFamily + applyTypography() + applyControlledDocument(force: true) + } + + func setFontSize(_ fontSize: CGFloat) { + self.fontSize = fontSize + applyTypography() + applyControlledDocument(force: true) + } + + func setLineHeight(_ lineHeight: CGFloat) { + self.lineHeight = lineHeight + applyTypography() + applyControlledDocument(force: true) + } + + func setContentInsetVertical(_ contentInsetVertical: CGFloat) { + self.contentInsetVertical = contentInsetVertical + textView.textContainerInset = UIEdgeInsets( + top: contentInsetVertical, + left: 0, + bottom: contentInsetVertical, + right: 0 + ) + setNeedsLayout() + } + + func setEditable(_ editable: Bool) { + textView.isEditable = editable + } + + func setScrollEnabled(_ scrollEnabled: Bool) { + textView.isScrollEnabled = scrollEnabled + } + + func setAutoFocus(_ autoFocus: Bool) { + shouldAutoFocus = autoFocus + } + + func setAutoCorrect(_ autoCorrect: Bool) { + textView.autocorrectionType = autoCorrect ? .yes : .no + } + + func setSpellCheck(_ spellCheck: Bool) { + textView.spellCheckingType = spellCheck ? .yes : .no + } + + func focusEditor() { + textView.becomeFirstResponder() + } + + func blurEditor() { + textView.resignFirstResponder() + } + + func setSelection(start: Int, end: Int) { + requestedSelection = ComposerSelectionPayload(start: start, end: end) + applyRequestedSelection() + } + + public func textViewDidChange(_ textView: UITextView) { + emitTextChange() + } + + public func textViewDidChangeSelection(_ textView: UITextView) { + guard !isApplyingControlledValue else { + return + } + emitSelection() + } + + public func textViewDidBeginEditing(_ textView: UITextView) { + onComposerFocus() + } + + public func textViewDidEndEditing(_ textView: UITextView) { + onComposerBlur() + } + + private func applyControlledDocument(force: Bool = false) { + let currentSource = textView.serializedText() + guard force || currentSource != value || !documentMatchesExpectedTokens() else { + updatePlaceholderVisibility() + return + } + + let previousSelection = sourceSelection() + isApplyingControlledValue = true + textView.attributedText = makeAttributedDocument() + let targetSelection = requestedSelection ?? previousSelection + requestedSelection = nil + textView.selectedRange = displayRange(for: targetSelection) + isApplyingControlledValue = false + updatePlaceholderVisibility() + emitContentSizeIfNeeded() + } + + private func makeAttributedDocument() -> NSAttributedString { + let result = NSMutableAttributedString() + let source = value as NSString + var cursor = 0 + let validTokens = tokens.filter { + $0.start >= cursor && + $0.end > $0.start && + $0.end <= source.length && + source.substring(with: NSRange(location: $0.start, length: $0.end - $0.start)) == $0.source + } + + for token in validTokens { + if token.start < cursor { + continue + } + if token.start > cursor { + appendPlainText( + source.substring(with: NSRange(location: cursor, length: token.start - cursor)), + to: result + ) + } + result.append(makeAttachmentString(token)) + cursor = token.end + } + if cursor < source.length { + appendPlainText( + source.substring(with: NSRange(location: cursor, length: source.length - cursor)), + to: result + ) + } + return result + } + + private func appendPlainText(_ text: String, to result: NSMutableAttributedString) { + result.append(NSAttributedString(string: text, attributes: baseAttributes())) + } + + private func makeAttachmentString(_ token: ComposerTokenPayload) -> NSAttributedString { + let isSkill = token.type == "skill" + let tint = UIColor(composerHex: isSkill ? theme.skillText : theme.fileTint) ?? .secondaryLabel + let iconName = isSkill ? "cube" : "doc" + let iconImage = token.iconUri.flatMap(iconImage(for:)) + let style = ComposerChipStyle( + tint: tint, + backgroundColor: UIColor( + composerHex: isSkill ? theme.skillBackground : theme.chipBackground + ) ?? .secondarySystemFill, + borderColor: UIColor( + composerHex: isSkill ? theme.skillBorder : theme.chipBorder + ) ?? .separator, + textColor: UIColor(composerHex: isSkill ? theme.skillText : theme.chipText) ?? .label + ) + let image = renderChip( + label: token.label, + iconName: iconName, + iconImage: iconImage, + style: style + ) + let font = UIFont(name: fontFamily, size: fontSize) + ?? UIFont.systemFont(ofSize: fontSize) + let baselineOffset = floor((font.capHeight - image.size.height) / 2) + let attachment = ComposerTextAttachment( + source: token.source, + image: image, + size: image.size, + baselineOffset: baselineOffset + ) + return NSAttributedString(attachment: attachment) + } + + private func renderChip( + label: String, + iconName: String, + iconImage: UIImage?, + style: ComposerChipStyle + ) -> UIImage { + let font = UIFont(name: "DMSans_500Medium", size: max(12, fontSize - 2)) + ?? UIFont.systemFont(ofSize: max(12, fontSize - 2), weight: .medium) + let fallbackIcon = UIImage( + systemName: iconName, + withConfiguration: UIImage.SymbolConfiguration(pointSize: 12, weight: .medium) + ) + let icon = iconImage ?? fallbackIcon + let textSize = (label as NSString).size(withAttributes: [.font: font]) + let iconWidth = icon == nil ? 0 : 14 + let iconGap = icon == nil ? 0 : 5 + let height: CGFloat = 24 + let width = ceil(9 + CGFloat(iconWidth + iconGap) + textSize.width + 9) + let format = UIGraphicsImageRendererFormat.preferred() + format.opaque = false + let renderer = UIGraphicsImageRenderer(size: CGSize(width: width, height: height), format: format) + return renderer.image { context in + let rect = CGRect(origin: .zero, size: CGSize(width: width, height: height)) + let path = UIBezierPath(roundedRect: rect.insetBy(dx: 0.5, dy: 0.5), cornerRadius: 7) + style.backgroundColor.setFill() + path.fill() + style.borderColor.setStroke() + path.lineWidth = 1 + path.stroke() + + var x: CGFloat = 9 + if let icon { + let renderedIcon = iconImage == nil + ? icon.withTintColor(style.tint, renderingMode: .alwaysOriginal) + : icon + renderedIcon.draw( + in: CGRect(x: x, y: 5, width: 14, height: 14) + ) + x += 19 + } + let paragraph = NSMutableParagraphStyle() + paragraph.alignment = .left + (label as NSString).draw( + in: CGRect(x: x, y: 3, width: textSize.width + 1, height: 18), + withAttributes: [ + .font: font, + .foregroundColor: style.textColor, + .paragraphStyle: paragraph, + ] + ) + context.cgContext.setAllowsAntialiasing(true) + } + } + + private func iconImage(for uri: String) -> UIImage? { + if let image = iconImages[uri] { + return image + } + guard !pendingIconUris.contains(uri), let url = URL(string: uri) else { + return nil + } + + if url.isFileURL, let image = UIImage(contentsOfFile: url.path) { + iconImages[uri] = image + return image + } + + pendingIconUris.insert(uri) + URLSession.shared.dataTask(with: url) { [weak self] data, _, _ in + guard let self, let data, let image = UIImage(data: data) else { + DispatchQueue.main.async { + self?.pendingIconUris.remove(uri) + } + return + } + DispatchQueue.main.async { + self.pendingIconUris.remove(uri) + self.iconImages[uri] = image + self.applyControlledDocument(force: true) + } + }.resume() + return nil + } + + private func baseAttributes() -> [NSAttributedString.Key: Any] { + let font = UIFont(name: fontFamily, size: fontSize) + ?? UIFont.systemFont(ofSize: fontSize) + let paragraph = NSMutableParagraphStyle() + paragraph.minimumLineHeight = lineHeight + paragraph.maximumLineHeight = lineHeight + return [ + .font: font, + .foregroundColor: UIColor(composerHex: theme.text) ?? .label, + .paragraphStyle: paragraph, + ] + } + + private func applyTypography() { + let font = UIFont(name: fontFamily, size: fontSize) + ?? UIFont.systemFont(ofSize: fontSize) + textView.font = font + textView.typingAttributes = baseAttributes() + placeholderLabel.font = font + setNeedsLayout() + } + + private func applyTheme() { + textView.textColor = UIColor(composerHex: theme.text) ?? .label + placeholderLabel.textColor = UIColor(composerHex: theme.placeholder) ?? .placeholderText + tintColor = UIColor.systemBlue + } + + private func emitTextChange() { + guard !isApplyingControlledValue else { + return + } + value = textView.serializedText() + let selection = sourceSelection() + onComposerChange([ + "value": value, + "selection": ["start": selection.start, "end": selection.end], + ]) + updatePlaceholderVisibility() + emitContentSizeIfNeeded() + } + + private func emitSelection() { + let selection = sourceSelection() + onComposerSelectionChange([ + "selection": ["start": selection.start, "end": selection.end], + ]) + } + + private func sourceSelection() -> ComposerSelectionPayload { + ComposerSelectionPayload( + start: textView.sourceOffset(forDisplayOffset: textView.selectedRange.location), + end: textView.sourceOffset(forDisplayOffset: NSMaxRange(textView.selectedRange)) + ) + } + + private func displayRange(for selection: ComposerSelectionPayload) -> NSRange { + let start = displayOffset(forSourceOffset: selection.start) + let end = displayOffset(forSourceOffset: selection.end) + return NSRange(location: start, length: max(0, end - start)) + } + + private func displayOffset(forSourceOffset sourceOffset: Int) -> Int { + let boundedOffset = max(0, min((value as NSString).length, sourceOffset)) + var collapsedLength = 0 + for token in tokens where token.end <= boundedOffset { + collapsedLength += max(0, token.end - token.start - 1) + } + if let token = tokens.first(where: { $0.start < boundedOffset && boundedOffset < $0.end }) { + return token.start - collapsedLength + 1 + } + return boundedOffset - collapsedLength + } + + private func applyRequestedSelection() { + guard let requestedSelection else { + return + } + let nextRange = displayRange(for: requestedSelection) + guard nextRange.location <= textView.attributedText.length, + NSMaxRange(nextRange) <= textView.attributedText.length else { + return + } + isApplyingControlledValue = true + textView.selectedRange = nextRange + isApplyingControlledValue = false + } + + private func updatePlaceholderVisibility() { + placeholderLabel.isHidden = !value.isEmpty + } + + private func emitContentSizeIfNeeded() { + let nextSize = textView.contentSize + guard abs(nextSize.width - lastContentSize.width) > 0.5 || + abs(nextSize.height - lastContentSize.height) > 0.5 else { + return + } + lastContentSize = nextSize + onComposerContentSizeChange(["width": nextSize.width, "height": nextSize.height]) + } + + private func decode(_ type: T.Type, from json: String) -> T? { + guard let data = json.data(using: .utf8) else { + return nil + } + return try? JSONDecoder().decode(type, from: data) + } + + private func tokensMatchCurrentValue() -> Bool { + let source = value as NSString + return tokens.allSatisfy { + $0.start >= 0 && + $0.end > $0.start && + $0.end <= source.length && + source.substring(with: NSRange(location: $0.start, length: $0.end - $0.start)) == $0.source + } + } + + private func documentMatchesExpectedTokens() -> Bool { + let source = value as NSString + let expectedSources = tokens.compactMap { token -> String? in + guard token.start >= 0, + token.end > token.start, + token.end <= source.length, + source.substring( + with: NSRange(location: token.start, length: token.end - token.start) + ) == token.source else { + return nil + } + return token.source + } + var renderedSources: [String] = [] + textView.attributedText.enumerateAttribute( + .attachment, + in: NSRange(location: 0, length: textView.attributedText.length) + ) { value, _, _ in + if let attachment = value as? ComposerTextAttachment { + renderedSources.append(attachment.source) + } + } + return renderedSources == expectedSources + } +} + +private extension UIColor { + convenience init?(composerHex hex: String?) { + guard var value = hex?.trimmingCharacters(in: .whitespacesAndNewlines), !value.isEmpty else { + return nil + } + if value.hasPrefix("#") { + value.removeFirst() + } + guard value.count == 6 || value.count == 8, + let raw = UInt64(value, radix: 16) else { + return nil + } + if value.count == 8 { + self.init( + red: CGFloat((raw >> 24) & 0xff) / 255, + green: CGFloat((raw >> 16) & 0xff) / 255, + blue: CGFloat((raw >> 8) & 0xff) / 255, + alpha: CGFloat(raw & 0xff) / 255 + ) + } else { + self.init( + red: CGFloat((raw >> 16) & 0xff) / 255, + green: CGFloat((raw >> 8) & 0xff) / 255, + blue: CGFloat(raw & 0xff) / 255, + alpha: 1 + ) + } + } +} diff --git a/apps/mobile/modules/t3-markdown-text/LICENSE b/apps/mobile/modules/t3-markdown-text/LICENSE new file mode 100644 index 0000000000..9aa27cb649 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/LICENSE @@ -0,0 +1,20 @@ +MIT License + +Copyright (c) 2024-25 Bluesky PBC +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/apps/mobile/modules/t3-markdown-text/T3MarkdownText.podspec b/apps/mobile/modules/t3-markdown-text/T3MarkdownText.podspec new file mode 100644 index 0000000000..0ac471faf2 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/T3MarkdownText.podspec @@ -0,0 +1,25 @@ +require "json" + +package = JSON.parse(File.read(File.join(__dir__, "package.json"))) +new_arch_enabled = ENV["RCT_NEW_ARCH_ENABLED"] == "1" + +Pod::Spec.new do |s| + s.name = "T3MarkdownText" + s.version = package["version"] + s.summary = "Native selectable markdown renderer for T3 Code mobile." + s.description = "Fabric-backed attributed text and markdown rendering primitives owned by T3 Code." + s.homepage = "https://t3tools.com" + s.license = { :type => "MIT", :file => "LICENSE" } + s.author = { "T3 Tools" => "hello@t3tools.com" } + s.platforms = { :ios => min_ios_version_supported } + s.source = { :path => "." } + s.source_files = "ios/**/*.{h,m,mm,cpp}" + + install_modules_dependencies(s) + + if ENV["USE_FRAMEWORKS"] != nil && new_arch_enabled + add_dependency(s, "React-FabricComponents", :additional_framework_paths => [ + "react/renderer/textlayoutmanager/platform/ios", + ]) + end +end diff --git a/apps/mobile/modules/t3-markdown-text/UPSTREAM.md b/apps/mobile/modules/t3-markdown-text/UPSTREAM.md new file mode 100644 index 0000000000..0ddc7775a9 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/UPSTREAM.md @@ -0,0 +1,12 @@ +# Upstream Attribution + +The Fabric attributed-text component in this module originated from +[`bluesky-social/react-native-uitextview`](https://github.com/bluesky-social/react-native-uitextview), +version `2.2.0`, commit `addc08fea303608f070fe1eeba4bc075f181c4af`. + +The upstream project is Copyright (c) 2024-25 Bluesky PBC and licensed under +the MIT License included in this directory. + +T3 Code has substantially modified and renamed the implementation, integrated +its markdown renderer, and owns the resulting module going forward. This is not +an upstream package dependency or a compatibility fork. diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_agents.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_agents.png new file mode 100644 index 0000000000..4696e3fd37 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_agents.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_astro.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_astro.png new file mode 100644 index 0000000000..0d348cb0a2 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_astro.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_babel.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_babel.png new file mode 100644 index 0000000000..7481353a25 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_babel.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_bash.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_bash.png new file mode 100644 index 0000000000..da0441b96a Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_bash.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_biome.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_biome.png new file mode 100644 index 0000000000..ba07d10d8f Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_biome.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_bootstrap.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_bootstrap.png new file mode 100644 index 0000000000..32a8b22759 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_bootstrap.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_browserslist.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_browserslist.png new file mode 100644 index 0000000000..4b15e51c46 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_browserslist.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_bun.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_bun.png new file mode 100644 index 0000000000..7369c90714 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_bun.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_c.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_c.png new file mode 100644 index 0000000000..adc17802ef Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_c.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_claude.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_claude.png new file mode 100644 index 0000000000..90117bf0e5 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_claude.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_cpp.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_cpp.png new file mode 100644 index 0000000000..adc17802ef Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_cpp.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_css.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_css.png new file mode 100644 index 0000000000..0e15d2f96a Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_css.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_database.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_database.png new file mode 100644 index 0000000000..19b31f09a1 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_database.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_default.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_default.png new file mode 100644 index 0000000000..06bc23496a Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_default.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_docker.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_docker.png new file mode 100644 index 0000000000..66e899f28e Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_docker.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_eslint.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_eslint.png new file mode 100644 index 0000000000..e6a14ca533 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_eslint.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_font.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_font.png new file mode 100644 index 0000000000..4bd7f4a45d Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_font.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_git.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_git.png new file mode 100644 index 0000000000..1efb11a370 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_git.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_go.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_go.png new file mode 100644 index 0000000000..98fc3adcb9 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_go.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_graphql.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_graphql.png new file mode 100644 index 0000000000..3f2c97ea1a Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_graphql.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_html.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_html.png new file mode 100644 index 0000000000..2e63e9c485 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_html.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_image.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_image.png new file mode 100644 index 0000000000..9f6be84d09 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_image.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_javascript.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_javascript.png new file mode 100644 index 0000000000..827d1feca3 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_javascript.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_json.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_json.png new file mode 100644 index 0000000000..b2c4b3dcd8 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_json.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_markdown.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_markdown.png new file mode 100644 index 0000000000..8742ea1930 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_markdown.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_mcp.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_mcp.png new file mode 100644 index 0000000000..b31a947323 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_mcp.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_nextjs.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_nextjs.png new file mode 100644 index 0000000000..2fb339d4f9 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_nextjs.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_npm.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_npm.png new file mode 100644 index 0000000000..070802b308 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_npm.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_oxc.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_oxc.png new file mode 100644 index 0000000000..8353d6b7e4 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_oxc.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_package.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_package.png new file mode 100644 index 0000000000..5150250a1b Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_package.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_pnpm.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_pnpm.png new file mode 100644 index 0000000000..f5bde9929f Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_pnpm.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_postcss.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_postcss.png new file mode 100644 index 0000000000..856e70ac44 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_postcss.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_prettier.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_prettier.png new file mode 100644 index 0000000000..cf805c1602 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_prettier.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_python.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_python.png new file mode 100644 index 0000000000..ae577548b7 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_python.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_react.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_react.png new file mode 100644 index 0000000000..76e085bf60 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_react.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_readme.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_readme.png new file mode 100644 index 0000000000..bfbd4298b0 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_readme.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_ruby.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_ruby.png new file mode 100644 index 0000000000..93160389d9 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_ruby.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_rust.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_rust.png new file mode 100644 index 0000000000..b3de20632f Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_rust.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_sass.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_sass.png new file mode 100644 index 0000000000..194bd8e456 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_sass.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_stylelint.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_stylelint.png new file mode 100644 index 0000000000..e0951fb7ad Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_stylelint.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_svelte.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_svelte.png new file mode 100644 index 0000000000..08381b8325 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_svelte.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_svg.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_svg.png new file mode 100644 index 0000000000..5c00f0e188 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_svg.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_svgo.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_svgo.png new file mode 100644 index 0000000000..77cbe960e5 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_svgo.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_swift.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_swift.png new file mode 100644 index 0000000000..2bbd936a2d Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_swift.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_table.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_table.png new file mode 100644 index 0000000000..089b2091c9 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_table.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_tailwind.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_tailwind.png new file mode 100644 index 0000000000..3a81753888 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_tailwind.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_terraform.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_terraform.png new file mode 100644 index 0000000000..52f29bc3a6 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_terraform.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_text.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_text.png new file mode 100644 index 0000000000..adc79f280a Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_text.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_tsconfig.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_tsconfig.png new file mode 100644 index 0000000000..e8bf751f43 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_tsconfig.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_typescript.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_typescript.png new file mode 100644 index 0000000000..006ac67149 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_typescript.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_vite.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_vite.png new file mode 100644 index 0000000000..7f3ac30154 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_vite.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_vscode.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_vscode.png new file mode 100644 index 0000000000..cce8c108a6 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_vscode.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_vue.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_vue.png new file mode 100644 index 0000000000..252d227849 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_vue.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_wasm.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_wasm.png new file mode 100644 index 0000000000..167002a94d Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_wasm.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_webpack.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_webpack.png new file mode 100644 index 0000000000..838d008ff8 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_webpack.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_yml.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_yml.png new file mode 100644 index 0000000000..09f01e445c Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_yml.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_zig.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_zig.png new file mode 100644 index 0000000000..64b10efb9a Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_zig.png differ diff --git a/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_zip.png b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_zip.png new file mode 100644 index 0000000000..4f668ea490 Binary files /dev/null and b/apps/mobile/modules/t3-markdown-text/assets/file-icons/pierre_zip.png differ diff --git a/apps/mobile/modules/t3-markdown-text/index.ts b/apps/mobile/modules/t3-markdown-text/index.ts new file mode 100644 index 0000000000..89bce5395c --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/index.ts @@ -0,0 +1,27 @@ +export { markdownFileIconSource } from "./src/markdownFileIcons"; +export { + resolveMarkdownFileIcon, + resolveMarkdownLinkPresentation, + type MarkdownFileIcon, + type MarkdownLinkPresentation, +} from "./src/markdownLinks"; +export { + nativeMarkdownChunkSpacing, + nativeMarkdownDocumentChunks, + nativeMarkdownDocumentRuns, + nativeMarkdownListItemBlocks, + nativeMarkdownTextRuns, + type NativeMarkdownDocumentChunk, + type NativeMarkdownTextRun, +} from "./src/nativeMarkdownText"; +export { MarkdownTextPrimitive } from "./src/MarkdownTextPrimitive"; +export { + SelectableMarkdownText, + type MarkdownCodeHighlighter, + type MarkdownHighlightedToken, +} from "./src/SelectableMarkdownText"; +export type { + NativeMarkdownTextStyle, + SelectableMarkdownSkill, + SelectableMarkdownTextProps, +} from "./src/SelectableMarkdownText.types"; diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownText.h b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownText.h new file mode 100644 index 0000000000..f9c05a1981 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownText.h @@ -0,0 +1,13 @@ +#import +#import + +#ifndef T3MarkdownTextNativeComponent_h +#define T3MarkdownTextNativeComponent_h + +NS_ASSUME_NONNULL_BEGIN +@interface T3MarkdownText : RCTViewComponentView +@end + +NS_ASSUME_NONNULL_END + +#endif /* UitextviewViewNativeComponent_h */ diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownText.mm b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownText.mm new file mode 100644 index 0000000000..3ebfdb7a11 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownText.mm @@ -0,0 +1,688 @@ +#import "T3MarkdownText.h" +#import "T3MarkdownTextShadowNode.h" +#import "T3MarkdownTextComponentDescriptor.h" +#import "T3MarkdownTextRun.h" +#import +#import + +#import +#import +#import +#import +#import "RCTFabricComponentsPlugins.h" + +using namespace facebook::react; + +static void T3MarkdownTextApplyParagraphStyles( + NSMutableAttributedString *attributedString, + const std::vector &styleRanges) +{ + for (const auto &styleRange : styleRanges) { + if (styleRange.length == 0 || styleRange.location >= attributedString.length) { + continue; + } + + const NSRange markerRange = NSMakeRange( + styleRange.location, + MIN(styleRange.length, attributedString.length - styleRange.location)); + const NSRange paragraphRange = [attributedString.string paragraphRangeForRange:markerRange]; + const NSParagraphStyle *existingStyle = + [attributedString attribute:NSParagraphStyleAttributeName + atIndex:paragraphRange.location + effectiveRange:nil]; + NSMutableParagraphStyle *paragraphStyle = + existingStyle ? [existingStyle mutableCopy] : [NSMutableParagraphStyle new]; + paragraphStyle.firstLineHeadIndent = styleRange.firstLineHeadIndent; + paragraphStyle.headIndent = styleRange.headIndent; + paragraphStyle.paragraphSpacing = styleRange.paragraphSpacing; + paragraphStyle.tabStops = @[ + [[NSTextTab alloc] initWithTextAlignment:NSTextAlignmentLeft + location:styleRange.headIndent + options:@{}] + ]; + paragraphStyle.defaultTabInterval = styleRange.headIndent; + [attributedString addAttribute:NSParagraphStyleAttributeName + value:paragraphStyle + range:paragraphRange]; + } +} + +static void T3MarkdownTextApplyAttachments( + NSMutableAttributedString *attributedString, + const std::vector &attachmentRanges, + NSDictionary *images) +{ + for (const auto &attachmentRange : attachmentRanges) { + if (attachmentRange.length == 0 || attachmentRange.location >= attributedString.length) { + continue; + } + + NSString *imageUri = [NSString stringWithUTF8String:attachmentRange.imageUri.c_str()]; + NSTextAttachment *attachment = [[NSTextAttachment alloc] init]; + UIImage *image = images[imageUri]; + if ([imageUri hasPrefix:@"sf:"]) { + NSString *symbolName = [imageUri substringFromIndex:3]; + UIColor *foregroundColor = + [attributedString attribute:NSForegroundColorAttributeName + atIndex:attachmentRange.location + effectiveRange:nil] ?: UIColor.labelColor; + image = [[UIImage systemImageNamed:symbolName] imageWithTintColor:foregroundColor + renderingMode:UIImageRenderingModeAlwaysOriginal]; + } + attachment.image = image ?: [[UIImage alloc] init]; + attachment.bounds = CGRectMake(0, -0.5, 10, 10); + const NSRange range = NSMakeRange( + attachmentRange.location, + MIN(attachmentRange.length, attributedString.length - attachmentRange.location)); + NSAttributedString *attachmentString = + [NSAttributedString attributedStringWithAttachment:attachment]; + [attributedString replaceCharactersInRange:range withAttributedString:attachmentString]; + } +} + +static NSArray *> *T3MarkdownTextExtractChipBackgrounds( + NSMutableAttributedString *attributedString, + const std::vector &chipRanges) +{ + NSMutableArray *> *backgrounds = [NSMutableArray array]; + for (const auto &chipRange : chipRanges) { + if (chipRange.length == 0 || chipRange.location >= attributedString.length) { + continue; + } + + const NSRange range = NSMakeRange( + chipRange.location, + MIN(chipRange.length, attributedString.length - chipRange.location)); + UIColor *color = [attributedString attribute:NSBackgroundColorAttributeName + atIndex:range.location + effectiveRange:nil]; + UIColor *foregroundColor = [attributedString attribute:NSForegroundColorAttributeName + atIndex:range.location + effectiveRange:nil]; + if (color == nil) { + continue; + } + [backgrounds addObject:@{ + @"range": [NSValue valueWithRange:range], + @"color": color, + @"strokeColor": [foregroundColor + colorWithAlphaComponent:chipRange.isSkill ? 0.25 : 0.1] ?: UIColor.clearColor, + }]; + [attributedString removeAttribute:NSBackgroundColorAttributeName range:range]; + } + return backgrounds; +} + +@interface T3MarkdownTextBackingView : UITextView +@property(nonatomic, copy) NSArray *> *chipBackgrounds; +@end + +@implementation T3MarkdownTextBackingView + +- (void)drawRect:(CGRect)rect +{ + [self.layoutManager ensureLayoutForTextContainer:self.textContainer]; + CGContextRef context = UIGraphicsGetCurrentContext(); + if (context != nil) { + CGContextSaveGState(context); + CGContextResetClip(context); + CGContextClipToRect(context, self.bounds); + } + for (NSDictionary *background in self.chipBackgrounds) { + const NSRange characterRange = [background[@"range"] rangeValue]; + UIColor *color = background[@"color"]; + UIColor *strokeColor = background[@"strokeColor"]; + if (characterRange.length == 0 || NSMaxRange(characterRange) > self.textStorage.length) { + continue; + } + + const NSRange glyphRange = + [self.layoutManager glyphRangeForCharacterRange:characterRange actualCharacterRange:nil]; + [color setFill]; + [self.layoutManager + enumerateEnclosingRectsForGlyphRange:glyphRange + withinSelectedGlyphRange:NSMakeRange(NSNotFound, 0) + inTextContainer:self.textContainer + usingBlock:^(CGRect glyphRect, BOOL *stop) { + const CGFloat chipHeight = 22; + CGRect chipRect = CGRectMake( + glyphRect.origin.x - 4, + CGRectGetMidY(glyphRect) - chipHeight / 2, + glyphRect.size.width + 8, + chipHeight); + chipRect.origin.x += self.textContainerInset.left; + chipRect.origin.y += self.textContainerInset.top; + const CGFloat minimumX = self.textContainerInset.left + 0.5; + const CGFloat maximumX = + CGRectGetWidth(self.bounds) - self.textContainerInset.right - 0.5; + if (chipRect.origin.x < minimumX) { + chipRect.size.width -= minimumX - chipRect.origin.x; + chipRect.origin.x = minimumX; + } + if (CGRectGetMaxX(chipRect) > maximumX) { + chipRect.size.width = MAX(0, maximumX - chipRect.origin.x); + } + UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:chipRect cornerRadius:6]; + [path fill]; + [strokeColor setStroke]; + path.lineWidth = 1; + [path stroke]; + }]; + } + if (context != nil) { + CGContextRestoreGState(context); + } + + [super drawRect:rect]; +} + +@end + +@protocol T3MarkdownOutsideTapTarget +- (void)clearSelectionForOutsideTapWithHitView:(UIView *)hitView; +@end + +@interface T3MarkdownOutsideTapCoordinator : NSObject + +- (instancetype)initWithWindow:(UIWindow *)window; +- (void)addTarget:(id)target; +- (void)removeTarget:(id)target; + +@end + +static const void *T3MarkdownOutsideTapCoordinatorKey = + &T3MarkdownOutsideTapCoordinatorKey; + +@implementation T3MarkdownOutsideTapCoordinator { + __weak UIWindow *_window; + UITapGestureRecognizer *_recognizer; + NSHashTable> *_targets; +} + +- (instancetype)initWithWindow:(UIWindow *)window +{ + if (self = [super init]) { + _window = window; + _targets = [NSHashTable weakObjectsHashTable]; + _recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(handleTap:)]; + _recognizer.cancelsTouchesInView = NO; + _recognizer.delegate = self; + [window addGestureRecognizer:_recognizer]; + } + return self; +} + +- (void)addTarget:(id)target +{ + [_targets addObject:target]; +} + +- (void)removeTarget:(id)target +{ + [_targets removeObject:target]; + if (_targets.count > 0) { + return; + } + + UIWindow *window = _window; + [window removeGestureRecognizer:_recognizer]; + if (objc_getAssociatedObject(window, T3MarkdownOutsideTapCoordinatorKey) == self) { + objc_setAssociatedObject( + window, + T3MarkdownOutsideTapCoordinatorKey, + nil, + OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } +} + +- (void)handleTap:(UITapGestureRecognizer *)sender +{ + UIWindow *window = _window; + if (window == nil) { + return; + } + + UIView *hitView = [window hitTest:[sender locationInView:window] withEvent:nil]; + if (hitView == nil) { + return; + } + for (id target in _targets.allObjects) { + [target clearSelectionForOutsideTapWithHitView:hitView]; + } +} + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer + shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer +{ + return YES; +} + +@end + +static T3MarkdownOutsideTapCoordinator * +T3MarkdownOutsideTapCoordinatorForWindow(UIWindow *window) +{ + T3MarkdownOutsideTapCoordinator *coordinator = + objc_getAssociatedObject(window, T3MarkdownOutsideTapCoordinatorKey); + if (coordinator == nil) { + coordinator = [[T3MarkdownOutsideTapCoordinator alloc] initWithWindow:window]; + objc_setAssociatedObject( + window, + T3MarkdownOutsideTapCoordinatorKey, + coordinator, + OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + return coordinator; +} + +@interface T3MarkdownText () + +@end + +@interface T3MarkdownText () +@end + +@implementation T3MarkdownText { + UIView * _view; + T3MarkdownTextBackingView * _textView; + T3MarkdownTextShadowNode::ConcreteState::Shared _state; + __weak UIWindow * _outsideTapWindow; + BOOL _suppressSelectionChange; + NSMutableDictionary * _attachmentImages; + NSMutableSet * _pendingAttachmentUris; +} + ++ (ComponentDescriptorProvider)componentDescriptorProvider +{ + return concreteComponentDescriptorProvider(); +} + +- (instancetype)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + static const auto defaultProps = std::make_shared(); + _props = defaultProps; + + _view = [[UIView alloc] init]; + self.contentView = _view; + self.clipsToBounds = true; + + _textView = [[T3MarkdownTextBackingView alloc] init]; + _attachmentImages = [[NSMutableDictionary alloc] init]; + _pendingAttachmentUris = [[NSMutableSet alloc] init]; + _textView.scrollEnabled = false; + _textView.editable = false; + _textView.textContainerInset = UIEdgeInsetsZero; + _textView.textContainer.lineFragmentPadding = 0; + _textView.delegate = self; + // Must match RCTTextLayoutManager, which measures with usesFontLeading = NO. + _textView.layoutManager.usesFontLeading = NO; + [self addSubview:_textView]; + + const auto longPressGestureRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self + action:@selector(handleLongPressIfNecessary:)]; + longPressGestureRecognizer.delegate = self; + + const auto pressGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(handlePressIfNecessary:)]; + pressGestureRecognizer.delegate = self; + [pressGestureRecognizer requireGestureRecognizerToFail:longPressGestureRecognizer]; + + [_textView addGestureRecognizer:pressGestureRecognizer]; + [_textView addGestureRecognizer:longPressGestureRecognizer]; + } + + return self; +} + +- (void)didMoveToWindow +{ + [super didMoveToWindow]; + if (_outsideTapWindow == self.window) { + return; + } + if (_outsideTapWindow != nil) { + T3MarkdownOutsideTapCoordinator *coordinator = + objc_getAssociatedObject(_outsideTapWindow, T3MarkdownOutsideTapCoordinatorKey); + [coordinator removeTarget:self]; + } + _outsideTapWindow = self.window; + if (_outsideTapWindow != nil) { + [T3MarkdownOutsideTapCoordinatorForWindow(_outsideTapWindow) addTarget:self]; + } +} + +- (void)dealloc +{ + T3MarkdownOutsideTapCoordinator *coordinator = + objc_getAssociatedObject(_outsideTapWindow, T3MarkdownOutsideTapCoordinatorKey); + [coordinator removeTarget:self]; +} + +// See RCTParagraphComponentView +- (void)prepareForRecycle +{ + [super prepareForRecycle]; + T3MarkdownOutsideTapCoordinator *coordinator = + objc_getAssociatedObject(_outsideTapWindow, T3MarkdownOutsideTapCoordinatorKey); + [coordinator removeTarget:self]; + _outsideTapWindow = nil; + _state.reset(); + + // Reset the frame to zero so that when it properly lays out on the next use + _textView.frame = CGRectZero; + _textView.attributedText = nil; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + // _textView's frame is assigned inside drawRect, which only fires when + // state changes. Trigger a redraw whenever the host frame moves out from + // under it (rotation, parent relayout) so the text view resizes and + // onTextLayout re-fires with the new line wrapping. + if (!CGRectEqualToRect(_textView.frame, _view.frame)) { + [self setNeedsDisplay]; + } +} + +- (void)drawRect:(CGRect)rect +{ + if (!_state) { + return; + } + + const auto &props = *std::static_pointer_cast(_props); + + const auto attrString = _state->getData().attributedString; + NSMutableAttributedString *convertedAttrString = + [RCTNSAttributedStringFromAttributedString(attrString) mutableCopy]; + T3MarkdownTextApplyParagraphStyles( + convertedAttrString, + _state->getData().paragraphStyleRanges); + T3MarkdownTextApplyAttachments( + convertedAttrString, + _state->getData().attachmentRanges, + _attachmentImages); + _textView.chipBackgrounds = T3MarkdownTextExtractChipBackgrounds( + convertedAttrString, + _state->getData().chipRanges); + [self loadAttachmentImages:_state->getData().attachmentRanges]; + + // Setting attributedText clears any active text selection, and re-assigning + // the frame triggers a layout flush that has the same effect. Bail out + // entirely when nothing actually changed so a JS-side state update made in + // response to onSelectionChange doesn't deselect what the user is selecting. + const BOOL textChanged = ![_textView.attributedText isEqualToAttributedString:convertedAttrString]; + const BOOL frameChanged = !CGRectEqualToRect(_textView.frame, _view.frame); + if (!textChanged && !frameChanged) { + return; + } + if (textChanged) { + // Reassigning attributedText clears any active selection. Save it and + // restore after, while suppressing the synthetic textViewDidChangeSelection + // events the clear-then-restore would otherwise produce — those would + // round-trip to JS and re-trigger this same path, causing a loop. + const NSRange savedRange = _textView.selectedRange; + _suppressSelectionChange = YES; + _textView.attributedText = convertedAttrString; + if (savedRange.length > 0 && NSMaxRange(savedRange) <= _textView.attributedText.length) { + _textView.selectedRange = savedRange; + } + _suppressSelectionChange = NO; + } + if (frameChanged) { + _textView.frame = _view.frame; + } + + __block std::vector lines; + const int maxLines = props.numberOfLines; + [_textView.layoutManager enumerateLineFragmentsForGlyphRange:NSMakeRange(0, convertedAttrString.string.length) usingBlock:^(CGRect rect, + CGRect usedRect, + NSTextContainer * _Nonnull textContainer, + NSRange glyphRange, + BOOL * _Nonnull stop) { + const auto charRange = [self->_textView.layoutManager characterRangeForGlyphRange:glyphRange actualGlyphRange:nil]; + const auto line = [self->_textView.text substringWithRange:charRange]; + lines.push_back(line.UTF8String); + // enumerateLineFragments overshoots maximumNumberOfLines by one on iOS + // 18, so cap explicitly. + if (maxLines > 0 && lines.size() >= (size_t)maxLines) { + *stop = YES; + } + }]; + + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onTextLayout(facebook::react::T3MarkdownTextEventEmitter::OnTextLayout{static_cast(self.tag), lines}); + }; +} + +- (void)loadAttachmentImages:(const std::vector &)attachmentRanges +{ + for (const auto &attachmentRange : attachmentRanges) { + NSString *imageUri = [NSString stringWithUTF8String:attachmentRange.imageUri.c_str()]; + if ([imageUri hasPrefix:@"sf:"]) { + continue; + } + if (_attachmentImages[imageUri] != nil || [_pendingAttachmentUris containsObject:imageUri]) { + continue; + } + + NSURL *url = [NSURL URLWithString:imageUri]; + if (url == nil) { + continue; + } + if (url.isFileURL) { + UIImage *image = [UIImage imageWithContentsOfFile:url.path]; + if (image != nil) { + _attachmentImages[imageUri] = image; + dispatch_async(dispatch_get_main_queue(), ^{ + [self refreshDisplayedAttachments]; + }); + } + continue; + } + + [_pendingAttachmentUris addObject:imageUri]; + [[[NSURLSession sharedSession] dataTaskWithURL:url + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + UIImage *image = data == nil ? nil : [UIImage imageWithData:data]; + dispatch_async(dispatch_get_main_queue(), ^{ + [self->_pendingAttachmentUris removeObject:imageUri]; + if (image != nil) { + self->_attachmentImages[imageUri] = image; + [self refreshDisplayedAttachments]; + } + }); + }] resume]; + } +} + +- (void)refreshDisplayedAttachments +{ + if (!_state || _textView.attributedText == nil) { + return; + } + + NSMutableAttributedString *attributedText = [_textView.attributedText mutableCopy]; + T3MarkdownTextApplyAttachments( + attributedText, + _state->getData().attachmentRanges, + _attachmentImages); + + const NSRange savedRange = _textView.selectedRange; + _suppressSelectionChange = YES; + _textView.attributedText = attributedText; + if (savedRange.location != NSNotFound && + NSMaxRange(savedRange) <= _textView.attributedText.length) { + _textView.selectedRange = savedRange; + } + _suppressSelectionChange = NO; + [_textView setNeedsDisplay]; +} + +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps +{ + const auto &oldViewProps = *std::static_pointer_cast(_props); + const auto &newViewProps = *std::static_pointer_cast(props); + + if (oldViewProps.numberOfLines != newViewProps.numberOfLines) { + _textView.textContainer.maximumNumberOfLines = newViewProps.numberOfLines; + } + + if (oldViewProps.selectable != newViewProps.selectable) { + _textView.selectable = newViewProps.selectable; + } + + if (oldViewProps.allowFontScaling != newViewProps.allowFontScaling) { + if (@available(iOS 11.0, *)) { + _textView.adjustsFontForContentSizeCategory = newViewProps.allowFontScaling; + } + } + + if (oldViewProps.ellipsizeMode != newViewProps.ellipsizeMode) { + if (newViewProps.ellipsizeMode == T3MarkdownTextEllipsizeMode::Head) { + _textView.textContainer.lineBreakMode = NSLineBreakMode::NSLineBreakByTruncatingHead; + } else if (newViewProps.ellipsizeMode == T3MarkdownTextEllipsizeMode::Middle) { + _textView.textContainer.lineBreakMode = NSLineBreakMode::NSLineBreakByTruncatingMiddle; + } else if (newViewProps.ellipsizeMode == T3MarkdownTextEllipsizeMode::Tail) { + _textView.textContainer.lineBreakMode = NSLineBreakMode::NSLineBreakByTruncatingTail; + } else if (newViewProps.ellipsizeMode == T3MarkdownTextEllipsizeMode::Clip) { + _textView.textContainer.lineBreakMode = NSLineBreakMode::NSLineBreakByClipping; + } + } + + + // I'm not sure if this is really the right way to handle this style. This means that the entire _view_ the text + // is in will have this background color applied. To apply it just to a particular part of a string, you'd need + // to do Hello. + // This is how the base component works though, so we'll go with it for now. Can change later if we want. + if (oldViewProps.backgroundColor != newViewProps.backgroundColor) { + _textView.backgroundColor = RCTUIColorFromSharedColor(newViewProps.backgroundColor); + } + + [super updateProps:props oldProps:oldProps]; +} + +// See RCTParagraphComponentView +- (void)updateState:(const facebook::react::State::Shared &)state oldState:(const facebook::react::State::Shared &)oldState +{ + _state = std::static_pointer_cast(state); + [self setNeedsDisplay]; +} + +// MARK: - UIGestureRecognizerDelegate + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer +{ + return YES; +} + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch +{ + return YES; +} + +- (void)clearSelectionForOutsideTapWithHitView:(UIView *)hitView +{ + if ([hitView isDescendantOfView:self]) { + return; + } + // Defer past the current event loop turn so any in-flight edit-menu action + // (Copy / Define / Look Up / …) reads the live selection before we clear it. + UITextView *textView = _textView; + dispatch_async(dispatch_get_main_queue(), ^{ + UITextRange *range = textView.selectedTextRange; + if (range != nil && !range.isEmpty) { + textView.selectedTextRange = nil; + } + }); +} + +// MARK: - Touch handling + +- (CGPoint)getLocationOfPress:(UIGestureRecognizer*)sender +{ + return [sender locationInView:_textView]; +} + +- (T3MarkdownTextRun*)getTouchChild:(CGPoint)location +{ + const auto charIndex = [_textView.layoutManager characterIndexForPoint:location + inTextContainer:_textView.textContainer + fractionOfDistanceBetweenInsertionPoints:nil + ]; + + int currIndex = -1; + for (UIView* child in self.subviews) { + if (![child isKindOfClass:[T3MarkdownTextRun class]]) { + continue; + } + + T3MarkdownTextRun* textChild = (T3MarkdownTextRun*)child; + + // This is UTF16 code units!! + currIndex += textChild.text.length; + + if (charIndex <= currIndex) { + return textChild; + } + } + + return nil; +} + +- (void)handlePressIfNecessary:(UITapGestureRecognizer*)sender +{ + const auto location = [self getLocationOfPress:sender]; + const auto child = [self getTouchChild:location]; + + if (child) { + [child onPress]; + } +} + +- (void)handleLongPressIfNecessary:(UILongPressGestureRecognizer*)sender +{ + const auto location = [self getLocationOfPress:sender]; + const auto child = [self getTouchChild:location]; + + if (child) { + [child onLongPress]; + } +} + +// MARK: - UITextViewDelegate + +- (void)textViewDidChangeSelection:(UITextView *)textView +{ + if (_suppressSelectionChange) { + return; + } + if (_eventEmitter == nullptr) { + return; + } + + const NSRange selectedRange = textView.selectedRange; + if (selectedRange.location == NSNotFound) { + return; + } + + // Fires on programmatic selection changes too (e.g. the outside-tap clear + // in handleOutsideTap:), so JS will see a synthetic empty-range event then. + std::dynamic_pointer_cast(_eventEmitter) + ->onSelectionChange(facebook::react::T3MarkdownTextEventEmitter::OnSelectionChange{ + static_cast(self.tag), + static_cast(selectedRange.location), + static_cast(selectedRange.location + selectedRange.length), + }); +} + +Class T3MarkdownTextCls(void) +{ + return T3MarkdownText.class; +} + +@end diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextComponentDescriptor.h b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextComponentDescriptor.h new file mode 100644 index 0000000000..77e21d5851 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextComponentDescriptor.h @@ -0,0 +1,13 @@ +#pragma once + +#include "T3MarkdownTextShadowNode.h" + +#include +#include + +namespace facebook::react { +using T3MarkdownTextComponentDescriptor = ConcreteComponentDescriptor; + +void T3MarkdownTextSpec_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); +} diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextManager.mm b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextManager.mm new file mode 100644 index 0000000000..3ca2b1eee5 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextManager.mm @@ -0,0 +1,36 @@ +#import +#import +#import "RCTBridge.h" +#import "Utils.h" + +@interface T3MarkdownTextManager : RCTViewManager +@end + +@implementation T3MarkdownTextManager + +RCT_EXPORT_MODULE(T3MarkdownText) + +- (UIView *)view +{ + return [[UIView alloc] init]; +} + +RCT_CUSTOM_VIEW_PROPERTY(color, NSString, UIView) +{ +} + +@end + +@interface T3MarkdownTextRunManager : RCTViewManager +@end + +@implementation T3MarkdownTextRunManager + +RCT_EXPORT_MODULE(T3MarkdownTextRun) + +- (UIView *)view +{ + return nil; +} + +@end diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRun.h b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRun.h new file mode 100644 index 0000000000..b8b4065711 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRun.h @@ -0,0 +1,24 @@ +// This guard prevent this file to be compiled in the old architecture. +#ifdef RCT_NEW_ARCH_ENABLED +#import +#import +#import + +#ifndef T3MarkdownTextRunNativeComponent_h +#define T3MarkdownTextRunNativeComponent_h + +NS_ASSUME_NONNULL_BEGIN + +@interface T3MarkdownTextRun : RCTViewComponentView + +@property (nonatomic, copy, nullable) NSString *text; + +- (void)onPress; +- (void)onLongPress; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* UitextviewViewNativeComponent_h */ +#endif /* RCT_NEW_ARCH_ENABLED */ diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRun.mm b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRun.mm new file mode 100644 index 0000000000..4549084f03 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRun.mm @@ -0,0 +1,72 @@ +#import "T3MarkdownTextRun.h" +#import "T3MarkdownText.h" +#import "T3MarkdownTextRunComponentDescriptor.h" +#import +#import +#import +#import "RCTFabricComponentsPlugins.h" +#import "Utils.h" + +using namespace facebook::react; + +@interface T3MarkdownTextRun () + +@end + +@implementation T3MarkdownTextRun { + NSString * _text; + RCTBubblingEventBlock _onPress; + RCTBubblingEventBlock _onLongPress; +} + ++ (ComponentDescriptorProvider)componentDescriptorProvider +{ + return concreteComponentDescriptorProvider(); +} + +- (instancetype)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + static const auto defaultProps = std::make_shared(); + _props = defaultProps; + } + return self; +} + +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps +{ + const auto &oldViewProps = *std::static_pointer_cast(_props); + const auto &newViewProps = *std::static_pointer_cast(props); + + if (newViewProps.text != oldViewProps.text) { + NSString *text = [NSString stringWithUTF8String:newViewProps.text.c_str()]; + _text = text; + } + + [super updateProps:props oldProps:oldProps]; +} + +- (void)onPress { + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onPress(facebook::react::T3MarkdownTextRunEventEmitter::OnPress{}); + } +} + +- (void)onLongPress { + if (_eventEmitter != nullptr) { + std::dynamic_pointer_cast(_eventEmitter) + ->onLongPress(facebook::react::T3MarkdownTextRunEventEmitter::OnLongPress{}); + } +} + ++ (BOOL)shouldBeRecycled { + return NO; +} + +Class T3MarkdownTextRunCls(void) +{ + return T3MarkdownTextRun.class; +} + +@end diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRunComponentDescriptor.h b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRunComponentDescriptor.h new file mode 100644 index 0000000000..61f9e1a129 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRunComponentDescriptor.h @@ -0,0 +1,13 @@ +#pragma once + +#include "T3MarkdownTextRunShadowNode.h" + +#include +#include + +namespace facebook::react { +using T3MarkdownTextRunComponentDescriptor = ConcreteComponentDescriptor; + +void T3MarkdownTextRunSpec_registerComponentDescriptorsFromCodegen( + std::shared_ptr registry); +} diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRunShadowNode.cpp b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRunShadowNode.cpp new file mode 100644 index 0000000000..a1af619205 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRunShadowNode.cpp @@ -0,0 +1,6 @@ +#include "T3MarkdownTextRunShadowNode.h" + +namespace facebook::react { + +extern const char T3MarkdownTextRunComponentName[] = "T3MarkdownTextRun"; +} // namespace facebook::react diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRunShadowNode.h b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRunShadowNode.h new file mode 100644 index 0000000000..c00bd1f240 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextRunShadowNode.h @@ -0,0 +1,16 @@ +#pragma once + +#include +#include +#include +#include + +namespace facebook::react { +extern const char T3MarkdownTextRunComponentName[]; + +using T3MarkdownTextRunShadowNode = ConcreteViewShadowNode< + T3MarkdownTextRunComponentName, + T3MarkdownTextRunProps, + T3MarkdownTextRunEventEmitter, + T3MarkdownTextRunState>; +} diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextShadowNode.h b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextShadowNode.h new file mode 100644 index 0000000000..afc276aedd --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextShadowNode.h @@ -0,0 +1,77 @@ +#pragma once + +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace facebook::react { + +extern const char T3MarkdownTextComponentName[]; + +struct T3MarkdownTextParagraphStyleRange { + size_t location; + size_t length; + Float firstLineHeadIndent; + Float headIndent; + Float paragraphSpacing; +}; + +struct T3MarkdownTextAttachmentRange { + size_t location; + size_t length; + std::string imageUri; +}; + +struct T3MarkdownTextChipRange { + size_t location; + size_t length; + bool isSkill; +}; + +class T3MarkdownTextStateReal final { + public: + AttributedString attributedString; + std::vector paragraphStyleRanges; + std::vector attachmentRanges; + std::vector chipRanges; +}; + +class T3MarkdownTextShadowNode final : public ConcreteViewShadowNode< +T3MarkdownTextComponentName, +T3MarkdownTextProps, +T3MarkdownTextEventEmitter, +T3MarkdownTextStateReal> { +public: + using ConcreteViewShadowNode::ConcreteViewShadowNode; + + T3MarkdownTextShadowNode( + const ShadowNode& sourceShadowNode, + const ShadowNodeFragment& fragment + ); + + static ShadowNodeTraits BaseTraits() { + auto traits = ConcreteViewShadowNode::BaseTraits(); + traits.set(ShadowNodeTraits::Trait::LeafYogaNode); + traits.set(ShadowNodeTraits::Trait::MeasurableYogaNode); + return traits; + } + + void layout(LayoutContext layoutContext) override; + + Size measureContent( + const LayoutContext& layoutContext, + const LayoutConstraints& layoutConstraints) const override; + +private: + mutable AttributedString _attributedString; + mutable std::vector _paragraphStyleRanges; + mutable std::vector _attachmentRanges; + mutable std::vector _chipRanges; +}; +} // namespace facebook::React diff --git a/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextShadowNode.mm b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextShadowNode.mm new file mode 100644 index 0000000000..00fda74228 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/ios/T3MarkdownTextShadowNode.mm @@ -0,0 +1,269 @@ +#include "T3MarkdownTextShadowNode.h" +#include "T3MarkdownTextRunShadowNode.h" +#include +#import + +#include +#include + +namespace facebook::react { + +static constexpr Float ParagraphStyleEncodingOffset = 1000; +static constexpr auto ChipNativeIdPrefix = "t3-chip-"; +static constexpr auto FileChipNativeIdPrefix = "t3-chip-file:"; +static constexpr auto SkillChipNativeIdPrefix = "t3-chip-skill:"; + +static void applyParagraphStyles( + NSMutableAttributedString *attributedString, + const std::vector &styleRanges) +{ + for (const auto &styleRange : styleRanges) { + if (styleRange.length == 0 || styleRange.location >= attributedString.length) { + continue; + } + + const NSRange markerRange = NSMakeRange( + styleRange.location, + MIN(styleRange.length, attributedString.length - styleRange.location)); + const NSRange paragraphRange = [attributedString.string paragraphRangeForRange:markerRange]; + const NSParagraphStyle *existingStyle = + [attributedString attribute:NSParagraphStyleAttributeName + atIndex:paragraphRange.location + effectiveRange:nil]; + NSMutableParagraphStyle *paragraphStyle = + existingStyle ? [existingStyle mutableCopy] : [NSMutableParagraphStyle new]; + paragraphStyle.firstLineHeadIndent = styleRange.firstLineHeadIndent; + paragraphStyle.headIndent = styleRange.headIndent; + paragraphStyle.paragraphSpacing = styleRange.paragraphSpacing; + paragraphStyle.tabStops = @[ + [[NSTextTab alloc] initWithTextAlignment:NSTextAlignmentLeft + location:styleRange.headIndent + options:@{}] + ]; + paragraphStyle.defaultTabInterval = styleRange.headIndent; + [attributedString addAttribute:NSParagraphStyleAttributeName + value:paragraphStyle + range:paragraphRange]; + } +} + +static void applyAttachments( + NSMutableAttributedString *attributedString, + const std::vector &attachmentRanges) +{ + for (const auto &attachmentRange : attachmentRanges) { + if (attachmentRange.length == 0 || attachmentRange.location >= attributedString.length) { + continue; + } + + NSTextAttachment *attachment = [[NSTextAttachment alloc] init]; + attachment.image = [[UIImage alloc] init]; + attachment.bounds = CGRectMake(0, -0.5, 10, 10); + const NSRange range = NSMakeRange( + attachmentRange.location, + MIN(attachmentRange.length, attributedString.length - attachmentRange.location)); + NSAttributedString *attachmentString = + [NSAttributedString attributedStringWithAttachment:attachment]; + [attributedString replaceCharactersInRange:range withAttributedString:attachmentString]; + } +} + +T3MarkdownTextShadowNode::T3MarkdownTextShadowNode( + const ShadowNode& sourceShadowNode, + const ShadowNodeFragment& fragment +) : ConcreteViewShadowNode(sourceShadowNode, fragment) { +}; + +Size T3MarkdownTextShadowNode::measureContent( + const LayoutContext& layoutContext, + const LayoutConstraints& layoutConstraints) const { + const auto &baseProps = getConcreteProps(); + + auto baseTextAttributes = TextAttributes::defaultTextAttributes(); + baseTextAttributes.backgroundColor = baseProps.backgroundColor; + baseTextAttributes.allowFontScaling = baseProps.allowFontScaling; + + Float fontSizeMultiplier = 1.0; + if (baseTextAttributes.allowFontScaling) { + fontSizeMultiplier = layoutContext.fontSizeMultiplier; + } + + auto baseAttributedString = AttributedString{}; + auto paragraphStyleRanges = std::vector{}; + auto attachmentRanges = std::vector{}; + auto chipRanges = std::vector{}; + size_t utf16Offset = 0; + const auto &children = getChildren(); + for (size_t i = 0; i < children.size(); i++) { + const auto child = children[i].get(); + if (auto textViewChild = dynamic_cast(child)) { + auto &props = textViewChild->getConcreteProps(); + auto fragment = AttributedString::Fragment{}; + auto textAttributes = TextAttributes::defaultTextAttributes(); + + textAttributes.allowFontScaling = baseProps.allowFontScaling; + textAttributes.backgroundColor = props.backgroundColor; + textAttributes.fontSize = props.fontSize * fontSizeMultiplier; + textAttributes.lineHeight = props.lineHeight * fontSizeMultiplier; + textAttributes.foregroundColor = props.color; + const bool hasParagraphStyle = props.shadowRadius >= ParagraphStyleEncodingOffset; + if (!hasParagraphStyle) { + textAttributes.textShadowColor = props.shadowColor; + textAttributes.textShadowOffset = props.shadowOffset; + textAttributes.textShadowRadius = props.shadowRadius; + } + textAttributes.letterSpacing = props.letterSpacing; + textAttributes.textDecorationColor = props.textDecorationColor; + textAttributes.fontFamily = props.fontFamily; + + if (props.fontStyle == T3MarkdownTextRunFontStyle::Italic) { + textAttributes.fontStyle = FontStyle::Italic; + } else { + textAttributes.fontStyle = FontStyle::Normal; + } + + if (props.fontWeight == T3MarkdownTextRunFontWeight::Bold) { + textAttributes.fontWeight = FontWeight::Bold; + } else if (props.fontWeight == T3MarkdownTextRunFontWeight::UltraLight) { + textAttributes.fontWeight = FontWeight::UltraLight; + } else if (props.fontWeight == T3MarkdownTextRunFontWeight::Light) { + textAttributes.fontWeight = FontWeight::Light; + } else if (props.fontWeight == T3MarkdownTextRunFontWeight::Medium) { + textAttributes.fontWeight = FontWeight::Medium; + } else if (props.fontWeight == T3MarkdownTextRunFontWeight::Semibold) { + textAttributes.fontWeight = FontWeight::Semibold; + } else if (props.fontWeight == T3MarkdownTextRunFontWeight::Heavy) { + textAttributes.fontWeight = FontWeight::Heavy; + } else { + textAttributes.fontWeight = FontWeight::Regular; + } + + if (props.textDecorationLine == T3MarkdownTextRunTextDecorationLine::LineThrough) { + textAttributes.textDecorationLineType = TextDecorationLineType::Strikethrough; + } else if (props.textDecorationLine == T3MarkdownTextRunTextDecorationLine::Underline) { + textAttributes.textDecorationLineType = TextDecorationLineType::Underline; + } else { + textAttributes.textDecorationLineType = TextDecorationLineType::None; + } + + if (props.textDecorationStyle == T3MarkdownTextRunTextDecorationStyle::Solid) { + textAttributes.textDecorationStyle = TextDecorationStyle::Solid; + } else if (props.textDecorationStyle == T3MarkdownTextRunTextDecorationStyle::Dotted) { + textAttributes.textDecorationStyle = TextDecorationStyle::Dotted; + } else if (props.textDecorationStyle == T3MarkdownTextRunTextDecorationStyle::Dashed) { + textAttributes.textDecorationStyle = TextDecorationStyle::Dashed; + } else if (props.textDecorationStyle == T3MarkdownTextRunTextDecorationStyle::Double) { + textAttributes.textDecorationStyle = TextDecorationStyle::Double; + } + + if (props.textAlign == T3MarkdownTextRunTextAlign::Left) { + textAttributes.alignment = TextAlignment::Left; + } else if (props.textAlign == T3MarkdownTextRunTextAlign::Right) { + textAttributes.alignment = TextAlignment::Right; + } else if (props.textAlign == T3MarkdownTextRunTextAlign::Center) { + textAttributes.alignment = TextAlignment::Center; + } else if (props.textAlign == T3MarkdownTextRunTextAlign::Justify) { + textAttributes.alignment = TextAlignment::Justified; + } else if (props.textAlign == T3MarkdownTextRunTextAlign::Auto) { + textAttributes.alignment = TextAlignment::Natural; + } + + textAttributes.backgroundColor = props.backgroundColor; + + fragment.string = props.text; + fragment.textAttributes = textAttributes; + + NSString *fragmentText = [NSString stringWithUTF8String:props.text.c_str()]; + const size_t fragmentLength = fragmentText.length; + if (hasParagraphStyle) { + paragraphStyleRanges.push_back(T3MarkdownTextParagraphStyleRange{ + utf16Offset, + fragmentLength, + props.shadowOffset.width, + props.shadowOffset.height, + props.shadowRadius - ParagraphStyleEncodingOffset, + }); + } + if (props.nativeId.rfind(ChipNativeIdPrefix, 0) == 0 && fragmentLength > 0) { + chipRanges.push_back(T3MarkdownTextChipRange{ + utf16Offset, + fragmentLength, + props.nativeId.rfind(SkillChipNativeIdPrefix, 0) == 0, + }); + } + if (props.nativeId.rfind(FileChipNativeIdPrefix, 0) == 0 && fragmentLength > 1) { + attachmentRanges.push_back(T3MarkdownTextAttachmentRange{ + utf16Offset + 1, + 1, + props.nativeId.substr(std::char_traits::length(FileChipNativeIdPrefix)), + }); + } else if ( + props.nativeId.rfind(SkillChipNativeIdPrefix, 0) == 0 && fragmentLength > 1) { + attachmentRanges.push_back(T3MarkdownTextAttachmentRange{ + utf16Offset + 1, + 1, + props.nativeId.substr(std::char_traits::length(SkillChipNativeIdPrefix)), + }); + } + utf16Offset += fragmentLength; + baseAttributedString.appendFragment(std::move(fragment)); + } + } + + _attributedString = baseAttributedString; + _paragraphStyleRanges = paragraphStyleRanges; + _attachmentRanges = attachmentRanges; + _chipRanges = chipRanges; + + NSMutableAttributedString *convertedAttributedString = + [RCTNSAttributedStringFromAttributedString(baseAttributedString) mutableCopy]; + applyParagraphStyles(convertedAttributedString, paragraphStyleRanges); + applyAttachments(convertedAttributedString, attachmentRanges); + + const CGFloat maximumWidth = std::isfinite(layoutConstraints.maximumSize.width) + ? layoutConstraints.maximumSize.width + : CGFLOAT_MAX; + NSTextStorage *textStorage = + [[NSTextStorage alloc] initWithAttributedString:convertedAttributedString]; + NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init]; + layoutManager.usesFontLeading = NO; + NSTextContainer *textContainer = + [[NSTextContainer alloc] initWithSize:CGSizeMake(maximumWidth, CGFLOAT_MAX)]; + textContainer.lineFragmentPadding = 0; + textContainer.maximumNumberOfLines = baseProps.numberOfLines; + if (baseProps.ellipsizeMode == T3MarkdownTextEllipsizeMode::Head) { + textContainer.lineBreakMode = NSLineBreakByTruncatingHead; + } else if (baseProps.ellipsizeMode == T3MarkdownTextEllipsizeMode::Middle) { + textContainer.lineBreakMode = NSLineBreakByTruncatingMiddle; + } else if (baseProps.ellipsizeMode == T3MarkdownTextEllipsizeMode::Tail) { + textContainer.lineBreakMode = NSLineBreakByTruncatingTail; + } else { + textContainer.lineBreakMode = NSLineBreakByClipping; + } + [layoutManager addTextContainer:textContainer]; + [textStorage addLayoutManager:layoutManager]; + [layoutManager ensureLayoutForTextContainer:textContainer]; + const CGRect usedRect = [layoutManager usedRectForTextContainer:textContainer]; + + return { + std::clamp( + static_cast(std::ceil(usedRect.size.width)), + layoutConstraints.minimumSize.width, + layoutConstraints.maximumSize.width), + std::clamp( + static_cast(std::ceil(usedRect.size.height)), + layoutConstraints.minimumSize.height, + layoutConstraints.maximumSize.height), + }; +} + +void T3MarkdownTextShadowNode::layout(LayoutContext layoutContext) { + ensureUnsealed(); + setStateData(T3MarkdownTextStateReal{ + _attributedString, + _paragraphStyleRanges, + _attachmentRanges, + _chipRanges, + }); +} +} diff --git a/apps/mobile/modules/t3-markdown-text/package.json b/apps/mobile/modules/t3-markdown-text/package.json new file mode 100644 index 0000000000..d51b6c5d9f --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/package.json @@ -0,0 +1,51 @@ +{ + "name": "@t3tools/mobile-markdown-text", + "version": "0.0.0", + "private": true, + "source": "./index.ts", + "files": [ + "assets", + "ios", + "src", + "index.ts", + "LICENSE", + "UPSTREAM.md", + "T3MarkdownText.podspec", + "react-native.config.js" + ], + "main": "./index.ts", + "types": "./index.ts", + "react-native": "./index.ts", + "exports": { + ".": "./index.ts", + "./file-icons": "./src/markdownFileIcons.ts", + "./links": "./src/markdownLinks.ts", + "./markdown": "./src/nativeMarkdownText.ts", + "./primitive": "./src/MarkdownTextPrimitive.tsx", + "./renderer": "./src/SelectableMarkdownText.ios.tsx", + "./types": "./src/SelectableMarkdownText.types.ts" + }, + "peerDependencies": { + "expo-asset": "*", + "expo-clipboard": "*", + "expo-haptics": "*", + "expo-symbols": "*", + "react": "*", + "react-native": "*", + "react-native-nitro-markdown": "*" + }, + "codegenConfig": { + "name": "T3MarkdownTextSpec", + "type": "all", + "jsSrcsDir": "src", + "ios": { + "componentProvider": { + "T3MarkdownText": "T3MarkdownText", + "T3MarkdownTextRun": "T3MarkdownTextRun" + } + }, + "outputDir": { + "ios": "ios/generated" + } + } +} diff --git a/apps/mobile/modules/t3-markdown-text/react-native.config.js b/apps/mobile/modules/t3-markdown-text/react-native.config.js new file mode 100644 index 0000000000..6b10ea26ee --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/react-native.config.js @@ -0,0 +1,10 @@ +module.exports = { + dependency: { + platforms: { + ios: { + podspecPath: "T3MarkdownText.podspec", + }, + android: null, + }, + }, +}; diff --git a/apps/mobile/modules/t3-markdown-text/scripts/sync-pierre-file-icons.mjs b/apps/mobile/modules/t3-markdown-text/scripts/sync-pierre-file-icons.mjs new file mode 100644 index 0000000000..87f17c28e0 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/scripts/sync-pierre-file-icons.mjs @@ -0,0 +1,133 @@ +import { execFileSync } from "node:child_process"; +import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { dirname, join, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +import { getBuiltInSpriteSheet } from "@pierre/trees"; + +const scriptDirectory = dirname(fileURLToPath(import.meta.url)); +const moduleDirectory = resolve(scriptDirectory, ".."); +const repositoryRoot = resolve(moduleDirectory, "../../../.."); +const outputDirectory = join(moduleDirectory, "assets/file-icons"); +const generatedModulePath = join(moduleDirectory, "src/markdownFileIcons.generated.ts"); +const webIconSource = readFileSync(join(repositoryRoot, "apps/web/src/pierre-icons.ts"), "utf8"); +const customSprite = webIconSource.match(/const T3_FILE_ICON_SPRITE = `([\s\S]*?)`;/)?.[1]; + +if (!customSprite) { + throw new Error("Could not read the T3 Pierre icon sprite from apps/web/src/pierre-icons.ts"); +} + +const colors = { + astro: "#a631be", + babel: "#d5a910", + bash: "#199f43", + biome: "#1a85d4", + bootstrap: "#693acf", + browserslist: "#d5a910", + bun: "#594c5b", + c: "#1a85d4", + claude: "#d47628", + cpp: "#1a85d4", + css: "#693acf", + database: "#a631be", + default: "#84848a", + docker: "#1a85d4", + eslint: "#693acf", + font: "#84848a", + git: "#ff8c5b", + go: "#1ca1c7", + graphql: "#d32a61", + html: "#d47628", + image: "#d32a61", + javascript: "#d5a910", + json: "#d47628", + markdown: "#199f43", + mcp: "#17a5af", + nextjs: "#84848a", + npm: "#d52c36", + oxc: "#1ca1c7", + postcss: "#d52c36", + prettier: "#17a5af", + python: "#1a85d4", + react: "#1ca1c7", + ruby: "#d52c36", + rust: "#d47628", + sass: "#d32a61", + stylelint: "#84848a", + svelte: "#d52c36", + svg: "#d47628", + svgo: "#199f43", + swift: "#d47628", + table: "#17a5af", + tailwind: "#1ca1c7", + terraform: "#693acf", + text: "#84848a", + typescript: "#1a85d4", + vite: "#a631be", + vscode: "#1a85d4", + vue: "#199f43", + wasm: "#693acf", + webpack: "#1a85d4", + yml: "#d52c36", + zig: "#d47628", + zip: "#d47628", +}; + +const customIcons = { + agents: "t3-file-icon-agents", + claude: "t3-file-icon-claude", + package: "t3-file-icon-package-json", + pnpm: "t3-file-icon-pnpm", + readme: "t3-file-icon-readme", + tsconfig: "t3-file-icon-tsconfig", +}; + +function symbolFromSprite(sprite, id) { + const escapedId = id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + const match = sprite.match( + new RegExp(`]*)>([\\s\\S]*?)<\\/symbol>`), + ); + if (!match) throw new Error(`Missing Pierre icon symbol: ${id}`); + return { + body: match[2], + viewBox: match[1].match(/viewBox="([^"]+)"/)?.[1] ?? "0 0 16 16", + }; +} + +function renderIcon(token, symbol, color) { + const svgPath = join(outputDirectory, `.pierre-${token}.svg`); + const pngPath = join(outputDirectory, `pierre_${token}.png`); + writeFileSync( + svgPath, + `${symbol.body}`, + ); + execFileSync("sips", ["-s", "format", "png", svgPath, "--out", pngPath], { + stdio: "ignore", + }); + rmSync(svgPath); +} + +rmSync(outputDirectory, { recursive: true, force: true }); +mkdirSync(outputDirectory, { recursive: true }); + +const builtInSprite = getBuiltInSpriteSheet("complete"); +const builtInTokens = [...builtInSprite.matchAll(/ match[1]) + .sort(); + +for (const token of builtInTokens) { + renderIcon( + token, + symbolFromSprite(builtInSprite, `file-tree-builtin-${token}`), + colors[token] ?? colors.default, + ); +} +for (const [token, symbolId] of Object.entries(customIcons)) { + renderIcon(token, symbolFromSprite(customSprite, symbolId), colors[token] ?? colors.default); +} + +const tokens = [...new Set([...builtInTokens, ...Object.keys(customIcons)])].sort(); +const generatedSource = `import type { ImageSourcePropType } from "react-native";\n\nexport const MARKDOWN_FILE_ICON_SOURCES = {\n${tokens + .map((token) => ` ${token}: require("../assets/file-icons/pierre_${token}.png"),`) + .join("\n")}\n} as const satisfies Readonly>;\n`; +writeFileSync(generatedModulePath, generatedSource); diff --git a/apps/mobile/modules/t3-markdown-text/src/CopyTextButton.tsx b/apps/mobile/modules/t3-markdown-text/src/CopyTextButton.tsx new file mode 100644 index 0000000000..ffbc0e2fcb --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/CopyTextButton.tsx @@ -0,0 +1,73 @@ +import { SymbolView } from "expo-symbols"; +import * as Clipboard from "expo-clipboard"; +import * as Haptics from "expo-haptics"; +import { memo, useEffect, useRef, useState } from "react"; +import { Pressable, type ColorValue } from "react-native"; + +const COPY_FEEDBACK_DURATION_MS = 1200; + +function copyTextWithHaptic(value: string): void { + void Clipboard.setStringAsync(value); + void Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light); +} + +export const CopyTextButton = memo(function CopyTextButton(props: { + readonly accessibilityLabel: string; + readonly text: string; + readonly tintColor: ColorValue; + readonly copiedTintColor?: ColorValue; + readonly backgroundColor?: ColorValue; + readonly borderColor?: ColorValue; + readonly iconSize?: number; + readonly buttonSize?: number; +}) { + const [copied, setCopied] = useState(false); + const resetTimeoutRef = useRef | null>(null); + + useEffect( + () => () => { + if (resetTimeoutRef.current) { + clearTimeout(resetTimeoutRef.current); + } + }, + [], + ); + + return ( + { + copyTextWithHaptic(props.text); + setCopied(true); + if (resetTimeoutRef.current) { + clearTimeout(resetTimeoutRef.current); + } + resetTimeoutRef.current = setTimeout(() => { + setCopied(false); + resetTimeoutRef.current = null; + }, COPY_FEEDBACK_DURATION_MS); + }} + style={({ pressed }) => ({ + width: props.buttonSize ?? 30, + height: props.buttonSize ?? 30, + alignItems: "center", + justifyContent: "center", + borderRadius: 9, + borderWidth: props.borderColor ? 1 : 0, + borderColor: props.borderColor, + backgroundColor: props.backgroundColor, + opacity: pressed ? 0.52 : 1, + })} + > + + + ); +}); diff --git a/apps/mobile/modules/t3-markdown-text/src/MarkdownTextPrimitive.tsx b/apps/mobile/modules/t3-markdown-text/src/MarkdownTextPrimitive.tsx new file mode 100644 index 0000000000..6ed7fecd2d --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/MarkdownTextPrimitive.tsx @@ -0,0 +1,109 @@ +import React from "react"; +import { Platform, StyleSheet, Text as RNText, type TextProps, type ViewStyle } from "react-native"; +import T3MarkdownTextRunNativeComponent from "./T3MarkdownTextRunNativeComponent"; +import T3MarkdownTextNativeComponent from "./T3MarkdownTextNativeComponent"; +import { flattenStyles } from "./util"; + +const TextAncestorContext = React.createContext<[boolean, ViewStyle]>([ + false, + StyleSheet.create({}), +]); + +const textDefaults: TextProps = { + allowFontScaling: true, + selectable: true, +}; + +const useTextAncestorContext = () => React.useContext(TextAncestorContext); + +/** + * Event fired by `onSelectionChange`. `start`/`end` are 0-based UTF-16 indices + * into the rendered string. `start === end` means the selection was cleared. + */ +export type SelectionChangeEvent = { + nativeEvent: { target: number; start: number; end: number }; +}; + +export type MarkdownTextPrimitiveProps = TextProps & { + uiTextView?: boolean; + /** + * Fired when the native text selection changes. Only fires on iOS when + * `uiTextView` is true. Note: fires on every selection-edge adjustment + * (e.g. dragging a selection handle), so consumers driving expensive work + * off this event should debounce. + */ + onSelectionChange?: (event: SelectionChangeEvent) => void; +}; + +function MarkdownTextPrimitiveChild({ style, children, ...rest }: MarkdownTextPrimitiveProps) { + const [isAncestor, rootStyle] = useTextAncestorContext(); + + // Flatten the styles, and apply the root styles when needed + const flattenedStyle = React.useMemo(() => flattenStyles(rootStyle, style), [rootStyle, style]); + const contextValue = React.useMemo<[boolean, ViewStyle]>( + () => [true, flattenedStyle], + [flattenedStyle], + ); + let childPosition = 0; + const nativeChildren = React.Children.toArray(children).map((child) => { + const position = childPosition; + childPosition += 1; + + if (React.isValidElement(child)) { + return child; + } + if (typeof child !== "string" && typeof child !== "number") { + return null; + } + + const text = child.toString(); + return ( + // @ts-expect-error The generated run props do not include inherited Text props. + + ); + }); + + if (!isAncestor) { + return ( + + + {nativeChildren} + + + ); + } + + return <>{nativeChildren}; +} + +function MarkdownTextPrimitiveInner(props: MarkdownTextPrimitiveProps) { + const [isAncestor] = useTextAncestorContext(); + + // Even if the uiTextView prop is set, we can still default to using + // normal selection (i.e. base RN text) if the text doesn't need to be + // selectable + if ((!props.selectable || !props.uiTextView) && !isAncestor) { + return ; + } + return ; +} + +export function MarkdownTextPrimitive(props: MarkdownTextPrimitiveProps) { + if (Platform.OS !== "ios") { + return ; + } + return ; +} diff --git a/apps/mobile/modules/t3-markdown-text/src/NativeMarkdownBlock.ios.tsx b/apps/mobile/modules/t3-markdown-text/src/NativeMarkdownBlock.ios.tsx new file mode 100644 index 0000000000..757b6c6601 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/NativeMarkdownBlock.ios.tsx @@ -0,0 +1,647 @@ +import { useEffect, useState } from "react"; +import { Image, ScrollView, Text, useColorScheme, View } from "react-native"; +import type { MarkdownNode } from "react-native-nitro-markdown/headless"; + +import { CopyTextButton } from "./CopyTextButton"; +import { MarkdownTextPrimitive } from "./MarkdownTextPrimitive"; +import { + nativeMarkdownDocumentRuns, + nativeMarkdownListItemBlocks, + nativeMarkdownTextRuns, +} from "./nativeMarkdownText"; +import { NativeMarkdownSelectableText } from "./NativeMarkdownSelectableText.ios"; +import type { + MarkdownCodeHighlighter, + MarkdownHighlightedToken, + NativeMarkdownTextStyle, +} from "./SelectableMarkdownText.types"; + +type HighlightedCode = ReadonlyArray>; + +const highlightedCodeCache = new Map(); +const highlightedCodePromiseCache = new Map>(); +const HIGHLIGHTED_CODE_CACHE_LIMIT = 64; + +function nodeKey(node: MarkdownNode, index: number): string { + return `${node.type}:${node.beg ?? index}:${node.end ?? index}`; +} + +function nodeText(node: MarkdownNode): string { + if (node.content !== undefined) { + return node.content; + } + return (node.children ?? []).map(nodeText).join(""); +} + +function documentFor(node: MarkdownNode): MarkdownNode { + return node.type === "document" ? node : { type: "document", children: [node] }; +} + +function SelectableNode(props: { + readonly node: MarkdownNode; + readonly textStyle: NativeMarkdownTextStyle; +}) { + return ( + + ); +} + +function codeHighlightCacheKey( + code: string, + language: string | undefined, + theme: "light" | "dark", +): string { + return `${theme}:${language ?? "text"}:${code}`; +} + +function cacheHighlightedCode(key: string, tokens: HighlightedCode): void { + highlightedCodeCache.delete(key); + highlightedCodeCache.set(key, tokens); + + while (highlightedCodeCache.size > HIGHLIGHTED_CODE_CACHE_LIMIT) { + const oldestKey = highlightedCodeCache.keys().next().value; + if (oldestKey === undefined) { + break; + } + highlightedCodeCache.delete(oldestKey); + } +} + +function loadHighlightedCode( + code: string, + language: string | undefined, + theme: "light" | "dark", + highlightCode: MarkdownCodeHighlighter, +): Promise { + const key = codeHighlightCacheKey(code, language, theme); + const cached = highlightedCodeCache.get(key); + if (cached) { + return Promise.resolve(cached); + } + + const pending = highlightedCodePromiseCache.get(key); + if (pending) { + return pending; + } + + const promise = highlightCode({ code, language, theme }) + .then((tokens) => { + cacheHighlightedCode(key, tokens); + highlightedCodePromiseCache.delete(key); + return tokens; + }) + .catch((error) => { + highlightedCodePromiseCache.delete(key); + throw error; + }); + highlightedCodePromiseCache.set(key, promise); + return promise; +} + +function useHighlightedCode( + code: string, + language: string | undefined, + theme: "light" | "dark", + highlightCode: MarkdownCodeHighlighter, +): HighlightedCode | null { + const key = codeHighlightCacheKey(code, language, theme); + const [highlighted, setHighlighted] = useState<{ + readonly key: string; + readonly tokens: HighlightedCode | null; + }>(() => ({ + key, + tokens: highlightedCodeCache.get(key) ?? null, + })); + + useEffect(() => { + let active = true; + const cached = highlightedCodeCache.get(key); + if (cached) { + cacheHighlightedCode(key, cached); + setHighlighted({ key, tokens: cached }); + return () => { + active = false; + }; + } + + void loadHighlightedCode(code, language, theme, highlightCode) + .then((tokens) => { + if (active) { + setHighlighted({ key, tokens }); + } + }) + .catch(() => { + if (active) { + setHighlighted({ key, tokens: null }); + } + }); + return () => { + active = false; + }; + }, [code, highlightCode, key, language, theme]); + + return highlighted.key === key ? highlighted.tokens : null; +} + +function HighlightedCodeText(props: { + readonly content: string; + readonly highlighted: HighlightedCode | null; + readonly textStyle: NativeMarkdownTextStyle; +}) { + if (!props.highlighted) { + return ( + + {props.content} + + ); + } + const highlighted = props.highlighted; + let sourceOffset = 0; + const keyOccurrences = new Map(); + const keyedLines = highlighted.map((line) => { + const lineStart = sourceOffset; + const tokens = line.map((token) => { + const start = sourceOffset; + sourceOffset += token.content.length; + const signature = `${start}:${token.content}:${token.color ?? ""}:${token.fontStyle ?? ""}`; + const occurrence = keyOccurrences.get(signature) ?? 0; + keyOccurrences.set(signature, occurrence + 1); + return { key: `${signature}:${occurrence}`, token }; + }); + sourceOffset += 1; + return { + key: `line:${lineStart}:${line.map((token) => token.content).join("")}`, + tokens, + }; + }); + + return ( + + {keyedLines.map((line, lineIndex) => ( + + {line.tokens.map(({ key, token }) => ( + + {token.content} + + ))} + {lineIndex + 1 < keyedLines.length ? "\n" : ""} + + ))} + + ); +} + +function NativeCodeBlock(props: { + readonly node: MarkdownNode; + readonly textStyle: NativeMarkdownTextStyle; + readonly highlightCode: MarkdownCodeHighlighter; + readonly compact?: boolean; +}) { + const content = nodeText(props.node).replace(/\n$/, ""); + const colorScheme = useColorScheme(); + const theme = colorScheme === "dark" ? "dark" : "light"; + const highlighted = useHighlightedCode(content, props.node.language, theme, props.highlightCode); + const languageLabel = props.node.language?.toUpperCase() ?? "CODE"; + return ( + + + + {languageLabel} + + + + + + + + ); +} + +function collectTableRows(node: MarkdownNode): MarkdownNode[] { + const rows: MarkdownNode[] = []; + const visit = (child: MarkdownNode) => { + if (child.type === "table_row") { + rows.push(child); + return; + } + for (const nested of child.children ?? []) { + visit(nested); + } + }; + visit(node); + return rows; +} + +function NativeTable(props: { + readonly node: MarkdownNode; + readonly textStyle: NativeMarkdownTextStyle; +}) { + const rows = collectTableRows(props.node); + return ( + + + {rows.map((row, rowIndex) => ( + + {(row.children ?? []).map((cell, cellIndex) => ( + + + rowIndex === 0 || cell.isHeader ? { ...run, bold: true } : run, + )} + textStyle={props.textStyle} + /> + + ))} + + ))} + + + ); +} + +function NativeMarkdownImage(props: { + readonly node: MarkdownNode; + readonly textStyle: NativeMarkdownTextStyle; +}) { + const href = props.node.href; + if (!href) { + return ; + } + + return ( + + + {props.node.alt ? ( + + {props.node.alt} + + ) : null} + + ); +} + +function inlineGroups(nodes: ReadonlyArray): MarkdownNode[] { + const groups: MarkdownNode[] = []; + let inline: MarkdownNode[] = []; + const flush = () => { + if (inline.length === 0) { + return; + } + groups.push({ type: "paragraph", children: inline }); + inline = []; + }; + + for (const node of nodes) { + if (node.type === "image") { + flush(); + groups.push(node); + } else { + inline.push(node); + } + } + flush(); + return groups; +} + +function NativeMixedParagraph(props: { + readonly node: MarkdownNode; + readonly textStyle: NativeMarkdownTextStyle; +}) { + return ( + + {inlineGroups(props.node.children ?? []).map((child, index) => + child.type === "image" ? ( + + ) : ( + + ), + )} + + ); +} + +function NativeList(props: { + readonly node: MarkdownNode; + readonly textStyle: NativeMarkdownTextStyle; + readonly highlightCode: MarkdownCodeHighlighter; + readonly depth: number; +}) { + const ordered = props.node.ordered ?? false; + const start = props.node.start ?? 1; + const nested = props.depth > 0; + return ( + + {(props.node.children ?? []).map((item, index) => { + const taskMarker = item.type === "task_list_item"; + const marker = taskMarker + ? item.checked + ? "☑︎" + : "☐︎" + : ordered + ? `${start + index}.` + : props.depth % 3 === 1 + ? "◦" + : props.depth % 3 === 2 + ? "▪︎" + : "•"; + const markerWidth = ordered ? 28 : taskMarker ? 20 : 18; + const markerOffset = taskMarker ? 3 : ordered ? 0 : 2; + return ( + + + + {marker} + + + + {nativeMarkdownListItemBlocks(item).map((child, childIndex) => ( + + ))} + + + ); + })} + + ); +} + +export function NativeMarkdownBlock(props: { + readonly node: MarkdownNode; + readonly textStyle: NativeMarkdownTextStyle; + readonly highlightCode: MarkdownCodeHighlighter; + readonly depth?: number; + readonly compact?: boolean; +}) { + const depth = props.depth ?? 0; + switch (props.node.type) { + case "document": + return ( + + {(props.node.children ?? []).map((child, index) => ( + + ))} + + ); + case "code_block": + return ( + + ); + case "table": + return ; + case "image": + return ; + case "horizontal_rule": + return ( + + ); + case "blockquote": + return ( + + {(props.node.children ?? []).map((child, index) => ( + + ))} + + ); + case "list": + return ( + + ); + case "paragraph": + return (props.node.children ?? []).some((child) => child.type === "image") ? ( + + ) : ( + + ); + case "html_block": + case "math_block": + return ( + + + + ); + case "table_head": + case "table_body": + case "table_row": + case "table_cell": + case "list_item": + case "task_list_item": + return ( + + {(props.node.children ?? []).map((child, index) => ( + + ))} + + ); + default: + return ; + } +} diff --git a/apps/mobile/modules/t3-markdown-text/src/NativeMarkdownSelectableText.ios.tsx b/apps/mobile/modules/t3-markdown-text/src/NativeMarkdownSelectableText.ios.tsx new file mode 100644 index 0000000000..c6495eed86 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/NativeMarkdownSelectableText.ios.tsx @@ -0,0 +1,257 @@ +import { useEffect, useMemo, useState } from "react"; +import { Asset } from "expo-asset"; +import { Image, Linking, type TextStyle, useColorScheme } from "react-native"; + +import { MarkdownTextPrimitive } from "./MarkdownTextPrimitive"; +import { markdownFileIconSource } from "./markdownFileIcons"; +import type { MarkdownFileIcon } from "./markdownLinks"; +import type { NativeMarkdownTextRun } from "./nativeMarkdownText"; +import type { NativeMarkdownTextStyle } from "./SelectableMarkdownText.types"; + +const EXTERNAL_LINK_PREFIX = "◉ "; +const FILE_LINK_PREFIX = "\u00A0\uFFFC\u00A0"; +const CHIP_SUFFIX = "\u00A0"; +const SKILL_ICON_PLACEHOLDER = "\uFFFC"; +const PARAGRAPH_STYLE_ENCODING_OFFSET = 1000; + +function useFileIconUris(runs: ReadonlyArray) { + const iconSignature = JSON.stringify( + [...new Set(runs.flatMap((run) => (run.fileIcon ? [run.fileIcon] : [])))].sort(), + ); + const icons = useMemo( + () => JSON.parse(iconSignature) as ReadonlyArray, + [iconSignature], + ); + const [uris, setUris] = useState>(() => new Map()); + + useEffect(() => { + let cancelled = false; + + void Promise.all( + icons.map(async (icon) => { + const source = markdownFileIconSource(icon); + const fallbackUri = Image.resolveAssetSource(source).uri; + if (typeof source !== "number" && typeof source !== "string") { + return [icon, fallbackUri] as const; + } + try { + const asset = Asset.fromModule(source); + await asset.downloadAsync(); + return [icon, asset.localUri ?? fallbackUri] as const; + } catch { + return [icon, fallbackUri] as const; + } + }), + ).then((entries) => { + if (!cancelled) { + setUris(new Map(entries)); + } + }); + + return () => { + cancelled = true; + }; + }, [icons]); + + return uris; +} + +function runKeySignature(run: NativeMarkdownTextRun): string { + return [ + run.text, + run.bold, + run.italic, + run.strikethrough, + run.code, + run.href, + run.externalHost, + run.fileIcon, + run.skillName, + run.skillLabel, + run.role, + run.headingLevel, + run.depth, + run.spacing, + run.firstLineHeadIndent, + run.headIndent, + run.paragraphSpacing, + ].join(":"); +} + +function runStyle(run: NativeMarkdownTextRun, textStyle: NativeMarkdownTextStyle): TextStyle { + const isFile = run.fileIcon != null; + const isSkill = run.skillName != null; + const isChip = isFile || isSkill; + const headingLevel = Math.max(1, Math.min(6, run.headingLevel ?? 1)); + const headingFontSize = [22, 19, 17, 16, 15, 15][headingLevel - 1] ?? 15; + const isHeading = run.role === "heading"; + const isCodeBlock = run.role === "code-block" || run.role === "code-language"; + const hasParagraphStyle = run.headIndent !== undefined; + const textDecorationLine = run.strikethrough ? "line-through" : run.href ? "underline" : "none"; + + return { + color: isFile + ? textStyle.fileTextColor + : isSkill + ? textStyle.skillTextColor + : run.href + ? textStyle.linkColor + : isHeading + ? textStyle.strongColor + : run.role === "quote-marker" + ? textStyle.quoteMarkerColor + : run.role === "divider" + ? textStyle.dividerColor + : run.role === "code-language" + ? textStyle.mutedColor + : run.role === "list-marker" + ? textStyle.mutedColor + : run.code || isFile + ? textStyle.codeColor + : run.bold + ? textStyle.strongColor + : textStyle.color, + fontFamily: isChip + ? "DMSans_500Medium" + : run.code || isCodeBlock + ? "ui-monospace" + : isHeading + ? textStyle.headingFontFamily + : run.bold + ? textStyle.boldFontFamily + : textStyle.fontFamily, + fontSize: + run.role === "spacer" + ? (run.spacing ?? 10) + : run.role === "list-break" + ? textStyle.fontSize + : isHeading + ? headingFontSize + : run.role === "code-language" + ? 11 + : run.code || isChip || isCodeBlock + ? Math.max(12, textStyle.fontSize - 2) + : textStyle.fontSize, + lineHeight: + run.role === "spacer" + ? (run.spacing ?? 10) + : run.role === "list-break" + ? textStyle.lineHeight + (run.spacing ?? 0) + : isHeading + ? Math.max(headingFontSize + 6, 20) + : isCodeBlock + ? 18 + : textStyle.lineHeight, + fontStyle: run.italic ? "italic" : "normal", + fontWeight: isHeading || run.bold ? "700" : isChip ? "500" : "400", + textDecorationLine, + backgroundColor: isCodeBlock + ? textStyle.codeBlockBackgroundColor + : isSkill + ? textStyle.skillBackgroundColor + : run.code + ? textStyle.codeBackgroundColor + : isFile + ? textStyle.fileBackgroundColor + : undefined, + ...(hasParagraphStyle + ? { + shadowColor: "transparent", + shadowOffset: { + width: run.firstLineHeadIndent ?? 0, + height: run.headIndent, + }, + shadowRadius: PARAGRAPH_STYLE_ENCODING_OFFSET + (run.paragraphSpacing ?? 0), + } + : {}), + }; +} + +export function NativeMarkdownSelectableText(props: { + readonly runs: ReadonlyArray; + readonly textStyle: NativeMarkdownTextStyle; +}) { + const colorScheme = useColorScheme(); + const fileIconUris = useFileIconUris(props.runs); + const occurrences = new Map(); + const prefixedExternalLinks = new Set(); + const keyedRuns = props.runs.map((run) => { + const signature = runKeySignature(run); + const occurrence = occurrences.get(signature) ?? 0; + occurrences.set(signature, occurrence + 1); + + let text = run.text; + if (run.fileIcon) { + text = `${FILE_LINK_PREFIX}${text}${CHIP_SUFFIX}`; + } else if (run.skillName && run.skillLabel) { + text = `\u00A0${SKILL_ICON_PLACEHOLDER}\u00A0${run.skillLabel}${CHIP_SUFFIX}`; + } else if (run.externalHost && run.href && !prefixedExternalLinks.has(run.href)) { + prefixedExternalLinks.add(run.href); + text = `${EXTERNAL_LINK_PREFIX}${text}`; + } + + return { key: `${signature}:${occurrence}`, run, text }; + }); + // T3MarkdownText only rebuilds its attributed string during native layout. A + // color-only child update can otherwise leave the previous appearance cached. + const appearanceKey = [ + colorScheme ?? "unspecified", + props.textStyle.color, + props.textStyle.strongColor, + props.textStyle.mutedColor, + props.textStyle.linkColor, + props.textStyle.codeColor, + props.textStyle.codeBackgroundColor, + props.textStyle.codeBlockBackgroundColor, + props.textStyle.fileBackgroundColor, + props.textStyle.fileTextColor, + props.textStyle.skillBackgroundColor, + props.textStyle.skillTextColor, + props.textStyle.quoteMarkerColor, + props.textStyle.dividerColor, + ].join(":"); + + return ( + + {keyedRuns.map(({ key, run, text }) => { + const href = run.href; + return ( + { + void Linking.openURL(href); + } + : undefined + } + > + {text} + + ); + })} + + ); +} diff --git a/apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.ios.tsx b/apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.ios.tsx new file mode 100644 index 0000000000..7c8f8d1bd5 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.ios.tsx @@ -0,0 +1,80 @@ +import { useMemo } from "react"; +import { View } from "react-native"; +import { parseMarkdownWithOptions } from "react-native-nitro-markdown/headless"; + +import { + nativeMarkdownChunkSpacing, + nativeMarkdownDocumentChunks, + nativeMarkdownDocumentRuns, +} from "./nativeMarkdownText"; +import { NativeMarkdownBlock } from "./NativeMarkdownBlock.ios"; +import { NativeMarkdownSelectableText } from "./NativeMarkdownSelectableText.ios"; +import type { + SelectableMarkdownSkill, + SelectableMarkdownTextProps, +} from "./SelectableMarkdownText.types"; + +const EMPTY_SKILLS: ReadonlyArray = []; + +export type { + MarkdownCodeHighlighter, + MarkdownHighlightedToken, + NativeMarkdownTextStyle, + SelectableMarkdownSkill, + SelectableMarkdownTextProps, +} from "./SelectableMarkdownText.types"; + +export function hasNativeSelectableMarkdownText(): boolean { + return true; +} + +export function SelectableMarkdownText({ + markdown, + skills = EMPTY_SKILLS, + textStyle, + highlightCode, + marginTop = 0, + marginBottom = 0, +}: SelectableMarkdownTextProps) { + const chunks = useMemo(() => { + const document = parseMarkdownWithOptions(markdown, { + gfm: true, + html: true, + math: false, + }); + return nativeMarkdownDocumentChunks(document).map((chunk) => + chunk.kind === "selectable" + ? { + ...chunk, + runs: nativeMarkdownDocumentRuns(chunk.node, skills), + } + : chunk, + ); + }, [markdown, skills]); + + return ( + + {chunks.map((chunk, index) => { + const content = + chunk.kind === "rich" ? ( + + ) : ( + + ); + + return ( + + {content} + + ); + })} + + ); +} diff --git a/apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.tsx b/apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.tsx new file mode 100644 index 0000000000..fcb2472f64 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.tsx @@ -0,0 +1,13 @@ +import type { SelectableMarkdownTextProps } from "./SelectableMarkdownText.types"; + +export type { + MarkdownCodeHighlighter, + MarkdownHighlightedToken, + NativeMarkdownTextStyle, + SelectableMarkdownSkill, + SelectableMarkdownTextProps, +} from "./SelectableMarkdownText.types"; + +export function SelectableMarkdownText(_props: SelectableMarkdownTextProps) { + return null; +} diff --git a/apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.types.ts b/apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.types.ts new file mode 100644 index 0000000000..bd67d9110e --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.types.ts @@ -0,0 +1,46 @@ +export interface NativeMarkdownTextStyle { + readonly color: string; + readonly strongColor: string; + readonly mutedColor: string; + readonly linkColor: string; + readonly codeColor: string; + readonly codeBackgroundColor: string; + readonly codeBlockBackgroundColor: string; + readonly fileBackgroundColor: string; + readonly fileTextColor: string; + readonly skillBackgroundColor: string; + readonly skillTextColor: string; + readonly quoteMarkerColor: string; + readonly dividerColor: string; + readonly fontSize: number; + readonly lineHeight: number; + readonly fontFamily: string; + readonly headingFontFamily: string; + readonly boldFontFamily: string; +} + +export interface MarkdownHighlightedToken { + readonly content: string; + readonly color: string | null; + readonly fontStyle: number | null; +} + +export type MarkdownCodeHighlighter = (input: { + readonly code: string; + readonly language?: string | null; + readonly theme: "light" | "dark"; +}) => Promise>>; + +export interface SelectableMarkdownSkill { + readonly name: string; + readonly displayName?: string | null; +} + +export interface SelectableMarkdownTextProps { + readonly markdown: string; + readonly textStyle: NativeMarkdownTextStyle; + readonly highlightCode: MarkdownCodeHighlighter; + readonly skills?: ReadonlyArray; + readonly marginTop?: number; + readonly marginBottom?: number; +} diff --git a/apps/mobile/modules/t3-markdown-text/src/T3MarkdownTextNativeComponent.ts b/apps/mobile/modules/t3-markdown-text/src/T3MarkdownTextNativeComponent.ts new file mode 100644 index 0000000000..656ad47d25 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/T3MarkdownTextNativeComponent.ts @@ -0,0 +1,55 @@ +import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent"; +import type { ViewProps } from "react-native"; +import type { + BubblingEventHandler, + Int32, + WithDefault, +} from "react-native/Libraries/Types/CodegenTypes"; + +interface TargetedEvent { + target: Int32; +} + +interface TextLayoutEvent extends TargetedEvent { + lines: string[]; +} + +/** + * Event fired when text selection changes in the MarkdownTextPrimitive. + * @property target - The view tag identifier + * @property start - The start index of the selected range (0-based) + * @property end - The end index of the selected range (0-based, exclusive) + */ +interface SelectionChangeEvent extends TargetedEvent { + start: Int32; + end: Int32; +} + +type EllipsizeMode = "head" | "middle" | "tail" | "clip"; + +interface NativeProps extends ViewProps { + numberOfLines?: Int32; + allowFontScaling?: WithDefault; + ellipsizeMode?: WithDefault; + selectable?: boolean; + onTextLayout?: BubblingEventHandler; + /** + * Callback fired when the text selection changes. + * + * @example + * ```tsx + * { + * console.log('Selection:', event.nativeEvent.start, event.nativeEvent.end); + * }} + * > + * Selectable text + * + * ``` + */ + onSelectionChange?: BubblingEventHandler; +} + +export default codegenNativeComponent("T3MarkdownText", { + excludedPlatforms: ["android"], +}); diff --git a/apps/mobile/modules/t3-markdown-text/src/T3MarkdownTextRunNativeComponent.ts b/apps/mobile/modules/t3-markdown-text/src/T3MarkdownTextRunNativeComponent.ts new file mode 100644 index 0000000000..7f8fab8d84 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/T3MarkdownTextRunNativeComponent.ts @@ -0,0 +1,51 @@ +import type { ColorValue, ViewProps } from "react-native"; +import type { + BubblingEventHandler, + Float, + Int32, + WithDefault, +} from "react-native/Libraries/Types/CodegenTypes"; +import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent"; + +interface TargetedEvent { + target: Int32; +} + +type TextDecorationLine = "none" | "underline" | "line-through"; + +type TextDecorationStyle = "solid" | "double" | "dotted" | "dashed"; + +export type NativeFontWeight = + | "normal" + | "bold" + | "ultraLight" + | "light" + | "medium" + | "semibold" + | "heavy"; + +type FontStyle = "normal" | "italic"; + +type TextAlign = "auto" | "left" | "right" | "center" | "justify"; + +interface NativeProps extends ViewProps { + text: string; + color?: ColorValue; + fontSize?: Float; + fontStyle?: WithDefault; + fontWeight?: WithDefault; + fontFamily?: string; + letterSpacing?: Float; + lineHeight?: Float; + textDecorationLine?: WithDefault; + textDecorationStyle?: WithDefault; + textDecorationColor?: ColorValue; + textAlign?: WithDefault; + shadowRadius?: WithDefault; + onPress?: BubblingEventHandler; + onLongPress?: BubblingEventHandler; +} + +export default codegenNativeComponent("T3MarkdownTextRun", { + excludedPlatforms: ["android"], +}); diff --git a/apps/mobile/modules/t3-markdown-text/src/markdownFileIcons.generated.ts b/apps/mobile/modules/t3-markdown-text/src/markdownFileIcons.generated.ts new file mode 100644 index 0000000000..608fa08c48 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/markdownFileIcons.generated.ts @@ -0,0 +1,62 @@ +import type { ImageSourcePropType } from "react-native"; + +export const MARKDOWN_FILE_ICON_SOURCES = { + agents: require("../assets/file-icons/pierre_agents.png"), + astro: require("../assets/file-icons/pierre_astro.png"), + babel: require("../assets/file-icons/pierre_babel.png"), + bash: require("../assets/file-icons/pierre_bash.png"), + biome: require("../assets/file-icons/pierre_biome.png"), + bootstrap: require("../assets/file-icons/pierre_bootstrap.png"), + browserslist: require("../assets/file-icons/pierre_browserslist.png"), + bun: require("../assets/file-icons/pierre_bun.png"), + c: require("../assets/file-icons/pierre_c.png"), + claude: require("../assets/file-icons/pierre_claude.png"), + cpp: require("../assets/file-icons/pierre_cpp.png"), + css: require("../assets/file-icons/pierre_css.png"), + database: require("../assets/file-icons/pierre_database.png"), + default: require("../assets/file-icons/pierre_default.png"), + docker: require("../assets/file-icons/pierre_docker.png"), + eslint: require("../assets/file-icons/pierre_eslint.png"), + font: require("../assets/file-icons/pierre_font.png"), + git: require("../assets/file-icons/pierre_git.png"), + go: require("../assets/file-icons/pierre_go.png"), + graphql: require("../assets/file-icons/pierre_graphql.png"), + html: require("../assets/file-icons/pierre_html.png"), + image: require("../assets/file-icons/pierre_image.png"), + javascript: require("../assets/file-icons/pierre_javascript.png"), + json: require("../assets/file-icons/pierre_json.png"), + markdown: require("../assets/file-icons/pierre_markdown.png"), + mcp: require("../assets/file-icons/pierre_mcp.png"), + nextjs: require("../assets/file-icons/pierre_nextjs.png"), + npm: require("../assets/file-icons/pierre_npm.png"), + oxc: require("../assets/file-icons/pierre_oxc.png"), + package: require("../assets/file-icons/pierre_package.png"), + pnpm: require("../assets/file-icons/pierre_pnpm.png"), + postcss: require("../assets/file-icons/pierre_postcss.png"), + prettier: require("../assets/file-icons/pierre_prettier.png"), + python: require("../assets/file-icons/pierre_python.png"), + react: require("../assets/file-icons/pierre_react.png"), + readme: require("../assets/file-icons/pierre_readme.png"), + ruby: require("../assets/file-icons/pierre_ruby.png"), + rust: require("../assets/file-icons/pierre_rust.png"), + sass: require("../assets/file-icons/pierre_sass.png"), + stylelint: require("../assets/file-icons/pierre_stylelint.png"), + svelte: require("../assets/file-icons/pierre_svelte.png"), + svg: require("../assets/file-icons/pierre_svg.png"), + svgo: require("../assets/file-icons/pierre_svgo.png"), + swift: require("../assets/file-icons/pierre_swift.png"), + table: require("../assets/file-icons/pierre_table.png"), + tailwind: require("../assets/file-icons/pierre_tailwind.png"), + terraform: require("../assets/file-icons/pierre_terraform.png"), + text: require("../assets/file-icons/pierre_text.png"), + tsconfig: require("../assets/file-icons/pierre_tsconfig.png"), + typescript: require("../assets/file-icons/pierre_typescript.png"), + vite: require("../assets/file-icons/pierre_vite.png"), + vscode: require("../assets/file-icons/pierre_vscode.png"), + vue: require("../assets/file-icons/pierre_vue.png"), + wasm: require("../assets/file-icons/pierre_wasm.png"), + webpack: require("../assets/file-icons/pierre_webpack.png"), + yml: require("../assets/file-icons/pierre_yml.png"), + zig: require("../assets/file-icons/pierre_zig.png"), + zip: require("../assets/file-icons/pierre_zip.png"), +} as const satisfies Readonly>; diff --git a/apps/mobile/modules/t3-markdown-text/src/markdownFileIcons.ts b/apps/mobile/modules/t3-markdown-text/src/markdownFileIcons.ts new file mode 100644 index 0000000000..94b08c1de7 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/markdownFileIcons.ts @@ -0,0 +1,8 @@ +import type { ImageSourcePropType } from "react-native"; + +import type { MarkdownFileIcon } from "./markdownLinks"; +import { MARKDOWN_FILE_ICON_SOURCES } from "./markdownFileIcons.generated"; + +export function markdownFileIconSource(icon: MarkdownFileIcon): ImageSourcePropType { + return MARKDOWN_FILE_ICON_SOURCES[icon]; +} diff --git a/apps/mobile/modules/t3-markdown-text/src/markdownLinks.ts b/apps/mobile/modules/t3-markdown-text/src/markdownLinks.ts new file mode 100644 index 0000000000..affd7515b2 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/markdownLinks.ts @@ -0,0 +1,349 @@ +import type { MARKDOWN_FILE_ICON_SOURCES } from "./markdownFileIcons.generated"; + +const WINDOWS_DRIVE_PATH_PATTERN = /^[A-Za-z]:[\\/]/; +const WINDOWS_UNC_PATH_PATTERN = /^\\\\/; +const RELATIVE_PATH_PREFIX_PATTERN = /^(~\/|\.{1,2}\/)/; +const RELATIVE_FILE_PATH_PATTERN = /^[A-Za-z0-9._-]+(?:\/[A-Za-z0-9._-]+)+(?::\d+){0,2}$/; +const RELATIVE_FILE_NAME_PATTERN = /^[A-Za-z0-9._-]+\.[A-Za-z0-9_-]+(?::\d+){0,2}$/; +const POSITION_SUFFIX_PATTERN = /:\d+(?::\d+)?$/; +const POSIX_FILE_ROOT_PREFIXES = [ + "/Users/", + "/home/", + "/tmp/", + "/var/", + "/etc/", + "/opt/", + "/mnt/", + "/Volumes/", + "/private/", + "/root/", +] as const; + +export type MarkdownLinkPresentation = + | { + readonly kind: "external"; + readonly href: string; + readonly host: string; + } + | { + readonly kind: "file"; + readonly icon: MarkdownFileIcon; + readonly label: string; + } + | { + readonly kind: "link"; + readonly href: string | null; + }; + +export type MarkdownFileIcon = keyof typeof MARKDOWN_FILE_ICON_SOURCES; + +const FILE_ICON_BY_NAME: Readonly> = { + ".babelrc": "babel", + ".babelrc.json": "babel", + ".bash_profile": "bash", + ".bashrc": "bash", + ".browserslistrc": "browserslist", + ".dockerignore": "docker", + ".eslintignore": "eslint", + ".eslintrc": "eslint", + ".eslintrc.cjs": "eslint", + ".eslintrc.js": "eslint", + ".eslintrc.json": "eslint", + ".eslintrc.yaml": "eslint", + ".eslintrc.yml": "eslint", + ".gitattributes": "git", + ".gitignore": "git", + ".gitkeep": "git", + ".gitmodules": "git", + ".oxlintrc.json": "oxc", + ".postcssrc": "postcss", + ".postcssrc.json": "postcss", + ".postcssrc.yaml": "postcss", + ".postcssrc.yml": "postcss", + ".prettierignore": "prettier", + ".prettierrc": "prettier", + ".prettierrc.json": "prettier", + ".prettierrc.cjs": "prettier", + ".prettierrc.js": "prettier", + ".prettierrc.mjs": "prettier", + ".prettierrc.toml": "prettier", + ".prettierrc.yaml": "prettier", + ".prettierrc.yml": "prettier", + ".stylelintignore": "stylelint", + ".stylelintrc": "stylelint", + ".stylelintrc.cjs": "stylelint", + ".stylelintrc.js": "stylelint", + ".stylelintrc.json": "stylelint", + ".stylelintrc.mjs": "stylelint", + ".stylelintrc.yaml": "stylelint", + ".stylelintrc.yml": "stylelint", + ".terraform.lock.hcl": "terraform", + ".zprofile": "bash", + ".zshenv": "bash", + ".zshrc": "bash", + "agents.md": "agents", + "babel.config.js": "babel", + "babel.config.cjs": "babel", + "babel.config.json": "babel", + "babel.config.mjs": "babel", + "biome.json": "biome", + "biome.jsonc": "biome", + "bun.lock": "bun", + "bun.lockb": "bun", + "bunfig.toml": "bun", + "claude.md": "claude", + "compose.yaml": "docker", + "compose.yml": "docker", + "docker-compose.yaml": "docker", + "docker-compose.yml": "docker", + "docker-compose.override.yml": "docker", + dockerfile: "docker", + "eslint.config.js": "eslint", + "eslint.config.cjs": "eslint", + "eslint.config.mjs": "eslint", + "eslint.config.mts": "eslint", + "eslint.config.ts": "eslint", + gemfile: "ruby", + "next.config.js": "nextjs", + "next.config.mjs": "nextjs", + "next.config.mts": "nextjs", + "next.config.ts": "nextjs", + "package.json": "package", + "pnpm-lock.yaml": "pnpm", + "pnpm-workspace.yaml": "pnpm", + "postcss.config.js": "postcss", + "postcss.config.cjs": "postcss", + "postcss.config.mjs": "postcss", + "postcss.config.ts": "postcss", + "prettier.config.js": "prettier", + "prettier.config.cjs": "prettier", + "prettier.config.mjs": "prettier", + rakefile: "ruby", + "readme.md": "readme", + "stylelint.config.js": "stylelint", + "stylelint.config.cjs": "stylelint", + "stylelint.config.mjs": "stylelint", + "svgo.config.js": "svgo", + "svgo.config.cjs": "svgo", + "svgo.config.mjs": "svgo", + "svgo.config.ts": "svgo", + "tailwind.config.js": "tailwind", + "tailwind.config.cjs": "tailwind", + "tailwind.config.mjs": "tailwind", + "tailwind.config.ts": "tailwind", + "tsconfig.json": "tsconfig", + "vite.config.js": "vite", + "vite.config.mjs": "vite", + "vite.config.mts": "vite", + "vite.config.ts": "vite", + "webpack.config.js": "webpack", + "webpack.config.babel.js": "webpack", + "webpack.config.cjs": "webpack", + "webpack.config.mjs": "webpack", + "webpack.config.ts": "webpack", +}; + +const FILE_ICON_BY_EXTENSION: Readonly> = { + "7z": "zip", + astro: "astro", + avif: "image", + "code-workspace": "vscode", + bash: "bash", + bmp: "image", + bz2: "zip", + c: "c", + cc: "cpp", + cpp: "cpp", + cxx: "cpp", + css: "css", + csv: "table", + cts: "typescript", + db: "database", + env: "text", + "env.development": "text", + "env.local": "text", + "env.production": "text", + eot: "font", + erb: "ruby", + fish: "bash", + gif: "image", + go: "go", + gql: "graphql", + graphql: "graphql", + gz: "zip", + h: "c", + hh: "cpp", + hpp: "cpp", + hxx: "cpp", + htm: "html", + html: "html", + ico: "image", + icns: "image", + ini: "text", + inl: "cpp", + jar: "zip", + jpeg: "image", + jpg: "image", + js: "javascript", + jsx: "react", + json: "json", + jsonc: "json", + less: "css", + md: "markdown", + mdx: "markdown", + "mdx.tsx": "markdown", + mjs: "javascript", + mts: "typescript", + png: "image", + postcss: "css", + py: "python", + pyi: "python", + pyw: "python", + pyx: "python", + rake: "ruby", + rar: "zip", + rb: "ruby", + rs: "rust", + sass: "sass", + scss: "sass", + sh: "bash", + sql: "database", + sqlite: "database", + sqlite3: "database", + svelte: "svelte", + svg: "svg", + swift: "swift", + tar: "zip", + tf: "terraform", + tfstate: "terraform", + tfvars: "terraform", + tgz: "zip", + ts: "typescript", + tsv: "table", + tsx: "react", + txt: "text", + woff: "font", + woff2: "font", + vue: "vue", + wasm: "wasm", + webp: "image", + yml: "yml", + yaml: "yml", + zig: "zig", + zip: "zip", + zsh: "bash", +}; + +function safeDecode(value: string): string { + try { + return decodeURIComponent(value); + } catch { + return value; + } +} + +function normalizeDestination(value: string): string { + const trimmed = value.trim(); + return trimmed.startsWith("<") && trimmed.endsWith(">") ? trimmed.slice(1, -1) : trimmed; +} + +function fileUrlPath(href: string): string | null { + try { + const parsed = new URL(href); + if (parsed.protocol.toLowerCase() !== "file:") { + return null; + } + const path = /^\/[A-Za-z]:[\\/]/.test(parsed.pathname) + ? parsed.pathname.slice(1) + : parsed.pathname; + const lineMatch = parsed.hash.match(/^#L(\d+)(?:C(\d+))?$/i); + return `${safeDecode(path)}${ + lineMatch?.[1] ? `:${lineMatch[1]}${lineMatch[2] ? `:${lineMatch[2]}` : ""}` : "" + }`; + } catch { + return null; + } +} + +function looksLikePosixFilesystemPath(path: string): boolean { + if (!path.startsWith("/")) { + return false; + } + if (POSIX_FILE_ROOT_PREFIXES.some((prefix) => path.startsWith(prefix))) { + return true; + } + if (POSITION_SUFFIX_PATTERN.test(path)) { + return true; + } + const basename = path.slice(path.lastIndexOf("/") + 1); + return /\.[A-Za-z0-9_-]+$/.test(basename); +} + +function looksLikeFilePath(value: string): boolean { + if (WINDOWS_DRIVE_PATH_PATTERN.test(value) || WINDOWS_UNC_PATH_PATTERN.test(value)) { + return true; + } + if (RELATIVE_PATH_PREFIX_PATTERN.test(value)) { + return true; + } + if (value.startsWith("/")) { + return looksLikePosixFilesystemPath(value); + } + if (FILE_ICON_BY_NAME[value.replace(POSITION_SUFFIX_PATTERN, "").toLowerCase()]) { + return true; + } + return RELATIVE_FILE_PATH_PATTERN.test(value) || RELATIVE_FILE_NAME_PATTERN.test(value); +} + +function fileLabel(value: string): string { + const normalized = value.replaceAll("\\", "/"); + const basename = normalized.slice(normalized.lastIndexOf("/") + 1); + return basename || normalized; +} + +export function resolveMarkdownFileIcon(value: string): MarkdownFileIcon { + const basename = fileLabel(value).replace(POSITION_SUFFIX_PATTERN, "").toLowerCase(); + const exactIcon = FILE_ICON_BY_NAME[basename]; + if (exactIcon) return exactIcon; + if (basename.startsWith("tsconfig.") && basename.endsWith(".json")) { + return "tsconfig"; + } + const segments = basename.split("."); + for (let index = 1; index < segments.length; index += 1) { + const icon = FILE_ICON_BY_EXTENSION[segments.slice(index).join(".")]; + if (icon) return icon; + } + return "default"; +} + +export function resolveMarkdownLinkPresentation(href: string): MarkdownLinkPresentation { + const normalized = normalizeDestination(href); + try { + const parsed = new URL(normalized); + if (parsed.protocol === "http:" || parsed.protocol === "https:") { + return { + kind: "external", + href: parsed.toString(), + host: parsed.hostname, + }; + } + } catch { + // Relative paths and non-URL link destinations are handled below. + } + + const fileTarget = normalized.toLowerCase().startsWith("file:") + ? fileUrlPath(normalized) + : safeDecode(normalized.split(/[?#]/, 1)[0] ?? normalized); + if (fileTarget && looksLikeFilePath(fileTarget)) { + return { + kind: "file", + icon: resolveMarkdownFileIcon(fileTarget), + label: fileLabel(fileTarget), + }; + } + + return { + kind: "link", + href: /^(?:mailto|tel):/i.test(normalized) ? normalized : null, + }; +} diff --git a/apps/mobile/modules/t3-markdown-text/src/nativeMarkdownText.ts b/apps/mobile/modules/t3-markdown-text/src/nativeMarkdownText.ts new file mode 100644 index 0000000000..6751e165f1 --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/nativeMarkdownText.ts @@ -0,0 +1,751 @@ +import type { MarkdownNode } from "react-native-nitro-markdown/headless"; + +import type { SelectableMarkdownSkill } from "./SelectableMarkdownText.types"; +import { resolveMarkdownLinkPresentation, type MarkdownFileIcon } from "./markdownLinks"; + +export interface NativeMarkdownTextRun { + readonly text: string; + readonly bold?: boolean; + readonly italic?: boolean; + readonly strikethrough?: boolean; + readonly code?: boolean; + readonly href?: string; + readonly externalHost?: string; + readonly fileIcon?: MarkdownFileIcon; + readonly skillName?: string; + readonly skillLabel?: string; + readonly role?: + | "body" + | "heading" + | "list-marker" + | "list-break" + | "quote-marker" + | "code-block" + | "code-language" + | "divider" + | "spacer"; + readonly headingLevel?: number; + readonly depth?: number; + readonly spacing?: number; + readonly firstLineHeadIndent?: number; + readonly headIndent?: number; + readonly paragraphSpacing?: number; +} + +export type NativeMarkdownDocumentChunk = + | { + readonly kind: "selectable"; + readonly key: string; + readonly node: MarkdownNode; + } + | { + readonly kind: "rich"; + readonly key: string; + readonly node: MarkdownNode; + }; + +interface RunContext { + readonly bold: boolean; + readonly italic: boolean; + readonly strikethrough: boolean; + readonly code: boolean; + readonly href?: string; + readonly externalHost?: string; + readonly fileIcon?: MarkdownFileIcon; + readonly role?: NativeMarkdownTextRun["role"]; + readonly headingLevel?: number; + readonly depth?: number; + readonly spacing?: number; + readonly firstLineHeadIndent?: number; + readonly headIndent?: number; + readonly paragraphSpacing?: number; +} + +const EMPTY_CONTEXT: RunContext = { + bold: false, + italic: false, + strikethrough: false, + code: false, +}; + +const INLINE_HTML_TAG_PATTERN = /<\/?(?:kbd|mark|sub|sup|u)(?:\s[^>]*)?>/gi; + +function decodeHtmlEntitiesOnce(value: string): string { + return value.replace( + /&(?:#(\d+)|#x([0-9a-f]+)|amp|apos|gt|lt|nbsp|quot);/gi, + (entity, decimal: string | undefined, hexadecimal: string | undefined) => { + if (decimal) { + return String.fromCodePoint(Number.parseInt(decimal, 10)); + } + if (hexadecimal) { + return String.fromCodePoint(Number.parseInt(hexadecimal, 16)); + } + switch (entity.toLowerCase()) { + case "&": + return "&"; + case "'": + return "'"; + case ">": + return ">"; + case "<": + return "<"; + case " ": + return "\u00a0"; + case """: + return '"'; + default: + return entity; + } + }, + ); +} + +function decodeHtmlEntities(value: string): string { + let decoded = value; + for (let pass = 0; pass < 2; pass += 1) { + const next = decodeHtmlEntitiesOnce(decoded); + if (next === decoded) { + break; + } + decoded = next; + } + return decoded; +} + +function textNodeContent(value: string): string { + return decodeHtmlEntities(value).replace(INLINE_HTML_TAG_PATTERN, ""); +} + +function inlineHtmlText(value: string): string { + if (/^$/i.test(value.trim())) { + return "\n"; + } + return decodeHtmlEntities(value.replace(/<[^>]+>/g, "")); +} + +function sameRunStyle(left: NativeMarkdownTextRun, right: NativeMarkdownTextRun): boolean { + return ( + left.bold === right.bold && + left.italic === right.italic && + left.strikethrough === right.strikethrough && + left.code === right.code && + left.href === right.href && + left.externalHost === right.externalHost && + left.fileIcon === right.fileIcon && + left.skillName === right.skillName && + left.skillLabel === right.skillLabel && + left.role === right.role && + left.headingLevel === right.headingLevel && + left.depth === right.depth && + left.spacing === right.spacing && + left.firstLineHeadIndent === right.firstLineHeadIndent && + left.headIndent === right.headIndent && + left.paragraphSpacing === right.paragraphSpacing + ); +} + +function appendRun( + runs: NativeMarkdownTextRun[], + text: string, + context: RunContext, +): NativeMarkdownTextRun[] { + if (text.length === 0) { + return runs; + } + + const run: NativeMarkdownTextRun = { + text, + ...(context.bold ? { bold: true } : {}), + ...(context.italic ? { italic: true } : {}), + ...(context.strikethrough ? { strikethrough: true } : {}), + ...(context.code ? { code: true } : {}), + ...(context.href ? { href: context.href } : {}), + ...(context.externalHost ? { externalHost: context.externalHost } : {}), + ...(context.fileIcon ? { fileIcon: context.fileIcon } : {}), + ...(context.role ? { role: context.role } : {}), + ...(context.headingLevel ? { headingLevel: context.headingLevel } : {}), + ...(context.depth ? { depth: context.depth } : {}), + ...(context.spacing ? { spacing: context.spacing } : {}), + ...(context.firstLineHeadIndent !== undefined + ? { firstLineHeadIndent: context.firstLineHeadIndent } + : {}), + ...(context.headIndent !== undefined ? { headIndent: context.headIndent } : {}), + ...(context.paragraphSpacing !== undefined + ? { paragraphSpacing: context.paragraphSpacing } + : {}), + }; + const previous = runs.at(-1); + if (previous && sameRunStyle(previous, run)) { + runs[runs.length - 1] = { ...previous, text: previous.text + run.text }; + return runs; + } + + runs.push(run); + return runs; +} + +const SKILL_TOKEN_REGEX = /(^|\s)\$([a-zA-Z][a-zA-Z0-9:_-]*)(?=\s|$)/g; + +function formatSkillLabel(skill: SelectableMarkdownSkill): string { + const displayName = skill.displayName?.trim(); + if (displayName) { + return displayName; + } + return skill.name + .split(/[\s:_-]+/) + .filter(Boolean) + .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1)) + .join(" "); +} + +function decorateSkillRuns( + runs: ReadonlyArray, + skills: ReadonlyArray, +): ReadonlyArray { + if (skills.length === 0) { + return runs; + } + const skillByName = new Map(skills.map((skill) => [skill.name, skill])); + const decorated: NativeMarkdownTextRun[] = []; + + for (const run of runs) { + if (run.code || run.href || run.fileIcon || run.role === "code-block") { + decorated.push(run); + continue; + } + + let cursor = 0; + let matched = false; + for (const match of run.text.matchAll(SKILL_TOKEN_REGEX)) { + const prefix = match[1] ?? ""; + const name = match[2] ?? ""; + const skill = skillByName.get(name); + if (!skill) { + continue; + } + const start = (match.index ?? 0) + prefix.length; + const end = start + name.length + 1; + if (start > cursor) { + decorated.push({ ...run, text: run.text.slice(cursor, start) }); + } + decorated.push({ + ...run, + text: run.text.slice(start, end), + skillName: name, + skillLabel: formatSkillLabel(skill), + }); + cursor = end; + matched = true; + } + if (!matched) { + decorated.push(run); + } else if (cursor < run.text.length) { + decorated.push({ ...run, text: run.text.slice(cursor) }); + } + } + + return decorated; +} + +function appendChildren( + runs: NativeMarkdownTextRun[], + node: MarkdownNode, + context: RunContext, +): NativeMarkdownTextRun[] { + for (const child of node.children ?? []) { + appendNode(runs, child, context); + } + return runs; +} + +function nodeTextContent(node: MarkdownNode): string { + if (node.content !== undefined) { + return node.content; + } + return (node.children ?? []).map(nodeTextContent).join(""); +} + +function appendNode( + runs: NativeMarkdownTextRun[], + node: MarkdownNode, + context: RunContext, +): NativeMarkdownTextRun[] { + switch (node.type) { + case "text": + case "math_inline": + return appendRun(runs, textNodeContent(nodeTextContent(node)), context); + case "html_inline": + return appendRun(runs, inlineHtmlText(nodeTextContent(node)), context); + case "code_inline": + return appendRun(runs, nodeTextContent(node), { ...context, code: true }); + case "soft_break": + return appendRun(runs, " ", context); + case "line_break": + return appendRun(runs, "\n", context); + case "bold": + return appendChildren(runs, node, { ...context, bold: true }); + case "italic": + return appendChildren(runs, node, { ...context, italic: true }); + case "strikethrough": + return appendChildren(runs, node, { ...context, strikethrough: true }); + case "link": { + const presentation = resolveMarkdownLinkPresentation(node.href ?? ""); + if (presentation.kind === "file") { + return appendRun(runs, presentation.label, { + ...context, + fileIcon: presentation.icon, + }); + } + if (presentation.kind === "external") { + return appendChildren(runs, node, { + ...context, + href: presentation.href, + externalHost: presentation.host, + }); + } + return appendChildren(runs, node, { + ...context, + ...(presentation.href ? { href: presentation.href } : {}), + }); + } + case "image": + return appendRun(runs, node.alt ?? node.title ?? "", context); + default: + return appendChildren(runs, node, context); + } +} + +export function nativeMarkdownTextRuns(node: MarkdownNode): ReadonlyArray { + return appendChildren([], node, EMPTY_CONTEXT); +} + +function appendBlockTerminator( + runs: NativeMarkdownTextRun[], + context: RunContext, +): NativeMarkdownTextRun[] { + return appendRun(runs, "\n", context); +} + +function appendSpacer(runs: NativeMarkdownTextRun[], spacing: number): NativeMarkdownTextRun[] { + return appendRun(runs, "\n", { ...EMPTY_CONTEXT, role: "spacer", spacing }); +} + +function appendInlineChildren( + runs: NativeMarkdownTextRun[], + node: MarkdownNode, + context: RunContext, +): NativeMarkdownTextRun[] { + for (const child of node.children ?? []) { + appendNode(runs, child, context); + } + return runs; +} + +function isInlineNode(node: MarkdownNode): boolean { + return ( + node.type === "text" || + node.type === "bold" || + node.type === "italic" || + node.type === "strikethrough" || + node.type === "link" || + node.type === "image" || + node.type === "code_inline" || + node.type === "math_inline" || + node.type === "html_inline" || + node.type === "soft_break" || + node.type === "line_break" + ); +} + +export function nativeMarkdownListItemBlocks(node: MarkdownNode): ReadonlyArray { + const blocks: MarkdownNode[] = []; + let inlineNodes: MarkdownNode[] = []; + const flushInlineNodes = () => { + if (inlineNodes.length === 0) { + return; + } + blocks.push({ type: "paragraph", children: inlineNodes }); + inlineNodes = []; + }; + + for (const child of node.children ?? []) { + if (isInlineNode(child)) { + inlineNodes.push(child); + continue; + } + + flushInlineNodes(); + blocks.push(child); + } + flushInlineNodes(); + return blocks; +} + +function appendListItem( + runs: NativeMarkdownTextRun[], + node: MarkdownNode, + marker: string, + depth: number, + markerColumnWidth: number, +): NativeMarkdownTextRun[] { + const firstLineHeadIndent = Math.max(0, depth - 1) * 20; + appendRun(runs, `${marker}\t`, { + ...EMPTY_CONTEXT, + role: "list-marker", + depth, + firstLineHeadIndent, + headIndent: firstLineHeadIndent + markerColumnWidth, + paragraphSpacing: 2, + }); + + const children = node.children ?? []; + let wroteInlineContent = false; + for (const child of children) { + if (child.type === "paragraph") { + appendInlineChildren(runs, child, { + ...EMPTY_CONTEXT, + role: "body", + depth, + }); + wroteInlineContent = true; + continue; + } + if (child.type === "list") { + if (wroteInlineContent) { + appendBlockTerminator(runs, { + ...EMPTY_CONTEXT, + role: "list-break", + depth, + spacing: 1, + }); + } + appendList(runs, child, depth + 1); + wroteInlineContent = false; + continue; + } + if (isInlineNode(child)) { + appendNode(runs, child, { + ...EMPTY_CONTEXT, + role: "body", + depth, + }); + wroteInlineContent = true; + continue; + } + appendDocumentBlock(runs, child, depth); + wroteInlineContent = true; + } + + if (wroteInlineContent) { + appendBlockTerminator(runs, { + ...EMPTY_CONTEXT, + role: "list-break", + depth, + spacing: depth === 1 ? 4 : 2, + }); + } + return runs; +} + +function appendList( + runs: NativeMarkdownTextRun[], + node: MarkdownNode, + depth: number, +): NativeMarkdownTextRun[] { + const ordered = node.ordered ?? false; + const start = node.start ?? 1; + const children = node.children ?? []; + const markers = children.map((child, index) => + child.type === "task_list_item" + ? child.checked + ? "☑︎" + : "☐︎" + : ordered + ? `${start + index}.` + : depth % 3 === 2 + ? "◦" + : depth % 3 === 0 + ? "▪︎" + : "•", + ); + const markerWidth = ordered + ? Math.max(0, ...markers.map((marker) => Array.from(marker).length)) + : 0; + + for (const [index, child] of children.entries()) { + const marker = markers[index] ?? "•"; + const alignedMarker = + child.type === "task_list_item" + ? marker + : ordered + ? `${"\u2007".repeat(Math.max(0, markerWidth - Array.from(marker).length))}${marker}` + : marker; + const markerColumnWidth = + child.type === "task_list_item" ? 28 : ordered ? 10 + markerWidth * 8 : 24; + appendListItem(runs, child, alignedMarker, depth, markerColumnWidth); + } + return runs; +} + +function appendQuoteBlock( + runs: NativeMarkdownTextRun[], + node: MarkdownNode, + depth: number, +): NativeMarkdownTextRun[] { + for (const [index, child] of (node.children ?? []).entries()) { + if (index > 0) { + appendBlockTerminator(runs, { ...EMPTY_CONTEXT, role: "body", depth }); + } + appendRun(runs, "│\u00a0", { + ...EMPTY_CONTEXT, + role: "quote-marker", + depth, + }); + if (child.type === "paragraph") { + appendInlineChildren(runs, child, { + ...EMPTY_CONTEXT, + role: "body", + depth, + }); + } else { + appendDocumentBlock(runs, child, depth); + } + } + appendBlockTerminator(runs, { ...EMPTY_CONTEXT, role: "body", depth }); + return runs; +} + +function appendTableRow( + runs: NativeMarkdownTextRun[], + node: MarkdownNode, + depth: number, +): NativeMarkdownTextRun[] { + const cells = node.children ?? []; + for (const [index, cell] of cells.entries()) { + if (index > 0) { + appendRun(runs, "\u00a0│\u00a0", { + ...EMPTY_CONTEXT, + role: "divider", + depth, + }); + } + appendInlineChildren(runs, cell, { + ...EMPTY_CONTEXT, + role: "body", + bold: cell.isHeader ?? false, + depth, + }); + } + appendBlockTerminator(runs, { ...EMPTY_CONTEXT, role: "body", depth }); + return runs; +} + +function appendTable( + runs: NativeMarkdownTextRun[], + node: MarkdownNode, + depth: number, +): NativeMarkdownTextRun[] { + const visit = (child: MarkdownNode) => { + if (child.type === "table_row") { + appendTableRow(runs, child, depth); + return; + } + for (const nested of child.children ?? []) { + visit(nested); + } + }; + visit(node); + return runs; +} + +function appendDocumentBlock( + runs: NativeMarkdownTextRun[], + node: MarkdownNode, + depth = 0, +): NativeMarkdownTextRun[] { + switch (node.type) { + case "document": { + const children = node.children ?? []; + for (const [index, child] of children.entries()) { + if (index > 0) { + const previous = children[index - 1]; + appendSpacer( + runs, + child.type === "heading" ? 20 : previous?.type === "heading" ? 10 : 12, + ); + } + appendDocumentBlock(runs, child, depth); + } + return runs; + } + case "heading": { + const context: RunContext = { + ...EMPTY_CONTEXT, + role: "heading", + headingLevel: node.level ?? 1, + depth, + }; + appendInlineChildren(runs, node, context); + return appendBlockTerminator(runs, context); + } + case "paragraph": { + const context: RunContext = { ...EMPTY_CONTEXT, role: "body", depth }; + appendInlineChildren(runs, node, context); + return appendBlockTerminator(runs, context); + } + case "list": + return appendList(runs, node, depth + 1); + case "blockquote": + return appendQuoteBlock(runs, node, depth); + case "code_block": { + if (node.language) { + appendRun(runs, `${node.language.toUpperCase()}\n`, { + ...EMPTY_CONTEXT, + role: "code-language", + code: true, + depth, + }); + } + const content = nodeTextContent(node); + appendRun(runs, content, { + ...EMPTY_CONTEXT, + role: "code-block", + code: true, + depth, + }); + if (!content.endsWith("\n")) { + appendBlockTerminator(runs, { + ...EMPTY_CONTEXT, + role: "code-block", + code: true, + depth, + }); + } + return runs; + } + case "horizontal_rule": + appendRun(runs, "────────────────────────\n", { + ...EMPTY_CONTEXT, + role: "divider", + depth, + }); + return runs; + case "table": + return appendTable(runs, node, depth); + case "html_block": + appendRun(runs, inlineHtmlText(nodeTextContent(node)), { + ...EMPTY_CONTEXT, + role: "body", + depth, + }); + return appendBlockTerminator(runs, { ...EMPTY_CONTEXT, role: "body", depth }); + case "math_block": + appendRun(runs, nodeTextContent(node), { ...EMPTY_CONTEXT, role: "body", depth }); + return appendBlockTerminator(runs, { ...EMPTY_CONTEXT, role: "body", depth }); + default: + appendInlineChildren(runs, node, { ...EMPTY_CONTEXT, role: "body", depth }); + return appendBlockTerminator(runs, { ...EMPTY_CONTEXT, role: "body", depth }); + } +} + +function containsRichBlock(node: MarkdownNode): boolean { + if ( + node.type === "code_block" || + node.type === "table" || + node.type === "image" || + node.type === "horizontal_rule" || + node.type === "html_block" || + node.type === "math_block" + ) { + return true; + } + return (node.children ?? []).some(containsRichBlock); +} + +export function nativeMarkdownDocumentChunks( + document: MarkdownNode, +): ReadonlyArray { + const chunks: NativeMarkdownDocumentChunk[] = []; + let selectableNodes: MarkdownNode[] = []; + + const flushSelectable = () => { + if (selectableNodes.length === 0) { + return; + } + const first = selectableNodes[0]; + const last = selectableNodes.at(-1); + chunks.push({ + kind: "selectable", + key: `selectable:${first?.beg ?? "start"}:${last?.end ?? "end"}`, + node: { + type: "document", + children: selectableNodes, + }, + }); + selectableNodes = []; + }; + + for (const [index, child] of (document.children ?? []).entries()) { + if (!containsRichBlock(child)) { + selectableNodes.push(child); + continue; + } + + flushSelectable(); + chunks.push({ + kind: "rich", + key: `rich:${child.type}:${child.beg ?? index}:${child.end ?? index}`, + node: child, + }); + } + flushSelectable(); + return chunks; +} + +function topLevelNodes(node: MarkdownNode): ReadonlyArray { + return node.type === "document" ? (node.children ?? []) : [node]; +} + +export function nativeMarkdownChunkSpacing( + previous: NativeMarkdownDocumentChunk | undefined, + current: NativeMarkdownDocumentChunk, +): number { + if (!previous) { + return 0; + } + + const previousLast = topLevelNodes(previous.node).at(-1); + const currentFirst = topLevelNodes(current.node)[0]; + + if (currentFirst?.type === "heading") { + return 20; + } + if (previousLast?.type === "heading") { + return 10; + } + if (previousLast?.type === "list" && currentFirst?.type === "list") { + return 12; + } + return 14; +} + +export function nativeMarkdownDocumentRuns( + node: MarkdownNode, + skills: ReadonlyArray = [], +): ReadonlyArray { + const runs = appendDocumentBlock([], node); + while (runs.length > 0) { + const lastIndex = runs.length - 1; + const last = runs[lastIndex]; + if (!last?.text.endsWith("\n")) { + break; + } + const text = last.text.slice(0, -1); + if (text.length === 0) { + runs.pop(); + } else { + runs[lastIndex] = { ...last, text }; + } + } + return decorateSkillRuns(runs, skills); +} diff --git a/apps/mobile/modules/t3-markdown-text/src/util.ts b/apps/mobile/modules/t3-markdown-text/src/util.ts new file mode 100644 index 0000000000..d9f33d3a2e --- /dev/null +++ b/apps/mobile/modules/t3-markdown-text/src/util.ts @@ -0,0 +1,62 @@ +import { type StyleProp, StyleSheet, type TextStyle } from "react-native"; +import type { NativeFontWeight } from "./T3MarkdownTextRunNativeComponent"; + +export function flattenStyles(rootStyle: TextStyle, style: StyleProp) { + const flattenedStyle = StyleSheet.flatten([rootStyle, style]) as TextStyle; + return { + ...flattenedStyle, + fontWeight: fontWeightToNativeProp(flattenedStyle.fontWeight ?? "normal"), + backgroundColor: flattenedStyle.backgroundColor + ? flattenedStyle.backgroundColor + : "transparent", + shadowOffset: flattenedStyle.shadowOffset + ? flattenedStyle.shadowOffset + : { width: 0, height: 0 }, + }; +} + +// Codegen doesn't like using integer values for enums (c++ L) so we'll conver them to the proper native prop +// value before returning flattened styles. +function fontWeightToNativeProp(fontWeight: TextStyle["fontWeight"]): NativeFontWeight { + switch (fontWeight) { + case "normal": + return "normal"; + case "bold": + return "bold"; + case 100: + case "100": + case "ultralight": + return "ultraLight"; + case 200: + case "200": + return "ultraLight"; + case 300: + case "300": + case "light": + return "light"; + case 400: + case "400": + case "regular": + return "normal"; + case 500: + case "500": + case "medium": + return "medium"; + case 600: + case "600": + case "semibold": + return "semibold"; + case 700: + case "700": + return "semibold"; + case 800: + case "800": + return "bold"; + case 900: + case "900": + case "heavy": + return "heavy"; + default: + return "normal"; + } +} diff --git a/apps/mobile/package.json b/apps/mobile/package.json index 4b08a338e1..47efc95adb 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -34,12 +34,13 @@ "config:preview": "APP_VARIANT=preview expo config", "config:prod": "APP_VARIANT=production expo config", "profile:android:hermes": "mkdir -p profiles/review && react-native profile-hermes profiles/review", + "sync:pierre-icons": "node modules/t3-markdown-text/scripts/sync-pierre-file-icons.mjs", "test": "vp test run", "typecheck": "tsc --noEmit" }, "dependencies": { "@callstack/liquid-glass": "^0.7.1", - "@clerk/expo": "^3.3.0", + "@clerk/expo": "^3.4.1", "@effect/atom-react": "catalog:", "@expo-google-fonts/dm-sans": "^0.4.2", "@expo/ui": "~56.0.8", @@ -54,6 +55,7 @@ "@shikijs/themes": "3.23.0", "@t3tools/client-runtime": "workspace:*", "@t3tools/contracts": "workspace:*", + "@t3tools/mobile-markdown-text": "file:./modules/t3-markdown-text", "@t3tools/mobile-review-diff-native": "file:./modules/t3-review-diff", "@t3tools/mobile-terminal-native": "file:./modules/t3-terminal", "@t3tools/shared": "workspace:*", @@ -61,6 +63,7 @@ "diff": "8.0.3", "effect": "catalog:", "expo": "^56.0.0", + "expo-asset": "~56.0.15", "expo-auth-session": "~56.0.12", "expo-build-properties": "~56.0.15", "expo-camera": "~56.0.7", @@ -104,6 +107,7 @@ }, "devDependencies": { "@effect/vitest": "catalog:", + "@pierre/trees": "1.0.0-beta.4", "@types/react": "~19.2.0", "babel-preset-expo": "~56.0.0", "tailwindcss": "^4.0.0", diff --git a/apps/mobile/src/app/_layout.tsx b/apps/mobile/src/app/_layout.tsx index 136e141fdc..1583fdbb2d 100644 --- a/apps/mobile/src/app/_layout.tsx +++ b/apps/mobile/src/app/_layout.tsx @@ -5,7 +5,9 @@ import { DMSans_700Bold, useFonts, } from "@expo-google-fonts/dm-sans"; +import { usePathname } from "expo-router"; import Stack from "expo-router/stack"; +import { useCallback } from "react"; import { StatusBar, useColorScheme } from "react-native"; import { GestureHandlerRootView } from "react-native-gesture-handler"; import { KeyboardProvider } from "react-native-keyboard-controller"; @@ -21,15 +23,41 @@ import { import { RegistryContext } from "@effect/atom-react"; import { appAtomRegistry } from "../state/atom-registry"; import { CloudAuthProvider } from "../features/cloud/CloudAuthProvider"; +import { + ClerkSettingsSheetDetentProvider, + useClerkSettingsSheetDetent, +} from "../features/cloud/ClerkSettingsSheetDetent"; import { useAgentNotificationNavigation } from "../features/agent-awareness/notificationNavigation"; +import { useThemeColor } from "../lib/useThemeColor"; function AppNavigator() { + const pathname = usePathname(); + const clerkRouteIsActive = pathname === "/settings/auth"; + + return ( + + + + ); +} + +function AppNavigatorContent() { const { isLoadingSavedConnection } = useRemoteEnvironmentState(); + const { collapse, isExpanded } = useClerkSettingsSheetDetent(); const colorScheme = useColorScheme(); - const statusBarBg = colorScheme === "dark" ? "#0a0a0a" : "#f2f2f7"; + const statusBarBg = useThemeColor("--color-status-bar"); const sheetStyle = useResolveClassNames("bg-sheet"); useAgentNotificationNavigation(); + const handleSettingsTransitionEnd = useCallback( + (event: { data: { closing: boolean } }) => { + if (event.data.closing) { + collapse(); + } + }, + [collapse], + ); + const newTaskScreenOptions = { contentStyle: sheetStyle, gestureEnabled: true, @@ -50,7 +78,7 @@ function AppNavigator() { const settingsSheetScreenOptions = { ...connectionSheetScreenOptions, - sheetAllowedDetents: [0.7], + sheetAllowedDetents: isExpanded ? [0.92] : [0.7], }; if (isLoadingSavedConnection) { @@ -61,7 +89,7 @@ function AppNavigator() { <> @@ -74,7 +102,11 @@ function AppNavigator() { headerShadowVisible: false, }} /> - + @@ -54,7 +56,7 @@ export default function HomeRouteScreen() { diff --git a/apps/mobile/src/app/settings/_layout.tsx b/apps/mobile/src/app/settings/_layout.tsx index 087e07ba5f..86831d885f 100644 --- a/apps/mobile/src/app/settings/_layout.tsx +++ b/apps/mobile/src/app/settings/_layout.tsx @@ -1,16 +1,27 @@ import Stack from "expo-router/stack"; -import { useColorScheme } from "react-native"; +import { useCallback } from "react"; import { useResolveClassNames } from "uniwind"; +import { useClerkSettingsSheetDetent } from "../../features/cloud/ClerkSettingsSheetDetent"; +import { useThemeColor } from "../../lib/useThemeColor"; + export const unstable_settings = { anchor: "index", }; export default function SettingsLayout() { + const { collapse } = useClerkSettingsSheetDetent(); const contentStyle = useResolveClassNames("bg-sheet"); - const isDark = useColorScheme() === "dark"; - const sheetBg = isDark ? "rgba(14, 14, 14, 0.98)" : "rgba(242, 242, 247, 0.98)"; - const headerTint = isDark ? "#f5f5f5" : "#262626"; + const sheetBg = useThemeColor("--color-sheet"); + const headerTint = useThemeColor("--color-foreground"); + const handleClerkRouteTransitionEnd = useCallback( + (event: { data: { closing: boolean } }) => { + if (event.data.closing) { + collapse(); + } + }, + [collapse], + ); return ( + ); } diff --git a/apps/mobile/src/app/settings/auth.tsx b/apps/mobile/src/app/settings/auth.tsx new file mode 100644 index 0000000000..de33207ccd --- /dev/null +++ b/apps/mobile/src/app/settings/auth.tsx @@ -0,0 +1,33 @@ +import { useAuth } from "@clerk/expo"; +import { AuthView, UserProfileView } from "@clerk/expo/native"; +import { Redirect, Stack } from "expo-router"; +import { View } from "react-native"; + +import { hasCloudPublicConfig } from "../../features/cloud/publicConfig"; + +export default function SettingsAuthRouteScreen() { + return hasCloudPublicConfig() ? ( + + ) : ( + + ); +} + +function ConfiguredSettingsAuthRouteScreen() { + const { isLoaded, isSignedIn } = useAuth({ treatPendingAsSignedOut: false }); + + return ( + <> + + + {isLoaded ? ( + isSignedIn ? ( + + ) : ( + + ) + ) : null} + + + ); +} diff --git a/apps/mobile/src/app/settings/index.tsx b/apps/mobile/src/app/settings/index.tsx index 85d2699c76..c8b4cd4099 100644 --- a/apps/mobile/src/app/settings/index.tsx +++ b/apps/mobile/src/app/settings/index.tsx @@ -13,6 +13,7 @@ import { setLiveActivityUpdatesEnabled } from "../../features/agent-awareness/li import { requestAgentNotificationPermission } from "../../features/agent-awareness/notificationPermissions"; import { refreshAgentAwarenessRegistration } from "../../features/agent-awareness/remoteRegistration"; import { refreshManagedRelayEnvironments } from "../../features/cloud/managedRelayState"; +import { useClerkSettingsSheetDetent } from "../../features/cloud/ClerkSettingsSheetDetent"; import { hasCloudPublicConfig, resolveRelayClerkTokenOptions, @@ -66,6 +67,7 @@ function LocalSettingsRouteScreen() { function ConfiguredSettingsRouteScreen() { const insets = useSafeAreaInsets(); const { push } = useRouter(); + const { expand: expandClerkSheet } = useClerkSettingsSheetDetent(); const { getToken, isLoaded, isSignedIn } = useAuth({ treatPendingAsSignedOut: false }); const { user } = useUser(); const { savedConnectionsById } = useRemoteEnvironmentState(); @@ -265,11 +267,9 @@ function ConfiguredSettingsRouteScreen() { push("/settings/waitlist"); return; } - Alert.alert( - "T3 Cloud unavailable", - "Native T3 Cloud account management is not available in this build.", - ); - }, [isLoaded, isSignedIn, push]); + expandClerkSheet(); + push("/settings/auth"); + }, [expandClerkSheet, isLoaded, isSignedIn, push]); return ( @@ -335,7 +335,7 @@ type SymbolName = ComponentProps["name"]; function SettingsSection(props: { readonly title: string; readonly children: ReactNode }) { return ( - {props.title} + {props.title} { + if (isLoaded && isSignedIn) { + router.replace("/settings"); + } + }, [isLoaded, isSignedIn, router]), + ); return ( <> @@ -31,7 +43,12 @@ function ConfiguredSettingsWaitlistRouteScreen() { keyboardShouldPersistTaps="handled" showsVerticalScrollIndicator={false} > - void presentAuth()} /> + { + expand(); + router.push("/settings/auth"); + }} + /> ); diff --git a/apps/mobile/src/components/ComposerEditor.tsx b/apps/mobile/src/components/ComposerEditor.tsx new file mode 100644 index 0000000000..0c596e2923 --- /dev/null +++ b/apps/mobile/src/components/ComposerEditor.tsx @@ -0,0 +1,6 @@ +export { ComposerEditor } from "../native/T3ComposerEditor"; +export type { + ComposerEditorHandle, + ComposerEditorProps, + ComposerEditorSelection, +} from "../native/T3ComposerEditor"; diff --git a/apps/mobile/src/components/CopyTextButton.tsx b/apps/mobile/src/components/CopyTextButton.tsx new file mode 100644 index 0000000000..712b272a90 --- /dev/null +++ b/apps/mobile/src/components/CopyTextButton.tsx @@ -0,0 +1,68 @@ +import { SymbolView } from "expo-symbols"; +import { memo, useEffect, useRef, useState } from "react"; +import { Pressable, type ColorValue } from "react-native"; + +import { copyTextWithHaptic } from "../lib/copyTextWithHaptic"; + +const COPY_FEEDBACK_DURATION_MS = 1200; + +export const CopyTextButton = memo(function CopyTextButton(props: { + readonly accessibilityLabel: string; + readonly text: string; + readonly tintColor: ColorValue; + readonly copiedTintColor?: ColorValue; + readonly backgroundColor?: ColorValue; + readonly borderColor?: ColorValue; + readonly iconSize?: number; + readonly buttonSize?: number; +}) { + const [copied, setCopied] = useState(false); + const resetTimeoutRef = useRef | null>(null); + + useEffect( + () => () => { + if (resetTimeoutRef.current) { + clearTimeout(resetTimeoutRef.current); + } + }, + [], + ); + + return ( + { + copyTextWithHaptic(props.text); + setCopied(true); + if (resetTimeoutRef.current) { + clearTimeout(resetTimeoutRef.current); + } + resetTimeoutRef.current = setTimeout(() => { + setCopied(false); + resetTimeoutRef.current = null; + }, COPY_FEEDBACK_DURATION_MS); + }} + style={({ pressed }) => ({ + width: props.buttonSize ?? 30, + height: props.buttonSize ?? 30, + alignItems: "center", + justifyContent: "center", + borderRadius: 9, + borderWidth: props.borderColor ? 1 : 0, + borderColor: props.borderColor, + backgroundColor: props.backgroundColor, + opacity: pressed ? 0.52 : 1, + })} + > + + + ); +}); diff --git a/apps/mobile/src/components/GlassSafeAreaView.tsx b/apps/mobile/src/components/GlassSafeAreaView.tsx index f7cc49c368..836a7cffbd 100644 --- a/apps/mobile/src/components/GlassSafeAreaView.tsx +++ b/apps/mobile/src/components/GlassSafeAreaView.tsx @@ -1,6 +1,7 @@ import type { ReactNode } from "react"; -import { useColorScheme, View, type StyleProp, type ViewStyle } from "react-native"; +import { View, type StyleProp, type ViewStyle } from "react-native"; import { useSafeAreaInsets } from "react-native-safe-area-context"; +import { useThemeColor } from "../lib/useThemeColor"; import { GlassSurface } from "./GlassSurface"; @@ -17,14 +18,16 @@ export function GlassSafeAreaView({ rightSlot, style, }: GlassSafeAreaViewProps) { - const isDarkMode = useColorScheme() === "dark"; const insets = useSafeAreaInsets(); + const headerColor = useThemeColor("--color-header"); + const headerBorderColor = useThemeColor("--color-header-border"); + const glassTint = useThemeColor("--color-glass-tint"); const headerPaddingTop = insets.top + 16; const surfaceStyle = { borderRadius: 0, - backgroundColor: isDarkMode ? "rgba(10,10,10,0.97)" : "rgba(255,255,255,0.97)", + backgroundColor: headerColor, borderBottomWidth: 1, - borderBottomColor: isDarkMode ? "rgba(255,255,255,0.06)" : "rgba(0,0,0,0.06)", + borderBottomColor: headerBorderColor, } as const; return ( @@ -32,7 +35,7 @@ export function GlassSafeAreaView({ diff --git a/apps/mobile/src/components/PierreEntryIcon.tsx b/apps/mobile/src/components/PierreEntryIcon.tsx new file mode 100644 index 0000000000..15ea24331b --- /dev/null +++ b/apps/mobile/src/components/PierreEntryIcon.tsx @@ -0,0 +1,25 @@ +import { SymbolView } from "expo-symbols"; +import { Image, type ImageStyle, type StyleProp } from "react-native"; + +import { markdownFileIconSource } from "@t3tools/mobile-markdown-text/file-icons"; +import { resolveMarkdownFileIcon } from "@t3tools/mobile-markdown-text/links"; + +export function PierreEntryIcon(props: { + readonly path: string; + readonly kind: "file" | "directory"; + readonly size?: number; + readonly style?: StyleProp; +}) { + const size = props.size ?? 16; + if (props.kind === "directory") { + return ; + } + + return ( + + ); +} diff --git a/apps/mobile/src/components/ProviderIcon.tsx b/apps/mobile/src/components/ProviderIcon.tsx index d62f8d9a4b..6c1b103869 100644 --- a/apps/mobile/src/components/ProviderIcon.tsx +++ b/apps/mobile/src/components/ProviderIcon.tsx @@ -24,7 +24,7 @@ export function ProviderIcon(props: ProviderIconProps) { return ( diff --git a/apps/mobile/src/features/cloud/ClerkSettingsSheetDetent.tsx b/apps/mobile/src/features/cloud/ClerkSettingsSheetDetent.tsx new file mode 100644 index 0000000000..8bd51b8518 --- /dev/null +++ b/apps/mobile/src/features/cloud/ClerkSettingsSheetDetent.tsx @@ -0,0 +1,44 @@ +import { + createContext, + type PropsWithChildren, + useCallback, + useContext, + useMemo, + useState, +} from "react"; + +interface ClerkSettingsSheetDetentValue { + collapse: () => void; + expand: () => void; + isExpanded: boolean; +} + +const ClerkSettingsSheetDetentContext = createContext(null); + +interface ClerkSettingsSheetDetentProviderProps extends PropsWithChildren { + initiallyExpanded: boolean; +} + +export function ClerkSettingsSheetDetentProvider({ + children, + initiallyExpanded, +}: ClerkSettingsSheetDetentProviderProps) { + const [isExpanded, setIsExpanded] = useState(initiallyExpanded); + const collapse = useCallback(() => setIsExpanded(false), []); + const expand = useCallback(() => setIsExpanded(true), []); + const value = useMemo(() => ({ collapse, expand, isExpanded }), [collapse, expand, isExpanded]); + + return ( + {children} + ); +} + +export function useClerkSettingsSheetDetent(): ClerkSettingsSheetDetentValue { + const value = useContext(ClerkSettingsSheetDetentContext); + if (!value) { + throw new Error( + "useClerkSettingsSheetDetent must be used inside ClerkSettingsSheetDetentProvider", + ); + } + return value; +} diff --git a/apps/mobile/src/features/cloud/useNativeClerkAuthModal.ts b/apps/mobile/src/features/cloud/useNativeClerkAuthModal.ts deleted file mode 100644 index 3356642776..0000000000 --- a/apps/mobile/src/features/cloud/useNativeClerkAuthModal.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { getClerkInstance } from "@clerk/expo"; -import { tokenCache } from "@clerk/expo/token-cache"; -import * as Data from "effect/Data"; -import { useCallback, useRef } from "react"; -import type { TurboModule } from "react-native"; -import { TurboModuleRegistry } from "react-native"; - -const CLERK_CLIENT_JWT_KEY = "__clerk_client_jwt"; - -interface NativeClerkModule extends TurboModule { - readonly getClientToken?: () => Promise; - readonly presentAuth?: (options: { - readonly dismissable: boolean; - readonly mode: "signInOrUp"; - }) => Promise; -} - -interface NativeAuthResult { - readonly cancelled?: boolean; - readonly session?: { - readonly id?: string; - }; - readonly sessionId?: string; -} - -interface ClerkWithNativeSync { - readonly __internal_reloadInitialResources?: () => Promise; - readonly setActive?: (params: { readonly session: string }) => Promise; -} - -const NativeClerk = TurboModuleRegistry.get("ClerkExpo"); - -class NativeClerkAuthError extends Data.TaggedError("NativeClerkAuthError")<{ - readonly message: string; - readonly cause?: unknown; -}> {} - -async function syncNativeSession(sessionId: string): Promise { - const getClientToken = NativeClerk?.getClientToken; - let nativeClientToken: string | null = null; - if (getClientToken) { - try { - nativeClientToken = await getClientToken(); - } catch (cause) { - throw new NativeClerkAuthError({ - message: "Could not read native Clerk client token.", - cause, - }); - } - } - if (nativeClientToken) { - const saveToken = tokenCache?.saveToken; - if (saveToken) { - try { - await saveToken(CLERK_CLIENT_JWT_KEY, nativeClientToken); - } catch (cause) { - throw new NativeClerkAuthError({ - message: "Could not save native Clerk client token.", - cause, - }); - } - } - } - - const clerk = getClerkInstance(); - const clerkWithNativeSync = clerk as ClerkWithNativeSync; - const reloadInitialResources = clerkWithNativeSync.__internal_reloadInitialResources; - if (reloadInitialResources) { - try { - await reloadInitialResources(); - } catch (cause) { - throw new NativeClerkAuthError({ - message: "Could not reload Clerk resources after native auth.", - cause, - }); - } - } - const setActive = clerkWithNativeSync.setActive; - if (setActive) { - try { - await setActive({ session: sessionId }); - } catch (cause) { - throw new NativeClerkAuthError({ - message: "Could not activate native Clerk session.", - cause, - }); - } - } -} - -export function useNativeClerkAuthModal() { - const presentingRef = useRef(false); - - const presentAuth = useCallback(async (): Promise => { - if (presentingRef.current || !NativeClerk?.presentAuth) { - return; - } - - presentingRef.current = true; - const presentNativeAuth = NativeClerk.presentAuth; - try { - // Clerk's iOS AuthView is not inline. It presents this same native modal - // internally; call the presenter directly so Expo Router does not render - // an empty formSheet behind it. - let result: NativeAuthResult | null; - try { - result = await presentNativeAuth({ - dismissable: true, - mode: "signInOrUp", - }); - } catch (cause) { - throw new NativeClerkAuthError({ - message: "Native Clerk auth presentation failed.", - cause, - }); - } - const sessionId = result?.sessionId ?? result?.session?.id ?? null; - if (sessionId && !result?.cancelled) { - await syncNativeSession(sessionId); - } - } catch (error) { - if (__DEV__) { - console.error("[useNativeClerkAuthModal] presentAuth failed:", error); - } - } finally { - presentingRef.current = false; - } - }, []); - - return { - isAvailable: !!NativeClerk?.presentAuth, - presentAuth, - }; -} diff --git a/apps/mobile/src/features/home/HomeScreen.tsx b/apps/mobile/src/features/home/HomeScreen.tsx index 00e4582957..cdae41668a 100644 --- a/apps/mobile/src/features/home/HomeScreen.tsx +++ b/apps/mobile/src/features/home/HomeScreen.tsx @@ -146,8 +146,8 @@ function ProjectGroupLabel(props: { bearerToken={props.bearerToken} /> {props.project.title} @@ -156,8 +156,8 @@ function ProjectGroupLabel(props: { {hiddenCount > 0 ? ( {props.isExpanded ? "Show less" : `${hiddenCount} more`} @@ -191,6 +191,7 @@ function ThreadRow(props: { readonly isLast: boolean; }) { const separatorColor = useThemeColor("--color-separator"); + const iconSubtleColor = useThemeColor("--color-icon-subtle"); const { bg, fg } = statusColors(props.thread); const tone = threadStatusTone(props.thread); const timestamp = relativeTime(props.thread.updatedAt ?? props.thread.createdAt); @@ -267,7 +268,7 @@ function ThreadRow(props: { { }, ).pipe(Layer.provide(remoteHttpClientLayer(fetchFn))); const tracedApplication = Layer.effectDiscard( - Effect.void.pipe(Effect.withSpan("mobile.test.span")), + Effect.void.pipe(Effect.withSpan("mobile.test.span"), withRelayClientTracing), ).pipe(Layer.provide(tracingLayer)); return Effect.gen(function* () { diff --git a/apps/mobile/src/features/observability/mobileTracing.ts b/apps/mobile/src/features/observability/mobileTracing.ts index 32f3d9f94c..dfc6f875c1 100644 --- a/apps/mobile/src/features/observability/mobileTracing.ts +++ b/apps/mobile/src/features/observability/mobileTracing.ts @@ -1,7 +1,5 @@ import Constants from "expo-constants"; -import * as Layer from "effect/Layer"; -import type { HttpClient } from "effect/unstable/http"; -import { OtlpSerialization, OtlpTracer } from "effect/unstable/observability"; +import { makeRelayClientTracingLayer } from "@t3tools/shared/relayTracing"; import { hasMobileTracingPublicConfig, resolveCloudPublicConfig } from "../cloud/publicConfig"; @@ -28,27 +26,13 @@ export function resolveMobileTracingConfig(): MobileTracingConfig | null { export function makeMobileTracingLayer( config: MobileTracingConfig | null, resource: MobileTracingResource, -): Layer.Layer { - if (config === null) { - return Layer.empty; - } - - return OtlpTracer.layer({ - url: config.tracesUrl, - headers: { - Authorization: `Bearer ${config.tracesToken}`, - "X-Axiom-Dataset": config.tracesDataset, - }, - resource: { - serviceName: "t3-mobile", - serviceVersion: resource.serviceVersion, - attributes: { - "service.runtime": "react-native", - "service.component": "mobile", - "deployment.environment.name": resource.appVariant, - }, - }, - }).pipe(Layer.provide(OtlpSerialization.layerJson)); +) { + return makeRelayClientTracingLayer(config, { + serviceName: "t3-mobile-relay-client", + serviceVersion: resource.serviceVersion, + runtime: "react-native", + client: `mobile-${resource.appVariant}`, + }); } export const mobileTracingLayer = makeMobileTracingLayer(resolveMobileTracingConfig(), { diff --git a/apps/mobile/src/features/review/shikiReviewHighlighter.test.ts b/apps/mobile/src/features/review/shikiReviewHighlighter.test.ts index fedf6e10b9..0bc6469426 100644 --- a/apps/mobile/src/features/review/shikiReviewHighlighter.test.ts +++ b/apps/mobile/src/features/review/shikiReviewHighlighter.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from "vite-plus/test"; import type { ReviewRenderableFile } from "./reviewModel"; -import { highlightReviewFile } from "./shikiReviewHighlighter"; +import { highlightCodeSnippet, highlightReviewFile } from "./shikiReviewHighlighter"; function makeRenderableFile( input: Partial & Pick, @@ -119,3 +119,22 @@ describe("highlightReviewFile", () => { ]); }); }); + +describe("highlightCodeSnippet", () => { + it("resolves language aliases and returns syntax-colored tokens", async () => { + const source = "const answer: number = 42;"; + const highlighted = await highlightCodeSnippet({ + code: source, + language: "ts", + theme: "dark", + }); + + expect( + highlighted + .flat() + .map((token) => token.content) + .join(""), + ).toBe(source); + expect(highlighted.flat().some((token) => token.color !== null)).toBe(true); + }); +}); diff --git a/apps/mobile/src/features/review/shikiReviewHighlighter.ts b/apps/mobile/src/features/review/shikiReviewHighlighter.ts index 8e254fbb0b..d6d09221da 100644 --- a/apps/mobile/src/features/review/shikiReviewHighlighter.ts +++ b/apps/mobile/src/features/review/shikiReviewHighlighter.ts @@ -685,6 +685,16 @@ async function highlightLines( return highlightedLines; } +export async function highlightCodeSnippet(input: { + readonly code: string; + readonly language?: string | null; + readonly theme: ReviewDiffTheme; +}): Promise>> { + const languageHint = input.language?.trim() || "text"; + const language = await resolveLanguageFromPath(`snippet.${languageHint}`, languageHint); + return highlightLines(input.code, language, SHIKI_THEME_NAME_BY_SCHEME[input.theme]); +} + async function highlightPatchLinesInChunks(input: { readonly lines: ReadonlyArray; readonly language: string; diff --git a/apps/mobile/src/features/threads/ComposerCommandPopover.tsx b/apps/mobile/src/features/threads/ComposerCommandPopover.tsx index 08746eb74e..1b652a139c 100644 --- a/apps/mobile/src/features/threads/ComposerCommandPopover.tsx +++ b/apps/mobile/src/features/threads/ComposerCommandPopover.tsx @@ -6,6 +6,7 @@ import { memo } from "react"; import { Pressable, ScrollView, useColorScheme, View, type ViewStyle } from "react-native"; import { AppText as Text } from "../../components/AppText"; +import { PierreEntryIcon } from "../../components/PierreEntryIcon"; export type ComposerCommandItem = | { @@ -88,13 +89,13 @@ function PopoverSurface(props: { function itemIcon(item: ComposerCommandItem) { switch (item.type) { - case "path": - return item.kind === "directory" ? ("folder" as const) : ("doc" as const); case "slash-command": case "provider-slash-command": return "terminal" as const; case "skill": return "cube" as const; + case "path": + return null; } } @@ -149,7 +150,11 @@ const CommandRow = memo(function CommandRow(props: { borderBottomColor: "rgba(255,255,255,0.1)", })} > - + {props.item.type === "path" ? ( + + ) : iconName ? ( + + ) : null} state.isVisible); const controlsBottomPadding = isKeyboardVisible ? 8 : Math.max(insets.bottom, 10); const { logicalProjects, selectedProject, setProject } = flow; - const promptInputRef = useRef(null); + const promptInputRef = useRef(null); const borderColor = useThemeColor("--color-border"); const sheetFadeOpaque = colorScheme === "dark" ? "rgba(14,14,14,0.98)" : "rgba(242,242,247,0.98)"; @@ -410,10 +403,6 @@ export function NewTaskDraftScreen(props: { [flow], ); - const handleNativePaste = useNativePaste((uris) => { - void handleNativePasteImages(uris); - }); - async function handleStart(): Promise { if ( !flow.selectedProject || @@ -478,23 +467,19 @@ export function NewTaskDraftScreen(props: { - void handleNativePaste(payload)} + void handleNativePasteImages(uris)} + placeholder={`Describe a coding task in ${selectedProject.title}`} style={{ flex: 1, minHeight: 0 }} - > - - + textStyle={{ fontSize: 18, lineHeight: 28 }} + /> ; @@ -87,6 +74,7 @@ export interface ThreadComposerProps { readonly activeThreadBusy: boolean; readonly environmentId: EnvironmentId; readonly projectCwd: string | null; + readonly editorRef?: RefObject; readonly onChangeDraftMessage: (value: string) => void; readonly onPickDraftImages: () => Promise; readonly onNativePasteImages: (uris: ReadonlyArray) => Promise; @@ -156,10 +144,9 @@ function formatTitleCase(value: string): string { export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposerProps) { const isDarkMode = useColorScheme() === "dark"; - const themePlaceholderColor = useThemeColor("--color-placeholder"); - const placeholderColor = isDarkMode ? "#a1a1aa" : themePlaceholderColor; const foregroundColor = useThemeColor("--color-foreground"); - const inputRef = useRef(null); + const fallbackInputRef = useRef(null); + const inputRef = props.editorRef ?? fallbackInputRef; const [isFocused, setIsFocused] = useState(false); const wasExpandedBeforePreviewRef = useRef(false); const { onExpandedChange } = props; @@ -182,11 +169,17 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer if (wasExpandedBeforePreviewRef.current) { setTimeout(() => inputRef.current?.focus(), 100); } - }, []); + }, [inputRef]); - useEffect(() => { - onExpandedChange?.(isExpanded); - }, [isExpanded, onExpandedChange]); + const handleFocus = useCallback(() => { + setIsFocused(true); + onExpandedChange?.(true); + }, [onExpandedChange]); + + const handleBlur = useCallback(() => { + setIsFocused(false); + onExpandedChange?.(false); + }, [onExpandedChange]); const showStopAction = props.selectedThread.session?.status === "running" || props.selectedThread.session?.status === "starting" || @@ -219,26 +212,33 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer selectedProviderDriver === "claudeAgent" ? (getModelSelectionStringOptionValue(currentModelSelection, "contextWindow") ?? "1M") : "1M"; - - const handleNativePaste = useNativePaste((uris) => { - void props.onNativePasteImages(uris); - }); - // ── Trigger detection ──────────────────────────────────── - const [cursorPosition, setCursorPosition] = useState(0); + const [composerSelection, setComposerSelection] = useState(() => ({ + start: props.draftMessage.length, + end: props.draftMessage.length, + })); - const handleSelectionChange = useCallback( - (event: NativeSyntheticEvent) => { - const { start } = event.nativeEvent.selection; - setCursorPosition(start); - }, - [], - ); + const handleSelectionChange = useCallback((selection: ComposerEditorSelection) => { + setComposerSelection(selection); + }, []); + useEffect(() => { + const end = props.draftMessage.length; + setComposerSelection((selection) => { + const start = Math.min(selection.start, end); + const selectionEnd = Math.min(selection.end, end); + if (start === selection.start && selectionEnd === selection.end) { + return selection; + } + return { start, end: selectionEnd }; + }); + }, [props.draftMessage.length]); - const composerTrigger = useMemo( - () => detectComposerTrigger(props.draftMessage, cursorPosition), - [cursorPosition, props.draftMessage], - ); + const composerTrigger = useMemo(() => { + if (composerSelection.start !== composerSelection.end) { + return null; + } + return detectComposerTrigger(props.draftMessage, composerSelection.end); + }, [composerSelection, props.draftMessage]); const pathSearch = useComposerPathSearch({ environmentId: props.environmentId, cwd: composerTrigger?.kind === "path" ? props.projectCwd : null, @@ -411,7 +411,7 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer composerTrigger.rangeEnd, "", ); - setCursorPosition(result.cursor); + setComposerSelection({ start: result.cursor, end: result.cursor }); onChangeDraftMessage(result.text); void onUpdateInteractionMode(item.command); return; @@ -434,7 +434,7 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer composerTrigger.rangeEnd, replacement, ); - setCursorPosition(result.cursor); + setComposerSelection({ start: result.cursor, end: result.cursor }); onChangeDraftMessage(result.text); }, [composerTrigger, draftMessage, onChangeDraftMessage, onUpdateInteractionMode], @@ -624,8 +624,8 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer - - setIsFocused(true)} - onBlur={() => setIsFocused(false)} - textAlignVertical={isExpanded ? "top" : "center"} - style={ - isExpanded - ? { - minHeight: 80, - maxHeight: 160, - paddingHorizontal: 4, - paddingVertical: 4, - fontSize: 15, - lineHeight: 22, - color: foregroundColor, - fontFamily: "DMSans_400Regular", - } - : { - maxHeight: 36, - paddingVertical: 6, - fontSize: 15, - lineHeight: 20, - color: foregroundColor, - fontFamily: "DMSans_400Regular", - } - } - /> - + void props.onNativePasteImages(uris)} + placeholder={props.placeholder} + onFocus={handleFocus} + onBlur={handleBlur} + scrollEnabled={isExpanded} + contentInsetVertical={isExpanded ? 0 : 6} + style={ + isExpanded + ? { + minHeight: 80, + maxHeight: 160, + paddingHorizontal: 4, + paddingVertical: 4, + } + : { + height: 36, + } + } + textStyle={{ + fontSize: 15, + lineHeight: isExpanded ? 22 : 20, + color: foregroundColor, + fontFamily: "DMSans_400Regular", + }} + /> {!isExpanded && props.draftAttachments.length > 0 ? ( diff --git a/apps/mobile/src/features/threads/ThreadDetailScreen.tsx b/apps/mobile/src/features/threads/ThreadDetailScreen.tsx index 8e6050418f..d035f6eb90 100644 --- a/apps/mobile/src/features/threads/ThreadDetailScreen.tsx +++ b/apps/mobile/src/features/threads/ThreadDetailScreen.tsx @@ -11,17 +11,20 @@ import type { } from "@t3tools/contracts"; import { formatElapsed } from "@t3tools/shared/orchestrationTiming"; import * as Haptics from "expo-haptics"; +import { useHeaderHeight } from "expo-router/build/react-navigation/elements"; import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react"; -import { View, type LayoutChangeEvent } from "react-native"; +import { View, type GestureResponderEvent, type LayoutChangeEvent } from "react-native"; import { Gesture, GestureDetector } from "react-native-gesture-handler"; import { KeyboardStickyView } from "react-native-keyboard-controller"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import { runOnJS } from "react-native-reanimated"; import { AppText as Text } from "../../components/AppText"; +import type { ComposerEditorHandle } from "../../components/ComposerEditor"; import type { StatusTone } from "../../components/StatusPill"; import type { DraftComposerImageAttachment } from "../../lib/composerImages"; import type { MobileLayoutVariant } from "../../lib/mobileLayout"; +import { resolveThreadFeedBottomInset } from "../../lib/threadFeedLayout"; import type { PendingApproval, PendingUserInput, @@ -33,7 +36,6 @@ import { PendingUserInputCard } from "./PendingUserInputCard"; import { COMPOSER_COLLAPSED_CHROME, COMPOSER_EXPANDED_CHROME, - COMPOSER_EXPANDED_TOOLBAR_CHROME, ThreadComposer, } from "./ThreadComposer"; import { ThreadFeed } from "./ThreadFeed"; @@ -200,7 +202,10 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread const { onOpenDrawer } = props; const insets = useSafeAreaInsets(); + const headerHeight = useHeaderHeight(); const agentLabel = `${props.selectedThread.modelSelection.instanceId} agent`; + const composerRef = useRef(null); + const feedTouchStartRef = useRef<{ pageX: number; pageY: number } | null>(null); const [composerExpanded, setComposerExpanded] = useState(false); const composerBottomInset = composerExpanded ? 0 : Math.max(insets.bottom, 12); const composerChrome = composerExpanded ? COMPOSER_EXPANDED_CHROME : COMPOSER_COLLAPSED_CHROME; @@ -211,10 +216,19 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread const showContent = props.showContent ?? true; const layoutVariant = props.layoutVariant ?? "compact"; const isSplitLayout = layoutVariant === "split"; + const selectedInstanceId = props.selectedThread.modelSelection.instanceId; useStreamingHaptics(props.selectedThread.id, props.selectedThreadFeed); - const expandedToolbarInset = composerExpanded ? COMPOSER_EXPANDED_TOOLBAR_CHROME : 0; - const feedBottomInset = - Math.max(estimatedOverlayHeight, measuredOverlayHeight) + expandedToolbarInset + 8; + const feedBottomInset = resolveThreadFeedBottomInset({ + estimatedOverlayHeight, + measuredOverlayHeight, + gap: 8, + }); + const selectedProviderSkills = useMemo( + () => + props.serverConfig?.providers.find((provider) => provider.instanceId === selectedInstanceId) + ?.skills ?? [], + [props.serverConfig, selectedInstanceId], + ); const completeDrawerGesture = useCallback(() => { void Haptics.selectionAsync(); @@ -245,20 +259,66 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread ); }, []); + const collapseComposer = useCallback(() => { + composerRef.current?.blur(); + }, []); + + const handleFeedTouchStart = useCallback((event: GestureResponderEvent) => { + feedTouchStartRef.current = { + pageX: event.nativeEvent.pageX, + pageY: event.nativeEvent.pageY, + }; + }, []); + + const handleFeedTouchMove = useCallback((event: GestureResponderEvent) => { + const start = feedTouchStartRef.current; + if (!start) { + return; + } + const deltaX = event.nativeEvent.pageX - start.pageX; + const deltaY = event.nativeEvent.pageY - start.pageY; + if (Math.hypot(deltaX, deltaY) > 8) { + feedTouchStartRef.current = null; + } + }, []); + + const handleFeedTouchEnd = useCallback(() => { + if (feedTouchStartRef.current) { + collapseComposer(); + } + feedTouchStartRef.current = null; + }, [collapseComposer]); + + const handleFeedTouchCancel = useCallback(() => { + feedTouchStartRef.current = null; + }, []); + return ( {showContent ? ( - + + + ) : ( )} @@ -298,6 +358,7 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread ) : null} ; readonly httpBaseUrl: string | null; readonly bearerToken: string | null; readonly agentLabel: string; + readonly latestTurn: ThreadFeedLatestTurn | null; + readonly contentTopInset?: number; readonly contentBottomInset?: number; readonly layoutVariant?: MobileLayoutVariant; readonly composerExpanded?: boolean; + readonly skills?: ReadonlyArray; } function stripShellWrapper(value: string): string { @@ -75,34 +109,48 @@ function compactActivityDetail(detail: string | null): string | null { } function buildActivityRows( - activities: ReadonlyArray<{ - readonly id: string; - readonly createdAt: string; - readonly summary: string; - readonly detail: string | null; - readonly status: string | null; - }>, + activities: Extract["activities"], ) { - return activities.map<{ - id: string; - createdAt: string; - summary: string; - detail: string | null; - status: string | null; - }>((activity) => ({ - id: activity.id, - createdAt: activity.createdAt, - summary: activity.summary, + return activities.map((activity) => ({ + ...activity, detail: compactActivityDetail(activity.detail), - status: activity.status, })); } -const MAX_VISIBLE_WORK_LOG_ENTRIES = 6; +const MAX_VISIBLE_WORK_LOG_ENTRIES = 1; -function toMarkdownThemeColor(value: ColorValue): string { - return value as string; -} +const MARKDOWN_COLORS = { + light: { + body: "#111111", + strong: "#000000", + link: "#2563eb", + blockquoteBorder: "rgba(0, 0, 0, 0.08)", + blockquoteBackground: "rgba(0, 0, 0, 0.02)", + codeBackground: "rgba(0, 0, 0, 0.04)", + codeText: "#262626", + horizontalRule: "rgba(0, 0, 0, 0.08)", + userBody: "#ffffff", + userCodeBackground: "rgba(255, 255, 255, 0.22)", + userCodeText: "#ffffff", + userFenceBackground: "rgba(0, 0, 0, 0.16)", + userFenceText: "#ffffff", + }, + dark: { + body: "#e5e5e5", + strong: "#f5f5f5", + link: "#60a5fa", + blockquoteBorder: "rgba(255, 255, 255, 0.1)", + blockquoteBackground: "rgba(255, 255, 255, 0.03)", + codeBackground: "rgba(255, 255, 255, 0.06)", + codeText: "#e5e5e5", + horizontalRule: "rgba(255, 255, 255, 0.08)", + userBody: "#ffffff", + userCodeBackground: "rgba(255, 255, 255, 0.18)", + userCodeText: "#ffffff", + userFenceBackground: "rgba(0, 0, 0, 0.28)", + userFenceText: "#ffffff", + }, +} as const; interface MarkdownStyleSets { readonly user: MarkdownStyleSet; @@ -113,6 +161,7 @@ interface MarkdownStyleSet { readonly theme: PartialMarkdownTheme; readonly styles: NodeStyleOverrides; readonly renderers: CustomRenderers; + readonly nativeTextStyle: NativeMarkdownTextStyle; } interface ReviewCommentColors { @@ -124,6 +173,70 @@ interface ReviewCommentColors { readonly codeBackground: ColorValue; } +const failedMarkdownFaviconHosts = new Set(); +const markdownLinkStyles = StyleSheet.create({ + favicon: { + width: 14, + height: 14, + borderRadius: 3, + marginHorizontal: 3, + transform: [{ translateY: 2 }], + }, + file: { + borderRadius: 5, + borderWidth: StyleSheet.hairlineWidth, + fontFamily: "DMSans_500Medium", + fontSize: 13, + lineHeight: 20, + paddingHorizontal: 6, + paddingVertical: 2, + }, + fileIcon: { + width: 15, + height: 15, + marginRight: 4, + transform: [{ translateY: 2 }], + }, +}); + +const MarkdownExternalLink = memo(function MarkdownExternalLink(props: { + readonly children: ReactNode; + readonly color: string; + readonly host: string; + readonly href: string; +}) { + const [failed, setFailed] = useState(() => failedMarkdownFaviconHosts.has(props.host)); + + return ( + { + void Linking.openURL(props.href); + }} + style={{ + color: props.color, + fontFamily: "DMSans_400Regular", + textDecorationLine: "none", + }} + > + {!failed ? ( + { + failedMarkdownFaviconHosts.add(props.host); + setFailed(true); + }} + /> + ) : ( + {" ◉ "} + )} + {props.children} + + ); +}); + function useReviewCommentColors(): ReviewCommentColors { const colorScheme = useColorScheme(); const isDark = colorScheme === "dark"; @@ -148,34 +261,26 @@ function useReviewCommentColors(): ReviewCommentColors { } function useMarkdownStyles(): MarkdownStyleSets { - const bodyColor = useThemeColor("--color-md-body"); - const strongColor = useThemeColor("--color-md-strong"); - const linkColor = useThemeColor("--color-md-link"); - const blockquoteBg = useThemeColor("--color-md-blockquote-bg"); - const blockquoteBorder = useThemeColor("--color-md-blockquote-border"); - const codeBg = useThemeColor("--color-md-code-bg"); - const codeText = useThemeColor("--color-md-code-text"); - const hrColor = useThemeColor("--color-md-hr"); - const userBodyColor = useThemeColor("--color-user-bubble-foreground"); - const userCodeBg = useThemeColor("--color-md-user-code-bg"); - const userCodeText = useThemeColor("--color-md-user-code-text"); - const userFenceBg = useThemeColor("--color-md-user-fence-bg"); - const userFenceText = useThemeColor("--color-md-user-fence-text"); + const colorScheme = useColorScheme(); + const colors = MARKDOWN_COLORS[colorScheme === "dark" ? "dark" : "light"]; + const inlineChipBackground = String(useThemeColor("--color-subtle")); + const inlineSkillBackground = String(useThemeColor("--color-inline-skill-background")); + const inlineSkillForeground = String(useThemeColor("--color-inline-skill-foreground")); return useMemo(() => { - const markdownBodyColor = toMarkdownThemeColor(bodyColor); - const markdownStrongColor = toMarkdownThemeColor(strongColor); - const markdownLinkColor = toMarkdownThemeColor(linkColor); - const markdownBlockquoteBg = toMarkdownThemeColor(blockquoteBg); - const markdownBlockquoteBorder = toMarkdownThemeColor(blockquoteBorder); - const markdownCodeBg = toMarkdownThemeColor(codeBg); - const markdownCodeText = toMarkdownThemeColor(codeText); - const markdownHrColor = toMarkdownThemeColor(hrColor); - const markdownUserBodyColor = toMarkdownThemeColor(userBodyColor); - const markdownUserCodeBg = toMarkdownThemeColor(userCodeBg); - const markdownUserCodeText = toMarkdownThemeColor(userCodeText); - const markdownUserFenceBg = toMarkdownThemeColor(userFenceBg); - const markdownUserFenceText = toMarkdownThemeColor(userFenceText); + const markdownBodyColor = colors.body; + const markdownStrongColor = colors.strong; + const markdownLinkColor = colors.link; + const markdownBlockquoteBg = colors.blockquoteBackground; + const markdownBlockquoteBorder = colors.blockquoteBorder; + const markdownCodeBg = colors.codeBackground; + const markdownCodeText = colors.codeText; + const markdownHrColor = colors.horizontalRule; + const markdownUserBodyColor = colors.userBody; + const markdownUserCodeBg = colors.userCodeBackground; + const markdownUserCodeText = colors.userCodeText; + const markdownUserFenceBg = colors.userFenceBackground; + const markdownUserFenceText = colors.userFenceText; const baseTheme: PartialMarkdownTheme = { colors: { @@ -202,12 +307,12 @@ function useMarkdownStyles(): MarkdownStyleSets { fontSizes: { s: 13, m: 15, - h1: 22, - h2: 19, - h3: 17, - h4: 15, - h5: 15, - h6: 15, + h1: 20, + h2: 18, + h3: 16, + h4: 14, + h5: 14, + h6: 14, }, fontFamilies: { regular: "DMSans_400Regular", @@ -225,8 +330,8 @@ function useMarkdownStyles(): MarkdownStyleSets { const baseStyles: NodeStyleOverrides = { document: { flexShrink: 1 }, - paragraph: { marginTop: 0, marginBottom: 8 }, - list: { marginTop: 4, marginBottom: 4 }, + paragraph: { marginTop: 0, marginBottom: 10 }, + list: { marginTop: 4, marginBottom: 8 }, list_item: { marginTop: 0, marginBottom: 4 }, task_list_item: { marginTop: 0, marginBottom: 4 }, text: { lineHeight: 22 }, @@ -241,20 +346,18 @@ function useMarkdownStyles(): MarkdownStyleSets { textDecorationLine: "underline" as const, }, blockquote: { - borderLeftWidth: 3, + borderLeftWidth: 2, borderLeftColor: markdownBlockquoteBorder, - backgroundColor: markdownBlockquoteBg, - paddingLeft: 12, - paddingVertical: 6, + paddingLeft: 11, + paddingVertical: 2, marginLeft: 0, - marginVertical: 4, - borderRadius: 4, + marginVertical: 10, }, heading: { fontFamily: "DMSans_700Bold", color: markdownStrongColor, - marginTop: 12, - marginBottom: 6, + marginTop: 18, + marginBottom: 8, }, horizontal_rule: { backgroundColor: markdownHrColor, @@ -263,44 +366,173 @@ function useMarkdownStyles(): MarkdownStyleSets { }, }; - const createCodeRenderers = ( + const createMarkdownRenderers = ( inlineBackgroundColor: string, inlineTextColor: string, blockBackgroundColor: string, blockTextColor: string, ): CustomRenderers => ({ - code_inline: ({ content }) => ( - - {content} - + link: ({ children, href = "" }) => { + const presentation = resolveMarkdownLinkPresentation(href); + if (presentation.kind === "file") { + return ( + + + {presentation.label} + + ); + } + if (presentation.kind === "external") { + return ( + + {children} + + ); + } + const linkHref = presentation.href; + return ( + { + void Linking.openURL(linkHref); + } + : undefined + } + style={{ + color: markdownLinkColor, + textDecorationLine: "underline", + }} + > + {children} + + ); + }, + list: ({ node, Renderer, ordered = false, start = 1 }) => ( + + {node.children?.map((child, index) => { + const childKey = `${child.type}:${child.beg ?? "unknown"}:${child.end ?? "unknown"}`; + if (child.type === "task_list_item") { + return ( + + ); + } + return ( + + + {ordered ? `${start + index}.` : "•"} + + + + + + ); + })} + ), - code_block: ({ content }) => ( + code_inline: ({ content }) => { + const value = content ?? ""; + const wrapsPoorly = + value.length > 24 || value.includes("/") || value.includes("\\") || value.includes(":"); + return ( + + {value} + + ); + }, + code_block: ({ content, language }) => ( - + {language ? ( + + + {language} + + + ) : null} + {content} @@ -333,6 +565,8 @@ function useMarkdownStyles(): MarkdownStyleSets { heading: { ...baseStyles.heading, color: markdownUserBodyColor, + marginTop: 8, + marginBottom: 4, }, link: { color: markdownUserBodyColor, @@ -357,48 +591,79 @@ function useMarkdownStyles(): MarkdownStyleSets { user: { theme: userTheme, styles: userStyles, - renderers: createCodeRenderers( + renderers: createMarkdownRenderers( markdownUserCodeBg, markdownUserCodeText, markdownUserFenceBg, markdownUserFenceText, ), + nativeTextStyle: { + color: markdownUserBodyColor, + strongColor: markdownUserBodyColor, + mutedColor: markdownUserBodyColor, + linkColor: markdownUserBodyColor, + codeColor: markdownUserCodeText, + codeBackgroundColor: markdownUserCodeBg, + codeBlockBackgroundColor: markdownUserFenceBg, + fileBackgroundColor: "rgba(255, 255, 255, 0.12)", + fileTextColor: "#ffffff", + skillBackgroundColor: "rgba(217, 70, 239, 0.24)", + skillTextColor: "#ffffff", + quoteMarkerColor: markdownUserBodyColor, + dividerColor: markdownUserBodyColor, + fontSize: 15, + lineHeight: 22, + fontFamily: "DMSans_400Regular", + headingFontFamily: "DMSans_700Bold", + boldFontFamily: "DMSans_700Bold", + }, }, assistant: { theme: assistantTheme, styles: assistantStyles, - renderers: createCodeRenderers( + renderers: createMarkdownRenderers( markdownCodeBg, markdownCodeText, markdownCodeBg, markdownCodeText, ), + nativeTextStyle: { + color: markdownBodyColor, + strongColor: markdownStrongColor, + mutedColor: markdownBodyColor, + linkColor: markdownLinkColor, + codeColor: markdownCodeText, + codeBackgroundColor: markdownCodeBg, + codeBlockBackgroundColor: markdownCodeBg, + fileBackgroundColor: inlineChipBackground, + fileTextColor: markdownCodeText, + skillBackgroundColor: inlineSkillBackground, + skillTextColor: inlineSkillForeground, + quoteMarkerColor: markdownBlockquoteBorder, + dividerColor: markdownHrColor, + fontSize: 15, + lineHeight: 22, + fontFamily: "DMSans_400Regular", + headingFontFamily: "DMSans_700Bold", + boldFontFamily: "DMSans_700Bold", + }, }, }; - }, [ - blockquoteBg, - blockquoteBorder, - bodyColor, - codeBg, - codeText, - hrColor, - linkColor, - strongColor, - userBodyColor, - userCodeBg, - userCodeText, - userFenceBg, - userFenceText, - ]); + }, [colors, inlineChipBackground, inlineSkillBackground, inlineSkillForeground]); } function renderFeedEntry( info: { item: ThreadFeedEntry; index: number }, - props: Pick & { + props: Pick & { readonly copiedRowId: string | null; readonly expandedWorkGroups: Record; + readonly expandedWorkRows: Record; + readonly terminalAssistantMessageIds: ReadonlySet; + readonly unsettledTurnId: TurnId | null; readonly onCopyWorkRow: (rowId: string, value: string) => void; readonly onToggleWorkGroup: (groupId: string) => void; + readonly onToggleWorkRow: (rowId: string) => void; + readonly onToggleTurnFold: (turnId: TurnId) => void; readonly onPressImage: (uri: string, headers?: Record) => void; readonly iconSubtleColor: string | import("react-native").ColorValue; readonly userBubbleColor: string | import("react-native").ColorValue; @@ -410,19 +675,50 @@ function renderFeedEntry( const entry = info.item; const { markdownStyles, iconSubtleColor, userBubbleColor } = props; + if (entry.type === "turn-fold") { + return ( + props.onToggleTurnFold(entry.turnId)} + hitSlop={4} + className="mb-3 min-h-11 flex-row items-center gap-2 border-b border-neutral-200/80 px-2 dark:border-white/[0.08]" + > + + {entry.label} + + + + ); + } + if (entry.type === "message") { const { message } = entry; const isUser = message.role === "user"; const styles = isUser ? markdownStyles.user : markdownStyles.assistant; - const timestampLabel = `${relativeTime(message.createdAt)}${message.streaming ? " • live" : ""}`; + const timestampLabel = formatMessageTime(isUser ? message.createdAt : message.updatedAt); const attachments = message.attachments ?? []; const hasReviewCommentContext = message.text.includes(" ) : null} {attachments.map((attachment) => { @@ -459,9 +756,20 @@ function renderFeedEntry( ); })} - - {timestampLabel} - + + + {timestampLabel} + + {message.text.trim().length > 0 ? ( + + ) : null} + ); } @@ -473,16 +781,24 @@ function renderFeedEntry( } return ( - + {message.text.trim().length > 0 ? ( - - {message.text} - + hasNativeSelectableMarkdownText() ? ( + + ) : ( + + {message.text} + + ) ) : null} {attachments.map((attachment) => { const uri = messageImageUrl(props.httpBaseUrl, attachment.id); @@ -508,9 +824,20 @@ function renderFeedEntry( ); })} - - {timestampLabel} - + {showAssistantMeta ? ( + + + + {timestampLabel} + + + ) : null} ); } @@ -539,67 +866,121 @@ function renderFeedEntry( ); } - const rows = buildActivityRows(entry.activities); + const rows = buildActivityRows(entry.activities).filter( + (activity) => !(activity.toolLike && activity.status === "neutral"), + ); + if (rows.length === 0) { + return null; + } const isExpanded = props.expandedWorkGroups[entry.id] ?? false; const hasOverflow = rows.length > MAX_VISIBLE_WORK_LOG_ENTRIES; const visibleRows = hasOverflow && !isExpanded ? rows.slice(-MAX_VISIBLE_WORK_LOG_ENTRIES) : rows; const hiddenCount = rows.length - visibleRows.length; - const showHeader = hasOverflow; + const onlyToolRows = rows.every((row) => row.toolLike); + const headerTitle = onlyToolRows + ? rows.length === 1 + ? "1 tool call" + : `${rows.length} tool calls` + : "Work log"; return ( - - {showHeader ? ( - - - Tool calls ({rows.length}) - - props.onToggleWorkGroup(entry.id)}> - + + + {headerTitle} + {hasOverflow ? ( + props.onToggleWorkGroup(entry.id)} + className="flex-row items-center gap-1" + > + {isExpanded ? "Show less" : `Show ${hiddenCount} more`} + - - ) : null} + ) : null} + {visibleRows.map((row, index) => ( - { + if (row.fullDetail) { + props.onToggleWorkRow(row.id); + } + }} + onLongPress={() => props.onCopyWorkRow(row.id, row.copyText)} className={cn( - "flex-row items-center gap-2 rounded-lg px-1 py-1", + "rounded-lg px-2 py-1.5", index > 0 && "border-t border-neutral-200/80 dark:border-white/[0.06]", )} > - - - - + + + + { - const copyValue = row.detail ?? row.summary; - props.onCopyWorkRow(row.id, copyValue); - }} - style={{ - fontFamily: "ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace", - }} + className="min-w-0 flex-1 text-[12px] leading-[18px] text-neutral-700 dark:text-neutral-300" + numberOfLines={props.expandedWorkRows[row.id] ? undefined : 1} > {row.detail ? `${row.summary} - ${row.detail}` : row.summary} - - {props.copiedRowId === row.id ? ( - - Copied - + {row.fullDetail ? ( + + ) : null} + {props.copiedRowId === row.id ? ( + + Copied + + ) : null} + + {row.fullDetail && props.expandedWorkRows[row.id] ? ( + + + {row.fullDetail} + + ) : null} - + ))} ); @@ -609,10 +990,20 @@ function UserMessageContent(props: { readonly text: string; readonly markdownStyles: MarkdownStyleSet; readonly reviewCommentColors: ReviewCommentColors; + readonly skills?: ReadonlyArray; }) { const segments = parseReviewCommentMessageSegments(props.text); const hasReviewComment = segments.some((segment) => segment.kind === "review-comment"); if (!hasReviewComment) { + if (hasNativeSelectableMarkdownText()) { + return ( + + ); + } return ( + ) : ( = 0 ? normalized.slice(lastSlashIndex + 1) : normalized; } -const IOS_NAV_BAR_HEIGHT = 44; - export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) { const listRef = useRef(null); const copyFeedbackTimeoutRef = useRef | null>(null); + const scrollFrameRef = useRef(null); + const foldSettleFrameRef = useRef(null); + const foldSettleSecondFrameRef = useRef(null); + const suppressAutoFollowRef = useRef(false); + const previousLatestTurnRef = useRef(props.latestTurn); + const isNearEndRef = useRef(true); + const initialScrollReadyRef = useRef(false); + const lastContentHeightRef = useRef(0); const { width: viewportWidth } = useWindowDimensions(); - const [copiedRowId, setCopiedRowId] = useState(null); - const [expandedWorkGroups, setExpandedWorkGroups] = useState>({}); + const [interactionState, setInteractionState] = useState<{ + readonly copiedRowId: string | null; + readonly expandedWorkGroups: Record; + readonly expandedWorkRows: Record; + readonly expandedTurnIds: ReadonlySet; + }>({ + copiedRowId: null, + expandedWorkGroups: {}, + expandedWorkRows: {}, + expandedTurnIds: new Set(), + }); + const { copiedRowId, expandedWorkGroups, expandedWorkRows, expandedTurnIds } = interactionState; const [expandedImage, setExpandedImage] = useState<{ uri: string; headers?: Record; @@ -835,47 +1249,193 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) { const contentWidth = Math.max(0, viewportWidth - horizontalPadding * 2); const reviewCommentBubbleWidth = Math.min(Math.max(280, contentWidth * 0.85), contentWidth); const insets = useSafeAreaInsets(); - const topContentInset = insets.top + IOS_NAV_BAR_HEIGHT; + const topContentInset = props.contentTopInset ?? insets.top + 44; const bottomContentInset = props.contentBottomInset ?? 18; const iconSubtleColor = useThemeColor("--color-icon-subtle"); const userBubbleColor = useThemeColor("--color-user-bubble"); const markdownStyles = useMarkdownStyles(); const reviewCommentColors = useReviewCommentColors(); + const listAppearanceData = useMemo( + () => ({ + iconSubtleColor, + markdownStyles, + reviewCommentColors, + userBubbleColor, + }), + [iconSubtleColor, markdownStyles, reviewCommentColors, userBubbleColor], + ); + const presentedFeed = useMemo( + () => deriveThreadFeedPresentation(props.feed, props.latestTurn, expandedTurnIds), + [expandedTurnIds, props.feed, props.latestTurn], + ); + const terminalAssistantMessageIds = useMemo(() => { + const terminalIdsByTurn = new Map(); + for (const entry of props.feed) { + if (entry.type === "message" && entry.message.role === "assistant" && entry.message.turnId) { + terminalIdsByTurn.set(entry.message.turnId, entry.message.id); + } + } + return new Set(terminalIdsByTurn.values()); + }, [props.feed]); + const unsettledTurnId = + props.latestTurn && + (props.latestTurn.completedAt === null || props.latestTurn.state === "running") + ? props.latestTurn.turnId + : null; + + const scrollToEnd = useCallback(() => { + if (scrollFrameRef.current !== null) { + return; + } + scrollFrameRef.current = requestAnimationFrame(() => { + scrollFrameRef.current = null; + listRef.current?.scrollToEnd({ animated: false }); + }); + }, []); + + const onListScroll = useCallback( + (event: NativeSyntheticEvent | NativeScrollEvent) => { + const scrollEvent = "nativeEvent" in event ? event.nativeEvent : event; + const { contentInset, contentOffset, contentSize, layoutMeasurement } = scrollEvent; + isNearEndRef.current = isThreadFeedNearEnd( + { + contentHeight: contentSize.height, + viewportHeight: layoutMeasurement.height, + offsetY: contentOffset.y, + bottomInset: contentInset.bottom, + }, + THREAD_FEED_END_THRESHOLD, + ); + }, + [], + ); + + const onListContentSizeChange = useCallback( + (_width: number, height: number) => { + const contentGrew = height > lastContentHeightRef.current + 0.5; + lastContentHeightRef.current = height; + + if ( + initialScrollReadyRef.current && + contentGrew && + isNearEndRef.current && + !suppressAutoFollowRef.current + ) { + scrollToEnd(); + } + }, + [scrollToEnd], + ); + + const onListLoad = useCallback(() => { + initialScrollReadyRef.current = true; + }, []); useEffect(() => { - setCopiedRowId(null); - setExpandedWorkGroups({}); - }, [props.threadId]); + const previous = previousLatestTurnRef.current; + previousLatestTurnRef.current = props.latestTurn; + if (!props.latestTurn || !previous) { + return; + } + if (props.latestTurn.turnId === previous.turnId) { + if (previous.state === "running" && props.latestTurn.state === "interrupted") { + const interruptedTurnId = props.latestTurn.turnId; + setInteractionState((current) => ({ + ...current, + expandedTurnIds: new Set(current.expandedTurnIds).add(interruptedTurnId), + })); + } + return; + } + setInteractionState((current) => { + if (!current.expandedTurnIds.has(previous.turnId)) { + return current; + } + const next = new Set(current.expandedTurnIds); + next.delete(previous.turnId); + return { ...current, expandedTurnIds: next }; + }); + }, [props.latestTurn]); useEffect(() => { return () => { if (copyFeedbackTimeoutRef.current) { clearTimeout(copyFeedbackTimeoutRef.current); } + if (scrollFrameRef.current !== null) { + cancelAnimationFrame(scrollFrameRef.current); + } + if (foldSettleFrameRef.current !== null) { + cancelAnimationFrame(foldSettleFrameRef.current); + } + if (foldSettleSecondFrameRef.current !== null) { + cancelAnimationFrame(foldSettleSecondFrameRef.current); + } }; }, []); const onCopyWorkRow = useCallback((rowId: string, value: string) => { void Clipboard.setStringAsync(value); void Haptics.selectionAsync(); - setCopiedRowId(rowId); + setInteractionState((current) => ({ ...current, copiedRowId: rowId })); if (copyFeedbackTimeoutRef.current) { clearTimeout(copyFeedbackTimeoutRef.current); } copyFeedbackTimeoutRef.current = setTimeout(() => { - setCopiedRowId((current) => (current === rowId ? null : current)); + setInteractionState((current) => + current.copiedRowId === rowId ? { ...current, copiedRowId: null } : current, + ); copyFeedbackTimeoutRef.current = null; }, 1200); }, []); const onToggleWorkGroup = useCallback((groupId: string) => { - setExpandedWorkGroups((current) => ({ + setInteractionState((current) => ({ ...current, - [groupId]: !(current[groupId] ?? false), + expandedWorkGroups: { + ...current.expandedWorkGroups, + [groupId]: !(current.expandedWorkGroups[groupId] ?? false), + }, })); }, []); + const onToggleWorkRow = useCallback((rowId: string) => { + setInteractionState((current) => ({ + ...current, + expandedWorkRows: { + ...current.expandedWorkRows, + [rowId]: !(current.expandedWorkRows[rowId] ?? false), + }, + })); + }, []); + + const onToggleTurnFold = useCallback((turnId: TurnId) => { + suppressAutoFollowRef.current = true; + if (foldSettleFrameRef.current !== null) { + cancelAnimationFrame(foldSettleFrameRef.current); + } + if (foldSettleSecondFrameRef.current !== null) { + cancelAnimationFrame(foldSettleSecondFrameRef.current); + } + setInteractionState((current) => { + const next = new Set(current.expandedTurnIds); + if (next.has(turnId)) { + next.delete(turnId); + } else { + next.add(turnId); + } + return { ...current, expandedTurnIds: next }; + }); + foldSettleFrameRef.current = requestAnimationFrame(() => { + foldSettleSecondFrameRef.current = requestAnimationFrame(() => { + suppressAutoFollowRef.current = false; + foldSettleFrameRef.current = null; + foldSettleSecondFrameRef.current = null; + }); + }); + }, []); + const onPressImage = useCallback((uri: string, headers?: Record) => { setExpandedImage({ uri, headers }); }, []); @@ -887,18 +1447,27 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) { copiedRowId, httpBaseUrl: props.httpBaseUrl, expandedWorkGroups, + expandedWorkRows, + terminalAssistantMessageIds, + unsettledTurnId, onCopyWorkRow, onToggleWorkGroup, + onToggleWorkRow, + onToggleTurnFold, onPressImage, iconSubtleColor, userBubbleColor, markdownStyles, reviewCommentColors, reviewCommentBubbleWidth, + skills: props.skills, }), [ copiedRowId, expandedWorkGroups, + expandedWorkRows, + terminalAssistantMessageIds, + unsettledTurnId, iconSubtleColor, userBubbleColor, markdownStyles, @@ -906,9 +1475,12 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) { reviewCommentBubbleWidth, onCopyWorkRow, onPressImage, + onToggleTurnFold, onToggleWorkGroup, + onToggleWorkRow, props.bearerToken, props.httpBaseUrl, + props.skills, ], ); @@ -935,33 +1507,46 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) { return ( <> - `${entry.type}:${entry.id}`} - getItemType={(entry) => - entry.type === "message" ? `message:${entry.message.role}` : entry.type - } - keyboardShouldPersistTaps="handled" - estimatedItemSize={180} - initialScrollAtEnd - maintainScrollAtEnd={{ - on: { layout: true, itemLayout: true, dataChange: true }, - }} - maintainScrollAtEndThreshold={0.1} - safeAreaInsetBottom={insets.bottom} - contentContainerStyle={{ - paddingTop: 12, - paddingHorizontal: horizontalPadding, - }} - /> + + `${entry.type}:${entry.id}`} + getItemType={(entry) => + entry.type === "message" ? `message:${entry.message.role}` : entry.type + } + keyboardShouldPersistTaps="always" + keyboardDismissMode="none" + estimatedItemSize={180} + initialScrollAtEnd + onContentSizeChange={onListContentSizeChange} + onLoad={onListLoad} + onScroll={onListScroll} + scrollEventThrottle={16} + ListHeaderComponent={} + contentContainerStyle={{ + paddingTop: 12, + paddingBottom: bottomContentInset, + paddingHorizontal: horizontalPadding, + }} + /> + ; readonly selectedModel: ModelSelection | null; readonly selectedModelOption: ModelOption | null; + readonly selectedProviderSkills: ReadonlyArray; readonly providerGroups: ReadonlyArray; readonly filteredBranches: ReadonlyArray; readonly reset: () => void; @@ -283,6 +285,12 @@ export function NewTaskFlowProvider(props: React.PropsWithChildren) { option.selection.instanceId === selectedModel.instanceId && option.selection.model === selectedModel.model, ) ?? null; + const selectedProviderSkills = + (selectedProject + ? serverConfigByEnvironmentId[selectedProject.environmentId] + : null + )?.providers.find((provider) => provider.instanceId === selectedModel?.instanceId)?.skills ?? + []; const providerGroups = useMemo(() => groupByProvider(modelOptions), [modelOptions]); const setPrompt = useCallback( @@ -450,6 +458,7 @@ export function NewTaskFlowProvider(props: React.PropsWithChildren) { modelOptions, selectedModel, selectedModelOption, + selectedProviderSkills, providerGroups, filteredBranches, reset, @@ -498,6 +507,7 @@ export function NewTaskFlowProvider(props: React.PropsWithChildren) { selectedModel, selectedModelKey, selectedModelOption, + selectedProviderSkills, selectedProject, selectedProjectKey, selectedWorktreePath, diff --git a/apps/mobile/src/lib/composerImages.test.ts b/apps/mobile/src/lib/composerImages.test.ts new file mode 100644 index 0000000000..40e00a271f --- /dev/null +++ b/apps/mobile/src/lib/composerImages.test.ts @@ -0,0 +1,94 @@ +import { beforeEach, describe, expect, it, vi } from "vite-plus/test"; +import { PROVIDER_SEND_TURN_MAX_ATTACHMENTS } from "@t3tools/contracts"; + +const files = new Map(); + +vi.mock("expo-file-system", () => ({ + File: class { + readonly uri: string; + + constructor(uri: string) { + this.uri = uri; + } + + get exists(): boolean { + return files.has(this.uri) && files.get(this.uri)?.deleted === false; + } + + async base64(): Promise { + const entry = files.get(this.uri); + if (!entry || entry.deleted) { + throw new Error("missing file"); + } + return entry.base64; + } + + delete(): void { + const entry = files.get(this.uri); + if (entry) { + entry.deleted = true; + } + } + }, +})); + +vi.mock("./uuid", () => ({ + uuidv4: () => "attachment-id", +})); + +import { convertPastedImagesToAttachments, isOwnedPastedImageUri } from "./composerImages"; + +describe("native pasted image cleanup", () => { + beforeEach(() => { + files.clear(); + }); + + it("recognizes only files created in the native composer paste directory", () => { + expect( + isOwnedPastedImageUri( + "file:///private/var/mobile/Containers/Data/Application/app/tmp/t3-composer-paste/id.png", + ), + ).toBe(true); + expect(isOwnedPastedImageUri("file:///private/var/mobile/photos/id.png")).toBe(false); + expect(isOwnedPastedImageUri("https://example.com/t3-composer-paste/id.png")).toBe(false); + }); + + it("converts owned files to data-backed previews and deletes the source", async () => { + const uri = + "file:///private/var/mobile/Containers/Data/Application/app/tmp/t3-composer-paste/id.png"; + files.set(uri, { base64: "aGVsbG8=", deleted: false }); + + const attachments = await convertPastedImagesToAttachments({ + uris: [uri], + existingCount: 0, + }); + + expect(attachments).toEqual([ + expect.objectContaining({ + dataUrl: "data:image/png;base64,aGVsbG8=", + previewUri: "data:image/png;base64,aGVsbG8=", + }), + ]); + expect(files.get(uri)?.deleted).toBe(true); + }); + + it("deletes rejected and overflow owned files without deleting user-owned files", async () => { + const rejected = + "file:///private/var/mobile/Containers/Data/Application/app/tmp/t3-composer-paste/bad.png"; + const overflow = + "file:///private/var/mobile/Containers/Data/Application/app/tmp/t3-composer-paste/overflow.png"; + const userOwned = "file:///private/var/mobile/photos/library.png"; + files.set(rejected, { base64: "", deleted: false }); + files.set(overflow, { base64: "aGVsbG8=", deleted: false }); + files.set(userOwned, { base64: "aGVsbG8=", deleted: false }); + + await convertPastedImagesToAttachments({ + uris: [rejected, overflow, userOwned], + existingCount: PROVIDER_SEND_TURN_MAX_ATTACHMENTS - 1, + }); + + expect(files.get(rejected)?.deleted).toBe(true); + expect(files.get(overflow)?.deleted).toBe(true); + expect(files.get(userOwned)?.deleted).toBe(false); + }); +}); diff --git a/apps/mobile/src/lib/composerImages.ts b/apps/mobile/src/lib/composerImages.ts index 871982442e..13b53af724 100644 --- a/apps/mobile/src/lib/composerImages.ts +++ b/apps/mobile/src/lib/composerImages.ts @@ -10,6 +10,8 @@ export interface DraftComposerImageAttachment extends UploadChatImageAttachment readonly previewUri: string; } +const OWNED_PASTED_IMAGE_DIRECTORY = "t3-composer-paste"; + function estimateBase64ByteSize(base64: string): number { const padding = base64.endsWith("==") ? 2 : base64.endsWith("=") ? 1 : 0; return Math.floor((base64.length * 3) / 4) - padding; @@ -213,17 +215,35 @@ function mimeTypeFromUri(uri: string): string { } } +export function isOwnedPastedImageUri(uri: string): boolean { + try { + const url = new URL(uri); + if (url.protocol !== "file:") { + return false; + } + const segments = url.pathname.split("/").filter(Boolean); + return ( + segments.at(-2) === OWNED_PASTED_IMAGE_DIRECTORY && segments.at(-1)?.endsWith(".png") === true + ); + } catch { + return false; + } +} + export async function convertPastedImagesToAttachments(input: { readonly uris: ReadonlyArray; readonly existingCount: number; }): Promise> { const { File } = await import("expo-file-system"); const remainingSlots = PROVIDER_SEND_TURN_MAX_ATTACHMENTS - input.existingCount; - const uris = input.uris.slice(0, Math.max(0, remainingSlots)); const results: DraftComposerImageAttachment[] = []; - for (const uri of uris) { + for (const [index, uri] of input.uris.entries()) { + const ownedTemporaryFile = isOwnedPastedImageUri(uri); try { + if (index >= Math.max(0, remainingSlots)) { + continue; + } const file = new File(uri); const base64 = await file.base64(); const sizeBytes = estimateBase64ByteSize(base64); @@ -238,10 +258,21 @@ export async function convertPastedImagesToAttachments(input: { mimeType, sizeBytes, dataUrl: `data:${mimeType};base64,${base64}`, - previewUri: uri, + previewUri: ownedTemporaryFile ? `data:${mimeType};base64,${base64}` : uri, }); } catch (error) { console.warn("Failed to read pasted image", uri, error); + } finally { + if (ownedTemporaryFile) { + try { + const file = new File(uri); + if (file.exists) { + file.delete(); + } + } catch (error) { + console.warn("Failed to remove temporary pasted image", uri, error); + } + } } } diff --git a/apps/mobile/src/lib/copyTextWithHaptic.test.ts b/apps/mobile/src/lib/copyTextWithHaptic.test.ts new file mode 100644 index 0000000000..d15a3a1a59 --- /dev/null +++ b/apps/mobile/src/lib/copyTextWithHaptic.test.ts @@ -0,0 +1,34 @@ +import { beforeEach, describe, expect, it, vi } from "vite-plus/test"; + +const mocks = vi.hoisted(() => ({ + impactAsync: vi.fn(), + setStringAsync: vi.fn(), +})); + +vi.mock("expo-clipboard", () => ({ + setStringAsync: mocks.setStringAsync, +})); + +vi.mock("expo-haptics", () => ({ + ImpactFeedbackStyle: { + Light: "light", + }, + impactAsync: mocks.impactAsync, +})); + +import { copyTextWithHaptic } from "./copyTextWithHaptic"; + +describe("copyTextWithHaptic", () => { + beforeEach(() => { + vi.clearAllMocks(); + mocks.setStringAsync.mockReturnValue(new Promise(() => undefined)); + mocks.impactAsync.mockResolvedValue(undefined); + }); + + it("triggers haptic feedback without waiting for the clipboard promise", () => { + copyTextWithHaptic("trace-123"); + + expect(mocks.setStringAsync).toHaveBeenCalledWith("trace-123"); + expect(mocks.impactAsync).toHaveBeenCalledWith("light"); + }); +}); diff --git a/apps/mobile/src/lib/copyTextWithHaptic.ts b/apps/mobile/src/lib/copyTextWithHaptic.ts new file mode 100644 index 0000000000..80f725f5b0 --- /dev/null +++ b/apps/mobile/src/lib/copyTextWithHaptic.ts @@ -0,0 +1,7 @@ +import * as Clipboard from "expo-clipboard"; +import * as Haptics from "expo-haptics"; + +export function copyTextWithHaptic(value: string): void { + void Clipboard.setStringAsync(value); + void Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light); +} diff --git a/apps/mobile/src/lib/markdownLinks.test.ts b/apps/mobile/src/lib/markdownLinks.test.ts new file mode 100644 index 0000000000..90153d0afa --- /dev/null +++ b/apps/mobile/src/lib/markdownLinks.test.ts @@ -0,0 +1,67 @@ +import { describe, expect, it } from "vite-plus/test"; + +import { resolveMarkdownLinkPresentation } from "@t3tools/mobile-markdown-text/links"; + +describe("resolveMarkdownLinkPresentation", () => { + it("extracts external link hosts", () => { + expect(resolveMarkdownLinkPresentation("https://example.com/docs?q=1")).toEqual({ + kind: "external", + href: "https://example.com/docs?q=1", + host: "example.com", + }); + }); + + it("renders file URLs as basename pills with positions", () => { + expect( + resolveMarkdownLinkPresentation("file:///Users/julius/project/src/main.ts#L42C7"), + ).toEqual({ + kind: "file", + icon: "typescript", + label: "main.ts:42:7", + }); + }); + + it("recognizes relative source paths and bare filenames", () => { + expect(resolveMarkdownLinkPresentation("apps/mobile/src/index.ts:10")).toEqual({ + kind: "file", + icon: "typescript", + label: "index.ts:10", + }); + expect(resolveMarkdownLinkPresentation("AGENTS.md")).toEqual({ + kind: "file", + icon: "agents", + label: "AGENTS.md", + }); + expect(resolveMarkdownLinkPresentation("package.json")).toEqual({ + kind: "file", + icon: "package", + label: "package.json", + }); + }); + + it("uses the Pierre complete icon mappings", () => { + expect(resolveMarkdownLinkPresentation("src/Button.tsx")).toMatchObject({ + kind: "file", + icon: "react", + }); + expect(resolveMarkdownLinkPresentation("vite.config.ts")).toMatchObject({ + kind: "file", + icon: "vite", + }); + expect(resolveMarkdownLinkPresentation("Dockerfile")).toMatchObject({ + kind: "file", + icon: "docker", + }); + expect(resolveMarkdownLinkPresentation("pnpm-lock.yaml")).toMatchObject({ + kind: "file", + icon: "pnpm", + }); + }); + + it("does not style app routes as file links", () => { + expect(resolveMarkdownLinkPresentation("/chat/settings")).toEqual({ + kind: "link", + href: null, + }); + }); +}); diff --git a/apps/mobile/src/lib/nativeMarkdownText.test.ts b/apps/mobile/src/lib/nativeMarkdownText.test.ts new file mode 100644 index 0000000000..9d5c55686e --- /dev/null +++ b/apps/mobile/src/lib/nativeMarkdownText.test.ts @@ -0,0 +1,734 @@ +import { describe, expect, it } from "vite-plus/test"; +import type { MarkdownNode } from "react-native-nitro-markdown/headless"; + +import { + nativeMarkdownChunkSpacing, + nativeMarkdownDocumentChunks, + nativeMarkdownDocumentRuns, + nativeMarkdownListItemBlocks, + nativeMarkdownTextRuns, +} from "@t3tools/mobile-markdown-text/markdown"; + +describe("nativeMarkdownTextRuns", () => { + it("preserves inline emphasis and code styles", () => { + const node: MarkdownNode = { + type: "paragraph", + children: [ + { type: "text", content: "plain " }, + { type: "bold", children: [{ type: "text", content: "bold" }] }, + { type: "text", content: " " }, + { type: "code_inline", content: "const value = 1" }, + ], + }; + + expect(nativeMarkdownTextRuns(node)).toEqual([ + { text: "plain " }, + { text: "bold", bold: true }, + { text: " " }, + { text: "const value = 1", code: true }, + ]); + }); + + it("normalizes external and file links for native presentation", () => { + const node: MarkdownNode = { + type: "paragraph", + children: [ + { + type: "link", + href: "https://example.com/docs", + children: [{ type: "text", content: "Docs" }], + }, + { type: "text", content: " " }, + { + type: "link", + href: "file:///repo/README.md#L12", + children: [{ type: "text", content: "ignored label" }], + }, + ], + }; + + expect(nativeMarkdownTextRuns(node)).toEqual([ + { + text: "Docs", + href: "https://example.com/docs", + externalHost: "example.com", + }, + { text: " " }, + { text: "README.md:12", fileIcon: "readme" }, + ]); + }); + + it("keeps hard breaks and collapses soft breaks", () => { + const node: MarkdownNode = { + type: "paragraph", + children: [ + { type: "text", content: "first" }, + { type: "soft_break" }, + { type: "text", content: "second" }, + { type: "line_break" }, + { type: "text", content: "third" }, + ], + }; + + expect(nativeMarkdownTextRuns(node)).toEqual([{ text: "first second\nthird" }]); + }); + + it("normalizes common inline HTML and entities", () => { + const node: MarkdownNode = { + type: "paragraph", + children: [ + { type: "text", content: "Less than: < " }, + { type: "html_inline", content: "" }, + { type: "text", content: "⌘" }, + { type: "html_inline", content: "" }, + { type: "html_inline", content: "
" }, + { type: "html_inline", content: "highlighted" }, + ], + }; + + expect(nativeMarkdownTextRuns(node)).toEqual([{ text: "Less than: < ⌘\nhighlighted" }]); + }); + + it("normalizes double-encoded entities and inline tags emitted as text", () => { + const node: MarkdownNode = { + type: "paragraph", + children: [ + { + type: "text", + content: + "Keyboard: ⌘ + K; Less than: &lt;; Greater than: &gt;", + }, + ], + }; + + expect(nativeMarkdownTextRuns(node)).toEqual([ + { text: "Keyboard: ⌘ + K; Less than: <; Greater than: >" }, + ]); + }); + + it("reads inline content from nested text nodes", () => { + const node: MarkdownNode = { + type: "paragraph", + children: [ + { + type: "text", + children: [{ type: "text", content: "Plain text" }], + }, + { type: "text", content: " and " }, + { + type: "code_inline", + children: [{ type: "text", content: "inline code" }], + }, + ], + }; + + expect(nativeMarkdownTextRuns(node)).toEqual([ + { text: "Plain text and " }, + { text: "inline code", code: true }, + ]); + }); +}); + +describe("nativeMarkdownDocumentRuns", () => { + it("decorates known skill references as selectable skill chips", () => { + const node: MarkdownNode = { + type: "document", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Use $ui for this." }], + }, + ], + }; + + expect(nativeMarkdownDocumentRuns(node, [{ name: "ui", displayName: "UI" }])).toEqual([ + { text: "Use ", role: "body" }, + { + text: "$ui", + role: "body", + skillName: "ui", + skillLabel: "UI", + }, + { text: " for this.", role: "body" }, + ]); + }); + + it("leaves unknown skill-like text unchanged", () => { + const node: MarkdownNode = { + type: "document", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Use $unknown for this." }], + }, + ], + }; + + expect(nativeMarkdownDocumentRuns(node, [])).toEqual([ + { text: "Use $unknown for this.", role: "body" }, + ]); + }); + + it("keeps headings, paragraphs, and lists in one continuous document", () => { + const node: MarkdownNode = { + type: "document", + children: [ + { + type: "heading", + level: 1, + children: [{ type: "text", content: "Header One" }], + }, + { + type: "paragraph", + children: [ + { type: "text", content: "A paragraph with " }, + { type: "bold", children: [{ type: "text", content: "bold text" }] }, + { type: "text", content: "." }, + ], + }, + { + type: "list", + ordered: false, + children: [ + { + type: "list_item", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "First item" }], + }, + ], + }, + { + type: "list_item", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Second item" }], + }, + ], + }, + ], + }, + ], + }; + + const runs = nativeMarkdownDocumentRuns(node); + expect(runs.map((run) => run.text).join("")).toBe( + "Header One\n\nA paragraph with bold text.\n\n•\tFirst item\n•\tSecond item", + ); + expect(runs).toContainEqual({ + text: "Header One\n", + role: "heading", + headingLevel: 1, + }); + expect(runs).toContainEqual({ + text: "bold text", + bold: true, + role: "body", + }); + expect(runs).toContainEqual({ + text: "•\t", + role: "list-marker", + depth: 1, + firstLineHeadIndent: 0, + headIndent: 24, + paragraphSpacing: 2, + }); + }); + + it("uses distinct section, heading-content, and body spacing", () => { + const node: MarkdownNode = { + type: "document", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Intro" }], + }, + { + type: "heading", + level: 2, + children: [{ type: "text", content: "Section" }], + }, + { + type: "paragraph", + children: [{ type: "text", content: "First paragraph" }], + }, + { + type: "paragraph", + children: [{ type: "text", content: "Second paragraph" }], + }, + ], + }; + + expect( + nativeMarkdownDocumentRuns(node) + .filter((run) => run.role === "spacer") + .map((run) => run.spacing), + ).toEqual([20, 10, 12]); + }); + + it("renders tight list items whose inline nodes are direct children", () => { + const node: MarkdownNode = { + type: "document", + children: [ + { + type: "list", + children: [ + { + type: "list_item", + children: [ + { + type: "bold", + children: [{ type: "text", content: "Finding:" }], + }, + { type: "text", content: " details with " }, + { type: "code_inline", content: "inline code" }, + { type: "text", content: "." }, + ], + }, + ], + }, + ], + }; + + expect(nativeMarkdownDocumentRuns(node)).toEqual([ + { + text: "•\t", + role: "list-marker", + depth: 1, + firstLineHeadIndent: 0, + headIndent: 24, + paragraphSpacing: 2, + }, + { text: "Finding:", bold: true, role: "body", depth: 1 }, + { text: " details with ", role: "body", depth: 1 }, + { text: "inline code", code: true, role: "body", depth: 1 }, + { text: ".", role: "body", depth: 1 }, + ]); + }); + + it("includes quotes and fenced code in the same selectable string", () => { + const node: MarkdownNode = { + type: "document", + children: [ + { + type: "blockquote", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Read this" }], + }, + ], + }, + { + type: "code_block", + language: "ts", + content: "const answer = 42;", + }, + ], + }; + + const runs = nativeMarkdownDocumentRuns(node); + expect(runs.map((run) => run.text).join("")).toBe("│\u00a0Read this\n\nTS\nconst answer = 42;"); + expect(runs).toContainEqual({ + text: "const answer = 42;", + code: true, + role: "code-block", + }); + }); + + it("reads fenced code content from child text nodes", () => { + const node: MarkdownNode = { + type: "document", + children: [ + { + type: "code_block", + language: "bash", + children: [{ type: "text", content: "pnpm install\n" }], + }, + ], + }; + + expect( + nativeMarkdownDocumentRuns(node) + .map((run) => run.text) + .join(""), + ).toBe("BASH\npnpm install"); + }); +}); + +describe("nativeMarkdownListItemBlocks", () => { + it("groups consecutive inline nodes into one paragraph block", () => { + const item: MarkdownNode = { + type: "list_item", + children: [ + { type: "text", content: "Finding: " }, + { type: "bold", children: [{ type: "text", content: "important" }] }, + { type: "text", content: " details." }, + { + type: "list", + children: [ + { + type: "list_item", + children: [{ type: "text", content: "Nested" }], + }, + ], + }, + { type: "text", content: "Trailing prose." }, + ], + }; + + expect(nativeMarkdownListItemBlocks(item)).toEqual([ + { + type: "paragraph", + children: item.children?.slice(0, 3), + }, + item.children?.[3], + { + type: "paragraph", + children: [item.children?.[4]], + }, + ]); + }); +}); + +describe("nativeMarkdownDocumentChunks", () => { + it("keeps headings and plain lists in one selectable document", () => { + const document: MarkdownNode = { + type: "document", + children: [ + { + type: "heading", + level: 2, + children: [{ type: "text", content: "Tasks" }], + }, + { + type: "list", + children: [ + { + type: "task_list_item", + checked: true, + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Completed" }], + }, + ], + }, + { + type: "list_item", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Parent" }], + }, + { + type: "list", + children: [ + { + type: "list_item", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Nested" }], + }, + ], + }, + ], + }, + ], + }, + ], + }, + ], + }; + + const chunks = nativeMarkdownDocumentChunks(document); + expect(chunks).toHaveLength(1); + expect(chunks[0]).toMatchObject({ kind: "selectable" }); + expect( + nativeMarkdownDocumentRuns(chunks[0]?.node ?? document) + .map((run) => run.text) + .join(""), + ).toBe("Tasks\n\n☑︎\tCompleted\n•\tParent\n◦\tNested"); + }); + + it("aligns ordered markers while keeping the list in one selectable string", () => { + const document: MarkdownNode = { + type: "document", + children: [ + { + type: "list", + ordered: true, + start: 9, + children: [ + { + type: "list_item", + children: [{ type: "text", content: "Ninth" }], + }, + { + type: "list_item", + children: [{ type: "text", content: "Tenth" }], + }, + ], + }, + ], + }; + + expect( + nativeMarkdownDocumentRuns(document) + .map((run) => run.text) + .join(""), + ).toBe("\u20079.\tNinth\n10.\tTenth"); + }); + + it("keeps prose selectable while exposing rich AST blocks", () => { + const document: MarkdownNode = { + type: "document", + children: [ + { + type: "heading", + level: 1, + beg: 0, + end: 9, + children: [{ type: "text", content: "Install" }], + }, + { + type: "code_block", + language: "bash", + beg: 11, + end: 35, + children: [{ type: "text", content: "pnpm install\n" }], + }, + { + type: "paragraph", + beg: 37, + end: 42, + children: [{ type: "text", content: "Done." }], + }, + ], + }; + + const chunks = nativeMarkdownDocumentChunks(document); + expect(chunks).toHaveLength(3); + expect(chunks[0]).toMatchObject({ kind: "selectable" }); + expect(chunks[1]).toEqual({ + kind: "rich", + key: "rich:code_block:11:35", + node: document.children?.[1], + }); + expect(chunks[2]).toMatchObject({ kind: "selectable" }); + }); + + it("keeps a list containing fenced code as one rich AST container", () => { + const document: MarkdownNode = { + type: "document", + children: [ + { + type: "list", + beg: 0, + end: 45, + children: [ + { + type: "list_item", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Install" }], + }, + { + type: "code_block", + language: "bash", + children: [{ type: "text", content: "pnpm install\n" }], + }, + ], + }, + ], + }, + ], + }; + + expect(nativeMarkdownDocumentChunks(document)).toEqual([ + { + kind: "rich", + key: "rich:list:0:45", + node: document.children?.[0], + }, + ]); + }); + + it("keeps surrounding prose selectable when rich nodes have no source offsets", () => { + const document: MarkdownNode = { + type: "document", + children: [ + { + type: "heading", + level: 1, + children: [{ type: "text", content: "Before" }], + }, + { type: "horizontal_rule" }, + { + type: "paragraph", + children: [{ type: "text", content: "After." }], + }, + ], + }; + + const chunks = nativeMarkdownDocumentChunks(document); + expect(chunks).toHaveLength(3); + expect(chunks[0]).toMatchObject({ kind: "selectable" }); + expect(chunks[1]).toEqual({ + kind: "rich", + key: "rich:horizontal_rule:1:1", + node: document.children?.[1], + }); + expect(chunks[2]).toMatchObject({ kind: "selectable" }); + }); + + it("keeps offset-free structural lists isolated without promoting the whole document", () => { + const document: MarkdownNode = { + type: "document", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Before." }], + }, + { + type: "list", + ordered: true, + children: [ + { + type: "list_item", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Install" }], + }, + { + type: "code_block", + language: "bash", + children: [{ type: "text", content: "pnpm install\n" }], + }, + ], + }, + ], + }, + { + type: "paragraph", + children: [{ type: "text", content: "After." }], + }, + ], + }; + + const chunks = nativeMarkdownDocumentChunks(document); + expect(chunks).toHaveLength(3); + expect(chunks[0]).toMatchObject({ kind: "selectable" }); + expect(chunks[1]).toEqual({ + kind: "rich", + key: "rich:list:1:1", + node: document.children?.[1], + }); + expect(chunks[2]).toMatchObject({ kind: "selectable" }); + }); + + it("never collapses a rich subtree into a second markdown parsing pass", () => { + const document: MarkdownNode = { + type: "document", + children: [ + { + type: "paragraph", + children: [{ type: "text", content: "Before." }], + }, + { + type: "blockquote", + children: [ + { + type: "list", + children: [ + { + type: "list_item", + children: [ + { type: "text", content: "Run this" }, + { + type: "code_block", + language: "sh", + children: [{ type: "text", content: "vp check\n" }], + }, + ], + }, + ], + }, + ], + }, + { + type: "paragraph", + children: [{ type: "text", content: "After." }], + }, + ], + }; + + const chunks = nativeMarkdownDocumentChunks(document); + expect(chunks.map((chunk) => chunk.kind)).toEqual(["selectable", "rich", "selectable"]); + expect(chunks[1]).toMatchObject({ + kind: "rich", + node: { type: "blockquote" }, + }); + }); + + it("keeps a plain list in one selectable native text container", () => { + const list: MarkdownNode = { + type: "list", + ordered: false, + children: [ + { + type: "list_item", + children: [{ type: "text", content: "First" }], + }, + ], + }; + + const chunks = nativeMarkdownDocumentChunks({ + type: "document", + children: [list], + }); + + expect(chunks).toHaveLength(1); + expect(chunks[0]).toMatchObject({ + kind: "selectable", + node: { type: "document", children: [list] }, + }); + }); + + it("separates sections more than related rich blocks", () => { + const headingChunk = { + kind: "selectable" as const, + key: "heading", + node: { + type: "document", + children: [ + { + type: "heading", + level: 2, + children: [{ type: "text", content: "Section" }], + }, + ], + } satisfies MarkdownNode, + }; + const firstList = { + kind: "rich" as const, + key: "list-1", + node: { type: "list", children: [] } satisfies MarkdownNode, + }; + const secondList = { + kind: "rich" as const, + key: "list-2", + node: { type: "list", children: [] } satisfies MarkdownNode, + }; + + expect(nativeMarkdownChunkSpacing(undefined, headingChunk)).toBe(0); + expect(nativeMarkdownChunkSpacing(headingChunk, firstList)).toBe(10); + expect(nativeMarkdownChunkSpacing(firstList, secondList)).toBe(12); + expect(nativeMarkdownChunkSpacing(firstList, headingChunk)).toBe(20); + }); +}); diff --git a/apps/mobile/src/lib/threadActivity.test.ts b/apps/mobile/src/lib/threadActivity.test.ts index 94354df744..b500752c5d 100644 --- a/apps/mobile/src/lib/threadActivity.test.ts +++ b/apps/mobile/src/lib/threadActivity.test.ts @@ -2,6 +2,7 @@ import { describe, expect, it } from "vite-plus/test"; import { EventId, + MessageId, ProjectId, ProviderInstanceId, ThreadId, @@ -10,7 +11,7 @@ import { type OrchestrationThreadActivity, } from "@t3tools/contracts"; -import { buildThreadFeed } from "./threadActivity"; +import { buildThreadFeed, deriveThreadFeedPresentation } from "./threadActivity"; function makeActivity( input: Partial & @@ -48,7 +49,7 @@ function makeThread( } describe("buildThreadFeed", () => { - it("includes runtime warnings from the latest turn", () => { + it("keeps historic work entries attributed to their turns", () => { const thread = makeThread({ id: ThreadId.make("thread-1"), projectId: ProjectId.make("project-1"), @@ -86,22 +87,16 @@ describe("buildThreadFeed", () => { }); const feed = buildThreadFeed(thread, [], null); - const group = feed[0]; - - expect(group).toMatchObject({ - type: "activity-group", - }); - if (!group || group.type !== "activity-group") { - return; - } - - expect(group.activities).toEqual([ + expect(feed).toMatchObject([ { - id: "activity-latest", - createdAt: "2026-04-01T00:00:03.000Z", - summary: "Runtime warning", - detail: null, - status: null, + type: "activity-group", + turnId: "turn-old", + activities: [{ id: "activity-old", turnId: "turn-old" }], + }, + { + type: "activity-group", + turnId: "turn-latest", + activities: [{ id: "activity-latest", turnId: "turn-latest" }], }, ]); }); @@ -163,10 +158,201 @@ describe("buildThreadFeed", () => { { id: "tool-completed", createdAt: "2026-04-01T00:00:02.000Z", + turnId: "turn-1", summary: "Run tests", detail: "bun run test", - status: null, + fullDetail: null, + copyText: "Run tests\nbun run test", + toolLike: true, + status: "success", }, ]); }); + + it("folds settled turn work while leaving the terminal answer visible", () => { + const turnId = TurnId.make("turn-1"); + const thread = makeThread({ + id: ThreadId.make("thread-3"), + projectId: ProjectId.make("project-1"), + title: "Folded work", + latestTurn: { + turnId, + state: "completed", + requestedAt: "2026-04-01T00:00:00.000Z", + startedAt: "2026-04-01T00:00:01.000Z", + completedAt: "2026-04-01T00:00:18.000Z", + assistantMessageId: MessageId.make("assistant-final"), + }, + messages: [ + { + id: MessageId.make("assistant-commentary"), + role: "assistant", + text: "I am checking.", + turnId, + streaming: false, + createdAt: "2026-04-01T00:00:02.000Z", + updatedAt: "2026-04-01T00:00:03.000Z", + }, + { + id: MessageId.make("assistant-final"), + role: "assistant", + text: "Done.", + turnId, + streaming: false, + createdAt: "2026-04-01T00:00:17.000Z", + updatedAt: "2026-04-01T00:00:18.000Z", + }, + ], + activities: [ + makeActivity({ + id: EventId.make("tool-completed"), + kind: "tool.completed", + tone: "tool", + summary: "Read files", + createdAt: "2026-04-01T00:00:05.000Z", + turnId, + payload: { + title: "Read files", + itemType: "file_read", + status: "completed", + }, + }), + ], + }); + + const feed = buildThreadFeed(thread, [], null); + const collapsed = deriveThreadFeedPresentation(feed, thread.latestTurn, new Set()); + expect(collapsed.map((entry) => entry.id)).toEqual(["turn-fold:turn-1", "assistant-final"]); + expect(collapsed[0]).toMatchObject({ + type: "turn-fold", + label: "Worked for 17s", + expanded: false, + }); + + const expanded = deriveThreadFeedPresentation(feed, thread.latestTurn, new Set([turnId])); + expect(expanded.map((entry) => entry.id)).toEqual([ + "turn-fold:turn-1", + "assistant-commentary", + "tool-completed", + "assistant-final", + ]); + }); + + it("measures a steer-superseded turn from its user boundary through trailing work", () => { + const firstTurnId = TurnId.make("turn-1"); + const secondTurnId = TurnId.make("turn-2"); + const thread = makeThread({ + id: ThreadId.make("thread-steered"), + projectId: ProjectId.make("project-1"), + title: "Steered work", + latestTurn: { + turnId: secondTurnId, + state: "running", + requestedAt: "2026-04-01T00:00:14.000Z", + startedAt: "2026-04-01T00:00:14.000Z", + completedAt: null, + assistantMessageId: MessageId.make("assistant-next"), + }, + messages: [ + { + id: MessageId.make("user-1"), + role: "user", + text: "Do it once more.", + turnId: null, + streaming: false, + createdAt: "2026-04-01T00:00:00.000Z", + updatedAt: "2026-04-01T00:00:00.000Z", + }, + { + id: MessageId.make("assistant-commentary"), + role: "assistant", + text: "Kicking off call 1.", + turnId: firstTurnId, + streaming: false, + createdAt: "2026-04-01T00:00:09.000Z", + updatedAt: "2026-04-01T00:00:09.000Z", + }, + { + id: MessageId.make("user-2"), + role: "user", + text: "Actually do 15.", + turnId: null, + streaming: false, + createdAt: "2026-04-01T00:00:14.000Z", + updatedAt: "2026-04-01T00:00:14.000Z", + }, + { + id: MessageId.make("assistant-next"), + role: "assistant", + text: "One down - adjusting.", + turnId: secondTurnId, + streaming: true, + createdAt: "2026-04-01T00:00:17.000Z", + updatedAt: "2026-04-01T00:00:17.000Z", + }, + ], + activities: [ + makeActivity({ + id: EventId.make("work-1"), + kind: "tool.completed", + tone: "tool", + summary: "Ran command", + createdAt: "2026-04-01T00:00:12.000Z", + turnId: firstTurnId, + payload: { + title: "Ran command", + itemType: "command_execution", + status: "completed", + }, + }), + ], + }); + + const feed = buildThreadFeed(thread, [], null); + const collapsed = deriveThreadFeedPresentation(feed, thread.latestTurn, new Set()); + expect(collapsed.find((entry) => entry.type === "turn-fold")).toMatchObject({ + turnId: firstTurnId, + label: "Worked for 12s", + }); + }); + + it("keeps an active turn expanded and classifies error-shaped tool output", () => { + const turnId = TurnId.make("turn-running"); + const thread = makeThread({ + id: ThreadId.make("thread-4"), + projectId: ProjectId.make("project-1"), + title: "Running work", + latestTurn: { + turnId, + state: "running", + requestedAt: "2026-04-01T00:00:00.000Z", + startedAt: "2026-04-01T00:00:01.000Z", + completedAt: null, + assistantMessageId: null, + }, + activities: [ + makeActivity({ + id: EventId.make("tool-failed"), + kind: "tool.completed", + tone: "tool", + summary: "Run command", + createdAt: "2026-04-01T00:00:05.000Z", + turnId, + payload: { + title: "Run command", + itemType: "command_execution", + detail: "zsh: command not found: nope", + status: "completed", + }, + }), + ], + }); + + const feed = buildThreadFeed(thread, [], null); + expect(deriveThreadFeedPresentation(feed, thread.latestTurn, new Set())).toEqual(feed); + expect(feed[0]).toMatchObject({ + type: "activity-group", + activities: [{ status: "failure" }], + }); + }); }); diff --git a/apps/mobile/src/lib/threadActivity.ts b/apps/mobile/src/lib/threadActivity.ts index 6ff27cadfe..e5fdb43995 100644 --- a/apps/mobile/src/lib/threadActivity.ts +++ b/apps/mobile/src/lib/threadActivity.ts @@ -3,13 +3,15 @@ import type { CommandId, EnvironmentId, MessageId, + OrchestrationLatestTurn, OrchestrationThread, OrchestrationThreadActivity, - TurnId, ToolLifecycleItemType, ThreadId, + TurnId, UserInputQuestion, } from "@t3tools/contracts"; +import { formatDuration } from "@t3tools/shared/orchestrationTiming"; import type { DraftComposerImageAttachment } from "./composerImages"; import * as Arr from "effect/Array"; @@ -46,14 +48,21 @@ export interface QueuedThreadMessage { export interface ThreadFeedActivity { readonly id: string; readonly createdAt: string; + readonly turnId: TurnId | null; readonly summary: string; readonly detail: string | null; - readonly status: string | null; + readonly fullDetail: string | null; + readonly copyText: string; + readonly toolLike: boolean; + readonly status: "success" | "failure" | "neutral" | null; } +type WorkLogToolLifecycleStatus = "inProgress" | "completed" | "failed" | "declined" | "stopped"; + interface WorkLogEntry { id: string; createdAt: string; + turnId: TurnId | null; label: string; detail?: string; command?: string; @@ -63,6 +72,7 @@ interface WorkLogEntry { toolTitle?: string; itemType?: ToolLifecycleItemType; requestKind?: PendingApproval["requestKind"]; + toolLifecycleStatus?: WorkLogToolLifecycleStatus; } interface DerivedWorkLogEntry extends WorkLogEntry { @@ -88,6 +98,7 @@ type RawThreadFeedEntry = readonly type: "activity"; readonly id: string; readonly createdAt: string; + readonly turnId: TurnId | null; readonly activity: ThreadFeedActivity; }; @@ -97,9 +108,23 @@ export type ThreadFeedEntry = readonly type: "activity-group"; readonly id: string; readonly createdAt: string; + readonly turnId: TurnId | null; readonly activities: ReadonlyArray; + } + | { + readonly type: "turn-fold"; + readonly id: string; + readonly createdAt: string; + readonly turnId: TurnId; + readonly label: string; + readonly expanded: boolean; }; +export type ThreadFeedLatestTurn = Pick< + OrchestrationLatestTurn, + "turnId" | "state" | "startedAt" | "completedAt" +>; + function requestKindFromRequestType(requestType: unknown): PendingApproval["requestKind"] | null { switch (requestType) { case "command_execution_approval": @@ -202,14 +227,12 @@ function resolvePendingUserInputAnswer( function deriveWorkLogEntries( activities: ReadonlyArray, - latestTurnId: TurnId | undefined, ): WorkLogEntry[] { const ordered = Arr.sort(activities, activityOrder); const entries: DerivedWorkLogEntry[] = []; for (const activity of ordered) { - if (latestTurnId && activity.turnId !== latestTurnId) continue; if (activity.kind === "tool.started") continue; - if (activity.kind === "task.started" || activity.kind === "task.completed") continue; + if (activity.kind === "task.started") continue; if (activity.kind === "context-window.updated") continue; if (activity.summary === "Checkpoint captured") continue; if (isPlanBoundaryToolActivity(activity)) continue; @@ -240,16 +263,40 @@ function toDerivedWorkLogEntry(activity: OrchestrationThreadActivity): DerivedWo const commandPreview = extractToolCommand(payload); const changedFiles = extractChangedFiles(payload); const title = extractToolTitle(payload); + const isTaskActivity = activity.kind === "task.progress" || activity.kind === "task.completed"; + const taskSummary = + isTaskActivity && typeof payload?.summary === "string" && payload.summary.length > 0 + ? payload.summary + : null; + const taskDetailAsLabel = + isTaskActivity && + !taskSummary && + typeof payload?.detail === "string" && + payload.detail.length > 0 + ? payload.detail + : null; + const taskLabel = taskSummary || taskDetailAsLabel; const entry: DerivedWorkLogEntry = { id: activity.id, createdAt: activity.createdAt, - label: activity.summary, - tone: activity.tone === "approval" ? "info" : activity.tone, + turnId: activity.turnId, + label: taskLabel || activity.summary, + tone: + activity.kind === "task.progress" + ? "thinking" + : activity.tone === "approval" + ? "info" + : activity.tone, activityKind: activity.kind, }; const itemType = extractWorkLogItemType(payload); const requestKind = extractWorkLogRequestKind(payload); - if (payload && typeof payload.detail === "string" && payload.detail.length > 0) { + if ( + !taskDetailAsLabel && + payload && + typeof payload.detail === "string" && + payload.detail.length > 0 + ) { const detail = stripTrailingExitCode(payload.detail).output; if (detail) { entry.detail = detail; @@ -273,6 +320,13 @@ function toDerivedWorkLogEntry(activity: OrchestrationThreadActivity): DerivedWo if (requestKind) { entry.requestKind = requestKind; } + let toolLifecycleStatus = extractWorkLogToolLifecycleStatus(payload); + if (!toolLifecycleStatus && activity.kind === "tool.completed") { + toolLifecycleStatus = "completed"; + } + if (toolLifecycleStatus) { + entry.toolLifecycleStatus = toolLifecycleStatus; + } const collapseKey = deriveToolLifecycleCollapseKey(entry); if (collapseKey) { entry.collapseKey = collapseKey; @@ -323,6 +377,7 @@ function mergeDerivedWorkLogEntries( const itemType = next.itemType ?? previous.itemType; const requestKind = next.requestKind ?? previous.requestKind; const collapseKey = next.collapseKey ?? previous.collapseKey; + const toolLifecycleStatus = next.toolLifecycleStatus ?? previous.toolLifecycleStatus; return { ...previous, ...next, @@ -334,6 +389,7 @@ function mergeDerivedWorkLogEntries( ...(itemType ? { itemType } : {}), ...(requestKind ? { requestKind } : {}), ...(collapseKey ? { collapseKey } : {}), + ...(toolLifecycleStatus ? { toolLifecycleStatus } : {}), }; } @@ -365,6 +421,78 @@ function normalizeCompactToolLabel(value: string): string { return value.replace(/\s+(?:complete|completed)\s*$/i, "").trim(); } +function workLogEntryIsToolLike(entry: WorkLogEntry): boolean { + if (entry.tone === "tool" || entry.tone === "thinking" || entry.tone === "error") { + return true; + } + if (entry.command !== undefined && entry.command.trim().length > 0) { + return true; + } + if (entry.requestKind !== undefined) { + return true; + } + return entry.itemType !== undefined && isToolLifecycleItemType(entry.itemType); +} + +function toolDetailTextLooksLikeFailure(text: string): boolean { + const normalized = text.toLowerCase(); + return ( + normalized.includes("file not found") || + normalized.includes("no files found") || + normalized.includes("enoent") || + normalized.includes("no such file or directory") || + normalized.includes("no such file") || + normalized.includes("commandnotfoundexception") || + normalized.includes("command not found") || + (normalized.includes("cannot find path") && normalized.includes("because it does not exist")) || + (normalized.includes("is not recognized") && normalized.includes("the term '")) || + //i.test(text) || + /exit(?:ed)? with exit code\s+[1-9]\d*/i.test(text) || + /exit code\s*[:\s]\s*[1-9]\d*\b/i.test(text) + ); +} + +function workEntryIndicatesToolFailure(entry: WorkLogEntry): boolean { + if (entry.tone === "error") { + return true; + } + if (entry.toolLifecycleStatus === "failed" || entry.toolLifecycleStatus === "declined") { + return true; + } + if (!workLogEntryIsToolLike(entry)) { + return false; + } + return toolDetailTextLooksLikeFailure([entry.detail, entry.command].filter(Boolean).join("\n")); +} + +function workEntryIndicatesToolSuccess(entry: WorkLogEntry): boolean { + if (!workLogEntryIsToolLike(entry) || workEntryIndicatesToolFailure(entry)) { + return false; + } + if (entry.tone === "thinking") { + return false; + } + return ( + entry.toolLifecycleStatus !== "inProgress" && + entry.toolLifecycleStatus !== "stopped" && + entry.toolLifecycleStatus !== "failed" && + entry.toolLifecycleStatus !== "declined" + ); +} + +function workEntryStatus(entry: WorkLogEntry): ThreadFeedActivity["status"] { + if (!workLogEntryIsToolLike(entry)) { + return null; + } + if (workEntryIndicatesToolFailure(entry)) { + return "failure"; + } + if (workEntryIndicatesToolSuccess(entry)) { + return "success"; + } + return "neutral"; +} + function workEntryPreview( workEntry: Pick, ): string | null { @@ -592,6 +720,22 @@ function extractToolTitle(payload: Record | null): string | nul return asTrimmedString(payload?.title); } +function extractWorkLogToolLifecycleStatus( + payload: Record | null, +): WorkLogToolLifecycleStatus | undefined { + const status = payload?.status; + if ( + status === "inProgress" || + status === "completed" || + status === "failed" || + status === "declined" || + status === "stopped" + ) { + return status; + } + return undefined; +} + function stripTrailingExitCode(value: string): { output: string | null; exitCode?: number | undefined; @@ -743,7 +887,7 @@ function groupAdjacentActivities(entries: ReadonlyArray): Th } const previous = grouped.at(-1); - if (previous?.type === "activity-group") { + if (previous?.type === "activity-group" && previous.turnId === entry.turnId) { grouped[grouped.length - 1] = { ...previous, activities: [...previous.activities, entry.activity], @@ -755,6 +899,7 @@ function groupAdjacentActivities(entries: ReadonlyArray): Th type: "activity-group", id: entry.id, createdAt: entry.createdAt, + turnId: entry.turnId, activities: [entry.activity], }); } @@ -762,6 +907,179 @@ function groupAdjacentActivities(entries: ReadonlyArray): Th return grouped; } +function computeElapsedMs(startIso: string, endIso: string): number | null { + const start = Date.parse(startIso); + const end = Date.parse(endIso); + if (!Number.isFinite(start) || !Number.isFinite(end)) { + return null; + } + return Math.max(0, end - start); +} + +function maxIsoTimestamp(a: string | null, b: string | null): string | null { + if (a === null) return b; + if (b === null) return a; + const aMs = Date.parse(a); + const bMs = Date.parse(b); + if (!Number.isFinite(aMs)) return b; + if (!Number.isFinite(bMs)) return a; + return bMs > aMs ? b : a; +} + +function deriveUnsettledTurnId(latestTurn: ThreadFeedLatestTurn | null): TurnId | null { + if (!latestTurn) { + return null; + } + const settled = latestTurn.completedAt !== null && latestTurn.state !== "running"; + return settled ? null : latestTurn.turnId; +} + +interface ThreadFeedTurnFold { + readonly turnId: TurnId; + readonly createdAt: string; + readonly hiddenEntryIds: ReadonlySet; + readonly label: string; +} + +function deriveThreadFeedTurnFolds( + feed: ReadonlyArray, + latestTurn: ThreadFeedLatestTurn | null, +): ReadonlyMap { + const terminalAssistantMessageIdByTurn = new Map(); + for (const entry of feed) { + if (entry.type === "message" && entry.message.role === "assistant" && entry.message.turnId) { + terminalAssistantMessageIdByTurn.set(entry.message.turnId, entry.id); + } + } + + interface TurnGroup { + readonly entries: ThreadFeedEntry[]; + readonly startBoundary: string | null; + } + const groupsByTurnId = new Map(); + let pendingUserBoundary: string | null = null; + for (const entry of feed) { + if (entry.type === "message" && entry.message.role === "user") { + pendingUserBoundary = entry.message.createdAt; + continue; + } + const turnId = + entry.type === "message" && entry.message.role === "assistant" + ? entry.message.turnId + : entry.type === "activity-group" + ? entry.turnId + : null; + if (!turnId) { + continue; + } + let group = groupsByTurnId.get(turnId); + if (!group) { + group = { + entries: [], + startBoundary: pendingUserBoundary, + }; + pendingUserBoundary = null; + groupsByTurnId.set(turnId, group); + } + group.entries.push(entry); + } + + const unsettledTurnId = deriveUnsettledTurnId(latestTurn); + const foldsByAnchorId = new Map(); + for (const [turnId, group] of groupsByTurnId) { + const { entries } = group; + if (turnId === unsettledTurnId) { + continue; + } + if (entries.some((entry) => entry.type === "message" && entry.message.streaming)) { + continue; + } + + const terminalAssistantMessageId = terminalAssistantMessageIdByTurn.get(turnId); + const hiddenEntryIds = new Set( + entries.filter((entry) => entry.id !== terminalAssistantMessageId).map((entry) => entry.id), + ); + if (hiddenEntryIds.size === 0) { + continue; + } + + const firstEntry = entries[0]; + const lastEntry = entries.at(-1); + if (!firstEntry || !lastEntry) { + continue; + } + const terminalEntry = terminalAssistantMessageId + ? entries.find((entry) => entry.id === terminalAssistantMessageId) + : null; + const latestTurnMatches = latestTurn?.turnId === turnId; + const lastEntryEnd = + lastEntry.type === "message" ? lastEntry.message.updatedAt : lastEntry.createdAt; + const elapsedMs = + latestTurnMatches && latestTurn.startedAt && latestTurn.completedAt + ? computeElapsedMs(latestTurn.startedAt, latestTurn.completedAt) + : computeElapsedMs( + group.startBoundary ?? firstEntry.createdAt, + maxIsoTimestamp( + terminalEntry?.type === "message" ? terminalEntry.message.updatedAt : null, + lastEntryEnd, + ) ?? lastEntryEnd, + ); + const duration = elapsedMs === null ? null : formatDuration(elapsedMs); + const interrupted = latestTurnMatches && latestTurn.state === "interrupted"; + const label = interrupted + ? duration + ? `You stopped after ${duration}` + : "You stopped this response" + : duration + ? `Worked for ${duration}` + : "Worked"; + + foldsByAnchorId.set(firstEntry.id, { + turnId, + createdAt: firstEntry.createdAt, + hiddenEntryIds, + label, + }); + } + return foldsByAnchorId; +} + +export function deriveThreadFeedPresentation( + feed: ReadonlyArray, + latestTurn: ThreadFeedLatestTurn | null, + expandedTurnIds: ReadonlySet, +): ThreadFeedEntry[] { + const sourceFeed = feed.filter((entry) => entry.type !== "turn-fold"); + const foldsByAnchorId = deriveThreadFeedTurnFolds(sourceFeed, latestTurn); + const collapsedEntryIds = new Set(); + for (const fold of foldsByAnchorId.values()) { + if (!expandedTurnIds.has(fold.turnId)) { + for (const entryId of fold.hiddenEntryIds) { + collapsedEntryIds.add(entryId); + } + } + } + + const result: ThreadFeedEntry[] = []; + for (const entry of sourceFeed) { + const fold = foldsByAnchorId.get(entry.id); + if (fold) { + result.push({ + type: "turn-fold", + id: `turn-fold:${fold.turnId}`, + createdAt: fold.createdAt, + turnId: fold.turnId, + label: fold.label, + expanded: expandedTurnIds.has(fold.turnId), + }); + } + if (!collapsedEntryIds.has(entry.id)) { + result.push(entry); + } + } + return result; +} + export function derivePendingApprovals( activities: ReadonlyArray, ): PendingApproval[] { @@ -893,10 +1211,7 @@ export function buildThreadFeed( const loadedMessages = options?.loadedMessages ?? thread.messages; const oldestLoadedMessageCreatedAt = options?.loadedMessages !== undefined ? (loadedMessages[0]?.createdAt ?? null) : null; - const workLogEntries = deriveWorkLogEntries( - thread.activities, - thread.latestTurn?.turnId ?? undefined, - ); + const workLogEntries = deriveWorkLogEntries(thread.activities); const entries = Arr.sortWith( [ ...loadedMessages.map((message) => ({ @@ -921,18 +1236,36 @@ export function buildThreadFeed( oldestLoadedMessageCreatedAt === null || entry.createdAt >= oldestLoadedMessageCreatedAt ); }) - .map((entry) => ({ - type: "activity", - id: entry.id, - createdAt: entry.createdAt, - activity: { + .map((entry) => { + const summary = workEntryHeading(entry); + const detail = workEntryPreview(entry); + const normalizedFullDetail = entry.detail + ? unwrapKnownShellCommandWrapper(entry.detail) + : null; + const fullDetail = + normalizedFullDetail && normalizedFullDetail !== detail ? normalizedFullDetail : null; + return { + type: "activity", id: entry.id, createdAt: entry.createdAt, - summary: workEntryHeading(entry), - detail: workEntryPreview(entry), - status: null, - }, - })), + turnId: entry.turnId, + activity: { + id: entry.id, + createdAt: entry.createdAt, + turnId: entry.turnId, + summary, + detail, + fullDetail, + copyText: [summary, detail, fullDetail] + .filter((value, index, values): value is string => { + return Boolean(value) && values.indexOf(value) === index; + }) + .join("\n"), + toolLike: workLogEntryIsToolLike(entry), + status: workEntryStatus(entry), + }, + }; + }), ], (s) => new Date(s.createdAt), Order.Date, diff --git a/apps/mobile/src/lib/threadFeedLayout.test.ts b/apps/mobile/src/lib/threadFeedLayout.test.ts new file mode 100644 index 0000000000..73f113eac3 --- /dev/null +++ b/apps/mobile/src/lib/threadFeedLayout.test.ts @@ -0,0 +1,32 @@ +import { describe, expect, it } from "vite-plus/test"; + +import { + isThreadFeedNearEnd, + resolveThreadFeedBottomInset, + threadFeedDistanceFromEnd, +} from "./threadFeedLayout"; + +describe("thread feed layout", () => { + it("accounts for the bottom inset when measuring distance from the end", () => { + const metrics = { + contentHeight: 900, + viewportHeight: 600, + offsetY: 380, + bottomInset: 100, + }; + + expect(threadFeedDistanceFromEnd(metrics)).toBe(20); + expect(isThreadFeedNearEnd(metrics, 50)).toBe(true); + expect(isThreadFeedNearEnd(metrics, 10)).toBe(false); + }); + + it("does not double count chrome already included in the measured composer overlay", () => { + expect( + resolveThreadFeedBottomInset({ + estimatedOverlayHeight: 162, + measuredOverlayHeight: 182, + gap: 8, + }), + ).toBe(190); + }); +}); diff --git a/apps/mobile/src/lib/threadFeedLayout.ts b/apps/mobile/src/lib/threadFeedLayout.ts new file mode 100644 index 0000000000..de7946f866 --- /dev/null +++ b/apps/mobile/src/lib/threadFeedLayout.ts @@ -0,0 +1,22 @@ +export interface ThreadFeedScrollMetrics { + readonly contentHeight: number; + readonly viewportHeight: number; + readonly offsetY: number; + readonly bottomInset: number; +} + +export function threadFeedDistanceFromEnd(metrics: ThreadFeedScrollMetrics): number { + return metrics.contentHeight + metrics.bottomInset - metrics.viewportHeight - metrics.offsetY; +} + +export function isThreadFeedNearEnd(metrics: ThreadFeedScrollMetrics, threshold: number): boolean { + return threadFeedDistanceFromEnd(metrics) <= threshold; +} + +export function resolveThreadFeedBottomInset(input: { + readonly estimatedOverlayHeight: number; + readonly measuredOverlayHeight: number; + readonly gap: number; +}): number { + return Math.max(input.estimatedOverlayHeight, input.measuredOverlayHeight) + input.gap; +} diff --git a/apps/mobile/src/native/SelectableMarkdownText.ios.tsx b/apps/mobile/src/native/SelectableMarkdownText.ios.tsx new file mode 100644 index 0000000000..488766f369 --- /dev/null +++ b/apps/mobile/src/native/SelectableMarkdownText.ios.tsx @@ -0,0 +1,21 @@ +import { + SelectableMarkdownText as T3SelectableMarkdownText, + type SelectableMarkdownTextProps, +} from "@t3tools/mobile-markdown-text/renderer"; + +import { highlightCodeSnippet } from "../features/review/shikiReviewHighlighter"; + +type MobileSelectableMarkdownTextProps = Omit; + +export type { + NativeMarkdownTextStyle, + SelectableMarkdownSkill, +} from "@t3tools/mobile-markdown-text/types"; + +export function hasNativeSelectableMarkdownText(): boolean { + return true; +} + +export function SelectableMarkdownText(props: MobileSelectableMarkdownTextProps) { + return ; +} diff --git a/apps/mobile/src/native/SelectableMarkdownText.tsx b/apps/mobile/src/native/SelectableMarkdownText.tsx new file mode 100644 index 0000000000..403f32a1de --- /dev/null +++ b/apps/mobile/src/native/SelectableMarkdownText.tsx @@ -0,0 +1,16 @@ +import type { SelectableMarkdownTextProps } from "@t3tools/mobile-markdown-text/renderer"; + +type MobileSelectableMarkdownTextProps = Omit; + +export type { + NativeMarkdownTextStyle, + SelectableMarkdownSkill, +} from "@t3tools/mobile-markdown-text/types"; + +export function hasNativeSelectableMarkdownText(): boolean { + return false; +} + +export function SelectableMarkdownText(_props: MobileSelectableMarkdownTextProps) { + return null; +} diff --git a/apps/mobile/src/native/T3ComposerEditor.ios.tsx b/apps/mobile/src/native/T3ComposerEditor.ios.tsx new file mode 100644 index 0000000000..6778b0455d --- /dev/null +++ b/apps/mobile/src/native/T3ComposerEditor.ios.tsx @@ -0,0 +1,180 @@ +import { collectComposerInlineTokens } from "@t3tools/shared/composerInlineTokens"; +import { requireNativeView } from "expo"; +import { useImperativeHandle, useMemo, useRef, type Ref } from "react"; +import type { NativeSyntheticEvent, StyleProp, ViewProps, ViewStyle } from "react-native"; +import { Image, StyleSheet } from "react-native"; + +import { markdownFileIconSource } from "@t3tools/mobile-markdown-text/file-icons"; +import { resolveMarkdownFileIcon } from "@t3tools/mobile-markdown-text/links"; +import { useThemeColor } from "../lib/useThemeColor"; +import type { ComposerEditorProps, ComposerEditorSelection } from "./T3ComposerEditor.types"; + +const NATIVE_MODULE_NAME = "T3ComposerEditor"; +const EMPTY_SKILLS: NonNullable = []; + +type NativeEditorEvent = NativeSyntheticEvent<{ + readonly value: string; + readonly selection: ComposerEditorSelection; +}>; + +type NativeSelectionEvent = NativeSyntheticEvent<{ + readonly selection: ComposerEditorSelection; +}>; + +type NativePasteImagesEvent = NativeSyntheticEvent<{ + readonly uris: ReadonlyArray; +}>; + +interface NativeComposerEditorRef { + focus: () => Promise; + blur: () => Promise; + setSelection: (start: number, end: number) => Promise; +} + +interface NativeComposerEditorProps extends ViewProps { + readonly ref?: Ref; + readonly value: string; + readonly tokensJson: string; + readonly selectionJson: string; + readonly themeJson: string; + readonly placeholder: string; + readonly fontFamily: string; + readonly fontSize: number; + readonly lineHeight: number; + readonly contentInsetVertical: number; + readonly editable: boolean; + readonly scrollEnabled: boolean; + readonly autoFocus: boolean; + readonly autoCorrect: boolean; + readonly spellCheck: boolean; + readonly onComposerChange: (event: NativeEditorEvent) => void; + readonly onComposerSelectionChange?: (event: NativeSelectionEvent) => void; + readonly onComposerPasteImages?: (event: NativePasteImagesEvent) => void; + readonly onComposerFocus?: () => void; + readonly onComposerBlur?: () => void; +} + +const NativeView = requireNativeView(NATIVE_MODULE_NAME); + +function basename(path: string): string { + const separator = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\")); + return separator >= 0 ? path.slice(separator + 1) : path; +} + +function fileIconUri(path: string): string { + return Image.resolveAssetSource(markdownFileIconSource(resolveMarkdownFileIcon(path))).uri; +} + +export function ComposerEditor({ + ref, + skills = EMPTY_SKILLS, + selection, + style, + textStyle, + onChangeText, + onSelectionChange, + onPasteImages, + onFocus, + onBlur, + contentInsetVertical = 0, + ...props +}: ComposerEditorProps) { + const nativeRef = useRef(null); + const confirmedTokensRef = useRef(collectComposerInlineTokens(props.value)); + const textColor = useThemeColor("--color-foreground"); + const placeholderColor = useThemeColor("--color-placeholder"); + const chipBackground = useThemeColor("--color-subtle"); + const chipBorder = useThemeColor("--color-border"); + const chipText = useThemeColor("--color-foreground"); + const skillBackground = useThemeColor("--color-inline-skill-background"); + const skillBorder = useThemeColor("--color-inline-skill-border"); + const skillText = useThemeColor("--color-inline-skill-foreground"); + const fileTint = useThemeColor("--color-icon-muted"); + + useImperativeHandle( + ref, + () => ({ + focus: () => void nativeRef.current?.focus(), + blur: () => void nativeRef.current?.blur(), + setSelection: (nextSelection) => + void nativeRef.current?.setSelection(nextSelection.start, nextSelection.end), + }), + [], + ); + + const skillLabels = useMemo( + () => new Map(skills.map((skill) => [skill.name, skill.displayName?.trim() || skill.name])), + [skills], + ); + const tokensJson = useMemo(() => { + const tokens = collectComposerInlineTokens(props.value, { + preserveTrailingFrom: confirmedTokensRef.current, + }); + confirmedTokensRef.current = tokens; + return JSON.stringify( + tokens.map((token) => ({ + type: token.type, + source: token.source, + start: token.start, + end: token.end, + label: + token.type === "skill" + ? (skillLabels.get(token.value) ?? token.value) + : basename(token.value), + iconUri: token.type === "mention" ? fileIconUri(token.value) : null, + })), + ); + }, [props.value, skillLabels]); + const themeJson = JSON.stringify({ + text: String(textColor), + placeholder: String(placeholderColor), + chipBackground: String(chipBackground), + chipBorder: String(chipBorder), + chipText: String(chipText), + skillBackground: String(skillBackground), + skillBorder: String(skillBorder), + skillText: String(skillText), + fileTint: String(fileTint), + }); + const resolvedTextStyle = StyleSheet.flatten(textStyle) ?? {}; + return ( + } + onComposerChange={(event) => { + onChangeText(event.nativeEvent.value); + onSelectionChange?.(event.nativeEvent.selection); + }} + onComposerSelectionChange={(event) => onSelectionChange?.(event.nativeEvent.selection)} + onComposerPasteImages={(event) => onPasteImages?.(event.nativeEvent.uris)} + onComposerFocus={onFocus} + onComposerBlur={onBlur} + /> + ); +} + +export type { + ComposerEditorHandle, + ComposerEditorProps, + ComposerEditorSelection, +} from "./T3ComposerEditor.types"; diff --git a/apps/mobile/src/native/T3ComposerEditor.tsx b/apps/mobile/src/native/T3ComposerEditor.tsx new file mode 100644 index 0000000000..0f20e9e042 --- /dev/null +++ b/apps/mobile/src/native/T3ComposerEditor.tsx @@ -0,0 +1,65 @@ +import { TextInputWrapper } from "expo-paste-input"; +import { useImperativeHandle, useRef } from "react"; +import { TextInput, type TextInput as RNTextInput } from "react-native"; + +import { useThemeColor } from "../lib/useThemeColor"; +import { useNativePaste } from "../lib/useNativePaste"; +import type { ComposerEditorProps } from "./T3ComposerEditor.types"; + +export function ComposerEditor({ + ref, + skills: _skills, + selection, + onPasteImages, + style, + textStyle, + contentInsetVertical = 0, + ...props +}: ComposerEditorProps) { + const inputRef = useRef(null); + const foregroundColor = useThemeColor("--color-foreground"); + const placeholderColor = useThemeColor("--color-placeholder"); + const handlePaste = useNativePaste((uris) => onPasteImages?.(uris)); + + useImperativeHandle( + ref, + () => ({ + focus: () => inputRef.current?.focus(), + blur: () => inputRef.current?.blur(), + setSelection: (nextSelection) => + inputRef.current?.setSelection(nextSelection.start, nextSelection.end), + }), + [], + ); + + return ( + + props.onSelectionChange?.(event.nativeEvent.selection)} + multiline={props.multiline ?? true} + placeholderTextColor={placeholderColor} + style={[ + { + flex: 1, + minHeight: 0, + color: foregroundColor, + fontFamily: "DMSans_400Regular", + fontSize: 15, + lineHeight: 22, + paddingVertical: contentInsetVertical, + }, + textStyle, + ]} + /> + + ); +} + +export type { + ComposerEditorHandle, + ComposerEditorProps, + ComposerEditorSelection, +} from "./T3ComposerEditor.types"; diff --git a/apps/mobile/src/native/T3ComposerEditor.types.ts b/apps/mobile/src/native/T3ComposerEditor.types.ts new file mode 100644 index 0000000000..d70d63fa43 --- /dev/null +++ b/apps/mobile/src/native/T3ComposerEditor.types.ts @@ -0,0 +1,38 @@ +import type { ServerProviderSkill } from "@t3tools/contracts"; +import type { Ref } from "react"; +import type { StyleProp, TextStyle, ViewStyle } from "react-native"; + +export type ComposerEditorSelection = { + readonly start: number; + readonly end: number; +}; + +export interface ComposerEditorHandle { + focus: () => void; + blur: () => void; + setSelection: (selection: ComposerEditorSelection) => void; +} + +export interface ComposerEditorProps { + readonly ref?: Ref; + readonly value: string; + readonly skills?: ReadonlyArray< + Pick + >; + readonly selection?: ComposerEditorSelection; + readonly placeholder?: string; + readonly autoFocus?: boolean; + readonly editable?: boolean; + readonly scrollEnabled?: boolean; + readonly autoCorrect?: boolean; + readonly spellCheck?: boolean; + readonly multiline?: boolean; + readonly contentInsetVertical?: number; + readonly style?: StyleProp; + readonly textStyle?: StyleProp; + readonly onChangeText: (value: string) => void; + readonly onSelectionChange?: (selection: ComposerEditorSelection) => void; + readonly onPasteImages?: (uris: ReadonlyArray) => void; + readonly onFocus?: () => void; + readonly onBlur?: () => void; +} diff --git a/apps/mobile/src/widgets/AgentActivity.tsx b/apps/mobile/src/widgets/AgentActivity.tsx index 5cbd6c442f..56ada5f2a0 100644 --- a/apps/mobile/src/widgets/AgentActivity.tsx +++ b/apps/mobile/src/widgets/AgentActivity.tsx @@ -58,9 +58,9 @@ export function AgentActivity( : "now"; const activeLabel = `${props.activeCount} active`; const isLight = environment.colorScheme === "light"; - const primaryForeground = isLight ? "#0f172a" : "#ffffff"; - const secondaryForeground = isLight ? "#475569" : "#cbd5e1"; - const mutedForeground = isLight ? "#64748b" : "#94a3b8"; + const primaryForeground = isLight ? "#262626" : "#f5f5f5"; + const secondaryForeground = isLight ? "#525252" : "#a3a3a3"; + const mutedForeground = isLight ? "#737373" : "#8e8e93"; const tint = environment.isLuminanceReduced ? secondaryForeground : row0?.phase === "waiting_for_approval" || row0?.phase === "waiting_for_input" diff --git a/apps/server/integration/OrchestrationEngineHarness.integration.ts b/apps/server/integration/OrchestrationEngineHarness.integration.ts index 19a4b56417..bc1229811a 100644 --- a/apps/server/integration/OrchestrationEngineHarness.integration.ts +++ b/apps/server/integration/OrchestrationEngineHarness.integration.ts @@ -72,7 +72,7 @@ import { type TestProviderAdapterHarness, } from "./TestProviderAdapter.integration.ts"; import { deriveServerPaths, ServerConfig } from "../src/config.ts"; -import { WorkspaceEntriesLive } from "../src/workspace/Layers/WorkspaceEntries.ts"; +import * as WorkspaceEntries from "../src/workspace/WorkspaceEntries.ts"; import { WorkspacePathsLive } from "../src/workspace/Layers/WorkspacePaths.ts"; import * as VcsDriverRegistry from "../src/vcs/VcsDriverRegistry.ts"; import { VcsStatusBroadcaster } from "../src/vcs/VcsStatusBroadcaster.ts"; @@ -348,7 +348,7 @@ export const makeOrchestrationIntegrationHarness = ( }), ), Layer.provideMerge( - WorkspaceEntriesLive.pipe( + WorkspaceEntries.layer.pipe( Layer.provide(WorkspacePathsLive), Layer.provideMerge(VcsDriverRegistry.layer), Layer.provide(NodeServices.layer), diff --git a/apps/server/package.json b/apps/server/package.json index 8ef9784ba7..01003d7c17 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -27,6 +27,7 @@ "@effect/platform-node": "catalog:", "@effect/platform-node-shared": "catalog:", "@effect/sql-sqlite-bun": "catalog:", + "@ff-labs/fff-node": "0.9.4", "@opencode-ai/sdk": "^1.3.15", "@pierre/diffs": "catalog:", "effect": "catalog:", diff --git a/apps/server/src/cli/connect.ts b/apps/server/src/cli/connect.ts index 167fb75a37..54f9fd40da 100644 --- a/apps/server/src/cli/connect.ts +++ b/apps/server/src/cli/connect.ts @@ -6,6 +6,7 @@ import { } from "@t3tools/contracts"; import { RelayOkResponse } from "@t3tools/contracts/relay"; import * as RelayClient from "@t3tools/shared/relayClient"; +import { withRelayClientTracing } from "@t3tools/shared/relayTracing"; import * as Console from "effect/Console"; import * as Duration from "effect/Duration"; import * as Effect from "effect/Effect"; @@ -29,6 +30,7 @@ import * as CliState from "../cloud/CliState.ts"; import * as CliTokenManager from "../cloud/CliTokenManager.ts"; import { CLOUD_LINKED_USER_ID, RELAY_URL_SECRET } from "../cloud/config.ts"; import { relayUrlConfig } from "../cloud/publicConfig.ts"; +import { headlessRelayClientTracingLayer } from "../cloud/relayTracing.ts"; import { ServerConfig } from "../config.ts"; import { ServerEnvironmentLive } from "../environment/Layers/ServerEnvironment.ts"; import { ServerEnvironment } from "../environment/Services/ServerEnvironment.ts"; @@ -228,6 +230,7 @@ const unlinkRelayEnvironment = Effect.fn("cloud.cli.unlink_relay_environment")(f httpClient.execute, Effect.flatMap(HttpClientResponse.filterStatusOk), Effect.flatMap(HttpClientResponse.schemaBodyJson(RelayOkResponse)), + withRelayClientTracing, ); return response.ok ? ({ status: "revoked" } satisfies RelayUnlinkResult) @@ -299,6 +302,7 @@ const runCloudCommand = ( RelayClient.layerCloudflared({ baseDir: config.baseDir }), EnvironmentAuth.runtimeLayer, ServerEnvironmentLive, + headlessRelayClientTracingLayer, ).pipe( Layer.provideMerge(FetchHttpClient.layer), Layer.provideMerge(Layer.succeed(ServerConfig, config)), diff --git a/apps/server/src/cloud/http.test.ts b/apps/server/src/cloud/http.test.ts index 799ab609f4..8ea7ca06f9 100644 --- a/apps/server/src/cloud/http.test.ts +++ b/apps/server/src/cloud/http.test.ts @@ -3,13 +3,19 @@ import { describe, expect, it } from "@effect/vitest"; import * as Effect from "effect/Effect"; import * as Option from "effect/Option"; import * as PlatformError from "effect/PlatformError"; -import { HttpClient } from "effect/unstable/http"; +import * as Tracer from "effect/Tracer"; +import { HttpClient, HttpServerRequest } from "effect/unstable/http"; +import { RelayClientTracer } from "@t3tools/shared/relayTracing"; import * as EnvironmentAuth from "../auth/EnvironmentAuth.ts"; import * as ServerSecretStore from "../auth/ServerSecretStore.ts"; import { ServerEnvironment } from "../environment/Services/ServerEnvironment.ts"; import * as CliTokenManager from "./CliTokenManager.ts"; -import { consumeCloudReplayGuards, reconcileDesiredCloudLink } from "./http.ts"; +import { + consumeCloudReplayGuards, + reconcileDesiredCloudLink, + traceRelayBrokerHandler, +} from "./http.ts"; import { CloudManagedEndpointRuntime, type CloudManagedEndpointRuntimeShape, @@ -69,6 +75,38 @@ describe("consumeCloudReplayGuards", () => { ); }); +describe("traceRelayBrokerHandler", () => { + it.effect("continues the incoming relay trace with the product tracer", () => + Effect.gen(function* () { + const spans: Array = []; + const productTracer = Tracer.make({ + span: (options) => { + const span = new Tracer.NativeSpan(options); + spans.push(span); + return span; + }, + }); + const request = HttpServerRequest.fromWeb( + new Request("https://environment.example.test/api/t3-cloud/mint-credential", { + headers: { + traceparent: "00-0123456789abcdef0123456789abcdef-0123456789abcdef-01", + }, + }), + ); + + yield* traceRelayBrokerHandler(Effect.void.pipe(Effect.withSpan("relay.mint.handler"))).pipe( + Effect.provideService(HttpServerRequest.HttpServerRequest, request), + Effect.provideService(RelayClientTracer, Option.some(productTracer)), + ); + + expect(spans).toHaveLength(1); + const span = spans[0]!; + expect(span.traceId).toBe("0123456789abcdef0123456789abcdef"); + expect(Option.getOrUndefined(span.parent)?.spanId).toBe("0123456789abcdef"); + }), + ); +}); + describe("reconcileDesiredCloudLink", () => { it.effect("requires stored CLI authorization without exposing an HTTP endpoint", () => Effect.gen(function* () { diff --git a/apps/server/src/cloud/http.ts b/apps/server/src/cloud/http.ts index 896990849b..b78d47a20c 100644 --- a/apps/server/src/cloud/http.ts +++ b/apps/server/src/cloud/http.ts @@ -29,6 +29,7 @@ import { RelayLinkProofRequest, RelayManagedEndpointOrigin, } from "@t3tools/contracts/relay"; +import { withRelayClientTracing } from "@t3tools/shared/relayTracing"; import { normalizeRelayIssuer, RELAY_HEALTH_REQUEST_TYP, @@ -47,7 +48,7 @@ import * as Effect from "effect/Effect"; import * as Option from "effect/Option"; import * as Schema from "effect/Schema"; import * as HttpEffect from "effect/unstable/http/HttpEffect"; -import { HttpServerRequest, HttpServerResponse } from "effect/unstable/http"; +import { HttpServerRequest, HttpServerResponse, HttpTraceContext } from "effect/unstable/http"; import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstable/http"; import * as HttpApiBuilder from "effect/unstable/httpapi/HttpApiBuilder"; @@ -110,6 +111,19 @@ const requireRelayUrl = relayUrlConfig.pipe( ), ); +export const traceRelayBrokerHandler = ( + effect: Effect.Effect, +): Effect.Effect => + HttpServerRequest.HttpServerRequest.pipe( + Effect.flatMap((request) => + Option.match(HttpTraceContext.fromHeaders(request.headers), { + onNone: () => effect, + onSome: (parent) => effect.pipe(Effect.withParentSpan(parent)), + }), + ), + withRelayClientTracing, + ); + function bytesToString(bytes: Uint8Array): string { return new TextDecoder().decode(bytes); } @@ -512,6 +526,7 @@ const relayClientRequest = ( message: `T3 Connect relay request failed: ${String(cause)}`, }), ), + withRelayClientTracing, ); const reconcileDesiredCloudLinkWith = Effect.fn("environment.cloud.reconcileDesiredLinkWith")( @@ -938,7 +953,7 @@ export const connectHttpApiLayer = HttpApiBuilder.group( .handle("health", ({ payload }) => cloudEnvironmentHealthHandler(dependencies, payload)) .handle("mintCredential", ({ payload }) => cloudMintCredentialHandler(dependencies, payload)) .handle("t3MintCredential", ({ payload }) => - cloudMintCredentialHandler(dependencies, payload), + traceRelayBrokerHandler(cloudMintCredentialHandler(dependencies, payload)), ); }), ); diff --git a/apps/server/src/cloud/publicConfig.test.ts b/apps/server/src/cloud/publicConfig.test.ts index 558560bfff..4cce901fa5 100644 --- a/apps/server/src/cloud/publicConfig.test.ts +++ b/apps/server/src/cloud/publicConfig.test.ts @@ -2,7 +2,11 @@ import { assert, it } from "@effect/vitest"; import * as ConfigProvider from "effect/ConfigProvider"; import * as Effect from "effect/Effect"; -import { makeCloudCliOAuthConfig, makeRelayUrlConfig } from "./publicConfig.ts"; +import { + makeCloudCliOAuthConfig, + makeRelayUrlConfig, + resolveRelayClientTracingConfig, +} from "./publicConfig.ts"; const provideEnv = (env: Readonly>) => Effect.provide(ConfigProvider.layer(ConfigProvider.fromEnv({ env }))); @@ -83,3 +87,39 @@ it.effect("requires Clerk OAuth config when the server bundle has no injected va clerkCliOAuthClientIdFallback: "", }).pipe(provideEnv({}), Effect.flip), ); + +it("resolves relay client tracing from runtime config with build-time fallback", () => { + const fallback = { + tracesUrl: "https://embedded.example.test/v1/traces", + tracesDataset: "embedded-dataset", + tracesToken: "embedded-token", + }; + + assert.deepEqual(resolveRelayClientTracingConfig({}, fallback), fallback); + assert.deepEqual( + resolveRelayClientTracingConfig( + { + T3CODE_RELAY_CLIENT_OTLP_TRACES_URL: "https://runtime.example.test/v1/traces", + T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET: "runtime-dataset", + T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN: "runtime-token", + }, + fallback, + ), + { + tracesUrl: "https://runtime.example.test/v1/traces", + tracesDataset: "runtime-dataset", + tracesToken: "runtime-token", + }, + ); + assert.equal( + resolveRelayClientTracingConfig( + { + T3CODE_RELAY_CLIENT_OTLP_TRACES_URL: "http://insecure.example.test/v1/traces", + T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET: "runtime-dataset", + T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN: "runtime-token", + }, + fallback, + ), + null, + ); +}); diff --git a/apps/server/src/cloud/publicConfig.ts b/apps/server/src/cloud/publicConfig.ts index 5c64a24237..b344107d75 100644 --- a/apps/server/src/cloud/publicConfig.ts +++ b/apps/server/src/cloud/publicConfig.ts @@ -9,6 +9,9 @@ import * as SchemaIssue from "effect/SchemaIssue"; declare const __T3CODE_BUILD_RELAY_URL__: string | undefined; declare const __T3CODE_BUILD_CLERK_PUBLISHABLE_KEY__: string | undefined; declare const __T3CODE_BUILD_CLERK_CLI_OAUTH_CLIENT_ID__: string | undefined; +declare const __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_URL__: string | undefined; +declare const __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_DATASET__: string | undefined; +declare const __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_TOKEN__: string | undefined; const CLOUD_CLI_OAUTH_REDIRECT_URI = "http://127.0.0.1:34338/callback"; const CLOUD_CLI_OAUTH_SCOPES = ["openid", "profile", "email"] as const; @@ -32,6 +35,15 @@ function readBuildTimeValue(value: string | undefined): string { return typeof value === "undefined" ? "" : value.trim(); } +function normalizeSecureUrl(value: string): string | null { + try { + const url = new URL(value); + return url.protocol === "https:" ? url.toString() : null; + } catch { + return null; + } +} + export const buildTimeRelayUrl = typeof __T3CODE_BUILD_RELAY_URL__ === "undefined" ? "" @@ -46,6 +58,37 @@ export const buildTimeClerkCliOAuthClientId = readBuildTimeValue( ? undefined : __T3CODE_BUILD_CLERK_CLI_OAUTH_CLIENT_ID__, ); +export const buildTimeRelayClientTracing = { + tracesUrl: readBuildTimeValue( + typeof __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_URL__ === "undefined" + ? undefined + : __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_URL__, + ), + tracesDataset: readBuildTimeValue( + typeof __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_DATASET__ === "undefined" + ? undefined + : __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_DATASET__, + ), + tracesToken: readBuildTimeValue( + typeof __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_TOKEN__ === "undefined" + ? undefined + : __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_TOKEN__, + ), +} as const; + +export function resolveRelayClientTracingConfig( + env: Readonly> = process.env, + fallback = buildTimeRelayClientTracing, +) { + const tracesUrl = env.T3CODE_RELAY_CLIENT_OTLP_TRACES_URL?.trim() || fallback.tracesUrl; + const tracesDataset = + env.T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET?.trim() || fallback.tracesDataset; + const tracesToken = env.T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN?.trim() || fallback.tracesToken; + const normalizedTracesUrl = normalizeSecureUrl(tracesUrl); + return normalizedTracesUrl && tracesDataset && tracesToken + ? { tracesUrl: normalizedTracesUrl, tracesDataset, tracesToken } + : null; +} export function makeRelayUrlConfig(fallback = buildTimeRelayUrl) { const runtimeConfig = Config.nonEmptyString("T3CODE_RELAY_URL"); diff --git a/apps/server/src/cloud/relayTracing.ts b/apps/server/src/cloud/relayTracing.ts new file mode 100644 index 0000000000..e35c94545a --- /dev/null +++ b/apps/server/src/cloud/relayTracing.ts @@ -0,0 +1,21 @@ +import { makeRelayClientTracingLayer } from "@t3tools/shared/relayTracing"; + +import { resolveRelayClientTracingConfig } from "./publicConfig.ts"; + +const relayClientTracingConfig = resolveRelayClientTracingConfig(); + +export const headlessRelayClientTracingLayer = makeRelayClientTracingLayer( + relayClientTracingConfig, + { + serviceName: "t3-headless-relay-client", + runtime: "node", + client: "headless-cli", + }, +); + +export const serverRelayBrokerTracingLayer = makeRelayClientTracingLayer(relayClientTracingConfig, { + serviceName: "t3-server", + runtime: "node", + client: "environment-server", + component: "relay-broker", +}); diff --git a/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts b/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts index 3c9ec2cdfa..5e36f9f4ba 100644 --- a/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts +++ b/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts @@ -56,7 +56,7 @@ import { } from "../../provider/Services/ProviderService.ts"; import { checkpointRefForThreadTurn } from "../../checkpointing/Utils.ts"; import { ServerConfig } from "../../config.ts"; -import { WorkspaceEntriesLive } from "../../workspace/Layers/WorkspaceEntries.ts"; +import * as WorkspaceEntries from "../../workspace/WorkspaceEntries.ts"; import { WorkspacePathsLive } from "../../workspace/Layers/WorkspacePaths.ts"; const asProjectId = (value: string): ProjectId => ProjectId.make(value); @@ -330,7 +330,7 @@ describe("CheckpointReactor", () => { Layer.provideMerge(vcsStatusBroadcasterLayer), Layer.provideMerge(CheckpointStoreLive.pipe(Layer.provide(VcsDriverRegistry.layer))), Layer.provideMerge( - WorkspaceEntriesLive.pipe( + WorkspaceEntries.layer.pipe( Layer.provide(WorkspacePathsLive), Layer.provideMerge(VcsDriverRegistry.layer), ), diff --git a/apps/server/src/orchestration/Layers/CheckpointReactor.ts b/apps/server/src/orchestration/Layers/CheckpointReactor.ts index 40291ec4f6..48ff133f56 100644 --- a/apps/server/src/orchestration/Layers/CheckpointReactor.ts +++ b/apps/server/src/orchestration/Layers/CheckpointReactor.ts @@ -34,7 +34,7 @@ import type { CheckpointStoreError } from "../../checkpointing/Errors.ts"; import type { OrchestrationDispatchError } from "../Errors.ts"; import { isGitRepository } from "../../git/Utils.ts"; import { VcsStatusBroadcaster } from "../../vcs/VcsStatusBroadcaster.ts"; -import { WorkspaceEntries } from "../../workspace/Services/WorkspaceEntries.ts"; +import * as WorkspaceEntries from "../../workspace/WorkspaceEntries.ts"; const nowIso = Effect.map(DateTime.now, DateTime.formatIso); @@ -83,7 +83,7 @@ const make = Effect.gen(function* () { const providerService = yield* ProviderService; const checkpointStore = yield* CheckpointStore; const receiptBus = yield* RuntimeReceiptBus; - const workspaceEntries = yield* WorkspaceEntries; + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; const vcsStatusBroadcaster = yield* VcsStatusBroadcaster; const appendRevertFailureActivity = (input: { @@ -252,9 +252,9 @@ const make = Effect.gen(function* () { checkpointRef: targetCheckpointRef, }); - // Invalidate the workspace entry cache so the @-mention file picker + // Refresh the workspace entry index so the @-mention file picker // reflects files created or deleted during this turn. - yield* workspaceEntries.invalidate(input.cwd); + yield* workspaceEntries.refresh(input.cwd); const files = yield* checkpointStore .diffCheckpoints({ @@ -690,9 +690,9 @@ const make = Effect.gen(function* () { return; } - // Invalidate the workspace entry cache so the @-mention file picker + // Refresh the workspace entry index so the @-mention file picker // reflects the reverted filesystem state. - yield* workspaceEntries.invalidate(sessionRuntime.value.cwd); + yield* workspaceEntries.refresh(sessionRuntime.value.cwd); const rolledBackTurns = Math.max(0, currentTurnCount - event.payload.turnCount); if (rolledBackTurns > 0) { diff --git a/apps/server/src/relay/AgentAwarenessRelay.test.ts b/apps/server/src/relay/AgentAwarenessRelay.test.ts index bbfbd236ad..9e0ad364d9 100644 --- a/apps/server/src/relay/AgentAwarenessRelay.test.ts +++ b/apps/server/src/relay/AgentAwarenessRelay.test.ts @@ -17,6 +17,7 @@ import type { RelayAgentActivityState, } from "@t3tools/contracts/relay"; import { CommandId, ProviderInstanceId } from "@t3tools/contracts"; +import { RelayClientTracer } from "@t3tools/shared/relayTracing"; import { RELAY_ACTIVITY_PUBLISH_TYP, verifyRelayJwt } from "@t3tools/shared/relayJwt"; import { describe, expect, it } from "@effect/vitest"; import * as Deferred from "effect/Deferred"; @@ -25,6 +26,7 @@ import * as Layer from "effect/Layer"; import * as Option from "effect/Option"; import * as Queue from "effect/Queue"; import * as Stream from "effect/Stream"; +import * as Tracer from "effect/Tracer"; import * as ServerSecretStore from "../auth/ServerSecretStore.ts"; import { ServerEnvironment } from "../environment/Services/ServerEnvironment.ts"; @@ -522,6 +524,20 @@ describe.sequential("signRelayAgentActivityPublishProof", () => { const runFork = Effect.runForkWith(context); const events = yield* Queue.unbounded(); const fetchSeen = yield* Deferred.make(); + const userSpans: Array = []; + const productSpans: Array = []; + const collectingTracer = (spans: Array) => + Tracer.make({ + span: (options) => { + const span = new Tracer.NativeSpan(options); + const end = span.end.bind(span); + span.end = (endTime, exit) => { + end(endTime, exit); + spans.push(span.name); + }; + return span; + }, + }); const secrets = makeMemorySecretStore(); const now = "2026-05-25T00:00:00.000Z"; const projectId = "project-1" as ProjectId; @@ -648,6 +664,8 @@ describe.sequential("signRelayAgentActivityPublishProof", () => { const url = yield* Deferred.await(fetchSeen).pipe(Effect.timeout("2 seconds")); expect(url.origin).toBe("https://transport.example.test"); + expect(productSpans).toContain("makePublishProof"); + expect(userSpans).not.toContain("makePublishProof"); }).pipe( Effect.provide( AgentAwarenessRelay.layer.pipe( @@ -655,6 +673,8 @@ describe.sequential("signRelayAgentActivityPublishProof", () => { Layer.provideMerge(NodeServices.layer), ), ), + Effect.provideService(RelayClientTracer, Option.some(collectingTracer(productSpans))), + Effect.withTracer(collectingTracer(userSpans)), ); }), ), diff --git a/apps/server/src/relay/AgentAwarenessRelay.ts b/apps/server/src/relay/AgentAwarenessRelay.ts index 960f27e752..d02c83d563 100644 --- a/apps/server/src/relay/AgentAwarenessRelay.ts +++ b/apps/server/src/relay/AgentAwarenessRelay.ts @@ -12,6 +12,7 @@ import type { } from "@t3tools/contracts"; import { projectThreadAwareness } from "@t3tools/shared/agentAwareness"; import { makeDrainableWorker } from "@t3tools/shared/DrainableWorker"; +import { withRelayClientTracing } from "@t3tools/shared/relayTracing"; import { RELAY_ACTIVITY_PUBLISH_TYP, signRelayJwt, @@ -409,6 +410,7 @@ const make = Effect.gen(function* () { }); }), Effect.withSpan("AgentAwarenessRelay.publishThread"), + withRelayClientTracing, ); const publishActiveThreadsUnsafe = Effect.gen(function* () { diff --git a/apps/server/src/server.test.ts b/apps/server/src/server.test.ts index 834f4b49fa..034e36047d 100644 --- a/apps/server/src/server.test.ts +++ b/apps/server/src/server.test.ts @@ -51,6 +51,7 @@ import * as Option from "effect/Option"; import * as Path from "effect/Path"; import * as PubSub from "effect/PubSub"; import * as Stream from "effect/Stream"; +import * as TestClock from "effect/testing/TestClock"; import { ChildProcessSpawner } from "effect/unstable/process"; import { FetchHttpClient, @@ -118,7 +119,7 @@ import { ServerEnvironment, type ServerEnvironmentShape, } from "./environment/Services/ServerEnvironment.ts"; -import { WorkspaceEntriesLive } from "./workspace/Layers/WorkspaceEntries.ts"; +import * as WorkspaceEntries from "./workspace/WorkspaceEntries.ts"; import { WorkspaceFileSystemLive } from "./workspace/Layers/WorkspaceFileSystem.ts"; import { WorkspacePathsLive } from "./workspace/Layers/WorkspacePaths.ts"; import * as GitVcsDriver from "./vcs/GitVcsDriver.ts"; @@ -504,7 +505,7 @@ const buildAppUnderTest = (options?: { const gitManagerLayer = Layer.mock(GitManager)({ ...options?.layers?.gitManager, }); - const workspaceEntriesLayer = WorkspaceEntriesLive.pipe( + const workspaceEntriesLayer = WorkspaceEntries.layer.pipe( Layer.provide(WorkspacePathsLive), Layer.provideMerge(vcsDriverRegistryLayer), ); @@ -4355,7 +4356,43 @@ it.layer(NodeServices.layer)("server router seam", (it) => { assert.isAtLeast(response.entries.length, 1); assert.isTrue(response.entries.some((entry) => entry.path === "needle-file.ts")); assert.equal(response.truncated, false); - }).pipe(Effect.provide(NodeHttpServer.layerTest)), + }).pipe(Effect.provide(NodeHttpServer.layerTest), TestClock.withLive), + ); + + it.effect("routes websocket rpc projects.listEntries and projects.readFile", () => + Effect.gen(function* () { + const fs = yield* FileSystem.FileSystem; + const path = yield* Path.Path; + const workspaceDir = yield* fs.makeTempDirectoryScoped({ prefix: "t3-ws-project-files-" }); + yield* fs.makeDirectory(path.join(workspaceDir, "src"), { recursive: true }); + yield* fs.writeFileString( + path.join(workspaceDir, "src", "index.ts"), + "export const answer = 42;\n", + ); + + yield* buildAppUnderTest(); + + const wsUrl = yield* getWsServerUrl("/ws"); + const response = yield* Effect.scoped( + withWsRpcClient(wsUrl, (client) => + Effect.all({ + listing: client[WS_METHODS.projectsListEntries]({ cwd: workspaceDir }), + file: client[WS_METHODS.projectsReadFile]({ + cwd: workspaceDir, + relativePath: "src/index.ts", + }), + }), + ), + ); + + assert.isTrue(response.listing.entries.some((entry) => entry.path === "src/index.ts")); + assert.deepEqual(response.file, { + relativePath: "src/index.ts", + contents: "export const answer = 42;\n", + byteLength: 26, + truncated: false, + }); + }).pipe(Effect.provide(NodeHttpServer.layerTest), TestClock.withLive), ); it.effect("routes websocket rpc projects.searchEntries excludes gitignored files", () => @@ -4412,7 +4449,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => { assert.equal(response.entries.length, 0); assert.equal(response.truncated, false); - }).pipe(Effect.provide(NodeHttpServer.layerTest)), + }).pipe(Effect.provide(NodeHttpServer.layerTest), TestClock.withLive), ); it.effect("routes websocket rpc projects.searchEntries errors", () => diff --git a/apps/server/src/server.ts b/apps/server/src/server.ts index cd4e114879..42a692c539 100644 --- a/apps/server/src/server.ts +++ b/apps/server/src/server.ts @@ -54,7 +54,7 @@ import { ProviderRegistryLive } from "./provider/Layers/ProviderRegistry.ts"; import { ServerSettingsLive } from "./serverSettings.ts"; import { ProjectFaviconResolverLive } from "./project/Layers/ProjectFaviconResolver.ts"; import { RepositoryIdentityResolverLive } from "./project/Layers/RepositoryIdentityResolver.ts"; -import { WorkspaceEntriesLive } from "./workspace/Layers/WorkspaceEntries.ts"; +import * as WorkspaceEntries from "./workspace/WorkspaceEntries.ts"; import { WorkspaceFileSystemLive } from "./workspace/Layers/WorkspaceFileSystem.ts"; import { WorkspacePathsLive } from "./workspace/Layers/WorkspacePaths.ts"; import * as GitVcsDriver from "./vcs/GitVcsDriver.ts"; @@ -74,6 +74,7 @@ import { authHttpApiLayer, environmentAuthenticatedAuthLayer } from "./auth/http import * as ServerSecretStore from "./auth/ServerSecretStore.ts"; import * as EnvironmentAuth from "./auth/EnvironmentAuth.ts"; import { connectHttpApiLayer, reconcileDesiredCloudLink } from "./cloud/http.ts"; +import { serverRelayBrokerTracingLayer } from "./cloud/relayTracing.ts"; import * as CloudManagedEndpointRuntime from "./cloud/ManagedEndpointRuntime.ts"; import * as CloudCliTokenManager from "./cloud/CliTokenManager.ts"; import * as CloudCliState from "./cloud/CliState.ts"; @@ -247,10 +248,7 @@ const PreviewLayerLive = Layer.empty.pipe( Layer.provideMerge(PortScannerLayerLive), ); -const WorkspaceEntriesLayerLive = WorkspaceEntriesLive.pipe( - Layer.provide(WorkspacePathsLive), - Layer.provideMerge(VcsDriverRegistryLayerLive), -); +const WorkspaceEntriesLayerLive = WorkspaceEntries.layer.pipe(Layer.provide(WorkspacePathsLive)); const WorkspaceFileSystemLayerLive = WorkspaceFileSystemLive.pipe( Layer.provide(WorkspacePathsLive), @@ -480,6 +478,7 @@ export const makeServerLayer = Layer.unwrap( return serverApplicationLayer.pipe( Layer.provideMerge(RuntimeServicesLive), + Layer.provideMerge(serverRelayBrokerTracingLayer), Layer.provideMerge(HttpServerLive), Layer.provide(ObservabilityLive), Layer.provideMerge(FetchHttpClient.layer), diff --git a/apps/server/src/workspace/Layers/WorkspaceEntries.ts b/apps/server/src/workspace/Layers/WorkspaceEntries.ts deleted file mode 100644 index 2903fd3a8e..0000000000 --- a/apps/server/src/workspace/Layers/WorkspaceEntries.ts +++ /dev/null @@ -1,540 +0,0 @@ -// @effect-diagnostics nodeBuiltinImport:off -import * as NodeOS from "node:os"; -import fsPromises from "node:fs/promises"; -import type { Dirent } from "node:fs"; - -import * as Cache from "effect/Cache"; -import * as DateTime from "effect/DateTime"; -import * as Duration from "effect/Duration"; -import * as Effect from "effect/Effect"; -import * as Exit from "effect/Exit"; -import * as Layer from "effect/Layer"; -import * as Path from "effect/Path"; - -import { type FilesystemBrowseInput, type ProjectEntry } from "@t3tools/contracts"; -import { HostProcessPlatform } from "@t3tools/shared/hostProcess"; -import { isExplicitRelativePath, isWindowsAbsolutePath } from "@t3tools/shared/path"; -import { - insertRankedSearchResult, - normalizeSearchQuery, - scoreQueryMatch, - type RankedSearchResult, -} from "@t3tools/shared/searchRanking"; - -import { VcsDriverRegistry } from "../../vcs/VcsDriverRegistry.ts"; -import { - WorkspaceEntries, - WorkspaceEntriesBrowseError, - WorkspaceEntriesError, - type WorkspaceEntriesShape, -} from "../Services/WorkspaceEntries.ts"; -import { WorkspacePaths } from "../Services/WorkspacePaths.ts"; - -const WORKSPACE_CACHE_TTL_MS = 15_000; -const WORKSPACE_CACHE_MAX_KEYS = 4; -const WORKSPACE_INDEX_MAX_ENTRIES = 25_000; -const WORKSPACE_SCAN_READDIR_CONCURRENCY = 32; -const IGNORED_DIRECTORY_NAMES = new Set([ - ".git", - ".convex", - "node_modules", - ".next", - ".turbo", - ".vite-plus", - "dist", - "build", - "out", - ".cache", -]); - -interface WorkspaceIndex { - scannedAt: number; - entries: SearchableWorkspaceEntry[]; - truncated: boolean; -} - -interface SearchableWorkspaceEntry extends ProjectEntry { - normalizedPath: string; - normalizedName: string; -} - -type RankedWorkspaceEntry = RankedSearchResult; - -function toPosixPath(input: string): string { - return input.replaceAll("\\", "/"); -} - -function expandHomePath(input: string, path: Path.Path): string { - if (input === "~") { - return NodeOS.homedir(); - } - if (input.startsWith("~/") || input.startsWith("~\\")) { - return path.join(NodeOS.homedir(), input.slice(2)); - } - return input; -} - -function parentPathOf(input: string): string | undefined { - const separatorIndex = input.lastIndexOf("/"); - if (separatorIndex === -1) { - return undefined; - } - return input.slice(0, separatorIndex); -} - -function basenameOf(input: string): string { - const separatorIndex = input.lastIndexOf("/"); - if (separatorIndex === -1) { - return input; - } - return input.slice(separatorIndex + 1); -} - -function toSearchableWorkspaceEntry(entry: ProjectEntry): SearchableWorkspaceEntry { - const normalizedPath = entry.path.toLowerCase(); - return { - ...entry, - normalizedPath, - normalizedName: basenameOf(normalizedPath), - }; -} - -function scoreEntry(entry: SearchableWorkspaceEntry, query: string): number | null { - if (!query) { - return entry.kind === "directory" ? 0 : 1; - } - - const { normalizedPath, normalizedName } = entry; - - const scores = [ - scoreQueryMatch({ - value: normalizedName, - query, - exactBase: 0, - prefixBase: 2, - includesBase: 5, - fuzzyBase: 100, - }), - scoreQueryMatch({ - value: normalizedPath, - query, - exactBase: 1, - prefixBase: 3, - boundaryBase: 4, - includesBase: 6, - fuzzyBase: 200, - boundaryMarkers: ["/"], - }), - ].filter((score): score is number => score !== null); - - if (scores.length === 0) { - return null; - } - - return Math.min(...scores); -} - -function isPathInIgnoredDirectory(relativePath: string): boolean { - const firstSegment = relativePath.split("/")[0]; - if (!firstSegment) return false; - return IGNORED_DIRECTORY_NAMES.has(firstSegment); -} - -function directoryAncestorsOf(relativePath: string): string[] { - const segments = relativePath.split("/").filter((segment) => segment.length > 0); - if (segments.length <= 1) return []; - - const directories: string[] = []; - for (let index = 1; index < segments.length; index += 1) { - directories.push(segments.slice(0, index).join("/")); - } - return directories; -} - -const resolveBrowseTarget = ( - input: FilesystemBrowseInput, - pathService: Path.Path, -): Effect.Effect => - Effect.gen(function* () { - const platform = yield* HostProcessPlatform; - if (platform !== "win32" && isWindowsAbsolutePath(input.partialPath)) { - return yield* new WorkspaceEntriesBrowseError({ - cwd: input.cwd, - partialPath: input.partialPath, - operation: "workspaceEntries.resolveBrowseTarget", - detail: "Windows-style paths are only supported on Windows.", - }); - } - - if (!isExplicitRelativePath(input.partialPath)) { - return pathService.resolve(expandHomePath(input.partialPath, pathService)); - } - - if (!input.cwd) { - return yield* new WorkspaceEntriesBrowseError({ - cwd: input.cwd, - partialPath: input.partialPath, - operation: "workspaceEntries.resolveBrowseTarget", - detail: "Relative filesystem browse paths require a current project.", - }); - } - - return pathService.resolve(expandHomePath(input.cwd, pathService), input.partialPath); - }); - -export const makeWorkspaceEntries = Effect.gen(function* () { - const path = yield* Path.Path; - const vcsRegistry = yield* VcsDriverRegistry; - const workspacePaths = yield* WorkspacePaths; - - const isInsideVcsWorkTree = (cwd: string): Effect.Effect => - vcsRegistry.detect({ cwd }).pipe( - Effect.map((handle) => handle !== null), - Effect.orElseSucceed(() => false), - ); - - const filterVcsIgnoredPaths = ( - cwd: string, - relativePaths: string[], - ): Effect.Effect => - vcsRegistry.detect({ cwd }).pipe( - Effect.flatMap((handle) => - handle - ? handle.driver.filterIgnoredPaths(cwd, relativePaths).pipe( - Effect.map((paths) => [...paths]), - Effect.orElseSucceed(() => relativePaths), - ) - : Effect.succeed(relativePaths), - ), - Effect.orElseSucceed(() => relativePaths), - ); - - const buildWorkspaceIndexFromVcs = Effect.fn("WorkspaceEntries.buildWorkspaceIndexFromVcs")( - function* (cwd: string) { - const vcs = yield* vcsRegistry.detect({ cwd }).pipe(Effect.orElseSucceed(() => null)); - if (!vcs) { - return null; - } - - const listedFiles = yield* vcs.driver - .listWorkspaceFiles(cwd) - .pipe(Effect.orElseSucceed(() => null)); - - if (!listedFiles) { - return null; - } - - const listedPaths: Array = []; - for (const rawEntry of listedFiles.paths) { - const entry = toPosixPath(rawEntry); - if (entry.length > 0 && !isPathInIgnoredDirectory(entry)) { - listedPaths.push(entry); - } - } - const filePaths = yield* vcs.driver.filterIgnoredPaths(cwd, listedPaths).pipe( - Effect.map((paths) => [...paths]), - Effect.catch(() => filterVcsIgnoredPaths(cwd, listedPaths)), - ); - - const directorySet = new Set(); - for (const filePath of filePaths) { - for (const directoryPath of directoryAncestorsOf(filePath)) { - if (!isPathInIgnoredDirectory(directoryPath)) { - directorySet.add(directoryPath); - } - } - } - - const directoryEntries = [...directorySet] - .toSorted((left, right) => left.localeCompare(right)) - .map( - (directoryPath): ProjectEntry => ({ - path: directoryPath, - kind: "directory", - parentPath: parentPathOf(directoryPath), - }), - ) - .map(toSearchableWorkspaceEntry); - const fileEntries = [...new Set(filePaths)] - .toSorted((left, right) => left.localeCompare(right)) - .map( - (filePath): ProjectEntry => ({ - path: filePath, - kind: "file", - parentPath: parentPathOf(filePath), - }), - ) - .map(toSearchableWorkspaceEntry); - - const now = yield* DateTime.now; - const entries = [...directoryEntries, ...fileEntries]; - return { - scannedAt: now.epochMilliseconds, - entries: entries.slice(0, WORKSPACE_INDEX_MAX_ENTRIES), - truncated: listedFiles.truncated || entries.length > WORKSPACE_INDEX_MAX_ENTRIES, - }; - }, - ); - - const readDirectoryEntries = Effect.fn("WorkspaceEntries.readDirectoryEntries")(function* ( - cwd: string, - relativeDir: string, - ): Effect.fn.Return< - { readonly relativeDir: string; readonly dirents: Dirent[] | null }, - WorkspaceEntriesError - > { - return yield* Effect.tryPromise({ - try: async () => { - const absoluteDir = relativeDir ? path.join(cwd, relativeDir) : cwd; - const dirents = await fsPromises.readdir(absoluteDir, { withFileTypes: true }); - return { relativeDir, dirents }; - }, - catch: (cause) => - new WorkspaceEntriesError({ - cwd, - operation: "workspaceEntries.readDirectoryEntries", - detail: cause instanceof Error ? cause.message : String(cause), - cause, - }), - }).pipe( - Effect.catchIf( - () => relativeDir.length > 0, - () => Effect.succeed({ relativeDir, dirents: null }), - ), - ); - }); - - const buildWorkspaceIndexFromFilesystem = Effect.fn( - "WorkspaceEntries.buildWorkspaceIndexFromFilesystem", - )(function* (cwd: string): Effect.fn.Return { - const shouldFilterWithGitIgnore = yield* isInsideVcsWorkTree(cwd); - - let pendingDirectories: string[] = [""]; - const entries: SearchableWorkspaceEntry[] = []; - let truncated = false; - - while (pendingDirectories.length > 0 && !truncated) { - const currentDirectories = pendingDirectories; - pendingDirectories = []; - - const directoryEntries = yield* Effect.forEach( - currentDirectories, - (relativeDir) => readDirectoryEntries(cwd, relativeDir), - { concurrency: WORKSPACE_SCAN_READDIR_CONCURRENCY }, - ); - - const candidateEntriesByDirectory = directoryEntries.map((directoryEntry) => { - const { relativeDir, dirents } = directoryEntry; - if (!dirents) return [] as Array<{ dirent: Dirent; relativePath: string }>; - - dirents.sort((left, right) => left.name.localeCompare(right.name)); - const candidates: Array<{ dirent: Dirent; relativePath: string }> = []; - for (const dirent of dirents) { - if (!dirent.name || dirent.name === "." || dirent.name === "..") { - continue; - } - if (dirent.isDirectory() && IGNORED_DIRECTORY_NAMES.has(dirent.name)) { - continue; - } - if (!dirent.isDirectory() && !dirent.isFile()) { - continue; - } - - const relativePath = toPosixPath( - relativeDir ? path.join(relativeDir, dirent.name) : dirent.name, - ); - if (isPathInIgnoredDirectory(relativePath)) { - continue; - } - candidates.push({ dirent, relativePath }); - } - return candidates; - }); - - const candidatePaths = candidateEntriesByDirectory.flatMap((candidateEntries) => - candidateEntries.map((entry) => entry.relativePath), - ); - const allowedPathSet = shouldFilterWithGitIgnore - ? new Set(yield* filterVcsIgnoredPaths(cwd, candidatePaths)) - : null; - - for (const candidateEntries of candidateEntriesByDirectory) { - for (const candidate of candidateEntries) { - if (allowedPathSet && !allowedPathSet.has(candidate.relativePath)) { - continue; - } - - const entry = toSearchableWorkspaceEntry({ - path: candidate.relativePath, - kind: candidate.dirent.isDirectory() ? "directory" : "file", - parentPath: parentPathOf(candidate.relativePath), - }); - entries.push(entry); - - if (candidate.dirent.isDirectory()) { - pendingDirectories.push(candidate.relativePath); - } - - if (entries.length >= WORKSPACE_INDEX_MAX_ENTRIES) { - truncated = true; - break; - } - } - - if (truncated) { - break; - } - } - } - - const now = yield* DateTime.now; - return { - scannedAt: now.epochMilliseconds, - entries, - truncated, - }; - }); - - const buildWorkspaceIndex = Effect.fn("WorkspaceEntries.buildWorkspaceIndex")(function* ( - cwd: string, - ): Effect.fn.Return { - const vcsIndexed = yield* buildWorkspaceIndexFromVcs(cwd); - if (vcsIndexed) { - return vcsIndexed; - } - return yield* buildWorkspaceIndexFromFilesystem(cwd); - }); - - const workspaceIndexCache = yield* Cache.makeWith( - buildWorkspaceIndex, - { - capacity: WORKSPACE_CACHE_MAX_KEYS, - timeToLive: (exit) => - Exit.isSuccess(exit) ? Duration.millis(WORKSPACE_CACHE_TTL_MS) : Duration.zero, - }, - ); - - const normalizeWorkspaceRoot = Effect.fn("WorkspaceEntries.normalizeWorkspaceRoot")(function* ( - cwd: string, - ): Effect.fn.Return { - return yield* workspacePaths.normalizeWorkspaceRoot(cwd).pipe( - Effect.mapError( - (cause) => - new WorkspaceEntriesError({ - cwd, - operation: "workspaceEntries.normalizeWorkspaceRoot", - detail: cause.message, - cause, - }), - ), - ); - }); - - const invalidate: WorkspaceEntriesShape["invalidate"] = Effect.fn("WorkspaceEntries.invalidate")( - function* (cwd) { - const normalizedCwd = yield* normalizeWorkspaceRoot(cwd).pipe( - Effect.orElseSucceed(() => cwd), - ); - yield* Cache.invalidate(workspaceIndexCache, cwd); - if (normalizedCwd !== cwd) { - yield* Cache.invalidate(workspaceIndexCache, normalizedCwd); - } - }, - ); - - const browse: WorkspaceEntriesShape["browse"] = Effect.fn("WorkspaceEntries.browse")( - function* (input) { - const resolvedInputPath = yield* resolveBrowseTarget(input, path); - const endsWithSeparator = /[\\/]$/.test(input.partialPath) || input.partialPath === "~"; - const parentPath = endsWithSeparator ? resolvedInputPath : path.dirname(resolvedInputPath); - const prefix = endsWithSeparator ? "" : path.basename(resolvedInputPath); - - const dirents = yield* Effect.tryPromise({ - try: () => fsPromises.readdir(parentPath, { withFileTypes: true }), - catch: (cause) => - new WorkspaceEntriesBrowseError({ - cwd: input.cwd, - partialPath: input.partialPath, - operation: "workspaceEntries.browse.readDirectory", - detail: `Unable to browse '${parentPath}': ${cause instanceof Error ? cause.message : String(cause)}`, - cause, - }), - }).pipe( - // The user can deny macOS TCC prompts for the target dir (Documents, - // Downloads, Music, etc.); surface an empty listing instead of an - // error so the caller doesn't retry-loop the prompt. - Effect.catchIf( - (error) => { - const code = (error.cause as NodeJS.ErrnoException | undefined)?.code; - return code === "EACCES" || code === "EPERM"; - }, - () => Effect.succeed([]), - ), - ); - - const showHidden = endsWithSeparator || prefix.startsWith("."); - const lowerPrefix = prefix.toLowerCase(); - const entries: Array<{ readonly name: string; readonly fullPath: string }> = []; - for (const dirent of dirents) { - if ( - dirent.isDirectory() && - dirent.name.toLowerCase().startsWith(lowerPrefix) && - (showHidden || !dirent.name.startsWith(".")) - ) { - entries.push({ - name: dirent.name, - fullPath: path.join(parentPath, dirent.name), - }); - } - } - - return { - parentPath, - entries: entries.toSorted((left, right) => left.name.localeCompare(right.name)), - }; - }, - ); - - const search: WorkspaceEntriesShape["search"] = Effect.fn("WorkspaceEntries.search")( - function* (input) { - const normalizedCwd = yield* normalizeWorkspaceRoot(input.cwd); - return yield* Cache.get(workspaceIndexCache, normalizedCwd).pipe( - Effect.map((index) => { - const normalizedQuery = normalizeSearchQuery(input.query, { - trimLeadingPattern: /^[@./]+/, - }); - const limit = Math.max(0, Math.floor(input.limit)); - const rankedEntries: RankedWorkspaceEntry[] = []; - let matchedEntryCount = 0; - - for (const entry of index.entries) { - const score = scoreEntry(entry, normalizedQuery); - if (score === null) { - continue; - } - - matchedEntryCount += 1; - insertRankedSearchResult( - rankedEntries, - { item: entry, score, tieBreaker: entry.path }, - limit, - ); - } - - return { - entries: rankedEntries.map((candidate) => candidate.item), - truncated: index.truncated || matchedEntryCount > limit, - }; - }), - ); - }, - ); - - return { - browse, - invalidate, - search, - } satisfies WorkspaceEntriesShape; -}); - -export const WorkspaceEntriesLive = Layer.effect(WorkspaceEntries, makeWorkspaceEntries); diff --git a/apps/server/src/workspace/Layers/WorkspaceFileSystem.test.ts b/apps/server/src/workspace/Layers/WorkspaceFileSystem.test.ts index 9b93b1e863..5a4ec54686 100644 --- a/apps/server/src/workspace/Layers/WorkspaceFileSystem.test.ts +++ b/apps/server/src/workspace/Layers/WorkspaceFileSystem.test.ts @@ -8,20 +8,19 @@ import * as Path from "effect/Path"; import { ServerConfig } from "../../config.ts"; import * as VcsDriverRegistry from "../../vcs/VcsDriverRegistry.ts"; import * as VcsProcess from "../../vcs/VcsProcess.ts"; -import { WorkspaceEntries } from "../Services/WorkspaceEntries.ts"; +import * as WorkspaceEntries from "../WorkspaceEntries.ts"; import { WorkspaceFileSystem } from "../Services/WorkspaceFileSystem.ts"; -import { WorkspaceEntriesLive } from "./WorkspaceEntries.ts"; import { WorkspaceFileSystemLive } from "./WorkspaceFileSystem.ts"; import { WorkspacePathsLive } from "./WorkspacePaths.ts"; const ProjectLayer = WorkspaceFileSystemLive.pipe( Layer.provide(WorkspacePathsLive), - Layer.provide(WorkspaceEntriesLive.pipe(Layer.provide(WorkspacePathsLive))), + Layer.provide(WorkspaceEntries.layer.pipe(Layer.provide(WorkspacePathsLive))), ); const TestLayer = Layer.empty.pipe( Layer.provideMerge(ProjectLayer), - Layer.provideMerge(WorkspaceEntriesLive.pipe(Layer.provide(WorkspacePathsLive))), + Layer.provideMerge(WorkspaceEntries.layer.pipe(Layer.provide(WorkspacePathsLive))), Layer.provideMerge(WorkspacePathsLive), Layer.provideMerge(VcsDriverRegistry.layer.pipe(Layer.provide(VcsProcess.layer))), Layer.provide( @@ -53,7 +52,65 @@ const writeTextFile = Effect.fn("writeTextFile")(function* ( yield* fileSystem.writeFileString(absolutePath, contents).pipe(Effect.orDie); }); -it.layer(TestLayer)("WorkspaceFileSystemLive", (it) => { +it.layer(TestLayer, { excludeTestServices: true })("WorkspaceFileSystemLive", (it) => { + describe("readFile", () => { + it.effect("reads UTF-8 files relative to the workspace root", () => + Effect.gen(function* () { + const workspaceFileSystem = yield* WorkspaceFileSystem; + const cwd = yield* makeTempDir; + yield* writeTextFile(cwd, "src/index.ts", "export const answer = 42;\n"); + + const result = yield* workspaceFileSystem.readFile({ + cwd, + relativePath: "src/index.ts", + }); + + expect(result).toEqual({ + relativePath: "src/index.ts", + contents: "export const answer = 42;\n", + byteLength: 26, + truncated: false, + }); + }), + ); + + it.effect("rejects reads outside the workspace root", () => + Effect.gen(function* () { + const workspaceFileSystem = yield* WorkspaceFileSystem; + const cwd = yield* makeTempDir; + + const error = yield* workspaceFileSystem + .readFile({ cwd, relativePath: "../escape.md" }) + .pipe(Effect.flip); + + expect(error.message).toContain( + "Workspace file path must be relative to the project root: ../escape.md", + ); + }), + ); + + it.effect("rejects symlinks that resolve outside the workspace root", () => + Effect.gen(function* () { + const workspaceFileSystem = yield* WorkspaceFileSystem; + const fileSystem = yield* FileSystem.FileSystem; + const path = yield* Path.Path; + const cwd = yield* makeTempDir; + const outsideDir = yield* makeTempDir; + yield* writeTextFile(outsideDir, "secret.txt", "outside\n"); + yield* fileSystem.symlink( + path.join(outsideDir, "secret.txt"), + path.join(cwd, "linked-secret.txt"), + ); + + const error = yield* workspaceFileSystem + .readFile({ cwd, relativePath: "linked-secret.txt" }) + .pipe(Effect.flip); + + expect(error.message).toContain("resolves outside the project root"); + }), + ); + }); + describe("writeFile", () => { it.effect("writes files relative to the workspace root", () => Effect.gen(function* () { @@ -77,20 +134,15 @@ it.layer(TestLayer)("WorkspaceFileSystemLive", (it) => { it.effect("invalidates workspace entry search cache after writes", () => Effect.gen(function* () { - const workspaceEntries = yield* WorkspaceEntries; + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; const workspaceFileSystem = yield* WorkspaceFileSystem; const cwd = yield* makeTempDir; yield* writeTextFile(cwd, "src/existing.ts", "export {};\n"); - const beforeWrite = yield* workspaceEntries.search({ - cwd, - query: "rpc", - limit: 10, - }); - expect(beforeWrite).toEqual({ - entries: [], - truncated: false, - }); + const beforeWrite = yield* workspaceEntries.list({ cwd }); + expect(beforeWrite.entries.some((entry) => entry.path === "plans/effect-rpc.md")).toBe( + false, + ); yield* workspaceFileSystem.writeFile({ cwd, @@ -98,11 +150,7 @@ it.layer(TestLayer)("WorkspaceFileSystemLive", (it) => { contents: "# Plan\n", }); - const afterWrite = yield* workspaceEntries.search({ - cwd, - query: "rpc", - limit: 10, - }); + const afterWrite = yield* workspaceEntries.list({ cwd }); expect(afterWrite.entries).toEqual( expect.arrayContaining([expect.objectContaining({ path: "plans/effect-rpc.md" })]), ); diff --git a/apps/server/src/workspace/Layers/WorkspaceFileSystem.ts b/apps/server/src/workspace/Layers/WorkspaceFileSystem.ts index 9f53ade1bb..61056042bf 100644 --- a/apps/server/src/workspace/Layers/WorkspaceFileSystem.ts +++ b/apps/server/src/workspace/Layers/WorkspaceFileSystem.ts @@ -1,3 +1,6 @@ +// @effect-diagnostics nodeBuiltinImport:off +import fsPromises from "node:fs/promises"; + import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Layer from "effect/Layer"; @@ -8,14 +11,76 @@ import { WorkspaceFileSystemError, type WorkspaceFileSystemShape, } from "../Services/WorkspaceFileSystem.ts"; -import { WorkspaceEntries } from "../Services/WorkspaceEntries.ts"; +import * as WorkspaceEntries from "../WorkspaceEntries.ts"; import { WorkspacePaths } from "../Services/WorkspacePaths.ts"; +const PROJECT_READ_FILE_MAX_BYTES = 1024 * 1024; + export const makeWorkspaceFileSystem = Effect.gen(function* () { const fileSystem = yield* FileSystem.FileSystem; const path = yield* Path.Path; const workspacePaths = yield* WorkspacePaths; - const workspaceEntries = yield* WorkspaceEntries; + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; + + const readFile: WorkspaceFileSystemShape["readFile"] = Effect.fn("WorkspaceFileSystem.readFile")( + function* (input) { + const target = yield* workspacePaths.resolveRelativePathWithinRoot({ + workspaceRoot: input.cwd, + relativePath: input.relativePath, + }); + + const result = yield* Effect.tryPromise({ + try: async () => { + const [realWorkspaceRoot, realTargetPath] = await Promise.all([ + fsPromises.realpath(input.cwd), + fsPromises.realpath(target.absolutePath), + ]); + const relativeRealPath = path.relative(realWorkspaceRoot, realTargetPath); + if ( + relativeRealPath.startsWith(`..${path.sep}`) || + relativeRealPath === ".." || + path.isAbsolute(relativeRealPath) + ) { + throw new Error("Workspace file path resolves outside the project root."); + } + + const handle = await fsPromises.open(realTargetPath, "r"); + try { + const stat = await handle.stat(); + if (!stat.isFile()) { + throw new Error("Workspace path is not a file."); + } + const bytesToRead = Math.min(stat.size, PROJECT_READ_FILE_MAX_BYTES); + const buffer = Buffer.alloc(bytesToRead); + const { bytesRead } = await handle.read(buffer, 0, bytesToRead, 0); + const fileBytes = buffer.subarray(0, bytesRead); + if (fileBytes.includes(0)) { + throw new Error("Binary files cannot be previewed as text."); + } + const contents = new TextDecoder("utf-8").decode(fileBytes); + return { + relativePath: target.relativePath, + contents, + byteLength: stat.size, + truncated: stat.size > PROJECT_READ_FILE_MAX_BYTES, + }; + } finally { + await handle.close(); + } + }, + catch: (cause) => + new WorkspaceFileSystemError({ + cwd: input.cwd, + relativePath: input.relativePath, + operation: "workspaceFileSystem.readFile", + detail: cause instanceof Error ? cause.message : String(cause), + cause, + }), + }); + + return result; + }, + ); const writeFile: WorkspaceFileSystemShape["writeFile"] = Effect.fn( "WorkspaceFileSystem.writeFile", @@ -49,10 +114,10 @@ export const makeWorkspaceFileSystem = Effect.gen(function* () { }), ), ); - yield* workspaceEntries.invalidate(input.cwd); + yield* workspaceEntries.refresh(input.cwd); return { relativePath: target.relativePath }; }); - return { writeFile } satisfies WorkspaceFileSystemShape; + return { readFile, writeFile } satisfies WorkspaceFileSystemShape; }); export const WorkspaceFileSystemLive = Layer.effect(WorkspaceFileSystem, makeWorkspaceFileSystem); diff --git a/apps/server/src/workspace/Services/WorkspaceEntries.ts b/apps/server/src/workspace/Services/WorkspaceEntries.ts deleted file mode 100644 index ba65da04f3..0000000000 --- a/apps/server/src/workspace/Services/WorkspaceEntries.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * WorkspaceEntries - Effect service contract for cached workspace entry search. - * - * Owns indexed workspace entry search plus cache invalidation for workspace - * roots when the underlying filesystem changes. - * - * @module WorkspaceEntries - */ -import * as Schema from "effect/Schema"; -import * as Context from "effect/Context"; -import type * as Effect from "effect/Effect"; - -import type { - FilesystemBrowseInput, - FilesystemBrowseResult, - ProjectSearchEntriesInput, - ProjectSearchEntriesResult, -} from "@t3tools/contracts"; - -export class WorkspaceEntriesError extends Schema.TaggedErrorClass()( - "WorkspaceEntriesError", - { - cwd: Schema.String, - operation: Schema.String, - detail: Schema.String, - cause: Schema.optional(Schema.Defect()), - }, -) {} - -export class WorkspaceEntriesBrowseError extends Schema.TaggedErrorClass()( - "WorkspaceEntriesBrowseError", - { - cwd: Schema.optional(Schema.String), - partialPath: Schema.String, - operation: Schema.String, - detail: Schema.String, - cause: Schema.optional(Schema.Defect()), - }, -) {} - -/** - * WorkspaceEntriesShape - Service API for workspace entry search and cache - * invalidation. - */ -export interface WorkspaceEntriesShape { - /** - * Browse matching directories for the provided partial path. - */ - readonly browse: ( - input: FilesystemBrowseInput, - ) => Effect.Effect; - - /** - * Search indexed workspace entries for files and directories matching the - * provided query. - */ - readonly search: ( - input: ProjectSearchEntriesInput, - ) => Effect.Effect; - - /** - * Drop any cached workspace entries for the given workspace root. - */ - readonly invalidate: (cwd: string) => Effect.Effect; -} - -/** - * WorkspaceEntries - Service tag for cached workspace entry search. - */ -export class WorkspaceEntries extends Context.Service()( - "t3/workspace/Services/WorkspaceEntries", -) {} diff --git a/apps/server/src/workspace/Services/WorkspaceFileSystem.ts b/apps/server/src/workspace/Services/WorkspaceFileSystem.ts index 16fcdf0b57..5126ec417b 100644 --- a/apps/server/src/workspace/Services/WorkspaceFileSystem.ts +++ b/apps/server/src/workspace/Services/WorkspaceFileSystem.ts @@ -10,7 +10,12 @@ import * as Schema from "effect/Schema"; import * as Context from "effect/Context"; import type * as Effect from "effect/Effect"; -import type { ProjectWriteFileInput, ProjectWriteFileResult } from "@t3tools/contracts"; +import type { + ProjectReadFileInput, + ProjectReadFileResult, + ProjectWriteFileInput, + ProjectWriteFileResult, +} from "@t3tools/contracts"; import { WorkspacePathOutsideRootError } from "./WorkspacePaths.ts"; export class WorkspaceFileSystemError extends Schema.TaggedErrorClass()( @@ -22,12 +27,26 @@ export class WorkspaceFileSystemError extends Schema.TaggedErrorClass Effect.Effect< + ProjectReadFileResult, + WorkspaceFileSystemError | WorkspacePathOutsideRootError + >; + /** * Write a file relative to the workspace root. * diff --git a/apps/server/src/workspace/Layers/WorkspaceEntries.test.ts b/apps/server/src/workspace/WorkspaceEntries.test.ts similarity index 76% rename from apps/server/src/workspace/Layers/WorkspaceEntries.test.ts rename to apps/server/src/workspace/WorkspaceEntries.test.ts index 7b25f169e7..f8a518d8b3 100644 --- a/apps/server/src/workspace/Layers/WorkspaceEntries.test.ts +++ b/apps/server/src/workspace/WorkspaceEntries.test.ts @@ -1,27 +1,24 @@ // @effect-diagnostics nodeBuiltinImport:off import fsPromises from "node:fs/promises"; import * as NodeServices from "@effect/platform-node/NodeServices"; +import { FileFinder } from "@ff-labs/fff-node"; import { it, afterEach, describe, expect, vi } from "@effect/vitest"; import * as Effect from "effect/Effect"; -import * as Fiber from "effect/Fiber"; import * as FileSystem from "effect/FileSystem"; import * as Layer from "effect/Layer"; import * as Path from "effect/Path"; import * as PlatformError from "effect/PlatformError"; -import { ServerConfig } from "../../config.ts"; +import { ServerConfig } from "../config.ts"; import { HostProcessPlatform } from "@t3tools/shared/hostProcess"; -import * as VcsDriverRegistry from "../../vcs/VcsDriverRegistry.ts"; -import * as VcsProcess from "../../vcs/VcsProcess.ts"; -import { WorkspaceEntries } from "../Services/WorkspaceEntries.ts"; -import { WorkspaceEntriesLive } from "./WorkspaceEntries.ts"; -import { WorkspacePathsLive } from "./WorkspacePaths.ts"; +import * as VcsProcess from "../vcs/VcsProcess.ts"; +import * as WorkspaceEntries from "./WorkspaceEntries.ts"; +import { WorkspacePathsLive } from "./Layers/WorkspacePaths.ts"; const TestLayer = Layer.empty.pipe( - Layer.provideMerge(WorkspaceEntriesLive.pipe(Layer.provide(WorkspacePathsLive))), + Layer.provideMerge(WorkspaceEntries.layer.pipe(Layer.provide(WorkspacePathsLive))), Layer.provideMerge(WorkspacePathsLive), Layer.provideMerge(VcsProcess.layer), - Layer.provideMerge(VcsDriverRegistry.layer.pipe(Layer.provide(VcsProcess.layer))), Layer.provide( ServerConfig.layerTest(process.cwd(), { prefix: "t3-workspace-entries-test-", @@ -71,7 +68,7 @@ const git = (cwd: string, args: ReadonlyArray, env?: NodeJS.ProcessEnv) const searchWorkspaceEntries = (input: { cwd: string; query: string; limit: number }) => Effect.gen(function* () { - const workspaceEntries = yield* WorkspaceEntries; + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; return yield* workspaceEntries.search(input); }); @@ -82,11 +79,39 @@ const appendSeparator = (input: string) => : `${input}${platform === "win32" ? "\\" : "/"}`, ); -it.layer(TestLayer)("WorkspaceEntriesLive", (it) => { +it.layer(TestLayer, { excludeTestServices: true })("WorkspaceEntries", (it) => { afterEach(() => { vi.restoreAllMocks(); }); + describe("list", () => { + it.effect("returns the complete cached workspace index", () => + Effect.gen(function* () { + const cwd = yield* makeTempDir(); + yield* writeTextFile(cwd, "src/components/Composer.tsx"); + yield* writeTextFile(cwd, "README.md"); + yield* writeTextFile(cwd, "node_modules/pkg/index.js"); + + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; + const result = yield* workspaceEntries.list({ cwd }); + + expect(result.entries).toEqual( + expect.arrayContaining([ + { path: "src", kind: "directory" }, + { path: "src/components", kind: "directory" }, + { + path: "src/components/Composer.tsx", + kind: "file", + }, + { path: "README.md", kind: "file" }, + ]), + ); + expect(result.entries.some((entry) => entry.path.startsWith("node_modules"))).toBe(false); + expect(result.truncated).toBe(false); + }), + ); + }); + describe("search", () => { it.effect("returns files and directories relative to cwd", () => Effect.gen(function* () { @@ -224,94 +249,39 @@ it.layer(TestLayer)("WorkspaceEntriesLive", (it) => { }), ); - it.effect("deduplicates concurrent index builds for the same cwd", () => + it.effect("supports typo-resistant file search through fff", () => Effect.gen(function* () { - const cwd = yield* makeTempDir({ prefix: "t3code-workspace-concurrent-build-" }); + const cwd = yield* makeTempDir({ prefix: "t3code-workspace-fff-typo-" }); yield* writeTextFile(cwd, "src/components/Composer.tsx"); - let rootReadCount = 0; - let releaseRootRead: (() => void) | undefined; - const rootReadGate = new Promise((resolve) => { - releaseRootRead = resolve; - }); - const originalReaddir = fsPromises.readdir.bind(fsPromises); - vi.spyOn(fsPromises, "readdir").mockImplementation((async ( - ...args: Parameters - ) => { - if (args[0] === cwd) { - rootReadCount += 1; - await rootReadGate; - } - return originalReaddir(...args); - }) as typeof fsPromises.readdir); + const result = yield* searchWorkspaceEntries({ cwd, query: "compoesr", limit: 10 }); - const searches = yield* Effect.all( - [ - searchWorkspaceEntries({ cwd, query: "", limit: 100 }), - searchWorkspaceEntries({ cwd, query: "comp", limit: 100 }), - searchWorkspaceEntries({ cwd, query: "src", limit: 100 }), - ], - { concurrency: "unbounded" }, - ).pipe(Effect.forkScoped); - for (let attempt = 0; attempt < 50; attempt += 1) { - if (rootReadCount > 0) { - break; - } - yield* Effect.yieldNow; - } - releaseRootRead?.(); - yield* Fiber.join(searches); - - expect(rootReadCount).toBe(1); + expect(result.entries).toEqual( + expect.arrayContaining([ + expect.objectContaining({ path: "src/components/Composer.tsx" }), + ]), + ); }), ); - it.effect("limits concurrent directory reads while walking the filesystem", () => + it.effect("rebuilds the cached index after refresh fails", () => Effect.gen(function* () { - const cwd = yield* makeTempDir({ prefix: "t3code-workspace-read-concurrency-" }); - yield* Effect.forEach( - Array.from({ length: 80 }, (_, index) => index), - (index) => writeTextFile(cwd, `group-${index}/entry-${index}.ts`, "export {};"), - { discard: true }, - ); + const cwd = yield* makeTempDir({ prefix: "t3code-workspace-refresh-failure-" }); + yield* writeTextFile(cwd, "src/index.ts", "export {};\n"); - let activeReads = 0; - let peakReads = 0; - let releaseReads: (() => void) | undefined; - const readsGate = new Promise((resolve) => { - releaseReads = resolve; + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; + const createSpy = vi.spyOn(FileFinder, "create"); + yield* workspaceEntries.list({ cwd }); + expect(createSpy).toHaveBeenCalledTimes(1); + + vi.spyOn(FileFinder.prototype, "scanFiles").mockReturnValueOnce({ + ok: false, + error: "scan failed", }); - const originalReaddir = fsPromises.readdir.bind(fsPromises); - vi.spyOn(fsPromises, "readdir").mockImplementation((async ( - ...args: Parameters - ) => { - const target = args[0]; - if (typeof target === "string" && target.startsWith(cwd)) { - activeReads += 1; - peakReads = Math.max(peakReads, activeReads); - await readsGate; - try { - return await originalReaddir(...args); - } finally { - activeReads -= 1; - } - } - return originalReaddir(...args); - }) as typeof fsPromises.readdir); + yield* workspaceEntries.refresh(cwd); - const search = yield* searchWorkspaceEntries({ cwd, query: "", limit: 200 }).pipe( - Effect.forkScoped, - ); - for (let attempt = 0; attempt < 50; attempt += 1) { - if (activeReads > 0) { - break; - } - yield* Effect.yieldNow; - } - releaseReads?.(); - yield* Fiber.join(search); - - expect(peakReads).toBeLessThanOrEqual(32); + yield* workspaceEntries.list({ cwd }); + expect(createSpy).toHaveBeenCalledTimes(2); }), ); }); @@ -319,7 +289,7 @@ it.layer(TestLayer)("WorkspaceEntriesLive", (it) => { describe("browse", () => { it.effect("returns matching directories and excludes files", () => Effect.gen(function* () { - const workspaceEntries = yield* WorkspaceEntries; + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; const path = yield* Path.Path; const cwd = yield* makeTempDir({ prefix: "t3code-workspace-browse-prefix-" }); yield* writeTextFile(cwd, "alphabet.txt", "ignore me"); @@ -342,7 +312,7 @@ it.layer(TestLayer)("WorkspaceEntriesLive", (it) => { it.effect("shows dot directories in directory mode and hidden-prefix mode", () => Effect.gen(function* () { - const workspaceEntries = yield* WorkspaceEntries; + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; const path = yield* Path.Path; const cwd = yield* makeTempDir({ prefix: "t3code-workspace-browse-hidden-" }); yield* writeTextFile(cwd, ".config/settings.json", "{}"); @@ -366,7 +336,7 @@ it.layer(TestLayer)("WorkspaceEntriesLive", (it) => { it.effect("supports relative paths when cwd is provided", () => Effect.gen(function* () { - const workspaceEntries = yield* WorkspaceEntries; + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; const path = yield* Path.Path; const cwd = yield* makeTempDir({ prefix: "t3code-workspace-browse-relative-" }); yield* writeTextFile(cwd, "packages/pkg.json", "{}"); @@ -385,7 +355,7 @@ it.layer(TestLayer)("WorkspaceEntriesLive", (it) => { it.effect("rejects relative paths without cwd", () => Effect.gen(function* () { - const workspaceEntries = yield* WorkspaceEntries; + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; const error = yield* workspaceEntries .browse({ @@ -399,7 +369,7 @@ it.layer(TestLayer)("WorkspaceEntriesLive", (it) => { it.effect("returns an empty listing when the OS denies directory access", () => Effect.gen(function* () { - const workspaceEntries = yield* WorkspaceEntries; + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; const cwd = yield* makeTempDir({ prefix: "t3code-workspace-browse-eacces-" }); const denied = Object.assign(new Error("EACCES: permission denied"), { code: "EACCES" }); diff --git a/apps/server/src/workspace/WorkspaceEntries.ts b/apps/server/src/workspace/WorkspaceEntries.ts new file mode 100644 index 0000000000..bf9a51c74d --- /dev/null +++ b/apps/server/src/workspace/WorkspaceEntries.ts @@ -0,0 +1,252 @@ +// @effect-diagnostics nodeBuiltinImport:off +import * as NodeFSP from "node:fs/promises"; +import * as NodeOS from "node:os"; + +import * as Context from "effect/Context"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; +import * as Path from "effect/Path"; +import * as RcMap from "effect/RcMap"; +import * as Schema from "effect/Schema"; + +import type { + FilesystemBrowseInput, + FilesystemBrowseResult, + ProjectListEntriesInput, + ProjectListEntriesResult, + ProjectSearchEntriesInput, + ProjectSearchEntriesResult, +} from "@t3tools/contracts"; +import { HostProcessPlatform } from "@t3tools/shared/hostProcess"; +import { isExplicitRelativePath, isWindowsAbsolutePath } from "@t3tools/shared/path"; + +import * as WorkspacePaths from "./Services/WorkspacePaths.ts"; +import * as WorkspaceSearchIndex from "./WorkspaceSearchIndex.ts"; + +export class WorkspaceEntriesError extends Schema.TaggedErrorClass()( + "WorkspaceEntriesError", + { + cwd: Schema.String, + operation: Schema.String, + detail: Schema.String, + cause: Schema.optional(Schema.Defect()), + }, +) {} + +export class WorkspaceEntriesBrowseError extends Schema.TaggedErrorClass()( + "WorkspaceEntriesBrowseError", + { + cwd: Schema.optional(Schema.String), + partialPath: Schema.String, + operation: Schema.String, + detail: Schema.String, + cause: Schema.optional(Schema.Defect()), + }, +) {} + +export class WorkspaceEntries extends Context.Service< + WorkspaceEntries, + { + readonly browse: ( + input: FilesystemBrowseInput, + ) => Effect.Effect; + readonly list: ( + input: ProjectListEntriesInput, + ) => Effect.Effect; + readonly search: ( + input: ProjectSearchEntriesInput, + ) => Effect.Effect; + readonly refresh: (cwd: string) => Effect.Effect; + } +>()("t3/workspace/WorkspaceEntries") {} + +function expandHomePath(input: string, path: Path.Path): string { + if (input === "~") { + return NodeOS.homedir(); + } + if (input.startsWith("~/") || input.startsWith("~\\")) { + return path.join(NodeOS.homedir(), input.slice(2)); + } + return input; +} + +const resolveBrowseTarget = ( + input: FilesystemBrowseInput, + path: Path.Path, +): Effect.Effect => + Effect.gen(function* () { + const platform = yield* HostProcessPlatform; + if (platform !== "win32" && isWindowsAbsolutePath(input.partialPath)) { + return yield* new WorkspaceEntriesBrowseError({ + cwd: input.cwd, + partialPath: input.partialPath, + operation: "workspaceEntries.resolveBrowseTarget", + detail: "Windows-style paths are only supported on Windows.", + }); + } + + if (!isExplicitRelativePath(input.partialPath)) { + return path.resolve(expandHomePath(input.partialPath, path)); + } + + if (!input.cwd) { + return yield* new WorkspaceEntriesBrowseError({ + cwd: input.cwd, + partialPath: input.partialPath, + operation: "workspaceEntries.resolveBrowseTarget", + detail: "Relative filesystem browse paths require a current project.", + }); + } + + return path.resolve(expandHomePath(input.cwd, path), input.partialPath); + }); + +const make = Effect.gen(function* () { + const path = yield* Path.Path; + const workspacePaths = yield* WorkspacePaths.WorkspacePaths; + const workspaceSearchIndexes = yield* WorkspaceSearchIndex.WorkspaceSearchIndexMap; + + const normalizeWorkspaceRoot = Effect.fn("WorkspaceEntries.normalizeWorkspaceRoot")(function* ( + cwd: string, + ): Effect.fn.Return { + return yield* workspacePaths.normalizeWorkspaceRoot(cwd).pipe( + Effect.mapError( + (cause) => + new WorkspaceEntriesError({ + cwd, + operation: "workspaceEntries.normalizeWorkspaceRoot", + detail: cause.message, + cause, + }), + ), + ); + }); + + const refresh: WorkspaceEntries["Service"]["refresh"] = Effect.fn("WorkspaceEntries.refresh")( + function* (cwd) { + const normalizedCwd = yield* normalizeWorkspaceRoot(cwd).pipe( + Effect.orElseSucceed(() => cwd), + ); + if (!(yield* RcMap.has(workspaceSearchIndexes.rcMap, normalizedCwd))) { + return; + } + yield* Effect.gen(function* () { + const searchIndex = yield* WorkspaceSearchIndex.WorkspaceSearchIndex; + yield* searchIndex.refresh(); + }).pipe( + Effect.provide(workspaceSearchIndexes.get(normalizedCwd)), + Effect.catch((cause) => + Effect.gen(function* () { + yield* Effect.logWarning("Failed to refresh workspace search index", { + cwd, + cause, + }); + yield* workspaceSearchIndexes.invalidate(normalizedCwd); + }), + ), + ); + }, + ); + + const browse: WorkspaceEntries["Service"]["browse"] = Effect.fn("WorkspaceEntries.browse")( + function* (input) { + const resolvedInputPath = yield* resolveBrowseTarget(input, path); + const endsWithSeparator = /[\\/]$/.test(input.partialPath) || input.partialPath === "~"; + const parentPath = endsWithSeparator ? resolvedInputPath : path.dirname(resolvedInputPath); + const prefix = endsWithSeparator ? "" : path.basename(resolvedInputPath); + + const dirents = yield* Effect.tryPromise({ + try: () => NodeFSP.readdir(parentPath, { withFileTypes: true }), + catch: (cause) => + new WorkspaceEntriesBrowseError({ + cwd: input.cwd, + partialPath: input.partialPath, + operation: "workspaceEntries.browse.readDirectory", + detail: `Unable to browse '${parentPath}': ${cause instanceof Error ? cause.message : String(cause)}`, + cause, + }), + }).pipe( + Effect.catchIf( + (error) => { + const code = (error.cause as NodeJS.ErrnoException | undefined)?.code; + return code === "EACCES" || code === "EPERM"; + }, + () => Effect.succeed([]), + ), + ); + + const showHidden = endsWithSeparator || prefix.startsWith("."); + const lowerPrefix = prefix.toLowerCase(); + const entries: Array<{ readonly name: string; readonly fullPath: string }> = []; + for (const dirent of dirents) { + if ( + dirent.isDirectory() && + dirent.name.toLowerCase().startsWith(lowerPrefix) && + (showHidden || !dirent.name.startsWith(".")) + ) { + entries.push({ + name: dirent.name, + fullPath: path.join(parentPath, dirent.name), + }); + } + } + + return { + parentPath, + entries: entries.toSorted((left, right) => left.name.localeCompare(right.name)), + }; + }, + ); + + const search: WorkspaceEntries["Service"]["search"] = Effect.fn("WorkspaceEntries.search")( + function* (input) { + const normalizedCwd = yield* normalizeWorkspaceRoot(input.cwd); + const normalizedQuery = input.query + .trim() + .toLowerCase() + .replace(/^[@./]+/, ""); + return yield* Effect.gen(function* () { + const searchIndex = yield* WorkspaceSearchIndex.WorkspaceSearchIndex; + return yield* searchIndex.search(normalizedQuery, input.limit); + }).pipe( + Effect.provide(workspaceSearchIndexes.get(normalizedCwd)), + Effect.mapError( + (cause) => + new WorkspaceEntriesError({ + cwd: input.cwd, + operation: "workspaceEntries.search", + detail: cause.message, + cause, + }), + ), + ); + }, + ); + + const list: WorkspaceEntries["Service"]["list"] = Effect.fn("WorkspaceEntries.list")( + function* (input) { + const normalizedCwd = yield* normalizeWorkspaceRoot(input.cwd); + return yield* Effect.gen(function* () { + const searchIndex = yield* WorkspaceSearchIndex.WorkspaceSearchIndex; + return yield* searchIndex.list(); + }).pipe( + Effect.provide(workspaceSearchIndexes.get(normalizedCwd)), + Effect.mapError( + (cause) => + new WorkspaceEntriesError({ + cwd: input.cwd, + operation: "workspaceEntries.list", + detail: cause.message, + cause, + }), + ), + ); + }, + ); + + return WorkspaceEntries.of({ browse, list, refresh, search }); +}); + +export const layer = Layer.effect(WorkspaceEntries, make).pipe( + Layer.provide(WorkspaceSearchIndex.WorkspaceSearchIndexMap.layer), +); diff --git a/apps/server/src/workspace/WorkspaceSearchIndex.ts b/apps/server/src/workspace/WorkspaceSearchIndex.ts new file mode 100644 index 0000000000..4bee3cbc08 --- /dev/null +++ b/apps/server/src/workspace/WorkspaceSearchIndex.ts @@ -0,0 +1,245 @@ +import { FileFinder, type MixedItem, type MixedSearchResult } from "@ff-labs/fff-node"; +import * as Context from "effect/Context"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; +import * as LayerMap from "effect/LayerMap"; +import * as Schedule from "effect/Schedule"; +import * as Schema from "effect/Schema"; + +import type { + ProjectEntry, + ProjectListEntriesResult, + ProjectSearchEntriesResult, +} from "@t3tools/contracts"; + +const WORKSPACE_INDEX_MAX_ENTRIES = 25_000; +const WORKSPACE_INDEX_PAGE_SIZE = WORKSPACE_INDEX_MAX_ENTRIES + 2; +const WORKSPACE_INDEX_SCAN_TIMEOUT = "15 seconds"; +const WORKSPACE_INDEX_IDLE_TTL = "15 minutes"; +const WORKSPACE_INDEX_SCAN_POLL_INTERVAL = "50 millis"; + +export class WorkspaceSearchIndexCreateFailed extends Schema.TaggedErrorClass()( + "WorkspaceSearchIndexCreateFailed", + { + cwd: Schema.String, + reason: Schema.String, + }, +) { + override get message(): string { + return `Failed to create the workspace search index for '${this.cwd}': ${this.reason}`; + } +} + +export class WorkspaceSearchIndexScanTimedOut extends Schema.TaggedErrorClass()( + "WorkspaceSearchIndexScanTimedOut", + { + cwd: Schema.String, + timeout: Schema.String, + }, +) { + override get message(): string { + return `Workspace search index for '${this.cwd}' did not finish scanning within ${this.timeout}`; + } +} + +export class WorkspaceSearchIndexSearchFailed extends Schema.TaggedErrorClass()( + "WorkspaceSearchIndexSearchFailed", + { + cwd: Schema.String, + reason: Schema.String, + }, +) { + override get message(): string { + return `Workspace search failed for '${this.cwd}': ${this.reason}`; + } +} + +export class WorkspaceSearchIndexRefreshFailed extends Schema.TaggedErrorClass()( + "WorkspaceSearchIndexRefreshFailed", + { + cwd: Schema.String, + reason: Schema.String, + }, +) { + override get message(): string { + return `Failed to refresh the workspace search index for '${this.cwd}': ${this.reason}`; + } +} + +export type WorkspaceSearchIndexError = + | WorkspaceSearchIndexCreateFailed + | WorkspaceSearchIndexScanTimedOut + | WorkspaceSearchIndexSearchFailed + | WorkspaceSearchIndexRefreshFailed; + +export class WorkspaceSearchIndex extends Context.Service< + WorkspaceSearchIndex, + { + readonly list: () => Effect.Effect; + readonly search: ( + query: string, + limit: number, + ) => Effect.Effect; + readonly refresh: () => Effect.Effect< + void, + WorkspaceSearchIndexRefreshFailed | WorkspaceSearchIndexScanTimedOut + >; + } +>()("t3/workspace/WorkspaceSearchIndex") {} + +function toPosixPath(input: string): string { + return input.replaceAll("\\", "/"); +} + +function trimDirectorySeparator(input: string): string { + return input.endsWith("/") ? input.slice(0, -1) : input; +} + +function parentPathOf(input: string): string | undefined { + const separatorIndex = input.lastIndexOf("/"); + return separatorIndex === -1 ? undefined : input.slice(0, separatorIndex); +} + +function toProjectEntry(item: MixedItem): ProjectEntry | null { + const normalizedPath = trimDirectorySeparator(toPosixPath(item.item.relativePath)); + if (!normalizedPath) { + return null; + } + + return { + path: normalizedPath, + kind: item.type, + }; +} + +function mapMixedSearchResult( + result: MixedSearchResult, + limit: number, +): { readonly entries: ProjectEntry[]; readonly truncated: boolean } { + const entries: ProjectEntry[] = []; + for (const item of result.items) { + const entry = toProjectEntry(item); + if (entry) { + entries.push(entry); + } + if (entries.length >= limit) { + break; + } + } + + const rootDirectoryCount = result.items.some( + (item) => item.type === "directory" && item.item.relativePath.length === 0, + ) + ? 1 + : 0; + return { + entries, + truncated: result.totalMatched - rootDirectoryCount > limit, + }; +} + +function withDirectoryAncestors(entries: ReadonlyArray): ProjectEntry[] { + const entryByPath = new Map(entries.map((entry) => [entry.path, entry])); + for (const entry of entries) { + let parentPath = parentPathOf(entry.path); + while (parentPath) { + if (!entryByPath.has(parentPath)) { + entryByPath.set(parentPath, { path: parentPath, kind: "directory" }); + } + parentPath = parentPathOf(parentPath); + } + } + return [...entryByPath.values()]; +} + +const createFinder = Effect.fn("WorkspaceSearchIndex.createFinder")(function* (cwd: string) { + const result = FileFinder.create({ + basePath: cwd, + disableMmapCache: true, + disableContentIndexing: true, + aiMode: false, + enableFsRootScanning: true, + enableHomeDirScanning: true, + }); + if (result.ok) return result.value; + return yield* new WorkspaceSearchIndexCreateFailed({ cwd, reason: result.error }); +}); + +const waitForScan = Effect.fn("WorkspaceSearchIndex.waitForScan")(function* ( + cwd: string, + finder: FileFinder, +) { + yield* Effect.sync(() => finder.isScanning()).pipe( + Effect.repeat({ + while: (scanning) => scanning, + schedule: Schedule.spaced(WORKSPACE_INDEX_SCAN_POLL_INTERVAL), + }), + Effect.timeoutOrElse({ + duration: WORKSPACE_INDEX_SCAN_TIMEOUT, + orElse: () => + new WorkspaceSearchIndexScanTimedOut({ cwd, timeout: WORKSPACE_INDEX_SCAN_TIMEOUT }), + }), + ); +}); + +const makeWorkspaceSearchIndex = (cwd: string) => + Effect.acquireRelease(createFinder(cwd), (finder) => Effect.sync(() => finder.destroy())).pipe( + Effect.tap((finder) => waitForScan(cwd, finder)), + Effect.map((finder) => { + const runMixedSearch = Effect.fn("WorkspaceSearchIndex.runMixedSearch")(function* ( + query: string, + pageSize: number, + ) { + const result = yield* Effect.sync(() => finder.mixedSearch(query, { pageSize })); + if (!result.ok) { + return yield* new WorkspaceSearchIndexSearchFailed({ cwd, reason: result.error }); + } + return result.value; + }); + + const refresh: WorkspaceSearchIndex["Service"]["refresh"] = Effect.fn( + "WorkspaceSearchIndex.refresh", + )(function* () { + const result = yield* Effect.sync(() => finder.scanFiles()); + if (!result.ok) { + return yield* new WorkspaceSearchIndexRefreshFailed({ cwd, reason: result.error }); + } + yield* waitForScan(cwd, finder); + }); + + const list: WorkspaceSearchIndex["Service"]["list"] = Effect.fn("WorkspaceSearchIndex.list")( + function* () { + const result = yield* runMixedSearch("", WORKSPACE_INDEX_PAGE_SIZE); + const mapped = mapMixedSearchResult(result, WORKSPACE_INDEX_MAX_ENTRIES); + const sortedEntries = withDirectoryAncestors(mapped.entries).toSorted((left, right) => + left.path.localeCompare(right.path), + ); + const entries = sortedEntries.slice(0, WORKSPACE_INDEX_MAX_ENTRIES); + return { + entries, + truncated: mapped.truncated || entries.length < sortedEntries.length, + }; + }, + ); + + const search: WorkspaceSearchIndex["Service"]["search"] = Effect.fn( + "WorkspaceSearchIndex.search", + )(function* (query, limit) { + const result = yield* runMixedSearch(query, Math.max(1, limit + 1)); + return mapMixedSearchResult(result, limit); + }); + + return WorkspaceSearchIndex.of({ list, refresh, search }); + }), + ); + +const workspaceSearchIndexLayer = (cwd: string) => + Layer.effect(WorkspaceSearchIndex, makeWorkspaceSearchIndex(cwd)); + +export class WorkspaceSearchIndexMap extends LayerMap.Service()( + "t3/workspace/WorkspaceSearchIndexMap", + { + lookup: workspaceSearchIndexLayer, + idleTimeToLive: WORKSPACE_INDEX_IDLE_TTL, + }, +) {} diff --git a/apps/server/src/ws.ts b/apps/server/src/ws.ts index 175bf3248b..34c993de84 100644 --- a/apps/server/src/ws.ts +++ b/apps/server/src/ws.ts @@ -34,6 +34,8 @@ import { OrchestrationGetSnapshotError, OrchestrationGetTurnDiffError, ORCHESTRATION_WS_METHODS, + ProjectListEntriesError, + ProjectReadFileError, ProjectSearchEntriesError, ProjectWriteFileError, RelayClientInstallFailedError, @@ -76,7 +78,7 @@ import * as PreviewAutomationBroker from "./mcp/PreviewAutomationBroker.ts"; import * as PreviewManager from "./preview/Manager.ts"; import { issueAssetUrl } from "./assets/AssetAccess.ts"; import * as PortScanner from "./preview/PortScanner.ts"; -import { WorkspaceEntries } from "./workspace/Services/WorkspaceEntries.ts"; +import * as WorkspaceEntries from "./workspace/WorkspaceEntries.ts"; import { WorkspaceFileSystem } from "./workspace/Services/WorkspaceFileSystem.ts"; import { WorkspacePathOutsideRootError } from "./workspace/Services/WorkspacePaths.ts"; import { VcsStatusBroadcaster } from "./vcs/VcsStatusBroadcaster.ts"; @@ -160,6 +162,8 @@ const RPC_REQUIRED_SCOPE = new Map([ [WS_METHODS.sourceControlLookupRepository, AuthOrchestrationReadScope], [WS_METHODS.sourceControlCloneRepository, AuthOrchestrationOperateScope], [WS_METHODS.sourceControlPublishRepository, AuthOrchestrationOperateScope], + [WS_METHODS.projectsListEntries, AuthOrchestrationReadScope], + [WS_METHODS.projectsReadFile, AuthOrchestrationReadScope], [WS_METHODS.projectsSearchEntries, AuthOrchestrationReadScope], [WS_METHODS.projectsWriteFile, AuthOrchestrationOperateScope], [WS_METHODS.shellOpenInEditor, AuthOrchestrationOperateScope], @@ -268,7 +272,7 @@ const makeWsRpcLayer = (currentSession: AuthenticatedSession) => const lifecycleEvents = yield* ServerLifecycleEvents; const serverSettings = yield* ServerSettingsService; const startup = yield* ServerRuntimeStartup; - const workspaceEntries = yield* WorkspaceEntries; + const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries; const workspaceFileSystem = yield* WorkspaceFileSystem; const projectSetupScriptRunner = yield* ProjectSetupScriptRunner; const repositoryIdentityResolver = yield* RepositoryIdentityResolver; @@ -1172,6 +1176,33 @@ const makeWsRpcLayer = (currentSession: AuthenticatedSession) => ), { "rpc.aggregate": "workspace" }, ), + [WS_METHODS.projectsListEntries]: (input) => + observeRpcEffect( + WS_METHODS.projectsListEntries, + workspaceEntries.list(input).pipe( + Effect.mapError( + (cause) => + new ProjectListEntriesError({ + message: `Failed to list workspace entries: ${cause.detail}`, + cause, + }), + ), + ), + { "rpc.aggregate": "workspace" }, + ), + [WS_METHODS.projectsReadFile]: (input) => + observeRpcEffect( + WS_METHODS.projectsReadFile, + workspaceFileSystem.readFile(input).pipe( + Effect.mapError((cause) => { + const message = isWorkspacePathOutsideRootError(cause) + ? "Workspace file path must stay within the project root." + : `Failed to read workspace file: ${cause.detail}`; + return new ProjectReadFileError({ message, cause }); + }), + ), + { "rpc.aggregate": "workspace" }, + ), [WS_METHODS.projectsWriteFile]: (input) => observeRpcEffect( WS_METHODS.projectsWriteFile, diff --git a/apps/server/vite.config.ts b/apps/server/vite.config.ts index 7e88ac7756..473df069ed 100644 --- a/apps/server/vite.config.ts +++ b/apps/server/vite.config.ts @@ -49,6 +49,15 @@ export default mergeConfig( __T3CODE_BUILD_CLERK_CLI_OAUTH_CLIENT_ID__: JSON.stringify( repoEnv.T3CODE_CLERK_CLI_OAUTH_CLIENT_ID?.trim() ?? "", ), + __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_URL__: JSON.stringify( + repoEnv.T3CODE_RELAY_CLIENT_OTLP_TRACES_URL?.trim() ?? "", + ), + __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_DATASET__: JSON.stringify( + repoEnv.T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET?.trim() ?? "", + ), + __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_TOKEN__: JSON.stringify( + repoEnv.T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN?.trim() ?? "", + ), }, }, test: { diff --git a/apps/web/THIRD_PARTY_NOTICES.md b/apps/web/THIRD_PARTY_NOTICES.md new file mode 100644 index 0000000000..c9a675ef41 --- /dev/null +++ b/apps/web/THIRD_PARTY_NOTICES.md @@ -0,0 +1,11 @@ +# Third-Party Notices + +## vscode-icons + +The custom file icon symbols in `src/pierre-icons.ts` are adapted from the +[`vscode-icons`](https://github.com/vscode-icons/vscode-icons) project. + +Copyright (c) 2016 Roberto Huertas + +Licensed under the MIT License. The full license text is available in the +upstream repository: . diff --git a/apps/web/package.json b/apps/web/package.json index cbf554a667..d6751c7348 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -14,8 +14,8 @@ }, "dependencies": { "@base-ui/react": "^1.4.1", - "@clerk/clerk-js": "^6.13.0", - "@clerk/react": "^6.7.2", + "@clerk/clerk-js": "^6.16.0", + "@clerk/react": "^6.9.0", "@dnd-kit/core": "^6.3.1", "@dnd-kit/modifiers": "^9.0.0", "@dnd-kit/sortable": "^10.0.0", @@ -27,6 +27,7 @@ "@legendapp/list": "3.0.0-beta.44", "@lexical/react": "^0.41.0", "@pierre/diffs": "catalog:", + "@pierre/trees": "1.0.0-beta.4", "@t3tools/client-runtime": "workspace:*", "@t3tools/contracts": "workspace:*", "@t3tools/shared": "workspace:*", diff --git a/apps/web/src/cloud/linkEnvironment.test.ts b/apps/web/src/cloud/linkEnvironment.test.ts index dc09a7fa04..30cb596781 100644 --- a/apps/web/src/cloud/linkEnvironment.test.ts +++ b/apps/web/src/cloud/linkEnvironment.test.ts @@ -318,6 +318,14 @@ describe("web cloud link environment client", () => { method: "POST", url: "https://managed.example.test/oauth/token", }); + const traceparents = fetchMock.mock.calls.map( + (call) => call[1]?.headers.traceparent as string | undefined, + ); + expect(traceparents.every((traceparent) => typeof traceparent === "string")).toBe(true); + expect(new Set(traceparents.map((traceparent) => traceparent?.split("-")[1])).size).toBe(1); + expect(connection.relayTraceHeaders.traceparent?.split("-")[1]).toBe( + traceparents[0]?.split("-")[1], + ); }), ); diff --git a/apps/web/src/cloud/linkEnvironment.ts b/apps/web/src/cloud/linkEnvironment.ts index b13b324a41..4c94ab4166 100644 --- a/apps/web/src/cloud/linkEnvironment.ts +++ b/apps/web/src/cloud/linkEnvironment.ts @@ -1,7 +1,7 @@ import * as Data from "effect/Data"; import * as Effect from "effect/Effect"; import * as Schema from "effect/Schema"; -import { HttpClient } from "effect/unstable/http"; +import { HttpClient, HttpTraceContext, type Headers } from "effect/unstable/http"; import { EnvironmentCloudEndpointUnavailableError, type EnvironmentCloudLinkStateResult, @@ -29,6 +29,7 @@ import { ManagedRelayDpopSigner, type WsRpcClient, } from "@t3tools/client-runtime"; +import { withRelayClientTracing } from "@t3tools/shared/relayTracing"; import { ensureLocalApi } from "../localApi"; import { @@ -245,6 +246,7 @@ export interface CloudManagedConnection { readonly wsBaseUrl: string; readonly relayUrl: string; readonly accessToken: string; + readonly relayTraceHeaders: Headers.Headers; } export function collectCloudLinkTargets(input: { @@ -437,8 +439,15 @@ export function connectManagedCloudEnvironment(input: { wsBaseUrl: connected.endpoint.wsBaseUrl, relayUrl: configuredRelayUrl, accessToken: session.access_token, + relayTraceHeaders: HttpTraceContext.toHeaders(yield* Effect.currentSpan.pipe(Effect.orDie)), }; - }); + }).pipe( + Effect.withSpan("relay.environment.connect", { + root: true, + attributes: { "relay.environment_id": input.environment.environmentId }, + }), + withRelayClientTracing, + ); } export function readPrimaryCloudLinkState(): Effect.Effect< diff --git a/apps/web/src/cloud/publicConfig.ts b/apps/web/src/cloud/publicConfig.ts index 291f1830ca..f7b3ca6bc3 100644 --- a/apps/web/src/cloud/publicConfig.ts +++ b/apps/web/src/cloud/publicConfig.ts @@ -5,12 +5,26 @@ export interface CloudPublicConfig { readonly clerkPublishableKey: string | null; readonly clerkJwtTemplate: string | null; readonly relayUrl: string | null; + readonly relayTracing: { + readonly tracesUrl: string | null; + readonly tracesDataset: string | null; + readonly tracesToken: string | null; + }; } function trimNonEmpty(value: string | undefined): string | null { return value?.trim() || null; } +function normalizeSecureUrl(value: string): string | null { + try { + const url = new URL(value); + return url.protocol === "https:" ? url.toString() : null; + } catch { + return null; + } +} + export function resolveCloudPublicConfig(): CloudPublicConfig { return { clerkPublishableKey: trimNonEmpty( @@ -20,9 +34,29 @@ export function resolveCloudPublicConfig(): CloudPublicConfig { relayUrl: normalizeSecureRelayUrl( (import.meta.env.VITE_T3CODE_RELAY_URL as string | undefined) ?? "", ), + relayTracing: { + tracesUrl: normalizeSecureUrl( + (import.meta.env.VITE_RELAY_OTLP_TRACES_URL as string | undefined) ?? "", + ), + tracesDataset: trimNonEmpty( + import.meta.env.VITE_RELAY_OTLP_TRACES_DATASET as string | undefined, + ), + tracesToken: trimNonEmpty(import.meta.env.VITE_RELAY_OTLP_TRACES_TOKEN as string | undefined), + }, }; } +export function resolveRelayTracingConfig() { + const { relayTracing } = resolveCloudPublicConfig(); + return relayTracing.tracesUrl && relayTracing.tracesDataset && relayTracing.tracesToken + ? { + tracesUrl: relayTracing.tracesUrl, + tracesDataset: relayTracing.tracesDataset, + tracesToken: relayTracing.tracesToken, + } + : null; +} + export function hasCloudPublicConfig(): boolean { const config = resolveCloudPublicConfig(); return Boolean(config.clerkPublishableKey && config.clerkJwtTemplate && config.relayUrl); diff --git a/apps/web/src/components/ChatMarkdown.browser.tsx b/apps/web/src/components/ChatMarkdown.browser.tsx index a93a6d231f..4eeab3e807 100644 --- a/apps/web/src/components/ChatMarkdown.browser.tsx +++ b/apps/web/src/components/ChatMarkdown.browser.tsx @@ -50,6 +50,7 @@ vi.mock("../browser/openFileInPreview", async (importOriginal) => ({ import ChatMarkdown from "./ChatMarkdown"; import { serializeTableElementToCsv, serializeTableElementToMarkdown } from "../markdown-clipboard"; import { EnvironmentId, ThreadId } from "@t3tools/contracts"; +import { selectThreadRightPanelState, useRightPanelStore } from "../rightPanelStore"; const threadRef = { environmentId: EnvironmentId.make("environment-test"), @@ -63,6 +64,7 @@ describe("ChatMarkdown", () => { openUrlInPreviewMock.mockClear(); contextMenuShowMock.mockReset(); readLocalApiMock.mockClear(); + useRightPanelStore.setState({ byThreadKey: {} }); localStorage.clear(); document.body.innerHTML = ""; }); @@ -248,6 +250,92 @@ describe("ChatMarkdown", () => { } }); + it("opens code file links in the right-panel file preview", async () => { + const screen = await render( + , + ); + + try { + await page.getByRole("link", { name: "ChatMarkdown.tsx · L978" }).click(); + + await vi.waitFor(() => { + expect( + selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, threadRef), + ).toMatchObject({ + isOpen: true, + activeSurfaceId: "file:apps/web/src/components/ChatMarkdown.tsx", + }); + expect(openInPreferredEditorMock).not.toHaveBeenCalled(); + expect(openFileInPreviewMock).not.toHaveBeenCalled(); + }); + } finally { + await screen.unmount(); + } + }); + + it("opens HTML and PDF file links in the integrated browser preview", async () => { + const screen = await render( + , + ); + + try { + await page.getByRole("link", { name: "report.html" }).click(); + await page.getByRole("link", { name: "report.pdf" }).click(); + + await vi.waitFor(() => { + expect(openFileInPreviewMock).toHaveBeenNthCalledWith( + 1, + threadRef, + "/repo/project/report.html", + ); + expect(openFileInPreviewMock).toHaveBeenNthCalledWith( + 2, + threadRef, + "/repo/project/report.pdf", + ); + expect(openInPreferredEditorMock).not.toHaveBeenCalled(); + }); + } finally { + await screen.unmount(); + } + }); + + it("keeps opening file links in the editor from the context menu", async () => { + contextMenuShowMock.mockResolvedValue("open"); + const filePath = "/repo/project/src/index.ts"; + const screen = await render( + , + ); + + try { + page + .getByRole("link", { name: "index.ts" }) + .element() + .dispatchEvent( + new MouseEvent("contextmenu", { + bubbles: true, + cancelable: true, + clientX: 4, + clientY: 8, + }), + ); + + await vi.waitFor(() => { + expect(openInPreferredEditorMock).toHaveBeenCalledWith(expect.anything(), filePath); + }); + } finally { + await screen.unmount(); + } + }); + it("keeps a favicon with the leading segment of a wrapping URL", async () => { const url = "https://github.com/pingdotgg/t3code/pull/3017/changes"; const screen = await render( @@ -429,7 +517,7 @@ describe("ChatMarkdown", () => { // Language with a known icon: icon XOR text — never the redundant pair. const languageOnly = titles[0]!; - const hasIcon = languageOnly.querySelector("img") != null; + const hasIcon = languageOnly.querySelector("svg[data-pierre-icon]") != null; const hasText = (languageOnly.textContent ?? "").includes("ts"); expect(hasIcon || hasText).toBe(true); expect(hasIcon && hasText).toBe(false); @@ -446,7 +534,7 @@ describe("ChatMarkdown", () => { expect(titles[1]!.textContent).toBe("src/main.ts"); // Unknown language: no icon attempt, text label. - expect(titles[2]!.querySelector("img")).toBeNull(); + expect(titles[2]!.querySelector("svg[data-pierre-icon]")).toBeNull(); expect(titles[2]!.textContent).toBe("text"); } finally { await screen.unmount(); diff --git a/apps/web/src/components/ChatMarkdown.tsx b/apps/web/src/components/ChatMarkdown.tsx index 3aba45249f..ecd6bc40ff 100644 --- a/apps/web/src/components/ChatMarkdown.tsx +++ b/apps/web/src/components/ChatMarkdown.tsx @@ -33,12 +33,8 @@ import remarkBreaks from "remark-breaks"; import remarkGfm from "remark-gfm"; import { renderSkillInlineMarkdownChildren } from "./chat/SkillInlineText"; import { CHAT_FILE_TAG_CHIP_CLASS_NAME, FileTagChipContent } from "./chat/FileTagChip"; -import { VscodeEntryIcon } from "./chat/VscodeEntryIcon"; -import { - getVscodeIconUrlForEntry, - hasSpecificVscodeIconForFileName, - syntheticFileNameForLanguageId, -} from "../vscode-icons"; +import { PierreEntryIcon } from "./chat/PierreEntryIcon"; +import { hasSpecificPierreIconForFileName, syntheticFileNameForLanguageId } from "../pierre-icons"; import { Tooltip, TooltipPopup, TooltipTrigger } from "./ui/tooltip"; import { Button } from "./ui/button"; import { Collapsible, CollapsiblePanel, CollapsibleTrigger } from "./ui/collapsible"; @@ -62,6 +58,7 @@ import { } from "../markdown-links"; import { readLocalApi } from "../localApi"; import { cn } from "../lib/utils"; +import { useRightPanelStore } from "../rightPanelStore"; import { isPreviewSupportedInRuntime } from "../previewStateStore"; import { isBrowserPreviewFile, @@ -443,22 +440,17 @@ function MarkdownCodeBlockTitleContent({ language: string; theme: "light" | "dark"; }) { - const [failedIconUrl, setFailedIconUrl] = useState(null); - if (fenceTitle) { return ( <> - + {fenceTitle} ); } const fileName = syntheticFileNameForLanguageId(language); - const iconUrl = hasSpecificVscodeIconForFileName(fileName, theme) - ? getVscodeIconUrlForEntry(fileName, "file", theme) - : null; - if (!iconUrl || failedIconUrl === iconUrl) { + if (!hasSpecificPierreIconForFileName(fileName)) { return {language}; } return ( @@ -468,15 +460,7 @@ function MarkdownCodeBlockTitleContent({ } > - setFailedIconUrl(iconUrl)} - /> + {language} @@ -674,6 +658,7 @@ interface MarkdownFileLinkProps { targetPath: string; iconPath: string; displayPath: string; + workspaceRelativePath: string | null; label: string; copyMarkdown: string; theme: "light" | "dark"; @@ -997,13 +982,14 @@ const MarkdownFileLink = memo(function MarkdownFileLink({ targetPath, iconPath, displayPath, + workspaceRelativePath, label, copyMarkdown, theme, threadRef, className, }: MarkdownFileLinkProps) { - const handleOpen = useCallback(() => { + const handleOpenInEditor = useCallback(() => { const api = readLocalApi(); if (!api) { toastManager.add({ @@ -1024,6 +1010,14 @@ const MarkdownFileLink = memo(function MarkdownFileLink({ }); }, [targetPath]); + const handleOpenInFilePreview = useCallback(() => { + if (!threadRef || !workspaceRelativePath) { + handleOpenInEditor(); + return; + } + useRightPanelStore.getState().openFile(threadRef, workspaceRelativePath); + }, [handleOpenInEditor, threadRef, workspaceRelativePath]); + const handleOpenInBrowser = useCallback(() => { if (!threadRef) return; void openFileInPreview(threadRef, iconPath).catch((error) => { @@ -1092,7 +1086,7 @@ const MarkdownFileLink = memo(function MarkdownFileLink({ ); if (clicked === "open") { - handleOpen(); + handleOpenInEditor(); return; } if (clicked === "open-in-browser") { @@ -1107,7 +1101,15 @@ const MarkdownFileLink = memo(function MarkdownFileLink({ handleCopy(targetPath, "Full path"); } }, - [displayPath, handleCopy, handleOpen, handleOpenInBrowser, iconPath, targetPath, threadRef], + [ + displayPath, + handleCopy, + handleOpenInBrowser, + handleOpenInEditor, + iconPath, + targetPath, + threadRef, + ], ); return ( @@ -1121,7 +1123,11 @@ const MarkdownFileLink = memo(function MarkdownFileLink({ onClick={(event) => { event.preventDefault(); event.stopPropagation(); - handleOpen(); + if (threadRef && isPreviewSupportedInRuntime() && isBrowserPreviewFile(iconPath)) { + handleOpenInBrowser(); + return; + } + handleOpenInFilePreview(); }} onContextMenu={handleContextMenu} > @@ -1150,6 +1156,7 @@ function areMarkdownFileLinkPropsEqual( previous.targetPath === next.targetPath && previous.iconPath === next.iconPath && previous.displayPath === next.displayPath && + previous.workspaceRelativePath === next.workspaceRelativePath && previous.label === next.label && previous.copyMarkdown === next.copyMarkdown && previous.theme === next.theme && @@ -1274,6 +1281,7 @@ function ChatMarkdown({ targetPath={fileLinkMeta.targetPath} iconPath={fileLinkMeta.filePath} displayPath={fileLinkMeta.displayPath} + workspaceRelativePath={fileLinkMeta.workspaceRelativePath} label={labelParts.join(" · ")} copyMarkdown={`[${fileLinkMeta.basename}](${normalizedHref})`} theme={resolvedTheme} diff --git a/apps/web/src/components/ChatView.browser.tsx b/apps/web/src/components/ChatView.browser.tsx index 17dc751e52..6f620d9a0a 100644 --- a/apps/web/src/components/ChatView.browser.tsx +++ b/apps/web/src/components/ChatView.browser.tsx @@ -53,7 +53,7 @@ import { resetSavedEnvironmentRuntimeStoreForTests, useSavedEnvironmentRegistryStore, useSavedEnvironmentRuntimeStore, -} from "../environments/runtime"; +} from "../environments/runtime/catalog"; import { INLINE_TERMINAL_CONTEXT_PLACEHOLDER, removeInlineTerminalContextPlaceholder, @@ -2110,6 +2110,460 @@ describe("ChatView timeline estimator parity (full app)", () => { } }); + it("keeps panel toggles fixed and can maximize the right panel", async () => { + const mounted = await mountChatView({ + viewport: WIDE_FOOTER_VIEWPORT, + snapshot: createSnapshotForTargetUser({ + targetMessageId: "msg-user-maximize-right-panel" as MessageId, + targetText: "maximize right panel", + }), + }); + + try { + const terminalToggle = await waitForElement( + () => + document.querySelector('button[aria-label="Toggle terminal drawer"]'), + "Unable to find terminal drawer toggle.", + ); + const rightPanelToggle = await waitForElement( + () => document.querySelector('button[aria-label="Toggle right panel"]'), + "Unable to find right panel toggle.", + ); + const chatHeader = await waitForElement( + () => document.querySelector("[data-chat-header]"), + "Unable to find chat header.", + ); + const panelLayoutControls = await waitForElement( + () => document.querySelector("[data-panel-layout-controls]"), + "Unable to find panel layout controls.", + ); + expect(chatHeader.getBoundingClientRect().height).toBe(52); + expect(panelLayoutControls.getBoundingClientRect().height).toBe(52); + expect(panelLayoutControls.getBoundingClientRect().top).toBe( + chatHeader.getBoundingClientRect().top, + ); + expect( + window.getComputedStyle(panelLayoutControls).getPropertyValue("-webkit-app-region"), + ).toBe("no-drag"); + expect(chatHeader.classList.contains("drag-region")).toBe(false); + expect(chatHeader.contains(panelLayoutControls)).toBe(true); + expect(window.innerWidth - panelLayoutControls.getBoundingClientRect().right).toBe(12); + const initialTerminalRect = terminalToggle.getBoundingClientRect(); + const initialRightPanelRect = rightPanelToggle.getBoundingClientRect(); + const initialControlRects = [initialTerminalRect, initialRightPanelRect]; + expect(document.querySelector('button[aria-label="Maximize panel"]')).toBeNull(); + expect(initialControlRects.every((rect) => rect.width === 28 && rect.height === 28)).toBe( + true, + ); + expect(initialControlRects.every((rect) => rect.top === initialControlRects[0]?.top)).toBe( + true, + ); + expect(initialRightPanelRect.left - initialTerminalRect.right).toBe(4); + + document.documentElement.classList.add("wco"); + expect(panelLayoutControls.getBoundingClientRect().height).toBe(52); + expect(panelLayoutControls.getBoundingClientRect().top).toBe( + chatHeader.getBoundingClientRect().top, + ); + expect(window.innerWidth - panelLayoutControls.getBoundingClientRect().right).toBe(12); + document.documentElement.classList.remove("wco"); + + rightPanelToggle.click(); + + const maximizeButton = await waitForElement( + () => document.querySelector('button[aria-label="Maximize panel"]'), + "Unable to find maximize panel button.", + ); + const rightPanelTabbar = await waitForElement( + () => document.querySelector("[data-right-panel-tabbar]"), + "Unable to find right panel tab bar.", + ); + const rightPanelTabList = await waitForElement( + () => document.querySelector("[data-right-panel-tab-list]"), + "Unable to find right panel tab list.", + ); + const maximizeRect = maximizeButton.getBoundingClientRect(); + const rightPanelTabbarRect = rightPanelTabbar.getBoundingClientRect(); + const openPanelLayoutControls = await waitForElement( + () => document.querySelector("[data-panel-layout-controls]"), + "Unable to find open panel layout controls.", + ); + const openTerminalToggle = await waitForElement( + () => + document.querySelector('button[aria-label="Toggle terminal drawer"]'), + "Unable to find open panel terminal toggle.", + ); + const openRightPanelToggle = await waitForElement( + () => document.querySelector('button[aria-label="Toggle right panel"]'), + "Unable to find open panel right panel toggle.", + ); + expect(document.querySelector('button[aria-label="Add panel surface"]')).toBeNull(); + expect(rightPanelTabbarRect.height).toBe(52); + expect(rightPanelTabbarRect.top).toBe(chatHeader.getBoundingClientRect().top); + expect(chatHeader.contains(openPanelLayoutControls)).toBe(false); + expect( + window.getComputedStyle(rightPanelTabbar).getPropertyValue("-webkit-app-region"), + ).not.toBe("drag"); + expect(rightPanelTabList.classList.contains("drag-region")).toBe(false); + expect(window.getComputedStyle(maximizeButton).getPropertyValue("-webkit-app-region")).toBe( + "no-drag", + ); + expect( + window.getComputedStyle(openTerminalToggle).getPropertyValue("-webkit-app-region"), + ).toBe("no-drag"); + expect( + window.getComputedStyle(openRightPanelToggle).getPropertyValue("-webkit-app-region"), + ).toBe("no-drag"); + expect(maximizeRect.width).toBe(28); + expect(maximizeRect.height).toBe(28); + expect(maximizeRect.top).toBe(initialTerminalRect.top); + expect(initialTerminalRect.left - maximizeRect.right).toBe(4); + expect(openTerminalToggle.getBoundingClientRect().left).toBeCloseTo( + initialTerminalRect.left, + 1, + ); + expect(openRightPanelToggle.getBoundingClientRect().left).toBeCloseTo( + initialRightPanelRect.left, + 1, + ); + + useRightPanelStore.getState().openFile(THREAD_REF, "components.json"); + const fileTabIcon = await waitForElement( + () => + document.querySelector( + '[data-right-panel-tabbar] [data-pierre-icon][data-icon-token="json"]', + ), + "Unable to find the Pierre file icon in the file tab.", + ); + expect(fileTabIcon.closest("button")?.textContent).toContain("components.json"); + + document.documentElement.classList.add("wco"); + expect(rightPanelTabbar.getBoundingClientRect().height).toBe( + openPanelLayoutControls.getBoundingClientRect().height, + ); + expect(rightPanelTabbar.getBoundingClientRect().top).toBe( + openPanelLayoutControls.getBoundingClientRect().top, + ); + document.documentElement.classList.remove("wco"); + + maximizeButton.click(); + + await vi.waitFor(() => { + const chatColumn = document.querySelector( + '[data-chat-column-maximized-away="true"]', + ); + const panel = document.querySelector( + '[data-preview-panel-mode="inline"][data-preview-panel-maximized="true"]', + ); + expect(chatColumn?.getBoundingClientRect().width).toBe(0); + expect(panel?.getBoundingClientRect().width).toBeGreaterThan(1_000); + expect( + document.querySelector('button[aria-label="Restore panel size"]'), + ).not.toBeNull(); + expect( + document + .querySelector('button[aria-label="Toggle terminal drawer"]') + ?.getBoundingClientRect().left, + ).toBeCloseTo(initialTerminalRect.left, 1); + expect( + document + .querySelector('button[aria-label="Toggle right panel"]') + ?.getBoundingClientRect().left, + ).toBeCloseTo(initialRightPanelRect.left, 1); + }); + } finally { + await mounted.cleanup(); + } + }); + + it("loads file previews from the active thread worktree", async () => { + const worktreePath = "/repo/worktrees/file-preview-thread"; + const snapshot = createSnapshotForTargetUser({ + targetMessageId: "msg-user-worktree-file-preview" as MessageId, + targetText: "open the worktree file preview", + }); + const targetThread = snapshot.threads.find((thread) => thread.id === THREAD_ID); + if (!targetThread) { + throw new Error("Missing target thread fixture."); + } + + const mounted = await mountChatView({ + viewport: DEFAULT_VIEWPORT, + snapshot: { + ...snapshot, + threads: snapshot.threads.map((thread) => + thread.id === THREAD_ID ? { ...thread, worktreePath } : thread, + ), + }, + resolveRpc: (body) => { + if (body._tag === WS_METHODS.projectsListEntries) { + return { entries: [{ path: "src/index.ts", kind: "file" }], truncated: false }; + } + if (body._tag === WS_METHODS.projectsReadFile) { + return { + relativePath: "src/index.ts", + contents: "export const worktree = true;\n", + byteLength: 30, + truncated: false, + }; + } + return undefined; + }, + }); + + try { + useRightPanelStore.getState().open(THREAD_REF, "files"); + await waitForElement( + () => document.querySelector("[data-file-browser-panel]"), + "Unable to find the worktree file explorer.", + ); + + useRightPanelStore.getState().openFile(THREAD_REF, "src/index.ts"); + await waitForElement( + () => document.querySelector(".file-preview-virtualizer"), + "Unable to find the worktree file preview.", + ); + + const listRequest = wsRequests.find( + (request) => request._tag === WS_METHODS.projectsListEntries, + ); + const readRequest = wsRequests.find( + (request) => request._tag === WS_METHODS.projectsReadFile, + ); + expect(listRequest).toMatchObject({ cwd: worktreePath }); + expect(readRequest).toMatchObject({ cwd: worktreePath, relativePath: "src/index.ts" }); + } finally { + await mounted.cleanup(); + } + }); + + it("scrolls file tabs and preserves the workspace explorer across file previews", async () => { + const workspaceEntries = [ + { path: "src", kind: "directory" as const }, + { path: "src/index.ts", kind: "file" as const }, + { path: "src/router.ts", kind: "file" as const }, + { path: "src/store.ts", kind: "file" as const }, + { path: "src/styles.css", kind: "file" as const }, + { path: "src/large.ts", kind: "file" as const }, + { path: "e2e", kind: "directory" as const }, + { path: "e2e/test-results", kind: "directory" as const }, + { + path: "e2e/test-results/playwright-integration-results", + kind: "directory" as const, + }, + { + path: "e2e/test-results/playwright-integration-results/chromium-desktop-project", + kind: "directory" as const, + }, + { + path: "e2e/test-results/playwright-integration-results/chromium-desktop-project/.last-run.json", + kind: "file" as const, + }, + { path: "README.md", kind: "file" as const }, + { path: "AGENTS.md", kind: "file" as const }, + { path: "package.json", kind: "file" as const }, + { path: "tsconfig.json", kind: "file" as const }, + ]; + const mounted = await mountChatView({ + viewport: WIDE_FOOTER_VIEWPORT, + snapshot: createSnapshotForTargetUser({ + targetMessageId: "msg-user-file-tabs-and-tree-state" as MessageId, + targetText: "keep file tabs readable and preserve tree state", + }), + resolveRpc: (body) => { + if (body._tag === WS_METHODS.projectsListEntries) { + return { entries: workspaceEntries, truncated: false }; + } + if (body._tag === WS_METHODS.projectsReadFile) { + const relativePath = + typeof body.relativePath === "string" ? body.relativePath : "file.ts"; + const contents = + relativePath === "src/large.ts" + ? Array.from( + { length: 5_000 }, + (_, index) => `export const line${index + 1} = ${index + 1};`, + ).join("\n") + : `// ${relativePath}\n`; + return { + relativePath, + contents, + byteLength: new TextEncoder().encode(contents).byteLength, + truncated: false, + }; + } + return undefined; + }, + }); + + try { + useRightPanelStore.getState().open(THREAD_REF, "files"); + + const explorer = await waitForElement( + () => document.querySelector("[data-file-browser-panel]"), + "Unable to find the workspace file explorer.", + ); + + for (const entry of workspaceEntries) { + if (entry.kind === "file") { + useRightPanelStore.getState().openFile(THREAD_REF, entry.path); + } + } + + const tabList = await waitForElement( + () => document.querySelector("[data-right-panel-tab-list]"), + "Unable to find the right panel tab list.", + ); + const tabViewport = await waitForElement( + () => tabList.querySelector('[data-slot="scroll-area-viewport"]'), + "Unable to find the right panel tab viewport.", + ); + + await vi.waitFor(() => { + const fileTabs = Array.from(tabList.querySelectorAll("[data-active-tab]")); + expect(fileTabs.length).toBe( + workspaceEntries.filter((entry) => entry.kind === "file").length, + ); + expect(tabViewport.scrollWidth).toBeGreaterThan(tabViewport.clientWidth); + expect(tabViewport.scrollLeft).toBeGreaterThan(0); + expect(tabList.querySelector('[data-slot="scroll-area-scrollbar"]')).toBeNull(); + expect( + fileTabs.every((tab) => { + const width = tab.getBoundingClientRect().width; + return width >= 100 && width <= 176; + }), + ).toBe(true); + expect(document.querySelector("[data-file-browser-panel]")).toBe(explorer); + }); + + useRightPanelStore.getState().openFile(THREAD_REF, "src/index.ts"); + await vi.waitFor(() => { + expect(document.querySelector("[data-file-browser-panel]")).toBe(explorer); + }); + + useRightPanelStore + .getState() + .openFile( + THREAD_REF, + "e2e/test-results/playwright-integration-results/chromium-desktop-project/.last-run.json", + ); + await mounted.setContainerSize({ width: 800, height: WIDE_FOOTER_VIEWPORT.height }); + const breadcrumbs = await waitForElement( + () => document.querySelector("[data-file-breadcrumbs]"), + "Unable to find the responsive file breadcrumbs.", + ); + const fileSubheader = breadcrumbs.closest("[data-surface-subheader]"); + const breadcrumbViewport = await waitForElement( + () => breadcrumbs.querySelector('[data-slot="scroll-area-viewport"]'), + "Unable to find the file breadcrumb viewport.", + ); + const currentCrumb = await waitForElement( + () => + Array.from( + breadcrumbs.querySelectorAll("[data-current-file-crumb='true']"), + ).find((crumb) => crumb.textContent === ".last-run.json") ?? null, + "Unable to find the current file breadcrumb.", + ); + const explorerToggle = await waitForElement( + () => document.querySelector('button[aria-label="Hide file explorer"]'), + "Unable to find the file explorer toggle.", + ); + + await vi.waitFor(() => { + const viewportRect = breadcrumbViewport.getBoundingClientRect(); + const currentCrumbRect = currentCrumb.getBoundingClientRect(); + expect(breadcrumbViewport.scrollWidth).toBeGreaterThan(breadcrumbViewport.clientWidth); + expect(breadcrumbViewport.scrollLeft).toBeGreaterThan(0); + expect(breadcrumbs.querySelector('[data-slot="scroll-area-scrollbar"]')).toBeNull(); + expect(currentCrumbRect.right).toBeLessThanOrEqual(viewportRect.right + 1); + expect(viewportRect.right).toBeLessThan(explorerToggle.getBoundingClientRect().left); + expect(explorerToggle.getAttribute("aria-pressed")).toBe("true"); + expect(explorerToggle.getBoundingClientRect().width).toBe(28); + expect(explorerToggle.getBoundingClientRect().height).toBe(28); + expect(fileSubheader?.getBoundingClientRect().height).toBe(40); + expect(window.getComputedStyle(fileSubheader!).borderTopWidth).toBe("0px"); + expect(window.getComputedStyle(fileSubheader!).borderBottomWidth).toBe("1px"); + }); + + const fileSearchButton = await waitForElement( + () => + document.querySelector('button[aria-label="Search workspace files"]'), + "Unable to find the workspace file search button.", + ); + fileSearchButton.click(); + const fileTree = await waitForElement( + () => document.querySelector("file-tree-container"), + "Unable to find the file tree host.", + ); + const fileSearchInput = await waitForElement( + () => + fileTree.shadowRoot?.querySelector("[data-file-tree-search-input]") ?? + null, + "Unable to find the file tree search input.", + ); + fileSearchInput.focus(); + const searchKeyEvent = new KeyboardEvent("keydown", { + key: "r", + bubbles: true, + cancelable: true, + composed: true, + }); + fileSearchInput.dispatchEvent(searchKeyEvent); + await waitForLayout(); + expect(searchKeyEvent.defaultPrevented).toBe(false); + expect(fileTree.shadowRoot?.activeElement).toBe(fileSearchInput); + expect(useComposerDraftStore.getState().draftsByThreadKey[THREAD_KEY]?.prompt ?? "").toBe(""); + + useRightPanelStore.getState().openFile(THREAD_REF, "src/large.ts"); + const codeVirtualizer = await waitForElement( + () => document.querySelector(".file-preview-virtualizer"), + "Unable to find the virtualized file preview.", + ); + expect(codeVirtualizer.querySelector("diffs-container")).not.toBeNull(); + expect(codeVirtualizer.classList.contains("overflow-auto")).toBe(true); + } finally { + await mounted.cleanup(); + } + }); + + it("removes persisted file tabs when a draft workspace no longer exists", async () => { + const orphanedDraftId = DraftId.make("draft-orphaned-file-panel"); + const orphanedThreadId = "thread-orphaned-file-panel" as ThreadId; + const orphanedThreadRef = scopeThreadRef(LOCAL_ENVIRONMENT_ID, orphanedThreadId); + useComposerDraftStore.getState().setProjectDraftThreadId( + { + environmentId: LOCAL_ENVIRONMENT_ID, + projectId: "project-deleted" as ProjectId, + }, + orphanedDraftId, + { threadId: orphanedThreadId }, + ); + useRightPanelStore.getState().openFile(orphanedThreadRef, "conductor.json"); + + const mounted = await mountChatView({ + viewport: WIDE_FOOTER_VIEWPORT, + snapshot: createSnapshotForTargetUser({ + targetMessageId: "msg-user-orphaned-file-panel" as MessageId, + targetText: "orphaned persisted file panel", + }), + initialPath: `/draft/${orphanedDraftId}`, + }); + + try { + await vi.waitFor(() => { + expect( + selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, orphanedThreadRef), + ).toEqual({ + isOpen: false, + activeSurfaceId: null, + surfaces: [], + }); + expect(document.querySelector("[data-right-panel-tabbar]")).toBeNull(); + }); + } finally { + await mounted.cleanup(); + } + }); + it("keeps multiple terminal panel surfaces separate from the bottom drawer", async () => { const mounted = await mountChatView({ viewport: WIDE_FOOTER_VIEWPORT, @@ -2126,11 +2580,10 @@ describe("ChatView timeline estimator parity (full app)", () => { ); rightPanelToggle.click(); - const addSurface = await waitForElement( - () => document.querySelector('button[aria-label="Add panel surface"]'), - "Unable to find add panel surface button.", - ); - expect(document.body.textContent).toContain("Open a surface"); + await vi.waitFor(() => { + expect(document.body.textContent).toContain("Open a surface"); + }); + expect(document.querySelector('button[aria-label="Add panel surface"]')).toBeNull(); expect( selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, THREAD_REF), ).toEqual({ @@ -2140,16 +2593,14 @@ describe("ChatView timeline estimator parity (full app)", () => { }); expect(wsRequests.some((request) => request._tag === WS_METHODS.terminalOpen)).toBe(false); - addSurface.click(); - - const terminalItem = await waitForElement( + const emptyStateTerminalButton = await waitForElement( () => - Array.from(document.querySelectorAll('[role="menuitem"]')).find( - (item) => item.textContent?.trim() === "Terminal", + Array.from(document.querySelectorAll("button")).find((button) => + button.textContent?.includes("Start a shell in this workspace."), ) ?? null, - "Unable to find Terminal panel menu item.", + "Unable to find the empty-state Terminal button.", ); - terminalItem.click(); + emptyStateTerminalButton.click(); await vi.waitFor(() => { expect( @@ -2159,6 +2610,10 @@ describe("ChatView timeline estimator parity (full app)", () => { ).toEqual(["term-1"]); }); + const addSurface = await waitForElement( + () => document.querySelector('button[aria-label="Add panel surface"]'), + "Unable to find add panel surface button beside the tabs.", + ); addSurface.click(); const secondTerminalItem = await waitForElement( () => @@ -3977,7 +4432,6 @@ describe("ChatView timeline estimator parity (full app)", () => { { path: "path/to/package.json", kind: "file", - parentPath: "path/to", }, ], truncated: false, diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 7a960ea90e..b260ddec0f 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -35,7 +35,7 @@ import { lazy, memo, Suspense, useCallback, useEffect, useMemo, useRef, useState import { useNavigate, useSearch } from "@tanstack/react-router"; import { useShallow } from "zustand/react/shallow"; import { useVcsStatus } from "~/lib/vcsStatusState"; -import { usePrimaryEnvironmentId } from "../environments/primary"; +import { usePrimaryEnvironmentId } from "../environments/primary/context"; import { readEnvironmentApi } from "../environmentApi"; import { resolveAssetUrl } from "../assets/assetUrls"; import { isElectron } from "../env"; @@ -67,7 +67,7 @@ import { togglePendingUserInputOptionSelection, type PendingUserInputDraftAnswer, } from "../pendingUserInput"; -import { selectProjectsAcrossEnvironments, useStore } from "../store"; +import { selectEnvironmentState, selectProjectsAcrossEnvironments, useStore } from "../store"; import { createProjectSelectorByRef, createThreadSelectorByRef } from "../storeSelectors"; import { useUiStateStore } from "../uiStateStore"; import { @@ -111,6 +111,8 @@ const PreviewPanel = lazy(() => import("./preview/PreviewPanel").then((mod) => ({ default: mod.PreviewPanel })), ); const DiffPanel = lazy(() => import("./DiffPanel")); +const FilePreviewPanel = lazy(() => import("./files/FilePreviewPanel")); +const EMPTY_PENDING_FILE_SURFACE_IDS: ReadonlySet = new Set(); import { BranchToolbar } from "./BranchToolbar"; import { resolveShortcutCommand, shortcutLabelForCommand } from "../keybindings"; import PlanSidebar from "./PlanSidebar"; @@ -137,10 +139,10 @@ import { selectProjectGroupingSettings, } from "../logicalProject"; import { - reconnectSavedEnvironment, useSavedEnvironmentRegistryStore, useSavedEnvironmentRuntimeStore, -} from "../environments/runtime"; +} from "../environments/runtime/catalog"; +import { reconnectSavedEnvironment } from "../environments/runtime/service"; import { buildDraftThreadRouteParams } from "../threadRoutes"; import { type ComposerImageAttachment, @@ -167,6 +169,7 @@ import { ExpandedImageDialog } from "./chat/ExpandedImageDialog"; import { PullRequestThreadDialog } from "./PullRequestThreadDialog"; import { MessagesTimeline } from "./chat/MessagesTimeline"; import { ChatHeader } from "./chat/ChatHeader"; +import { PanelLayoutControls } from "./chat/PanelLayoutControls"; import { type ExpandedImagePreview } from "./chat/ExpandedImagePreview"; import { NoActiveThreadState } from "./NoActiveThreadState"; import { resolveEffectiveEnvMode, resolveEnvironmentOptionLabel } from "./BranchToolbar.logic"; @@ -256,10 +259,12 @@ type EnvironmentUnavailableState = { type ThreadPlanCatalogEntry = Pick; -function eventTargetElement(target: EventTarget | null): Element | null { - if (target instanceof Element) return target; - if (target instanceof Node) return target.parentElement; - return null; +function eventPathContainsSelector(event: Event, selector: string): boolean { + const path = event.composedPath(); + if (path.length === 0 && event.target) { + path.push(event.target); + } + return path.some((target) => target instanceof Element && target.closest(selector)); } function shouldTypeToFocusComposer(event: KeyboardEvent): boolean { @@ -267,9 +272,8 @@ function shouldTypeToFocusComposer(event: KeyboardEvent): boolean { if (event.metaKey || event.ctrlKey || event.altKey) return false; if (event.key.length !== 1) return false; - const target = eventTargetElement(event.target); - if (target?.closest(TYPE_TO_FOCUS_EDITABLE_SELECTOR)) return false; - if (target?.closest(TYPE_TO_FOCUS_INTERACTIVE_SELECTOR)) return false; + if (eventPathContainsSelector(event, TYPE_TO_FOCUS_EDITABLE_SELECTOR)) return false; + if (eventPathContainsSelector(event, TYPE_TO_FOCUS_INTERACTIVE_SELECTOR)) return false; if (document.querySelector(TYPE_TO_FOCUS_FLOATING_LAYER_SELECTOR)) return false; return true; @@ -1055,7 +1059,7 @@ const PersistentThreadTerminalPanel = memo(function PersistentThreadTerminalPane ); }); -export default function ChatView(props: ChatViewProps) { +function ChatViewContent(props: ChatViewProps) { const { environmentId, threadId, @@ -1152,6 +1156,9 @@ export default function ChatView(props: ChatViewProps) { >({}); const [isConnecting, _setIsConnecting] = useState(false); const [isRevertingCheckpoint, setIsRevertingCheckpoint] = useState(false); + const [maximizedRightPanelThreadKey, setMaximizedRightPanelThreadKey] = useState( + null, + ); const [respondingRequestIds, setRespondingRequestIds] = useState([]); const [respondingUserInputRequestIds, setRespondingUserInputRequestIds] = useState< ApprovalRequestId[] @@ -1324,6 +1331,9 @@ export default function ChatView(props: ChatViewProps) { const planSidebarOpen = activeRightPanelKind === "plan"; const previewPanelOpen = activeRightPanelKind === "preview" && isPreviewSupportedInRuntime(); const rightPanelOpen = rightPanelState.isOpen; + const canMaximizeRightPanel = rightPanelOpen && !shouldUsePlanSidebarSheet; + const rightPanelMaximized = + canMaximizeRightPanel && maximizedRightPanelThreadKey === routeThreadKey; const inlineRightPanelOwnsTitleBar = rightPanelOpen && !shouldUsePlanSidebarSheet; useEffect(() => { @@ -1358,11 +1368,58 @@ export default function ChatView(props: ChatViewProps) { const activeProject = useStore( useMemo(() => createProjectSelectorByRef(activeProjectRef), [activeProjectRef]), ); + const activeProjectKey = activeProject + ? `${activeProject.environmentId}:${activeProject.cwd}` + : null; + const [pendingFileSurfaceIdsByProject, setPendingFileSurfaceIdsByProject] = useState< + ReadonlyMap> + >(() => new Map()); + const pendingFileSurfaceIds = activeProjectKey + ? (pendingFileSurfaceIdsByProject.get(activeProjectKey) ?? EMPTY_PENDING_FILE_SURFACE_IDS) + : EMPTY_PENDING_FILE_SURFACE_IDS; + const handleFilePendingChange = useCallback( + (relativePath: string, pending: boolean) => { + if (!activeProjectKey) return; + setPendingFileSurfaceIdsByProject((currentByProject) => { + const current = currentByProject.get(activeProjectKey) ?? EMPTY_PENDING_FILE_SURFACE_IDS; + const surfaceId = `file:${relativePath}`; + if (current.has(surfaceId) === pending) return currentByProject; + + const next = new Set(current); + if (pending) { + next.add(surfaceId); + } else { + next.delete(surfaceId); + } + + const nextByProject = new Map(currentByProject); + if (next.size === 0) { + nextByProject.delete(activeProjectKey); + } else { + nextByProject.set(activeProjectKey, next); + } + return nextByProject; + }); + }, + [activeProjectKey], + ); + const activeEnvironmentBootstrapComplete = useStore((state) => + activeThread + ? selectEnvironmentState(state, activeThread.environmentId).bootstrapComplete + : false, + ); const configuredPreviewUrls = useMemo( () => getConfiguredPreviewUrls(activeProject?.scripts), [activeProject?.scripts], ); + useEffect(() => { + if (!activeThreadRef || !activeEnvironmentBootstrapComplete) return; + useRightPanelStore + .getState() + .reconcileFileSurfaces(activeThreadRef, activeProject !== undefined); + }, [activeEnvironmentBootstrapComplete, activeProject, activeThreadRef]); + useEffect(() => { if (routeKind !== "server") { return; @@ -2209,6 +2266,8 @@ export default function ChatView(props: ChatViewProps) { }), [terminalUiState.terminalOpen], ); + const terminalToggleShortcutLabel = shortcutLabelForCommand(keybindings, "terminal.toggle"); + const rightPanelToggleShortcutLabel = shortcutLabelForCommand(keybindings, "rightPanel.toggle"); const splitTerminalShortcutLabel = useMemo( () => shortcutLabelForCommand(keybindings, "terminal.split", terminalShortcutLabelOptions), [keybindings, terminalShortcutLabelOptions], @@ -2257,6 +2316,14 @@ export default function ChatView(props: ChatViewProps) { onDiffPanelOpen, threadId, ]); + const addFilesSurface = () => { + if (!activeThreadRef || !activeProject) return; + useRightPanelStore.getState().open(activeThreadRef, "files"); + }; + const openFileSurface = (relativePath: string) => { + if (!activeThreadRef || !activeProject) return; + useRightPanelStore.getState().openFile(activeThreadRef, relativePath); + }; // Right-panel arbitration: // - The diff panel's openness is mirrored by the `?diff=1` URL search // param so it deep-links cleanly. The store still records preview/plan @@ -2979,12 +3046,14 @@ export default function ChatView(props: ChatViewProps) { }, [activePlan?.turnId, activeThreadRef, planSidebarOpen, sidebarProposedPlan?.turnId]); const closePlanSidebar = useCallback(() => { if (!activeThreadRef) return; + setMaximizedRightPanelThreadKey(null); useRightPanelStore.getState().close(activeThreadRef); planSidebarDismissedForTurnRef.current = activePlan?.turnId ?? sidebarProposedPlan?.turnId ?? "__dismissed__"; }, [activePlan?.turnId, activeThreadRef, sidebarProposedPlan?.turnId]); const closePreviewPanel = useCallback(() => { if (!activeThreadRef) return; + setMaximizedRightPanelThreadKey(null); useRightPanelStore.getState().close(activeThreadRef); }, [activeThreadRef]); const activateRightPanelSurface = useCallback( @@ -3018,8 +3087,17 @@ export default function ChatView(props: ChatViewProps) { ); const toggleRightPanel = useCallback(() => { if (!activeThreadRef) return; + if (rightPanelOpen) { + setMaximizedRightPanelThreadKey(null); + } useRightPanelStore.getState().toggleVisibility(activeThreadRef); - }, [activeThreadRef]); + }, [activeThreadRef, rightPanelOpen]); + const toggleRightPanelMaximized = () => { + if (!canMaximizeRightPanel) return; + setMaximizedRightPanelThreadKey((threadKey) => + threadKey === routeThreadKey ? null : routeThreadKey, + ); + }; const closeRightPanelSurface = useCallback( (surface: RightPanelSurface) => { if (!activeThreadRef) return; @@ -4480,26 +4558,51 @@ export default function ChatView(props: ChatViewProps) { return ; } + const panelLayoutControls = ( + + ); + return ( -
+
{isElectron && activeThreadRef ? ( ) : null} -
+ {rightPanelOpen ? panelLayoutControls : null} +
{/* Top bar */}
+ {!rightPanelOpen ? panelLayoutControls : null}
@@ -4730,8 +4828,10 @@ export default function ChatView(props: ChatViewProps) { {!shouldUsePlanSidebarSheet && rightPanelOpen && activeThreadRef ? ( {activeRightPanelSurface?.kind === "preview" ? ( @@ -4771,11 +4873,28 @@ export default function ChatView(props: ChatViewProps) { closeShortcutLabel={closeTerminalShortcutLabel ?? undefined} /> ) : activeRightPanelSurface?.kind === "diff" ? ( - - - - - + + + + ) : (activeRightPanelSurface?.kind === "files" || + activeRightPanelSurface?.kind === "file") && + activeProject && + activeWorkspaceRoot ? ( + + + ) : null} ) : null} @@ -4786,6 +4905,7 @@ export default function ChatView(props: ChatViewProps) { mode="sheet" surfaces={rightPanelState.surfaces} activeSurfaceId={activeRightPanelSurface?.id ?? null} + pendingSurfaceIds={pendingFileSurfaceIds} previewSessions={activePreviewState.sessions} terminalLabelsById={activeTerminalLabelsById} onActivate={activateRightPanelSurface} @@ -4793,8 +4913,10 @@ export default function ChatView(props: ChatViewProps) { onAddBrowser={createBrowserSurface} onAddTerminal={addTerminalSurface} onAddDiff={addDiffSurface} + onAddFiles={addFilesSurface} browserAvailable={isPreviewSupportedInRuntime()} diffAvailable={isServerThread && isGitRepo} + filesAvailable={Boolean(activeProject)} > {activeRightPanelSurface?.kind === "preview" ? ( @@ -4825,11 +4947,9 @@ export default function ChatView(props: ChatViewProps) { closeShortcutLabel={closeTerminalShortcutLabel ?? undefined} /> ) : activeRightPanelSurface?.kind === "diff" ? ( - - - - - + + + ) : activeRightPanelSurface?.kind === "plan" ? ( + ) : (activeRightPanelSurface?.kind === "files" || + activeRightPanelSurface?.kind === "file") && + activeProject && + activeWorkspaceRoot ? ( + + + ) : null} @@ -4854,3 +4993,11 @@ export default function ChatView(props: ChatViewProps) {
); } + +export default function ChatView(props: ChatViewProps) { + return ( + + + + ); +} diff --git a/apps/web/src/components/ComposerPromptEditor.tsx b/apps/web/src/components/ComposerPromptEditor.tsx index 2fcbd929e1..18579cda6d 100644 --- a/apps/web/src/components/ComposerPromptEditor.tsx +++ b/apps/web/src/components/ComposerPromptEditor.tsx @@ -64,7 +64,7 @@ import { type TerminalContextDraft, } from "~/lib/terminalContext"; import { cn } from "~/lib/utils"; -import { basenameOfPath } from "~/vscode-icons"; +import { basenameOfPath } from "~/pierre-icons"; import { COMPOSER_INLINE_CHIP_ICON_CLASS_NAME, COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME, diff --git a/apps/web/src/components/DiffPanel.tsx b/apps/web/src/components/DiffPanel.tsx index c6d00d4bec..7b492020e3 100644 --- a/apps/web/src/components/DiffPanel.tsx +++ b/apps/web/src/components/DiffPanel.tsx @@ -23,8 +23,8 @@ import { openInPreferredEditor } from "../editorPreferences"; import { useCheckpointDiff } from "~/lib/checkpointDiffState"; import { useVcsStatus } from "~/lib/vcsStatusState"; import { cn } from "~/lib/utils"; +import { openDiffFilePrimaryAction } from "../diffFileActions"; import { readLocalApi } from "../localApi"; -import { resolvePathLinkTarget } from "../terminal-links"; import { parseDiffRouteSearch, stripDiffSearchParams } from "../diffRouteSearch"; import { useTheme } from "../hooks/useTheme"; import { @@ -328,16 +328,22 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) { target?.scrollIntoView({ block: "nearest" }); }, [selectedFilePath, renderableFiles]); - const openDiffFileInEditor = useCallback( + const openDiffFile = useCallback( (filePath: string) => { - const api = readLocalApi(); - if (!api) return; - const targetPath = activeCwd ? resolvePathLinkTarget(filePath, activeCwd) : filePath; - void openInPreferredEditor(api, targetPath).catch((error) => { - console.warn("Failed to open diff file in editor.", error); + openDiffFilePrimaryAction({ + threadRef: routeThreadRef, + filePath, + activeCwd, + openInEditor: (targetPath) => { + const api = readLocalApi(); + if (!api) return; + void openInPreferredEditor(api, targetPath).catch((error) => { + console.warn("Failed to open diff file in editor.", error); + }); + }, }); }, - [activeCwd], + [activeCwd, routeThreadRef], ); const toggleDiffFileCollapsed = useCallback((fileKey: string) => { setCollapsedDiffFileKeys((current) => { @@ -664,7 +670,7 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) { return node.hasAttribute("data-title"); }); if (!clickedHeader) return; - openDiffFileInEditor(filePath); + openDiffFile(filePath); }} > { + it("uses the shared compact surface subheader in embedded mode", async () => { + const screen = await render( + Diff controls}> +
Diff content
+
, + ); + const subheader = screen.container.querySelector("[data-surface-subheader]"); + + expect(subheader).not.toBeNull(); + expect(subheader?.getBoundingClientRect().height).toBe(40); + expect(window.getComputedStyle(subheader!).borderTopWidth).toBe("0px"); + expect(window.getComputedStyle(subheader!).borderBottomWidth).toBe("1px"); + }); +}); diff --git a/apps/web/src/components/DiffPanelShell.tsx b/apps/web/src/components/DiffPanelShell.tsx index 6a2219d610..4dd569d282 100644 --- a/apps/web/src/components/DiffPanelShell.tsx +++ b/apps/web/src/components/DiffPanelShell.tsx @@ -13,7 +13,7 @@ function getDiffPanelHeaderRowClassName(mode: DiffPanelMode) { "flex items-center justify-between gap-2 px-4", shouldUseDragRegion ? "drag-region h-[52px] border-b border-border wco:h-[env(titlebar-area-height)] wco:pr-[calc(100vw-env(titlebar-area-width)-env(titlebar-area-x)+1em)]" - : "h-12 wco:max-h-[env(titlebar-area-height)]", + : "surface-subheader", ); } @@ -36,8 +36,8 @@ export function DiffPanelShell(props: { {shouldUseDragRegion ? (
{props.header}
) : ( -
-
{props.header}
+
+ {props.header}
)} {props.children} diff --git a/apps/web/src/components/DiffWorkerPoolProvider.tsx b/apps/web/src/components/DiffWorkerPoolProvider.tsx index 5babd4248a..8f7addc5bc 100644 --- a/apps/web/src/components/DiffWorkerPoolProvider.tsx +++ b/apps/web/src/components/DiffWorkerPoolProvider.tsx @@ -47,6 +47,7 @@ export function DiffWorkerPoolProvider({ children }: { children?: ReactNode }) { highlighterOptions={{ theme: diffThemeName, tokenizeMaxLineLength: 1_000, + useTokenTransformer: true, }} > diff --git a/apps/web/src/components/NoActiveThreadState.tsx b/apps/web/src/components/NoActiveThreadState.tsx index a2a801a3b4..c874ee58a9 100644 --- a/apps/web/src/components/NoActiveThreadState.tsx +++ b/apps/web/src/components/NoActiveThreadState.tsx @@ -10,13 +10,11 @@ export function NoActiveThreadState() {
{isElectron ? ( - + No active thread ) : ( diff --git a/apps/web/src/components/RightPanelTabs.tsx b/apps/web/src/components/RightPanelTabs.tsx index b4d5c9cbb4..bf99a7f204 100644 --- a/apps/web/src/components/RightPanelTabs.tsx +++ b/apps/web/src/components/RightPanelTabs.tsx @@ -1,21 +1,26 @@ import type { PreviewSessionSnapshot } from "@t3tools/contracts"; import { getTerminalLabel } from "@t3tools/shared/terminalLabels"; -import { ClipboardList, FileDiff, Globe2, Plus, TerminalSquare, X } from "lucide-react"; -import { type ReactNode, useState } from "react"; +import { ClipboardList, FileDiff, Files, Globe2, Plus, TerminalSquare, X } from "lucide-react"; +import { type ReactElement, type ReactNode, useEffect, useRef, useState } from "react"; import { isElectron } from "~/env"; import type { RightPanelSurface } from "~/rightPanelStore"; import { cn } from "~/lib/utils"; -import { Menu, MenuItem, MenuPopup, MenuTrigger } from "~/components/ui/menu"; import { Tooltip, TooltipPopup, TooltipTrigger } from "~/components/ui/tooltip"; +import { Menu, MenuItem, MenuPopup, MenuTrigger } from "~/components/ui/menu"; +import { ScrollArea } from "~/components/ui/scroll-area"; import { faviconUrlForOrigin } from "~/lib/favicon"; +import { useTheme } from "~/hooks/useTheme"; import { PreviewPanelShell, type PreviewPanelMode } from "./preview/PreviewPanelShell"; +import { PierreEntryIcon } from "./chat/PierreEntryIcon"; interface RightPanelTabsProps { mode: PreviewPanelMode; + maximized?: boolean; surfaces: readonly RightPanelSurface[]; activeSurfaceId: string | null; + pendingSurfaceIds: ReadonlySet; previewSessions: Readonly>; terminalLabelsById: ReadonlyMap; onActivate: (surface: RightPanelSurface) => void; @@ -23,17 +28,55 @@ interface RightPanelTabsProps { onAddBrowser: () => void; onAddTerminal: () => void; onAddDiff: () => void; + onAddFiles: () => void; browserAvailable: boolean; diffAvailable: boolean; + filesAvailable: boolean; children: ReactNode; } +const SURFACE_DISABLED_REASONS = { + browser: "Browser previews are only available in the T3 Code desktop app.", + files: "Files are only available when a project is open.", + diff: "Diff is only available for server threads in Git repositories.", +} as const; + +function DisabledReasonTooltip(props: { reason: string; trigger: ReactElement }) { + return ( + + + {props.reason} + + ); +} + +function SurfaceMenuItem(props: { + available: boolean; + disabledReason?: string; + onClick: () => void; + children: ReactNode; +}) { + const item = ( + + {props.children} + + ); + if (props.available || !props.disabledReason) return item; + return ; +} + function RightPanelEmptyState(props: { onAddBrowser: () => void; onAddTerminal: () => void; onAddDiff: () => void; + onAddFiles: () => void; browserAvailable: boolean; diffAvailable: boolean; + filesAvailable: boolean; }) { const actions = [ { @@ -41,6 +84,7 @@ function RightPanelEmptyState(props: { description: "Open a local app or URL.", icon: Globe2, available: props.browserAvailable, + disabledReason: SURFACE_DISABLED_REASONS.browser, onClick: props.onAddBrowser, }, { @@ -48,13 +92,23 @@ function RightPanelEmptyState(props: { description: "Start a shell in this workspace.", icon: TerminalSquare, available: true, + disabledReason: null, onClick: props.onAddTerminal, }, + { + label: "Files", + description: "Browse and read workspace files.", + icon: Files, + available: props.filesAvailable, + disabledReason: SURFACE_DISABLED_REASONS.files, + onClick: props.onAddFiles, + }, { label: "Diff", description: "Review changes in this thread.", icon: FileDiff, available: props.diffAvailable, + disabledReason: SURFACE_DISABLED_REASONS.diff, onClick: props.onAddDiff, }, ] as const; @@ -68,24 +122,46 @@ function RightPanelEmptyState(props: { Choose what to show in the right panel.

-
+
{actions.map((action) => { const Icon = action.icon; - return ( - + ); + } + const disabledCard = ( + ); + return ( + + ); })}
@@ -101,6 +177,10 @@ function surfaceTitle( switch (surface.kind) { case "diff": return "Diff"; + case "files": + return "Files"; + case "file": + return surface.relativePath.slice(surface.relativePath.lastIndexOf("/") + 1); case "terminal": return ( terminalLabelsById.get(surface.activeTerminalId) ?? @@ -140,9 +220,11 @@ function PreviewFavicon({ url }: { url: string | null }) { function SurfaceIcon({ surface, sessions, + theme, }: { surface: RightPanelSurface; sessions: Readonly>; + theme: "light" | "dark"; }) { switch (surface.kind) { case "preview": { @@ -152,6 +234,17 @@ function SurfaceIcon({ } case "diff": return ; + case "files": + return ; + case "file": + return ( + + ); case "terminal": return ; case "plan": @@ -161,80 +254,135 @@ function SurfaceIcon({ export function RightPanelTabs(props: RightPanelTabsProps) { const ownsDesktopTitleBar = isElectron && props.mode === "inline"; + const { resolvedTheme } = useTheme(); + const tabListRef = useRef(null); + + useEffect(() => { + const activeTab = tabListRef.current?.querySelector("[data-active-tab='true']"); + activeTab?.scrollIntoView({ block: "nearest", inline: "nearest" }); + }, [props.activeSurfaceId]); return ( - +
-
- {props.surfaces.map((surface) => { - const active = surface.id === props.activeSurfaceId; - const title = surfaceTitle(surface, props.previewSessions, props.terminalLabelsById); - return ( -
- - props.onActivate(surface)} - > - - {title} - - } - /> - {title} - - -
- ); - })} -
- - - - - - - - Browser - - - - Terminal - - - - Diff - - - + + props.onActivate(surface)} + > + + {title} + + } + /> + {title} + + +
+ ); + })} + {props.surfaces.length > 0 ? ( + + + + + + + + Browser + + + + Terminal + + + + Files + + + + Diff + + + + ) : null} +
+
{props.activeSurfaceId === null ? ( @@ -242,8 +390,10 @@ export function RightPanelTabs(props: RightPanelTabsProps) { onAddBrowser={props.onAddBrowser} onAddTerminal={props.onAddTerminal} onAddDiff={props.onAddDiff} + onAddFiles={props.onAddFiles} browserAvailable={props.browserAvailable} diffAvailable={props.diffAvailable} + filesAvailable={props.filesAvailable} /> ) : ( props.children diff --git a/apps/web/src/components/ThreadTerminalDrawer.tsx b/apps/web/src/components/ThreadTerminalDrawer.tsx index d07057c00c..4972e07bbc 100644 --- a/apps/web/src/components/ThreadTerminalDrawer.tsx +++ b/apps/web/src/components/ThreadTerminalDrawer.tsx @@ -339,7 +339,7 @@ export function TerminalViewport({ const fitAddon = new FitAddon(); const terminal = new Terminal({ cursorBlink: true, - lineHeight: 1.2, + lineHeight: 1, fontSize: 12, scrollback: 5_000, fontFamily: diff --git a/apps/web/src/components/chat/ChangedFilesTree.tsx b/apps/web/src/components/chat/ChangedFilesTree.tsx index ae5b431738..3ea0e6315f 100644 --- a/apps/web/src/components/chat/ChangedFilesTree.tsx +++ b/apps/web/src/components/chat/ChangedFilesTree.tsx @@ -9,7 +9,7 @@ import { import { ChevronRightIcon, FolderIcon, FolderClosedIcon } from "lucide-react"; import { cn } from "~/lib/utils"; import { DiffStatLabel, hasNonZeroStat } from "./DiffStatLabel"; -import { VscodeEntryIcon } from "./VscodeEntryIcon"; +import { PierreEntryIcon } from "./PierreEntryIcon"; import { Button } from "../ui/button"; const EMPTY_DIRECTORY_OVERRIDES: Record = {}; @@ -177,7 +177,7 @@ export const ChangedFilesTree = memo(function ChangedFilesTree(props: { {hasDirectoryNodes || depth > 0 ? (
@@ -104,7 +89,13 @@ export const ChatHeader = memo(function ChatHeader({ {activeThreadTitle}
-
+
{activeProjectScripts && ( )} - - - - - } - /> - - {terminalAvailable - ? `Toggle terminal drawer${terminalShortcutLabel ? ` (${terminalShortcutLabel})` : ""}` - : "Terminal drawer is unavailable"} - - - - - - - } - /> - - {rightPanelAvailable - ? `Toggle right panel${rightPanelShortcutLabel ? ` (${rightPanelShortcutLabel})` : ""}` - : "Right panel is unavailable"} - -
); diff --git a/apps/web/src/components/chat/ComposerCommandMenu.tsx b/apps/web/src/components/chat/ComposerCommandMenu.tsx index 7f2b180ed0..8354412ce1 100644 --- a/apps/web/src/components/chat/ComposerCommandMenu.tsx +++ b/apps/web/src/components/chat/ComposerCommandMenu.tsx @@ -18,7 +18,7 @@ import { CommandList, CommandSeparator, } from "../ui/command"; -import { VscodeEntryIcon } from "./VscodeEntryIcon"; +import { PierreEntryIcon } from "./PierreEntryIcon"; export type ComposerCommandItem = | { @@ -228,7 +228,7 @@ const ComposerCommandMenuItem = memo(function ComposerCommandMenuItem(props: { }} > {props.item.type === "path" ? ( - - ({ isAtEnd: true })); @@ -392,14 +390,12 @@ describe("MessagesTimeline", () => { const assistantFileLink = document.querySelector( '[data-message-role="assistant"] .chat-markdown-file-link', ); - const icon = assistantFileLink?.querySelector("img"); + const icon = assistantFileLink?.querySelector("svg[data-pierre-icon]"); expect(assistantFileLink?.textContent).toContain("package.json"); expect(assistantFileLink?.textContent).toContain("L25"); expect(assistantFileLink?.getAttribute("href")).toBe("/repo/project/path/to/package.json:25"); - expect(icon?.getAttribute("src")).toBe( - getVscodeIconUrlForEntry("/repo/project/path/to/package.json", "file", "dark"), - ); + expect(icon?.getAttribute("data-pierre-icon")).toBe("t3-file-icon-package-json"); } finally { await screen.unmount(); } diff --git a/apps/web/src/components/chat/PanelLayoutControls.tsx b/apps/web/src/components/chat/PanelLayoutControls.tsx new file mode 100644 index 0000000000..3b7fbf4ad9 --- /dev/null +++ b/apps/web/src/components/chat/PanelLayoutControls.tsx @@ -0,0 +1,117 @@ +import { Maximize2Icon, Minimize2Icon, PanelBottomIcon, PanelRightIcon } from "lucide-react"; +import { memo } from "react"; + +import { cn } from "~/lib/utils"; + +import { Toggle } from "../ui/toggle"; +import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; + +interface PanelLayoutControlsProps { + terminalAvailable: boolean; + terminalOpen: boolean; + terminalShortcutLabel: string | null; + rightPanelAvailable: boolean; + rightPanelOpen: boolean; + rightPanelShortcutLabel: string | null; + rightPanelMaximized: boolean; + canMaximizeRightPanel: boolean; + onToggleTerminal: () => void; + onToggleRightPanel: () => void; + onToggleRightPanelMaximized: () => void; +} + +export const PanelLayoutControls = memo(function PanelLayoutControls({ + terminalAvailable, + terminalOpen, + terminalShortcutLabel, + rightPanelAvailable, + rightPanelOpen, + rightPanelShortcutLabel, + rightPanelMaximized, + canMaximizeRightPanel, + onToggleTerminal, + onToggleRightPanel, + onToggleRightPanelMaximized, +}: PanelLayoutControlsProps) { + return ( +
+ {rightPanelOpen ? ( + + + {rightPanelMaximized ? ( + + ) : ( + + )} + + } + /> + + {canMaximizeRightPanel + ? rightPanelMaximized + ? "Restore panel size" + : "Maximize panel" + : "Panel maximization is unavailable at this width"} + + + ) : null} + + + + + } + /> + + {terminalAvailable + ? `Toggle terminal drawer${terminalShortcutLabel ? ` (${terminalShortcutLabel})` : ""}` + : "Terminal drawer is unavailable"} + + + + + + + } + /> + + {rightPanelAvailable + ? `Toggle right panel${rightPanelShortcutLabel ? ` (${rightPanelShortcutLabel})` : ""}` + : "Right panel is unavailable"} + + +
+ ); +}); diff --git a/apps/web/src/components/chat/PierreEntryIcon.tsx b/apps/web/src/components/chat/PierreEntryIcon.tsx new file mode 100644 index 0000000000..17dfa8362a --- /dev/null +++ b/apps/web/src/components/chat/PierreEntryIcon.tsx @@ -0,0 +1,95 @@ +import { FileIcon, FolderIcon } from "lucide-react"; +import { memo, useInsertionEffect, useMemo } from "react"; + +import { ensurePierreIconSprite, resolvePierreIconForEntry } from "../../pierre-icons"; +import { cn } from "~/lib/utils"; + +const ICON_COLORS: Record = { + astro: ["#a631be", "#d568ea"], + babel: ["#d5a910", "#ffd452"], + bash: ["#199f43", "#5ecc71"], + biome: ["#1a85d4", "#69b1ff"], + bootstrap: ["#693acf", "#9d6afb"], + browserslist: ["#d5a910", "#ffd452"], + bun: ["#594c5b", "#79697b"], + c: ["#1a85d4", "#69b1ff"], + claude: ["#d47628", "#ffa359"], + cpp: ["#1a85d4", "#69b1ff"], + css: ["#693acf", "#9d6afb"], + database: ["#a631be", "#d568ea"], + default: ["#84848a", "#adadb1"], + docker: ["#1a85d4", "#69b1ff"], + eslint: ["#693acf", "#9d6afb"], + git: ["#ff8c5b", "#d5512f"], + go: ["#1ca1c7", "#68cdf2"], + graphql: ["#d32a61", "#ff678d"], + html: ["#d47628", "#ffa359"], + image: ["#d32a61", "#ff678d"], + javascript: ["#d5a910", "#ffd452"], + json: ["#d47628", "#ffa359"], + markdown: ["#199f43", "#5ecc71"], + mcp: ["#17a5af", "#64d1db"], + nextjs: ["#84848a", "#adadb1"], + npm: ["#d52c36", "#ff6762"], + oxc: ["#1ca1c7", "#68cdf2"], + postcss: ["#d52c36", "#ff6762"], + prettier: ["#17a5af", "#64d1db"], + python: ["#1a85d4", "#69b1ff"], + react: ["#1ca1c7", "#68cdf2"], + ruby: ["#d52c36", "#ff6762"], + rust: ["#d47628", "#ffa359"], + sass: ["#d32a61", "#ff678d"], + stylelint: ["#84848a", "#adadb1"], + svelte: ["#d52c36", "#ff6762"], + svg: ["#d47628", "#ffa359"], + svgo: ["#199f43", "#5ecc71"], + swift: ["#d47628", "#ffa359"], + table: ["#17a5af", "#64d1db"], + tailwind: ["#1ca1c7", "#68cdf2"], + terraform: ["#693acf", "#9d6afb"], + text: ["#84848a", "#adadb1"], + typescript: ["#1a85d4", "#69b1ff"], + vite: ["#a631be", "#d568ea"], + vscode: ["#1a85d4", "#69b1ff"], + vue: ["#199f43", "#5ecc71"], + wasm: ["#693acf", "#9d6afb"], + webpack: ["#1a85d4", "#69b1ff"], + yml: ["#d52c36", "#ff6762"], + zig: ["#d47628", "#ffa359"], + zip: ["#d47628", "#ffa359"], +}; + +export const PierreEntryIcon = memo(function PierreEntryIcon(props: { + pathValue: string; + kind: "file" | "directory"; + theme: "light" | "dark"; + className?: string; +}) { + useInsertionEffect(ensurePierreIconSprite, []); + const icon = useMemo( + () => resolvePierreIconForEntry(props.pathValue, props.kind), + [props.kind, props.pathValue], + ); + + if (!icon) { + return props.kind === "directory" ? ( + + ) : ( + + ); + } + + const colors = ICON_COLORS[icon.token ?? "default"] ?? ICON_COLORS.default; + return ( + + ); +}); diff --git a/apps/web/src/components/chat/VscodeEntryIcon.tsx b/apps/web/src/components/chat/VscodeEntryIcon.tsx deleted file mode 100644 index bf110e2bb8..0000000000 --- a/apps/web/src/components/chat/VscodeEntryIcon.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { memo, useMemo, useState } from "react"; -import { getVscodeIconUrlForEntry } from "../../vscode-icons"; -import { FileIcon, FolderIcon } from "lucide-react"; -import { cn } from "~/lib/utils"; - -export const VscodeEntryIcon = memo(function VscodeEntryIcon(props: { - pathValue: string; - kind: "file" | "directory"; - theme: "light" | "dark"; - className?: string; -}) { - const [failedIconUrl, setFailedIconUrl] = useState(null); - const iconUrl = useMemo( - () => getVscodeIconUrlForEntry(props.pathValue, props.kind, props.theme), - [props.kind, props.pathValue, props.theme], - ); - const failed = failedIconUrl === iconUrl; - - if (failed) { - return props.kind === "directory" ? ( - - ) : ( - - ); - } - - return ( - setFailedIconUrl(iconUrl)} - /> - ); -}); diff --git a/apps/web/src/components/files/FileBrowserPanel.tsx b/apps/web/src/components/files/FileBrowserPanel.tsx new file mode 100644 index 0000000000..694341ee19 --- /dev/null +++ b/apps/web/src/components/files/FileBrowserPanel.tsx @@ -0,0 +1,128 @@ +import type { EnvironmentId, ProjectEntry } from "@t3tools/contracts"; +import { FileTree, useFileTree } from "@pierre/trees/react"; +import { RefreshCw, Search } from "lucide-react"; +import { useEffect, useMemo, useRef } from "react"; + +import { useTheme } from "~/hooks/useTheme"; +import { cn } from "~/lib/utils"; +import { T3_PIERRE_ICONS } from "~/pierre-icons"; + +import { useProjectEntriesQuery } from "./projectFilesQueryState"; + +interface FileBrowserPanelProps { + environmentId: EnvironmentId; + cwd: string; + projectName: string; + onOpenFile: (relativePath: string) => void; +} + +const TREE_UNSAFE_CSS = ` + :host { + --trees-bg-override: transparent; + --trees-selected-bg-override: color-mix(in srgb, currentColor 12%, transparent); + --trees-hover-bg-override: color-mix(in srgb, currentColor 7%, transparent); + --trees-border-color-override: color-mix(in srgb, currentColor 14%, transparent); + --trees-font-family-override: var(--font-sans); + --trees-font-size-override: 12px; + } + button[data-type='item'] { border-radius: 5px; } +`; + +function treePath(entry: ProjectEntry): string { + return entry.kind === "directory" ? `${entry.path}/` : entry.path; +} + +export default function FileBrowserPanel({ + environmentId, + cwd, + projectName, + onOpenFile, +}: FileBrowserPanelProps) { + const { resolvedTheme } = useTheme(); + const entriesQuery = useProjectEntriesQuery(environmentId, cwd); + const entries = entriesQuery.data?.entries ?? []; + const entryKinds = useMemo( + () => new Map(entries.map((entry) => [entry.path, entry.kind] as const)), + [entries], + ); + const entryKindsRef = useRef>(entryKinds); + const treePaths = useMemo(() => entries.map(treePath), [entries]); + const previousTreePathsRef = useRef([]); + + const { model } = useFileTree({ + density: "compact", + fileTreeSearchMode: "hide-non-matches", + flattenEmptyDirectories: true, + initialExpansion: 1, + icons: T3_PIERRE_ICONS, + onSelectionChange: (selectedPaths) => { + const selectedPath = selectedPaths.at(-1)?.replace(/\/$/, ""); + if (selectedPath && entryKindsRef.current.get(selectedPath) === "file") { + onOpenFile(selectedPath); + } + }, + paths: [], + search: true, + unsafeCSS: TREE_UNSAFE_CSS, + }); + + useEffect(() => { + if (previousTreePathsRef.current === treePaths) return; + entryKindsRef.current = entryKinds; + previousTreePathsRef.current = treePaths; + model.resetPaths(treePaths); + }, [entryKinds, model, treePaths]); + + const fileCount = useMemo( + () => entries.reduce((count, entry) => count + (entry.kind === "file" ? 1 : 0), 0), + [entries], + ); + + return ( +
+
+
+
{projectName}
+
+ {entriesQuery.isPending && entriesQuery.data === null + ? "Indexing…" + : `${fileCount.toLocaleString()} files`} + {entriesQuery.data?.truncated ? " · partial" : ""} +
+
+ + +
+ {entriesQuery.error && entriesQuery.data === null ? ( +
{entriesQuery.error}
+ ) : ( + + )} +
+ ); +} diff --git a/apps/web/src/components/files/FilePreviewPanel.tsx b/apps/web/src/components/files/FilePreviewPanel.tsx new file mode 100644 index 0000000000..ec76ee84d4 --- /dev/null +++ b/apps/web/src/components/files/FilePreviewPanel.tsx @@ -0,0 +1,298 @@ +import type { EnvironmentId } from "@t3tools/contracts"; +import { Editor } from "@pierre/diffs/editor"; +import { EditorProvider, File, Virtualizer } from "@pierre/diffs/react"; +import { ChevronRight, FolderTree, LoaderCircle } from "lucide-react"; +import { useEffect, useMemo, useRef, useState } from "react"; + +import { ensureEnvironmentApi } from "~/environmentApi"; +import { useTheme } from "~/hooks/useTheme"; +import { resolveDiffThemeName } from "~/lib/diffRendering"; +import { cn } from "~/lib/utils"; +import { ScrollArea } from "~/components/ui/scroll-area"; +import { Toggle } from "~/components/ui/toggle"; +import { Tooltip, TooltipPopup, TooltipTrigger } from "~/components/ui/tooltip"; + +import FileBrowserPanel from "./FileBrowserPanel"; +import { projectFileCacheKey } from "./fileContentRevision"; +import { fileBreadcrumbs } from "./filePath"; +import { FileSaveCoordinator } from "./fileSaveCoordinator"; +import { + confirmProjectFileQueryData, + setProjectFileQueryData, + useProjectFileQuery, +} from "./projectFilesQueryState"; + +interface FilePreviewPanelProps { + environmentId: EnvironmentId; + cwd: string; + projectName: string; + relativePath: string | null; + onOpenFile: (relativePath: string) => void; + onPendingChange: (relativePath: string, pending: boolean) => void; +} + +const FILE_EXPLORER_STORAGE_KEY = "t3code.fileExplorerOpen"; +const FILE_SAVE_DEBOUNCE_MS = 500; + +interface EditableFileSurfaceProps { + environmentId: EnvironmentId; + cwd: string; + relativePath: string; + contents: string; + resolvedTheme: "light" | "dark"; + onPendingChange: (relativePath: string, pending: boolean) => void; +} + +function EditableFileSurface({ + environmentId, + cwd, + relativePath, + contents, + resolvedTheme, + onPendingChange, +}: EditableFileSurfaceProps) { + const saveCoordinator = useMemo( + () => + new FileSaveCoordinator({ + debounceMs: FILE_SAVE_DEBOUNCE_MS, + onPendingChange: (pending) => onPendingChange(relativePath, pending), + persist: async (nextContents) => { + await ensureEnvironmentApi(environmentId).projects.writeFile({ + cwd, + relativePath, + contents: nextContents, + }); + }, + onConfirmed: (confirmedContents) => { + confirmProjectFileQueryData(environmentId, cwd, relativePath, confirmedContents); + }, + }), + [cwd, environmentId, onPendingChange, relativePath], + ); + const editor = useMemo( + () => + new Editor({ + onChange: (file) => { + setProjectFileQueryData(environmentId, cwd, relativePath, file.contents); + saveCoordinator.change(file.contents); + }, + }), + [cwd, environmentId, relativePath, saveCoordinator], + ); + + useEffect( + () => () => { + editor.cleanUp(); + saveCoordinator.dispose(); + }, + [editor, saveCoordinator], + ); + + return ( + + + + + + ); +} + +function initialExplorerOpen(): boolean { + try { + return window.localStorage.getItem(FILE_EXPLORER_STORAGE_KEY) !== "false"; + } catch { + return true; + } +} + +export default function FilePreviewPanel({ + environmentId, + cwd, + projectName, + relativePath, + onOpenFile, + onPendingChange, +}: FilePreviewPanelProps) { + const { resolvedTheme } = useTheme(); + const file = useProjectFileQuery(environmentId, cwd, relativePath); + const [explorerOpen, setExplorerOpen] = useState(initialExplorerOpen); + const breadcrumbRef = useRef(null); + const breadcrumbs = useMemo( + () => (relativePath ? fileBreadcrumbs(projectName, relativePath) : []), + [projectName, relativePath], + ); + + useEffect(() => { + const currentCrumb = breadcrumbRef.current?.querySelector( + "[data-current-file-crumb='true']", + ); + currentCrumb?.scrollIntoView({ block: "nearest", inline: "end" }); + }, [relativePath]); + + const toggleExplorer = () => { + setExplorerOpen((current) => { + const next = !current; + try { + window.localStorage.setItem(FILE_EXPLORER_STORAGE_KEY, String(next)); + } catch {} + return next; + }); + }; + + return ( +
+ {relativePath ? ( +
+ +
+ {breadcrumbs.map((crumb, index) => ( +
+ {index > 0 ? ( + + ) : null} + + {crumb.label} + +
+ ))} +
+
+ + + + + } + /> + + {explorerOpen ? "Hide file explorer" : "Show file explorer"} + + +
+ ) : null} + {relativePath && file.data?.truncated ? ( +
+ Preview limited to the first 1 MB of a {file.data.byteLength.toLocaleString()} byte file. +
+ ) : null} +
+
+ {relativePath && file.error && file.data === null ? ( +
+ {file.error} +
+ ) : relativePath && file.data === null ? ( +
+ +
+ ) : relativePath && file.data ? ( + file.data.truncated ? ( + + + + ) : ( + + ) + ) : null} +
+ {explorerOpen || relativePath === null ? ( + + ) : null} +
+
+ ); +} diff --git a/apps/web/src/components/files/fileContentRevision.test.ts b/apps/web/src/components/files/fileContentRevision.test.ts new file mode 100644 index 0000000000..db3ba4f5e2 --- /dev/null +++ b/apps/web/src/components/files/fileContentRevision.test.ts @@ -0,0 +1,15 @@ +import { describe, expect, it } from "vite-plus/test"; + +import { fileContentRevision, projectFileCacheKey } from "./fileContentRevision"; + +describe("fileContentRevision", () => { + it("changes for same-length edits", () => { + expect(fileContentRevision("nodeVersion")).not.toBe(fileContentRevision("nodeVeasdrs")); + }); + + it("keeps identical contents stable", () => { + expect(projectFileCacheKey("/repo", "file.json", "contents")).toBe( + projectFileCacheKey("/repo", "file.json", "contents"), + ); + }); +}); diff --git a/apps/web/src/components/files/fileContentRevision.ts b/apps/web/src/components/files/fileContentRevision.ts new file mode 100644 index 0000000000..3fa8d07bcc --- /dev/null +++ b/apps/web/src/components/files/fileContentRevision.ts @@ -0,0 +1,12 @@ +export function fileContentRevision(contents: string): string { + let hash = 2_166_136_261; + for (let index = 0; index < contents.length; index += 1) { + hash ^= contents.charCodeAt(index); + hash = Math.imul(hash, 16_777_619); + } + return `${contents.length}:${(hash >>> 0).toString(36)}`; +} + +export function projectFileCacheKey(cwd: string, relativePath: string, contents: string): string { + return `${cwd}:${relativePath}:${fileContentRevision(contents)}`; +} diff --git a/apps/web/src/components/files/filePath.test.ts b/apps/web/src/components/files/filePath.test.ts new file mode 100644 index 0000000000..702181d2d2 --- /dev/null +++ b/apps/web/src/components/files/filePath.test.ts @@ -0,0 +1,23 @@ +import { describe, expect, it } from "vite-plus/test"; + +import { fileBreadcrumbs } from "./filePath"; + +describe("fileBreadcrumbs", () => { + it("builds project, directory, and file crumbs", () => { + expect(fileBreadcrumbs("t3code", "apps/web/src/main.tsx")).toEqual([ + { label: "t3code", path: "", kind: "project" }, + { label: "apps", path: "apps", kind: "directory" }, + { label: "web", path: "apps/web", kind: "directory" }, + { label: "src", path: "apps/web/src", kind: "directory" }, + { label: "main.tsx", path: "apps/web/src/main.tsx", kind: "file" }, + ]); + }); + + it("normalizes repeated separators", () => { + expect(fileBreadcrumbs("workspace", "/src//index.ts").map((crumb) => crumb.label)).toEqual([ + "workspace", + "src", + "index.ts", + ]); + }); +}); diff --git a/apps/web/src/components/files/filePath.ts b/apps/web/src/components/files/filePath.ts new file mode 100644 index 0000000000..66ede58119 --- /dev/null +++ b/apps/web/src/components/files/filePath.ts @@ -0,0 +1,17 @@ +export interface FileBreadcrumb { + label: string; + path: string; + kind: "project" | "directory" | "file"; +} + +export function fileBreadcrumbs(projectName: string, relativePath: string): FileBreadcrumb[] { + const parts = relativePath.split("/").filter(Boolean); + return [ + { label: projectName, path: "", kind: "project" }, + ...parts.map((part, index) => ({ + label: part, + path: parts.slice(0, index + 1).join("/"), + kind: index === parts.length - 1 ? ("file" as const) : ("directory" as const), + })), + ]; +} diff --git a/apps/web/src/components/files/fileSaveCoordinator.test.ts b/apps/web/src/components/files/fileSaveCoordinator.test.ts new file mode 100644 index 0000000000..61c3499df3 --- /dev/null +++ b/apps/web/src/components/files/fileSaveCoordinator.test.ts @@ -0,0 +1,87 @@ +import { afterEach, describe, expect, it, vi } from "vite-plus/test"; + +import { FileSaveCoordinator } from "./fileSaveCoordinator"; + +function deferred() { + let resolve!: () => void; + const promise = new Promise((resolvePromise) => { + resolve = resolvePromise; + }); + return { promise, resolve }; +} + +describe("FileSaveCoordinator", () => { + afterEach(() => { + vi.useRealTimers(); + }); + + it("debounces edits and persists only the latest contents", async () => { + vi.useFakeTimers(); + const persist = vi.fn<(contents: string) => Promise>().mockResolvedValue(undefined); + const onPendingChange = vi.fn(); + const onConfirmed = vi.fn(); + const coordinator = new FileSaveCoordinator({ + debounceMs: 500, + persist, + onPendingChange, + onConfirmed, + }); + + coordinator.change("first"); + await vi.advanceTimersByTimeAsync(300); + coordinator.change("latest"); + await vi.advanceTimersByTimeAsync(499); + expect(persist).not.toHaveBeenCalled(); + + await vi.advanceTimersByTimeAsync(1); + expect(persist).toHaveBeenCalledOnce(); + expect(persist).toHaveBeenCalledWith("latest"); + expect(onConfirmed).toHaveBeenCalledWith("latest"); + expect(onPendingChange.mock.calls).toEqual([[true], [true], [false]]); + }); + + it("keeps pending state until an edit made during a write is also saved", async () => { + vi.useFakeTimers(); + const firstWrite = deferred(); + const persist = vi + .fn<(contents: string) => Promise>() + .mockReturnValueOnce(firstWrite.promise) + .mockResolvedValueOnce(undefined); + const onPendingChange = vi.fn(); + const coordinator = new FileSaveCoordinator({ + debounceMs: 500, + persist, + onPendingChange, + onConfirmed: vi.fn(), + }); + + coordinator.change("first"); + await vi.advanceTimersByTimeAsync(500); + coordinator.change("latest"); + await vi.advanceTimersByTimeAsync(500); + expect(persist).toHaveBeenCalledTimes(1); + + firstWrite.resolve(); + await vi.runAllTimersAsync(); + expect(persist).toHaveBeenCalledTimes(2); + expect(persist).toHaveBeenLastCalledWith("latest"); + expect(onPendingChange.mock.calls.at(-1)).toEqual([false]); + }); + + it("leaves the file pending when the latest write fails", async () => { + vi.useFakeTimers(); + const onPendingChange = vi.fn(); + const coordinator = new FileSaveCoordinator({ + debounceMs: 500, + persist: vi.fn().mockRejectedValue(new Error("write failed")), + onPendingChange, + onConfirmed: vi.fn(), + }); + + coordinator.change("latest"); + await vi.advanceTimersByTimeAsync(500); + await Promise.resolve(); + expect(onPendingChange).toHaveBeenCalledWith(true); + expect(onPendingChange).not.toHaveBeenCalledWith(false); + }); +}); diff --git a/apps/web/src/components/files/fileSaveCoordinator.ts b/apps/web/src/components/files/fileSaveCoordinator.ts new file mode 100644 index 0000000000..e4c5011604 --- /dev/null +++ b/apps/web/src/components/files/fileSaveCoordinator.ts @@ -0,0 +1,75 @@ +export interface FileSaveCoordinatorOptions { + readonly debounceMs: number; + readonly persist: (contents: string) => Promise; + readonly onPendingChange: (pending: boolean) => void; + readonly onConfirmed: (contents: string) => void; +} + +export class FileSaveCoordinator { + private timer: ReturnType | null = null; + private latestContents = ""; + private latestRevision = 0; + private lastChangeAt = 0; + private saving = false; + private disposed = false; + + constructor(private readonly options: FileSaveCoordinatorOptions) {} + + change(contents: string): void { + this.latestContents = contents; + this.latestRevision += 1; + this.lastChangeAt = Date.now(); + this.options.onPendingChange(true); + this.schedule(this.options.debounceMs); + } + + dispose(): void { + this.disposed = true; + this.clearTimer(); + if (this.latestRevision > 0) void this.persistLatest(); + } + + private schedule(delay: number): void { + this.clearTimer(); + this.timer = setTimeout(() => { + this.timer = null; + void this.persistLatest(); + }, delay); + } + + private clearTimer(): void { + if (this.timer === null) return; + clearTimeout(this.timer); + this.timer = null; + } + + private async persistLatest(): Promise { + if (this.saving || this.latestRevision === 0) return; + + this.saving = true; + const contents = this.latestContents; + const revision = this.latestRevision; + let succeeded = false; + try { + await this.options.persist(contents); + succeeded = true; + this.options.onConfirmed(contents); + } catch {} + + this.saving = false; + if (revision === this.latestRevision) { + if (succeeded) this.options.onPendingChange(false); + return; + } + + const remainingDebounce = Math.max( + 0, + this.options.debounceMs - (Date.now() - this.lastChangeAt), + ); + if (this.disposed) { + void this.persistLatest(); + } else { + this.schedule(remainingDebounce); + } + } +} diff --git a/apps/web/src/components/files/projectFilesQueryState.test.ts b/apps/web/src/components/files/projectFilesQueryState.test.ts new file mode 100644 index 0000000000..756cdb90b1 --- /dev/null +++ b/apps/web/src/components/files/projectFilesQueryState.test.ts @@ -0,0 +1,129 @@ +import type { + EnvironmentApi, + ProjectListEntriesResult, + ProjectReadFileResult, +} from "@t3tools/contracts"; +import { EnvironmentId } from "@t3tools/contracts"; +import * as Option from "effect/Option"; +import { AsyncResult, AtomRegistry } from "effect/unstable/reactivity"; +import { afterEach, describe, expect, it, vi } from "vite-plus/test"; + +import { + __resetEnvironmentApiOverridesForTests, + __setEnvironmentApiOverrideForTests, +} from "~/environmentApi"; +import { appAtomRegistry } from "~/rpc/atomRegistry"; + +import { + __resetProjectFileQueryDataForTests, + confirmProjectFileQueryData, + getProjectEntriesQueryAtom, + getProjectFileQueryAtom, + resolveProjectFileQueryData, + setProjectFileQueryData, +} from "./projectFilesQueryState"; + +const environmentId = EnvironmentId.make("environment-project-files-query-test"); + +function deferred
() { + let resolve!: (value: A) => void; + const promise = new Promise((resolvePromise) => { + resolve = resolvePromise; + }); + return { promise, resolve }; +} + +describe("project files queries", () => { + afterEach(() => { + __resetProjectFileQueryDataForTests(); + __resetEnvironmentApiOverridesForTests(); + vi.unstubAllGlobals(); + }); + + it("retains cached entries while explicitly revalidating", async () => { + vi.stubGlobal("window", {}); + const first = { + entries: [{ path: "README.md", kind: "file" }], + truncated: false, + } satisfies ProjectListEntriesResult; + const second = { + entries: [ + { path: "README.md", kind: "file" }, + { path: "src", kind: "directory" }, + ], + truncated: false, + } satisfies ProjectListEntriesResult; + const revalidation = deferred(); + const listEntries = vi + .fn() + .mockResolvedValueOnce(first) + .mockReturnValueOnce(revalidation.promise); + __setEnvironmentApiOverrideForTests(environmentId, { + projects: { listEntries }, + } as unknown as EnvironmentApi); + const registry = AtomRegistry.make(); + const atom = getProjectEntriesQueryAtom(environmentId, "/repo"); + + registry.get(atom); + await vi.waitFor(() => { + expect(Option.getOrNull(AsyncResult.value(registry.get(atom)))).toEqual(first); + }); + + registry.refresh(atom); + await vi.waitFor(() => expect(listEntries).toHaveBeenCalledTimes(2)); + const refreshing = registry.get(atom); + expect(refreshing.waiting).toBe(true); + expect(Option.getOrNull(AsyncResult.value(refreshing))).toEqual(first); + + revalidation.resolve(second); + await vi.waitFor(() => { + expect(Option.getOrNull(AsyncResult.value(registry.get(atom)))).toEqual(second); + }); + registry.dispose(); + }); + + it("keeps the latest optimistic draft when an older write finishes", async () => { + vi.stubGlobal("window", {}); + const initial = { + relativePath: "convex.json", + contents: '{"nodeVersion":"20"}', + byteLength: 20, + truncated: false, + } satisfies ProjectReadFileResult; + const readFile = vi.fn().mockResolvedValue(initial); + __setEnvironmentApiOverrideForTests(environmentId, { + projects: { readFile }, + } as unknown as EnvironmentApi); + const atom = getProjectFileQueryAtom(environmentId, "/repo", "convex.json"); + + appAtomRegistry.get(atom); + await vi.waitFor(() => { + expect(Option.getOrNull(AsyncResult.value(appAtomRegistry.get(atom)))).toEqual(initial); + }); + + setProjectFileQueryData(environmentId, "/repo", "convex.json", '{"nodeVersion":"220"}'); + setProjectFileQueryData(environmentId, "/repo", "convex.json", '{"nodeVersion":"22"}'); + + expect( + confirmProjectFileQueryData(environmentId, "/repo", "convex.json", '{"nodeVersion":"220"}'), + ).toBe(false); + + expect( + resolveProjectFileQueryData( + environmentId, + "/repo", + "convex.json", + Option.getOrNull(AsyncResult.value(appAtomRegistry.get(atom))), + ), + ).toEqual({ + relativePath: "convex.json", + contents: '{"nodeVersion":"22"}', + byteLength: 20, + truncated: false, + }); + + expect( + confirmProjectFileQueryData(environmentId, "/repo", "convex.json", '{"nodeVersion":"22"}'), + ).toBe(true); + }); +}); diff --git a/apps/web/src/components/files/projectFilesQueryState.ts b/apps/web/src/components/files/projectFilesQueryState.ts new file mode 100644 index 0000000000..17c6d9ef8d --- /dev/null +++ b/apps/web/src/components/files/projectFilesQueryState.ts @@ -0,0 +1,206 @@ +import { useAtomValue } from "@effect/atom-react"; +import type { + EnvironmentId, + ProjectListEntriesResult, + ProjectReadFileResult, +} from "@t3tools/contracts"; +import * as Cause from "effect/Cause"; +import * as Data from "effect/Data"; +import * as Effect from "effect/Effect"; +import * as Option from "effect/Option"; +import { AsyncResult, Atom } from "effect/unstable/reactivity"; +import { useCallback, useEffect } from "react"; + +import { ensureEnvironmentApi } from "~/environmentApi"; +import { appAtomRegistry } from "~/rpc/atomRegistry"; + +const PROJECT_QUERY_STALE_TIME_MS = 30_000; +const PROJECT_QUERY_IDLE_TTL_MS = 5 * 60_000; +const EMPTY_PROJECT_FILE_PATH = ""; +interface OptimisticProjectFile { + readonly data: ProjectReadFileResult; + readonly confirmed: boolean; +} + +const optimisticProjectFiles = new Map(); + +class ProjectQueryError extends Data.TaggedError("ProjectQueryError")<{ + readonly message: string; + readonly cause?: unknown; +}> {} + +function queryError(message: string, cause: unknown): ProjectQueryError { + return new ProjectQueryError({ message, cause }); +} + +function entriesKey(environmentId: EnvironmentId, cwd: string): string { + return [environmentId, cwd].map(encodeURIComponent).join("|"); +} + +function fileKey(environmentId: EnvironmentId, cwd: string, relativePath: string): string { + return [environmentId, cwd, relativePath].map(encodeURIComponent).join("|"); +} + +function keyParts(key: string): string[] { + return key.split("|").map(decodeURIComponent); +} + +const projectEntriesQueryAtom = Atom.family((key: string) => + Atom.make( + Effect.tryPromise({ + try: () => { + const [environmentId, cwd] = keyParts(key) as [EnvironmentId, string]; + return ensureEnvironmentApi(environmentId).projects.listEntries({ cwd }); + }, + catch: (cause) => queryError("Could not load workspace files.", cause), + }), + ).pipe( + Atom.swr({ + staleTime: PROJECT_QUERY_STALE_TIME_MS, + revalidateOnMount: true, + }), + Atom.setIdleTTL(PROJECT_QUERY_IDLE_TTL_MS), + Atom.withLabel(`projects:entries:${key}`), + ), +); + +const projectFileQueryAtom = Atom.family((key: string) => + Atom.make( + Effect.tryPromise({ + try: () => { + const [environmentId, cwd, relativePath] = keyParts(key) as [EnvironmentId, string, string]; + if (relativePath === EMPTY_PROJECT_FILE_PATH) return Promise.resolve(null); + return ensureEnvironmentApi(environmentId).projects.readFile({ cwd, relativePath }); + }, + catch: (cause) => queryError("Could not read workspace file.", cause), + }), + ).pipe( + Atom.swr({ + staleTime: PROJECT_QUERY_STALE_TIME_MS, + revalidateOnMount: true, + }), + Atom.setIdleTTL(PROJECT_QUERY_IDLE_TTL_MS), + Atom.withLabel(`projects:file:${key}`), + ), +); + +interface ProjectQueryState { + readonly data: A | null; + readonly error: string | null; + readonly isPending: boolean; + readonly refresh: () => void; +} + +export function getProjectEntriesQueryAtom(environmentId: EnvironmentId, cwd: string) { + return projectEntriesQueryAtom(entriesKey(environmentId, cwd)); +} + +export function getProjectFileQueryAtom( + environmentId: EnvironmentId, + cwd: string, + relativePath: string | null, +) { + return projectFileQueryAtom(fileKey(environmentId, cwd, relativePath ?? EMPTY_PROJECT_FILE_PATH)); +} + +export function setProjectFileQueryData( + environmentId: EnvironmentId, + cwd: string, + relativePath: string, + contents: string, +): void { + const key = fileKey(environmentId, cwd, relativePath); + optimisticProjectFiles.set(key, { + confirmed: false, + data: { + relativePath, + contents, + byteLength: new TextEncoder().encode(contents).byteLength, + truncated: false, + }, + }); +} + +export function confirmProjectFileQueryData( + environmentId: EnvironmentId, + cwd: string, + relativePath: string, + contents: string, +): boolean { + const key = fileKey(environmentId, cwd, relativePath); + const optimisticFile = optimisticProjectFiles.get(key); + if (optimisticFile?.data.contents !== contents) return false; + + optimisticProjectFiles.set(key, { ...optimisticFile, confirmed: true }); + appAtomRegistry.refresh(getProjectFileQueryAtom(environmentId, cwd, relativePath)); + return true; +} + +export function resolveProjectFileQueryData( + environmentId: EnvironmentId, + cwd: string, + relativePath: string | null, + data: ProjectReadFileResult | null, +): ProjectReadFileResult | null { + if (relativePath === null) return data; + return optimisticProjectFiles.get(fileKey(environmentId, cwd, relativePath))?.data ?? data; +} + +export function __resetProjectFileQueryDataForTests(): void { + optimisticProjectFiles.clear(); +} + +function errorMessage(result: AsyncResult.AsyncResult): string | null { + if (result._tag !== "Failure") return null; + const cause = Cause.squash(result.cause); + return cause instanceof Error ? cause.message : "Workspace query failed."; +} + +export function useProjectEntriesQuery( + environmentId: EnvironmentId, + cwd: string, +): ProjectQueryState { + const atom = getProjectEntriesQueryAtom(environmentId, cwd); + const result = useAtomValue(atom); + const refresh = useCallback(() => appAtomRegistry.refresh(atom), [atom]); + return { + data: Option.getOrNull(AsyncResult.value(result)), + error: errorMessage(result), + isPending: result.waiting, + refresh, + }; +} + +export function useProjectFileQuery( + environmentId: EnvironmentId, + cwd: string, + relativePath: string | null, +): ProjectQueryState { + const atom = getProjectFileQueryAtom(environmentId, cwd, relativePath); + const result = useAtomValue(atom); + const refresh = useCallback(() => appAtomRegistry.refresh(atom), [atom]); + const data = Option.getOrNull(AsyncResult.value(result)); + const optimisticFile = + relativePath === null + ? undefined + : optimisticProjectFiles.get(fileKey(environmentId, cwd, relativePath)); + + useEffect(() => { + if ( + relativePath === null || + optimisticFile === undefined || + !optimisticFile.confirmed || + data?.contents !== optimisticFile.data.contents + ) { + return; + } + optimisticProjectFiles.delete(fileKey(environmentId, cwd, relativePath)); + }, [cwd, data?.contents, environmentId, optimisticFile, relativePath]); + + return { + data: optimisticFile?.data ?? data, + error: errorMessage(result), + isPending: result.waiting, + refresh, + }; +} diff --git a/apps/web/src/components/preview/PreviewChromeRow.browser.tsx b/apps/web/src/components/preview/PreviewChromeRow.browser.tsx index d92839b55f..8cb48c7e11 100644 --- a/apps/web/src/components/preview/PreviewChromeRow.browser.tsx +++ b/apps/web/src/components/preview/PreviewChromeRow.browser.tsx @@ -20,6 +20,16 @@ const defaultProps = { }; describe("PreviewChromeRow", () => { + it("uses the shared compact surface subheader treatment", async () => { + const screen = await render(); + const subheader = screen.container.querySelector("[data-surface-subheader]"); + + expect(subheader).not.toBeNull(); + expect(subheader?.getBoundingClientRect().height).toBe(40); + expect(window.getComputedStyle(subheader!).borderTopWidth).toBe("0px"); + expect(window.getComputedStyle(subheader!).borderBottomWidth).toBe("1px"); + }); + it("only focuses the URL input after an explicit focus request", async () => { const previouslyFocused = document.createElement("button"); document.body.append(previouslyFocused); diff --git a/apps/web/src/components/preview/PreviewChromeRow.tsx b/apps/web/src/components/preview/PreviewChromeRow.tsx index 057db6d801..469be486ee 100644 --- a/apps/web/src/components/preview/PreviewChromeRow.tsx +++ b/apps/web/src/components/preview/PreviewChromeRow.tsx @@ -110,10 +110,7 @@ export function PreviewChromeRow({ return (
-
+
- {isInline ? : null} + {isInline && !props.maximized ? : null} {useDragRegion ?
: null} {props.children}
diff --git a/apps/web/src/composer-editor-mentions.ts b/apps/web/src/composer-editor-mentions.ts index 1684664665..8b9a53808f 100644 --- a/apps/web/src/composer-editor-mentions.ts +++ b/apps/web/src/composer-editor-mentions.ts @@ -2,6 +2,10 @@ import { INLINE_TERMINAL_CONTEXT_PLACEHOLDER, type TerminalContextDraft, } from "./lib/terminalContext"; +import { + collectComposerInlineTokens, + type ComposerInlineToken, +} from "@t3tools/shared/composerInlineTokens"; export type ComposerPromptSegment = | { @@ -22,12 +26,6 @@ export type ComposerPromptSegment = context: TerminalContextDraft | null; }; -const SKILL_TOKEN_REGEX = /(^|\s)\$([a-zA-Z][a-zA-Z0-9:_-]*)(?=\s)/g; -const MENTION_TOKEN_REGEX = /(^|\s)@(?:"((?:\\.|[^"\\])*)"|([^\s@"]+))(?=\s)/g; -const FILE_LINK_TOKEN_REGEX = /(^|\s)\[((?:\\.|[^\]\\])*)\]\(([^)\s]+)\)(?=\s)/g; -const URI_SCHEME_REGEX = /^[A-Za-z][A-Za-z0-9+.-]*:/; -const WINDOWS_DRIVE_PATH_REGEX = /^[A-Za-z]:[\\/]/; - function rangeIncludesIndex(start: number, end: number, index: number): boolean { return start <= index && index < end; } @@ -42,84 +40,6 @@ function pushTextSegment(segments: ComposerPromptSegment[], text: string): void segments.push({ type: "text", text }); } -type InlineTokenMatch = - | { - type: "mention"; - value: string; - start: number; - end: number; - } - | { - type: "skill"; - value: string; - start: number; - end: number; - }; - -type MentionTokenMatch = Extract; - -function collectMentionTokenMatches(text: string): MentionTokenMatch[] { - const matches: MentionTokenMatch[] = []; - - for (const match of text.matchAll(FILE_LINK_TOKEN_REGEX)) { - const fullMatch = match[0]; - const prefix = match[1] ?? ""; - const label = (match[2] ?? "").replace(/\\(.)/g, "$1"); - const encodedPath = match[3] ?? ""; - let path = encodedPath; - try { - path = decodeURIComponent(encodedPath); - } catch { - // Keep the source value when malformed percent escapes are present. - } - const separatorIndex = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\")); - const basename = separatorIndex >= 0 ? path.slice(separatorIndex + 1) : path; - const hasExternalScheme = URI_SCHEME_REGEX.test(path) && !WINDOWS_DRIVE_PATH_REGEX.test(path); - if (!path || hasExternalScheme || label !== basename) { - continue; - } - const matchIndex = match.index ?? 0; - const start = matchIndex + prefix.length; - const end = start + fullMatch.length - prefix.length; - matches.push({ type: "mention", value: path, start, end }); - } - - for (const match of text.matchAll(MENTION_TOKEN_REGEX)) { - const fullMatch = match[0]; - const prefix = match[1] ?? ""; - const quotedPath = match[2]; - const unquotedPath = match[3]; - const path = - quotedPath !== undefined ? quotedPath.replace(/\\(.)/g, "$1") : (unquotedPath ?? ""); - const matchIndex = match.index ?? 0; - const start = matchIndex + prefix.length; - const end = start + fullMatch.length - prefix.length; - if (path.length > 0) { - matches.push({ type: "mention", value: path, start, end }); - } - } - - return matches; -} - -function collectInlineTokenMatches(text: string): InlineTokenMatch[] { - const matches: InlineTokenMatch[] = collectMentionTokenMatches(text); - - for (const match of text.matchAll(SKILL_TOKEN_REGEX)) { - const fullMatch = match[0]; - const prefix = match[1] ?? ""; - const skillName = match[2] ?? ""; - const matchIndex = match.index ?? 0; - const start = matchIndex + prefix.length; - const end = start + fullMatch.length - prefix.length; - if (skillName.length > 0) { - matches.push({ type: "skill", value: skillName, start, end }); - } - } - - return matches.toSorted((left, right) => left.start - right.start); -} - function forEachPromptSegmentSlice( prompt: string, visitor: ( @@ -186,10 +106,16 @@ function forEachPromptTextSlice( function forEachMentionMatch( prompt: string, - visitor: (match: MentionTokenMatch, promptOffset: number) => boolean | void, + visitor: ( + match: Extract, + promptOffset: number, + ) => boolean | void, ): boolean { return forEachPromptTextSlice(prompt, (text, promptOffset) => { - for (const match of collectMentionTokenMatches(text)) { + for (const match of collectComposerInlineTokens(text)) { + if (match.type !== "mention") { + continue; + } if (visitor(match, promptOffset) === true) { return true; } @@ -204,7 +130,7 @@ function splitPromptTextIntoComposerSegments(text: string): ComposerPromptSegmen return segments; } - const tokenMatches = collectInlineTokenMatches(text); + const tokenMatches = collectComposerInlineTokens(text); let cursor = 0; for (const match of tokenMatches) { if (match.start < cursor) { @@ -219,7 +145,7 @@ function splitPromptTextIntoComposerSegments(text: string): ComposerPromptSegmen segments.push({ type: "mention", path: match.value, - source: text.slice(match.start, match.end), + source: match.source, }); } else { segments.push({ type: "skill", name: match.value }); diff --git a/apps/web/src/diffFileActions.test.ts b/apps/web/src/diffFileActions.test.ts new file mode 100644 index 0000000000..38032c07a8 --- /dev/null +++ b/apps/web/src/diffFileActions.test.ts @@ -0,0 +1,51 @@ +import { scopeThreadRef } from "@t3tools/client-runtime"; +import { EnvironmentId, ThreadId } from "@t3tools/contracts"; +import { beforeEach, describe, expect, it, vi } from "vite-plus/test"; + +import { openDiffFilePrimaryAction } from "./diffFileActions"; +import { selectThreadRightPanelState, useRightPanelStore } from "./rightPanelStore"; + +const THREAD_REF = scopeThreadRef( + EnvironmentId.make("environment-local"), + ThreadId.make("thread-1"), +); + +describe("openDiffFilePrimaryAction", () => { + beforeEach(() => { + useRightPanelStore.setState({ byThreadKey: {} }); + }); + + it("opens diff files in the thread file viewer", () => { + const openInEditor = vi.fn(); + + openDiffFilePrimaryAction({ + threadRef: THREAD_REF, + filePath: "apps/web/src/components/DiffPanel.tsx", + activeCwd: "/repo/project", + openInEditor, + }); + + expect( + selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, THREAD_REF), + ).toMatchObject({ + isOpen: true, + activeSurfaceId: "file:apps/web/src/components/DiffPanel.tsx", + }); + expect(openInEditor).not.toHaveBeenCalled(); + }); + + it("falls back to the editor without thread context", () => { + const openInEditor = vi.fn(); + + openDiffFilePrimaryAction({ + threadRef: null, + filePath: "apps/web/src/components/DiffPanel.tsx", + activeCwd: "/repo/project", + openInEditor, + }); + + expect(openInEditor).toHaveBeenCalledWith( + "/repo/project/apps/web/src/components/DiffPanel.tsx", + ); + }); +}); diff --git a/apps/web/src/diffFileActions.ts b/apps/web/src/diffFileActions.ts new file mode 100644 index 0000000000..335ad21fcc --- /dev/null +++ b/apps/web/src/diffFileActions.ts @@ -0,0 +1,25 @@ +import type { ScopedThreadRef } from "@t3tools/contracts"; + +import { useRightPanelStore } from "./rightPanelStore"; +import { resolvePathLinkTarget } from "./terminal-links"; + +interface OpenDiffFilePrimaryActionInput { + readonly threadRef: ScopedThreadRef | null; + readonly filePath: string; + readonly activeCwd: string | undefined; + readonly openInEditor: (targetPath: string) => void; +} + +export function openDiffFilePrimaryAction({ + threadRef, + filePath, + activeCwd, + openInEditor, +}: OpenDiffFilePrimaryActionInput): void { + if (threadRef) { + useRightPanelStore.getState().openFile(threadRef, filePath); + return; + } + + openInEditor(activeCwd ? resolvePathLinkTarget(filePath, activeCwd) : filePath); +} diff --git a/apps/web/src/environmentApi.ts b/apps/web/src/environmentApi.ts index 0b629ada77..bee68cfb5f 100644 --- a/apps/web/src/environmentApi.ts +++ b/apps/web/src/environmentApi.ts @@ -30,6 +30,8 @@ export function createEnvironmentApi(rpcClient: WsRpcClient): EnvironmentApi { onMetadata: (callback, options) => rpcClient.terminal.onMetadata(callback, options), }, projects: { + listEntries: rpcClient.projects.listEntries, + readFile: rpcClient.projects.readFile, searchEntries: rpcClient.projects.searchEntries, writeFile: rpcClient.projects.writeFile, }, diff --git a/apps/web/src/environments/runtime/service.addSavedEnvironment.test.ts b/apps/web/src/environments/runtime/service.addSavedEnvironment.test.ts index f099338ab9..a9da256f8f 100644 --- a/apps/web/src/environments/runtime/service.addSavedEnvironment.test.ts +++ b/apps/web/src/environments/runtime/service.addSavedEnvironment.test.ts @@ -1,8 +1,13 @@ import { EnvironmentAuthInvalidError, EnvironmentId } from "@t3tools/contracts"; import * as Effect from "effect/Effect"; +import * as Option from "effect/Option"; import * as Schema from "effect/Schema"; +import * as Tracer from "effect/Tracer"; +import { Headers } from "effect/unstable/http"; import { afterEach, beforeEach, describe, expect, it, vi } from "vite-plus/test"; +import { RelayClientTracer } from "@t3tools/shared/relayTracing"; + const decodeEnvironmentAuthInvalidError = Schema.decodeUnknownSync(EnvironmentAuthInvalidError); let mockSavedRecords: Array> = []; @@ -12,8 +17,11 @@ const mockFetchRemoteEnvironmentDescriptor = vi.fn(); const mockBootstrapRemoteBearerSession = vi.fn(); const mockFetchRemoteSessionState = vi.fn(); const mockFetchRemoteDpopSessionState = vi.fn(); +const mockResolveRemoteDpopWebSocketConnectionUrl = vi.fn(); const mockResolveRemoteWebSocketConnectionUrl = vi.fn(); +const mockWsTransportConnectors: Array<() => Promise> = []; let managedRelayDpopSigner: typeof import("@t3tools/client-runtime").ManagedRelayDpopSigner; +let mockRelayClientTracer = Option.none(); const mockRemoteHttpRunPromise = vi.fn((effect: Effect.Effect) => Effect.runPromise( effect.pipe( @@ -24,6 +32,7 @@ const mockRemoteHttpRunPromise = vi.fn((effect: Effect.Effect) => createProof: () => Effect.succeed("dpop-proof"), }), ), + Effect.provideService(RelayClientTracer, mockRelayClientTracer), ), ), ); @@ -164,12 +173,16 @@ vi.mock("@t3tools/client-runtime", async (importOriginal) => { fetchRemoteEnvironmentDescriptor: mockFetchRemoteEnvironmentDescriptor, fetchRemoteSessionState: mockFetchRemoteSessionState, fetchRemoteDpopSessionState: mockFetchRemoteDpopSessionState, + resolveRemoteDpopWebSocketConnectionUrl: mockResolveRemoteDpopWebSocketConnectionUrl, resolveRemoteWebSocketConnectionUrl: mockResolveRemoteWebSocketConnectionUrl, }; }); vi.mock("../../rpc/wsTransport", () => ({ - WsTransport: vi.fn(), + WsTransport: vi.fn(function WsTransport(connect: () => Promise) { + mockWsTransportConnectors.push(connect); + return {}; + }), })); describe("addSavedEnvironment", () => { @@ -181,6 +194,8 @@ describe("addSavedEnvironment", () => { vi.resetModules(); vi.clearAllMocks(); mockSavedRecords = []; + mockRelayClientTracer = Option.none(); + mockWsTransportConnectors.length = 0; vi.stubGlobal("window", { desktopBridge: { ensureSshEnvironment: mockEnsureSshEnvironment, @@ -237,6 +252,9 @@ describe("addSavedEnvironment", () => { mockResolveRemoteWebSocketConnectionUrl.mockReturnValue( Effect.succeed("wss://remote.example.com/?wsTicket=remote-token"), ); + mockResolveRemoteDpopWebSocketConnectionUrl.mockReturnValue( + Effect.succeed("wss://remote.example.com/?wsTicket=remote-dpop-token"), + ); mockFetchSshEnvironmentDescriptor.mockResolvedValue({ environmentId: EnvironmentId.make("environment-1"), label: "Remote environment", @@ -386,6 +404,7 @@ describe("addSavedEnvironment", () => { wsBaseUrl: "wss://managed.example.com/", relayUrl: "https://relay.example.com", accessToken: "managed-access-token", + relayTraceHeaders: Headers.empty, }); expect(mockWriteSavedEnvironmentCredential).toHaveBeenCalledWith( @@ -406,6 +425,19 @@ describe("addSavedEnvironment", () => { it("renews expired managed DPoP credentials through the relay", async () => { const environmentId = EnvironmentId.make("environment-1"); + const productSpans: Array = []; + mockRelayClientTracer = Option.some( + Tracer.make({ + span: (options) => { + const span = new Tracer.NativeSpan(options); + productSpans.push(span); + return span; + }, + }), + ); + const relayTraceHeaders = Headers.fromInput({ + traceparent: "00-0123456789abcdef0123456789abcdef-0123456789abcdef-01", + }); mockSavedRecords = [ { environmentId, @@ -443,6 +475,7 @@ describe("addSavedEnvironment", () => { wsBaseUrl: "wss://managed.example.com/", relayUrl: "https://relay.example.com", accessToken: "renewed-access-token", + relayTraceHeaders, }), ); @@ -460,6 +493,16 @@ describe("addSavedEnvironment", () => { method: "dpop", accessToken: "renewed-access-token", }); + const renewedTransportConnector = mockWsTransportConnectors.at(-1); + expect(renewedTransportConnector).toBeDefined(); + await renewedTransportConnector!(); + expect(mockResolveRemoteDpopWebSocketConnectionUrl).toHaveBeenCalledWith({ + wsBaseUrl: "wss://managed.example.com/", + httpBaseUrl: "https://managed.example.com/", + accessToken: "renewed-access-token", + dpopProof: "dpop-proof", + }); + expect(productSpans.some((span) => span.name === "relay.environment.reconnect")).toBe(false); await resetEnvironmentServiceForTests(); }); diff --git a/apps/web/src/environments/runtime/service.threadSubscriptions.test.ts b/apps/web/src/environments/runtime/service.threadSubscriptions.test.ts index 2f223c4b1b..8d7cec9904 100644 --- a/apps/web/src/environments/runtime/service.threadSubscriptions.test.ts +++ b/apps/web/src/environments/runtime/service.threadSubscriptions.test.ts @@ -121,6 +121,8 @@ vi.mock("@t3tools/client-runtime", async (importOriginal) => { subscribePorts: vi.fn(() => () => undefined), }, projects: { + listEntries: vi.fn(), + readFile: vi.fn(), searchEntries: vi.fn(), writeFile: vi.fn(), }, diff --git a/apps/web/src/environments/runtime/service.ts b/apps/web/src/environments/runtime/service.ts index fcccb3aabb..9eee6e4961 100644 --- a/apps/web/src/environments/runtime/service.ts +++ b/apps/web/src/environments/runtime/service.ts @@ -26,7 +26,10 @@ import { import { type QueryClient } from "@tanstack/react-query"; import { Throttler } from "@tanstack/react-pacer"; import * as Effect from "effect/Effect"; +import * as Option from "effect/Option"; import * as Schema from "effect/Schema"; +import { Headers, HttpTraceContext } from "effect/unstable/http"; +import { withRelayClientTracing } from "@t3tools/shared/relayTracing"; import { createKnownEnvironment, getKnownEnvironmentWsBaseUrl, @@ -1174,6 +1177,7 @@ function createPrimaryEnvironmentClient( function createSavedEnvironmentClient( environmentId: EnvironmentId, credentialRef: { current: SavedEnvironmentCredential }, + relayTraceHeadersRef: { current: Headers.Headers | null }, ): WsRpcClient { useSavedEnvironmentRuntimeStore.getState().ensure(environmentId); @@ -1197,21 +1201,10 @@ function createSavedEnvironmentClient( } if (credential.method === "dpop") { try { + const relayTraceHeaders = relayTraceHeadersRef.current; + relayTraceHeadersRef.current = null; return await webRuntime.runPromise( - createManagedRelayDpopProof({ - method: "POST", - url: new URL("/api/auth/websocket-ticket", record.httpBaseUrl).toString(), - accessToken: credential.accessToken, - }).pipe( - Effect.flatMap((proof) => - resolveRemoteDpopWebSocketConnectionUrl({ - wsBaseUrl: record.wsBaseUrl, - httpBaseUrl: record.httpBaseUrl, - accessToken: credential.accessToken, - dpopProof: proof, - }), - ), - ), + resolveManagedRelayWebSocketUrl(record, credential, relayTraceHeaders), ); } catch (error) { if (!isEnvironmentAuthInvalidError(error)) { @@ -1224,19 +1217,10 @@ function createSavedEnvironmentClient( const renewedCredential = renewed.credential; credentialRef.current = renewedCredential; return await webRuntime.runPromise( - createManagedRelayDpopProof({ - method: "POST", - url: new URL("/api/auth/websocket-ticket", renewed.record.httpBaseUrl).toString(), - accessToken: renewedCredential.accessToken, - }).pipe( - Effect.flatMap((proof) => - resolveRemoteDpopWebSocketConnectionUrl({ - wsBaseUrl: renewed.record.wsBaseUrl, - httpBaseUrl: renewed.record.httpBaseUrl, - accessToken: renewedCredential.accessToken, - dpopProof: proof, - }), - ), + resolveManagedRelayWebSocketUrl( + renewed.record, + renewedCredential, + renewed.relayTraceHeaders, ), ); } @@ -1340,9 +1324,44 @@ async function refreshSavedEnvironmentMetadata( .rename(record.environmentId, serverConfig.environment.label); } +const resolveManagedRelayWebSocketUrl = Effect.fn( + "web.environment.resolveManagedRelayWebSocketUrl", +)(function* ( + record: SavedEnvironmentRecord, + credential: Extract, + traceHeaders: Headers.Headers | null, +) { + const request = createManagedRelayDpopProof({ + method: "POST", + url: new URL("/api/auth/websocket-ticket", record.httpBaseUrl).toString(), + accessToken: credential.accessToken, + }).pipe( + Effect.flatMap((proof) => + resolveRemoteDpopWebSocketConnectionUrl({ + wsBaseUrl: record.wsBaseUrl, + httpBaseUrl: record.httpBaseUrl, + accessToken: credential.accessToken, + dpopProof: proof, + }), + ), + ); + const parent = traceHeaders ? HttpTraceContext.fromHeaders(traceHeaders) : Option.none(); + return yield* ( + Option.isSome(parent) + ? request.pipe(Effect.withParentSpan(parent.value)) + : request.pipe( + Effect.withSpan("relay.environment.reconnect", { + root: true, + attributes: { "relay.environment_id": record.environmentId }, + }), + ) + ).pipe(withRelayClientTracing); +}); + async function renewManagedRelayCredential(record: SavedEnvironmentRecord): Promise<{ readonly record: SavedEnvironmentRecord; readonly credential: SavedEnvironmentCredential; + readonly relayTraceHeaders: Headers.Headers; } | null> { if (!record.relayManaged) { return null; @@ -1383,7 +1402,7 @@ async function renewManagedRelayCredential(record: SavedEnvironmentRecord): Prom throw new Error("Unable to persist refreshed managed environment credentials."); } useSavedEnvironmentRegistryStore.getState().upsert(nextRecord); - return { record: nextRecord, credential }; + return { record: nextRecord, credential, relayTraceHeaders: connected.relayTraceHeaders }; } function registerConnection(connection: EnvironmentConnection): EnvironmentConnection { @@ -1467,6 +1486,7 @@ export async function ensureSavedEnvironmentConnection( readonly scopes?: ReadonlyArray | null; readonly serverConfig?: ServerConfig | null; readonly allowManagedRenewal?: boolean; + readonly relayTraceHeaders?: Headers.Headers; }, ): Promise { const existing = environmentConnections.get(record.environmentId); @@ -1512,9 +1532,14 @@ export async function ensureSavedEnvironmentConnection( } const activeCredential = { current: credential }; + const relayTraceHeaders = { current: options?.relayTraceHeaders ?? null }; const client = options?.client ?? - createSavedEnvironmentClient(activeRecord.environmentId, activeCredential); + createSavedEnvironmentClient( + activeRecord.environmentId, + activeCredential, + relayTraceHeaders, + ); const initialConfigSnapshot = createDeferredPromise(); const knownEnvironment = createKnownEnvironment({ id: activeRecord.environmentId, @@ -1590,6 +1615,7 @@ export async function ensureSavedEnvironmentConnection( scopes: scopeHint, serverConfig: options?.serverConfig ?? null, allowManagedRenewal: false, + relayTraceHeaders: renewed.relayTraceHeaders, }); } } @@ -1932,6 +1958,7 @@ export async function addManagedRelayEnvironment(input: { readonly wsBaseUrl: string; readonly relayUrl: string; readonly accessToken: string; + readonly relayTraceHeaders: Headers.Headers; }): Promise { const existingRecord = getSavedEnvironmentRecord(input.environmentId); const record: SavedEnvironmentRecord = { @@ -1955,7 +1982,10 @@ export async function addManagedRelayEnvironment(input: { } useSavedEnvironmentRegistryStore.getState().upsert(record); await removeConnection(record.environmentId).catch(() => false); - await ensureSavedEnvironmentConnection(record, { credential }); + await ensureSavedEnvironmentConnection(record, { + credential, + relayTraceHeaders: input.relayTraceHeaders, + }); return record; } diff --git a/apps/web/src/index.css b/apps/web/src/index.css index 8a418a92bf..9048e2074e 100644 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -4,6 +4,24 @@ /* Window Controls Overlay: active when Electron exposes native titlebar control geometry. */ @custom-variant wco (&:is(.wco, .wco *)); +:root { + --workspace-topbar-height: 52px; + --workspace-controls-top: 0px; + --workspace-controls-right: calc(env(safe-area-inset-right) + 0.75rem); + --workspace-native-controls-inset: 0px; +} + +.wco { + --workspace-topbar-height: env(titlebar-area-height, 52px); + --workspace-controls-top: env(titlebar-area-y, 0px); + --workspace-controls-right: calc( + 100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px) + 0.75rem + ); + --workspace-native-controls-inset: calc( + 100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px) + 0.75rem + ); +} + @theme inline { --animate-skeleton: skeleton 2s -1s infinite linear; --font-sans: @@ -71,6 +89,30 @@ } } +@layer components { + .workspace-topbar { + display: flex; + height: var(--workspace-topbar-height); + min-height: var(--workspace-topbar-height); + flex-shrink: 0; + align-items: center; + } + + .workspace-titlebar-controls { + position: absolute; + top: var(--workspace-controls-top); + right: var(--workspace-controls-right); + display: flex; + height: var(--workspace-topbar-height); + align-items: center; + -webkit-app-region: no-drag; + } + + .surface-subheader { + @apply flex h-10 min-h-10 shrink-0 items-center border-b border-border/60 bg-background; + } +} + /* Safe-area inset utilities for surfaces that opt into edge-to-edge rendering. Insets resolve to 0 when the browser already constrains the layout viewport to the safe area. */ diff --git a/apps/web/src/keybindings.test.ts b/apps/web/src/keybindings.test.ts index 5563378da9..d4fc945cc0 100644 --- a/apps/web/src/keybindings.test.ts +++ b/apps/web/src/keybindings.test.ts @@ -621,6 +621,17 @@ describe("resolveShortcutCommand", () => { "thread.next", ); }); + + it("matches Option-modified letters using the physical key code on macOS", () => { + assert.strictEqual( + resolveShortcutCommand( + event({ key: "∫", code: "KeyB", metaKey: true, altKey: true }), + DEFAULT_BINDINGS, + { platform: "MacIntel" }, + ), + "rightPanel.toggle", + ); + }); }); describe("formatShortcutLabel", () => { diff --git a/apps/web/src/keybindings.ts b/apps/web/src/keybindings.ts index 24ed02223d..9d6109a778 100644 --- a/apps/web/src/keybindings.ts +++ b/apps/web/src/keybindings.ts @@ -72,6 +72,10 @@ function normalizeEventKey(key: string): string { function resolveEventKeys(event: ShortcutEventLike): Set { const keys = new Set([normalizeEventKey(event.key)]); + const letterCode = event.code?.match(/^Key([A-Z])$/)?.[1]; + if (letterCode) { + keys.add(letterCode.toLowerCase()); + } const aliases = event.code ? EVENT_CODE_KEY_ALIASES[event.code] : undefined; if (!aliases) return keys; diff --git a/apps/web/src/lib/runtime.ts b/apps/web/src/lib/runtime.ts index 6c17a2f0b1..1d7903ced0 100644 --- a/apps/web/src/lib/runtime.ts +++ b/apps/web/src/lib/runtime.ts @@ -5,6 +5,7 @@ import { FetchHttpClient } from "effect/unstable/http"; import { remoteHttpClientLayer } from "@t3tools/client-runtime"; import { httpHeaderRedactionLayer } from "@t3tools/shared/httpObservability"; +import { makeRelayClientTracingLayer } from "@t3tools/shared/relayTracing"; import { PrimaryEnvironmentHttpClient, primaryEnvironmentHttpClientLive, @@ -13,13 +14,19 @@ import { primaryEnvironmentRequestInit } from "../environments/primary/requestIn import { browserCryptoLayer } from "../cloud/dpop"; import { webManagedRelayClientLayer } from "../cloud/managedRelayLayer"; -import { resolveCloudPublicConfig } from "../cloud/publicConfig"; +import { resolveCloudPublicConfig, resolveRelayTracingConfig } from "../cloud/publicConfig"; function configuredRelayUrl(): string { return resolveCloudPublicConfig().relayUrl ?? "http://relay.invalid"; } const webHttpClientLayer = remoteHttpClientLayer(globalThis.fetch); +const webRelayTracingLayer = makeRelayClientTracingLayer(resolveRelayTracingConfig(), { + serviceName: "t3-web-relay-client", + serviceVersion: import.meta.env.APP_VERSION, + runtime: "browser", + client: typeof window !== "undefined" && window.desktopBridge ? "desktop" : "web", +}).pipe(Layer.provide(webHttpClientLayer)); export const remoteHttpRuntime = ManagedRuntime.make(webHttpClientLayer); @@ -57,6 +64,7 @@ export const webRuntime = ManagedRuntime.make( browserCryptoLayer, webManagedRelayClientLayer(configuredRelayUrl()).pipe( Layer.provide(Layer.mergeAll(webHttpClientLayer, browserCryptoLayer)), + Layer.provideMerge(webRelayTracingLayer), ), ), ); diff --git a/apps/web/src/localApi.test.ts b/apps/web/src/localApi.test.ts index 621282e056..0e7ea66d5e 100644 --- a/apps/web/src/localApi.test.ts +++ b/apps/web/src/localApi.test.ts @@ -55,6 +55,8 @@ const rpcClientMock = { ), }, projects: { + listEntries: vi.fn(), + readFile: vi.fn(), searchEntries: vi.fn(), writeFile: vi.fn(), }, diff --git a/apps/web/src/markdown-links.test.ts b/apps/web/src/markdown-links.test.ts index 52a7385009..5691ffa889 100644 --- a/apps/web/src/markdown-links.test.ts +++ b/apps/web/src/markdown-links.test.ts @@ -83,6 +83,7 @@ describe("resolveMarkdownFileLinkTarget", () => { ), ).toMatchObject({ displayPath: "t3code/apps/web/src/session-logic.ts:501", + workspaceRelativePath: "apps/web/src/session-logic.ts", }); }); @@ -95,6 +96,14 @@ describe("resolveMarkdownFileLinkTarget", () => { ).toMatchObject({ displayPath: "t3code/apps/web/src/components/chat/MessagesTimeline.virtualization.browser.tsx", + workspaceRelativePath: + "apps/web/src/components/chat/MessagesTimeline.virtualization.browser.tsx", + }); + }); + + it("does not create a preview path for files outside the workspace", () => { + expect(resolveMarkdownFileLinkMeta("/tmp/report.ts", "/repo/project")).toMatchObject({ + workspaceRelativePath: null, }); }); diff --git a/apps/web/src/markdown-links.ts b/apps/web/src/markdown-links.ts index 9ec4ee4564..1e24de8bb1 100644 --- a/apps/web/src/markdown-links.ts +++ b/apps/web/src/markdown-links.ts @@ -26,6 +26,7 @@ export interface MarkdownFileLinkMeta { filePath: string; targetPath: string; displayPath: string; + workspaceRelativePath: string | null; basename: string; line?: number; column?: number; @@ -174,6 +175,19 @@ function basenameOfPath(path: string): string { return separatorIndex >= 0 ? path.slice(separatorIndex + 1) : path; } +function workspaceRelativePath(path: string, workspaceRoot: string | undefined): string | null { + if (!workspaceRoot) return null; + const normalizedPath = normalizeWindowsDrivePath(path.replaceAll("\\", "/")); + const normalizedRoot = normalizeWindowsDrivePath(workspaceRoot.replaceAll("\\", "/")).replace( + /\/+$/, + "", + ); + const pathForCompare = normalizedPath.toLowerCase(); + const rootForCompare = normalizedRoot.toLowerCase(); + if (!pathForCompare.startsWith(`${rootForCompare}/`)) return null; + return normalizedPath.slice(normalizedRoot.length + 1); +} + export function resolveMarkdownFileLinkMeta( href: string | undefined, cwd?: string, @@ -191,6 +205,7 @@ export function resolveMarkdownFileLinkMeta( filePath: path, targetPath, displayPath: formatWorkspaceRelativePath(targetPath, cwd), + workspaceRelativePath: workspaceRelativePath(path, cwd), basename: basenameOfPath(path), ...(lineNumber !== undefined ? { line: lineNumber } : {}), ...(columnNumber !== undefined ? { column: columnNumber } : {}), diff --git a/apps/web/src/pierre-icons.test.ts b/apps/web/src/pierre-icons.test.ts new file mode 100644 index 0000000000..46a4e8a803 --- /dev/null +++ b/apps/web/src/pierre-icons.test.ts @@ -0,0 +1,57 @@ +import { assert, describe, it } from "vite-plus/test"; + +import { + hasSpecificPierreIconForFileName, + resolvePierreIconForEntry, + syntheticFileNameForLanguageId, + T3_PIERRE_ICONS, +} from "./pierre-icons"; + +describe("Pierre file icons", () => { + it("uses Pierre exact filename and complete-set extension mappings", () => { + assert.equal(resolvePierreIconForEntry("Dockerfile", "file")?.token, "docker"); + assert.equal(resolvePierreIconForEntry("src/Button.tsx", "file")?.token, "react"); + assert.equal(resolvePierreIconForEntry("vite.config.ts", "file")?.token, "vite"); + }); + + it("extends Pierre with T3-specific exact filename icons", () => { + assert.equal( + resolvePierreIconForEntry("package.json", "file")?.name, + "t3-file-icon-package-json", + ); + assert.equal( + resolvePierreIconForEntry("config/tsconfig.json", "file")?.name, + "t3-file-icon-tsconfig", + ); + assert.equal(resolvePierreIconForEntry("AGENTS.md", "file")?.name, "t3-file-icon-agents"); + assert.equal(resolvePierreIconForEntry("CLAUDE.md", "file")?.name, "t3-file-icon-claude"); + assert.equal(resolvePierreIconForEntry("README.md", "file")?.name, "t3-file-icon-readme"); + assert.equal(resolvePierreIconForEntry("pnpm-lock.yaml", "file")?.name, "t3-file-icon-pnpm"); + assert.equal( + resolvePierreIconForEntry("pnpm-workspace.yaml", "file")?.name, + "t3-file-icon-pnpm", + ); + }); + + it("ships every custom icon referenced by the extended resolver", () => { + const customIconNames = new Set(Object.values(T3_PIERRE_ICONS.byFileName)); + for (const iconName of customIconNames) { + assert.include(T3_PIERRE_ICONS.spriteSheet, `id="${iconName}"`); + } + }); + + it("uses the Pierre default icon for unknown file types", () => { + assert.equal(resolvePierreIconForEntry("artifact.unknown-ext", "file")?.token, "default"); + assert.isFalse(hasSpecificPierreIconForFileName("artifact.unknown-ext")); + }); + + it("leaves directory rendering to the shared folder fallback", () => { + assert.isNull(resolvePierreIconForEntry("packages/client-runtime", "directory")); + }); + + it("normalizes common markdown fence language aliases", () => { + assert.equal(syntheticFileNameForLanguageId("typescript"), "file.ts"); + assert.equal(syntheticFileNameForLanguageId("shellscript"), "file.sh"); + assert.equal(syntheticFileNameForLanguageId("python"), "file.py"); + }); +}); diff --git a/apps/web/src/pierre-icons.ts b/apps/web/src/pierre-icons.ts new file mode 100644 index 0000000000..b2511563df --- /dev/null +++ b/apps/web/src/pierre-icons.ts @@ -0,0 +1,117 @@ +import { + createFileTreeIconResolver, + getBuiltInSpriteSheet, + type FileTreeIcons, +} from "@pierre/trees"; + +export interface PierreIconResolution { + name: string; + token?: string; +} + +const PIERRE_ICON_SPRITE_ID = "t3code-pierre-file-icon-sprite"; + +const T3_FILE_ICON_SPRITE = ` +`; + +export const T3_PIERRE_ICONS = { + set: "complete", + colored: true, + spriteSheet: T3_FILE_ICON_SPRITE, + byFileName: { + "package.json": "t3-file-icon-package-json", + "tsconfig.json": "t3-file-icon-tsconfig", + "agents.md": "t3-file-icon-agents", + "claude.md": "t3-file-icon-claude", + "readme.md": "t3-file-icon-readme", + "pnpm-lock.yaml": "t3-file-icon-pnpm", + "pnpm-workspace.yaml": "t3-file-icon-pnpm", + }, +} satisfies FileTreeIcons; + +const completeIconResolver = createFileTreeIconResolver(T3_PIERRE_ICONS); + +const LANGUAGE_EXTENSION_ALIASES: Record = { + bash: "sh", + csharp: "cs", + dockerfile: "dockerfile", + javascript: "js", + jsx: "jsx", + markdown: "md", + mdx: "mdx", + plaintext: "txt", + python: "py", + ruby: "rb", + rust: "rs", + shell: "sh", + shellscript: "sh", + swift: "swift", + typescript: "ts", + tsx: "tsx", + yaml: "yml", +}; + +export function basenameOfPath(pathValue: string): string { + const slashIndex = pathValue.lastIndexOf("/"); + return slashIndex === -1 ? pathValue : pathValue.slice(slashIndex + 1); +} + +export function inferEntryKindFromPath(pathValue: string): "file" | "directory" { + const base = basenameOfPath(pathValue); + if (base.startsWith(".") && !base.slice(1).includes(".")) return "directory"; + return base.includes(".") ? "file" : "directory"; +} + +export function syntheticFileNameForLanguageId(languageId: string): string { + const normalized = languageId.toLowerCase(); + return `file.${LANGUAGE_EXTENSION_ALIASES[normalized] ?? normalized}`; +} + +export function resolvePierreIconForEntry( + pathValue: string, + kind: "file" | "directory", +): PierreIconResolution | null { + if (kind === "directory") return null; + return completeIconResolver.resolveIcon("file-tree-icon-file", pathValue); +} + +export function hasSpecificPierreIconForFileName(fileName: string): boolean { + return resolvePierreIconForEntry(fileName, "file")?.token !== "default"; +} + +export function ensurePierreIconSprite(): void { + if (typeof document === "undefined" || document.getElementById(PIERRE_ICON_SPRITE_ID)) return; + const container = document.createElement("div"); + container.id = PIERRE_ICON_SPRITE_ID; + container.setAttribute("aria-hidden", "true"); + container.style.position = "absolute"; + container.style.width = "0"; + container.style.height = "0"; + container.style.overflow = "hidden"; + container.style.pointerEvents = "none"; + container.innerHTML = `${getBuiltInSpriteSheet("complete")}${T3_FILE_ICON_SPRITE}`; + document.body.prepend(container); +} diff --git a/apps/web/src/rightPanelStore.test.ts b/apps/web/src/rightPanelStore.test.ts index c111ec50e6..723eb9aeb1 100644 --- a/apps/web/src/rightPanelStore.test.ts +++ b/apps/web/src/rightPanelStore.test.ts @@ -88,6 +88,54 @@ describe("rightPanelStore", () => { ).toHaveLength(2); }); + it("keeps files as a singleton surface", () => { + useRightPanelStore.getState().open(refA, "files"); + useRightPanelStore.getState().open(refA, "files"); + expect(selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, refA)).toEqual({ + isOpen: true, + activeSurfaceId: "files", + surfaces: [{ id: "files", kind: "files" }], + }); + }); + + it("replaces the standalone explorer with peer file surfaces", () => { + useRightPanelStore.getState().open(refA, "files"); + useRightPanelStore.getState().openFile(refA, "src/index.ts"); + useRightPanelStore.getState().openFile(refA, "src/index.ts"); + useRightPanelStore.getState().openFile(refA, "README.md"); + + expect(selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, refA)).toEqual({ + isOpen: true, + activeSurfaceId: "file:README.md", + surfaces: [ + { id: "file:src/index.ts", kind: "file", relativePath: "src/index.ts" }, + { id: "file:README.md", kind: "file", relativePath: "README.md" }, + ], + }); + }); + + it("removes persisted file surfaces when their workspace no longer exists", () => { + useRightPanelStore.getState().openFile(refA, "src/index.ts"); + useRightPanelStore.getState().open(refA, "plan"); + useRightPanelStore.getState().openFile(refA, "README.md"); + + useRightPanelStore.getState().reconcileFileSurfaces(refA, false); + + expect(selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, refA)).toEqual({ + isOpen: true, + activeSurfaceId: "plan", + surfaces: [{ id: "plan", kind: "plan" }], + }); + + useRightPanelStore.getState().openFile(refB, "conductor.json"); + useRightPanelStore.getState().reconcileFileSurfaces(refB, false); + expect(selectThreadRightPanelState(useRightPanelStore.getState().byThreadKey, refB)).toEqual({ + isOpen: false, + activeSurfaceId: null, + surfaces: [], + }); + }); + it("close hides the panel without clearing its selected surface", () => { useRightPanelStore.getState().open(refA, "plan"); useRightPanelStore.getState().close(refA); diff --git a/apps/web/src/rightPanelStore.ts b/apps/web/src/rightPanelStore.ts index 7bcf38fb1d..e92de5d847 100644 --- a/apps/web/src/rightPanelStore.ts +++ b/apps/web/src/rightPanelStore.ts @@ -4,8 +4,8 @@ * This is intentionally a shallow workspace model: it owns an ordered set of * surface descriptors and the active surface, while each feature continues to * own its durable resource state. Browser surfaces point at preview tab ids, - * terminal surfaces point at terminal session ids, and diff/plan remain - * singleton surfaces. + * terminal surfaces point at terminal session ids, file surfaces point at + * workspace paths, and diff/plan/files remain singleton surfaces. */ import { scopedThreadKey } from "@t3tools/client-runtime"; import type { ScopedThreadRef } from "@t3tools/contracts"; @@ -14,7 +14,7 @@ import { createJSONStorage, persist } from "zustand/middleware"; import { resolveStorage } from "./lib/storage"; -export const RIGHT_PANEL_KINDS = ["plan", "diff", "preview", "terminal"] as const; +export const RIGHT_PANEL_KINDS = ["plan", "diff", "files", "file", "preview", "terminal"] as const; export type RightPanelKind = (typeof RIGHT_PANEL_KINDS)[number]; export type RightPanelSurface = @@ -29,10 +29,12 @@ export type RightPanelSurface = splitDirection?: "horizontal" | "vertical"; } | { id: "diff"; kind: "diff" } + | { id: "files"; kind: "files" } + | { id: `file:${string}`; kind: "file"; relativePath: string } | { id: "plan"; kind: "plan" }; const RIGHT_PANEL_STORAGE_KEY = "t3code:right-panel-state:v2"; -const RIGHT_PANEL_STORAGE_VERSION = 5; +const RIGHT_PANEL_STORAGE_VERSION = 6; export interface ThreadRightPanelState { isOpen: boolean; @@ -42,8 +44,9 @@ export interface ThreadRightPanelState { interface RightPanelStoreState { byThreadKey: Record; - open: (ref: ScopedThreadRef, kind: Exclude) => void; + open: (ref: ScopedThreadRef, kind: Exclude) => void; openBrowser: (ref: ScopedThreadRef, tabId: string | null) => void; + openFile: (ref: ScopedThreadRef, relativePath: string) => void; openTerminal: (ref: ScopedThreadRef, terminalId: string) => void; splitTerminal: ( ref: ScopedThreadRef, @@ -56,10 +59,11 @@ interface RightPanelStoreState { activateSurface: (ref: ScopedThreadRef, surfaceId: string) => void; closeSurface: (ref: ScopedThreadRef, surfaceId: string) => void; reconcileBrowserSurfaces: (ref: ScopedThreadRef, tabIds: readonly string[]) => void; + reconcileFileSurfaces: (ref: ScopedThreadRef, workspaceAvailable: boolean) => void; show: (ref: ScopedThreadRef) => void; close: (ref: ScopedThreadRef) => void; toggleVisibility: (ref: ScopedThreadRef) => void; - toggle: (ref: ScopedThreadRef, kind: Exclude) => void; + toggle: (ref: ScopedThreadRef, kind: Exclude) => void; removeThread: (ref: ScopedThreadRef) => void; } @@ -70,11 +74,13 @@ const EMPTY_THREAD_STATE: ThreadRightPanelState = { }; const singletonSurface = ( - kind: Exclude, + kind: Exclude, ): RightPanelSurface => { switch (kind) { case "diff": return { id: "diff", kind }; + case "files": + return { id: "files", kind }; case "plan": return { id: "plan", kind }; } @@ -85,6 +91,12 @@ const browserSurface = (tabId: string | null): RightPanelSurface => ? { id: `browser:${tabId}`, kind: "preview", resourceId: tabId } : { id: "browser:new", kind: "preview", resourceId: null }; +const fileSurface = (relativePath: string): RightPanelSurface => ({ + id: `file:${relativePath}`, + kind: "file", + relativePath, +}); + const terminalSurface = (terminalId: string): RightPanelSurface => ({ id: `terminal:${terminalId}`, kind: "terminal", @@ -213,6 +225,18 @@ export const useRightPanelStore = create()( return upsertSurface({ ...current, surfaces: withoutPlaceholder }, surface); }), })), + openFile: (ref, relativePath) => + set((state) => ({ + byThreadKey: updateThread(state.byThreadKey, scopedThreadKey(ref), (current) => { + const withoutStandaloneExplorer = current.surfaces.filter( + (surface) => surface.kind !== "files", + ); + return upsertSurface( + { ...current, surfaces: withoutStandaloneExplorer }, + fileSurface(relativePath), + ); + }), + })), openTerminal: (ref, terminalId) => set((state) => ({ byThreadKey: updateThread(state.byThreadKey, scopedThreadKey(ref), (current) => @@ -339,6 +363,27 @@ export const useRightPanelStore = create()( }; }), })), + reconcileFileSurfaces: (ref, workspaceAvailable) => + set((state) => ({ + byThreadKey: updateThread(state.byThreadKey, scopedThreadKey(ref), (current) => { + if (workspaceAvailable) return current; + const surfaces = current.surfaces.filter( + (surface) => surface.kind !== "files" && surface.kind !== "file", + ); + if (surfaces.length === current.surfaces.length) return current; + const activeStillExists = surfaces.some( + (surface) => surface.id === current.activeSurfaceId, + ); + return { + ...current, + isOpen: surfaces.length > 0 ? current.isOpen : false, + surfaces, + activeSurfaceId: activeStillExists + ? current.activeSurfaceId + : (surfaces.at(-1)?.id ?? null), + }; + }), + })), show: (ref) => set((state) => ({ byThreadKey: updateThread(state.byThreadKey, scopedThreadKey(ref), (current) => diff --git a/apps/web/src/vite-env.d.ts b/apps/web/src/vite-env.d.ts index 0c06dbb9dd..d8a6d71b49 100644 --- a/apps/web/src/vite-env.d.ts +++ b/apps/web/src/vite-env.d.ts @@ -9,6 +9,9 @@ interface ImportMetaEnv { readonly VITE_HOSTED_APP_CHANNEL: string; readonly VITE_CLERK_PUBLISHABLE_KEY: string; readonly VITE_CLERK_JWT_TEMPLATE: string; + readonly VITE_RELAY_OTLP_TRACES_URL: string; + readonly VITE_RELAY_OTLP_TRACES_DATASET: string; + readonly VITE_RELAY_OTLP_TRACES_TOKEN: string; readonly APP_VERSION: string; } diff --git a/apps/web/src/vscode-icons-language-associations.json b/apps/web/src/vscode-icons-language-associations.json deleted file mode 100644 index a2c891dcf2..0000000000 --- a/apps/web/src/vscode-icons-language-associations.json +++ /dev/null @@ -1,481 +0,0 @@ -{ - "version": "12.17.0", - "source": "https://raw.githubusercontent.com/vscode-icons/vscode-icons/v12.17.0/src/iconsManifest/languages.ts", - "generatedAt": "2026-02-17T20:03:11.362Z", - "extensionToLanguageId": { - "as": "actionscript", - "ada": "ada", - "prw": "advpl", - "affect": "affectscript", - "agda": "agda", - "al": "al", - "alloy": "alloy", - "ansible": "ansible", - "g4": "antlr", - "any": "anyscript", - "htaccess": "apacheconf", - "cls": "apex", - "apib": "apiblueprint", - "apl": "apl", - "applescript": "applescript", - "adoc": "asciidoc", - "asp": "asp", - "asm": "arm", - "astro": "astro", - "ats": "ats", - "ahk": "ahk", - "au3": "autoit", - "am": "automake", - "avcs": "avro", - "azcli": "azcli", - "azure-pipelines.yml": "azure-pipelines", - "bal": "ballerina", - "bat": "bat", - "bats": "bats", - "bzl": "bazel", - "bf": "befunge", - "bicep": "bicep", - "bib": "bibtex", - "biml": "biml", - "bin": "code-text-binary", - "rast": "biome_syntax_tree", - "blade.php": "blade", - "blitzbasic": "blitzbasic", - "bolt": "bolt", - "bsq": "bosque", - "bru": "bruno", - "buf.yaml": "buf", - "lockb": "bun.lockb", - "c": "c", - "c3": "c3", - "cal": "c-al", - "cabal": "cabal", - "capnp": "capnp", - "casc": "casc", - "cddl": "cddl", - "ceylon": "ceylon", - "cfc": "cfc", - "cfm": "cfmhtml", - "circom": "circom", - "clojure": "clojure", - "clojurescript": "clojurescript", - "yml": "manifest-yaml", - "cmake": "cmake", - "cbl": "cobol", - "ql": "ql", - "coffee": "coffeescript", - "cfml": "cfml", - "confluence": "confluence", - "ckbk": "cookbook", - "instructions.md": "instructions", - "cpp": "cpp", - "cr": "crystal", - "cs": "csharp", - "css": "css", - "wxss": "css", - "acss": "css", - "mcss": "css", - "pcss": "css", - "postcss": "css", - "nss": "css", - "ccss": "css", - "less": "css", - "scss": "css", - "sass": "css", - "csv": "csv", - "feature": "cucumber", - "cu": "cuda", - "cypher": "cypher", - "pyx": "cython", - "dal": "dal", - "dart": "dart", - "dhall": "dhall", - "html": "django-html", - "diff": "diff", - "d": "d", - "hcl": "dockerbake", - "dtx": "doctex", - "env": "dotenv", - "dot": "dotjs", - "dox": "doxygen", - "drawio": "drawio", - "drl": "drools", - "dtd": "dtd", - "dust": "dustjs", - "dylan": "dylan", - "earthfile": "earthfile", - "edge": "edge", - "eex": "eex", - "es": "es", - "ex": "elixir", - "elm": "elm", - "erb": "erb", - "erl": "erlang", - "yaml": "esphome", - "xlsx": "excel", - "falcon": "falcon", - "fql": "fql", - "f": "fortran", - "ftl": "ftl", - "fs": "fsharp", - "fthtml": "fthtml", - "gspec": "galen", - "gml": "gml-gms", - "gcode": "gcode", - "gen": "genstat", - "git": "git-commit", - "gleam": "gleam", - "gjs": "glimmer-js", - "glsl": "glsl", - "glyphs": "glyphs", - "gp": "gnuplot", - "go": "go", - "mod": "go.mod", - "work": "go.work", - "api": "goctl", - "gd": "gdscript", - "gradle.kts": "gradle-kotlin-dsl", - "gr": "grain", - "gql": "graphql", - "gv": "dot", - "grit": "grit", - "groovy": "groovy", - "haml": "haml", - "hbs": "handlebars", - "prg": "harbour", - "hs": "haskell", - "haxe": "haxe", - "helm.tpl": "helm", - "hjson": "hjson", - "hlsl": "hlsl", - "hosts": "hosts", - "http": "http", - "aff": "hunspell.aff", - "hy": "hy", - "hypr": "hypr", - "icl": "icl", - "imba": "imba", - "4gl": "4GL", - "ini": "ini", - "ink": "ink", - "iss": "innosetup", - "io": "io", - "janet": "janet", - "java": "java", - "js": "javascript", - "mjs": "javascript", - "cjs": "javascript", - "es6": "javascript", - "jake": "javascript", - "jsm": "javascript", - "jsx": "javascript", - "njs": "javascript", - "pac": "javascript", - "sjs": "javascript", - "ssjs": "javascript", - "xsjs": "javascript", - "xsjslib": "javascript", - "jekyll": "jekyll", - "jenkins": "jenkins", - "jest-snap": "jest-snapshot", - "jinja": "jinja", - "json": "json", - "jsonc": "jsonc", - "jsonl": "jsonl", - "jsonnet": "jsonnet", - "json5": "json5", - "jl": "julia", - "id": "iodine", - "k": "k", - "kv": "kivy", - "ks": "kos", - "kt": "kotlin", - "kusto": "kusto", - "tex": "latex", - "lark": "lark", - "lat": "latino", - "lean": "lean4", - "flex": "lex", - "ly": "lilypond", - "lisp": "lisp", - "lhs": "literate haskell", - "log": "log", - "lol": "lolcode", - "lsl": "lsl", - "lua": "lua", - "m4": "m4", - "mk": "makefile", - "md": "markdown", - "markdown": "markdown", - "mdown": "markdown", - "mkd": "markdown", - "marko": "marko", - "mat": "matlab", - "ms": "maxscript", - "mdx": "mdx", - "mediawiki": "mediawiki", - "mel": "mel", - "mmd": "mermaid", - "metal": "metal", - "mcfunction": "bc-mcfunction", - "mjml": "mjml", - "pq": "powerquery", - "mojo": "mojo", - "ep": "mojolicious", - "mongo": "mongo", - "mson": "mson", - "mv": "mv", - "mvt": "mvt", - "ne": "nearley", - "nginx": "nginx", - "nim": "nim", - "nimble": "nimble", - "nix": "nix", - "nsi": "nsis", - "nunjucks": "nunjucks", - "nu": "nushell", - "m": "objective-c", - "mm": "objective-cpp", - "ml": "ocaml", - "o3": "ogone", - "w": "abl", - "things": "openhab", - "org": "org", - "pas": "pascal", - "pddl": "pddl", - "plan": "plan", - "happenings": "happenings", - "pl": "perl", - "pl6": "perl6", - "pgsql": "pgsql", - "php": "php", - "php4": "php", - "php5": "php", - "php7": "php", - "phtml": "php", - "phps": "php", - "phpt": "php", - "phar": "php", - "aw": "php", - "ctp": "php", - "inc": "php", - "php3": "php", - "php8": "php", - "module": "php", - "theme": "php", - "tpl": "php", - "pine": "pine", - "txt": "plaintext", - "dbgasm": "platformio-debug.disassembly", - "ddl": "plsql", - "po": "po", - "dib": "polyglot-notebook", - "polymer": "polymer", - "pony": "pony", - "ps": "postscript", - "ps1": "powershell", - "prisma": "prisma", - "pde": "pde", - "pro": "prolog", - "rules": "prometheus", - "properties": "java-properties", - "proto": "proto3", - "pug": "jade", - "pp": "puppet", - "purs": "purescript", - "arr": "pyret", - "pyscript": "pyscript", - "py": "python", - "pyi": "python", - "pyw": "python", - "pyc": "python", - "pyd": "python", - "pyo": "python", - "pxd": "python", - "pxi": "python", - "rpy": "python", - "cpy": "python", - "ipy": "python", - "pyowo": "pythowo", - "qvs": "qlik", - "qml": "qml", - "qs": "qsharp", - "r": "r", - "rkt": "racket", - "raku": "raku", - "cshtml": "razor", - "raml": "raml", - "re": "reason", - "red": "red", - "res": "rescript", - "rst": "restructuredtext", - "rex": "rexx", - "tag": "riot", - "ripple": "ripple", - "rmd": "rmd", - "rnc": "rnc", - "robot": "robot", - "rb": "ruby", - "rbw": "ruby", - "rake": "ruby", - "gemspec": "ruby", - "ru": "ruby", - "rjs": "ruby", - "rxml": "ruby", - "rsel": "ruby", - "builder": "ruby", - "jbuilder": "ruby", - "rabl": "ruby", - "prawn": "ruby", - "thor": "ruby", - "rs": "rust", - "sl": "s-lang", - "san": "san", - "sas": "SAS", - "sbt": "sbt", - "scad": "scad", - "scala": "scala", - "sce": "scilab", - "sdl": "sdl", - "code-search": "search-result", - "shader": "shaderlab", - "sh": "shellscript", - "bash": "shellscript", - "zsh": "shellscript", - "ksh": "shellscript", - "fish": "shellscript", - "slang": "slang", - "ice": "slice", - "slim": "slim", - "slint": "slint", - "sln": "sln", - "ss": "silverstripe", - "sn": "sino", - "eskip": "eskip", - "smk": "snakemake", - "code-snippets": "snippets", - "snort": "snort", - "sol": "solidity", - "rq": "sparql", - "sqf": "sqf", - "sql": "sql", - "nut": "squirrel", - "stan": "stan", - "bazel": "starlark", - "do": "stata", - "stencil": "stencil", - "html.stencil": "stencil-html", - "st.css": "stylable", - "styled": "source.css.styled", - "styl": "stylus", - "svelte": "svelte", - "svg": "svg", - "swagger": "Swagger", - "swift": "swift", - "swig": "swig", - "link": "systemd-conf", - "sv": "systemverilog", - "tt": "t4", - "teal": "teal", - "templ": "templ", - "tt3": "tt", - "tera": "tera", - "tf": "terraform", - "sty": "tex", - "textile": "textile", - "json-tmlanguage": "json-tmlanguage", - "yaml-tmlanguage": "yaml-tmlanguage", - "toit": "toit", - "toml": "toml", - "toon": "toon", - "ttcn3": "ttcn", - "tuc": "tuc", - "twig": "twig", - "ts": "typescript", - "mts": "typescript", - "cts": "typescript", - "tsx": "typescriptreact", - "typoscript": "typoscript", - "ua": "uiua", - "u": "unison", - "vb": "vb", - "wsf": "vbscript", - "vm": "velocity", - "vto": "vento", - "v": "verilog", - "vhdl": "vhdl", - "vim": "viml", - "vitest-snap": "vitest-snapshot", - "volt": "volt", - "vroom": "vroom", - "vue": "vue", - "vue2": "vue", - "vue3": "vue", - "vues": "vue", - "vuex": "vue", - "vuerc": "vue", - "vy": "vyper", - "wai": "wai", - "wasm": "wasm", - "wat": "wasm", - "wast": "wasm", - "wsm": "wasm", - "wast.js": "wasm", - "wit": "wasm", - "witx": "wasm", - "wy": "wenyan", - "wgsl": "wgsl", - "wt": "wikitext", - "wl": "wolfram", - "wurst": "wurstlang", - "xcompose": "xcompose", - "xmake.lua": "xmake", - "xml": "xml", - "xquery": "xquery", - "xsl": "xsl", - "bison": "yacc", - "yang": "yang", - "zig": "zig", - "zip": "zip" - }, - "fileNameToLanguageId": { - "browserslist": "browserslist", - ".browserslistrc": "browserslist", - "caddyfile": "caddyfile", - "cmakelists.txt": "cmake", - "cmakecache.txt": "cmake-cache", - "docker-compose.yml": "dockercompose", - "docker-compose.yaml": "dockercompose", - "compose.yaml": "dockercompose", - "compose.yml": "dockercompose", - "dockerfile": "dockerfile", - "dockerfile.dev": "dockerfile", - "dockerfile.prod": "dockerfile", - "dockerfile.test": "dockerfile", - ".editorconfig": "editorconfig", - "justfile": "just", - "meson.build": "meson", - ".php-version": "php", - "artisan": "php", - "requirements.txt": "pip-requirements", - "requirements-dev.txt": "pip-requirements", - "requirements-test.txt": "pip-requirements", - "requirements-prod.txt": "pip-requirements", - "setup.py": "python", - "setup.cfg": "python", - ".python-version": "python", - "pipfile": "python", - "pipfile.lock": "python", - "robots.txt": "robots-txt", - "config.ru": "ruby", - ".bashrc": "shellscript", - ".zshrc": "shellscript", - ".profile": "shellscript", - ".bash_profile": "shellscript", - ".bash_aliases": "shellscript", - ".zprofile": "shellscript", - "tiltfile": "tiltfile", - ".vue-cli-rc": "vue", - "yarn.lock": "yarnlock" - } -} diff --git a/apps/web/src/vscode-icons-manifest.json b/apps/web/src/vscode-icons-manifest.json deleted file mode 100644 index a70a70edf6..0000000000 --- a/apps/web/src/vscode-icons-manifest.json +++ /dev/null @@ -1,8351 +0,0 @@ -{ - "iconDefinitions": { - "_file": { "iconPath": "../../icons/default_file.svg" }, - "_folder": { "iconPath": "../../icons/default_folder.svg" }, - "_folder_open": { "iconPath": "../../icons/default_folder_opened.svg" }, - "_root_folder": { "iconPath": "../../icons/default_root_folder.svg" }, - "_root_folder_open": { "iconPath": "../../icons/default_root_folder_opened.svg" }, - "_file_light": { "iconPath": "" }, - "_folder_light": { "iconPath": "" }, - "_folder_light_open": { "iconPath": "" }, - "_root_folder_light": { "iconPath": "" }, - "_root_folder_light_open": { "iconPath": "" }, - "_fd_android": { "iconPath": "../../icons/folder_type_android.svg" }, - "_fd_android_open": { "iconPath": "../../icons/folder_type_android_opened.svg" }, - "_fd_angular": { "iconPath": "../../icons/folder_type_angular.svg" }, - "_fd_angular_open": { "iconPath": "../../icons/folder_type_angular_opened.svg" }, - "_fd_apache": { "iconPath": "../../icons/folder_type_apache.svg" }, - "_fd_apache_open": { "iconPath": "../../icons/folder_type_apache_opened.svg" }, - "_fd_api": { "iconPath": "../../icons/folder_type_api.svg" }, - "_fd_api_open": { "iconPath": "../../icons/folder_type_api_opened.svg" }, - "_fd_app": { "iconPath": "../../icons/folder_type_app.svg" }, - "_fd_app_open": { "iconPath": "../../icons/folder_type_app_opened.svg" }, - "_fd_arangodb": { "iconPath": "../../icons/folder_type_arangodb.svg" }, - "_fd_arangodb_open": { "iconPath": "../../icons/folder_type_arangodb_opened.svg" }, - "_fd_asset": { "iconPath": "../../icons/folder_type_asset.svg" }, - "_fd_asset_open": { "iconPath": "../../icons/folder_type_asset_opened.svg" }, - "_fd_astro": { "iconPath": "../../icons/folder_type_astro.svg" }, - "_fd_astro_open": { "iconPath": "../../icons/folder_type_astro_opened.svg" }, - "_fd_audio": { "iconPath": "../../icons/folder_type_audio.svg" }, - "_fd_audio_open": { "iconPath": "../../icons/folder_type_audio_opened.svg" }, - "_fd_aurelia": { "iconPath": "../../icons/folder_type_aurelia.svg" }, - "_fd_aurelia_open": { "iconPath": "../../icons/folder_type_aurelia_opened.svg" }, - "_fd_aws": { "iconPath": "../../icons/folder_type_aws.svg" }, - "_fd_aws_open": { "iconPath": "../../icons/folder_type_aws_opened.svg" }, - "_fd_azure": { "iconPath": "../../icons/folder_type_azure.svg" }, - "_fd_azure_open": { "iconPath": "../../icons/folder_type_azure_opened.svg" }, - "_fd_azurepipelines": { "iconPath": "../../icons/folder_type_azurepipelines.svg" }, - "_fd_azurepipelines_open": { "iconPath": "../../icons/folder_type_azurepipelines_opened.svg" }, - "_fd_binary": { "iconPath": "../../icons/folder_type_binary.svg" }, - "_fd_binary_open": { "iconPath": "../../icons/folder_type_binary_opened.svg" }, - "_fd_bloc": { "iconPath": "../../icons/folder_type_bloc.svg" }, - "_fd_bloc_open": { "iconPath": "../../icons/folder_type_bloc_opened.svg" }, - "_fd_blueprint": { "iconPath": "../../icons/folder_type_blueprint.svg" }, - "_fd_blueprint_open": { "iconPath": "../../icons/folder_type_blueprint_opened.svg" }, - "_fd_bot": { "iconPath": "../../icons/folder_type_bot.svg" }, - "_fd_bot_open": { "iconPath": "../../icons/folder_type_bot_opened.svg" }, - "_fd_bower": { "iconPath": "../../icons/folder_type_bower.svg" }, - "_fd_bower_open": { "iconPath": "../../icons/folder_type_bower_opened.svg" }, - "_fd_buildkite": { "iconPath": "../../icons/folder_type_buildkite.svg" }, - "_fd_buildkite_open": { "iconPath": "../../icons/folder_type_buildkite_opened.svg" }, - "_fd_cake": { "iconPath": "../../icons/folder_type_cake.svg" }, - "_fd_cake_open": { "iconPath": "../../icons/folder_type_cake_opened.svg" }, - "_fd_cargo": { "iconPath": "../../icons/folder_type_cargo.svg" }, - "_fd_cargo_open": { "iconPath": "../../icons/folder_type_cargo_opened.svg" }, - "_fd_certificate": { "iconPath": "../../icons/folder_type_certificate.svg" }, - "_fd_certificate_open": { "iconPath": "../../icons/folder_type_certificate_opened.svg" }, - "_fd_changesets": { "iconPath": "../../icons/folder_type_changesets.svg" }, - "_fd_changesets_open": { "iconPath": "../../icons/folder_type_changesets_opened.svg" }, - "_fd_chef": { "iconPath": "../../icons/folder_type_chef.svg" }, - "_fd_chef_open": { "iconPath": "../../icons/folder_type_chef_opened.svg" }, - "_fd_circleci": { "iconPath": "../../icons/folder_type_circleci.svg" }, - "_fd_circleci_open": { "iconPath": "../../icons/folder_type_circleci_opened.svg" }, - "_fd_claude": { "iconPath": "../../icons/folder_type_claude.svg" }, - "_fd_claude_open": { "iconPath": "../../icons/folder_type_claude_opened.svg" }, - "_fd_cli": { "iconPath": "../../icons/folder_type_cli.svg" }, - "_fd_cli_open": { "iconPath": "../../icons/folder_type_cli_opened.svg" }, - "_fd_client": { "iconPath": "../../icons/folder_type_client.svg" }, - "_fd_client_open": { "iconPath": "../../icons/folder_type_client_opened.svg" }, - "_fd_cloudflare": { "iconPath": "../../icons/folder_type_cloudflare.svg" }, - "_fd_cloudflare_open": { "iconPath": "../../icons/folder_type_cloudflare_opened.svg" }, - "_fd_cmake": { "iconPath": "../../icons/folder_type_cmake.svg" }, - "_fd_cmake_open": { "iconPath": "../../icons/folder_type_cmake_opened.svg" }, - "_fd_common": { "iconPath": "../../icons/folder_type_common.svg" }, - "_fd_common_open": { "iconPath": "../../icons/folder_type_common_opened.svg" }, - "_fd_component": { "iconPath": "../../icons/folder_type_component.svg" }, - "_fd_component_open": { "iconPath": "../../icons/folder_type_component_opened.svg" }, - "_fd_composer": { "iconPath": "../../icons/folder_type_composer.svg" }, - "_fd_composer_open": { "iconPath": "../../icons/folder_type_composer_opened.svg" }, - "_fd_config": { "iconPath": "../../icons/folder_type_config.svg" }, - "_fd_config_open": { "iconPath": "../../icons/folder_type_config_opened.svg" }, - "_fd_controller": { "iconPath": "../../icons/folder_type_controller.svg" }, - "_fd_controller_open": { "iconPath": "../../icons/folder_type_controller_opened.svg" }, - "_fd_coverage": { "iconPath": "../../icons/folder_type_coverage.svg" }, - "_fd_coverage_open": { "iconPath": "../../icons/folder_type_coverage_opened.svg" }, - "_fd_css": { "iconPath": "../../icons/folder_type_css.svg" }, - "_fd_css_open": { "iconPath": "../../icons/folder_type_css_opened.svg" }, - "_fd_cubit": { "iconPath": "../../icons/folder_type_cubit.svg" }, - "_fd_cubit_open": { "iconPath": "../../icons/folder_type_cubit_opened.svg" }, - "_fd_cursor": { "iconPath": "../../icons/folder_type_cursor.svg" }, - "_fd_cursor_open": { "iconPath": "../../icons/folder_type_cursor_opened.svg" }, - "_fd_light_cursor": { "iconPath": "../../icons/folder_type_light_cursor.svg" }, - "_fd_light_cursor_open": { "iconPath": "../../icons/folder_type_light_cursor_opened.svg" }, - "_fd_cypress": { "iconPath": "../../icons/folder_type_cypress.svg" }, - "_fd_cypress_open": { "iconPath": "../../icons/folder_type_cypress_opened.svg" }, - "_fd_light_cypress": { "iconPath": "../../icons/folder_type_light_cypress.svg" }, - "_fd_light_cypress_open": { "iconPath": "../../icons/folder_type_light_cypress_opened.svg" }, - "_fd_dapr": { "iconPath": "../../icons/folder_type_dapr.svg" }, - "_fd_dapr_open": { "iconPath": "../../icons/folder_type_dapr_opened.svg" }, - "_fd_dart": { "iconPath": "../../icons/folder_type_dart.svg" }, - "_fd_dart_open": { "iconPath": "../../icons/folder_type_dart_opened.svg" }, - "_fd_datadog": { "iconPath": "../../icons/folder_type_datadog.svg" }, - "_fd_datadog_open": { "iconPath": "../../icons/folder_type_datadog_opened.svg" }, - "_fd_db": { "iconPath": "../../icons/folder_type_db.svg" }, - "_fd_db_open": { "iconPath": "../../icons/folder_type_db_opened.svg" }, - "_fd_debian": { "iconPath": "../../icons/folder_type_debian.svg" }, - "_fd_debian_open": { "iconPath": "../../icons/folder_type_debian_opened.svg" }, - "_fd_dependabot": { "iconPath": "../../icons/folder_type_dependabot.svg" }, - "_fd_dependabot_open": { "iconPath": "../../icons/folder_type_dependabot_opened.svg" }, - "_fd_devcontainer": { "iconPath": "../../icons/folder_type_devcontainer.svg" }, - "_fd_devcontainer_open": { "iconPath": "../../icons/folder_type_devcontainer_opened.svg" }, - "_fd_dist": { "iconPath": "../../icons/folder_type_dist.svg" }, - "_fd_dist_open": { "iconPath": "../../icons/folder_type_dist_opened.svg" }, - "_fd_docker": { "iconPath": "../../icons/folder_type_docker.svg" }, - "_fd_docker_open": { "iconPath": "../../icons/folder_type_docker_opened.svg" }, - "_fd_docs": { "iconPath": "../../icons/folder_type_docs.svg" }, - "_fd_docs_open": { "iconPath": "../../icons/folder_type_docs_opened.svg" }, - "_fd_e2e": { "iconPath": "../../icons/folder_type_e2e.svg" }, - "_fd_e2e_open": { "iconPath": "../../icons/folder_type_e2e_opened.svg" }, - "_fd_elasticbeanstalk": { "iconPath": "../../icons/folder_type_elasticbeanstalk.svg" }, - "_fd_elasticbeanstalk_open": { - "iconPath": "../../icons/folder_type_elasticbeanstalk_opened.svg" - }, - "_fd_electron": { "iconPath": "../../icons/folder_type_electron.svg" }, - "_fd_electron_open": { "iconPath": "../../icons/folder_type_electron_opened.svg" }, - "_fd_light_electron": { "iconPath": "../../icons/folder_type_light_electron.svg" }, - "_fd_light_electron_open": { "iconPath": "../../icons/folder_type_light_electron_opened.svg" }, - "_fd_expo": { "iconPath": "../../icons/folder_type_expo.svg" }, - "_fd_expo_open": { "iconPath": "../../icons/folder_type_expo_opened.svg" }, - "_fd_light_expo": { "iconPath": "../../icons/folder_type_light_expo.svg" }, - "_fd_light_expo_open": { "iconPath": "../../icons/folder_type_light_expo_opened.svg" }, - "_fd_favicon": { "iconPath": "../../icons/folder_type_favicon.svg" }, - "_fd_favicon_open": { "iconPath": "../../icons/folder_type_favicon_opened.svg" }, - "_fd_flow": { "iconPath": "../../icons/folder_type_flow.svg" }, - "_fd_flow_open": { "iconPath": "../../icons/folder_type_flow_opened.svg" }, - "_fd_flutter": { "iconPath": "../../icons/folder_type_flutter.svg" }, - "_fd_flutter_open": { "iconPath": "../../icons/folder_type_flutter_opened.svg" }, - "_fd_fonts": { "iconPath": "../../icons/folder_type_fonts.svg" }, - "_fd_fonts_open": { "iconPath": "../../icons/folder_type_fonts_opened.svg" }, - "_fd_light_fonts": { "iconPath": "../../icons/folder_type_light_fonts.svg" }, - "_fd_light_fonts_open": { "iconPath": "../../icons/folder_type_light_fonts_opened.svg" }, - "_fd_frontcommerce": { "iconPath": "../../icons/folder_type_frontcommerce.svg" }, - "_fd_frontcommerce_open": { "iconPath": "../../icons/folder_type_frontcommerce_opened.svg" }, - "_fd_gcp": { "iconPath": "../../icons/folder_type_gcp.svg" }, - "_fd_gcp_open": { "iconPath": "../../icons/folder_type_gcp_opened.svg" }, - "_fd_gemini": { "iconPath": "../../icons/folder_type_gemini.svg" }, - "_fd_gemini_open": { "iconPath": "../../icons/folder_type_gemini_opened.svg" }, - "_fd_git": { "iconPath": "../../icons/folder_type_git.svg" }, - "_fd_git_open": { "iconPath": "../../icons/folder_type_git_opened.svg" }, - "_fd_github": { "iconPath": "../../icons/folder_type_github.svg" }, - "_fd_github_open": { "iconPath": "../../icons/folder_type_github_opened.svg" }, - "_fd_gitlab": { "iconPath": "../../icons/folder_type_gitlab.svg" }, - "_fd_gitlab_open": { "iconPath": "../../icons/folder_type_gitlab_opened.svg" }, - "_fd_godot": { "iconPath": "../../icons/folder_type_godot.svg" }, - "_fd_godot_open": { "iconPath": "../../icons/folder_type_godot_opened.svg" }, - "_fd_gradle": { "iconPath": "../../icons/folder_type_gradle.svg" }, - "_fd_gradle_open": { "iconPath": "../../icons/folder_type_gradle_opened.svg" }, - "_fd_light_gradle": { "iconPath": "../../icons/folder_type_light_gradle.svg" }, - "_fd_light_gradle_open": { "iconPath": "../../icons/folder_type_light_gradle_opened.svg" }, - "_fd_graphql": { "iconPath": "../../icons/folder_type_graphql.svg" }, - "_fd_graphql_open": { "iconPath": "../../icons/folder_type_graphql_opened.svg" }, - "_fd_grunt": { "iconPath": "../../icons/folder_type_grunt.svg" }, - "_fd_grunt_open": { "iconPath": "../../icons/folder_type_grunt_opened.svg" }, - "_fd_gulp": { "iconPath": "../../icons/folder_type_gulp.svg" }, - "_fd_gulp_open": { "iconPath": "../../icons/folder_type_gulp_opened.svg" }, - "_fd_haxelib": { "iconPath": "../../icons/folder_type_haxelib.svg" }, - "_fd_haxelib_open": { "iconPath": "../../icons/folder_type_haxelib_opened.svg" }, - "_fd_helper": { "iconPath": "../../icons/folder_type_helper.svg" }, - "_fd_helper_open": { "iconPath": "../../icons/folder_type_helper_opened.svg" }, - "_fd_histoire": { "iconPath": "../../icons/folder_type_histoire.svg" }, - "_fd_histoire_open": { "iconPath": "../../icons/folder_type_histoire_opened.svg" }, - "_fd_hook": { "iconPath": "../../icons/folder_type_hook.svg" }, - "_fd_hook_open": { "iconPath": "../../icons/folder_type_hook_opened.svg" }, - "_fd_husky": { "iconPath": "../../icons/folder_type_husky.svg" }, - "_fd_husky_open": { "iconPath": "../../icons/folder_type_husky_opened.svg" }, - "_fd_idea": { "iconPath": "../../icons/folder_type_idea.svg" }, - "_fd_idea_open": { "iconPath": "../../icons/folder_type_idea_opened.svg" }, - "_fd_images": { "iconPath": "../../icons/folder_type_images.svg" }, - "_fd_images_open": { "iconPath": "../../icons/folder_type_images_opened.svg" }, - "_fd_include": { "iconPath": "../../icons/folder_type_include.svg" }, - "_fd_include_open": { "iconPath": "../../icons/folder_type_include_opened.svg" }, - "_fd_interfaces": { "iconPath": "../../icons/folder_type_interfaces.svg" }, - "_fd_interfaces_open": { "iconPath": "../../icons/folder_type_interfaces_opened.svg" }, - "_fd_ios": { "iconPath": "../../icons/folder_type_ios.svg" }, - "_fd_ios_open": { "iconPath": "../../icons/folder_type_ios_opened.svg" }, - "_fd_js": { "iconPath": "../../icons/folder_type_js.svg" }, - "_fd_js_open": { "iconPath": "../../icons/folder_type_js_opened.svg" }, - "_fd_json": { "iconPath": "../../icons/folder_type_json.svg" }, - "_fd_json_open": { "iconPath": "../../icons/folder_type_json_opened.svg" }, - "_fd_junie": { "iconPath": "../../icons/folder_type_junie.svg" }, - "_fd_junie_open": { "iconPath": "../../icons/folder_type_junie_opened.svg" }, - "_fd_kotlin": { "iconPath": "../../icons/folder_type_kotlin.svg" }, - "_fd_kotlin_open": { "iconPath": "../../icons/folder_type_kotlin_opened.svg" }, - "_fd_kubernetes": { "iconPath": "../../icons/folder_type_kubernetes.svg" }, - "_fd_kubernetes_open": { "iconPath": "../../icons/folder_type_kubernetes_opened.svg" }, - "_fd_less": { "iconPath": "../../icons/folder_type_less.svg" }, - "_fd_less_open": { "iconPath": "../../icons/folder_type_less_opened.svg" }, - "_fd_library": { "iconPath": "../../icons/folder_type_library.svg" }, - "_fd_library_open": { "iconPath": "../../icons/folder_type_library_opened.svg" }, - "_fd_linux": { "iconPath": "../../icons/folder_type_linux.svg" }, - "_fd_linux_open": { "iconPath": "../../icons/folder_type_linux_opened.svg" }, - "_fd_locale": { "iconPath": "../../icons/folder_type_locale.svg" }, - "_fd_locale_open": { "iconPath": "../../icons/folder_type_locale_opened.svg" }, - "_fd_log": { "iconPath": "../../icons/folder_type_log.svg" }, - "_fd_log_open": { "iconPath": "../../icons/folder_type_log_opened.svg" }, - "_fd_macos": { "iconPath": "../../icons/folder_type_macos.svg" }, - "_fd_macos_open": { "iconPath": "../../icons/folder_type_macos_opened.svg" }, - "_fd_mariadb": { "iconPath": "../../icons/folder_type_mariadb.svg" }, - "_fd_mariadb_open": { "iconPath": "../../icons/folder_type_mariadb_opened.svg" }, - "_fd_maven": { "iconPath": "../../icons/folder_type_maven.svg" }, - "_fd_maven_open": { "iconPath": "../../icons/folder_type_maven_opened.svg" }, - "_fd_mediawiki": { "iconPath": "../../icons/folder_type_mediawiki.svg" }, - "_fd_mediawiki_open": { "iconPath": "../../icons/folder_type_mediawiki_opened.svg" }, - "_fd_memcached": { "iconPath": "../../icons/folder_type_memcached.svg" }, - "_fd_memcached_open": { "iconPath": "../../icons/folder_type_memcached_opened.svg" }, - "_fd_meteor": { "iconPath": "../../icons/folder_type_meteor.svg" }, - "_fd_meteor_open": { "iconPath": "../../icons/folder_type_meteor_opened.svg" }, - "_fd_light_meteor": { "iconPath": "../../icons/folder_type_light_meteor.svg" }, - "_fd_light_meteor_open": { "iconPath": "../../icons/folder_type_light_meteor_opened.svg" }, - "_fd_middleware": { "iconPath": "../../icons/folder_type_middleware.svg" }, - "_fd_middleware_open": { "iconPath": "../../icons/folder_type_middleware_opened.svg" }, - "_fd_minecraft": { "iconPath": "../../icons/folder_type_minecraft.svg" }, - "_fd_minecraft_open": { "iconPath": "../../icons/folder_type_minecraft_opened.svg" }, - "_fd_minikube": { "iconPath": "../../icons/folder_type_minikube.svg" }, - "_fd_minikube_open": { "iconPath": "../../icons/folder_type_minikube_opened.svg" }, - "_fd_mjml": { "iconPath": "../../icons/folder_type_mjml.svg" }, - "_fd_mjml_open": { "iconPath": "../../icons/folder_type_mjml_opened.svg" }, - "_fd_mock": { "iconPath": "../../icons/folder_type_mock.svg" }, - "_fd_mock_open": { "iconPath": "../../icons/folder_type_mock_opened.svg" }, - "_fd_model": { "iconPath": "../../icons/folder_type_model.svg" }, - "_fd_model_open": { "iconPath": "../../icons/folder_type_model_opened.svg" }, - "_fd_module": { "iconPath": "../../icons/folder_type_module.svg" }, - "_fd_module_open": { "iconPath": "../../icons/folder_type_module_opened.svg" }, - "_fd_mojo": { "iconPath": "../../icons/folder_type_mojo.svg" }, - "_fd_mojo_open": { "iconPath": "../../icons/folder_type_mojo_opened.svg" }, - "_fd_mongodb": { "iconPath": "../../icons/folder_type_mongodb.svg" }, - "_fd_mongodb_open": { "iconPath": "../../icons/folder_type_mongodb_opened.svg" }, - "_fd_mypy": { "iconPath": "../../icons/folder_type_mypy.svg" }, - "_fd_mypy_open": { "iconPath": "../../icons/folder_type_mypy_opened.svg" }, - "_fd_light_mypy": { "iconPath": "../../icons/folder_type_light_mypy.svg" }, - "_fd_light_mypy_open": { "iconPath": "../../icons/folder_type_light_mypy_opened.svg" }, - "_fd_mysql": { "iconPath": "../../icons/folder_type_mysql.svg" }, - "_fd_mysql_open": { "iconPath": "../../icons/folder_type_mysql_opened.svg" }, - "_fd_light_mysql": { "iconPath": "../../icons/folder_type_light_mysql.svg" }, - "_fd_light_mysql_open": { "iconPath": "../../icons/folder_type_light_mysql_opened.svg" }, - "_fd_netlify": { "iconPath": "../../icons/folder_type_netlify.svg" }, - "_fd_netlify_open": { "iconPath": "../../icons/folder_type_netlify_opened.svg" }, - "_fd_next": { "iconPath": "../../icons/folder_type_next.svg" }, - "_fd_next_open": { "iconPath": "../../icons/folder_type_next_opened.svg" }, - "_fd_nginx": { "iconPath": "../../icons/folder_type_nginx.svg" }, - "_fd_nginx_open": { "iconPath": "../../icons/folder_type_nginx_opened.svg" }, - "_fd_nix": { "iconPath": "../../icons/folder_type_nix.svg" }, - "_fd_nix_open": { "iconPath": "../../icons/folder_type_nix_opened.svg" }, - "_fd_node": { "iconPath": "../../icons/folder_type_node.svg" }, - "_fd_node_open": { "iconPath": "../../icons/folder_type_node_opened.svg" }, - "_fd_light_node": { "iconPath": "../../icons/folder_type_light_node.svg" }, - "_fd_light_node_open": { "iconPath": "../../icons/folder_type_light_node_opened.svg" }, - "_fd_notebooks": { "iconPath": "../../icons/folder_type_notebooks.svg" }, - "_fd_notebooks_open": { "iconPath": "../../icons/folder_type_notebooks_opened.svg" }, - "_fd_notification": { "iconPath": "../../icons/folder_type_notification.svg" }, - "_fd_notification_open": { "iconPath": "../../icons/folder_type_notification_opened.svg" }, - "_fd_nuget": { "iconPath": "../../icons/folder_type_nuget.svg" }, - "_fd_nuget_open": { "iconPath": "../../icons/folder_type_nuget_opened.svg" }, - "_fd_nuxt": { "iconPath": "../../icons/folder_type_nuxt.svg" }, - "_fd_nuxt_open": { "iconPath": "../../icons/folder_type_nuxt_opened.svg" }, - "_fd_package": { "iconPath": "../../icons/folder_type_package.svg" }, - "_fd_package_open": { "iconPath": "../../icons/folder_type_package_opened.svg" }, - "_fd_paket": { "iconPath": "../../icons/folder_type_paket.svg" }, - "_fd_paket_open": { "iconPath": "../../icons/folder_type_paket_opened.svg" }, - "_fd_php": { "iconPath": "../../icons/folder_type_php.svg" }, - "_fd_php_open": { "iconPath": "../../icons/folder_type_php_opened.svg" }, - "_fd_platformio": { "iconPath": "../../icons/folder_type_platformio.svg" }, - "_fd_platformio_open": { "iconPath": "../../icons/folder_type_platformio_opened.svg" }, - "_fd_plugin": { "iconPath": "../../icons/folder_type_plugin.svg" }, - "_fd_plugin_open": { "iconPath": "../../icons/folder_type_plugin_opened.svg" }, - "_fd_prisma": { "iconPath": "../../icons/folder_type_prisma.svg" }, - "_fd_prisma_open": { "iconPath": "../../icons/folder_type_prisma_opened.svg" }, - "_fd_private": { "iconPath": "../../icons/folder_type_private.svg" }, - "_fd_private_open": { "iconPath": "../../icons/folder_type_private_opened.svg" }, - "_fd_public": { "iconPath": "../../icons/folder_type_public.svg" }, - "_fd_public_open": { "iconPath": "../../icons/folder_type_public_opened.svg" }, - "_fd_pytest": { "iconPath": "../../icons/folder_type_pytest.svg" }, - "_fd_pytest_open": { "iconPath": "../../icons/folder_type_pytest_opened.svg" }, - "_fd_python": { "iconPath": "../../icons/folder_type_python.svg" }, - "_fd_python_open": { "iconPath": "../../icons/folder_type_python_opened.svg" }, - "_fd_ravendb": { "iconPath": "../../icons/folder_type_ravendb.svg" }, - "_fd_ravendb_open": { "iconPath": "../../icons/folder_type_ravendb_opened.svg" }, - "_fd_redis": { "iconPath": "../../icons/folder_type_redis.svg" }, - "_fd_redis_open": { "iconPath": "../../icons/folder_type_redis_opened.svg" }, - "_fd_redux": { "iconPath": "../../icons/folder_type_redux.svg" }, - "_fd_redux_open": { "iconPath": "../../icons/folder_type_redux_opened.svg" }, - "_fd_light_redux": { "iconPath": "../../icons/folder_type_light_redux.svg" }, - "_fd_light_redux_open": { "iconPath": "../../icons/folder_type_light_redux_opened.svg" }, - "_fd_route": { "iconPath": "../../icons/folder_type_route.svg" }, - "_fd_route_open": { "iconPath": "../../icons/folder_type_route_opened.svg" }, - "_fd_sass": { "iconPath": "../../icons/folder_type_sass.svg" }, - "_fd_sass_open": { "iconPath": "../../icons/folder_type_sass_opened.svg" }, - "_fd_light_sass": { "iconPath": "../../icons/folder_type_light_sass.svg" }, - "_fd_light_sass_open": { "iconPath": "../../icons/folder_type_light_sass_opened.svg" }, - "_fd_script": { "iconPath": "../../icons/folder_type_script.svg" }, - "_fd_script_open": { "iconPath": "../../icons/folder_type_script_opened.svg" }, - "_fd_seedkit": { "iconPath": "../../icons/folder_type_seedkit.svg" }, - "_fd_seedkit_open": { "iconPath": "../../icons/folder_type_seedkit_opened.svg" }, - "_fd_server": { "iconPath": "../../icons/folder_type_server.svg" }, - "_fd_server_open": { "iconPath": "../../icons/folder_type_server_opened.svg" }, - "_fd_services": { "iconPath": "../../icons/folder_type_services.svg" }, - "_fd_services_open": { "iconPath": "../../icons/folder_type_services_opened.svg" }, - "_fd_shared": { "iconPath": "../../icons/folder_type_shared.svg" }, - "_fd_shared_open": { "iconPath": "../../icons/folder_type_shared_opened.svg" }, - "_fd_snaplet": { "iconPath": "../../icons/folder_type_snaplet.svg" }, - "_fd_snaplet_open": { "iconPath": "../../icons/folder_type_snaplet_opened.svg" }, - "_fd_spin": { "iconPath": "../../icons/folder_type_spin.svg" }, - "_fd_spin_open": { "iconPath": "../../icons/folder_type_spin_opened.svg" }, - "_fd_src": { "iconPath": "../../icons/folder_type_src.svg" }, - "_fd_src_open": { "iconPath": "../../icons/folder_type_src_opened.svg" }, - "_fd_sso": { "iconPath": "../../icons/folder_type_sso.svg" }, - "_fd_sso_open": { "iconPath": "../../icons/folder_type_sso_opened.svg" }, - "_fd_story": { "iconPath": "../../icons/folder_type_story.svg" }, - "_fd_story_open": { "iconPath": "../../icons/folder_type_story_opened.svg" }, - "_fd_style": { "iconPath": "../../icons/folder_type_style.svg" }, - "_fd_style_open": { "iconPath": "../../icons/folder_type_style_opened.svg" }, - "_fd_supabase": { "iconPath": "../../icons/folder_type_supabase.svg" }, - "_fd_supabase_open": { "iconPath": "../../icons/folder_type_supabase_opened.svg" }, - "_fd_svelte": { "iconPath": "../../icons/folder_type_svelte.svg" }, - "_fd_svelte_open": { "iconPath": "../../icons/folder_type_svelte_opened.svg" }, - "_fd_tauri": { "iconPath": "../../icons/folder_type_tauri.svg" }, - "_fd_tauri_open": { "iconPath": "../../icons/folder_type_tauri_opened.svg" }, - "_fd_temp": { "iconPath": "../../icons/folder_type_temp.svg" }, - "_fd_temp_open": { "iconPath": "../../icons/folder_type_temp_opened.svg" }, - "_fd_template": { "iconPath": "../../icons/folder_type_template.svg" }, - "_fd_template_open": { "iconPath": "../../icons/folder_type_template_opened.svg" }, - "_fd_test": { "iconPath": "../../icons/folder_type_test.svg" }, - "_fd_test_open": { "iconPath": "../../icons/folder_type_test_opened.svg" }, - "_fd_theme": { "iconPath": "../../icons/folder_type_theme.svg" }, - "_fd_theme_open": { "iconPath": "../../icons/folder_type_theme_opened.svg" }, - "_fd_tools": { "iconPath": "../../icons/folder_type_tools.svg" }, - "_fd_tools_open": { "iconPath": "../../icons/folder_type_tools_opened.svg" }, - "_fd_travis": { "iconPath": "../../icons/folder_type_travis.svg" }, - "_fd_travis_open": { "iconPath": "../../icons/folder_type_travis_opened.svg" }, - "_fd_trunk": { "iconPath": "../../icons/folder_type_trunk.svg" }, - "_fd_trunk_open": { "iconPath": "../../icons/folder_type_trunk_opened.svg" }, - "_fd_turbo": { "iconPath": "../../icons/folder_type_turbo.svg" }, - "_fd_turbo_open": { "iconPath": "../../icons/folder_type_turbo_opened.svg" }, - "_fd_typescript": { "iconPath": "../../icons/folder_type_typescript.svg" }, - "_fd_typescript_open": { "iconPath": "../../icons/folder_type_typescript_opened.svg" }, - "_fd_typings": { "iconPath": "../../icons/folder_type_typings.svg" }, - "_fd_typings_open": { "iconPath": "../../icons/folder_type_typings_opened.svg" }, - "_fd_vagrant": { "iconPath": "../../icons/folder_type_vagrant.svg" }, - "_fd_vagrant_open": { "iconPath": "../../icons/folder_type_vagrant_opened.svg" }, - "_fd_vercel": { "iconPath": "../../icons/folder_type_vercel.svg" }, - "_fd_vercel_open": { "iconPath": "../../icons/folder_type_vercel_opened.svg" }, - "_fd_video": { "iconPath": "../../icons/folder_type_video.svg" }, - "_fd_video_open": { "iconPath": "../../icons/folder_type_video_opened.svg" }, - "_fd_view": { "iconPath": "../../icons/folder_type_view.svg" }, - "_fd_view_open": { "iconPath": "../../icons/folder_type_view_opened.svg" }, - "_fd_vitepress": { "iconPath": "../../icons/folder_type_vitepress.svg" }, - "_fd_vitepress_open": { "iconPath": "../../icons/folder_type_vitepress_opened.svg" }, - "_fd_vs": { "iconPath": "../../icons/folder_type_vs.svg" }, - "_fd_vs_open": { "iconPath": "../../icons/folder_type_vs_opened.svg" }, - "_fd_vscode": { "iconPath": "../../icons/folder_type_vscode.svg" }, - "_fd_vscode_open": { "iconPath": "../../icons/folder_type_vscode_opened.svg" }, - "_fd_vscode_test": { "iconPath": "../../icons/folder_type_vscode_test.svg" }, - "_fd_vscode_test_open": { "iconPath": "../../icons/folder_type_vscode_test_opened.svg" }, - "_fd_wasm": { "iconPath": "../../icons/folder_type_wasm.svg" }, - "_fd_wasm_open": { "iconPath": "../../icons/folder_type_wasm_opened.svg" }, - "_fd_webpack": { "iconPath": "../../icons/folder_type_webpack.svg" }, - "_fd_webpack_open": { "iconPath": "../../icons/folder_type_webpack_opened.svg" }, - "_fd_windows": { "iconPath": "../../icons/folder_type_windows.svg" }, - "_fd_windows_open": { "iconPath": "../../icons/folder_type_windows_opened.svg" }, - "_fd_windsurf": { "iconPath": "../../icons/folder_type_windsurf.svg" }, - "_fd_windsurf_open": { "iconPath": "../../icons/folder_type_windsurf_opened.svg" }, - "_fd_wit": { "iconPath": "../../icons/folder_type_wit.svg" }, - "_fd_wit_open": { "iconPath": "../../icons/folder_type_wit_opened.svg" }, - "_fd_www": { "iconPath": "../../icons/folder_type_www.svg" }, - "_fd_www_open": { "iconPath": "../../icons/folder_type_www_opened.svg" }, - "_fd_yarn": { "iconPath": "../../icons/folder_type_yarn.svg" }, - "_fd_yarn_open": { "iconPath": "../../icons/folder_type_yarn_opened.svg" }, - "_fd_zed": { "iconPath": "../../icons/folder_type_zed.svg" }, - "_fd_zed_open": { "iconPath": "../../icons/folder_type_zed_opened.svg" }, - "_fd_light_zed": { "iconPath": "../../icons/folder_type_light_zed.svg" }, - "_fd_light_zed_open": { "iconPath": "../../icons/folder_type_light_zed_opened.svg" }, - "_f_access": { "iconPath": "../../icons/file_type_access.svg" }, - "_f_actionscript": { "iconPath": "../../icons/file_type_actionscript.svg" }, - "_f_ada": { "iconPath": "../../icons/file_type_ada.svg" }, - "_f_light_ada": { "iconPath": "../../icons/file_type_light_ada.svg" }, - "_f_advpl": { "iconPath": "../../icons/file_type_advpl.svg" }, - "_f_affectscript": { "iconPath": "../../icons/file_type_affectscript.svg" }, - "_f_affinity": { "iconPath": "../../icons/file_type_affinity.svg" }, - "_f_affinitydesigner": { "iconPath": "../../icons/file_type_affinitydesigner.svg" }, - "_f_affinityphoto": { "iconPath": "../../icons/file_type_affinityphoto.svg" }, - "_f_affinitypublisher": { "iconPath": "../../icons/file_type_affinitypublisher.svg" }, - "_f_agda": { "iconPath": "../../icons/file_type_agda.svg" }, - "_f_light_agda": { "iconPath": "../../icons/file_type_light_agda.svg" }, - "_f_agents": { "iconPath": "../../icons/file_type_agents.svg" }, - "_f_light_agents": { "iconPath": "../../icons/file_type_light_agents.svg" }, - "_f_ai": { "iconPath": "../../icons/file_type_ai.svg" }, - "_f_al": { "iconPath": "../../icons/file_type_al.svg" }, - "_f_al_dal": { "iconPath": "../../icons/file_type_al_dal.svg" }, - "_f_alchemy": { "iconPath": "../../icons/file_type_alchemy.svg" }, - "_f_allcontributors": { "iconPath": "../../icons/file_type_allcontributors.svg" }, - "_f_alloy": { "iconPath": "../../icons/file_type_alloy.svg" }, - "_f_allure": { "iconPath": "../../icons/file_type_allure.svg" }, - "_f_angular": { "iconPath": "../../icons/file_type_angular.svg" }, - "_f_ansible": { "iconPath": "../../icons/file_type_ansible.svg" }, - "_f_antlers_html": { "iconPath": "../../icons/file_type_antlers_html.svg" }, - "_f_antlr": { "iconPath": "../../icons/file_type_antlr.svg" }, - "_f_anyscript": { "iconPath": "../../icons/file_type_anyscript.svg" }, - "_f_apache": { "iconPath": "../../icons/file_type_apache.svg" }, - "_f_apex": { "iconPath": "../../icons/file_type_apex.svg" }, - "_f_api_extractor": { "iconPath": "../../icons/file_type_api_extractor.svg" }, - "_f_apib": { "iconPath": "../../icons/file_type_apib.svg" }, - "_f_apl": { "iconPath": "../../icons/file_type_apl.svg" }, - "_f_light_apl": { "iconPath": "../../icons/file_type_light_apl.svg" }, - "_f_applescript": { "iconPath": "../../icons/file_type_applescript.svg" }, - "_f_appscript": { "iconPath": "../../icons/file_type_appscript.svg" }, - "_f_appsemble": { "iconPath": "../../icons/file_type_appsemble.svg" }, - "_f_appveyor": { "iconPath": "../../icons/file_type_appveyor.svg" }, - "_f_arduino": { "iconPath": "../../icons/file_type_arduino.svg" }, - "_f_asciidoc": { "iconPath": "../../icons/file_type_asciidoc.svg" }, - "_f_aseprite": { "iconPath": "../../icons/file_type_aseprite.svg" }, - "_f_asp": { "iconPath": "../../icons/file_type_asp.svg" }, - "_f_aspx": { "iconPath": "../../icons/file_type_aspx.svg" }, - "_f_assembly": { "iconPath": "../../icons/file_type_assembly.svg" }, - "_f_assembly_script": { "iconPath": "../../icons/file_type_assembly_script.svg" }, - "_f_astro": { "iconPath": "../../icons/file_type_astro.svg" }, - "_f_light_astro": { "iconPath": "../../icons/file_type_light_astro.svg" }, - "_f_astroconfig": { "iconPath": "../../icons/file_type_astroconfig.svg" }, - "_f_light_astroconfig": { "iconPath": "../../icons/file_type_light_astroconfig.svg" }, - "_f_atom": { "iconPath": "../../icons/file_type_atom.svg" }, - "_f_ats": { "iconPath": "../../icons/file_type_ats.svg" }, - "_f_attw": { "iconPath": "../../icons/file_type_attw.svg" }, - "_f_audio": { "iconPath": "../../icons/file_type_audio.svg" }, - "_f_aurelia": { "iconPath": "../../icons/file_type_aurelia.svg" }, - "_f_autohotkey": { "iconPath": "../../icons/file_type_autohotkey.svg" }, - "_f_autoit": { "iconPath": "../../icons/file_type_autoit.svg" }, - "_f_avif": { "iconPath": "../../icons/file_type_avif.svg" }, - "_f_avro": { "iconPath": "../../icons/file_type_avro.svg" }, - "_f_awk": { "iconPath": "../../icons/file_type_awk.svg" }, - "_f_aws": { "iconPath": "../../icons/file_type_aws.svg" }, - "_f_azure": { "iconPath": "../../icons/file_type_azure.svg" }, - "_f_azurepipelines": { "iconPath": "../../icons/file_type_azurepipelines.svg" }, - "_f_babel": { "iconPath": "../../icons/file_type_babel.svg" }, - "_f_light_babel": { "iconPath": "../../icons/file_type_light_babel.svg" }, - "_f_bak": { "iconPath": "../../icons/file_type_bak.svg" }, - "_f_ballerina": { "iconPath": "../../icons/file_type_ballerina.svg" }, - "_f_bat": { "iconPath": "../../icons/file_type_bat.svg" }, - "_f_bats": { "iconPath": "../../icons/file_type_bats.svg" }, - "_f_bazaar": { "iconPath": "../../icons/file_type_bazaar.svg" }, - "_f_bazel": { "iconPath": "../../icons/file_type_bazel.svg" }, - "_f_bazel_ignore": { "iconPath": "../../icons/file_type_bazel_ignore.svg" }, - "_f_bazel_version": { "iconPath": "../../icons/file_type_bazel_version.svg" }, - "_f_befunge": { "iconPath": "../../icons/file_type_befunge.svg" }, - "_f_bicep": { "iconPath": "../../icons/file_type_bicep.svg" }, - "_f_biml": { "iconPath": "../../icons/file_type_biml.svg" }, - "_f_binary": { "iconPath": "../../icons/file_type_binary.svg" }, - "_f_biome": { "iconPath": "../../icons/file_type_biome.svg" }, - "_f_bitbucketpipeline": { "iconPath": "../../icons/file_type_bitbucketpipeline.svg" }, - "_f_bithound": { "iconPath": "../../icons/file_type_bithound.svg" }, - "_f_blade": { "iconPath": "../../icons/file_type_blade.svg" }, - "_f_blender": { "iconPath": "../../icons/file_type_blender.svg" }, - "_f_blitzbasic": { "iconPath": "../../icons/file_type_blitzbasic.svg" }, - "_f_bolt": { "iconPath": "../../icons/file_type_bolt.svg" }, - "_f_bosque": { "iconPath": "../../icons/file_type_bosque.svg" }, - "_f_bower": { "iconPath": "../../icons/file_type_bower.svg" }, - "_f_browserslist": { "iconPath": "../../icons/file_type_browserslist.svg" }, - "_f_bruno": { "iconPath": "../../icons/file_type_bruno.svg" }, - "_f_buckbuild": { "iconPath": "../../icons/file_type_buckbuild.svg" }, - "_f_buf": { "iconPath": "../../icons/file_type_buf.svg" }, - "_f_bun": { "iconPath": "../../icons/file_type_bun.svg" }, - "_f_bundlemon": { "iconPath": "../../icons/file_type_bundlemon.svg" }, - "_f_bundler": { "iconPath": "../../icons/file_type_bundler.svg" }, - "_f_bunfig": { "iconPath": "../../icons/file_type_bunfig.svg" }, - "_f_c": { "iconPath": "../../icons/file_type_c.svg" }, - "_f_c3": { "iconPath": "../../icons/file_type_c3.svg" }, - "_f_c_al": { "iconPath": "../../icons/file_type_c_al.svg" }, - "_f_cabal": { "iconPath": "../../icons/file_type_cabal.svg" }, - "_f_caddy": { "iconPath": "../../icons/file_type_caddy.svg" }, - "_f_cake": { "iconPath": "../../icons/file_type_cake.svg" }, - "_f_cakephp": { "iconPath": "../../icons/file_type_cakephp.svg" }, - "_f_capacitor": { "iconPath": "../../icons/file_type_capacitor.svg" }, - "_f_capnp": { "iconPath": "../../icons/file_type_capnp.svg" }, - "_f_cargo": { "iconPath": "../../icons/file_type_cargo.svg" }, - "_f_casc": { "iconPath": "../../icons/file_type_casc.svg" }, - "_f_cddl": { "iconPath": "../../icons/file_type_cddl.svg" }, - "_f_cert": { "iconPath": "../../icons/file_type_cert.svg" }, - "_f_ceylon": { "iconPath": "../../icons/file_type_ceylon.svg" }, - "_f_cf": { "iconPath": "../../icons/file_type_cf.svg" }, - "_f_cfc": { "iconPath": "../../icons/file_type_cfc.svg" }, - "_f_cfm": { "iconPath": "../../icons/file_type_cfm.svg" }, - "_f_changie": { "iconPath": "../../icons/file_type_changie.svg" }, - "_f_cheader": { "iconPath": "../../icons/file_type_cheader.svg" }, - "_f_chef": { "iconPath": "../../icons/file_type_chef.svg" }, - "_f_chef_cookbook": { "iconPath": "../../icons/file_type_chef_cookbook.svg" }, - "_f_circleci": { "iconPath": "../../icons/file_type_circleci.svg" }, - "_f_light_circleci": { "iconPath": "../../icons/file_type_light_circleci.svg" }, - "_f_circom": { "iconPath": "../../icons/file_type_circom.svg" }, - "_f_class": { "iconPath": "../../icons/file_type_class.svg" }, - "_f_claude": { "iconPath": "../../icons/file_type_claude.svg" }, - "_f_clojure": { "iconPath": "../../icons/file_type_clojure.svg" }, - "_f_clojurescript": { "iconPath": "../../icons/file_type_clojurescript.svg" }, - "_f_cloudflare": { "iconPath": "../../icons/file_type_cloudflare.svg" }, - "_f_cloudfoundry": { "iconPath": "../../icons/file_type_cloudfoundry.svg" }, - "_f_light_cloudfoundry": { "iconPath": "../../icons/file_type_light_cloudfoundry.svg" }, - "_f_cmake": { "iconPath": "../../icons/file_type_cmake.svg" }, - "_f_cobol": { "iconPath": "../../icons/file_type_cobol.svg" }, - "_f_codacy": { "iconPath": "../../icons/file_type_codacy.svg" }, - "_f_light_codacy": { "iconPath": "../../icons/file_type_light_codacy.svg" }, - "_f_codeclimate": { "iconPath": "../../icons/file_type_codeclimate.svg" }, - "_f_light_codeclimate": { "iconPath": "../../icons/file_type_light_codeclimate.svg" }, - "_f_codecov": { "iconPath": "../../icons/file_type_codecov.svg" }, - "_f_codekit": { "iconPath": "../../icons/file_type_codekit.svg" }, - "_f_codemagic": { "iconPath": "../../icons/file_type_codemagic.svg" }, - "_f_codeowners": { "iconPath": "../../icons/file_type_codeowners.svg" }, - "_f_light_codeowners": { "iconPath": "../../icons/file_type_light_codeowners.svg" }, - "_f_codeql": { "iconPath": "../../icons/file_type_codeql.svg" }, - "_f_coderabbit": { "iconPath": "../../icons/file_type_coderabbit.svg" }, - "_f_coffeelint": { "iconPath": "../../icons/file_type_coffeelint.svg" }, - "_f_coffeescript": { "iconPath": "../../icons/file_type_coffeescript.svg" }, - "_f_commitizen": { "iconPath": "../../icons/file_type_commitizen.svg" }, - "_f_commitlint": { "iconPath": "../../icons/file_type_commitlint.svg" }, - "_f_compass": { "iconPath": "../../icons/file_type_compass.svg" }, - "_f_composer": { "iconPath": "../../icons/file_type_composer.svg" }, - "_f_conan": { "iconPath": "../../icons/file_type_conan.svg" }, - "_f_conda": { "iconPath": "../../icons/file_type_conda.svg" }, - "_f_config": { "iconPath": "../../icons/file_type_config.svg" }, - "_f_light_config": { "iconPath": "../../icons/file_type_light_config.svg" }, - "_f_confluence": { "iconPath": "../../icons/file_type_confluence.svg" }, - "_f_copilot": { "iconPath": "../../icons/file_type_copilot.svg" }, - "_f_light_copilot": { "iconPath": "../../icons/file_type_light_copilot.svg" }, - "_f_coverage": { "iconPath": "../../icons/file_type_coverage.svg" }, - "_f_coveralls": { "iconPath": "../../icons/file_type_coveralls.svg" }, - "_f_cpp": { "iconPath": "../../icons/file_type_cpp.svg" }, - "_f_cppheader": { "iconPath": "../../icons/file_type_cppheader.svg" }, - "_f_craco": { "iconPath": "../../icons/file_type_craco.svg" }, - "_f_crowdin": { "iconPath": "../../icons/file_type_crowdin.svg" }, - "_f_crystal": { "iconPath": "../../icons/file_type_crystal.svg" }, - "_f_light_crystal": { "iconPath": "../../icons/file_type_light_crystal.svg" }, - "_f_csharp": { "iconPath": "../../icons/file_type_csharp.svg" }, - "_f_cspell": { "iconPath": "../../icons/file_type_cspell.svg" }, - "_f_csproj": { "iconPath": "../../icons/file_type_csproj.svg" }, - "_f_css": { "iconPath": "../../icons/file_type_css.svg" }, - "_f_csscomb": { "iconPath": "../../icons/file_type_csscomb.svg" }, - "_f_csslint": { "iconPath": "../../icons/file_type_csslint.svg" }, - "_f_cssmap": { "iconPath": "../../icons/file_type_cssmap.svg" }, - "_f_cucumber": { "iconPath": "../../icons/file_type_cucumber.svg" }, - "_f_cuda": { "iconPath": "../../icons/file_type_cuda.svg" }, - "_f_cursorrules": { "iconPath": "../../icons/file_type_cursorrules.svg" }, - "_f_cvs": { "iconPath": "../../icons/file_type_cvs.svg" }, - "_f_cypress": { "iconPath": "../../icons/file_type_cypress.svg" }, - "_f_light_cypress": { "iconPath": "../../icons/file_type_light_cypress.svg" }, - "_f_cypress_spec": { "iconPath": "../../icons/file_type_cypress_spec.svg" }, - "_f_light_cypress_spec": { "iconPath": "../../icons/file_type_light_cypress_spec.svg" }, - "_f_cython": { "iconPath": "../../icons/file_type_cython.svg" }, - "_f_dal": { "iconPath": "../../icons/file_type_dal.svg" }, - "_f_darcs": { "iconPath": "../../icons/file_type_darcs.svg" }, - "_f_dartlang": { "iconPath": "../../icons/file_type_dartlang.svg" }, - "_f_dartlang_generated": { "iconPath": "../../icons/file_type_dartlang_generated.svg" }, - "_f_dartlang_ignore": { "iconPath": "../../icons/file_type_dartlang_ignore.svg" }, - "_f_datadog": { "iconPath": "../../icons/file_type_datadog.svg" }, - "_f_db": { "iconPath": "../../icons/file_type_db.svg" }, - "_f_light_db": { "iconPath": "../../icons/file_type_light_db.svg" }, - "_f_debian": { "iconPath": "../../icons/file_type_debian.svg" }, - "_f_delphi": { "iconPath": "../../icons/file_type_delphi.svg" }, - "_f_deno": { "iconPath": "../../icons/file_type_deno.svg" }, - "_f_denoify": { "iconPath": "../../icons/file_type_denoify.svg" }, - "_f_dependabot": { "iconPath": "../../icons/file_type_dependabot.svg" }, - "_f_dependencies": { "iconPath": "../../icons/file_type_dependencies.svg" }, - "_f_design_tokens": { "iconPath": "../../icons/file_type_design_tokens.svg" }, - "_f_devcontainer": { "iconPath": "../../icons/file_type_devcontainer.svg" }, - "_f_devvit": { "iconPath": "../../icons/file_type_devvit.svg" }, - "_f_dhall": { "iconPath": "../../icons/file_type_dhall.svg" }, - "_f_light_dhall": { "iconPath": "../../icons/file_type_light_dhall.svg" }, - "_f_diff": { "iconPath": "../../icons/file_type_diff.svg" }, - "_f_django": { "iconPath": "../../icons/file_type_django.svg" }, - "_f_dlang": { "iconPath": "../../icons/file_type_dlang.svg" }, - "_f_docker": { "iconPath": "../../icons/file_type_docker.svg" }, - "_f_dockertest": { "iconPath": "../../icons/file_type_dockertest.svg" }, - "_f_docpad": { "iconPath": "../../icons/file_type_docpad.svg" }, - "_f_light_docpad": { "iconPath": "../../icons/file_type_light_docpad.svg" }, - "_f_docusaurus": { "iconPath": "../../icons/file_type_docusaurus.svg" }, - "_f_docz": { "iconPath": "../../icons/file_type_docz.svg" }, - "_f_dojo": { "iconPath": "../../icons/file_type_dojo.svg" }, - "_f_doppler": { "iconPath": "../../icons/file_type_doppler.svg" }, - "_f_dotenv": { "iconPath": "../../icons/file_type_dotenv.svg" }, - "_f_dotjs": { "iconPath": "../../icons/file_type_dotjs.svg" }, - "_f_doxygen": { "iconPath": "../../icons/file_type_doxygen.svg" }, - "_f_drawio": { "iconPath": "../../icons/file_type_drawio.svg" }, - "_f_drone": { "iconPath": "../../icons/file_type_drone.svg" }, - "_f_light_drone": { "iconPath": "../../icons/file_type_light_drone.svg" }, - "_f_drools": { "iconPath": "../../icons/file_type_drools.svg" }, - "_f_dtd": { "iconPath": "../../icons/file_type_dtd.svg" }, - "_f_dune": { "iconPath": "../../icons/file_type_dune.svg" }, - "_f_dustjs": { "iconPath": "../../icons/file_type_dustjs.svg" }, - "_f_dvc": { "iconPath": "../../icons/file_type_dvc.svg" }, - "_f_dylan": { "iconPath": "../../icons/file_type_dylan.svg" }, - "_f_earthly": { "iconPath": "../../icons/file_type_earthly.svg" }, - "_f_eas-metadata": { "iconPath": "../../icons/file_type_eas-metadata.svg" }, - "_f_light_eas-metadata": { "iconPath": "../../icons/file_type_light_eas-metadata.svg" }, - "_f_edge": { "iconPath": "../../icons/file_type_edge.svg" }, - "_f_editorconfig": { "iconPath": "../../icons/file_type_editorconfig.svg" }, - "_f_eex": { "iconPath": "../../icons/file_type_eex.svg" }, - "_f_ejs": { "iconPath": "../../icons/file_type_ejs.svg" }, - "_f_elastic": { "iconPath": "../../icons/file_type_elastic.svg" }, - "_f_elasticbeanstalk": { "iconPath": "../../icons/file_type_elasticbeanstalk.svg" }, - "_f_electron": { "iconPath": "../../icons/file_type_electron.svg" }, - "_f_eleventy": { "iconPath": "../../icons/file_type_eleventy.svg" }, - "_f_light_eleventy": { "iconPath": "../../icons/file_type_light_eleventy.svg" }, - "_f_elixir": { "iconPath": "../../icons/file_type_elixir.svg" }, - "_f_elm": { "iconPath": "../../icons/file_type_elm.svg" }, - "_f_emacs": { "iconPath": "../../icons/file_type_emacs.svg" }, - "_f_ember": { "iconPath": "../../icons/file_type_ember.svg" }, - "_f_ensime": { "iconPath": "../../icons/file_type_ensime.svg" }, - "_f_eps": { "iconPath": "../../icons/file_type_eps.svg" }, - "_f_epub": { "iconPath": "../../icons/file_type_epub.svg" }, - "_f_erb": { "iconPath": "../../icons/file_type_erb.svg" }, - "_f_erlang": { "iconPath": "../../icons/file_type_erlang.svg" }, - "_f_esbuild": { "iconPath": "../../icons/file_type_esbuild.svg" }, - "_f_eslint": { "iconPath": "../../icons/file_type_eslint.svg" }, - "_f_esphome": { "iconPath": "../../icons/file_type_esphome.svg" }, - "_f_light_esphome": { "iconPath": "../../icons/file_type_light_esphome.svg" }, - "_f_excalidraw": { "iconPath": "../../icons/file_type_excalidraw.svg" }, - "_f_excel": { "iconPath": "../../icons/file_type_excel.svg" }, - "_f_expo": { "iconPath": "../../icons/file_type_expo.svg" }, - "_f_light_expo": { "iconPath": "../../icons/file_type_light_expo.svg" }, - "_f_falcon": { "iconPath": "../../icons/file_type_falcon.svg" }, - "_f_fantasticon": { "iconPath": "../../icons/file_type_fantasticon.svg" }, - "_f_fastly": { "iconPath": "../../icons/file_type_fastly.svg" }, - "_f_fauna": { "iconPath": "../../icons/file_type_fauna.svg" }, - "_f_favicon": { "iconPath": "../../icons/file_type_favicon.svg" }, - "_f_fbx": { "iconPath": "../../icons/file_type_fbx.svg" }, - "_f_firebase": { "iconPath": "../../icons/file_type_firebase.svg" }, - "_f_firebasehosting": { "iconPath": "../../icons/file_type_firebasehosting.svg" }, - "_f_light_firebasehosting": { "iconPath": "../../icons/file_type_light_firebasehosting.svg" }, - "_f_firebasestorage": { "iconPath": "../../icons/file_type_firebasestorage.svg" }, - "_f_firestore": { "iconPath": "../../icons/file_type_firestore.svg" }, - "_f_fitbit": { "iconPath": "../../icons/file_type_fitbit.svg" }, - "_f_fla": { "iconPath": "../../icons/file_type_fla.svg" }, - "_f_light_fla": { "iconPath": "../../icons/file_type_light_fla.svg" }, - "_f_flareact": { "iconPath": "../../icons/file_type_flareact.svg" }, - "_f_flash": { "iconPath": "../../icons/file_type_flash.svg" }, - "_f_floobits": { "iconPath": "../../icons/file_type_floobits.svg" }, - "_f_flow": { "iconPath": "../../icons/file_type_flow.svg" }, - "_f_flutter": { "iconPath": "../../icons/file_type_flutter.svg" }, - "_f_flutter_package": { "iconPath": "../../icons/file_type_flutter_package.svg" }, - "_f_flyio": { "iconPath": "../../icons/file_type_flyio.svg" }, - "_f_font": { "iconPath": "../../icons/file_type_font.svg" }, - "_f_light_font": { "iconPath": "../../icons/file_type_light_font.svg" }, - "_f_formkit": { "iconPath": "../../icons/file_type_formkit.svg" }, - "_f_fortran": { "iconPath": "../../icons/file_type_fortran.svg" }, - "_f_fossa": { "iconPath": "../../icons/file_type_fossa.svg" }, - "_f_fossil": { "iconPath": "../../icons/file_type_fossil.svg" }, - "_f_freemarker": { "iconPath": "../../icons/file_type_freemarker.svg" }, - "_f_frontcommerce": { "iconPath": "../../icons/file_type_frontcommerce.svg" }, - "_f_fsharp": { "iconPath": "../../icons/file_type_fsharp.svg" }, - "_f_fsproj": { "iconPath": "../../icons/file_type_fsproj.svg" }, - "_f_fthtml": { "iconPath": "../../icons/file_type_fthtml.svg" }, - "_f_funding": { "iconPath": "../../icons/file_type_funding.svg" }, - "_f_fusebox": { "iconPath": "../../icons/file_type_fusebox.svg" }, - "_f_galen": { "iconPath": "../../icons/file_type_galen.svg" }, - "_f_gamemaker": { "iconPath": "../../icons/file_type_gamemaker.svg" }, - "_f_gamemaker2": { "iconPath": "../../icons/file_type_gamemaker2.svg" }, - "_f_light_gamemaker2": { "iconPath": "../../icons/file_type_light_gamemaker2.svg" }, - "_f_gamemaker81": { "iconPath": "../../icons/file_type_gamemaker81.svg" }, - "_f_gatsby": { "iconPath": "../../icons/file_type_gatsby.svg" }, - "_f_gcloud": { "iconPath": "../../icons/file_type_gcloud.svg" }, - "_f_gcode": { "iconPath": "../../icons/file_type_gcode.svg" }, - "_f_gdscript": { "iconPath": "../../icons/file_type_gdscript.svg" }, - "_f_gduid": { "iconPath": "../../icons/file_type_gduid.svg" }, - "_f_gemini": { "iconPath": "../../icons/file_type_gemini.svg" }, - "_f_genstat": { "iconPath": "../../icons/file_type_genstat.svg" }, - "_f_geojson": { "iconPath": "../../icons/file_type_geojson.svg" }, - "_f_gimp": { "iconPath": "../../icons/file_type_gimp.svg" }, - "_f_git": { "iconPath": "../../icons/file_type_git.svg" }, - "_f_gitlab": { "iconPath": "../../icons/file_type_gitlab.svg" }, - "_f_gitpod": { "iconPath": "../../icons/file_type_gitpod.svg" }, - "_f_gleam": { "iconPath": "../../icons/file_type_gleam.svg" }, - "_f_gleamconfig": { "iconPath": "../../icons/file_type_gleamconfig.svg" }, - "_f_glide": { "iconPath": "../../icons/file_type_glide.svg" }, - "_f_glimmer": { "iconPath": "../../icons/file_type_glimmer.svg" }, - "_f_glitter": { "iconPath": "../../icons/file_type_glitter.svg" }, - "_f_glsl": { "iconPath": "../../icons/file_type_glsl.svg" }, - "_f_gltf": { "iconPath": "../../icons/file_type_gltf.svg" }, - "_f_glyphs": { "iconPath": "../../icons/file_type_glyphs.svg" }, - "_f_gnu": { "iconPath": "../../icons/file_type_gnu.svg" }, - "_f_gnuplot": { "iconPath": "../../icons/file_type_gnuplot.svg" }, - "_f_go": { "iconPath": "../../icons/file_type_go.svg" }, - "_f_go_package": { "iconPath": "../../icons/file_type_go_package.svg" }, - "_f_go_work": { "iconPath": "../../icons/file_type_go_work.svg" }, - "_f_goctl": { "iconPath": "../../icons/file_type_goctl.svg" }, - "_f_godot": { "iconPath": "../../icons/file_type_godot.svg" }, - "_f_gpg": { "iconPath": "../../icons/file_type_gpg.svg" }, - "_f_gradle": { "iconPath": "../../icons/file_type_gradle.svg" }, - "_f_light_gradle": { "iconPath": "../../icons/file_type_light_gradle.svg" }, - "_f_grain": { "iconPath": "../../icons/file_type_grain.svg" }, - "_f_graphql": { "iconPath": "../../icons/file_type_graphql.svg" }, - "_f_graphql_config": { "iconPath": "../../icons/file_type_graphql_config.svg" }, - "_f_graphviz": { "iconPath": "../../icons/file_type_graphviz.svg" }, - "_f_greenkeeper": { "iconPath": "../../icons/file_type_greenkeeper.svg" }, - "_f_gridsome": { "iconPath": "../../icons/file_type_gridsome.svg" }, - "_f_grit": { "iconPath": "../../icons/file_type_grit.svg" }, - "_f_groovy": { "iconPath": "../../icons/file_type_groovy.svg" }, - "_f_grunt": { "iconPath": "../../icons/file_type_grunt.svg" }, - "_f_gulp": { "iconPath": "../../icons/file_type_gulp.svg" }, - "_f_haml": { "iconPath": "../../icons/file_type_haml.svg" }, - "_f_handlebars": { "iconPath": "../../icons/file_type_handlebars.svg" }, - "_f_harbour": { "iconPath": "../../icons/file_type_harbour.svg" }, - "_f_hardhat": { "iconPath": "../../icons/file_type_hardhat.svg" }, - "_f_hashicorp": { "iconPath": "../../icons/file_type_hashicorp.svg" }, - "_f_light_hashicorp": { "iconPath": "../../icons/file_type_light_hashicorp.svg" }, - "_f_haskell": { "iconPath": "../../icons/file_type_haskell.svg" }, - "_f_haxe": { "iconPath": "../../icons/file_type_haxe.svg" }, - "_f_haxecheckstyle": { "iconPath": "../../icons/file_type_haxecheckstyle.svg" }, - "_f_haxedevelop": { "iconPath": "../../icons/file_type_haxedevelop.svg" }, - "_f_helix": { "iconPath": "../../icons/file_type_helix.svg" }, - "_f_helm": { "iconPath": "../../icons/file_type_helm.svg" }, - "_f_histoire": { "iconPath": "../../icons/file_type_histoire.svg" }, - "_f_hjson": { "iconPath": "../../icons/file_type_hjson.svg" }, - "_f_light_hjson": { "iconPath": "../../icons/file_type_light_hjson.svg" }, - "_f_hlsl": { "iconPath": "../../icons/file_type_hlsl.svg" }, - "_f_homeassistant": { "iconPath": "../../icons/file_type_homeassistant.svg" }, - "_f_horusec": { "iconPath": "../../icons/file_type_horusec.svg" }, - "_f_host": { "iconPath": "../../icons/file_type_host.svg" }, - "_f_html": { "iconPath": "../../icons/file_type_html.svg" }, - "_f_htmlhint": { "iconPath": "../../icons/file_type_htmlhint.svg" }, - "_f_htmlvalidate": { "iconPath": "../../icons/file_type_htmlvalidate.svg" }, - "_f_http": { "iconPath": "../../icons/file_type_http.svg" }, - "_f_hugo": { "iconPath": "../../icons/file_type_hugo.svg" }, - "_f_humanstxt": { "iconPath": "../../icons/file_type_humanstxt.svg" }, - "_f_hunspell": { "iconPath": "../../icons/file_type_hunspell.svg" }, - "_f_husky": { "iconPath": "../../icons/file_type_husky.svg" }, - "_f_hy": { "iconPath": "../../icons/file_type_hy.svg" }, - "_f_hygen": { "iconPath": "../../icons/file_type_hygen.svg" }, - "_f_hypr": { "iconPath": "../../icons/file_type_hypr.svg" }, - "_f_icl": { "iconPath": "../../icons/file_type_icl.svg" }, - "_f_idris": { "iconPath": "../../icons/file_type_idris.svg" }, - "_f_idrisbin": { "iconPath": "../../icons/file_type_idrisbin.svg" }, - "_f_idrispkg": { "iconPath": "../../icons/file_type_idrispkg.svg" }, - "_f_image": { "iconPath": "../../icons/file_type_image.svg" }, - "_f_imba": { "iconPath": "../../icons/file_type_imba.svg" }, - "_f_inc": { "iconPath": "../../icons/file_type_inc.svg" }, - "_f_infopath": { "iconPath": "../../icons/file_type_infopath.svg" }, - "_f_informix": { "iconPath": "../../icons/file_type_informix.svg" }, - "_f_ini": { "iconPath": "../../icons/file_type_ini.svg" }, - "_f_light_ini": { "iconPath": "../../icons/file_type_light_ini.svg" }, - "_f_ink": { "iconPath": "../../icons/file_type_ink.svg" }, - "_f_innosetup": { "iconPath": "../../icons/file_type_innosetup.svg" }, - "_f_io": { "iconPath": "../../icons/file_type_io.svg" }, - "_f_light_io": { "iconPath": "../../icons/file_type_light_io.svg" }, - "_f_iodine": { "iconPath": "../../icons/file_type_iodine.svg" }, - "_f_ionic": { "iconPath": "../../icons/file_type_ionic.svg" }, - "_f_jake": { "iconPath": "../../icons/file_type_jake.svg" }, - "_f_janet": { "iconPath": "../../icons/file_type_janet.svg" }, - "_f_jar": { "iconPath": "../../icons/file_type_jar.svg" }, - "_f_jasmine": { "iconPath": "../../icons/file_type_jasmine.svg" }, - "_f_java": { "iconPath": "../../icons/file_type_java.svg" }, - "_f_jbuilder": { "iconPath": "../../icons/file_type_jbuilder.svg" }, - "_f_jekyll": { "iconPath": "../../icons/file_type_jekyll.svg" }, - "_f_jenkins": { "iconPath": "../../icons/file_type_jenkins.svg" }, - "_f_jest": { "iconPath": "../../icons/file_type_jest.svg" }, - "_f_jest_snapshot": { "iconPath": "../../icons/file_type_jest_snapshot.svg" }, - "_f_jetbrains": { "iconPath": "../../icons/file_type_jetbrains.svg" }, - "_f_jinja": { "iconPath": "../../icons/file_type_jinja.svg" }, - "_f_jpm": { "iconPath": "../../icons/file_type_jpm.svg" }, - "_f_js": { "iconPath": "../../icons/file_type_js.svg" }, - "_f_light_js": { "iconPath": "../../icons/file_type_light_js.svg" }, - "_f_jsbeautify": { "iconPath": "../../icons/file_type_jsbeautify.svg" }, - "_f_jsconfig": { "iconPath": "../../icons/file_type_jsconfig.svg" }, - "_f_light_jsconfig": { "iconPath": "../../icons/file_type_light_jsconfig.svg" }, - "_f_jscpd": { "iconPath": "../../icons/file_type_jscpd.svg" }, - "_f_jshint": { "iconPath": "../../icons/file_type_jshint.svg" }, - "_f_jsmap": { "iconPath": "../../icons/file_type_jsmap.svg" }, - "_f_light_jsmap": { "iconPath": "../../icons/file_type_light_jsmap.svg" }, - "_f_json": { "iconPath": "../../icons/file_type_json.svg" }, - "_f_light_json": { "iconPath": "../../icons/file_type_light_json.svg" }, - "_f_json5": { "iconPath": "../../icons/file_type_json5.svg" }, - "_f_light_json5": { "iconPath": "../../icons/file_type_light_json5.svg" }, - "_f_json_schema": { "iconPath": "../../icons/file_type_json_schema.svg" }, - "_f_light_json_schema": { "iconPath": "../../icons/file_type_light_json_schema.svg" }, - "_f_jsonld": { "iconPath": "../../icons/file_type_jsonld.svg" }, - "_f_light_jsonld": { "iconPath": "../../icons/file_type_light_jsonld.svg" }, - "_f_jsonnet": { "iconPath": "../../icons/file_type_jsonnet.svg" }, - "_f_jsp": { "iconPath": "../../icons/file_type_jsp.svg" }, - "_f_jsr": { "iconPath": "../../icons/file_type_jsr.svg" }, - "_f_jss": { "iconPath": "../../icons/file_type_jss.svg" }, - "_f_juice": { "iconPath": "../../icons/file_type_juice.svg" }, - "_f_julia": { "iconPath": "../../icons/file_type_julia.svg" }, - "_f_jupyter": { "iconPath": "../../icons/file_type_jupyter.svg" }, - "_f_just": { "iconPath": "../../icons/file_type_just.svg" }, - "_f_k": { "iconPath": "../../icons/file_type_k.svg" }, - "_f_karma": { "iconPath": "../../icons/file_type_karma.svg" }, - "_f_key": { "iconPath": "../../icons/file_type_key.svg" }, - "_f_kitchenci": { "iconPath": "../../icons/file_type_kitchenci.svg" }, - "_f_kite": { "iconPath": "../../icons/file_type_kite.svg" }, - "_f_light_kite": { "iconPath": "../../icons/file_type_light_kite.svg" }, - "_f_kivy": { "iconPath": "../../icons/file_type_kivy.svg" }, - "_f_knip": { "iconPath": "../../icons/file_type_knip.svg" }, - "_f_kos": { "iconPath": "../../icons/file_type_kos.svg" }, - "_f_kotlin": { "iconPath": "../../icons/file_type_kotlin.svg" }, - "_f_kusto": { "iconPath": "../../icons/file_type_kusto.svg" }, - "_f_language_configuration": { "iconPath": "../../icons/file_type_language_configuration.svg" }, - "_f_lark": { "iconPath": "../../icons/file_type_lark.svg" }, - "_f_light_lark": { "iconPath": "../../icons/file_type_light_lark.svg" }, - "_f_latino": { "iconPath": "../../icons/file_type_latino.svg" }, - "_f_layout": { "iconPath": "../../icons/file_type_layout.svg" }, - "_f_lean": { "iconPath": "../../icons/file_type_lean.svg" }, - "_f_light_lean": { "iconPath": "../../icons/file_type_light_lean.svg" }, - "_f_leanconfig": { "iconPath": "../../icons/file_type_leanconfig.svg" }, - "_f_light_leanconfig": { "iconPath": "../../icons/file_type_light_leanconfig.svg" }, - "_f_lefthook": { "iconPath": "../../icons/file_type_lefthook.svg" }, - "_f_lerna": { "iconPath": "../../icons/file_type_lerna.svg" }, - "_f_light_lerna": { "iconPath": "../../icons/file_type_light_lerna.svg" }, - "_f_less": { "iconPath": "../../icons/file_type_less.svg" }, - "_f_lex": { "iconPath": "../../icons/file_type_lex.svg" }, - "_f_liara": { "iconPath": "../../icons/file_type_liara.svg" }, - "_f_libreoffice_base": { "iconPath": "../../icons/file_type_libreoffice_base.svg" }, - "_f_libreoffice_calc": { "iconPath": "../../icons/file_type_libreoffice_calc.svg" }, - "_f_libreoffice_draw": { "iconPath": "../../icons/file_type_libreoffice_draw.svg" }, - "_f_libreoffice_impress": { "iconPath": "../../icons/file_type_libreoffice_impress.svg" }, - "_f_libreoffice_math": { "iconPath": "../../icons/file_type_libreoffice_math.svg" }, - "_f_libreoffice_writer": { "iconPath": "../../icons/file_type_libreoffice_writer.svg" }, - "_f_license": { "iconPath": "../../icons/file_type_license.svg" }, - "_f_licensebat": { "iconPath": "../../icons/file_type_licensebat.svg" }, - "_f_lighthouse": { "iconPath": "../../icons/file_type_lighthouse.svg" }, - "_f_lilypond": { "iconPath": "../../icons/file_type_lilypond.svg" }, - "_f_lime": { "iconPath": "../../icons/file_type_lime.svg" }, - "_f_lintstagedrc": { "iconPath": "../../icons/file_type_lintstagedrc.svg" }, - "_f_liquid": { "iconPath": "../../icons/file_type_liquid.svg" }, - "_f_lisp": { "iconPath": "../../icons/file_type_lisp.svg" }, - "_f_livescript": { "iconPath": "../../icons/file_type_livescript.svg" }, - "_f_lnk": { "iconPath": "../../icons/file_type_lnk.svg" }, - "_f_locale": { "iconPath": "../../icons/file_type_locale.svg" }, - "_f_log": { "iconPath": "../../icons/file_type_log.svg" }, - "_f_lolcode": { "iconPath": "../../icons/file_type_lolcode.svg" }, - "_f_lsl": { "iconPath": "../../icons/file_type_lsl.svg" }, - "_f_lua": { "iconPath": "../../icons/file_type_lua.svg" }, - "_f_luau": { "iconPath": "../../icons/file_type_luau.svg" }, - "_f_lync": { "iconPath": "../../icons/file_type_lync.svg" }, - "_f_mailing": { "iconPath": "../../icons/file_type_mailing.svg" }, - "_f_light_mailing": { "iconPath": "../../icons/file_type_light_mailing.svg" }, - "_f_manifest": { "iconPath": "../../icons/file_type_manifest.svg" }, - "_f_manifest_bak": { "iconPath": "../../icons/file_type_manifest_bak.svg" }, - "_f_manifest_skip": { "iconPath": "../../icons/file_type_manifest_skip.svg" }, - "_f_map": { "iconPath": "../../icons/file_type_map.svg" }, - "_f_markdown": { "iconPath": "../../icons/file_type_markdown.svg" }, - "_f_markdownlint": { "iconPath": "../../icons/file_type_markdownlint.svg" }, - "_f_markdownlint_ignore": { "iconPath": "../../icons/file_type_markdownlint_ignore.svg" }, - "_f_marko": { "iconPath": "../../icons/file_type_marko.svg" }, - "_f_markojs": { "iconPath": "../../icons/file_type_markojs.svg" }, - "_f_markuplint": { "iconPath": "../../icons/file_type_markuplint.svg" }, - "_f_light_markuplint": { "iconPath": "../../icons/file_type_light_markuplint.svg" }, - "_f_master-co": { "iconPath": "../../icons/file_type_master-co.svg" }, - "_f_matlab": { "iconPath": "../../icons/file_type_matlab.svg" }, - "_f_maven": { "iconPath": "../../icons/file_type_maven.svg" }, - "_f_maxscript": { "iconPath": "../../icons/file_type_maxscript.svg" }, - "_f_maya": { "iconPath": "../../icons/file_type_maya.svg" }, - "_f_mcp": { "iconPath": "../../icons/file_type_mcp.svg" }, - "_f_light_mcp": { "iconPath": "../../icons/file_type_light_mcp.svg" }, - "_f_mdx": { "iconPath": "../../icons/file_type_mdx.svg" }, - "_f_light_mdx": { "iconPath": "../../icons/file_type_light_mdx.svg" }, - "_f_mdx-components": { "iconPath": "../../icons/file_type_mdx-components.svg" }, - "_f_light_mdx-components": { "iconPath": "../../icons/file_type_light_mdx-components.svg" }, - "_f_mdxlint": { "iconPath": "../../icons/file_type_mdxlint.svg" }, - "_f_mediawiki": { "iconPath": "../../icons/file_type_mediawiki.svg" }, - "_f_mercurial": { "iconPath": "../../icons/file_type_mercurial.svg" }, - "_f_mermaid": { "iconPath": "../../icons/file_type_mermaid.svg" }, - "_f_meson": { "iconPath": "../../icons/file_type_meson.svg" }, - "_f_metal": { "iconPath": "../../icons/file_type_metal.svg" }, - "_f_meteor": { "iconPath": "../../icons/file_type_meteor.svg" }, - "_f_minecraft": { "iconPath": "../../icons/file_type_minecraft.svg" }, - "_f_mivascript": { "iconPath": "../../icons/file_type_mivascript.svg" }, - "_f_mjml": { "iconPath": "../../icons/file_type_mjml.svg" }, - "_f_mlang": { "iconPath": "../../icons/file_type_mlang.svg" }, - "_f_light_mlang": { "iconPath": "../../icons/file_type_light_mlang.svg" }, - "_f_mocha": { "iconPath": "../../icons/file_type_mocha.svg" }, - "_f_modernizr": { "iconPath": "../../icons/file_type_modernizr.svg" }, - "_f_mojo": { "iconPath": "../../icons/file_type_mojo.svg" }, - "_f_mojolicious": { "iconPath": "../../icons/file_type_mojolicious.svg" }, - "_f_moleculer": { "iconPath": "../../icons/file_type_moleculer.svg" }, - "_f_mondoo": { "iconPath": "../../icons/file_type_mondoo.svg" }, - "_f_mongo": { "iconPath": "../../icons/file_type_mongo.svg" }, - "_f_monotone": { "iconPath": "../../icons/file_type_monotone.svg" }, - "_f_motif": { "iconPath": "../../icons/file_type_motif.svg" }, - "_f_mson": { "iconPath": "../../icons/file_type_mson.svg" }, - "_f_mustache": { "iconPath": "../../icons/file_type_mustache.svg" }, - "_f_light_mustache": { "iconPath": "../../icons/file_type_light_mustache.svg" }, - "_f_mvt": { "iconPath": "../../icons/file_type_mvt.svg" }, - "_f_mvtcss": { "iconPath": "../../icons/file_type_mvtcss.svg" }, - "_f_mvtjs": { "iconPath": "../../icons/file_type_mvtjs.svg" }, - "_f_mypy": { "iconPath": "../../icons/file_type_mypy.svg" }, - "_f_light_mypy": { "iconPath": "../../icons/file_type_light_mypy.svg" }, - "_f_nanostaged": { "iconPath": "../../icons/file_type_nanostaged.svg" }, - "_f_ndst": { "iconPath": "../../icons/file_type_ndst.svg" }, - "_f_nearly": { "iconPath": "../../icons/file_type_nearly.svg" }, - "_f_neo4j": { "iconPath": "../../icons/file_type_neo4j.svg" }, - "_f_light_neo4j": { "iconPath": "../../icons/file_type_light_neo4j.svg" }, - "_f_nestjs": { "iconPath": "../../icons/file_type_nestjs.svg" }, - "_f_netlify": { "iconPath": "../../icons/file_type_netlify.svg" }, - "_f_light_netlify": { "iconPath": "../../icons/file_type_light_netlify.svg" }, - "_f_next": { "iconPath": "../../icons/file_type_next.svg" }, - "_f_light_next": { "iconPath": "../../icons/file_type_light_next.svg" }, - "_f_nextflow": { "iconPath": "../../icons/file_type_nextflow.svg" }, - "_f_ng_tailwind": { "iconPath": "../../icons/file_type_ng_tailwind.svg" }, - "_f_nginx": { "iconPath": "../../icons/file_type_nginx.svg" }, - "_f_nim": { "iconPath": "../../icons/file_type_nim.svg" }, - "_f_nimble": { "iconPath": "../../icons/file_type_nimble.svg" }, - "_f_ninja": { "iconPath": "../../icons/file_type_ninja.svg" }, - "_f_nix": { "iconPath": "../../icons/file_type_nix.svg" }, - "_f_njsproj": { "iconPath": "../../icons/file_type_njsproj.svg" }, - "_f_noc": { "iconPath": "../../icons/file_type_noc.svg" }, - "_f_node": { "iconPath": "../../icons/file_type_node.svg" }, - "_f_nodemon": { "iconPath": "../../icons/file_type_nodemon.svg" }, - "_f_npm": { "iconPath": "../../icons/file_type_npm.svg" }, - "_f_npmpackagejsonlint": { "iconPath": "../../icons/file_type_npmpackagejsonlint.svg" }, - "_f_nsi": { "iconPath": "../../icons/file_type_nsi.svg" }, - "_f_nsri": { "iconPath": "../../icons/file_type_nsri.svg" }, - "_f_nsri-integrity": { "iconPath": "../../icons/file_type_nsri-integrity.svg" }, - "_f_nuget": { "iconPath": "../../icons/file_type_nuget.svg" }, - "_f_numpy": { "iconPath": "../../icons/file_type_numpy.svg" }, - "_f_nunjucks": { "iconPath": "../../icons/file_type_nunjucks.svg" }, - "_f_nushell": { "iconPath": "../../icons/file_type_nushell.svg" }, - "_f_nuxt": { "iconPath": "../../icons/file_type_nuxt.svg" }, - "_f_nx": { "iconPath": "../../icons/file_type_nx.svg" }, - "_f_light_nx": { "iconPath": "../../icons/file_type_light_nx.svg" }, - "_f_nyc": { "iconPath": "../../icons/file_type_nyc.svg" }, - "_f_objectivec": { "iconPath": "../../icons/file_type_objectivec.svg" }, - "_f_objectivecpp": { "iconPath": "../../icons/file_type_objectivecpp.svg" }, - "_f_objidconfig": { "iconPath": "../../icons/file_type_objidconfig.svg" }, - "_f_light_objidconfig": { "iconPath": "../../icons/file_type_light_objidconfig.svg" }, - "_f_ocaml": { "iconPath": "../../icons/file_type_ocaml.svg" }, - "_f_ocaml_intf": { "iconPath": "../../icons/file_type_ocaml_intf.svg" }, - "_f_ogone": { "iconPath": "../../icons/file_type_ogone.svg" }, - "_f_onenote": { "iconPath": "../../icons/file_type_onenote.svg" }, - "_f_opam": { "iconPath": "../../icons/file_type_opam.svg" }, - "_f_openHAB": { "iconPath": "../../icons/file_type_openHAB.svg" }, - "_f_light_openHAB": { "iconPath": "../../icons/file_type_light_openHAB.svg" }, - "_f_opencl": { "iconPath": "../../icons/file_type_opencl.svg" }, - "_f_openscad": { "iconPath": "../../icons/file_type_openscad.svg" }, - "_f_opentofu": { "iconPath": "../../icons/file_type_opentofu.svg" }, - "_f_org": { "iconPath": "../../icons/file_type_org.svg" }, - "_f_outlook": { "iconPath": "../../icons/file_type_outlook.svg" }, - "_f_ovpn": { "iconPath": "../../icons/file_type_ovpn.svg" }, - "_f_oxc": { "iconPath": "../../icons/file_type_oxc.svg" }, - "_f_light_oxc": { "iconPath": "../../icons/file_type_light_oxc.svg" }, - "_f_package": { "iconPath": "../../icons/file_type_package.svg" }, - "_f_packship": { "iconPath": "../../icons/file_type_packship.svg" }, - "_f_light_packship": { "iconPath": "../../icons/file_type_light_packship.svg" }, - "_f_paket": { "iconPath": "../../icons/file_type_paket.svg" }, - "_f_pandacss": { "iconPath": "../../icons/file_type_pandacss.svg" }, - "_f_patch": { "iconPath": "../../icons/file_type_patch.svg" }, - "_f_pcl": { "iconPath": "../../icons/file_type_pcl.svg" }, - "_f_light_pcl": { "iconPath": "../../icons/file_type_light_pcl.svg" }, - "_f_pddl": { "iconPath": "../../icons/file_type_pddl.svg" }, - "_f_pddl_happenings": { "iconPath": "../../icons/file_type_pddl_happenings.svg" }, - "_f_pddl_plan": { "iconPath": "../../icons/file_type_pddl_plan.svg" }, - "_f_pdf": { "iconPath": "../../icons/file_type_pdf.svg" }, - "_f_pdm": { "iconPath": "../../icons/file_type_pdm.svg" }, - "_f_peeky": { "iconPath": "../../icons/file_type_peeky.svg" }, - "_f_perl": { "iconPath": "../../icons/file_type_perl.svg" }, - "_f_perl6": { "iconPath": "../../icons/file_type_perl6.svg" }, - "_f_pgsql": { "iconPath": "../../icons/file_type_pgsql.svg" }, - "_f_photoshop": { "iconPath": "../../icons/file_type_photoshop.svg" }, - "_f_php": { "iconPath": "../../icons/file_type_php.svg" }, - "_f_phpcsfixer": { "iconPath": "../../icons/file_type_phpcsfixer.svg" }, - "_f_phpstan": { "iconPath": "../../icons/file_type_phpstan.svg" }, - "_f_phpunit": { "iconPath": "../../icons/file_type_phpunit.svg" }, - "_f_phraseapp": { "iconPath": "../../icons/file_type_phraseapp.svg" }, - "_f_pine": { "iconPath": "../../icons/file_type_pine.svg" }, - "_f_pip": { "iconPath": "../../icons/file_type_pip.svg" }, - "_f_pipeline": { "iconPath": "../../icons/file_type_pipeline.svg" }, - "_f_plantuml": { "iconPath": "../../icons/file_type_plantuml.svg" }, - "_f_platformio": { "iconPath": "../../icons/file_type_platformio.svg" }, - "_f_playwright": { "iconPath": "../../icons/file_type_playwright.svg" }, - "_f_plsql": { "iconPath": "../../icons/file_type_plsql.svg" }, - "_f_plsql_package": { "iconPath": "../../icons/file_type_plsql_package.svg" }, - "_f_plsql_package_body": { "iconPath": "../../icons/file_type_plsql_package_body.svg" }, - "_f_plsql_package_header": { "iconPath": "../../icons/file_type_plsql_package_header.svg" }, - "_f_plsql_package_spec": { "iconPath": "../../icons/file_type_plsql_package_spec.svg" }, - "_f_pm2": { "iconPath": "../../icons/file_type_pm2.svg" }, - "_f_pnpm": { "iconPath": "../../icons/file_type_pnpm.svg" }, - "_f_light_pnpm": { "iconPath": "../../icons/file_type_light_pnpm.svg" }, - "_f_poedit": { "iconPath": "../../icons/file_type_poedit.svg" }, - "_f_poetry": { "iconPath": "../../icons/file_type_poetry.svg" }, - "_f_polyglot": { "iconPath": "../../icons/file_type_polyglot.svg" }, - "_f_polymer": { "iconPath": "../../icons/file_type_polymer.svg" }, - "_f_pony": { "iconPath": "../../icons/file_type_pony.svg" }, - "_f_postcss": { "iconPath": "../../icons/file_type_postcss.svg" }, - "_f_postcssconfig": { "iconPath": "../../icons/file_type_postcssconfig.svg" }, - "_f_postman": { "iconPath": "../../icons/file_type_postman.svg" }, - "_f_postscript": { "iconPath": "../../icons/file_type_postscript.svg" }, - "_f_powerpoint": { "iconPath": "../../icons/file_type_powerpoint.svg" }, - "_f_powershell": { "iconPath": "../../icons/file_type_powershell.svg" }, - "_f_powershell_format": { "iconPath": "../../icons/file_type_powershell_format.svg" }, - "_f_powershell_psd": { "iconPath": "../../icons/file_type_powershell_psd.svg" }, - "_f_powershell_psm": { "iconPath": "../../icons/file_type_powershell_psm.svg" }, - "_f_powershell_types": { "iconPath": "../../icons/file_type_powershell_types.svg" }, - "_f_preact": { "iconPath": "../../icons/file_type_preact.svg" }, - "_f_precommit": { "iconPath": "../../icons/file_type_precommit.svg" }, - "_f_prettier": { "iconPath": "../../icons/file_type_prettier.svg" }, - "_f_light_prettier": { "iconPath": "../../icons/file_type_light_prettier.svg" }, - "_f_prisma": { "iconPath": "../../icons/file_type_prisma.svg" }, - "_f_light_prisma": { "iconPath": "../../icons/file_type_light_prisma.svg" }, - "_f_prismaconfig": { "iconPath": "../../icons/file_type_prismaconfig.svg" }, - "_f_processinglang": { "iconPath": "../../icons/file_type_processinglang.svg" }, - "_f_procfile": { "iconPath": "../../icons/file_type_procfile.svg" }, - "_f_progress": { "iconPath": "../../icons/file_type_progress.svg" }, - "_f_prolog": { "iconPath": "../../icons/file_type_prolog.svg" }, - "_f_prometheus": { "iconPath": "../../icons/file_type_prometheus.svg" }, - "_f_protobuf": { "iconPath": "../../icons/file_type_protobuf.svg" }, - "_f_protractor": { "iconPath": "../../icons/file_type_protractor.svg" }, - "_f_publiccode": { "iconPath": "../../icons/file_type_publiccode.svg" }, - "_f_publisher": { "iconPath": "../../icons/file_type_publisher.svg" }, - "_f_pug": { "iconPath": "../../icons/file_type_pug.svg" }, - "_f_pulumi": { "iconPath": "../../icons/file_type_pulumi.svg" }, - "_f_puppet": { "iconPath": "../../icons/file_type_puppet.svg" }, - "_f_purescript": { "iconPath": "../../icons/file_type_purescript.svg" }, - "_f_light_purescript": { "iconPath": "../../icons/file_type_light_purescript.svg" }, - "_f_purgecss": { "iconPath": "../../icons/file_type_purgecss.svg" }, - "_f_pyenv": { "iconPath": "../../icons/file_type_pyenv.svg" }, - "_f_pypi": { "iconPath": "../../icons/file_type_pypi.svg" }, - "_f_pyret": { "iconPath": "../../icons/file_type_pyret.svg" }, - "_f_pyscript": { "iconPath": "../../icons/file_type_pyscript.svg" }, - "_f_pytest": { "iconPath": "../../icons/file_type_pytest.svg" }, - "_f_python": { "iconPath": "../../icons/file_type_python.svg" }, - "_f_pythowo": { "iconPath": "../../icons/file_type_pythowo.svg" }, - "_f_pytyped": { "iconPath": "../../icons/file_type_pytyped.svg" }, - "_f_pyup": { "iconPath": "../../icons/file_type_pyup.svg" }, - "_f_q": { "iconPath": "../../icons/file_type_q.svg" }, - "_f_qbs": { "iconPath": "../../icons/file_type_qbs.svg" }, - "_f_qlikview": { "iconPath": "../../icons/file_type_qlikview.svg" }, - "_f_qml": { "iconPath": "../../icons/file_type_qml.svg" }, - "_f_qmldir": { "iconPath": "../../icons/file_type_qmldir.svg" }, - "_f_qsharp": { "iconPath": "../../icons/file_type_qsharp.svg" }, - "_f_quasar": { "iconPath": "../../icons/file_type_quasar.svg" }, - "_f_light_quasar": { "iconPath": "../../icons/file_type_light_quasar.svg" }, - "_f_r": { "iconPath": "../../icons/file_type_r.svg" }, - "_f_ra_syntax_tree": { "iconPath": "../../icons/file_type_ra_syntax_tree.svg" }, - "_f_racket": { "iconPath": "../../icons/file_type_racket.svg" }, - "_f_rails": { "iconPath": "../../icons/file_type_rails.svg" }, - "_f_rake": { "iconPath": "../../icons/file_type_rake.svg" }, - "_f_raku": { "iconPath": "../../icons/file_type_raku.svg" }, - "_f_light_raku": { "iconPath": "../../icons/file_type_light_raku.svg" }, - "_f_raml": { "iconPath": "../../icons/file_type_raml.svg" }, - "_f_razor": { "iconPath": "../../icons/file_type_razor.svg" }, - "_f_razzle": { "iconPath": "../../icons/file_type_razzle.svg" }, - "_f_light_razzle": { "iconPath": "../../icons/file_type_light_razzle.svg" }, - "_f_reactjs": { "iconPath": "../../icons/file_type_reactjs.svg" }, - "_f_reactrouter": { "iconPath": "../../icons/file_type_reactrouter.svg" }, - "_f_light_reactrouter": { "iconPath": "../../icons/file_type_light_reactrouter.svg" }, - "_f_reacttemplate": { "iconPath": "../../icons/file_type_reacttemplate.svg" }, - "_f_reactts": { "iconPath": "../../icons/file_type_reactts.svg" }, - "_f_reason": { "iconPath": "../../icons/file_type_reason.svg" }, - "_f_red": { "iconPath": "../../icons/file_type_red.svg" }, - "_f_registry": { "iconPath": "../../icons/file_type_registry.svg" }, - "_f_rego": { "iconPath": "../../icons/file_type_rego.svg" }, - "_f_rehype": { "iconPath": "../../icons/file_type_rehype.svg" }, - "_f_light_rehype": { "iconPath": "../../icons/file_type_light_rehype.svg" }, - "_f_remark": { "iconPath": "../../icons/file_type_remark.svg" }, - "_f_light_remark": { "iconPath": "../../icons/file_type_light_remark.svg" }, - "_f_renovate": { "iconPath": "../../icons/file_type_renovate.svg" }, - "_f_replit": { "iconPath": "../../icons/file_type_replit.svg" }, - "_f_light_replit": { "iconPath": "../../icons/file_type_light_replit.svg" }, - "_f_rescript": { "iconPath": "../../icons/file_type_rescript.svg" }, - "_f_rest": { "iconPath": "../../icons/file_type_rest.svg" }, - "_f_retext": { "iconPath": "../../icons/file_type_retext.svg" }, - "_f_light_retext": { "iconPath": "../../icons/file_type_light_retext.svg" }, - "_f_rexx": { "iconPath": "../../icons/file_type_rexx.svg" }, - "_f_riot": { "iconPath": "../../icons/file_type_riot.svg" }, - "_f_ripple": { "iconPath": "../../icons/file_type_ripple.svg" }, - "_f_rmd": { "iconPath": "../../icons/file_type_rmd.svg" }, - "_f_rnc": { "iconPath": "../../icons/file_type_rnc.svg" }, - "_f_robotframework": { "iconPath": "../../icons/file_type_robotframework.svg" }, - "_f_robots": { "iconPath": "../../icons/file_type_robots.svg" }, - "_f_rolldown": { "iconPath": "../../icons/file_type_rolldown.svg" }, - "_f_light_rolldown": { "iconPath": "../../icons/file_type_light_rolldown.svg" }, - "_f_rollup": { "iconPath": "../../icons/file_type_rollup.svg" }, - "_f_rome": { "iconPath": "../../icons/file_type_rome.svg" }, - "_f_light_rome": { "iconPath": "../../icons/file_type_light_rome.svg" }, - "_f_ron": { "iconPath": "../../icons/file_type_ron.svg" }, - "_f_rproj": { "iconPath": "../../icons/file_type_rproj.svg" }, - "_f_rspec": { "iconPath": "../../icons/file_type_rspec.svg" }, - "_f_rss": { "iconPath": "../../icons/file_type_rss.svg" }, - "_f_rubocop": { "iconPath": "../../icons/file_type_rubocop.svg" }, - "_f_light_rubocop": { "iconPath": "../../icons/file_type_light_rubocop.svg" }, - "_f_ruby": { "iconPath": "../../icons/file_type_ruby.svg" }, - "_f_rust": { "iconPath": "../../icons/file_type_rust.svg" }, - "_f_light_rust": { "iconPath": "../../icons/file_type_light_rust.svg" }, - "_f_rust_toolchain": { "iconPath": "../../icons/file_type_rust_toolchain.svg" }, - "_f_light_rust_toolchain": { "iconPath": "../../icons/file_type_light_rust_toolchain.svg" }, - "_f_s-lang": { "iconPath": "../../icons/file_type_s-lang.svg" }, - "_f_safetensors": { "iconPath": "../../icons/file_type_safetensors.svg" }, - "_f_light_safetensors": { "iconPath": "../../icons/file_type_light_safetensors.svg" }, - "_f_sails": { "iconPath": "../../icons/file_type_sails.svg" }, - "_f_saltstack": { "iconPath": "../../icons/file_type_saltstack.svg" }, - "_f_san": { "iconPath": "../../icons/file_type_san.svg" }, - "_f_sapphire_framework_cli": { "iconPath": "../../icons/file_type_sapphire_framework_cli.svg" }, - "_f_sas": { "iconPath": "../../icons/file_type_sas.svg" }, - "_f_sass": { "iconPath": "../../icons/file_type_sass.svg" }, - "_f_sbt": { "iconPath": "../../icons/file_type_sbt.svg" }, - "_f_scala": { "iconPath": "../../icons/file_type_scala.svg" }, - "_f_scilab": { "iconPath": "../../icons/file_type_scilab.svg" }, - "_f_script": { "iconPath": "../../icons/file_type_script.svg" }, - "_f_scss": { "iconPath": "../../icons/file_type_scss.svg" }, - "_f_sdlang": { "iconPath": "../../icons/file_type_sdlang.svg" }, - "_f_search_result": { "iconPath": "../../icons/file_type_search_result.svg" }, - "_f_seedkit": { "iconPath": "../../icons/file_type_seedkit.svg" }, - "_f_sentry": { "iconPath": "../../icons/file_type_sentry.svg" }, - "_f_sequelize": { "iconPath": "../../icons/file_type_sequelize.svg" }, - "_f_serverless": { "iconPath": "../../icons/file_type_serverless.svg" }, - "_f_shadcn": { "iconPath": "../../icons/file_type_shadcn.svg" }, - "_f_light_shadcn": { "iconPath": "../../icons/file_type_light_shadcn.svg" }, - "_f_shaderlab": { "iconPath": "../../icons/file_type_shaderlab.svg" }, - "_f_light_shaderlab": { "iconPath": "../../icons/file_type_light_shaderlab.svg" }, - "_f_shell": { "iconPath": "../../icons/file_type_shell.svg" }, - "_f_shellcheck": { "iconPath": "../../icons/file_type_shellcheck.svg" }, - "_f_shuttle": { "iconPath": "../../icons/file_type_shuttle.svg" }, - "_f_silverstripe": { "iconPath": "../../icons/file_type_silverstripe.svg" }, - "_f_sino": { "iconPath": "../../icons/file_type_sino.svg" }, - "_f_sitemap": { "iconPath": "../../icons/file_type_sitemap.svg" }, - "_f_siyuan": { "iconPath": "../../icons/file_type_siyuan.svg" }, - "_f_sketch": { "iconPath": "../../icons/file_type_sketch.svg" }, - "_f_skipper": { "iconPath": "../../icons/file_type_skipper.svg" }, - "_f_slang": { "iconPath": "../../icons/file_type_slang.svg" }, - "_f_slashup": { "iconPath": "../../icons/file_type_slashup.svg" }, - "_f_slice": { "iconPath": "../../icons/file_type_slice.svg" }, - "_f_slim": { "iconPath": "../../icons/file_type_slim.svg" }, - "_f_slint": { "iconPath": "../../icons/file_type_slint.svg" }, - "_f_sln": { "iconPath": "../../icons/file_type_sln.svg" }, - "_f_smarty": { "iconPath": "../../icons/file_type_smarty.svg" }, - "_f_smithery": { "iconPath": "../../icons/file_type_smithery.svg" }, - "_f_snakemake": { "iconPath": "../../icons/file_type_snakemake.svg" }, - "_f_snapcraft": { "iconPath": "../../icons/file_type_snapcraft.svg" }, - "_f_snaplet": { "iconPath": "../../icons/file_type_snaplet.svg" }, - "_f_snort": { "iconPath": "../../icons/file_type_snort.svg" }, - "_f_snyk": { "iconPath": "../../icons/file_type_snyk.svg" }, - "_f_solidarity": { "iconPath": "../../icons/file_type_solidarity.svg" }, - "_f_solidity": { "iconPath": "../../icons/file_type_solidity.svg" }, - "_f_light_solidity": { "iconPath": "../../icons/file_type_light_solidity.svg" }, - "_f_source": { "iconPath": "../../icons/file_type_source.svg" }, - "_f_spacengine": { "iconPath": "../../icons/file_type_spacengine.svg" }, - "_f_sparql": { "iconPath": "../../icons/file_type_sparql.svg" }, - "_f_spin": { "iconPath": "../../icons/file_type_spin.svg" }, - "_f_light_spin": { "iconPath": "../../icons/file_type_light_spin.svg" }, - "_f_sqf": { "iconPath": "../../icons/file_type_sqf.svg" }, - "_f_sql": { "iconPath": "../../icons/file_type_sql.svg" }, - "_f_sqlite": { "iconPath": "../../icons/file_type_sqlite.svg" }, - "_f_squirrel": { "iconPath": "../../icons/file_type_squirrel.svg" }, - "_f_sss": { "iconPath": "../../icons/file_type_sss.svg" }, - "_f_sst": { "iconPath": "../../icons/file_type_sst.svg" }, - "_f_stackblitz": { "iconPath": "../../icons/file_type_stackblitz.svg" }, - "_f_stan": { "iconPath": "../../icons/file_type_stan.svg" }, - "_f_stata": { "iconPath": "../../icons/file_type_stata.svg" }, - "_f_stencil": { "iconPath": "../../icons/file_type_stencil.svg" }, - "_f_storyboard": { "iconPath": "../../icons/file_type_storyboard.svg" }, - "_f_storybook": { "iconPath": "../../icons/file_type_storybook.svg" }, - "_f_stryker": { "iconPath": "../../icons/file_type_stryker.svg" }, - "_f_stylable": { "iconPath": "../../icons/file_type_stylable.svg" }, - "_f_style": { "iconPath": "../../icons/file_type_style.svg" }, - "_f_styled": { "iconPath": "../../icons/file_type_styled.svg" }, - "_f_stylelint": { "iconPath": "../../icons/file_type_stylelint.svg" }, - "_f_light_stylelint": { "iconPath": "../../icons/file_type_light_stylelint.svg" }, - "_f_stylish_haskell": { "iconPath": "../../icons/file_type_stylish_haskell.svg" }, - "_f_stylus": { "iconPath": "../../icons/file_type_stylus.svg" }, - "_f_light_stylus": { "iconPath": "../../icons/file_type_light_stylus.svg" }, - "_f_sublime": { "iconPath": "../../icons/file_type_sublime.svg" }, - "_f_subversion": { "iconPath": "../../icons/file_type_subversion.svg" }, - "_f_svelte": { "iconPath": "../../icons/file_type_svelte.svg" }, - "_f_svelteconfig": { "iconPath": "../../icons/file_type_svelteconfig.svg" }, - "_f_svg": { "iconPath": "../../icons/file_type_svg.svg" }, - "_f_svgo": { "iconPath": "../../icons/file_type_svgo.svg" }, - "_f_swagger": { "iconPath": "../../icons/file_type_swagger.svg" }, - "_f_swc": { "iconPath": "../../icons/file_type_swc.svg" }, - "_f_swift": { "iconPath": "../../icons/file_type_swift.svg" }, - "_f_swig": { "iconPath": "../../icons/file_type_swig.svg" }, - "_f_symfony": { "iconPath": "../../icons/file_type_symfony.svg" }, - "_f_light_symfony": { "iconPath": "../../icons/file_type_light_symfony.svg" }, - "_f_syncpack": { "iconPath": "../../icons/file_type_syncpack.svg" }, - "_f_systemd": { "iconPath": "../../icons/file_type_systemd.svg" }, - "_f_light_systemd": { "iconPath": "../../icons/file_type_light_systemd.svg" }, - "_f_systemverilog": { "iconPath": "../../icons/file_type_systemverilog.svg" }, - "_f_light_systemverilog": { "iconPath": "../../icons/file_type_light_systemverilog.svg" }, - "_f_t4tt": { "iconPath": "../../icons/file_type_t4tt.svg" }, - "_f_tailwind": { "iconPath": "../../icons/file_type_tailwind.svg" }, - "_f_tamagui": { "iconPath": "../../icons/file_type_tamagui.svg" }, - "_f_taplo": { "iconPath": "../../icons/file_type_taplo.svg" }, - "_f_taskfile": { "iconPath": "../../icons/file_type_taskfile.svg" }, - "_f_tauri": { "iconPath": "../../icons/file_type_tauri.svg" }, - "_f_tcl": { "iconPath": "../../icons/file_type_tcl.svg" }, - "_f_teal": { "iconPath": "../../icons/file_type_teal.svg" }, - "_f_templ": { "iconPath": "../../icons/file_type_templ.svg" }, - "_f_tera": { "iconPath": "../../icons/file_type_tera.svg" }, - "_f_terraform": { "iconPath": "../../icons/file_type_terraform.svg" }, - "_f_test": { "iconPath": "../../icons/file_type_test.svg" }, - "_f_testcafe": { "iconPath": "../../icons/file_type_testcafe.svg" }, - "_f_light_testcafe": { "iconPath": "../../icons/file_type_light_testcafe.svg" }, - "_f_testjs": { "iconPath": "../../icons/file_type_testjs.svg" }, - "_f_light_testjs": { "iconPath": "../../icons/file_type_light_testjs.svg" }, - "_f_testplane": { "iconPath": "../../icons/file_type_testplane.svg" }, - "_f_testts": { "iconPath": "../../icons/file_type_testts.svg" }, - "_f_tex": { "iconPath": "../../icons/file_type_tex.svg" }, - "_f_light_tex": { "iconPath": "../../icons/file_type_light_tex.svg" }, - "_f_text": { "iconPath": "../../icons/file_type_text.svg" }, - "_f_textile": { "iconPath": "../../icons/file_type_textile.svg" }, - "_f_tfs": { "iconPath": "../../icons/file_type_tfs.svg" }, - "_f_tiltfile": { "iconPath": "../../icons/file_type_tiltfile.svg" }, - "_f_tm": { "iconPath": "../../icons/file_type_tm.svg" }, - "_f_light_tm": { "iconPath": "../../icons/file_type_light_tm.svg" }, - "_f_tmux": { "iconPath": "../../icons/file_type_tmux.svg" }, - "_f_light_tmux": { "iconPath": "../../icons/file_type_light_tmux.svg" }, - "_f_todo": { "iconPath": "../../icons/file_type_todo.svg" }, - "_f_light_todo": { "iconPath": "../../icons/file_type_light_todo.svg" }, - "_f_toit": { "iconPath": "../../icons/file_type_toit.svg" }, - "_f_light_toit": { "iconPath": "../../icons/file_type_light_toit.svg" }, - "_f_toml": { "iconPath": "../../icons/file_type_toml.svg" }, - "_f_light_toml": { "iconPath": "../../icons/file_type_light_toml.svg" }, - "_f_toon": { "iconPath": "../../icons/file_type_toon.svg" }, - "_f_light_toon": { "iconPath": "../../icons/file_type_light_toon.svg" }, - "_f_tox": { "iconPath": "../../icons/file_type_tox.svg" }, - "_f_travis": { "iconPath": "../../icons/file_type_travis.svg" }, - "_f_tree": { "iconPath": "../../icons/file_type_tree.svg" }, - "_f_light_tree": { "iconPath": "../../icons/file_type_light_tree.svg" }, - "_f_tres": { "iconPath": "../../icons/file_type_tres.svg" }, - "_f_truffle": { "iconPath": "../../icons/file_type_truffle.svg" }, - "_f_trunk": { "iconPath": "../../icons/file_type_trunk.svg" }, - "_f_tsbuildinfo": { "iconPath": "../../icons/file_type_tsbuildinfo.svg" }, - "_f_tscn": { "iconPath": "../../icons/file_type_tscn.svg" }, - "_f_tsconfig": { "iconPath": "../../icons/file_type_tsconfig.svg" }, - "_f_tsdoc": { "iconPath": "../../icons/file_type_tsdoc.svg" }, - "_f_tsdown": { "iconPath": "../../icons/file_type_tsdown.svg" }, - "_f_tslint": { "iconPath": "../../icons/file_type_tslint.svg" }, - "_f_tt": { "iconPath": "../../icons/file_type_tt.svg" }, - "_f_ttcn": { "iconPath": "../../icons/file_type_ttcn.svg" }, - "_f_tuc": { "iconPath": "../../icons/file_type_tuc.svg" }, - "_f_turbo": { "iconPath": "../../icons/file_type_turbo.svg" }, - "_f_light_turbo": { "iconPath": "../../icons/file_type_light_turbo.svg" }, - "_f_twig": { "iconPath": "../../icons/file_type_twig.svg" }, - "_f_typedoc": { "iconPath": "../../icons/file_type_typedoc.svg" }, - "_f_typescript": { "iconPath": "../../icons/file_type_typescript.svg" }, - "_f_typescriptdef": { "iconPath": "../../icons/file_type_typescriptdef.svg" }, - "_f_typo3": { "iconPath": "../../icons/file_type_typo3.svg" }, - "_f_uiua": { "iconPath": "../../icons/file_type_uiua.svg" }, - "_f_unibeautify": { "iconPath": "../../icons/file_type_unibeautify.svg" }, - "_f_light_unibeautify": { "iconPath": "../../icons/file_type_light_unibeautify.svg" }, - "_f_unison": { "iconPath": "../../icons/file_type_unison.svg" }, - "_f_unlicense": { "iconPath": "../../icons/file_type_unlicense.svg" }, - "_f_unocss": { "iconPath": "../../icons/file_type_unocss.svg" }, - "_f_uv": { "iconPath": "../../icons/file_type_uv.svg" }, - "_f_vagrant": { "iconPath": "../../icons/file_type_vagrant.svg" }, - "_f_vala": { "iconPath": "../../icons/file_type_vala.svg" }, - "_f_vanilla_extract": { "iconPath": "../../icons/file_type_vanilla_extract.svg" }, - "_f_vapi": { "iconPath": "../../icons/file_type_vapi.svg" }, - "_f_vapor": { "iconPath": "../../icons/file_type_vapor.svg" }, - "_f_vash": { "iconPath": "../../icons/file_type_vash.svg" }, - "_f_light_vash": { "iconPath": "../../icons/file_type_light_vash.svg" }, - "_f_vb": { "iconPath": "../../icons/file_type_vb.svg" }, - "_f_vba": { "iconPath": "../../icons/file_type_vba.svg" }, - "_f_vbhtml": { "iconPath": "../../icons/file_type_vbhtml.svg" }, - "_f_vbproj": { "iconPath": "../../icons/file_type_vbproj.svg" }, - "_f_vcxproj": { "iconPath": "../../icons/file_type_vcxproj.svg" }, - "_f_velocity": { "iconPath": "../../icons/file_type_velocity.svg" }, - "_f_vento": { "iconPath": "../../icons/file_type_vento.svg" }, - "_f_vercel": { "iconPath": "../../icons/file_type_vercel.svg" }, - "_f_light_vercel": { "iconPath": "../../icons/file_type_light_vercel.svg" }, - "_f_verilog": { "iconPath": "../../icons/file_type_verilog.svg" }, - "_f_vhdl": { "iconPath": "../../icons/file_type_vhdl.svg" }, - "_f_video": { "iconPath": "../../icons/file_type_video.svg" }, - "_f_view": { "iconPath": "../../icons/file_type_view.svg" }, - "_f_vim": { "iconPath": "../../icons/file_type_vim.svg" }, - "_f_vite": { "iconPath": "../../icons/file_type_vite.svg" }, - "_f_light_vite": { "iconPath": "../../icons/file_type_light_vite.svg" }, - "_f_vitest": { "iconPath": "../../icons/file_type_vitest.svg" }, - "_f_light_vitest": { "iconPath": "../../icons/file_type_light_vitest.svg" }, - "_f_vlang": { "iconPath": "../../icons/file_type_vlang.svg" }, - "_f_volt": { "iconPath": "../../icons/file_type_volt.svg" }, - "_f_vroom": { "iconPath": "../../icons/file_type_vroom.svg" }, - "_f_vscode": { "iconPath": "../../icons/file_type_vscode.svg" }, - "_f_vscode_test": { "iconPath": "../../icons/file_type_vscode_test.svg" }, - "_f_vsix": { "iconPath": "../../icons/file_type_vsix.svg" }, - "_f_light_vsix": { "iconPath": "../../icons/file_type_light_vsix.svg" }, - "_f_vsixmanifest": { "iconPath": "../../icons/file_type_vsixmanifest.svg" }, - "_f_light_vsixmanifest": { "iconPath": "../../icons/file_type_light_vsixmanifest.svg" }, - "_f_vue": { "iconPath": "../../icons/file_type_vue.svg" }, - "_f_vueconfig": { "iconPath": "../../icons/file_type_vueconfig.svg" }, - "_f_vvvvvv": { "iconPath": "../../icons/file_type_vvvvvv.svg" }, - "_f_vyper": { "iconPath": "../../icons/file_type_vyper.svg" }, - "_f_wallaby": { "iconPath": "../../icons/file_type_wallaby.svg" }, - "_f_wally": { "iconPath": "../../icons/file_type_wally.svg" }, - "_f_wasm": { "iconPath": "../../icons/file_type_wasm.svg" }, - "_f_watchmanconfig": { "iconPath": "../../icons/file_type_watchmanconfig.svg" }, - "_f_wdio": { "iconPath": "../../icons/file_type_wdio.svg" }, - "_f_weblate": { "iconPath": "../../icons/file_type_weblate.svg" }, - "_f_webpack": { "iconPath": "../../icons/file_type_webpack.svg" }, - "_f_wenyan": { "iconPath": "../../icons/file_type_wenyan.svg" }, - "_f_wercker": { "iconPath": "../../icons/file_type_wercker.svg" }, - "_f_wgsl": { "iconPath": "../../icons/file_type_wgsl.svg" }, - "_f_wikitext": { "iconPath": "../../icons/file_type_wikitext.svg" }, - "_f_windi": { "iconPath": "../../icons/file_type_windi.svg" }, - "_f_wit": { "iconPath": "../../icons/file_type_wit.svg" }, - "_f_wolfram": { "iconPath": "../../icons/file_type_wolfram.svg" }, - "_f_word": { "iconPath": "../../icons/file_type_word.svg" }, - "_f_wpml": { "iconPath": "../../icons/file_type_wpml.svg" }, - "_f_wurst": { "iconPath": "../../icons/file_type_wurst.svg" }, - "_f_wxml": { "iconPath": "../../icons/file_type_wxml.svg" }, - "_f_wxss": { "iconPath": "../../icons/file_type_wxss.svg" }, - "_f_wxt": { "iconPath": "../../icons/file_type_wxt.svg" }, - "_f_xaml": { "iconPath": "../../icons/file_type_xaml.svg" }, - "_f_xcode": { "iconPath": "../../icons/file_type_xcode.svg" }, - "_f_xfl": { "iconPath": "../../icons/file_type_xfl.svg" }, - "_f_light_xfl": { "iconPath": "../../icons/file_type_light_xfl.svg" }, - "_f_xib": { "iconPath": "../../icons/file_type_xib.svg" }, - "_f_xliff": { "iconPath": "../../icons/file_type_xliff.svg" }, - "_f_xmake": { "iconPath": "../../icons/file_type_xmake.svg" }, - "_f_xml": { "iconPath": "../../icons/file_type_xml.svg" }, - "_f_xo": { "iconPath": "../../icons/file_type_xo.svg" }, - "_f_xorg": { "iconPath": "../../icons/file_type_xorg.svg" }, - "_f_light_xorg": { "iconPath": "../../icons/file_type_light_xorg.svg" }, - "_f_xquery": { "iconPath": "../../icons/file_type_xquery.svg" }, - "_f_xsl": { "iconPath": "../../icons/file_type_xsl.svg" }, - "_f_yacc": { "iconPath": "../../icons/file_type_yacc.svg" }, - "_f_yaml": { "iconPath": "../../icons/file_type_yaml.svg" }, - "_f_light_yaml": { "iconPath": "../../icons/file_type_light_yaml.svg" }, - "_f_yamllint": { "iconPath": "../../icons/file_type_yamllint.svg" }, - "_f_yandex": { "iconPath": "../../icons/file_type_yandex.svg" }, - "_f_yang": { "iconPath": "../../icons/file_type_yang.svg" }, - "_f_yarn": { "iconPath": "../../icons/file_type_yarn.svg" }, - "_f_yeoman": { "iconPath": "../../icons/file_type_yeoman.svg" }, - "_f_zig": { "iconPath": "../../icons/file_type_zig.svg" }, - "_f_zip": { "iconPath": "../../icons/file_type_zip.svg" } - }, - "file": "_file", - "folder": "_folder", - "folderExpanded": "_folder_open", - "rootFolder": "_root_folder", - "rootFolderExpanded": "_root_folder_open", - "folderNames": { - "android": "_fd_android", - ".angular": "_fd_angular", - "apache": "_fd_apache", - "apache2": "_fd_apache", - "httpd": "_fd_apache", - "api": "_fd_api", - ".api": "_fd_api", - "apis": "_fd_api", - ".apis": "_fd_api", - "app": "_fd_app", - "apps": "_fd_app", - ".app": "_fd_app", - "application": "_fd_app", - "applications": "_fd_app", - "arangodb": "_fd_arangodb", - "arango": "_fd_arangodb", - "assets": "_fd_asset", - ".assets": "_fd_asset", - ".astro": "_fd_astro", - "audio": "_fd_audio", - ".audio": "_fd_audio", - "audios": "_fd_audio", - ".audios": "_fd_audio", - "sound": "_fd_audio", - ".sound": "_fd_audio", - "sounds": "_fd_audio", - ".sounds": "_fd_audio", - "aurelia_project": "_fd_aurelia", - "aws": "_fd_aws", - ".aws": "_fd_aws", - "azure": "_fd_azure", - ".azure": "_fd_azure", - "azure-pipelines": "_fd_azurepipelines", - ".azure-pipelines": "_fd_azurepipelines", - "bin": "_fd_binary", - ".bin": "_fd_binary", - "blocs": "_fd_bloc", - "bloc": "_fd_bloc", - "blueprint": "_fd_blueprint", - ".blueprint": "_fd_blueprint", - "blueprints": "_fd_blueprint", - ".blueprints": "_fd_blueprint", - "bot": "_fd_bot", - ".bot": "_fd_bot", - "bower_components": "_fd_bower", - ".buildkite": "_fd_buildkite", - "cake": "_fd_cake", - ".cake": "_fd_cake", - "cargo": "_fd_cargo", - ".cargo": "_fd_cargo", - "crates": "_fd_cargo", - "certificates": "_fd_certificate", - ".certificates": "_fd_certificate", - "certs": "_fd_certificate", - "certs.": "_fd_certificate", - ".changeset": "_fd_changesets", - "chef": "_fd_chef", - ".chef": "_fd_chef", - ".circleci": "_fd_circleci", - ".claude": "_fd_claude", - "cli": "_fd_cli", - "cmd": "_fd_cli", - "command": "_fd_cli", - "commands": "_fd_cli", - "commandline": "_fd_cli", - "console": "_fd_cli", - "client": "_fd_client", - "clients": "_fd_client", - ".cloudflare": "_fd_cloudflare", - "cloudflare": "_fd_cloudflare", - ".cmake": "_fd_cmake", - "cmake": "_fd_cmake", - "common": "_fd_common", - "component": "_fd_component", - "components": "_fd_component", - ".components": "_fd_component", - "gui": "_fd_component", - "src-ui": "_fd_component", - "ui": "_fd_component", - "widgets": "_fd_component", - "composer": "_fd_composer", - ".composer": "_fd_composer", - "conf": "_fd_config", - ".conf": "_fd_config", - "config": "_fd_config", - ".config": "_fd_config", - "configs": "_fd_config", - ".configs": "_fd_config", - "configuration": "_fd_config", - ".configuration": "_fd_config", - "configurations": "_fd_config", - ".configurations": "_fd_config", - "setting": "_fd_config", - ".setting": "_fd_config", - "settings": "_fd_config", - ".settings": "_fd_config", - "ini": "_fd_config", - ".ini": "_fd_config", - "initializers": "_fd_config", - ".initializers": "_fd_config", - "__controller__": "_fd_controller", - "__controllers__": "_fd_controller", - "controller": "_fd_controller", - "controllers": "_fd_controller", - ".controllers": "_fd_controller", - "__handler__": "_fd_controller", - "__handlers__": "_fd_controller", - "handler": "_fd_controller", - ".handler": "_fd_controller", - "handlers": "_fd_controller", - ".handlers": "_fd_controller", - "coverage": "_fd_coverage", - "css": "_fd_css", - "_css": "_fd_css", - "cubits": "_fd_cubit", - "cubit": "_fd_cubit", - ".cursor": "_fd_cursor", - "cypress": "_fd_cypress", - ".dapr": "_fd_dapr", - "dapr": "_fd_dapr", - "dart": "_fd_dart", - ".dart_tool": "_fd_dart", - "datadog": "_fd_datadog", - ".datadog": "_fd_datadog", - "db": "_fd_db", - "database": "_fd_db", - "sql": "_fd_db", - "data": "_fd_db", - "repo": "_fd_db", - "repository": "_fd_db", - "repositories": "_fd_db", - "store": "_fd_db", - "stores": "_fd_db", - "debian": "_fd_debian", - "deb": "_fd_debian", - ".dependabot": "_fd_dependabot", - ".devcontainer": "_fd_devcontainer", - "dist": "_fd_dist", - ".dist": "_fd_dist", - "dists": "_fd_dist", - "out": "_fd_dist", - "outs": "_fd_dist", - "export": "_fd_dist", - "exports": "_fd_dist", - "build": "_fd_dist", - ".build": "_fd_dist", - "builds": "_fd_dist", - "release": "_fd_dist", - "releases": "_fd_dist", - "target": "_fd_dist", - "targets": "_fd_dist", - "docker": "_fd_docker", - ".docker": "_fd_docker", - "docs": "_fd_docs", - "doc": "_fd_docs", - "document": "_fd_docs", - "documents": "_fd_docs", - "e2e": "_fd_e2e", - ".elasticbeanstalk": "_fd_elasticbeanstalk", - ".ebextensions": "_fd_elasticbeanstalk", - "electron": "_fd_electron", - ".expo": "_fd_expo", - ".expo-shared": "_fd_expo", - "favicon": "_fd_favicon", - "favicons": "_fd_favicon", - "flow": "_fd_flow", - "flow-typed": "_fd_flow", - "flutter": "_fd_flutter", - "Flutter": "_fd_flutter", - "fonts": "_fd_fonts", - "font": "_fd_fonts", - "fnt": "_fd_fonts", - "webfonts": "_fd_fonts", - ".front-commerce": "_fd_frontcommerce", - "gcp": "_fd_gcp", - ".gcp": "_fd_gcp", - ".gemini": "_fd_gemini", - ".git": "_fd_git", - "submodules": "_fd_git", - ".submodules": "_fd_git", - ".github": "_fd_github", - ".gitlab": "_fd_gitlab", - "godot": "_fd_godot", - ".godot": "_fd_godot", - "gradle": "_fd_gradle", - ".gradle": "_fd_gradle", - "graphql": "_fd_graphql", - "grunt": "_fd_grunt", - "gulp": "_fd_gulp", - "gulpfile.js": "_fd_gulp", - "gulpfile.coffee": "_fd_gulp", - "gulpfile.ts": "_fd_gulp", - "gulpfile.babel.js": "_fd_gulp", - "gulpfile.babel.coffee": "_fd_gulp", - "gulpfile.babel.ts": "_fd_gulp", - ".haxelib": "_fd_haxelib", - "haxe_libraries": "_fd_haxelib", - "helper": "_fd_helper", - ".helper": "_fd_helper", - "helpers": "_fd_helper", - ".helpers": "_fd_helper", - ".histoire": "_fd_histoire", - "hook": "_fd_hook", - ".hook": "_fd_hook", - "hooks": "_fd_hook", - ".hooks": "_fd_hook", - ".husky": "_fd_husky", - ".idea": "_fd_idea", - ".fig": "_fd_images", - ".figs": "_fd_images", - "images": "_fd_images", - "image": "_fd_images", - ".img": "_fd_images", - "img": "_fd_images", - ".imgs": "_fd_images", - "imgs": "_fd_images", - "icons": "_fd_images", - "icon": "_fd_images", - "ico": "_fd_images", - "screenshot": "_fd_images", - "screenshots": "_fd_images", - "svg": "_fd_images", - "texture": "_fd_images", - "textures": "_fd_images", - "include": "_fd_include", - "includes": "_fd_include", - "incl": "_fd_include", - "inc": "_fd_include", - ".include": "_fd_include", - ".includes": "_fd_include", - ".incl": "_fd_include", - ".inc": "_fd_include", - "_include": "_fd_include", - "_includes": "_fd_include", - "_incl": "_fd_include", - "_inc": "_fd_include", - "interface": "_fd_interfaces", - "interfaces": "_fd_interfaces", - "ios": "_fd_ios", - "js": "_fd_js", - "json": "_fd_json", - ".junie": "_fd_junie", - "kotlin": "_fd_kotlin", - "Kotlin": "_fd_kotlin", - ".kotlin": "_fd_kotlin", - "kubernetes": "_fd_kubernetes", - "k8s": "_fd_kubernetes", - "kube": "_fd_kubernetes", - "kuber": "_fd_kubernetes", - ".kubernetes": "_fd_kubernetes", - ".k8s": "_fd_kubernetes", - ".kube": "_fd_kubernetes", - ".kuber": "_fd_kubernetes", - "less": "_fd_less", - "_less": "_fd_less", - "lib": "_fd_library", - "libs": "_fd_library", - ".lib": "_fd_library", - ".libs": "_fd_library", - "__lib__": "_fd_library", - "__libs__": "_fd_library", - "library": "_fd_library", - "libraries": "_fd_library", - "linux": "_fd_linux", - "lang": "_fd_locale", - "language": "_fd_locale", - "languages": "_fd_locale", - "locale": "_fd_locale", - "locales": "_fd_locale", - "_locale": "_fd_locale", - "_locales": "_fd_locale", - "internationalization": "_fd_locale", - "globalization": "_fd_locale", - "localization": "_fd_locale", - "i18n": "_fd_locale", - "g11n": "_fd_locale", - "l10n": "_fd_locale", - "log": "_fd_log", - "logs": "_fd_log", - "macos": "_fd_macos", - "darwin": "_fd_macos", - "mariadb": "_fd_mariadb", - "maria": "_fd_mariadb", - ".mvn": "_fd_maven", - "mediawiki": "_fd_mediawiki", - "memcached": "_fd_memcached", - ".memcached": "_fd_memcached", - ".meteor": "_fd_meteor", - "middleware": "_fd_middleware", - "middlewares": "_fd_middleware", - ".minecraft": "_fd_minecraft", - "minikube": "_fd_minikube", - "minik8s": "_fd_minikube", - "minikuber": "_fd_minikube", - "mjml": "_fd_mjml", - ".mjml": "_fd_mjml", - "mocks": "_fd_mock", - ".mocks": "_fd_mock", - "__mocks__": "_fd_mock", - "model": "_fd_model", - ".model": "_fd_model", - "models": "_fd_model", - ".models": "_fd_model", - "entities": "_fd_model", - ".entities": "_fd_model", - "modules": "_fd_module", - "mojo": "_fd_mojo", - "mongodb": "_fd_mongodb", - "mongo": "_fd_mongodb", - ".mypy_cache": "_fd_mypy", - "mysqldb": "_fd_mysql", - "mysql": "_fd_mysql", - "netlify": "_fd_netlify", - ".next": "_fd_next", - "nginx": "_fd_nginx", - "conf.d": "_fd_nginx", - ".niv": "_fd_nix", - ".nix": "_fd_nix", - "nix": "_fd_nix", - "niv": "_fd_nix", - "node_modules": "_fd_node", - "notebooks": "_fd_notebooks", - "notebook": "_fd_notebooks", - "notification": "_fd_notification", - "notifications": "_fd_notification", - "event": "_fd_notification", - "events": "_fd_notification", - ".nuget": "_fd_nuget", - "nuxt": "_fd_nuxt", - ".nuxt": "_fd_nuxt", - "package": "_fd_package", - "packages": "_fd_package", - ".package": "_fd_package", - ".packages": "_fd_package", - "pkg": "_fd_package", - ".paket": "_fd_paket", - "php": "_fd_php", - ".pio": "_fd_platformio", - ".pioenvs": "_fd_platformio", - "plugin": "_fd_plugin", - ".plugin": "_fd_plugin", - "plugins": "_fd_plugin", - ".plugins": "_fd_plugin", - "extension": "_fd_plugin", - ".extension": "_fd_plugin", - "extensions": "_fd_plugin", - ".extensions": "_fd_plugin", - "prisma": "_fd_prisma", - "private": "_fd_private", - ".private": "_fd_private", - "public": "_fd_public", - ".public": "_fd_public", - ".pytest_cache": "_fd_pytest", - ".venv": "_fd_python", - ".virtualenv": "_fd_python", - "__pycache__": "_fd_python", - "ravendb": "_fd_ravendb", - "redis": "_fd_redis", - "redux": "_fd_redux", - "route": "_fd_route", - "routes": "_fd_route", - "_route": "_fd_route", - "_routes": "_fd_route", - "router": "_fd_route", - "routers": "_fd_route", - "sass": "_fd_sass", - "scss": "_fd_sass", - "_sass": "_fd_sass", - "_scss": "_fd_sass", - "script": "_fd_script", - "scripts": "_fd_script", - "seedkit": "_fd_seedkit", - ".seedkit": "_fd_seedkit", - "server": "_fd_server", - "service": "_fd_services", - "services": "_fd_services", - "share": "_fd_shared", - "shared": "_fd_shared", - ".share": "_fd_shared", - ".shared": "_fd_shared", - "__shared__": "_fd_shared", - "__share__": "_fd_shared", - ".snaplet": "_fd_snaplet", - ".spin": "_fd_spin", - "src": "_fd_src", - "source": "_fd_src", - "sources": "_fd_src", - "__src__": "_fd_src", - "sso": "_fd_sso", - "story": "_fd_story", - "stories": "_fd_story", - "__stories__": "_fd_story", - ".storybook": "_fd_story", - "style": "_fd_style", - "styles": "_fd_style", - "supabase": "_fd_supabase", - "svelte": "_fd_svelte", - ".svelte-kit": "_fd_svelte", - "src-tauri": "_fd_tauri", - "temp": "_fd_temp", - ".temp": "_fd_temp", - "tmp": "_fd_temp", - ".tmp": "_fd_temp", - "template": "_fd_template", - ".template": "_fd_template", - "templates": "_fd_template", - ".templates": "_fd_template", - "tests": "_fd_test", - ".tests": "_fd_test", - "test": "_fd_test", - ".test": "_fd_test", - "__tests__": "_fd_test", - "__test__": "_fd_test", - "spec": "_fd_test", - ".spec": "_fd_test", - "specs": "_fd_test", - ".specs": "_fd_test", - "integration": "_fd_test", - "theme": "_fd_theme", - "themes": "_fd_theme", - "tool": "_fd_tools", - "tools": "_fd_tools", - ".tools": "_fd_tools", - "util": "_fd_tools", - "utils": "_fd_tools", - "utilities": "_fd_tools", - "tooling": "_fd_tools", - ".travis": "_fd_travis", - ".trunk": "_fd_trunk", - ".turbo": "_fd_turbo", - "typescript": "_fd_typescript", - "ts": "_fd_typescript", - "typings": "_fd_typings", - "types": "_fd_typings", - "@types": "_fd_typings", - "vagrant": "_fd_vagrant", - ".vagrant": "_fd_vagrant", - ".vercel": "_fd_vercel", - "video": "_fd_video", - ".video": "_fd_video", - "videos": "_fd_video", - ".videos": "_fd_video", - "html": "_fd_view", - "view": "_fd_view", - "views": "_fd_view", - "layout": "_fd_view", - "layouts": "_fd_view", - "page": "_fd_view", - "pages": "_fd_view", - "_view": "_fd_view", - "_views": "_fd_view", - "_layout": "_fd_view", - "_layouts": "_fd_view", - "_page": "_fd_view", - "_pages": "_fd_view", - ".vitepress": "_fd_vitepress", - ".vs": "_fd_vs", - ".vscode": "_fd_vscode", - "vscode": "_fd_vscode", - ".vscode-test": "_fd_vscode_test", - "wasm": "_fd_wasm", - "WASM": "_fd_wasm", - "webassembly": "_fd_wasm", - "WebAssembly": "_fd_wasm", - "webpack": "_fd_webpack", - ".webpack": "_fd_webpack", - "windows": "_fd_windows", - "win32": "_fd_windows", - ".windsurf": "_fd_windsurf", - "wit": "_fd_wit", - ".web": "_fd_www", - "www": "_fd_www", - "wwwroot": "_fd_www", - "web": "_fd_www", - ".yarn": "_fd_yarn", - ".zed": "_fd_zed" - }, - "folderNamesExpanded": { - "android": "_fd_android_open", - ".angular": "_fd_angular_open", - "apache": "_fd_apache_open", - "apache2": "_fd_apache_open", - "httpd": "_fd_apache_open", - "api": "_fd_api_open", - ".api": "_fd_api_open", - "apis": "_fd_api_open", - ".apis": "_fd_api_open", - "app": "_fd_app_open", - "apps": "_fd_app_open", - ".app": "_fd_app_open", - "application": "_fd_app_open", - "applications": "_fd_app_open", - "arangodb": "_fd_arangodb_open", - "arango": "_fd_arangodb_open", - "assets": "_fd_asset_open", - ".assets": "_fd_asset_open", - ".astro": "_fd_astro_open", - "audio": "_fd_audio_open", - ".audio": "_fd_audio_open", - "audios": "_fd_audio_open", - ".audios": "_fd_audio_open", - "sound": "_fd_audio_open", - ".sound": "_fd_audio_open", - "sounds": "_fd_audio_open", - ".sounds": "_fd_audio_open", - "aurelia_project": "_fd_aurelia_open", - "aws": "_fd_aws_open", - ".aws": "_fd_aws_open", - "azure": "_fd_azure_open", - ".azure": "_fd_azure_open", - "azure-pipelines": "_fd_azurepipelines_open", - ".azure-pipelines": "_fd_azurepipelines_open", - "bin": "_fd_binary_open", - ".bin": "_fd_binary_open", - "blocs": "_fd_bloc_open", - "bloc": "_fd_bloc_open", - "blueprint": "_fd_blueprint_open", - ".blueprint": "_fd_blueprint_open", - "blueprints": "_fd_blueprint_open", - ".blueprints": "_fd_blueprint_open", - "bot": "_fd_bot_open", - ".bot": "_fd_bot_open", - "bower_components": "_fd_bower_open", - ".buildkite": "_fd_buildkite_open", - "cake": "_fd_cake_open", - ".cake": "_fd_cake_open", - "cargo": "_fd_cargo_open", - ".cargo": "_fd_cargo_open", - "crates": "_fd_cargo_open", - "certificates": "_fd_certificate_open", - ".certificates": "_fd_certificate_open", - "certs": "_fd_certificate_open", - "certs.": "_fd_certificate_open", - ".changeset": "_fd_changesets_open", - "chef": "_fd_chef_open", - ".chef": "_fd_chef_open", - ".circleci": "_fd_circleci_open", - ".claude": "_fd_claude_open", - "cli": "_fd_cli_open", - "cmd": "_fd_cli_open", - "command": "_fd_cli_open", - "commands": "_fd_cli_open", - "commandline": "_fd_cli_open", - "console": "_fd_cli_open", - "client": "_fd_client_open", - "clients": "_fd_client_open", - ".cloudflare": "_fd_cloudflare_open", - "cloudflare": "_fd_cloudflare_open", - ".cmake": "_fd_cmake_open", - "cmake": "_fd_cmake_open", - "common": "_fd_common_open", - "component": "_fd_component_open", - "components": "_fd_component_open", - ".components": "_fd_component_open", - "gui": "_fd_component_open", - "src-ui": "_fd_component_open", - "ui": "_fd_component_open", - "widgets": "_fd_component_open", - "composer": "_fd_composer_open", - ".composer": "_fd_composer_open", - "conf": "_fd_config_open", - ".conf": "_fd_config_open", - "config": "_fd_config_open", - ".config": "_fd_config_open", - "configs": "_fd_config_open", - ".configs": "_fd_config_open", - "configuration": "_fd_config_open", - ".configuration": "_fd_config_open", - "configurations": "_fd_config_open", - ".configurations": "_fd_config_open", - "setting": "_fd_config_open", - ".setting": "_fd_config_open", - "settings": "_fd_config_open", - ".settings": "_fd_config_open", - "ini": "_fd_config_open", - ".ini": "_fd_config_open", - "initializers": "_fd_config_open", - ".initializers": "_fd_config_open", - "__controller__": "_fd_controller_open", - "__controllers__": "_fd_controller_open", - "controller": "_fd_controller_open", - "controllers": "_fd_controller_open", - ".controllers": "_fd_controller_open", - "__handler__": "_fd_controller_open", - "__handlers__": "_fd_controller_open", - "handler": "_fd_controller_open", - ".handler": "_fd_controller_open", - "handlers": "_fd_controller_open", - ".handlers": "_fd_controller_open", - "coverage": "_fd_coverage_open", - "css": "_fd_css_open", - "_css": "_fd_css_open", - "cubits": "_fd_cubit_open", - "cubit": "_fd_cubit_open", - ".cursor": "_fd_cursor_open", - "cypress": "_fd_cypress_open", - ".dapr": "_fd_dapr_open", - "dapr": "_fd_dapr_open", - "dart": "_fd_dart_open", - ".dart_tool": "_fd_dart_open", - "datadog": "_fd_datadog_open", - ".datadog": "_fd_datadog_open", - "db": "_fd_db_open", - "database": "_fd_db_open", - "sql": "_fd_db_open", - "data": "_fd_db_open", - "repo": "_fd_db_open", - "repository": "_fd_db_open", - "repositories": "_fd_db_open", - "store": "_fd_db_open", - "stores": "_fd_db_open", - "debian": "_fd_debian_open", - "deb": "_fd_debian_open", - ".dependabot": "_fd_dependabot_open", - ".devcontainer": "_fd_devcontainer_open", - "dist": "_fd_dist_open", - ".dist": "_fd_dist_open", - "dists": "_fd_dist_open", - "out": "_fd_dist_open", - "outs": "_fd_dist_open", - "export": "_fd_dist_open", - "exports": "_fd_dist_open", - "build": "_fd_dist_open", - ".build": "_fd_dist_open", - "builds": "_fd_dist_open", - "release": "_fd_dist_open", - "releases": "_fd_dist_open", - "target": "_fd_dist_open", - "targets": "_fd_dist_open", - "docker": "_fd_docker_open", - ".docker": "_fd_docker_open", - "docs": "_fd_docs_open", - "doc": "_fd_docs_open", - "document": "_fd_docs_open", - "documents": "_fd_docs_open", - "e2e": "_fd_e2e_open", - ".elasticbeanstalk": "_fd_elasticbeanstalk_open", - ".ebextensions": "_fd_elasticbeanstalk_open", - "electron": "_fd_electron_open", - ".expo": "_fd_expo_open", - ".expo-shared": "_fd_expo_open", - "favicon": "_fd_favicon_open", - "favicons": "_fd_favicon_open", - "flow": "_fd_flow_open", - "flow-typed": "_fd_flow_open", - "flutter": "_fd_flutter_open", - "Flutter": "_fd_flutter_open", - "fonts": "_fd_fonts_open", - "font": "_fd_fonts_open", - "fnt": "_fd_fonts_open", - "webfonts": "_fd_fonts_open", - ".front-commerce": "_fd_frontcommerce_open", - "gcp": "_fd_gcp_open", - ".gcp": "_fd_gcp_open", - ".gemini": "_fd_gemini_open", - ".git": "_fd_git_open", - "submodules": "_fd_git_open", - ".submodules": "_fd_git_open", - ".github": "_fd_github_open", - ".gitlab": "_fd_gitlab_open", - "godot": "_fd_godot_open", - ".godot": "_fd_godot_open", - "gradle": "_fd_gradle_open", - ".gradle": "_fd_gradle_open", - "graphql": "_fd_graphql_open", - "grunt": "_fd_grunt_open", - "gulp": "_fd_gulp_open", - "gulpfile.js": "_fd_gulp_open", - "gulpfile.coffee": "_fd_gulp_open", - "gulpfile.ts": "_fd_gulp_open", - "gulpfile.babel.js": "_fd_gulp_open", - "gulpfile.babel.coffee": "_fd_gulp_open", - "gulpfile.babel.ts": "_fd_gulp_open", - ".haxelib": "_fd_haxelib_open", - "haxe_libraries": "_fd_haxelib_open", - "helper": "_fd_helper_open", - ".helper": "_fd_helper_open", - "helpers": "_fd_helper_open", - ".helpers": "_fd_helper_open", - ".histoire": "_fd_histoire_open", - "hook": "_fd_hook_open", - ".hook": "_fd_hook_open", - "hooks": "_fd_hook_open", - ".hooks": "_fd_hook_open", - ".husky": "_fd_husky_open", - ".idea": "_fd_idea_open", - ".fig": "_fd_images_open", - ".figs": "_fd_images_open", - "images": "_fd_images_open", - "image": "_fd_images_open", - ".img": "_fd_images_open", - "img": "_fd_images_open", - ".imgs": "_fd_images_open", - "imgs": "_fd_images_open", - "icons": "_fd_images_open", - "icon": "_fd_images_open", - "ico": "_fd_images_open", - "screenshot": "_fd_images_open", - "screenshots": "_fd_images_open", - "svg": "_fd_images_open", - "texture": "_fd_images_open", - "textures": "_fd_images_open", - "include": "_fd_include_open", - "includes": "_fd_include_open", - "incl": "_fd_include_open", - "inc": "_fd_include_open", - ".include": "_fd_include_open", - ".includes": "_fd_include_open", - ".incl": "_fd_include_open", - ".inc": "_fd_include_open", - "_include": "_fd_include_open", - "_includes": "_fd_include_open", - "_incl": "_fd_include_open", - "_inc": "_fd_include_open", - "interface": "_fd_interfaces_open", - "interfaces": "_fd_interfaces_open", - "ios": "_fd_ios_open", - "js": "_fd_js_open", - "json": "_fd_json_open", - ".junie": "_fd_junie_open", - "kotlin": "_fd_kotlin_open", - "Kotlin": "_fd_kotlin_open", - ".kotlin": "_fd_kotlin_open", - "kubernetes": "_fd_kubernetes_open", - "k8s": "_fd_kubernetes_open", - "kube": "_fd_kubernetes_open", - "kuber": "_fd_kubernetes_open", - ".kubernetes": "_fd_kubernetes_open", - ".k8s": "_fd_kubernetes_open", - ".kube": "_fd_kubernetes_open", - ".kuber": "_fd_kubernetes_open", - "less": "_fd_less_open", - "_less": "_fd_less_open", - "lib": "_fd_library_open", - "libs": "_fd_library_open", - ".lib": "_fd_library_open", - ".libs": "_fd_library_open", - "__lib__": "_fd_library_open", - "__libs__": "_fd_library_open", - "library": "_fd_library_open", - "libraries": "_fd_library_open", - "linux": "_fd_linux_open", - "lang": "_fd_locale_open", - "language": "_fd_locale_open", - "languages": "_fd_locale_open", - "locale": "_fd_locale_open", - "locales": "_fd_locale_open", - "_locale": "_fd_locale_open", - "_locales": "_fd_locale_open", - "internationalization": "_fd_locale_open", - "globalization": "_fd_locale_open", - "localization": "_fd_locale_open", - "i18n": "_fd_locale_open", - "g11n": "_fd_locale_open", - "l10n": "_fd_locale_open", - "log": "_fd_log_open", - "logs": "_fd_log_open", - "macos": "_fd_macos_open", - "darwin": "_fd_macos_open", - "mariadb": "_fd_mariadb_open", - "maria": "_fd_mariadb_open", - ".mvn": "_fd_maven_open", - "mediawiki": "_fd_mediawiki_open", - "memcached": "_fd_memcached_open", - ".memcached": "_fd_memcached_open", - ".meteor": "_fd_meteor_open", - "middleware": "_fd_middleware_open", - "middlewares": "_fd_middleware_open", - ".minecraft": "_fd_minecraft_open", - "minikube": "_fd_minikube_open", - "minik8s": "_fd_minikube_open", - "minikuber": "_fd_minikube_open", - "mjml": "_fd_mjml_open", - ".mjml": "_fd_mjml_open", - "mocks": "_fd_mock_open", - ".mocks": "_fd_mock_open", - "__mocks__": "_fd_mock_open", - "model": "_fd_model_open", - ".model": "_fd_model_open", - "models": "_fd_model_open", - ".models": "_fd_model_open", - "entities": "_fd_model_open", - ".entities": "_fd_model_open", - "modules": "_fd_module_open", - "mojo": "_fd_mojo_open", - "mongodb": "_fd_mongodb_open", - "mongo": "_fd_mongodb_open", - ".mypy_cache": "_fd_mypy_open", - "mysqldb": "_fd_mysql_open", - "mysql": "_fd_mysql_open", - "netlify": "_fd_netlify_open", - ".next": "_fd_next_open", - "nginx": "_fd_nginx_open", - "conf.d": "_fd_nginx_open", - ".niv": "_fd_nix_open", - ".nix": "_fd_nix_open", - "nix": "_fd_nix_open", - "niv": "_fd_nix_open", - "node_modules": "_fd_node_open", - "notebooks": "_fd_notebooks_open", - "notebook": "_fd_notebooks_open", - "notification": "_fd_notification_open", - "notifications": "_fd_notification_open", - "event": "_fd_notification_open", - "events": "_fd_notification_open", - ".nuget": "_fd_nuget_open", - "nuxt": "_fd_nuxt_open", - ".nuxt": "_fd_nuxt_open", - "package": "_fd_package_open", - "packages": "_fd_package_open", - ".package": "_fd_package_open", - ".packages": "_fd_package_open", - "pkg": "_fd_package_open", - ".paket": "_fd_paket_open", - "php": "_fd_php_open", - ".pio": "_fd_platformio_open", - ".pioenvs": "_fd_platformio_open", - "plugin": "_fd_plugin_open", - ".plugin": "_fd_plugin_open", - "plugins": "_fd_plugin_open", - ".plugins": "_fd_plugin_open", - "extension": "_fd_plugin_open", - ".extension": "_fd_plugin_open", - "extensions": "_fd_plugin_open", - ".extensions": "_fd_plugin_open", - "prisma": "_fd_prisma_open", - "private": "_fd_private_open", - ".private": "_fd_private_open", - "public": "_fd_public_open", - ".public": "_fd_public_open", - ".pytest_cache": "_fd_pytest_open", - ".venv": "_fd_python_open", - ".virtualenv": "_fd_python_open", - "__pycache__": "_fd_python_open", - "ravendb": "_fd_ravendb_open", - "redis": "_fd_redis_open", - "redux": "_fd_redux_open", - "route": "_fd_route_open", - "routes": "_fd_route_open", - "_route": "_fd_route_open", - "_routes": "_fd_route_open", - "router": "_fd_route_open", - "routers": "_fd_route_open", - "sass": "_fd_sass_open", - "scss": "_fd_sass_open", - "_sass": "_fd_sass_open", - "_scss": "_fd_sass_open", - "script": "_fd_script_open", - "scripts": "_fd_script_open", - "seedkit": "_fd_seedkit_open", - ".seedkit": "_fd_seedkit_open", - "server": "_fd_server_open", - "service": "_fd_services_open", - "services": "_fd_services_open", - "share": "_fd_shared_open", - "shared": "_fd_shared_open", - ".share": "_fd_shared_open", - ".shared": "_fd_shared_open", - "__shared__": "_fd_shared_open", - "__share__": "_fd_shared_open", - ".snaplet": "_fd_snaplet_open", - ".spin": "_fd_spin_open", - "src": "_fd_src_open", - "source": "_fd_src_open", - "sources": "_fd_src_open", - "__src__": "_fd_src_open", - "sso": "_fd_sso_open", - "story": "_fd_story_open", - "stories": "_fd_story_open", - "__stories__": "_fd_story_open", - ".storybook": "_fd_story_open", - "style": "_fd_style_open", - "styles": "_fd_style_open", - "supabase": "_fd_supabase_open", - "svelte": "_fd_svelte_open", - ".svelte-kit": "_fd_svelte_open", - "src-tauri": "_fd_tauri_open", - "temp": "_fd_temp_open", - ".temp": "_fd_temp_open", - "tmp": "_fd_temp_open", - ".tmp": "_fd_temp_open", - "template": "_fd_template_open", - ".template": "_fd_template_open", - "templates": "_fd_template_open", - ".templates": "_fd_template_open", - "tests": "_fd_test_open", - ".tests": "_fd_test_open", - "test": "_fd_test_open", - ".test": "_fd_test_open", - "__tests__": "_fd_test_open", - "__test__": "_fd_test_open", - "spec": "_fd_test_open", - ".spec": "_fd_test_open", - "specs": "_fd_test_open", - ".specs": "_fd_test_open", - "integration": "_fd_test_open", - "theme": "_fd_theme_open", - "themes": "_fd_theme_open", - "tool": "_fd_tools_open", - "tools": "_fd_tools_open", - ".tools": "_fd_tools_open", - "util": "_fd_tools_open", - "utils": "_fd_tools_open", - "utilities": "_fd_tools_open", - "tooling": "_fd_tools_open", - ".travis": "_fd_travis_open", - ".trunk": "_fd_trunk_open", - ".turbo": "_fd_turbo_open", - "typescript": "_fd_typescript_open", - "ts": "_fd_typescript_open", - "typings": "_fd_typings_open", - "types": "_fd_typings_open", - "@types": "_fd_typings_open", - "vagrant": "_fd_vagrant_open", - ".vagrant": "_fd_vagrant_open", - ".vercel": "_fd_vercel_open", - "video": "_fd_video_open", - ".video": "_fd_video_open", - "videos": "_fd_video_open", - ".videos": "_fd_video_open", - "html": "_fd_view_open", - "view": "_fd_view_open", - "views": "_fd_view_open", - "layout": "_fd_view_open", - "layouts": "_fd_view_open", - "page": "_fd_view_open", - "pages": "_fd_view_open", - "_view": "_fd_view_open", - "_views": "_fd_view_open", - "_layout": "_fd_view_open", - "_layouts": "_fd_view_open", - "_page": "_fd_view_open", - "_pages": "_fd_view_open", - ".vitepress": "_fd_vitepress_open", - ".vs": "_fd_vs_open", - ".vscode": "_fd_vscode_open", - "vscode": "_fd_vscode_open", - ".vscode-test": "_fd_vscode_test_open", - "wasm": "_fd_wasm_open", - "WASM": "_fd_wasm_open", - "webassembly": "_fd_wasm_open", - "WebAssembly": "_fd_wasm_open", - "webpack": "_fd_webpack_open", - ".webpack": "_fd_webpack_open", - "windows": "_fd_windows_open", - "win32": "_fd_windows_open", - ".windsurf": "_fd_windsurf_open", - "wit": "_fd_wit_open", - ".web": "_fd_www_open", - "www": "_fd_www_open", - "wwwroot": "_fd_www_open", - "web": "_fd_www_open", - ".yarn": "_fd_yarn_open", - ".zed": "_fd_zed_open" - }, - "fileExtensions": { - "accdb": "_f_access", - "accdt": "_f_access", - "mdb": "_f_access", - "accda": "_f_access", - "accdc": "_f_access", - "accde": "_f_access", - "accdp": "_f_access", - "accdr": "_f_access", - "accdu": "_f_access", - "ade": "_f_access", - "adp": "_f_access", - "laccdb": "_f_access", - "ldb": "_f_access", - "mam": "_f_access", - "maq": "_f_access", - "mdw": "_f_access", - "af": "_f_affinity", - "aftemplate": "_f_affinity", - "afdesign": "_f_affinitydesigner", - "affinitydesigner": "_f_affinitydesigner", - "afphoto": "_f_affinityphoto", - "affinityphoto": "_f_affinityphoto", - "afpub": "_f_affinitypublisher", - "affinitypublisher": "_f_affinitypublisher", - "ai": "_f_ai", - "dal": "_f_al_dal", - "gs": "_f_appscript", - "ino": "_f_arduino", - "pde": "_f_arduino", - "ase": "_f_aseprite", - "aseprite": "_f_aseprite", - "aspx": "_f_aspx", - "ascx": "_f_aspx", - "asm": "_f_assembly", - "s": "_f_assembly", - "astro": "_f_astro", - "atom": "_f_atom", - "aac": "_f_audio", - "act": "_f_audio", - "aiff": "_f_audio", - "amr": "_f_audio", - "ape": "_f_audio", - "au": "_f_audio", - "dct": "_f_audio", - "dss": "_f_audio", - "dvf": "_f_audio", - "flac": "_f_audio", - "gsm": "_f_audio", - "iklax": "_f_audio", - "ivs": "_f_audio", - "m4a": "_f_audio", - "m4b": "_f_audio", - "m4p": "_f_audio", - "mmf": "_f_audio", - "mogg": "_f_audio", - "mp3": "_f_audio", - "mpc": "_f_audio", - "msv": "_f_audio", - "oga": "_f_audio", - "ogg": "_f_audio", - "opus": "_f_audio", - "ra": "_f_audio", - "raw": "_f_audio", - "tta": "_f_audio", - "vox": "_f_audio", - "wav": "_f_audio", - "wma": "_f_audio", - "avif": "_f_avif", - "awk": "_f_awk", - "back": "_f_bak", - "backup": "_f_bak", - "bak": "_f_bak", - "a": "_f_binary", - "app": "_f_binary", - "bin": "_f_binary", - "cmo": "_f_binary", - "cmx": "_f_binary", - "cma": "_f_binary", - "cmxa": "_f_binary", - "cmi": "_f_binary", - "dll": "_f_binary", - "exe": "_f_binary", - "hl": "_f_binary", - "ilk": "_f_binary", - "lib": "_f_binary", - "n": "_f_binary", - "ndll": "_f_binary", - "o": "_f_binary", - "obj": "_f_binary", - "pyc": "_f_binary", - "pyd": "_f_binary", - "pyo": "_f_binary", - "pdb": "_f_binary", - "scpt": "_f_binary", - "scptd": "_f_binary", - "so": "_f_binary", - "blend": "_f_blender", - "bb": "_f_blitzbasic", - "buf.yaml": "_f_buf", - "buf.yml": "_f_buf", - "buf.gen.yml": "_f_buf", - "buf.gen.yaml": "_f_buf", - "buf.work.yaml": "_f_buf", - "buf.work.yml": "_f_buf", - "gemfile": "_f_bundler", - "gemfile.lock": "_f_bundler", - "cake": "_f_cake", - "csr": "_f_cert", - "crt": "_f_cert", - "cer": "_f_cert", - "der": "_f_cert", - "pfx": "_f_cert", - "p12": "_f_cert", - "p7b": "_f_cert", - "p7r": "_f_cert", - "src": "_f_cert", - "crl": "_f_cert", - "sst": "_f_cert", - "stl": "_f_cert", - "lucee": "_f_cf", - "h": "_f_cheader", - "class": "_f_class", - "cjm": "_f_clojure", - "cljc": "_f_clojure", - "cljs": "_f_clojurescript", - "kit": "_f_codekit", - "plist": "_f_config", - "lcov": "_f_coverage", - "hpp": "_f_cppheader", - "hh": "_f_cppheader", - "hxx": "_f_cppheader", - "h++": "_f_cppheader", - "csx": "_f_csharp", - "csproj": "_f_csproj", - "css.map": "_f_cssmap", - "cy.js": "_f_cypress_spec", - "cy.mjs": "_f_cypress_spec", - "cy.cjs": "_f_cypress_spec", - "cy.coffee": "_f_cypress_spec", - "cy.ts": "_f_cypress_spec", - "cy.tsx": "_f_cypress_spec", - "cy.jsx": "_f_cypress_spec", - "g.dart": "_f_dartlang_generated", - "freezed.dart": "_f_dartlang_generated", - "db": "_f_db", - "deb": "_f_debian", - "resolver.json": "_f_design_tokens", - "resolver.json5": "_f_design_tokens", - "resolver.jsonc": "_f_design_tokens", - "tokens.json": "_f_design_tokens", - "tokens.json5": "_f_design_tokens", - "tokens.jsonc": "_f_design_tokens", - "djt": "_f_django", - "eco": "_f_docpad", - "drawio": "_f_drawio", - "dio": "_f_drawio", - "drawio.png": "_f_drawio", - "drawio.svg": "_f_drawio", - "dio.png": "_f_drawio", - "dio.svg": "_f_drawio", - "dtd": "_f_dtd", - "eex": "_f_eex", - "heex": "_f_eex", - "phoenix-heex": "_f_eex", - "html-heex": "_f_eex", - "ejs": "_f_ejs", - "el": "_f_emacs", - "elc": "_f_emacs", - "ensime": "_f_ensime", - "eps": "_f_eps", - "epub": "_f_epub", - "excalidraw": "_f_excalidraw", - "excalidraw.json": "_f_excalidraw", - "excalidraw.svg": "_f_excalidraw", - "excalidraw.png": "_f_excalidraw", - "xls": "_f_excel", - "xlsx": "_f_excel", - "xlsm": "_f_excel", - "ods": "_f_libreoffice_calc", - "fods": "_f_libreoffice_calc", - "xlsb": "_f_excel", - "fbx": "_f_fbx", - "fba": "_f_fitbit", - "fla": "_f_fla", - "swf": "_f_flash", - "swc": "_f_flash", - "js.flow": "_f_flow", - "woff": "_f_font", - "woff2": "_f_font", - "ttf": "_f_font", - "otf": "_f_libreoffice_math", - "eot": "_f_font", - "pfa": "_f_font", - "pfb": "_f_font", - "sfd": "_f_font", - "fsproj": "_f_fsproj", - "gmx": "_f_gamemaker", - "yy": "_f_gamemaker2", - "yyp": "_f_gamemaker2", - "gd.uid": "_f_gduid", - "geojson": "_f_geojson", - "xcf": "_f_gimp", - "gleam": "_f_gleam", - "glb": "_f_gltf", - "gltf": "_f_gltf", - "am": "_f_gnu", - "ld": "_f_gnu", - "m4": "_f_gnu", - "makefile": "_f_gnu", - "godot": "_f_godot", - "gpg": "_f_gpg", - "pgp": "_f_gpg", - "gradle": "_f_gradle", - "gr": "_f_grain", - "hcl2": "_f_hashicorp", - "sentinel": "_f_hashicorp", - "hxproj": "_f_haxedevelop", - "ejs.t": "_f_hygen", - "idr": "_f_idris", - "lidr": "_f_idris", - "ibc": "_f_idrisbin", - "ipkg": "_f_idrispkg", - "jpeg": "_f_image", - "jpg": "_f_image", - "gif": "_f_image", - "png": "_f_image", - "bmp": "_f_image", - "tiff": "_f_image", - "heic": "_f_image", - "ico": "_f_image", - "icns": "_f_image", - "webp": "_f_image", - "imba": "_f_imba", - "imba2": "_f_imba", - "inc": "_f_inc", - "include": "_f_inc", - "infopathxml": "_f_infopath", - "xsn": "_f_infopath", - "xsf": "_f_infopath", - "xtp2": "_f_infopath", - "jar": "_f_jar", - "jbuilder": "_f_jbuilder", - "iml": "_f_jetbrains", - "js.map": "_f_jsmap", - "cjs.map": "_f_jsmap", - "mjs.map": "_f_jsmap", - "jsonl": "_f_json", - "ndjson": "_f_json", - "json5": "_f_json5", - "schema.json": "_f_json_schema", - "jsonld": "_f_jsonld", - "json-ld": "_f_jsonld", - "jsp": "_f_jsp", - "jss": "_f_jss", - "juice": "_f_juice", - "ipynb": "_f_jupyter", - "key": "_f_key", - "pem": "_f_key", - "ktm": "_f_kotlin", - "language-configuration.json": "_f_language_configuration", - "master": "_f_layout", - "layout.html": "_f_layout", - "layout.htm": "_f_layout", - "odb": "_f_libreoffice_base", - "otb": "_f_libreoffice_base", - "ots": "_f_libreoffice_calc", - "odg": "_f_libreoffice_draw", - "otg": "_f_libreoffice_draw", - "odp": "_f_libreoffice_impress", - "otp": "_f_libreoffice_impress", - "odf": "_f_libreoffice_math", - "odt": "_f_libreoffice_writer", - "ott": "_f_libreoffice_writer", - "enc": "_f_license", - "license": "_f_license", - "lic": "_f_license", - "hxp": "_f_lime", - "liquid": "_f_liquid", - "ls": "_f_livescript", - "lnk": "_f_lnk", - "log": "_f_log", - "tlg": "_f_log", - "luau": "_f_luau", - "crec": "_f_lync", - "ocrec": "_f_lync", - "map": "_f_map", - "mdown": "_f_markdown", - "markdown": "_f_markdown", - "marko.js": "_f_markojs", - "fig": "_f_matlab", - "mex": "_f_matlab", - "mexn": "_f_matlab", - "mexrs6": "_f_matlab", - "mn": "_f_matlab", - "mum": "_f_matlab", - "mx": "_f_matlab", - "mx3": "_f_matlab", - "rwd": "_f_matlab", - "slx": "_f_matlab", - "slddc": "_f_matlab", - "smv": "_f_matlab", - "xvc": "_f_matlab", - "mca": "_f_minecraft", - "mcmeta": "_f_minecraft", - "mojo": "_f_mojo", - "🔥": "_f_mojo", - "mql.yaml": "_f_mondoo", - "mql.yml": "_f_mondoo", - "mustache": "_f_mustache", - "mst": "_f_mustache", - "ndst.yaml": "_f_ndst", - "ndst.yml": "_f_ndst", - "ndst.json": "_f_ndst", - "njsproj": "_f_njsproj", - "noc": "_f_noc", - "nupkg": "_f_nuget", - "snupkg": "_f_nuget", - "nuspec": "_f_nuget", - "psmdcp": "_f_nuget", - "npy": "_f_numpy", - "npz": "_f_numpy", - "nunj": "_f_nunjucks", - "njs": "_f_nunjucks", - "mli": "_f_ocaml_intf", - "one": "_f_onenote", - "onepkg": "_f_onenote", - "onetoc": "_f_onenote", - "onetoc2": "_f_onenote", - "sig": "_f_onenote", - "opam": "_f_opam", - "cl": "_f_opencl", - "opencl": "_f_opencl", - "tofu": "_f_opentofu", - "tofu.json": "_f_opentofu", - "tofutest.hcl": "_f_opentofu", - "tofutest.json": "_f_opentofu", - "org": "_f_org", - "pst": "_f_outlook", - "bcmx": "_f_outlook", - "otm": "_f_outlook", - "msg": "_f_outlook", - "oft": "_f_outlook", - "ovpn": "_f_ovpn", - "pkg": "_f_package", - "paket.references": "_f_paket", - "paket.template": "_f_paket", - "patch": "_f_patch", - "pcd": "_f_pcl", - "pdf": "_f_pdf", - "psd": "_f_photoshop", - "php1": "_f_php", - "php2": "_f_php", - "php3": "_f_php", - "php4": "_f_php", - "php5": "_f_php", - "php6": "_f_php", - "phps": "_f_php", - "phpsa": "_f_php", - "phpt": "_f_php", - "phtml": "_f_php", - "phar": "_f_php", - "pipeline": "_f_pipeline", - "pu": "_f_plantuml", - "plantuml": "_f_plantuml", - "iuml": "_f_plantuml", - "puml": "_f_plantuml", - "pck": "_f_plsql_package", - "pkb": "_f_plsql_package_body", - "pkh": "_f_plsql_package_header", - "pks": "_f_plsql_package_spec", - "po": "_f_poedit", - "mo": "_f_poedit", - "postman_collection.json": "_f_postman", - "postman_environment.json": "_f_postman", - "postman_globals.json": "_f_postman", - "pot": "_f_powerpoint", - "potx": "_f_powerpoint", - "potm": "_f_powerpoint", - "pps": "_f_powerpoint", - "ppsx": "_f_powerpoint", - "ppsm": "_f_powerpoint", - "ppt": "_f_powerpoint", - "pptx": "_f_powerpoint", - "pptm": "_f_powerpoint", - "pa": "_f_powerpoint", - "ppa": "_f_powerpoint", - "ppam": "_f_powerpoint", - "sldm": "_f_powerpoint", - "sldx": "_f_powerpoint", - "format.ps1xml": "_f_powershell_format", - "psd1": "_f_powershell_psd", - "psm1": "_f_powershell_psm", - "types.ps1xml": "_f_powershell_types", - "pro": "_f_prolog", - "pub": "_f_publisher", - "puz": "_f_publisher", - "pyowo": "_f_pythowo", - "q": "_f_q", - "qbs": "_f_qbs", - "qvd": "_f_qlikview", - "qvw": "_f_qlikview", - "rast": "_f_ra_syntax_tree", - "rake": "_f_rake", - "rt": "_f_reacttemplate", - "reg": "_f_registry", - "rego": "_f_rego", - "ripple": "_f_ripple", - "rnc": "_f_rnc", - "ron": "_f_ron", - "rproj": "_f_rproj", - "rss": "_f_rss", - "rbs": "_f_ruby", - "safetensors": "_f_safetensors", - "sls": "_f_saltstack", - "sass": "_f_sass", - "scssm": "_f_scss", - "unity": "_f_shaderlab", - "fish": "_f_shell", - "sy": "_f_siyuan", - "sketch": "_f_sketch", - "eskip": "_f_skipper", - "sln": "_f_sln", - "slnx": "_f_sln", - "slnf": "_f_sln", - "spe": "_f_spacengine", - "sqlite": "_f_sqlite", - "sqlite3": "_f_sqlite", - "db3": "_f_sqlite", - "sss": "_f_sss", - "dta": "_f_stata", - "storyboard": "_f_storyboard", - "story.js": "_f_storybook", - "story.jsx": "_f_storybook", - "story.ts": "_f_storybook", - "story.tsx": "_f_storybook", - "story.mdx": "_f_storybook", - "story.svelte": "_f_storybook", - "stories.js": "_f_storybook", - "stories.jsx": "_f_storybook", - "stories.ts": "_f_storybook", - "stories.tsx": "_f_storybook", - "stories.mdx": "_f_storybook", - "stories.svelte": "_f_storybook", - "sublime-project": "_f_sublime", - "svg": "_f_svg", - "tcl": "_f_tcl", - "exp": "_f_tcl", - "templ": "_f_templ", - "tfstate": "_f_terraform", - "tfvars": "_f_terraform", - "tf": "_f_terraform", - "tf.json": "_f_terraform", - "tst": "_f_test", - "test.js": "_f_testjs", - "test.jsx": "_f_testjs", - "test.mjs": "_f_testjs", - "spec.js": "_f_testjs", - "spec.jsx": "_f_testjs", - "spec.mjs": "_f_testjs", - "testplane.ts": "_f_testplane", - "testplane.js": "_f_testplane", - "testplane.cts": "_f_testplane", - "testplane.cjs": "_f_testplane", - "testplane.tsx": "_f_testplane", - "testplane.jsx": "_f_testplane", - "test.ts": "_f_testts", - "test.tsx": "_f_testts", - "test.mts": "_f_testts", - "spec.ts": "_f_testts", - "spec.tsx": "_f_testts", - "spec.mts": "_f_testts", - "e2e-test.ts": "_f_testts", - "e2e-test.tsx": "_f_testts", - "e2e-test.mts": "_f_testts", - "e2e-spec.ts": "_f_testts", - "e2e-spec.tsx": "_f_testts", - "e2e-spec.mts": "_f_testts", - "test-d.ts": "_f_testts", - "test-d.tsx": "_f_testts", - "test-d.mts": "_f_testts", - "texi": "_f_tex", - "tikz": "_f_tex", - "csv": "_f_text", - "tsv": "_f_text", - "tm": "_f_tm", - "tm.hcl": "_f_tm", - "todo": "_f_todo", - "tree": "_f_tree", - "tres": "_f_tres", - "tsbuildinfo": "_f_tsbuildinfo", - "tscn": "_f_tscn", - "tt2": "_f_tt", - "d.ts": "_f_typescriptdef", - "d.cts": "_f_typescriptdef", - "d.mts": "_f_typescriptdef", - "ua": "_f_uiua", - "u": "_f_unison", - "vala": "_f_vala", - "css.ts": "_f_vanilla_extract", - "vapi": "_f_vapi", - "vash": "_f_vash", - "vbhtml": "_f_vbhtml", - "vbproj": "_f_vbproj", - "vcxproj": "_f_vcxproj", - "vto": "_f_vento", - "vento": "_f_vento", - "3g2": "_f_video", - "3gp": "_f_video", - "asf": "_f_video", - "amv": "_f_video", - "avi": "_f_video", - "divx": "_f_video", - "qt": "_f_video", - "f4a": "_f_video", - "f4b": "_f_video", - "f4p": "_f_video", - "f4v": "_f_video", - "flv": "_f_video", - "m2v": "_f_video", - "m4v": "_f_video", - "mkv": "_f_video", - "mk3d": "_f_video", - "mov": "_f_video", - "mp2": "_f_video", - "mp4": "_f_video", - "mpe": "_f_video", - "mpeg": "_f_video", - "mpeg2": "_f_video", - "mpg": "_f_video", - "mpv": "_f_video", - "nsv": "_f_video", - "ogv": "_f_video", - "rm": "_f_video", - "rmvb": "_f_video", - "svi": "_f_video", - "vob": "_f_video", - "webm": "_f_video", - "wmv": "_f_video", - "code-snippets": "_f_vscode", - "code-workspace": "_f_vscode", - "vsix": "_f_vsix", - "vsixmanifest": "_f_vsixmanifest", - "vvvvvv": "_f_vvvvvv", - "vyi": "_f_vyper", - "wasm": "_f_wasm", - "wikitext": "_f_wikitext", - "wit": "_f_wit", - "doc": "_f_word", - "docx": "_f_word", - "docm": "_f_word", - "dot": "_f_word", - "dotx": "_f_word", - "dotm": "_f_word", - "wll": "_f_word", - "wxml": "_f_wxml", - "wxss": "_f_wxss", - "xaml": "_f_xaml", - "axaml": "_f_xaml", - "xcodeproj": "_f_xcode", - "xfl": "_f_xfl", - "xib": "_f_xib", - "xliff": "_f_xliff", - "xlf": "_f_xliff", - "pex": "_f_xml", - "tmlanguage": "_f_xml", - "zip": "_f_zip", - "rar": "_f_zip", - "7z": "_f_zip", - "tar": "_f_zip", - "tgz": "_f_zip", - "bz": "_f_zip", - "gz": "_f_zip", - "bzip2": "_f_zip", - "xz": "_f_zip", - "bz2": "_f_zip", - "whl": "_f_zip", - "zipx": "_f_zip", - "br": "_f_zip" - }, - "fileNames": { - "agents.md": "_f_agents", - "alchemy.run.ts": "_f_alchemy", - ".all-contributorsrc": "_f_allcontributors", - "allurerc.js": "_f_allure", - "allurerc.mjs": "_f_allure", - "allurerc.cjs": "_f_allure", - "allurerc.json": "_f_allure", - "allurerc.yaml": "_f_allure", - "allurerc.yml": "_f_allure", - ".angular-cli.json": "_f_angular", - "angular-cli.json": "_f_angular", - "angular.json": "_f_angular", - ".angular.json": "_f_angular", - "antlers.html": "_f_antlers_html", - "api-extractor.json": "_f_api_extractor", - "api-extractor-base.json": "_f_api_extractor", - ".appsemblerc.yaml": "_f_appsemble", - "app-definition.yaml": "_f_appsemble", - "appveyor.yml": "_f_appveyor", - ".appveyor.yml": "_f_appveyor", - "asconfig.json": "_f_assembly_script", - "astro.config.js": "_f_astroconfig", - "astro.config.cjs": "_f_astroconfig", - "astro.config.mjs": "_f_astroconfig", - "astro.config.ts": "_f_astroconfig", - "astro.config.cts": "_f_astroconfig", - "astro.config.mts": "_f_astroconfig", - ".attw.json": "_f_attw", - "aurelia.json": "_f_aurelia", - "azure-pipelines.yml": "_f_azurepipelines", - ".vsts-ci.yml": "_f_azurepipelines", - ".babelrc": "_f_babel", - ".babelignore": "_f_babel", - ".babelrc.js": "_f_babel", - ".babelrc.cjs": "_f_babel", - ".babelrc.mjs": "_f_babel", - ".babelrc.json": "_f_babel", - "babel.config.js": "_f_babel", - "babel.config.cjs": "_f_babel", - "babel.config.mjs": "_f_babel", - "babel.config.json": "_f_babel", - ".bzrignore": "_f_bazaar", - "BUILD.bazel": "_f_bazel", - ".bazelrc": "_f_bazel", - "bazel.rc": "_f_bazel", - "bazel.bazelrc": "_f_bazel", - ".bazelignore": "_f_bazel_ignore", - ".bazelversion": "_f_bazel_version", - "biome.json": "_f_biome", - "biome.jsonc": "_f_biome", - "bitbucket-pipelines.yml": "_f_bitbucketpipeline", - ".bithoundrc": "_f_bithound", - ".bowerrc": "_f_bower", - "bower.json": "_f_bower", - ".browserslistrc": "_f_browserslist", - "browserslist": "_f_browserslist", - ".buckconfig": "_f_buckbuild", - ".bunfig.toml": "_f_bun", - "bunfig.toml": "_f_bunfig", - "bun.lockb": "_f_bun", - "bun.lock": "_f_bun", - ".bundlemonrc": "_f_bundlemon", - "bundlemon.config.js": "_f_bundlemon", - "bundlemon.config.mjs": "_f_bundlemon", - "bundlemon.config.cjs": "_f_bundlemon", - ".bundlemonrc.js": "_f_bundlemon", - ".bundlemonrc.mjs": "_f_bundlemon", - ".bundlemonrc.cjs": "_f_bundlemon", - ".bundlemonrc.json": "_f_bundlemon", - ".bundlemonrc.yaml": "_f_bundlemon", - ".bundlemonrc.yml": "_f_bundlemon", - "gemfile": "_f_bundler", - "gemfile.lock": "_f_bundler", - "capacitor.config.json": "_f_capacitor", - "capacitor.config.ts": "_f_capacitor", - "Cargo.toml": "_f_cargo", - "Cargo.lock": "_f_cargo", - ".changie.yaml": "_f_changie", - ".changie.yml": "_f_changie", - "chefignore": "_f_chef", - "berksfile": "_f_chef", - "berksfile.lock": "_f_chef", - "policyfile.rb": "_f_chef", - "policyfile.lock.json": "_f_chef", - "circle.yml": "_f_circleci", - "claude.md": "_f_claude", - "wrangler.toml": "_f_cloudflare", - ".cfignore": "_f_cloudfoundry", - ".codacy.yml": "_f_codacy", - ".codacy.yaml": "_f_codacy", - ".codeclimate.yml": "_f_codeclimate", - "codecov.yml": "_f_codecov", - ".codecov.yml": "_f_codecov", - "config.codekit": "_f_codekit", - "config.codekit2": "_f_codekit", - "config.codekit3": "_f_codekit", - ".config.codekit": "_f_codekit", - ".config.codekit2": "_f_codekit", - ".config.codekit3": "_f_codekit", - "codemagic.yaml": "_f_codemagic", - "codeowners": "_f_codeowners", - ".coderabbit.yaml": "_f_coderabbit", - "coffeelint.json": "_f_coffeelint", - ".coffeelintignore": "_f_coffeelint", - ".czrc": "_f_commitizen", - ".cz.json": "_f_commitizen", - ".commitlintrc": "_f_commitlint", - "commitlint.config.js": "_f_commitlint", - "commitlint.config.cjs": "_f_commitlint", - "commitlint.config.mjs": "_f_commitlint", - "commitlint.config.ts": "_f_commitlint", - "commitlint.config.cts": "_f_commitlint", - ".commitlintrc.json": "_f_commitlint", - ".commitlintrc.yaml": "_f_commitlint", - ".commitlintrc.yml": "_f_commitlint", - ".commitlintrc.js": "_f_commitlint", - ".commitlintrc.cjs": "_f_commitlint", - ".commitlintrc.mjs": "_f_commitlint", - ".commitlintrc.ts": "_f_commitlint", - ".commitlintrc.cts": "_f_commitlint", - "composer.json": "_f_composer", - "composer.lock": "_f_composer", - "conanfile.txt": "_f_conan", - "conanfile.py": "_f_conan", - ".condarc": "_f_conda", - ".tool-versions": "_f_config", - "copilot-instructions.md": "_f_copilot", - "github-copilot.xml": "_f_copilot", - ".coverage": "_f_coverage", - "lcov.info": "_f_coverage", - ".coveralls.yml": "_f_coveralls", - "craco.config.ts": "_f_craco", - "craco.config.js": "_f_craco", - "craco.config.cjs": "_f_craco", - ".cracorc.ts": "_f_craco", - ".cracorc.js": "_f_craco", - ".cracorc": "_f_craco", - "crowdin.yml": "_f_crowdin", - "cspell.config.json": "_f_cspell", - "cspell.config.js": "_f_cspell", - "cspell.config.mjs": "_f_cspell", - "cspell.config.cjs": "_f_cspell", - "cspell.config.yaml": "_f_cspell", - "cspell.config.yml": "_f_cspell", - "cspell.json": "_f_cspell", - "cspell.js": "_f_cspell", - "cspell.mjs": "_f_cspell", - "cspell.cjs": "_f_cspell", - "cspell.yaml": "_f_cspell", - "cspell.yml": "_f_cspell", - ".cspell.json": "_f_cspell", - ".cspell.js": "_f_cspell", - ".cspell.mjs": "_f_cspell", - ".cspell.cjs": "_f_cspell", - ".cspell.yaml": "_f_cspell", - ".cspell.yml": "_f_cspell", - ".csscomb.json": "_f_csscomb", - ".csslintrc": "_f_csslint", - ".cursorignore": "_f_cursorrules", - ".cursorindexingignore": "_f_cursorrules", - ".cursorrules": "_f_cursorrules", - ".cvsignore": "_f_cvs", - "cypress.json": "_f_cypress", - "cypress.env.json": "_f_cypress", - "cypress.config.js": "_f_cypress", - "cypress.config.ts": "_f_cypress", - "cypress.config.cjs": "_f_cypress", - "cypress.config.mjs": "_f_cypress", - ".boringignore": "_f_darcs", - ".pubignore": "_f_dartlang_ignore", - "service.datadog.yaml": "_f_datadog", - "datadog-ci.json": "_f_datadog", - "static-analysis.datadog.yml": "_f_datadog", - "static-analysis.datadog.yaml": "_f_datadog", - "aptfile": "_f_debian", - "deno.json": "_f_deno", - "deno.jsonc": "_f_deno", - "deno.lock": "_f_deno", - ".denoifyrc": "_f_denoify", - "denoify.config.json": "_f_denoify", - "denoify.config.js": "_f_denoify", - "dependabot.yml": "_f_dependabot", - "dependabot.yaml": "_f_dependabot", - "dependencies.yml": "_f_dependencies", - "devcontainer.json": "_f_devcontainer", - ".devcontainer.json": "_f_devcontainer", - "devvit.json": "_f_devvit", - "devvit.dev.json": "_f_devvit", - "devvit.prod.json": "_f_devvit", - "devvit.test.json": "_f_devvit", - "devvit.config.js": "_f_devvit", - "devvit.config.cjs": "_f_devvit", - "devvit.config.mjs": "_f_devvit", - "devvit.config.ts": "_f_devvit", - "devvit.config.mts": "_f_devvit", - "devvit.config.dev.js": "_f_devvit", - "devvit.config.dev.cjs": "_f_devvit", - "devvit.config.dev.mjs": "_f_devvit", - "devvit.config.dev.ts": "_f_devvit", - "devvit.config.dev.mts": "_f_devvit", - "devvit.config.prod.js": "_f_devvit", - "devvit.config.prod.cjs": "_f_devvit", - "devvit.config.prod.mjs": "_f_devvit", - "devvit.config.prod.ts": "_f_devvit", - "devvit.config.prod.mts": "_f_devvit", - "devvit.config.test.js": "_f_devvit", - "devvit.config.test.cjs": "_f_devvit", - "devvit.config.test.mjs": "_f_devvit", - "devvit.config.test.ts": "_f_devvit", - "devvit.config.test.mts": "_f_devvit", - ".dockerignore": "_f_docker", - "compose.yaml": "_f_docker", - "compose.yml": "_f_docker", - "docker-compose.yaml": "_f_docker", - "docker-compose.yml": "_f_docker", - "docker-compose.debug.yaml": "_f_docker", - "docker-compose.debug.yml": "_f_docker", - "docker-compose.ci-build.yaml": "_f_docker", - "docker-compose.ci-build.yml": "_f_docker", - "docker-compose.override.yaml": "_f_docker", - "docker-compose.override.yml": "_f_docker", - "docker-compose.vs.debug.yaml": "_f_docker", - "docker-compose.vs.debug.yml": "_f_docker", - "docker-compose.vs.release.yaml": "_f_docker", - "docker-compose.vs.release.yml": "_f_docker", - "docker-cloud.yaml": "_f_docker", - "docker-cloud.yml": "_f_docker", - "docker-compose.test.yml": "_f_dockertest", - "docusaurus.config.ts": "_f_docusaurus", - "docusaurus.config.mts": "_f_docusaurus", - "docusaurus.config.cts": "_f_docusaurus", - "docusaurus.config.js": "_f_docusaurus", - "docusaurus.config.mjs": "_f_docusaurus", - "docusaurus.config.cjs": "_f_docusaurus", - ".doczrc": "_f_docz", - "docz.js": "_f_docz", - "docz.json": "_f_docz", - ".docz.js": "_f_docz", - ".docz.json": "_f_docz", - "doczrc.js": "_f_docz", - "doczrc.json": "_f_docz", - "docz.config.js": "_f_docz", - "docz.config.json": "_f_docz", - ".dojorc": "_f_dojo", - "doppler.yaml": "_f_doppler", - "doppler-template.yaml": "_f_doppler", - ".drone.yml": "_f_drone", - ".drone.yml.sig": "_f_drone", - "dune": "_f_dune", - "dune-project": "_f_dune", - "dune-workspace": "_f_dune", - ".dvc": "_f_dvc", - ".earthlyignore": "_f_earthly", - "Earthfile": "_f_earthly", - "store.config.json": "_f_eas-metadata", - ".editorconfig": "_f_editorconfig", - "forge.config.js": "_f_electron", - "forge.config.ts": "_f_electron", - ".eleventy.js": "_f_eleventy", - "eleventy.config.js": "_f_eleventy", - "eleventy.config.cjs": "_f_eleventy", - "eleventy.config.mjs": "_f_eleventy", - "elm-package.json": "_f_elm", - ".ember-cli": "_f_ember", - "emakefile": "_f_erlang", - ".emakerfile": "_f_erlang", - "esbuild.js": "_f_esbuild", - "esbuild.mjs": "_f_esbuild", - "esbuild.cjs": "_f_esbuild", - "esbuild.ts": "_f_esbuild", - "esbuild.config.js": "_f_esbuild", - "esbuild.config.mjs": "_f_esbuild", - "esbuild.config.cjs": "_f_esbuild", - "esbuild.config.ts": "_f_esbuild", - ".eslintrc": "_f_eslint", - ".eslintignore": "_f_eslint", - ".eslintcache": "_f_eslint", - "eslint.config.js": "_f_eslint", - "eslint.config.mjs": "_f_eslint", - "eslint.config.cjs": "_f_eslint", - "eslint.config.ts": "_f_eslint", - "eslint.config.mts": "_f_eslint", - "eslint.config.cts": "_f_eslint", - ".eslintrc.js": "_f_eslint", - ".eslintrc.mjs": "_f_eslint", - ".eslintrc.cjs": "_f_eslint", - ".eslintrc.ts": "_f_eslint", - ".eslintrc.mts": "_f_eslint", - ".eslintrc.cts": "_f_eslint", - ".eslintrc.json": "_f_eslint", - ".eslintrc.yaml": "_f_eslint", - ".eslintrc.yml": "_f_eslint", - "app.json": "_f_expo", - "app.config.js": "_f_expo", - "app.config.json": "_f_expo", - "app.config.json5": "_f_expo", - ".fantasticonrc": "_f_fantasticon", - "fantasticonrc": "_f_fantasticon", - ".fantasticonrc.json": "_f_fantasticon", - "fantasticonrc.json": "_f_fantasticon", - ".fantasticonrc.js": "_f_fantasticon", - "fantasticonrc.js": "_f_fantasticon", - "fastly.toml": "_f_fastly", - ".faunarc": "_f_fauna", - "favicon.ico": "_f_favicon", - ".firebaserc": "_f_firebase", - "firebase.json": "_f_firebasehosting", - "storage.rules": "_f_firebasestorage", - "firestore.rules": "_f_firestore", - "firestore.indexes.json": "_f_firestore", - "flareact.config.js": "_f_flareact", - ".flooignore": "_f_floobits", - ".flowconfig": "_f_flow", - ".flutter-plugins": "_f_flutter", - ".metadata": "_f_flutter", - ".flutter-plugins-dependencies": "_f_flutter", - "pubspec.lock": "_f_flutter_package", - "pubspec.yaml": "_f_flutter_package", - ".packages": "_f_flutter_package", - "fly.toml": "_f_flyio", - "formkit.config.js": "_f_formkit", - "formkit.config.mjs": "_f_formkit", - "formkit.config.cjs": "_f_formkit", - "formkit.config.ts": "_f_formkit", - ".fossaignore": "_f_fossa", - "ignore-glob": "_f_fossil", - ".front-commerce.js": "_f_frontcommerce", - "front-commerce.config.ts": "_f_frontcommerce", - "funding.yml": "_f_funding", - "fuse.js": "_f_fusebox", - "gatsby-browser.js": "_f_gatsby", - "gatsby-browser.ts": "_f_gatsby", - "gatsby-browser.tsx": "_f_gatsby", - "gatsby-ssr.js": "_f_gatsby", - "gatsby-ssr.ts": "_f_gatsby", - "gatsby-ssr.tsx": "_f_gatsby", - "gatsby-config.js": "_f_gatsby", - "gatsby-config.ts": "_f_gatsby", - "gatsby-config.mjs": "_f_gatsby", - "gatsby-node.js": "_f_gatsby", - "gatsby-node.ts": "_f_gatsby", - "gatsby-node.mjs": "_f_gatsby", - ".gcloudignore": "_f_gcloud", - "gemini.md": "_f_gemini", - "GEMINI.md": "_f_gemini", - ".git": "_f_git", - ".gitattributes": "_f_git", - ".gitconfig": "_f_git", - ".gitignore": "_f_git", - ".gitmodules": "_f_git", - ".gitkeep": "_f_git", - ".git-blame-ignore-revs": "_f_git", - ".mailmap": "_f_git", - ".issuetracker": "_f_git", - ".gitlab-ci.yml": "_f_gitlab", - ".gitpod.yaml": "_f_gitpod", - ".gitpod.yml": "_f_gitpod", - "gitpod.yaml": "_f_gitpod", - "gitpod.yml": "_f_gitpod", - "gleam.toml": "_f_gleamconfig", - "glide.yml": "_f_glide", - ".glitterrc": "_f_glitter", - "go.sum": "_f_go_package", - "go.mod": "_f_go_package", - "go.work": "_f_go_work", - "go.work.sum": "_f_go_work", - ".gqlconfig": "_f_graphql", - ".graphqlconfig": "_f_graphql_config", - ".graphqlconfig.yml": "_f_graphql_config", - ".graphqlconfig.yaml": "_f_graphql_config", - "greenkeeper.json": "_f_greenkeeper", - "gridsome.config.js": "_f_gridsome", - "gridsome.config.ts": "_f_gridsome", - "gridsome.server.js": "_f_gridsome", - "gridsome.server.ts": "_f_gridsome", - "gridsome.client.js": "_f_gridsome", - "gridsome.client.ts": "_f_gridsome", - "gruntfile.js": "_f_grunt", - "gruntfile.cjs": "_f_grunt", - "gruntfile.coffee": "_f_grunt", - "gruntfile.ts": "_f_grunt", - "gruntfile.babel.js": "_f_grunt", - "gruntfile.babel.cjs": "_f_grunt", - "gruntfile.babel.coffee": "_f_grunt", - "gruntfile.babel.ts": "_f_grunt", - "gulpfile.js": "_f_gulp", - "gulpfile.coffee": "_f_gulp", - "gulpfile.ts": "_f_gulp", - "gulpfile.mjs": "_f_gulp", - "gulpfile.esm.js": "_f_gulp", - "gulpfile.esm.coffee": "_f_gulp", - "gulpfile.esm.ts": "_f_gulp", - "gulpfile.esm.mjs": "_f_gulp", - "gulpfile.babel.js": "_f_gulp", - "gulpfile.babel.coffee": "_f_gulp", - "gulpfile.babel.ts": "_f_gulp", - "gulpfile.babel.mjs": "_f_gulp", - "hardhat.config.cjs": "_f_hardhat", - "hardhat.config.js": "_f_hardhat", - "hardhat.config.ts": "_f_hardhat", - "haxelib.json": "_f_haxe", - "checkstyle.json": "_f_haxecheckstyle", - ".p4ignore": "_f_helix", - "chart.lock": "_f_helm", - "chart.yaml": "_f_helm", - "histoire.config.ts": "_f_histoire", - "histoire.config.js": "_f_histoire", - ".histoire.ts": "_f_histoire", - ".histoire.js": "_f_histoire", - "horusec-config.json": "_f_horusec", - ".htmlhintrc": "_f_htmlhint", - ".htmlvalidateignore": "_f_htmlvalidate", - ".htmlvalidate.js": "_f_htmlvalidate", - ".htmlvalidate.cjs": "_f_htmlvalidate", - ".htmlvalidate.json": "_f_htmlvalidate", - "hugo.json": "_f_hugo", - "hugo.toml": "_f_hugo", - "hugo.yaml": "_f_hugo", - ".hugo_build.lock": "_f_hugo", - "humans.txt": "_f_humanstxt", - ".huskyrc": "_f_husky", - "husky.config.js": "_f_husky", - ".huskyrc.js": "_f_husky", - ".huskyrc.json": "_f_husky", - ".huskyrc.yaml": "_f_husky", - ".huskyrc.yml": "_f_husky", - "ionic.project": "_f_ionic", - "ionic.config.json": "_f_ionic", - "jakefile": "_f_jake", - "jakefile.js": "_f_jake", - "jasmine.json": "_f_jasmine", - ".nojekyll": "_f_jekyll", - "jest.json": "_f_jest", - "jest.config.babel.js": "_f_jest", - ".jestrc": "_f_jest", - ".jestrc.js": "_f_jest", - ".jestrc.json": "_f_jest", - "jest.config.js": "_f_jest", - "jest.config.cjs": "_f_jest", - "jest.config.mjs": "_f_jest", - "jest.config.json": "_f_jest", - "jest.config.ts": "_f_jest", - "jest.config.base.js": "_f_jest", - "jest.config.base.cjs": "_f_jest", - "jest.config.base.mjs": "_f_jest", - "jest.config.base.json": "_f_jest", - "jest.config.base.ts": "_f_jest", - "jest.config.common.js": "_f_jest", - "jest.config.common.cjs": "_f_jest", - "jest.config.common.mjs": "_f_jest", - "jest.config.common.json": "_f_jest", - "jest.config.common.ts": "_f_jest", - "jest.config.e2e.js": "_f_jest", - "jest.config.e2e.cjs": "_f_jest", - "jest.config.e2e.mjs": "_f_jest", - "jest.config.e2e.json": "_f_jest", - "jest.config.e2e.ts": "_f_jest", - "jest.config.int.js": "_f_jest", - "jest.config.int.cjs": "_f_jest", - "jest.config.int.mjs": "_f_jest", - "jest.config.int.json": "_f_jest", - "jest.config.int.ts": "_f_jest", - "jest.config.integration.js": "_f_jest", - "jest.config.integration.cjs": "_f_jest", - "jest.config.integration.mjs": "_f_jest", - "jest.config.integration.json": "_f_jest", - "jest.config.integration.ts": "_f_jest", - "jest.config.unit.js": "_f_jest", - "jest.config.unit.cjs": "_f_jest", - "jest.config.unit.mjs": "_f_jest", - "jest.config.unit.json": "_f_jest", - "jest.config.unit.ts": "_f_jest", - ".jpmignore": "_f_jpm", - ".jsbeautifyrc": "_f_jsbeautify", - "jsbeautifyrc": "_f_jsbeautify", - ".jsbeautify": "_f_jsbeautify", - "jsbeautify": "_f_jsbeautify", - "jsconfig.json": "_f_jsconfig", - ".jscpd.json": "_f_jscpd", - "jscpd-report.xml": "_f_jscpd", - "jscpd-report.json": "_f_jscpd", - "jscpd-report.html": "_f_jscpd", - ".jshintrc": "_f_jshint", - ".jshintignore": "_f_jshint", - "jsr.json": "_f_jsr", - "karma.conf.js": "_f_karma", - "karma.conf.coffee": "_f_karma", - "karma.conf.ts": "_f_karma", - ".kitchen.yml": "_f_kitchenci", - "kitchen.yml": "_f_kitchenci", - ".kiteignore": "_f_kite", - "knip.json": "_f_knip", - "knip.jsonc": "_f_knip", - ".knip.json": "_f_knip", - ".knip.jsonc": "_f_knip", - "knip.ts": "_f_knip", - "knip.js": "_f_knip", - "knip.config.ts": "_f_knip", - "knip.config.js": "_f_knip", - "language-configuration.json": "_f_language_configuration", - "layout.html": "_f_layout", - "layout.htm": "_f_layout", - "lakefile.lean": "_f_leanconfig", - "lakefile.toml": "_f_leanconfig", - "lake-manifest.json": "_f_leanconfig", - "lean-toolchain": "_f_leanconfig", - "lefthook.json": "_f_lefthook", - "lefthook.toml": "_f_lefthook", - "lefthook.yaml": "_f_lefthook", - "lefthook.yml": "_f_lefthook", - "lefthook-local.json": "_f_lefthook", - "lefthook-local.toml": "_f_lefthook", - "lefthook-local.yaml": "_f_lefthook", - "lefthook-local.yml": "_f_lefthook", - ".lefthook.json": "_f_lefthook", - ".lefthook.toml": "_f_lefthook", - ".lefthook.yaml": "_f_lefthook", - ".lefthook.yml": "_f_lefthook", - ".lefthook-local.json": "_f_lefthook", - ".lefthook-local.toml": "_f_lefthook", - ".lefthook-local.yaml": "_f_lefthook", - ".lefthook-local.yml": "_f_lefthook", - "lerna.json": "_f_lerna", - "liara.json": "_f_liara", - ".liaraignore": "_f_liara", - "licence": "_f_license", - "LICENCE": "_f_license", - "license": "_f_license", - "LICENSE": "_f_license", - "copying": "_f_license", - "copying.lesser": "_f_license", - "LICENSE-MIT": "_f_license", - "license-mit": "_f_license", - "LICENSE-APACHE": "_f_license", - "license-apache": "_f_license", - "LICENSE-GPL": "_f_license", - "license-gpl": "_f_license", - "LICENSE-AGPL": "_f_license", - "license-agpl": "_f_license", - "LICENCE.md": "_f_license", - "LICENCE.txt": "_f_license", - "licence.md": "_f_license", - "licence.txt": "_f_license", - "LICENSE.md": "_f_license", - "LICENSE.txt": "_f_license", - "license.md": "_f_license", - "license.txt": "_f_license", - "copying.md": "_f_license", - "copying.txt": "_f_license", - "copying.lesser.md": "_f_license", - "copying.lesser.txt": "_f_license", - "LICENSE-MIT.md": "_f_license", - "LICENSE-MIT.txt": "_f_license", - "license-mit.md": "_f_license", - "license-mit.txt": "_f_license", - "LICENSE-APACHE.md": "_f_license", - "LICENSE-APACHE.txt": "_f_license", - "license-apache.md": "_f_license", - "license-apache.txt": "_f_license", - "LICENSE-GPL.md": "_f_license", - "LICENSE-GPL.txt": "_f_license", - "license-gpl.md": "_f_license", - "license-gpl.txt": "_f_license", - "LICENSE-AGPL.md": "_f_license", - "LICENSE-AGPL.txt": "_f_license", - "license-agpl.md": "_f_license", - "license-agpl.txt": "_f_license", - ".licrc": "_f_licensebat", - "budget.json": "_f_lighthouse", - "budgets.json": "_f_lighthouse", - ".lighthouserc.cjs": "_f_lighthouse", - ".lighthouserc.js": "_f_lighthouse", - ".lighthouserc.json": "_f_lighthouse", - ".lighthouserc.yaml": "_f_lighthouse", - ".lighthouserc.yml": "_f_lighthouse", - "include.xml": "_f_lime", - ".lintstagedrc": "_f_lintstagedrc", - ".lintstagedrc.json": "_f_lintstagedrc", - ".lintstagedrc.yaml": "_f_lintstagedrc", - ".lintstagedrc.yml": "_f_lintstagedrc", - ".lintstagedrc.mjs": "_f_lintstagedrc", - ".lintstagedrc.mts": "_f_lintstagedrc", - ".lintstagedrc.js": "_f_lintstagedrc", - ".lintstagedrc.ts": "_f_lintstagedrc", - ".lintstagedrc.cjs": "_f_lintstagedrc", - ".lintstagedrc.cts": "_f_lintstagedrc", - "lint-staged.config.mjs": "_f_lintstagedrc", - "lint-staged.config.mts": "_f_lintstagedrc", - "lint-staged.config.js": "_f_lintstagedrc", - "lint-staged.config.ts": "_f_lintstagedrc", - "lint-staged.config.cjs": "_f_lintstagedrc", - "lint-staged.config.cts": "_f_lintstagedrc", - "mailing.config.json": "_f_mailing", - "manifest": "_f_manifest", - "manifest.bak": "_f_manifest_bak", - "manifest.skip": "_f_manifest_skip", - ".markdownlintrc": "_f_markdownlint", - ".markdownlint.json": "_f_markdownlint", - ".markdownlint.jsonc": "_f_markdownlint", - ".markdownlint.yml": "_f_markdownlint", - ".markdownlint.yaml": "_f_markdownlint", - ".markdownlint.cjs": "_f_markdownlint", - ".markdownlint-cli2.json": "_f_markdownlint", - ".markdownlint-cli2.jsonc": "_f_markdownlint", - ".markdownlint-cli2.yml": "_f_markdownlint", - ".markdownlint-cli2.yaml": "_f_markdownlint", - ".markdownlint-cli2.cjs": "_f_markdownlint", - ".markdownlintignore": "_f_markdownlint_ignore", - ".markuplintrc": "_f_markuplint", - ".markuplintrc.json": "_f_markuplint", - ".markuplintrc.yaml": "_f_markuplint", - ".markuplintrc.yml": "_f_markuplint", - ".markuplintrc.js": "_f_markuplint", - ".markuplintrc.cjs": "_f_markuplint", - ".markuplintrc.mjs": "_f_markuplint", - ".markuplintrc.ts": "_f_markuplint", - "markuplint.config.json": "_f_markuplint", - "markuplint.config.yaml": "_f_markuplint", - "markuplint.config.yml": "_f_markuplint", - "markuplint.config.js": "_f_markuplint", - "markuplint.config.cjs": "_f_markuplint", - "markuplint.config.mjs": "_f_markuplint", - "markuplint.config.ts": "_f_markuplint", - "master.js": "_f_master-co", - "master.ts": "_f_master-co", - "master.mjs": "_f_master-co", - "master.json": "_f_master-co", - "master.css.js": "_f_master-co", - "master.css.ts": "_f_master-co", - "master.css.mjs": "_f_master-co", - "master.css.json": "_f_master-co", - "maven.config": "_f_maven", - "pom.xml": "_f_maven", - "extensions.xml": "_f_maven", - "settings.xml": "_f_maven", - "mcp.json": "_f_mcp", - "mdx-components.cjs": "_f_mdx-components", - "mdx-components.cts": "_f_mdx-components", - "mdx-components.js": "_f_mdx-components", - "mdx-components.jsx": "_f_mdx-components", - "mdx-components.mjs": "_f_mdx-components", - "mdx-components.mts": "_f_mdx-components", - "mdx-components.ts": "_f_mdx-components", - "mdx-components.tsx": "_f_mdx-components", - ".mdxlintrc": "_f_mdxlint", - ".mdxlintignore": "_f_mdxlint", - ".mdxlintrc.cjs": "_f_mdxlint", - ".mdxlintrc.js": "_f_mdxlint", - ".mdxlintrc.json": "_f_mdxlint", - ".mdxlintrc.mjs": "_f_mdxlint", - ".mdxlintrc.yml": "_f_mdxlint", - ".mdxlintrc.yaml": "_f_mdxlint", - ".hgignore": "_f_mercurial", - "mocha.opts": "_f_mocha", - ".mocharc.cjs": "_f_mocha", - ".mocharc.js": "_f_mocha", - ".mocharc.json": "_f_mocha", - ".mocharc.jsonc": "_f_mocha", - ".mocharc.mjs": "_f_mocha", - ".mocharc.yaml": "_f_mocha", - ".mocharc.yml": "_f_mocha", - "modernizr": "_f_modernizr", - "modernizr.js": "_f_modernizr", - "modernizrrc.js": "_f_modernizr", - ".modernizr.js": "_f_modernizr", - ".modernizrrc.js": "_f_modernizr", - "moleculer.config.js": "_f_moleculer", - "moleculer.config.json": "_f_moleculer", - "moleculer.config.ts": "_f_moleculer", - ".mtn-ignore": "_f_monotone", - "motif.json": "_f_motif", - "mypy.ini": "_f_mypy", - ".mypy.ini": "_f_mypy", - ".nano-staged.js": "_f_nanostaged", - "nano-staged.js": "_f_nanostaged", - ".nano-staged.cjs": "_f_nanostaged", - "nano-staged.cjs": "_f_nanostaged", - ".nano-staged.mjs": "_f_nanostaged", - "nano-staged.mjs": "_f_nanostaged", - ".nano-staged.json": "_f_nanostaged", - "nano-staged.json": "_f_nanostaged", - ".nanostagedrc": "_f_nanostaged", - ".nest-cli.json": "_f_nestjs", - "nest-cli.json": "_f_nestjs", - "nestconfig.json": "_f_nestjs", - ".nestconfig.json": "_f_nestjs", - "netlify.toml": "_f_netlify", - "next.config.js": "_f_next", - "next.config.cjs": "_f_next", - "next.config.mjs": "_f_next", - "next.config.ts": "_f_next", - ".nf": "_f_nextflow", - "ng-tailwind.js": "_f_ng_tailwind", - "nginx.conf": "_f_nginx", - "build.ninja": "_f_ninja", - "flake.lock": "_f_nix", - ".node-version": "_f_node", - ".nvmrc": "_f_node", - "node.config.json": "_f_node", - "nodemon.json": "_f_nodemon", - ".npmignore": "_f_npm", - ".npmrc": "_f_npm", - ".package-lock.json": "_f_npm", - "package.json": "_f_npm", - "package-lock.json": "_f_npm", - "npm-shrinkwrap.json": "_f_npm", - ".npmpackagejsonlintrc": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.cjs": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.js": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.json": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.yaml": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.yml": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.mjs": "_f_npmpackagejsonlint", - ".npmpackagejsonlintignore": "_f_npmpackagejsonlint", - "npmpackagejsonlint.config.cjs": "_f_npmpackagejsonlint", - "npmpackagejsonlint.config.js": "_f_npmpackagejsonlint", - "npmpackagejsonlint.config.mjs": "_f_npmpackagejsonlint", - ".nsrirc": "_f_nsri", - ".nsriignore": "_f_nsri", - "nsri.config.js": "_f_nsri", - ".nsrirc.js": "_f_nsri", - ".nsrirc.json": "_f_nsri", - ".nsrirc.yaml": "_f_nsri", - ".nsrirc.yml": "_f_nsri", - ".integrity.json": "_f_nsri-integrity", - ".nuxtignore": "_f_nuxt", - ".nuxtrc": "_f_nuxt", - "nuxt.config.js": "_f_nuxt", - "nuxt.config.ts": "_f_nuxt", - "nuxt.config.mjs": "_f_nuxt", - "nuxt.js": "_f_nuxt", - "nuxt.ts": "_f_nuxt", - "nuxt.mjs": "_f_nuxt", - "nx.json": "_f_nx", - ".nycrc": "_f_nyc", - ".nycrc.json": "_f_nyc", - ".objidconfig": "_f_objidconfig", - ".merlin": "_f_ocaml", - ".oxlintignore": "_f_oxc", - ".oxlintrc.json": "_f_oxc", - ".oxlintrc.jsonc": "_f_oxc", - ".oxfmtrc.json": "_f_oxc", - ".oxfmtrc.jsonc": "_f_oxc", - ".packshiprc": "_f_packship", - ".packshiprc.json": "_f_packship", - ".packshiprc.js": "_f_packship", - ".packshiprc.ts": "_f_packship", - "packship.config.js": "_f_packship", - "packship.config.ts": "_f_packship", - "packship.config.mjs": "_f_packship", - "packship.config.mts": "_f_packship", - "packship.config.json": "_f_packship", - "paket.dependencies": "_f_paket", - "paket.lock": "_f_paket", - "paket.references": "_f_paket", - "paket.template": "_f_paket", - "paket.local": "_f_paket", - "panda.config.js": "_f_pandacss", - "panda.config.mjs": "_f_pandacss", - "panda.config.ts": "_f_pandacss", - ".pdm-python": "_f_pdm", - "pdm.lock": "_f_pdm", - "pdm.toml": "_f_pdm", - "peeky.config.ts": "_f_peeky", - "peeky.config.js": "_f_peeky", - "peeky.config.mjs": "_f_peeky", - ".php-cs-fixer.php": "_f_phpcsfixer", - ".php-cs-fixer.dist.php": "_f_phpcsfixer", - ".php_cs": "_f_phpcsfixer", - ".php_cs.dist": "_f_phpcsfixer", - "phpstan.neon": "_f_phpstan", - "phpstan.dist.neon": "_f_phpstan", - "phpunit": "_f_phpunit", - "phpunit.xml": "_f_phpunit", - "phpunit.xml.dist": "_f_phpunit", - ".phraseapp.yml": "_f_phraseapp", - "pipfile": "_f_pip", - "pipfile.lock": "_f_pip", - "platformio.ini": "_f_platformio", - "playwright.config.js": "_f_playwright", - "playwright.config.ts": "_f_playwright", - "playwright.config.mts": "_f_playwright", - "playwright.config.mjs": "_f_playwright", - "playwright.config.cts": "_f_playwright", - "playwright.config.cjs": "_f_playwright", - "ecosystem.config.js": "_f_pm2", - "ecosystem.config.cjs": "_f_pm2", - "ecosystem.config.json": "_f_pm2", - "ecosystem.config.yaml": "_f_pm2", - "ecosystem.config.yml": "_f_pm2", - ".pnpmfile.cjs": "_f_pnpm", - "pnpmfile.js": "_f_pnpm", - "pnpm-lock.yaml": "_f_pnpm", - "pnpm-workspace.yaml": "_f_pnpm", - "poetry.lock": "_f_poetry", - ".postcssrc": "_f_postcssconfig", - ".postcssrc.json": "_f_postcssconfig", - ".postcssrc.yaml": "_f_postcssconfig", - ".postcssrc.yml": "_f_postcssconfig", - ".postcssrc.ts": "_f_postcssconfig", - ".postcssrc.cts": "_f_postcssconfig", - ".postcssrc.mts": "_f_postcssconfig", - ".postcssrc.js": "_f_postcssconfig", - ".postcssrc.cjs": "_f_postcssconfig", - ".postcssrc.mjs": "_f_postcssconfig", - "postcss.config.ts": "_f_postcssconfig", - "postcss.config.cts": "_f_postcssconfig", - "postcss.config.mts": "_f_postcssconfig", - "postcss.config.js": "_f_postcssconfig", - "postcss.config.cjs": "_f_postcssconfig", - "postcss.config.mjs": "_f_postcssconfig", - "preact.config.js": "_f_preact", - ".pre-commit-config.yaml": "_f_precommit", - ".prettierrc": "_f_prettier", - ".prettierignore": "_f_prettier", - "prettier.config.js": "_f_prettier", - "prettier.config.cjs": "_f_prettier", - "prettier.config.mjs": "_f_prettier", - "prettier.config.ts": "_f_prettier", - "prettier.config.coffee": "_f_prettier", - ".prettierrc.js": "_f_prettier", - ".prettierrc.cjs": "_f_prettier", - ".prettierrc.mjs": "_f_prettier", - ".prettierrc.json": "_f_prettier", - ".prettierrc.json5": "_f_prettier", - ".prettierrc.yml": "_f_prettier", - ".prettierrc.yaml": "_f_prettier", - ".prettierrc.toml": "_f_prettier", - "prisma.config.js": "_f_prismaconfig", - "prisma.config.ts": "_f_prismaconfig", - "procfile": "_f_procfile", - "protractor.conf.js": "_f_protractor", - "protractor.conf.coffee": "_f_protractor", - "protractor.conf.ts": "_f_protractor", - "publiccode.yml": "_f_publiccode", - ".jade-lintrc": "_f_pug", - ".pug-lintrc": "_f_pug", - ".jade-lint.json": "_f_pug", - ".pug-lintrc.js": "_f_pug", - ".pug-lintrc.json": "_f_pug", - "Pulumi.yaml": "_f_pulumi", - "Pulumi.yml": "_f_pulumi", - "Pulumi.dev.yaml": "_f_pulumi", - "Pulumi.dev.yml": "_f_pulumi", - "Pulumi.prod.yaml": "_f_pulumi", - "Pulumi.prod.yml": "_f_pulumi", - "purgecss.config.js": "_f_purgecss", - ".python-version": "_f_pyenv", - "pyproject.toml": "_f_pypi", - "pytest.ini": "_f_pytest", - ".pytest.ini": "_f_pytest", - "pytest.toml": "_f_pytest", - ".pytest.toml": "_f_pytest", - "py.typed": "_f_pytyped", - ".pyup": "_f_pyup", - ".pyup.yml": "_f_pyup", - "qmldir": "_f_qmldir", - "quasar.conf.js": "_f_quasar", - "quasar.config.js": "_f_quasar", - "quasar.config.mjs": "_f_quasar", - "quasar.config.cjs": "_f_quasar", - "quasar.config.ts": "_f_quasar", - "Rakefile": "_f_rake", - "razzle.config.js": "_f_razzle", - "react-router.config.js": "_f_reactrouter", - "react-router.config.ts": "_f_reactrouter", - ".rehyperc": "_f_rehype", - ".rehypeignore": "_f_rehype", - ".rehyperc.cjs": "_f_rehype", - ".rehyperc.js": "_f_rehype", - ".rehyperc.json": "_f_rehype", - ".rehyperc.mjs": "_f_rehype", - ".rehyperc.yml": "_f_rehype", - ".rehyperc.yaml": "_f_rehype", - ".remarkrc": "_f_remark", - ".remarkignore": "_f_remark", - ".remarkrc.cjs": "_f_remark", - ".remarkrc.js": "_f_remark", - ".remarkrc.json": "_f_remark", - ".remarkrc.mjs": "_f_remark", - ".remarkrc.yml": "_f_remark", - ".remarkrc.yaml": "_f_remark", - ".renovaterc": "_f_renovate", - ".renovaterc.json": "_f_renovate", - "renovate.json": "_f_renovate", - "renovate.json5": "_f_renovate", - ".replit": "_f_replit", - "replit.nix": "_f_replit", - ".retextrc": "_f_retext", - ".retextignore": "_f_retext", - ".retextrc.cjs": "_f_retext", - ".retextrc.js": "_f_retext", - ".retextrc.json": "_f_retext", - ".retextrc.mjs": "_f_retext", - ".retextrc.yml": "_f_retext", - ".retextrc.yaml": "_f_retext", - "robots.txt": "_f_robots", - "rolldown.config.js": "_f_rolldown", - "rolldown.config.cjs": "_f_rolldown", - "rolldown.config.mjs": "_f_rolldown", - "rolldown.config.coffee": "_f_rolldown", - "rolldown.config.ts": "_f_rolldown", - "rolldown.config.mts": "_f_rolldown", - "rolldown.config.cts": "_f_rolldown", - "rolldown.config.common.js": "_f_rolldown", - "rolldown.config.common.cjs": "_f_rolldown", - "rolldown.config.common.mjs": "_f_rolldown", - "rolldown.config.common.coffee": "_f_rolldown", - "rolldown.config.common.ts": "_f_rolldown", - "rolldown.config.common.mts": "_f_rolldown", - "rolldown.config.common.cts": "_f_rolldown", - "rolldown.config.dev.js": "_f_rolldown", - "rolldown.config.dev.cjs": "_f_rolldown", - "rolldown.config.dev.mjs": "_f_rolldown", - "rolldown.config.dev.coffee": "_f_rolldown", - "rolldown.config.dev.ts": "_f_rolldown", - "rolldown.config.dev.mts": "_f_rolldown", - "rolldown.config.dev.cts": "_f_rolldown", - "rolldown.config.prod.js": "_f_rolldown", - "rolldown.config.prod.cjs": "_f_rolldown", - "rolldown.config.prod.mjs": "_f_rolldown", - "rolldown.config.prod.coffee": "_f_rolldown", - "rolldown.config.prod.ts": "_f_rolldown", - "rolldown.config.prod.mts": "_f_rolldown", - "rolldown.config.prod.cts": "_f_rolldown", - "rollup.config.js": "_f_rollup", - "rollup.config.cjs": "_f_rollup", - "rollup.config.mjs": "_f_rollup", - "rollup.config.coffee": "_f_rollup", - "rollup.config.ts": "_f_rollup", - "rollup.config.common.js": "_f_rollup", - "rollup.config.common.cjs": "_f_rollup", - "rollup.config.common.mjs": "_f_rollup", - "rollup.config.common.coffee": "_f_rollup", - "rollup.config.common.ts": "_f_rollup", - "rollup.config.dev.js": "_f_rollup", - "rollup.config.dev.cjs": "_f_rollup", - "rollup.config.dev.mjs": "_f_rollup", - "rollup.config.dev.coffee": "_f_rollup", - "rollup.config.dev.ts": "_f_rollup", - "rollup.config.prod.js": "_f_rollup", - "rollup.config.prod.cjs": "_f_rollup", - "rollup.config.prod.mjs": "_f_rollup", - "rollup.config.prod.coffee": "_f_rollup", - "rollup.config.prod.ts": "_f_rollup", - "rome.json": "_f_rome", - ".rspec": "_f_rspec", - ".rubocop.yml": "_f_rubocop", - ".rubocop_todo.yml": "_f_rubocop", - ".ruby-version": "_f_ruby", - "rust-toolchain": "_f_rust_toolchain", - "rust-toolchain.toml": "_f_rust_toolchain", - ".slshrc": "_f_s-lang", - ".isisrc": "_f_s-lang", - ".jedrc": "_f_s-lang", - ".sailsrc": "_f_sails", - ".sapphirerc.json": "_f_sapphire_framework_cli", - ".sapphirerc.yml": "_f_sapphire_framework_cli", - ".sapphirerc": "_f_sapphire_framework_cli", - "seedkit.config.js": "_f_seedkit", - "seedkit.config.ts": "_f_seedkit", - "seedkit.config.mjs": "_f_seedkit", - ".sentryclirc": "_f_sentry", - ".sequelizerc": "_f_sequelize", - ".sequelizerc.js": "_f_sequelize", - ".sequelizerc.json": "_f_sequelize", - "serverless.yml": "_f_serverless", - "serverless.json": "_f_serverless", - "serverless.js": "_f_serverless", - "serverless.ts": "_f_serverless", - "components.json": "_f_shadcn", - ".shellcheckrc": "_f_shellcheck", - "Shuttle.toml": "_f_shuttle", - "sitemap.xml": "_f_sitemap", - "sitemap.rss": "_f_sitemap", - "sitemap.txt": "_f_sitemap", - "sitemap.atom": "_f_sitemap", - "slash-up.config.js": "_f_slashup", - "smithery.yaml": "_f_smithery", - "snapcraft.yaml": "_f_snapcraft", - "snaplet.config.js": "_f_snaplet", - "snaplet.config.ts": "_f_snaplet", - ".snyk": "_f_snyk", - ".solidarity": "_f_solidarity", - ".solidarity.json": "_f_solidarity", - "spin.toml": "_f_spin", - "sst-env.d.ts": "_f_sst", - "sst-env.ts": "_f_sst", - "sst-env.js": "_f_sst", - "sst.config.d.ts": "_f_sst", - "sst.config.ts": "_f_sst", - "sst.config.js": "_f_sst", - ".stackblitzrc": "_f_stackblitz", - "stryker.conf.mjs": "_f_stryker", - "stryker.conf.cjs": "_f_stryker", - "stryker.conf.js": "_f_stryker", - "stryker.conf.conf": "_f_stryker", - "stryker.conf.json": "_f_stryker", - ".stryker.conf.mjs": "_f_stryker", - ".stryker.conf.cjs": "_f_stryker", - ".stryker.conf.js": "_f_stryker", - ".stryker.conf.conf": "_f_stryker", - ".stryker.conf.json": "_f_stryker", - "stryker.config.mjs": "_f_stryker", - "stryker.config.cjs": "_f_stryker", - "stryker.config.js": "_f_stryker", - "stryker.config.conf": "_f_stryker", - "stryker.config.json": "_f_stryker", - ".stryker.config.mjs": "_f_stryker", - ".stryker.config.cjs": "_f_stryker", - ".stryker.config.js": "_f_stryker", - ".stryker.config.conf": "_f_stryker", - ".stryker.config.json": "_f_stryker", - "stryker-config.mjs": "_f_stryker", - "stryker-config.cjs": "_f_stryker", - "stryker-config.js": "_f_stryker", - "stryker-config.conf": "_f_stryker", - "stryker-config.json": "_f_stryker", - "stryker4s.mjs": "_f_stryker", - "stryker4s.cjs": "_f_stryker", - "stryker4s.js": "_f_stryker", - "stryker4s.conf": "_f_stryker", - "stryker4s.json": "_f_stryker", - ".stylelintrc": "_f_stylelint", - ".stylelintignore": "_f_stylelint", - ".stylelintcache": "_f_stylelint", - "stylelint.config.js": "_f_stylelint", - "stylelint.config.json": "_f_stylelint", - "stylelint.config.yaml": "_f_stylelint", - "stylelint.config.yml": "_f_stylelint", - "stylelint.config.ts": "_f_stylelint", - "stylelint.config.cjs": "_f_stylelint", - "stylelint.config.mjs": "_f_stylelint", - ".stylelintrc.js": "_f_stylelint", - ".stylelintrc.json": "_f_stylelint", - ".stylelintrc.yaml": "_f_stylelint", - ".stylelintrc.yml": "_f_stylelint", - ".stylelintrc.ts": "_f_stylelint", - ".stylelintrc.cjs": "_f_stylelint", - ".stylelintrc.mjs": "_f_stylelint", - ".stylish-haskell.yaml": "_f_stylish_haskell", - ".svnignore": "_f_subversion", - "svelte.config.js": "_f_svelteconfig", - "svelte.config.ts": "_f_svelteconfig", - "svgo.config.cjs": "_f_svgo", - "svgo.config.js": "_f_svgo", - "svgo.config.mjs": "_f_svgo", - ".swcrc": "_f_swc", - "package.pins": "_f_swift", - "symfony.lock": "_f_symfony", - ".syncpackrc": "_f_syncpack", - ".syncpackrc.json": "_f_syncpack", - ".syncpackrc.yaml": "_f_syncpack", - ".syncpackrc.yml": "_f_syncpack", - ".syncpackrc.js": "_f_syncpack", - ".syncpackrc.cjs": "_f_syncpack", - "syncpack.config.js": "_f_syncpack", - "syncpack.config.cjs": "_f_syncpack", - "tailwind.js": "_f_tailwind", - "tailwind.cjs": "_f_tailwind", - "tailwind.coffee": "_f_tailwind", - "tailwind.ts": "_f_tailwind", - "tailwind.json": "_f_tailwind", - "tailwind.mjs": "_f_tailwind", - "tailwind.config.js": "_f_tailwind", - "tailwind.config.cjs": "_f_tailwind", - "tailwind.config.coffee": "_f_tailwind", - "tailwind.config.ts": "_f_tailwind", - "tailwind.config.json": "_f_tailwind", - "tailwind.config.mjs": "_f_tailwind", - ".tailwind.js": "_f_tailwind", - ".tailwind.cjs": "_f_tailwind", - ".tailwind.coffee": "_f_tailwind", - ".tailwind.ts": "_f_tailwind", - ".tailwind.json": "_f_tailwind", - ".tailwind.mjs": "_f_tailwind", - ".tailwindrc.js": "_f_tailwind", - ".tailwindrc.cjs": "_f_tailwind", - ".tailwindrc.coffee": "_f_tailwind", - ".tailwindrc.ts": "_f_tailwind", - ".tailwindrc.json": "_f_tailwind", - ".tailwindrc.mjs": "_f_tailwind", - "tamagui.js": "_f_tamagui", - "tamagui.mjs": "_f_tamagui", - "tamagui.cjs": "_f_tamagui", - "tamagui.ts": "_f_tamagui", - "tamagui.mts": "_f_tamagui", - "tamagui.cts": "_f_tamagui", - "tamagui.config.js": "_f_tamagui", - "tamagui.config.mjs": "_f_tamagui", - "tamagui.config.cjs": "_f_tamagui", - "tamagui.config.ts": "_f_tamagui", - "tamagui.config.mts": "_f_tamagui", - "tamagui.config.cts": "_f_tamagui", - ".taplo.toml": "_f_taplo", - "taplo.toml": "_f_taplo", - "taskfile.yml": "_f_taskfile", - "taskfile.yaml": "_f_taskfile", - "taskfile.dist.yml": "_f_taskfile", - "taskfile.dist.yaml": "_f_taskfile", - "tauri.conf.json": "_f_tauri", - ".taurignore": "_f_tauri", - ".testcaferc.json": "_f_testcafe", - "testplane.conf.ts": "_f_testplane", - "testplane.conf.js": "_f_testplane", - "testplane.conf.cts": "_f_testplane", - "testplane.conf.cjs": "_f_testplane", - "testplane.config.ts": "_f_testplane", - "testplane.config.js": "_f_testplane", - "testplane.config.cts": "_f_testplane", - "testplane.config.cjs": "_f_testplane", - ".tfignore": "_f_tfs", - ".tiltignore": "_f_tiltfile", - ".tmux.conf": "_f_tmux", - "tox.ini": "_f_tox", - ".travis.yml": "_f_travis", - "truffle-config.js": "_f_truffle", - "truffle-config.ts": "_f_truffle", - "trunk.yaml": "_f_trunk", - "tsconfig.json": "_f_tsconfig", - "tsconfig.app.json": "_f_tsconfig", - "tsconfig.base.json": "_f_tsconfig", - "tsconfig.build.json": "_f_tsconfig", - "tsconfig.cjs.json": "_f_tsconfig", - "tsconfig.common.json": "_f_tsconfig", - "tsconfig.debug.json": "_f_tsconfig", - "tsconfig.dev.json": "_f_tsconfig", - "tsconfig.development.json": "_f_tsconfig", - "tsconfig.e2e.json": "_f_tsconfig", - "tsconfig.eslint.json": "_f_tsconfig", - "tsconfig.esm.json": "_f_tsconfig", - "tsconfig.mjs.json": "_f_tsconfig", - "tsconfig.node.json": "_f_tsconfig", - "tsconfig.prod.json": "_f_tsconfig", - "tsconfig.production.json": "_f_tsconfig", - "tsconfig.release.json": "_f_tsconfig", - "tsconfig.server.json": "_f_tsconfig", - "tsconfig.spec.json": "_f_tsconfig", - "tsconfig.staging.json": "_f_tsconfig", - "tsconfig.test.json": "_f_tsconfig", - "tsconfig.types.json": "_f_tsconfig", - "tsconfig.lib.json": "_f_tsconfig", - "tsconfig.lib.prod.json": "_f_tsconfig", - "tsdoc.json": "_f_tsdoc", - "tsdown.config.ts": "_f_tsdown", - "tsdown.config.mts": "_f_tsdown", - "tsdown.config.cts": "_f_tsdown", - "tsdown.config.js": "_f_tsdown", - "tsdown.config.mjs": "_f_tsdown", - "tsdown.config.cjs": "_f_tsdown", - "tsdown.config.json": "_f_tsdown", - "tslint.json": "_f_tslint", - "tslint.yaml": "_f_tslint", - "tslint.yml": "_f_tslint", - "turbo.json": "_f_turbo", - "turbo.jsonc": "_f_turbo", - "microfrontends.json": "_f_turbo", - "microfrontends.jsonc": "_f_turbo", - "typedoc.cjs": "_f_typedoc", - "typedoc.js": "_f_typedoc", - "typedoc.json": "_f_typedoc", - "typedoc.jsonc": "_f_typedoc", - "typedoc.mjs": "_f_typedoc", - "typedoc.config.cjs": "_f_typedoc", - "typedoc.config.js": "_f_typedoc", - "typedoc.config.json": "_f_typedoc", - "typedoc.config.jsonc": "_f_typedoc", - "typedoc.config.mjs": "_f_typedoc", - ".unibeautifyrc": "_f_unibeautify", - "unibeautify.config.js": "_f_unibeautify", - ".unibeautifyrc.js": "_f_unibeautify", - ".unibeautifyrc.json": "_f_unibeautify", - ".unibeautifyrc.yaml": "_f_unibeautify", - ".unibeautifyrc.yml": "_f_unibeautify", - "unlicense": "_f_unlicense", - "unlicence": "_f_unlicense", - "UNLICENSE": "_f_unlicense", - "UNLICENCE": "_f_unlicense", - "unlicense.md": "_f_unlicense", - "unlicense.txt": "_f_unlicense", - "unlicence.md": "_f_unlicense", - "unlicence.txt": "_f_unlicense", - "UNLICENSE.md": "_f_unlicense", - "UNLICENSE.txt": "_f_unlicense", - "UNLICENCE.md": "_f_unlicense", - "UNLICENCE.txt": "_f_unlicense", - "uno.config.js": "_f_unocss", - "uno.config.mjs": "_f_unocss", - "uno.config.ts": "_f_unocss", - "uno.config.mts": "_f_unocss", - "unocss.config.js": "_f_unocss", - "unocss.config.mjs": "_f_unocss", - "unocss.config.ts": "_f_unocss", - "unocss.config.mts": "_f_unocss", - "uv.lock": "_f_uv", - "vagrantfile": "_f_vagrant", - "vapor.yml": "_f_vapor", - "now.json": "_f_vercel", - ".nowignore": "_f_vercel", - "vercel.json": "_f_vercel", - ".vercelignore": "_f_vercel", - ".vimrc": "_f_vim", - ".gvimrc": "_f_vim", - "vite.config.js": "_f_vite", - "vite.config.mjs": "_f_vite", - "vite.config.ts": "_f_vite", - "vite.config.cjs": "_f_vite", - "vite.config.mts": "_f_vite", - "vite.config.cts": "_f_vite", - "vitest.config.js": "_f_vitest", - "vitest.config.mjs": "_f_vitest", - "vitest.config.ts": "_f_vitest", - "vitest.config.cjs": "_f_vitest", - "vitest.config.mts": "_f_vitest", - "vitest.config.cts": "_f_vitest", - "vitest.workspace.json": "_f_vitest", - "vitest.workspace.js": "_f_vitest", - "vitest.workspace.mjs": "_f_vitest", - "vitest.workspace.ts": "_f_vitest", - "vitest.workspace.cjs": "_f_vitest", - "vitest.workspace.mts": "_f_vitest", - "vitest.workspace.cts": "_f_vitest", - "vitest.projects.json": "_f_vitest", - "vitest.projects.js": "_f_vitest", - "vitest.projects.mjs": "_f_vitest", - "vitest.projects.ts": "_f_vitest", - "vitest.projects.cjs": "_f_vitest", - "vitest.projects.mts": "_f_vitest", - "vitest.projects.cts": "_f_vitest", - ".vscodeignore": "_f_vscode", - "launch.json": "_f_vscode", - "tasks.json": "_f_vscode", - "vscodeignore.json": "_f_vscode", - ".vscode-test.js": "_f_vscode_test", - ".vscode-test.json": "_f_vscode_test", - ".vscode-test.mjs": "_f_vscode_test", - ".vuerc": "_f_vueconfig", - "vue.config.js": "_f_vueconfig", - "vue.config.cjs": "_f_vueconfig", - "vue.config.mjs": "_f_vueconfig", - "wallaby.json": "_f_wallaby", - "wallaby.js": "_f_wallaby", - "wallaby.ts": "_f_wallaby", - "wallaby.coffee": "_f_wallaby", - "wallaby.conf.json": "_f_wallaby", - "wallaby.conf.js": "_f_wallaby", - "wallaby.conf.ts": "_f_wallaby", - "wallaby.conf.coffee": "_f_wallaby", - ".wallaby.json": "_f_wallaby", - ".wallaby.js": "_f_wallaby", - ".wallaby.ts": "_f_wallaby", - ".wallaby.coffee": "_f_wallaby", - ".wallaby.conf.json": "_f_wallaby", - ".wallaby.conf.js": "_f_wallaby", - ".wallaby.conf.ts": "_f_wallaby", - ".wallaby.conf.coffee": "_f_wallaby", - "wally.toml": "_f_wally", - "wally.lock": "_f_wally", - ".watchmanconfig": "_f_watchmanconfig", - "wdio.json": "_f_wdio", - "wdio.js": "_f_wdio", - "wdio.mjs": "_f_wdio", - "wdio.cjs": "_f_wdio", - "wdio.ts": "_f_wdio", - "wdio.mts": "_f_wdio", - "wdio.cts": "_f_wdio", - "wdio.conf.json": "_f_wdio", - "wdio.conf.js": "_f_wdio", - "wdio.conf.mjs": "_f_wdio", - "wdio.conf.cjs": "_f_wdio", - "wdio.conf.ts": "_f_wdio", - "wdio.conf.mts": "_f_wdio", - "wdio.conf.cts": "_f_wdio", - ".weblate": "_f_weblate", - ".weblate.ini": "_f_weblate", - "weblate": "_f_weblate", - "weblate.ini": "_f_weblate", - "webpack.base.conf.js": "_f_webpack", - "webpack.base.conf.cjs": "_f_webpack", - "webpack.base.conf.mjs": "_f_webpack", - "webpack.base.conf.coffee": "_f_webpack", - "webpack.base.conf.ts": "_f_webpack", - "webpack.common.js": "_f_webpack", - "webpack.common.cjs": "_f_webpack", - "webpack.common.mjs": "_f_webpack", - "webpack.common.coffee": "_f_webpack", - "webpack.common.ts": "_f_webpack", - "webpack.config.js": "_f_webpack", - "webpack.config.cjs": "_f_webpack", - "webpack.config.mjs": "_f_webpack", - "webpack.config.coffee": "_f_webpack", - "webpack.config.ts": "_f_webpack", - "webpack.config.base.js": "_f_webpack", - "webpack.config.base.cjs": "_f_webpack", - "webpack.config.base.mjs": "_f_webpack", - "webpack.config.base.coffee": "_f_webpack", - "webpack.config.base.ts": "_f_webpack", - "webpack.config.build.js": "_f_webpack", - "webpack.config.build.cjs": "_f_webpack", - "webpack.config.build.mjs": "_f_webpack", - "webpack.config.build.coffee": "_f_webpack", - "webpack.config.build.ts": "_f_webpack", - "webpack.config.common.js": "_f_webpack", - "webpack.config.common.cjs": "_f_webpack", - "webpack.config.common.mjs": "_f_webpack", - "webpack.config.common.coffee": "_f_webpack", - "webpack.config.common.ts": "_f_webpack", - "webpack.config.dev.js": "_f_webpack", - "webpack.config.dev.cjs": "_f_webpack", - "webpack.config.dev.mjs": "_f_webpack", - "webpack.config.dev.coffee": "_f_webpack", - "webpack.config.dev.ts": "_f_webpack", - "webpack.config.development.js": "_f_webpack", - "webpack.config.development.cjs": "_f_webpack", - "webpack.config.development.mjs": "_f_webpack", - "webpack.config.development.coffee": "_f_webpack", - "webpack.config.development.ts": "_f_webpack", - "webpack.config.staging.js": "_f_webpack", - "webpack.config.staging.cjs": "_f_webpack", - "webpack.config.staging.mjs": "_f_webpack", - "webpack.config.staging.coffee": "_f_webpack", - "webpack.config.staging.ts": "_f_webpack", - "webpack.config.test.js": "_f_webpack", - "webpack.config.test.cjs": "_f_webpack", - "webpack.config.test.mjs": "_f_webpack", - "webpack.config.test.coffee": "_f_webpack", - "webpack.config.test.ts": "_f_webpack", - "webpack.config.prod.js": "_f_webpack", - "webpack.config.prod.cjs": "_f_webpack", - "webpack.config.prod.mjs": "_f_webpack", - "webpack.config.prod.coffee": "_f_webpack", - "webpack.config.prod.ts": "_f_webpack", - "webpack.config.production.js": "_f_webpack", - "webpack.config.production.cjs": "_f_webpack", - "webpack.config.production.mjs": "_f_webpack", - "webpack.config.production.coffee": "_f_webpack", - "webpack.config.production.ts": "_f_webpack", - "webpack.config.babel.js": "_f_webpack", - "webpack.config.babel.cjs": "_f_webpack", - "webpack.config.babel.mjs": "_f_webpack", - "webpack.config.babel.coffee": "_f_webpack", - "webpack.config.babel.ts": "_f_webpack", - "webpack.config.base.babel.js": "_f_webpack", - "webpack.config.base.babel.cjs": "_f_webpack", - "webpack.config.base.babel.mjs": "_f_webpack", - "webpack.config.base.babel.coffee": "_f_webpack", - "webpack.config.base.babel.ts": "_f_webpack", - "webpack.config.common.babel.js": "_f_webpack", - "webpack.config.common.babel.cjs": "_f_webpack", - "webpack.config.common.babel.mjs": "_f_webpack", - "webpack.config.common.babel.coffee": "_f_webpack", - "webpack.config.common.babel.ts": "_f_webpack", - "webpack.config.dev.babel.js": "_f_webpack", - "webpack.config.dev.babel.cjs": "_f_webpack", - "webpack.config.dev.babel.mjs": "_f_webpack", - "webpack.config.dev.babel.coffee": "_f_webpack", - "webpack.config.dev.babel.ts": "_f_webpack", - "webpack.config.development.babel.js": "_f_webpack", - "webpack.config.development.babel.cjs": "_f_webpack", - "webpack.config.development.babel.mjs": "_f_webpack", - "webpack.config.development.babel.coffee": "_f_webpack", - "webpack.config.development.babel.ts": "_f_webpack", - "webpack.config.staging.babel.js": "_f_webpack", - "webpack.config.staging.babel.cjs": "_f_webpack", - "webpack.config.staging.babel.mjs": "_f_webpack", - "webpack.config.staging.babel.coffee": "_f_webpack", - "webpack.config.staging.babel.ts": "_f_webpack", - "webpack.config.test.babel.js": "_f_webpack", - "webpack.config.test.babel.cjs": "_f_webpack", - "webpack.config.test.babel.mjs": "_f_webpack", - "webpack.config.test.babel.coffee": "_f_webpack", - "webpack.config.test.babel.ts": "_f_webpack", - "webpack.config.prod.babel.js": "_f_webpack", - "webpack.config.prod.babel.cjs": "_f_webpack", - "webpack.config.prod.babel.mjs": "_f_webpack", - "webpack.config.prod.babel.coffee": "_f_webpack", - "webpack.config.prod.babel.ts": "_f_webpack", - "webpack.config.production.babel.js": "_f_webpack", - "webpack.config.production.babel.cjs": "_f_webpack", - "webpack.config.production.babel.mjs": "_f_webpack", - "webpack.config.production.babel.coffee": "_f_webpack", - "webpack.config.production.babel.ts": "_f_webpack", - "webpack.dev.js": "_f_webpack", - "webpack.dev.cjs": "_f_webpack", - "webpack.dev.mjs": "_f_webpack", - "webpack.dev.coffee": "_f_webpack", - "webpack.dev.ts": "_f_webpack", - "webpack.dev.conf.js": "_f_webpack", - "webpack.dev.conf.cjs": "_f_webpack", - "webpack.dev.conf.mjs": "_f_webpack", - "webpack.dev.conf.coffee": "_f_webpack", - "webpack.dev.conf.ts": "_f_webpack", - "webpack.local.js": "_f_webpack", - "webpack.local.cjs": "_f_webpack", - "webpack.local.mjs": "_f_webpack", - "webpack.local.coffee": "_f_webpack", - "webpack.local.ts": "_f_webpack", - "webpack.prod.js": "_f_webpack", - "webpack.prod.cjs": "_f_webpack", - "webpack.prod.mjs": "_f_webpack", - "webpack.prod.coffee": "_f_webpack", - "webpack.prod.ts": "_f_webpack", - "webpack.prod.conf.js": "_f_webpack", - "webpack.prod.conf.cjs": "_f_webpack", - "webpack.prod.conf.mjs": "_f_webpack", - "webpack.prod.conf.coffee": "_f_webpack", - "webpack.prod.conf.ts": "_f_webpack", - "webpack.main.config.js": "_f_webpack", - "webpack.main.config.cjs": "_f_webpack", - "webpack.main.config.mjs": "_f_webpack", - "webpack.main.config.coffee": "_f_webpack", - "webpack.main.config.ts": "_f_webpack", - "webpack.mix.js": "_f_webpack", - "webpack.mix.cjs": "_f_webpack", - "webpack.mix.mjs": "_f_webpack", - "webpack.mix.coffee": "_f_webpack", - "webpack.mix.ts": "_f_webpack", - "webpack.plugins.js": "_f_webpack", - "webpack.plugins.cjs": "_f_webpack", - "webpack.plugins.mjs": "_f_webpack", - "webpack.plugins.coffee": "_f_webpack", - "webpack.plugins.ts": "_f_webpack", - "webpack.renderer.config.js": "_f_webpack", - "webpack.renderer.config.cjs": "_f_webpack", - "webpack.renderer.config.mjs": "_f_webpack", - "webpack.renderer.config.coffee": "_f_webpack", - "webpack.renderer.config.ts": "_f_webpack", - "webpack.rules.js": "_f_webpack", - "webpack.rules.cjs": "_f_webpack", - "webpack.rules.mjs": "_f_webpack", - "webpack.rules.coffee": "_f_webpack", - "webpack.rules.ts": "_f_webpack", - "webpack.test.conf.js": "_f_webpack", - "webpack.test.conf.cjs": "_f_webpack", - "webpack.test.conf.mjs": "_f_webpack", - "webpack.test.conf.coffee": "_f_webpack", - "webpack.test.conf.ts": "_f_webpack", - "wercker.yml": "_f_wercker", - "windi.config.ts": "_f_windi", - "windi.config.js": "_f_windi", - "wpml-config.xml": "_f_wpml", - "wxt.config.js": "_f_wxt", - "wxt.config.cjs": "_f_wxt", - "wxt.config.mjs": "_f_wxt", - "wxt.config.ts": "_f_wxt", - "wxt.config.cts": "_f_wxt", - "wxt.config.mts": "_f_wxt", - ".xo-config": "_f_xo", - "xo.config.js": "_f_xo", - "xo.config.cjs": "_f_xo", - "xo.config.mjs": "_f_xo", - "xo.config.ts": "_f_xo", - "xo.config.cts": "_f_xo", - "xo.config.mts": "_f_xo", - ".xo-config.js": "_f_xo", - ".xo-config.json": "_f_xo", - ".xo-config.cjs": "_f_xo", - ".xcompose": "_f_xorg", - ".yamllint": "_f_yamllint", - ".yaspellerrc": "_f_yandex", - ".yaspeller.json": "_f_yandex", - "yarn.lock": "_f_yarn", - ".yarnrc": "_f_yarn", - ".yarnrc.yml": "_f_yarn", - ".yarnclean": "_f_yarn", - ".yarn-integrity": "_f_yarn", - ".yarn-metadata.json": "_f_yarn", - ".yarn-state.yml": "_f_yarn", - ".yarnignore": "_f_yarn", - ".yo-rc.json": "_f_yeoman" - }, - "languageIds": { - "actionscript": "_f_actionscript", - "ada": "_f_ada", - "advpl": "_f_advpl", - "affectscript": "_f_affectscript", - "agda": "_f_agda", - "lagda-md": "_f_agda", - "lagda-rst": "_f_agda", - "lagda-tex": "_f_agda", - "al": "_f_al", - "alloy": "_f_alloy", - "ansible": "_f_ansible", - "antlr": "_f_antlr", - "anyscript": "_f_anyscript", - "apacheconf": "_f_apache", - "apex": "_f_apex", - "apiblueprint": "_f_apib", - "apl": "_f_apl", - "applescript": "_f_applescript", - "asciidoc": "_f_asciidoc", - "asp": "_f_asp", - "asp (html)": "_f_asp", - "arm": "_f_assembly", - "asm": "_f_assembly", - "asm-intel-x86-generic": "_f_assembly", - "platformio-debug.asm": "_f_platformio", - "asm-collection": "_f_assembly", - "astro": "_f_astro", - "ats": "_f_ats", - "ahk": "_f_autohotkey", - "ahk2": "_f_autohotkey", - "autoit": "_f_autoit", - "avro": "_f_avro", - "azcli": "_f_azure", - "azure-pipelines": "_f_azurepipelines", - "ballerina": "_f_ballerina", - "bat": "_f_bat", - "bats": "_f_bats", - "bazel": "_f_bazel", - "bazelrc": "_f_bazel", - "starlark": "_f_bazel", - "befunge": "_f_befunge", - "befunge98": "_f_befunge", - "bicep": "_f_bicep", - "biml": "_f_biml", - "code-text-binary": "_f_binary", - "biome_syntax_tree": "_f_biome", - "blade": "_f_blade", - "laravel-blade": "_f_blade", - "blitzbasic": "_f_blitzbasic", - "bolt": "_f_bolt", - "bosque": "_f_bosque", - "browserslist": "_f_browserslist", - "bruno": "_f_bruno", - "buf": "_f_buf", - "buf-gen": "_f_buf", - "bun.lockb": "_f_bun", - "c": "_f_c", - "c3": "_f_c3", - "c-al": "_f_c_al", - "cabal": "_f_cabal", - "caddyfile": "_f_caddy", - "capnp": "_f_capnp", - "capnproto": "_f_capnp", - "casc": "_f_casc", - "cddl": "_f_cddl", - "ceylon": "_f_ceylon", - "cfml": "_f_cf", - "lang-cfml": "_f_cf", - "cfc": "_f_cfc", - "cfmhtml": "_f_cfm", - "cookbook": "_f_chef_cookbook", - "circom": "_f_circom", - "clojure": "_f_clojure", - "clojurescript": "_f_clojurescript", - "manifest-yaml": "_f_cloudfoundry", - "cmake": "_f_cmake", - "cmake-cache": "_f_cmake", - "cobol": "_f_cobol", - "ql": "_f_codeql", - "coffeescript": "_f_coffeescript", - "java-properties": "_f_config", - "properties": "_f_config", - "spring-boot-properties": "_f_config", - "confluence": "_f_confluence", - "instructions": "_f_copilot", - "prompt": "_f_copilot", - "cpp": "_f_cpp", - "crystal": "_f_crystal", - "csharp": "_f_csharp", - "css": "_f_css", - "cucumber": "_f_cucumber", - "feature": "_f_cucumber", - "cuda": "_f_cuda", - "cuda-cpp": "_f_cuda", - "cython": "_f_cython", - "dal": "_f_dal", - "dart": "_f_dartlang", - "debian-changelog": "_f_debian", - "debian-control": "_f_debian", - "debian-copyright": "_f_debian", - "debian-upstream-metadata": "_f_debian", - "pascal": "_f_delphi", - "objectpascal": "_f_delphi", - "dhall": "_f_dhall", - "diff": "_f_diff", - "django-html": "_f_django", - "django-txt": "_f_django", - "d": "_f_dlang", - "dscript": "_f_dlang", - "dml": "_f_dlang", - "diet": "_f_dlang", - "dockerbake": "_f_docker", - "dockercompose": "_f_docker", - "dockerfile": "_f_docker", - "dotenv": "_f_dotenv", - "env": "_f_dotenv", - "dotjs": "_f_dotjs", - "doxygen": "_f_doxygen", - "drawio": "_f_drawio", - "drools": "_f_drools", - "dtd": "_f_dtd", - "dustjs": "_f_dustjs", - "dylan": "_f_dylan", - "dylan-lid": "_f_dylan", - "earthfile": "_f_earthly", - "edge": "_f_edge", - "editorconfig": "_f_editorconfig", - "eex": "_f_eex", - "html-eex": "_f_eex", - "es": "_f_elastic", - "elixir": "_f_elixir", - "elm": "_f_elm", - "erb": "_f_erb", - "html.erb": "_f_erb", - "erlang": "_f_erlang", - "esphome": "_f_esphome", - "excel": "_f_excel", - "falcon": "_f_falcon", - "fql": "_f_fauna", - "fortran": "_f_fortran", - "fortran-modern": "_f_fortran", - "FortranFreeForm": "_f_fortran", - "FortranFixedForm": "_f_fortran", - "fortran_fixed-form": "_f_fortran", - "ftl": "_f_freemarker", - "fsharp": "_f_fsharp", - "fthtml": "_f_fthtml", - "galen": "_f_galen", - "gml-gms": "_f_gamemaker", - "gml-gms2": "_f_gamemaker2", - "gml-gm81": "_f_gamemaker81", - "gcode": "_f_gcode", - "gdscript": "_f_gdscript", - "genstat": "_f_genstat", - "git-commit": "_f_git", - "git-rebase": "_f_git", - "ignore": "_f_git", - "gleam": "_f_gleam", - "glimmer-js": "_f_glimmer", - "glimmer-ts": "_f_glimmer", - "glsl": "_f_glsl", - "glyphs": "_f_glyphs", - "automake": "_f_gnu", - "m4": "_f_gnu", - "makefile": "_f_gnu", - "makefile2": "_f_gnu", - "gnuplot": "_f_gnuplot", - "go": "_f_go", - "go.mod": "_f_go_package", - "go.work": "_f_go_work", - "goctl": "_f_goctl", - "gradle-kotlin-dsl": "_f_gradle", - "grain": "_f_grain", - "graphql": "_f_graphql", - "dot": "_f_graphviz", - "grit": "_f_grit", - "groovy": "_f_groovy", - "haml": "_f_haml", - "handlebars": "_f_handlebars", - "harbour": "_f_harbour", - "hcl": "_f_hashicorp", - "haskell": "_f_haskell", - "literate haskell": "_f_haskell", - "haxe": "_f_haxe", - "hxml": "_f_haxe", - "Haxe AST dump": "_f_haxe", - "helm": "_f_helm", - "hjson": "_f_hjson", - "hlsl": "_f_hlsl", - "home-assistant": "_f_homeassistant", - "hosts": "_f_host", - "html": "_f_html", - "http": "_f_http", - "hunspell.aff": "_f_hunspell", - "hunspell.dic": "_f_hunspell", - "hy": "_f_hy", - "hypr": "_f_hypr", - "icl": "_f_icl", - "imba": "_f_imba", - "4GL": "_f_informix", - "ini": "_f_ini", - "ink": "_f_ink", - "innosetup": "_f_innosetup", - "io": "_f_io", - "iodine": "_f_iodine", - "janet": "_f_janet", - "java": "_f_java", - "jekyll": "_f_jekyll", - "jenkins": "_f_jenkins", - "declarative": "_f_jenkins", - "jenkinsfile": "_f_jenkins", - "jest-snapshot": "_f_jest_snapshot", - "jinja": "_f_jinja", - "jinja-java": "_f_jinja", - "jinja-html": "_f_jinja", - "jinja-xml": "_f_jinja", - "jinja-css": "_f_jinja", - "jinja-json": "_f_jinja", - "jinja-md": "_f_jinja", - "jinja-py": "_f_jinja", - "jinja-rb": "_f_jinja", - "jinja-js": "_f_jinja", - "jinja-yaml": "_f_jinja", - "jinja-toml": "_f_jinja", - "jinja-latex": "_f_jinja", - "jinja-lua": "_f_jinja", - "jinja-properties": "_f_jinja", - "jinja-shell": "_f_jinja", - "jinja-dockerfile": "_f_jinja", - "jinja-sql": "_f_jinja", - "jinja-terraform": "_f_jinja", - "jinja-nginx": "_f_jinja", - "jinja-groovy": "_f_jinja", - "jinja-systemd": "_f_jinja", - "jinja-cpp": "_f_jinja", - "javascript": "_f_js", - "json": "_f_json", - "json-tmlanguage": "_f_json", - "jsonc": "_f_json", - "jsonl": "_f_json", - "json5": "_f_json5", - "jsonnet": "_f_jsonnet", - "julia": "_f_julia", - "juliamarkdown": "_f_julia", - "just": "_f_just", - "k": "_f_k", - "kivy": "_f_kivy", - "kos": "_f_kos", - "kotlin": "_f_kotlin", - "kotlinscript": "_f_kotlin", - "kusto": "_f_kusto", - "lark": "_f_lark", - "latino": "_f_latino", - "lean4": "_f_lean", - "lean4markdown": "_f_lean", - "less": "_f_less", - "lex": "_f_lex", - "lilypond": "_f_lilypond", - "lisp": "_f_lisp", - "autolisp": "_f_lisp", - "autolispdcl": "_f_lisp", - "log": "_f_log", - "lolcode": "_f_lolcode", - "lsl": "_f_lsl", - "lua": "_f_lua", - "markdown": "_f_markdown", - "marko": "_f_marko", - "matlab": "_f_matlab", - "maxscript": "_f_maxscript", - "mel": "_f_maya", - "mdx": "_f_mdx", - "mediawiki": "_f_mediawiki", - "mermaid": "_f_mermaid", - "meson": "_f_meson", - "metal": "_f_metal", - "bc-mcfunction": "_f_minecraft", - "bc-minecraft-language": "_f_minecraft", - "bc-minecraft-molang": "_f_minecraft", - "bc-minecraft-project": "_f_minecraft", - "mcdoc": "_f_minecraft", - "mcfunction": "_f_minecraft", - "mcmeta": "_f_minecraft", - "mcscript": "_f_minecraft", - "minecraft-lang": "_f_minecraft", - "options-txt": "_f_minecraft", - "snbt": "_f_minecraft", - "mv": "_f_mivascript", - "mjml": "_f_mjml", - "powerquery": "_f_mlang", - "mojo": "_f_mojo", - "mojolicious": "_f_mojolicious", - "mongo": "_f_mongo", - "mson": "_f_mson", - "mvt": "_f_mvt", - "mvtcss": "_f_mvtcss", - "mvtjs": "_f_mvtjs", - "nearley": "_f_nearly", - "cypher": "_f_neo4j", - "nginx": "_f_nginx", - "nim": "_f_nim", - "nimble": "_f_nimble", - "nix": "_f_nix", - "nsis": "_f_nsi", - "nfl": "_f_nsi", - "nsl": "_f_nsi", - "bridlensis": "_f_nsi", - "nunjucks": "_f_nunjucks", - "nushell": "_f_nushell", - "objective-c": "_f_objectivec", - "objective-cpp": "_f_objectivecpp", - "ocaml": "_f_ocaml", - "ocamllex": "_f_ocaml", - "menhir": "_f_ocaml", - "ogone": "_f_ogone", - "openhab": "_f_openHAB", - "scad": "_f_openscad", - "org": "_f_org", - "pddl": "_f_pddl", - "happenings": "_f_pddl_happenings", - "plan": "_f_pddl_plan", - "perl": "_f_perl", - "perl6": "_f_perl6", - "pgsql": "_f_pgsql", - "php": "_f_php", - "pine": "_f_pine", - "pinescript": "_f_pine", - "pip-requirements": "_f_pip", - "platformio-debug.disassembly": "_f_platformio", - "platformio-debug.memoryview": "_f_platformio", - "plsql": "_f_plsql", - "oracle": "_f_plsql", - "oraclesql": "_f_plsql", - "oracle-sql": "_f_plsql", - "po": "_f_poedit", - "polyglot-notebook": "_f_polyglot", - "polymer": "_f_polymer", - "pony": "_f_pony", - "postcss": "_f_postcss", - "postscript": "_f_postscript", - "powershell": "_f_powershell", - "prisma": "_f_prisma", - "pde": "_f_processinglang", - "abl": "_f_progress", - "prolog": "_f_prolog", - "prometheus": "_f_prometheus", - "proto3": "_f_protobuf", - "proto": "_f_protobuf", - "prototext": "_f_protobuf", - "jade": "_f_pug", - "puppet": "_f_puppet", - "purescript": "_f_purescript", - "pyret": "_f_pyret", - "pyscript": "_f_pyscript", - "python": "_f_python", - "pythowo": "_f_pythowo", - "qlik": "_f_qlikview", - "qml": "_f_qml", - "qsharp": "_f_qsharp", - "r": "_f_r", - "ra_syntax_tree": "_f_ra_syntax_tree", - "racket": "_f_racket", - "raku": "_f_raku", - "raml": "_f_raml", - "razor": "_f_razor", - "aspnetcorerazor": "_f_razor", - "javascriptreact": "_f_reactjs", - "typescriptreact": "_f_reactts", - "reason": "_f_reason", - "red": "_f_red", - "rescript": "_f_rescript", - "restructuredtext": "_f_rest", - "rexx": "_f_rexx", - "riot": "_f_riot", - "ripple": "_f_ripple", - "rmd": "_f_rmd", - "rnc": "_f_rnc", - "robot": "_f_robotframework", - "robots-txt": "_f_robots", - "ruby": "_f_ruby", - "rust": "_f_rust", - "s-lang": "_f_s-lang", - "san": "_f_san", - "SAS": "_f_sas", - "sass": "_f_sass", - "sass.hover": "_f_sass", - "sbt": "_f_sbt", - "scala": "_f_scala", - "scilab": "_f_scilab", - "vbscript": "_f_script", - "scss": "_f_scss", - "sdl": "_f_sdlang", - "search-result": "_f_search_result", - "shaderlab": "_f_shaderlab", - "shellscript": "_f_shell", - "silverstripe": "_f_silverstripe", - "sino": "_f_sino", - "eskip": "_f_skipper", - "slang": "_f_slang", - "slice": "_f_slice", - "slim": "_f_slim", - "slint": "_f_slint", - "sln": "_f_sln", - "smarty": "_f_smarty", - "snakemake": "_f_snakemake", - "snort": "_f_snort", - "solidity": "_f_solidity", - "sparql": "_f_sparql", - "sqf": "_f_sqf", - "sql": "_f_sql", - "squirrel": "_f_squirrel", - "stan": "_f_stan", - "stata": "_f_stata", - "stencil": "_f_stencil", - "stencil-html": "_f_stencil", - "stylable": "_f_stylable", - "source.css.styled": "_f_styled", - "stylus": "_f_stylus", - "svelte": "_f_svelte", - "svg": "_f_svg", - "Swagger": "_f_swagger", - "swagger": "_f_swagger", - "swift": "_f_swift", - "swig": "_f_swig", - "systemd-conf": "_f_systemd", - "systemd-unit-file": "_f_systemd", - "systemverilog": "_f_systemverilog", - "t4": "_f_t4tt", - "tailwindcss": "_f_tailwind", - "teal": "_f_teal", - "templ": "_f_templ", - "tera": "_f_tera", - "terraform": "_f_terraform", - "tex": "_f_tex", - "latex": "_f_tex", - "bibtex": "_f_tex", - "doctex": "_f_tex", - "csv": "_f_text", - "csv (pipe)": "_f_text", - "csv (semicolon)": "_f_text", - "csv (whitespace)": "_f_text", - "dynamic csv": "_f_text", - "tsv": "_f_text", - "plaintext": "_f_text", - "vim-help": "_f_text", - "textile": "_f_textile", - "tiltfile": "_f_tiltfile", - "toit": "_f_toit", - "toml": "_f_toml", - "toon": "_f_toon", - "tt": "_f_tt", - "ttcn": "_f_ttcn", - "tuc": "_f_tuc", - "twig": "_f_twig", - "typescript": "_f_typescript", - "typoscript": "_f_typo3", - "uiua": "_f_uiua", - "unison": "_f_unison", - "vb": "_f_vb", - "vba": "_f_vba", - "velocity": "_f_velocity", - "vento": "_f_vento", - "verilog": "_f_verilog", - "vhdl": "_f_vhdl", - "viml": "_f_vim", - "vim-snippet": "_f_vim", - "vitest-snapshot": "_f_vitest", - "v": "_f_vlang", - "volt": "_f_volt", - "vroom": "_f_vroom", - "snippets": "_f_vscode", - "vue": "_f_vue", - "vyper": "_f_vyper", - "wasm": "_f_wasm", - "wat": "_f_wasm", - "wenyan": "_f_wenyan", - "wgsl": "_f_wgsl", - "wikitext": "_f_wikitext", - "wai": "_f_wit", - "wolfram": "_f_wolfram", - "wurstlang": "_f_wurst", - "wurst": "_f_wurst", - "xmake": "_f_xmake", - "xml": "_f_xml", - "xcompose": "_f_xorg", - "xquery": "_f_xquery", - "xsl": "_f_xsl", - "xslt": "_f_xsl", - "yacc": "_f_yacc", - "yaml": "_f_yaml", - "yaml-tmlanguage": "_f_yaml", - "spring-boot-properties-yaml": "_f_yaml", - "yang": "_f_yang", - "yarnlock": "_f_yarn", - "zig": "_f_zig", - "zip": "_f_zip" - }, - "light": { - "file": "_file_light", - "folder": "_folder_light", - "folderExpanded": "_folder_light_open", - "rootFolder": "_root_folder_light", - "rootFolderExpanded": "_root_folder_light_open", - "folderNames": { - "android": "_fd_android", - ".angular": "_fd_angular", - "apache": "_fd_apache", - "apache2": "_fd_apache", - "httpd": "_fd_apache", - "api": "_fd_api", - ".api": "_fd_api", - "apis": "_fd_api", - ".apis": "_fd_api", - "app": "_fd_app", - "apps": "_fd_app", - ".app": "_fd_app", - "application": "_fd_app", - "applications": "_fd_app", - "arangodb": "_fd_arangodb", - "arango": "_fd_arangodb", - "assets": "_fd_asset", - ".assets": "_fd_asset", - ".astro": "_fd_astro", - "audio": "_fd_audio", - ".audio": "_fd_audio", - "audios": "_fd_audio", - ".audios": "_fd_audio", - "sound": "_fd_audio", - ".sound": "_fd_audio", - "sounds": "_fd_audio", - ".sounds": "_fd_audio", - "aurelia_project": "_fd_aurelia", - "aws": "_fd_aws", - ".aws": "_fd_aws", - "azure": "_fd_azure", - ".azure": "_fd_azure", - "azure-pipelines": "_fd_azurepipelines", - ".azure-pipelines": "_fd_azurepipelines", - "bin": "_fd_binary", - ".bin": "_fd_binary", - "blocs": "_fd_bloc", - "bloc": "_fd_bloc", - "blueprint": "_fd_blueprint", - ".blueprint": "_fd_blueprint", - "blueprints": "_fd_blueprint", - ".blueprints": "_fd_blueprint", - "bot": "_fd_bot", - ".bot": "_fd_bot", - "bower_components": "_fd_bower", - ".buildkite": "_fd_buildkite", - "cake": "_fd_cake", - ".cake": "_fd_cake", - "cargo": "_fd_cargo", - ".cargo": "_fd_cargo", - "crates": "_fd_cargo", - "certificates": "_fd_certificate", - ".certificates": "_fd_certificate", - "certs": "_fd_certificate", - "certs.": "_fd_certificate", - ".changeset": "_fd_changesets", - "chef": "_fd_chef", - ".chef": "_fd_chef", - ".circleci": "_fd_circleci", - ".claude": "_fd_claude", - "cli": "_fd_cli", - "cmd": "_fd_cli", - "command": "_fd_cli", - "commands": "_fd_cli", - "commandline": "_fd_cli", - "console": "_fd_cli", - "client": "_fd_client", - "clients": "_fd_client", - ".cloudflare": "_fd_cloudflare", - "cloudflare": "_fd_cloudflare", - ".cmake": "_fd_cmake", - "cmake": "_fd_cmake", - "common": "_fd_common", - "component": "_fd_component", - "components": "_fd_component", - ".components": "_fd_component", - "gui": "_fd_component", - "src-ui": "_fd_component", - "ui": "_fd_component", - "widgets": "_fd_component", - "composer": "_fd_composer", - ".composer": "_fd_composer", - "conf": "_fd_config", - ".conf": "_fd_config", - "config": "_fd_config", - ".config": "_fd_config", - "configs": "_fd_config", - ".configs": "_fd_config", - "configuration": "_fd_config", - ".configuration": "_fd_config", - "configurations": "_fd_config", - ".configurations": "_fd_config", - "setting": "_fd_config", - ".setting": "_fd_config", - "settings": "_fd_config", - ".settings": "_fd_config", - "ini": "_fd_config", - ".ini": "_fd_config", - "initializers": "_fd_config", - ".initializers": "_fd_config", - "__controller__": "_fd_controller", - "__controllers__": "_fd_controller", - "controller": "_fd_controller", - "controllers": "_fd_controller", - ".controllers": "_fd_controller", - "__handler__": "_fd_controller", - "__handlers__": "_fd_controller", - "handler": "_fd_controller", - ".handler": "_fd_controller", - "handlers": "_fd_controller", - ".handlers": "_fd_controller", - "coverage": "_fd_coverage", - "css": "_fd_css", - "_css": "_fd_css", - "cubits": "_fd_cubit", - "cubit": "_fd_cubit", - ".cursor": "_fd_light_cursor", - "cypress": "_fd_light_cypress", - ".dapr": "_fd_dapr", - "dapr": "_fd_dapr", - "dart": "_fd_dart", - ".dart_tool": "_fd_dart", - "datadog": "_fd_datadog", - ".datadog": "_fd_datadog", - "db": "_fd_db", - "database": "_fd_db", - "sql": "_fd_db", - "data": "_fd_db", - "repo": "_fd_db", - "repository": "_fd_db", - "repositories": "_fd_db", - "store": "_fd_db", - "stores": "_fd_db", - "debian": "_fd_debian", - "deb": "_fd_debian", - ".dependabot": "_fd_dependabot", - ".devcontainer": "_fd_devcontainer", - "dist": "_fd_dist", - ".dist": "_fd_dist", - "dists": "_fd_dist", - "out": "_fd_dist", - "outs": "_fd_dist", - "export": "_fd_dist", - "exports": "_fd_dist", - "build": "_fd_dist", - ".build": "_fd_dist", - "builds": "_fd_dist", - "release": "_fd_dist", - "releases": "_fd_dist", - "target": "_fd_dist", - "targets": "_fd_dist", - "docker": "_fd_docker", - ".docker": "_fd_docker", - "docs": "_fd_docs", - "doc": "_fd_docs", - "document": "_fd_docs", - "documents": "_fd_docs", - "e2e": "_fd_e2e", - ".elasticbeanstalk": "_fd_elasticbeanstalk", - ".ebextensions": "_fd_elasticbeanstalk", - "electron": "_fd_light_electron", - ".expo": "_fd_light_expo", - ".expo-shared": "_fd_light_expo", - "favicon": "_fd_favicon", - "favicons": "_fd_favicon", - "flow": "_fd_flow", - "flow-typed": "_fd_flow", - "flutter": "_fd_flutter", - "Flutter": "_fd_flutter", - "fonts": "_fd_light_fonts", - "font": "_fd_light_fonts", - "fnt": "_fd_light_fonts", - "webfonts": "_fd_light_fonts", - ".front-commerce": "_fd_frontcommerce", - "gcp": "_fd_gcp", - ".gcp": "_fd_gcp", - ".gemini": "_fd_gemini", - ".git": "_fd_git", - "submodules": "_fd_git", - ".submodules": "_fd_git", - ".github": "_fd_github", - ".gitlab": "_fd_gitlab", - "godot": "_fd_godot", - ".godot": "_fd_godot", - "gradle": "_fd_light_gradle", - ".gradle": "_fd_light_gradle", - "graphql": "_fd_graphql", - "grunt": "_fd_grunt", - "gulp": "_fd_gulp", - "gulpfile.js": "_fd_gulp", - "gulpfile.coffee": "_fd_gulp", - "gulpfile.ts": "_fd_gulp", - "gulpfile.babel.js": "_fd_gulp", - "gulpfile.babel.coffee": "_fd_gulp", - "gulpfile.babel.ts": "_fd_gulp", - ".haxelib": "_fd_haxelib", - "haxe_libraries": "_fd_haxelib", - "helper": "_fd_helper", - ".helper": "_fd_helper", - "helpers": "_fd_helper", - ".helpers": "_fd_helper", - ".histoire": "_fd_histoire", - "hook": "_fd_hook", - ".hook": "_fd_hook", - "hooks": "_fd_hook", - ".hooks": "_fd_hook", - ".husky": "_fd_husky", - ".idea": "_fd_idea", - ".fig": "_fd_images", - ".figs": "_fd_images", - "images": "_fd_images", - "image": "_fd_images", - ".img": "_fd_images", - "img": "_fd_images", - ".imgs": "_fd_images", - "imgs": "_fd_images", - "icons": "_fd_images", - "icon": "_fd_images", - "ico": "_fd_images", - "screenshot": "_fd_images", - "screenshots": "_fd_images", - "svg": "_fd_images", - "texture": "_fd_images", - "textures": "_fd_images", - "include": "_fd_include", - "includes": "_fd_include", - "incl": "_fd_include", - "inc": "_fd_include", - ".include": "_fd_include", - ".includes": "_fd_include", - ".incl": "_fd_include", - ".inc": "_fd_include", - "_include": "_fd_include", - "_includes": "_fd_include", - "_incl": "_fd_include", - "_inc": "_fd_include", - "interface": "_fd_interfaces", - "interfaces": "_fd_interfaces", - "ios": "_fd_ios", - "js": "_fd_js", - "json": "_fd_json", - ".junie": "_fd_junie", - "kotlin": "_fd_kotlin", - "Kotlin": "_fd_kotlin", - ".kotlin": "_fd_kotlin", - "kubernetes": "_fd_kubernetes", - "k8s": "_fd_kubernetes", - "kube": "_fd_kubernetes", - "kuber": "_fd_kubernetes", - ".kubernetes": "_fd_kubernetes", - ".k8s": "_fd_kubernetes", - ".kube": "_fd_kubernetes", - ".kuber": "_fd_kubernetes", - "less": "_fd_less", - "_less": "_fd_less", - "lib": "_fd_library", - "libs": "_fd_library", - ".lib": "_fd_library", - ".libs": "_fd_library", - "__lib__": "_fd_library", - "__libs__": "_fd_library", - "library": "_fd_library", - "libraries": "_fd_library", - "linux": "_fd_linux", - "lang": "_fd_locale", - "language": "_fd_locale", - "languages": "_fd_locale", - "locale": "_fd_locale", - "locales": "_fd_locale", - "_locale": "_fd_locale", - "_locales": "_fd_locale", - "internationalization": "_fd_locale", - "globalization": "_fd_locale", - "localization": "_fd_locale", - "i18n": "_fd_locale", - "g11n": "_fd_locale", - "l10n": "_fd_locale", - "log": "_fd_log", - "logs": "_fd_log", - "macos": "_fd_macos", - "darwin": "_fd_macos", - "mariadb": "_fd_mariadb", - "maria": "_fd_mariadb", - ".mvn": "_fd_maven", - "mediawiki": "_fd_mediawiki", - "memcached": "_fd_memcached", - ".memcached": "_fd_memcached", - ".meteor": "_fd_light_meteor", - "middleware": "_fd_middleware", - "middlewares": "_fd_middleware", - ".minecraft": "_fd_minecraft", - "minikube": "_fd_minikube", - "minik8s": "_fd_minikube", - "minikuber": "_fd_minikube", - "mjml": "_fd_mjml", - ".mjml": "_fd_mjml", - "mocks": "_fd_mock", - ".mocks": "_fd_mock", - "__mocks__": "_fd_mock", - "model": "_fd_model", - ".model": "_fd_model", - "models": "_fd_model", - ".models": "_fd_model", - "entities": "_fd_model", - ".entities": "_fd_model", - "modules": "_fd_module", - "mojo": "_fd_mojo", - "mongodb": "_fd_mongodb", - "mongo": "_fd_mongodb", - ".mypy_cache": "_fd_light_mypy", - "mysqldb": "_fd_light_mysql", - "mysql": "_fd_light_mysql", - "netlify": "_fd_netlify", - ".next": "_fd_next", - "nginx": "_fd_nginx", - "conf.d": "_fd_nginx", - ".niv": "_fd_nix", - ".nix": "_fd_nix", - "nix": "_fd_nix", - "niv": "_fd_nix", - "node_modules": "_fd_light_node", - "notebooks": "_fd_notebooks", - "notebook": "_fd_notebooks", - "notification": "_fd_notification", - "notifications": "_fd_notification", - "event": "_fd_notification", - "events": "_fd_notification", - ".nuget": "_fd_nuget", - "nuxt": "_fd_nuxt", - ".nuxt": "_fd_nuxt", - "package": "_fd_package", - "packages": "_fd_package", - ".package": "_fd_package", - ".packages": "_fd_package", - "pkg": "_fd_package", - ".paket": "_fd_paket", - "php": "_fd_php", - ".pio": "_fd_platformio", - ".pioenvs": "_fd_platformio", - "plugin": "_fd_plugin", - ".plugin": "_fd_plugin", - "plugins": "_fd_plugin", - ".plugins": "_fd_plugin", - "extension": "_fd_plugin", - ".extension": "_fd_plugin", - "extensions": "_fd_plugin", - ".extensions": "_fd_plugin", - "prisma": "_fd_prisma", - "private": "_fd_private", - ".private": "_fd_private", - "public": "_fd_public", - ".public": "_fd_public", - ".pytest_cache": "_fd_pytest", - ".venv": "_fd_python", - ".virtualenv": "_fd_python", - "__pycache__": "_fd_python", - "ravendb": "_fd_ravendb", - "redis": "_fd_redis", - "redux": "_fd_light_redux", - "route": "_fd_route", - "routes": "_fd_route", - "_route": "_fd_route", - "_routes": "_fd_route", - "router": "_fd_route", - "routers": "_fd_route", - "sass": "_fd_light_sass", - "scss": "_fd_light_sass", - "_sass": "_fd_light_sass", - "_scss": "_fd_light_sass", - "script": "_fd_script", - "scripts": "_fd_script", - "seedkit": "_fd_seedkit", - ".seedkit": "_fd_seedkit", - "server": "_fd_server", - "service": "_fd_services", - "services": "_fd_services", - "share": "_fd_shared", - "shared": "_fd_shared", - ".share": "_fd_shared", - ".shared": "_fd_shared", - "__shared__": "_fd_shared", - "__share__": "_fd_shared", - ".snaplet": "_fd_snaplet", - ".spin": "_fd_spin", - "src": "_fd_src", - "source": "_fd_src", - "sources": "_fd_src", - "__src__": "_fd_src", - "sso": "_fd_sso", - "story": "_fd_story", - "stories": "_fd_story", - "__stories__": "_fd_story", - ".storybook": "_fd_story", - "style": "_fd_style", - "styles": "_fd_style", - "supabase": "_fd_supabase", - "svelte": "_fd_svelte", - ".svelte-kit": "_fd_svelte", - "src-tauri": "_fd_tauri", - "temp": "_fd_temp", - ".temp": "_fd_temp", - "tmp": "_fd_temp", - ".tmp": "_fd_temp", - "template": "_fd_template", - ".template": "_fd_template", - "templates": "_fd_template", - ".templates": "_fd_template", - "tests": "_fd_test", - ".tests": "_fd_test", - "test": "_fd_test", - ".test": "_fd_test", - "__tests__": "_fd_test", - "__test__": "_fd_test", - "spec": "_fd_test", - ".spec": "_fd_test", - "specs": "_fd_test", - ".specs": "_fd_test", - "integration": "_fd_test", - "theme": "_fd_theme", - "themes": "_fd_theme", - "tool": "_fd_tools", - "tools": "_fd_tools", - ".tools": "_fd_tools", - "util": "_fd_tools", - "utils": "_fd_tools", - "utilities": "_fd_tools", - "tooling": "_fd_tools", - ".travis": "_fd_travis", - ".trunk": "_fd_trunk", - ".turbo": "_fd_turbo", - "typescript": "_fd_typescript", - "ts": "_fd_typescript", - "typings": "_fd_typings", - "types": "_fd_typings", - "@types": "_fd_typings", - "vagrant": "_fd_vagrant", - ".vagrant": "_fd_vagrant", - ".vercel": "_fd_vercel", - "video": "_fd_video", - ".video": "_fd_video", - "videos": "_fd_video", - ".videos": "_fd_video", - "html": "_fd_view", - "view": "_fd_view", - "views": "_fd_view", - "layout": "_fd_view", - "layouts": "_fd_view", - "page": "_fd_view", - "pages": "_fd_view", - "_view": "_fd_view", - "_views": "_fd_view", - "_layout": "_fd_view", - "_layouts": "_fd_view", - "_page": "_fd_view", - "_pages": "_fd_view", - ".vitepress": "_fd_vitepress", - ".vs": "_fd_vs", - ".vscode": "_fd_vscode", - "vscode": "_fd_vscode", - ".vscode-test": "_fd_vscode_test", - "wasm": "_fd_wasm", - "WASM": "_fd_wasm", - "webassembly": "_fd_wasm", - "WebAssembly": "_fd_wasm", - "webpack": "_fd_webpack", - ".webpack": "_fd_webpack", - "windows": "_fd_windows", - "win32": "_fd_windows", - ".windsurf": "_fd_windsurf", - "wit": "_fd_wit", - ".web": "_fd_www", - "www": "_fd_www", - "wwwroot": "_fd_www", - "web": "_fd_www", - ".yarn": "_fd_yarn", - ".zed": "_fd_light_zed" - }, - "folderNamesExpanded": { - "android": "_fd_android_open", - ".angular": "_fd_angular_open", - "apache": "_fd_apache_open", - "apache2": "_fd_apache_open", - "httpd": "_fd_apache_open", - "api": "_fd_api_open", - ".api": "_fd_api_open", - "apis": "_fd_api_open", - ".apis": "_fd_api_open", - "app": "_fd_app_open", - "apps": "_fd_app_open", - ".app": "_fd_app_open", - "application": "_fd_app_open", - "applications": "_fd_app_open", - "arangodb": "_fd_arangodb_open", - "arango": "_fd_arangodb_open", - "assets": "_fd_asset_open", - ".assets": "_fd_asset_open", - ".astro": "_fd_astro_open", - "audio": "_fd_audio_open", - ".audio": "_fd_audio_open", - "audios": "_fd_audio_open", - ".audios": "_fd_audio_open", - "sound": "_fd_audio_open", - ".sound": "_fd_audio_open", - "sounds": "_fd_audio_open", - ".sounds": "_fd_audio_open", - "aurelia_project": "_fd_aurelia_open", - "aws": "_fd_aws_open", - ".aws": "_fd_aws_open", - "azure": "_fd_azure_open", - ".azure": "_fd_azure_open", - "azure-pipelines": "_fd_azurepipelines_open", - ".azure-pipelines": "_fd_azurepipelines_open", - "bin": "_fd_binary_open", - ".bin": "_fd_binary_open", - "blocs": "_fd_bloc_open", - "bloc": "_fd_bloc_open", - "blueprint": "_fd_blueprint_open", - ".blueprint": "_fd_blueprint_open", - "blueprints": "_fd_blueprint_open", - ".blueprints": "_fd_blueprint_open", - "bot": "_fd_bot_open", - ".bot": "_fd_bot_open", - "bower_components": "_fd_bower_open", - ".buildkite": "_fd_buildkite_open", - "cake": "_fd_cake_open", - ".cake": "_fd_cake_open", - "cargo": "_fd_cargo_open", - ".cargo": "_fd_cargo_open", - "crates": "_fd_cargo_open", - "certificates": "_fd_certificate_open", - ".certificates": "_fd_certificate_open", - "certs": "_fd_certificate_open", - "certs.": "_fd_certificate_open", - ".changeset": "_fd_changesets_open", - "chef": "_fd_chef_open", - ".chef": "_fd_chef_open", - ".circleci": "_fd_circleci_open", - ".claude": "_fd_claude_open", - "cli": "_fd_cli_open", - "cmd": "_fd_cli_open", - "command": "_fd_cli_open", - "commands": "_fd_cli_open", - "commandline": "_fd_cli_open", - "console": "_fd_cli_open", - "client": "_fd_client_open", - "clients": "_fd_client_open", - ".cloudflare": "_fd_cloudflare_open", - "cloudflare": "_fd_cloudflare_open", - ".cmake": "_fd_cmake_open", - "cmake": "_fd_cmake_open", - "common": "_fd_common_open", - "component": "_fd_component_open", - "components": "_fd_component_open", - ".components": "_fd_component_open", - "gui": "_fd_component_open", - "src-ui": "_fd_component_open", - "ui": "_fd_component_open", - "widgets": "_fd_component_open", - "composer": "_fd_composer_open", - ".composer": "_fd_composer_open", - "conf": "_fd_config_open", - ".conf": "_fd_config_open", - "config": "_fd_config_open", - ".config": "_fd_config_open", - "configs": "_fd_config_open", - ".configs": "_fd_config_open", - "configuration": "_fd_config_open", - ".configuration": "_fd_config_open", - "configurations": "_fd_config_open", - ".configurations": "_fd_config_open", - "setting": "_fd_config_open", - ".setting": "_fd_config_open", - "settings": "_fd_config_open", - ".settings": "_fd_config_open", - "ini": "_fd_config_open", - ".ini": "_fd_config_open", - "initializers": "_fd_config_open", - ".initializers": "_fd_config_open", - "__controller__": "_fd_controller_open", - "__controllers__": "_fd_controller_open", - "controller": "_fd_controller_open", - "controllers": "_fd_controller_open", - ".controllers": "_fd_controller_open", - "__handler__": "_fd_controller_open", - "__handlers__": "_fd_controller_open", - "handler": "_fd_controller_open", - ".handler": "_fd_controller_open", - "handlers": "_fd_controller_open", - ".handlers": "_fd_controller_open", - "coverage": "_fd_coverage_open", - "css": "_fd_css_open", - "_css": "_fd_css_open", - "cubits": "_fd_cubit_open", - "cubit": "_fd_cubit_open", - ".cursor": "_fd_light_cursor_open", - "cypress": "_fd_light_cypress_open", - ".dapr": "_fd_dapr_open", - "dapr": "_fd_dapr_open", - "dart": "_fd_dart_open", - ".dart_tool": "_fd_dart_open", - "datadog": "_fd_datadog_open", - ".datadog": "_fd_datadog_open", - "db": "_fd_db_open", - "database": "_fd_db_open", - "sql": "_fd_db_open", - "data": "_fd_db_open", - "repo": "_fd_db_open", - "repository": "_fd_db_open", - "repositories": "_fd_db_open", - "store": "_fd_db_open", - "stores": "_fd_db_open", - "debian": "_fd_debian_open", - "deb": "_fd_debian_open", - ".dependabot": "_fd_dependabot_open", - ".devcontainer": "_fd_devcontainer_open", - "dist": "_fd_dist_open", - ".dist": "_fd_dist_open", - "dists": "_fd_dist_open", - "out": "_fd_dist_open", - "outs": "_fd_dist_open", - "export": "_fd_dist_open", - "exports": "_fd_dist_open", - "build": "_fd_dist_open", - ".build": "_fd_dist_open", - "builds": "_fd_dist_open", - "release": "_fd_dist_open", - "releases": "_fd_dist_open", - "target": "_fd_dist_open", - "targets": "_fd_dist_open", - "docker": "_fd_docker_open", - ".docker": "_fd_docker_open", - "docs": "_fd_docs_open", - "doc": "_fd_docs_open", - "document": "_fd_docs_open", - "documents": "_fd_docs_open", - "e2e": "_fd_e2e_open", - ".elasticbeanstalk": "_fd_elasticbeanstalk_open", - ".ebextensions": "_fd_elasticbeanstalk_open", - "electron": "_fd_light_electron_open", - ".expo": "_fd_light_expo_open", - ".expo-shared": "_fd_light_expo_open", - "favicon": "_fd_favicon_open", - "favicons": "_fd_favicon_open", - "flow": "_fd_flow_open", - "flow-typed": "_fd_flow_open", - "flutter": "_fd_flutter_open", - "Flutter": "_fd_flutter_open", - "fonts": "_fd_light_fonts_open", - "font": "_fd_light_fonts_open", - "fnt": "_fd_light_fonts_open", - "webfonts": "_fd_light_fonts_open", - ".front-commerce": "_fd_frontcommerce_open", - "gcp": "_fd_gcp_open", - ".gcp": "_fd_gcp_open", - ".gemini": "_fd_gemini_open", - ".git": "_fd_git_open", - "submodules": "_fd_git_open", - ".submodules": "_fd_git_open", - ".github": "_fd_github_open", - ".gitlab": "_fd_gitlab_open", - "godot": "_fd_godot_open", - ".godot": "_fd_godot_open", - "gradle": "_fd_light_gradle_open", - ".gradle": "_fd_light_gradle_open", - "graphql": "_fd_graphql_open", - "grunt": "_fd_grunt_open", - "gulp": "_fd_gulp_open", - "gulpfile.js": "_fd_gulp_open", - "gulpfile.coffee": "_fd_gulp_open", - "gulpfile.ts": "_fd_gulp_open", - "gulpfile.babel.js": "_fd_gulp_open", - "gulpfile.babel.coffee": "_fd_gulp_open", - "gulpfile.babel.ts": "_fd_gulp_open", - ".haxelib": "_fd_haxelib_open", - "haxe_libraries": "_fd_haxelib_open", - "helper": "_fd_helper_open", - ".helper": "_fd_helper_open", - "helpers": "_fd_helper_open", - ".helpers": "_fd_helper_open", - ".histoire": "_fd_histoire_open", - "hook": "_fd_hook_open", - ".hook": "_fd_hook_open", - "hooks": "_fd_hook_open", - ".hooks": "_fd_hook_open", - ".husky": "_fd_husky_open", - ".idea": "_fd_idea_open", - ".fig": "_fd_images_open", - ".figs": "_fd_images_open", - "images": "_fd_images_open", - "image": "_fd_images_open", - ".img": "_fd_images_open", - "img": "_fd_images_open", - ".imgs": "_fd_images_open", - "imgs": "_fd_images_open", - "icons": "_fd_images_open", - "icon": "_fd_images_open", - "ico": "_fd_images_open", - "screenshot": "_fd_images_open", - "screenshots": "_fd_images_open", - "svg": "_fd_images_open", - "texture": "_fd_images_open", - "textures": "_fd_images_open", - "include": "_fd_include_open", - "includes": "_fd_include_open", - "incl": "_fd_include_open", - "inc": "_fd_include_open", - ".include": "_fd_include_open", - ".includes": "_fd_include_open", - ".incl": "_fd_include_open", - ".inc": "_fd_include_open", - "_include": "_fd_include_open", - "_includes": "_fd_include_open", - "_incl": "_fd_include_open", - "_inc": "_fd_include_open", - "interface": "_fd_interfaces_open", - "interfaces": "_fd_interfaces_open", - "ios": "_fd_ios_open", - "js": "_fd_js_open", - "json": "_fd_json_open", - ".junie": "_fd_junie_open", - "kotlin": "_fd_kotlin_open", - "Kotlin": "_fd_kotlin_open", - ".kotlin": "_fd_kotlin_open", - "kubernetes": "_fd_kubernetes_open", - "k8s": "_fd_kubernetes_open", - "kube": "_fd_kubernetes_open", - "kuber": "_fd_kubernetes_open", - ".kubernetes": "_fd_kubernetes_open", - ".k8s": "_fd_kubernetes_open", - ".kube": "_fd_kubernetes_open", - ".kuber": "_fd_kubernetes_open", - "less": "_fd_less_open", - "_less": "_fd_less_open", - "lib": "_fd_library_open", - "libs": "_fd_library_open", - ".lib": "_fd_library_open", - ".libs": "_fd_library_open", - "__lib__": "_fd_library_open", - "__libs__": "_fd_library_open", - "library": "_fd_library_open", - "libraries": "_fd_library_open", - "linux": "_fd_linux_open", - "lang": "_fd_locale_open", - "language": "_fd_locale_open", - "languages": "_fd_locale_open", - "locale": "_fd_locale_open", - "locales": "_fd_locale_open", - "_locale": "_fd_locale_open", - "_locales": "_fd_locale_open", - "internationalization": "_fd_locale_open", - "globalization": "_fd_locale_open", - "localization": "_fd_locale_open", - "i18n": "_fd_locale_open", - "g11n": "_fd_locale_open", - "l10n": "_fd_locale_open", - "log": "_fd_log_open", - "logs": "_fd_log_open", - "macos": "_fd_macos_open", - "darwin": "_fd_macos_open", - "mariadb": "_fd_mariadb_open", - "maria": "_fd_mariadb_open", - ".mvn": "_fd_maven_open", - "mediawiki": "_fd_mediawiki_open", - "memcached": "_fd_memcached_open", - ".memcached": "_fd_memcached_open", - ".meteor": "_fd_light_meteor_open", - "middleware": "_fd_middleware_open", - "middlewares": "_fd_middleware_open", - ".minecraft": "_fd_minecraft_open", - "minikube": "_fd_minikube_open", - "minik8s": "_fd_minikube_open", - "minikuber": "_fd_minikube_open", - "mjml": "_fd_mjml_open", - ".mjml": "_fd_mjml_open", - "mocks": "_fd_mock_open", - ".mocks": "_fd_mock_open", - "__mocks__": "_fd_mock_open", - "model": "_fd_model_open", - ".model": "_fd_model_open", - "models": "_fd_model_open", - ".models": "_fd_model_open", - "entities": "_fd_model_open", - ".entities": "_fd_model_open", - "modules": "_fd_module_open", - "mojo": "_fd_mojo_open", - "mongodb": "_fd_mongodb_open", - "mongo": "_fd_mongodb_open", - ".mypy_cache": "_fd_light_mypy_open", - "mysqldb": "_fd_light_mysql_open", - "mysql": "_fd_light_mysql_open", - "netlify": "_fd_netlify_open", - ".next": "_fd_next_open", - "nginx": "_fd_nginx_open", - "conf.d": "_fd_nginx_open", - ".niv": "_fd_nix_open", - ".nix": "_fd_nix_open", - "nix": "_fd_nix_open", - "niv": "_fd_nix_open", - "node_modules": "_fd_light_node_open", - "notebooks": "_fd_notebooks_open", - "notebook": "_fd_notebooks_open", - "notification": "_fd_notification_open", - "notifications": "_fd_notification_open", - "event": "_fd_notification_open", - "events": "_fd_notification_open", - ".nuget": "_fd_nuget_open", - "nuxt": "_fd_nuxt_open", - ".nuxt": "_fd_nuxt_open", - "package": "_fd_package_open", - "packages": "_fd_package_open", - ".package": "_fd_package_open", - ".packages": "_fd_package_open", - "pkg": "_fd_package_open", - ".paket": "_fd_paket_open", - "php": "_fd_php_open", - ".pio": "_fd_platformio_open", - ".pioenvs": "_fd_platformio_open", - "plugin": "_fd_plugin_open", - ".plugin": "_fd_plugin_open", - "plugins": "_fd_plugin_open", - ".plugins": "_fd_plugin_open", - "extension": "_fd_plugin_open", - ".extension": "_fd_plugin_open", - "extensions": "_fd_plugin_open", - ".extensions": "_fd_plugin_open", - "prisma": "_fd_prisma_open", - "private": "_fd_private_open", - ".private": "_fd_private_open", - "public": "_fd_public_open", - ".public": "_fd_public_open", - ".pytest_cache": "_fd_pytest_open", - ".venv": "_fd_python_open", - ".virtualenv": "_fd_python_open", - "__pycache__": "_fd_python_open", - "ravendb": "_fd_ravendb_open", - "redis": "_fd_redis_open", - "redux": "_fd_light_redux_open", - "route": "_fd_route_open", - "routes": "_fd_route_open", - "_route": "_fd_route_open", - "_routes": "_fd_route_open", - "router": "_fd_route_open", - "routers": "_fd_route_open", - "sass": "_fd_light_sass_open", - "scss": "_fd_light_sass_open", - "_sass": "_fd_light_sass_open", - "_scss": "_fd_light_sass_open", - "script": "_fd_script_open", - "scripts": "_fd_script_open", - "seedkit": "_fd_seedkit_open", - ".seedkit": "_fd_seedkit_open", - "server": "_fd_server_open", - "service": "_fd_services_open", - "services": "_fd_services_open", - "share": "_fd_shared_open", - "shared": "_fd_shared_open", - ".share": "_fd_shared_open", - ".shared": "_fd_shared_open", - "__shared__": "_fd_shared_open", - "__share__": "_fd_shared_open", - ".snaplet": "_fd_snaplet_open", - ".spin": "_fd_spin_open", - "src": "_fd_src_open", - "source": "_fd_src_open", - "sources": "_fd_src_open", - "__src__": "_fd_src_open", - "sso": "_fd_sso_open", - "story": "_fd_story_open", - "stories": "_fd_story_open", - "__stories__": "_fd_story_open", - ".storybook": "_fd_story_open", - "style": "_fd_style_open", - "styles": "_fd_style_open", - "supabase": "_fd_supabase_open", - "svelte": "_fd_svelte_open", - ".svelte-kit": "_fd_svelte_open", - "src-tauri": "_fd_tauri_open", - "temp": "_fd_temp_open", - ".temp": "_fd_temp_open", - "tmp": "_fd_temp_open", - ".tmp": "_fd_temp_open", - "template": "_fd_template_open", - ".template": "_fd_template_open", - "templates": "_fd_template_open", - ".templates": "_fd_template_open", - "tests": "_fd_test_open", - ".tests": "_fd_test_open", - "test": "_fd_test_open", - ".test": "_fd_test_open", - "__tests__": "_fd_test_open", - "__test__": "_fd_test_open", - "spec": "_fd_test_open", - ".spec": "_fd_test_open", - "specs": "_fd_test_open", - ".specs": "_fd_test_open", - "integration": "_fd_test_open", - "theme": "_fd_theme_open", - "themes": "_fd_theme_open", - "tool": "_fd_tools_open", - "tools": "_fd_tools_open", - ".tools": "_fd_tools_open", - "util": "_fd_tools_open", - "utils": "_fd_tools_open", - "utilities": "_fd_tools_open", - "tooling": "_fd_tools_open", - ".travis": "_fd_travis_open", - ".trunk": "_fd_trunk_open", - ".turbo": "_fd_turbo_open", - "typescript": "_fd_typescript_open", - "ts": "_fd_typescript_open", - "typings": "_fd_typings_open", - "types": "_fd_typings_open", - "@types": "_fd_typings_open", - "vagrant": "_fd_vagrant_open", - ".vagrant": "_fd_vagrant_open", - ".vercel": "_fd_vercel_open", - "video": "_fd_video_open", - ".video": "_fd_video_open", - "videos": "_fd_video_open", - ".videos": "_fd_video_open", - "html": "_fd_view_open", - "view": "_fd_view_open", - "views": "_fd_view_open", - "layout": "_fd_view_open", - "layouts": "_fd_view_open", - "page": "_fd_view_open", - "pages": "_fd_view_open", - "_view": "_fd_view_open", - "_views": "_fd_view_open", - "_layout": "_fd_view_open", - "_layouts": "_fd_view_open", - "_page": "_fd_view_open", - "_pages": "_fd_view_open", - ".vitepress": "_fd_vitepress_open", - ".vs": "_fd_vs_open", - ".vscode": "_fd_vscode_open", - "vscode": "_fd_vscode_open", - ".vscode-test": "_fd_vscode_test_open", - "wasm": "_fd_wasm_open", - "WASM": "_fd_wasm_open", - "webassembly": "_fd_wasm_open", - "WebAssembly": "_fd_wasm_open", - "webpack": "_fd_webpack_open", - ".webpack": "_fd_webpack_open", - "windows": "_fd_windows_open", - "win32": "_fd_windows_open", - ".windsurf": "_fd_windsurf_open", - "wit": "_fd_wit_open", - ".web": "_fd_www_open", - "www": "_fd_www_open", - "wwwroot": "_fd_www_open", - "web": "_fd_www_open", - ".yarn": "_fd_yarn_open", - ".zed": "_fd_light_zed_open" - }, - "fileExtensions": { - "accdb": "_f_access", - "accdt": "_f_access", - "mdb": "_f_access", - "accda": "_f_access", - "accdc": "_f_access", - "accde": "_f_access", - "accdp": "_f_access", - "accdr": "_f_access", - "accdu": "_f_access", - "ade": "_f_access", - "adp": "_f_access", - "laccdb": "_f_access", - "ldb": "_f_access", - "mam": "_f_access", - "maq": "_f_access", - "mdw": "_f_access", - "af": "_f_affinity", - "aftemplate": "_f_affinity", - "afdesign": "_f_affinitydesigner", - "affinitydesigner": "_f_affinitydesigner", - "afphoto": "_f_affinityphoto", - "affinityphoto": "_f_affinityphoto", - "afpub": "_f_affinitypublisher", - "affinitypublisher": "_f_affinitypublisher", - "ai": "_f_ai", - "dal": "_f_al_dal", - "gs": "_f_appscript", - "ino": "_f_arduino", - "pde": "_f_arduino", - "ase": "_f_aseprite", - "aseprite": "_f_aseprite", - "aspx": "_f_aspx", - "ascx": "_f_aspx", - "asm": "_f_assembly", - "s": "_f_assembly", - "astro": "_f_light_astro", - "atom": "_f_atom", - "aac": "_f_audio", - "act": "_f_audio", - "aiff": "_f_audio", - "amr": "_f_audio", - "ape": "_f_audio", - "au": "_f_audio", - "dct": "_f_audio", - "dss": "_f_audio", - "dvf": "_f_audio", - "flac": "_f_audio", - "gsm": "_f_audio", - "iklax": "_f_audio", - "ivs": "_f_audio", - "m4a": "_f_audio", - "m4b": "_f_audio", - "m4p": "_f_audio", - "mmf": "_f_audio", - "mogg": "_f_audio", - "mp3": "_f_audio", - "mpc": "_f_audio", - "msv": "_f_audio", - "oga": "_f_audio", - "ogg": "_f_audio", - "opus": "_f_audio", - "ra": "_f_audio", - "raw": "_f_audio", - "tta": "_f_audio", - "vox": "_f_audio", - "wav": "_f_audio", - "wma": "_f_audio", - "avif": "_f_avif", - "awk": "_f_awk", - "back": "_f_bak", - "backup": "_f_bak", - "bak": "_f_bak", - "a": "_f_binary", - "app": "_f_binary", - "bin": "_f_binary", - "cmo": "_f_binary", - "cmx": "_f_binary", - "cma": "_f_binary", - "cmxa": "_f_binary", - "cmi": "_f_binary", - "dll": "_f_binary", - "exe": "_f_binary", - "hl": "_f_binary", - "ilk": "_f_binary", - "lib": "_f_binary", - "n": "_f_binary", - "ndll": "_f_binary", - "o": "_f_binary", - "obj": "_f_binary", - "pyc": "_f_binary", - "pyd": "_f_binary", - "pyo": "_f_binary", - "pdb": "_f_binary", - "scpt": "_f_binary", - "scptd": "_f_binary", - "so": "_f_binary", - "blend": "_f_blender", - "bb": "_f_blitzbasic", - "buf.yaml": "_f_buf", - "buf.yml": "_f_buf", - "buf.gen.yml": "_f_buf", - "buf.gen.yaml": "_f_buf", - "buf.work.yaml": "_f_buf", - "buf.work.yml": "_f_buf", - "gemfile": "_f_bundler", - "gemfile.lock": "_f_bundler", - "cake": "_f_cake", - "csr": "_f_cert", - "crt": "_f_cert", - "cer": "_f_cert", - "der": "_f_cert", - "pfx": "_f_cert", - "p12": "_f_cert", - "p7b": "_f_cert", - "p7r": "_f_cert", - "src": "_f_cert", - "crl": "_f_cert", - "sst": "_f_cert", - "stl": "_f_cert", - "lucee": "_f_cf", - "h": "_f_cheader", - "class": "_f_class", - "cjm": "_f_clojure", - "cljc": "_f_clojure", - "cljs": "_f_clojurescript", - "kit": "_f_codekit", - "plist": "_f_light_config", - "lcov": "_f_coverage", - "hpp": "_f_cppheader", - "hh": "_f_cppheader", - "hxx": "_f_cppheader", - "h++": "_f_cppheader", - "csx": "_f_csharp", - "csproj": "_f_csproj", - "css.map": "_f_cssmap", - "cy.js": "_f_light_cypress_spec", - "cy.mjs": "_f_light_cypress_spec", - "cy.cjs": "_f_light_cypress_spec", - "cy.coffee": "_f_light_cypress_spec", - "cy.ts": "_f_light_cypress_spec", - "cy.tsx": "_f_light_cypress_spec", - "cy.jsx": "_f_light_cypress_spec", - "g.dart": "_f_dartlang_generated", - "freezed.dart": "_f_dartlang_generated", - "db": "_f_light_db", - "deb": "_f_debian", - "resolver.json": "_f_design_tokens", - "resolver.json5": "_f_design_tokens", - "resolver.jsonc": "_f_design_tokens", - "tokens.json": "_f_design_tokens", - "tokens.json5": "_f_design_tokens", - "tokens.jsonc": "_f_design_tokens", - "djt": "_f_django", - "eco": "_f_light_docpad", - "drawio": "_f_drawio", - "dio": "_f_drawio", - "drawio.png": "_f_drawio", - "drawio.svg": "_f_drawio", - "dio.png": "_f_drawio", - "dio.svg": "_f_drawio", - "dtd": "_f_dtd", - "eex": "_f_eex", - "heex": "_f_eex", - "phoenix-heex": "_f_eex", - "html-heex": "_f_eex", - "ejs": "_f_ejs", - "el": "_f_emacs", - "elc": "_f_emacs", - "ensime": "_f_ensime", - "eps": "_f_eps", - "epub": "_f_epub", - "excalidraw": "_f_excalidraw", - "excalidraw.json": "_f_excalidraw", - "excalidraw.svg": "_f_excalidraw", - "excalidraw.png": "_f_excalidraw", - "xls": "_f_excel", - "xlsx": "_f_excel", - "xlsm": "_f_excel", - "ods": "_f_libreoffice_calc", - "fods": "_f_libreoffice_calc", - "xlsb": "_f_excel", - "fbx": "_f_fbx", - "fba": "_f_fitbit", - "fla": "_f_light_fla", - "swf": "_f_flash", - "swc": "_f_flash", - "js.flow": "_f_flow", - "woff": "_f_light_font", - "woff2": "_f_light_font", - "ttf": "_f_light_font", - "otf": "_f_libreoffice_math", - "eot": "_f_light_font", - "pfa": "_f_light_font", - "pfb": "_f_light_font", - "sfd": "_f_light_font", - "fsproj": "_f_fsproj", - "gmx": "_f_gamemaker", - "yy": "_f_light_gamemaker2", - "yyp": "_f_light_gamemaker2", - "gd.uid": "_f_gduid", - "geojson": "_f_geojson", - "xcf": "_f_gimp", - "gleam": "_f_gleam", - "glb": "_f_gltf", - "gltf": "_f_gltf", - "am": "_f_gnu", - "ld": "_f_gnu", - "m4": "_f_gnu", - "makefile": "_f_gnu", - "godot": "_f_godot", - "gpg": "_f_gpg", - "pgp": "_f_gpg", - "gradle": "_f_light_gradle", - "gr": "_f_grain", - "hcl2": "_f_light_hashicorp", - "sentinel": "_f_light_hashicorp", - "hxproj": "_f_haxedevelop", - "ejs.t": "_f_hygen", - "idr": "_f_idris", - "lidr": "_f_idris", - "ibc": "_f_idrisbin", - "ipkg": "_f_idrispkg", - "jpeg": "_f_image", - "jpg": "_f_image", - "gif": "_f_image", - "png": "_f_image", - "bmp": "_f_image", - "tiff": "_f_image", - "heic": "_f_image", - "ico": "_f_image", - "icns": "_f_image", - "webp": "_f_image", - "imba": "_f_imba", - "imba2": "_f_imba", - "inc": "_f_inc", - "include": "_f_inc", - "infopathxml": "_f_infopath", - "xsn": "_f_infopath", - "xsf": "_f_infopath", - "xtp2": "_f_infopath", - "jar": "_f_jar", - "jbuilder": "_f_jbuilder", - "iml": "_f_jetbrains", - "js.map": "_f_light_jsmap", - "cjs.map": "_f_light_jsmap", - "mjs.map": "_f_light_jsmap", - "jsonl": "_f_light_json", - "ndjson": "_f_light_json", - "json5": "_f_light_json5", - "schema.json": "_f_light_json_schema", - "jsonld": "_f_light_jsonld", - "json-ld": "_f_light_jsonld", - "jsp": "_f_jsp", - "jss": "_f_jss", - "juice": "_f_juice", - "ipynb": "_f_jupyter", - "key": "_f_key", - "pem": "_f_key", - "ktm": "_f_kotlin", - "language-configuration.json": "_f_language_configuration", - "master": "_f_layout", - "layout.html": "_f_layout", - "layout.htm": "_f_layout", - "odb": "_f_libreoffice_base", - "otb": "_f_libreoffice_base", - "ots": "_f_libreoffice_calc", - "odg": "_f_libreoffice_draw", - "otg": "_f_libreoffice_draw", - "odp": "_f_libreoffice_impress", - "otp": "_f_libreoffice_impress", - "odf": "_f_libreoffice_math", - "odt": "_f_libreoffice_writer", - "ott": "_f_libreoffice_writer", - "enc": "_f_license", - "license": "_f_license", - "lic": "_f_license", - "hxp": "_f_lime", - "liquid": "_f_liquid", - "ls": "_f_livescript", - "lnk": "_f_lnk", - "log": "_f_log", - "tlg": "_f_log", - "luau": "_f_luau", - "crec": "_f_lync", - "ocrec": "_f_lync", - "map": "_f_map", - "mdown": "_f_markdown", - "markdown": "_f_markdown", - "marko.js": "_f_markojs", - "fig": "_f_matlab", - "mex": "_f_matlab", - "mexn": "_f_matlab", - "mexrs6": "_f_matlab", - "mn": "_f_matlab", - "mum": "_f_matlab", - "mx": "_f_matlab", - "mx3": "_f_matlab", - "rwd": "_f_matlab", - "slx": "_f_matlab", - "slddc": "_f_matlab", - "smv": "_f_matlab", - "xvc": "_f_matlab", - "mca": "_f_minecraft", - "mcmeta": "_f_minecraft", - "mojo": "_f_mojo", - "🔥": "_f_mojo", - "mql.yaml": "_f_mondoo", - "mql.yml": "_f_mondoo", - "mustache": "_f_light_mustache", - "mst": "_f_light_mustache", - "ndst.yaml": "_f_ndst", - "ndst.yml": "_f_ndst", - "ndst.json": "_f_ndst", - "njsproj": "_f_njsproj", - "noc": "_f_noc", - "nupkg": "_f_nuget", - "snupkg": "_f_nuget", - "nuspec": "_f_nuget", - "psmdcp": "_f_nuget", - "npy": "_f_numpy", - "npz": "_f_numpy", - "nunj": "_f_nunjucks", - "njs": "_f_nunjucks", - "mli": "_f_ocaml_intf", - "one": "_f_onenote", - "onepkg": "_f_onenote", - "onetoc": "_f_onenote", - "onetoc2": "_f_onenote", - "sig": "_f_onenote", - "opam": "_f_opam", - "cl": "_f_opencl", - "opencl": "_f_opencl", - "tofu": "_f_opentofu", - "tofu.json": "_f_opentofu", - "tofutest.hcl": "_f_opentofu", - "tofutest.json": "_f_opentofu", - "org": "_f_org", - "pst": "_f_outlook", - "bcmx": "_f_outlook", - "otm": "_f_outlook", - "msg": "_f_outlook", - "oft": "_f_outlook", - "ovpn": "_f_ovpn", - "pkg": "_f_package", - "paket.references": "_f_paket", - "paket.template": "_f_paket", - "patch": "_f_patch", - "pcd": "_f_light_pcl", - "pdf": "_f_pdf", - "psd": "_f_photoshop", - "php1": "_f_php", - "php2": "_f_php", - "php3": "_f_php", - "php4": "_f_php", - "php5": "_f_php", - "php6": "_f_php", - "phps": "_f_php", - "phpsa": "_f_php", - "phpt": "_f_php", - "phtml": "_f_php", - "phar": "_f_php", - "pipeline": "_f_pipeline", - "pu": "_f_plantuml", - "plantuml": "_f_plantuml", - "iuml": "_f_plantuml", - "puml": "_f_plantuml", - "pck": "_f_plsql_package", - "pkb": "_f_plsql_package_body", - "pkh": "_f_plsql_package_header", - "pks": "_f_plsql_package_spec", - "po": "_f_poedit", - "mo": "_f_poedit", - "postman_collection.json": "_f_postman", - "postman_environment.json": "_f_postman", - "postman_globals.json": "_f_postman", - "pot": "_f_powerpoint", - "potx": "_f_powerpoint", - "potm": "_f_powerpoint", - "pps": "_f_powerpoint", - "ppsx": "_f_powerpoint", - "ppsm": "_f_powerpoint", - "ppt": "_f_powerpoint", - "pptx": "_f_powerpoint", - "pptm": "_f_powerpoint", - "pa": "_f_powerpoint", - "ppa": "_f_powerpoint", - "ppam": "_f_powerpoint", - "sldm": "_f_powerpoint", - "sldx": "_f_powerpoint", - "format.ps1xml": "_f_powershell_format", - "psd1": "_f_powershell_psd", - "psm1": "_f_powershell_psm", - "types.ps1xml": "_f_powershell_types", - "pro": "_f_prolog", - "pub": "_f_publisher", - "puz": "_f_publisher", - "pyowo": "_f_pythowo", - "q": "_f_q", - "qbs": "_f_qbs", - "qvd": "_f_qlikview", - "qvw": "_f_qlikview", - "rast": "_f_ra_syntax_tree", - "rake": "_f_rake", - "rt": "_f_reacttemplate", - "reg": "_f_registry", - "rego": "_f_rego", - "ripple": "_f_ripple", - "rnc": "_f_rnc", - "ron": "_f_ron", - "rproj": "_f_rproj", - "rss": "_f_rss", - "rbs": "_f_ruby", - "safetensors": "_f_light_safetensors", - "sls": "_f_saltstack", - "sass": "_f_sass", - "scssm": "_f_scss", - "unity": "_f_light_shaderlab", - "fish": "_f_shell", - "sy": "_f_siyuan", - "sketch": "_f_sketch", - "eskip": "_f_skipper", - "sln": "_f_sln", - "slnx": "_f_sln", - "slnf": "_f_sln", - "spe": "_f_spacengine", - "sqlite": "_f_sqlite", - "sqlite3": "_f_sqlite", - "db3": "_f_sqlite", - "sss": "_f_sss", - "dta": "_f_stata", - "storyboard": "_f_storyboard", - "story.js": "_f_storybook", - "story.jsx": "_f_storybook", - "story.ts": "_f_storybook", - "story.tsx": "_f_storybook", - "story.mdx": "_f_storybook", - "story.svelte": "_f_storybook", - "stories.js": "_f_storybook", - "stories.jsx": "_f_storybook", - "stories.ts": "_f_storybook", - "stories.tsx": "_f_storybook", - "stories.mdx": "_f_storybook", - "stories.svelte": "_f_storybook", - "sublime-project": "_f_sublime", - "svg": "_f_svg", - "tcl": "_f_tcl", - "exp": "_f_tcl", - "templ": "_f_templ", - "tfstate": "_f_terraform", - "tfvars": "_f_terraform", - "tf": "_f_terraform", - "tf.json": "_f_terraform", - "tst": "_f_test", - "test.js": "_f_light_testjs", - "test.jsx": "_f_light_testjs", - "test.mjs": "_f_light_testjs", - "spec.js": "_f_light_testjs", - "spec.jsx": "_f_light_testjs", - "spec.mjs": "_f_light_testjs", - "testplane.ts": "_f_testplane", - "testplane.js": "_f_testplane", - "testplane.cts": "_f_testplane", - "testplane.cjs": "_f_testplane", - "testplane.tsx": "_f_testplane", - "testplane.jsx": "_f_testplane", - "test.ts": "_f_testts", - "test.tsx": "_f_testts", - "test.mts": "_f_testts", - "spec.ts": "_f_testts", - "spec.tsx": "_f_testts", - "spec.mts": "_f_testts", - "e2e-test.ts": "_f_testts", - "e2e-test.tsx": "_f_testts", - "e2e-test.mts": "_f_testts", - "e2e-spec.ts": "_f_testts", - "e2e-spec.tsx": "_f_testts", - "e2e-spec.mts": "_f_testts", - "test-d.ts": "_f_testts", - "test-d.tsx": "_f_testts", - "test-d.mts": "_f_testts", - "texi": "_f_light_tex", - "tikz": "_f_light_tex", - "csv": "_f_text", - "tsv": "_f_text", - "tm": "_f_light_tm", - "tm.hcl": "_f_light_tm", - "todo": "_f_light_todo", - "tree": "_f_light_tree", - "tres": "_f_tres", - "tsbuildinfo": "_f_tsbuildinfo", - "tscn": "_f_tscn", - "tt2": "_f_tt", - "d.ts": "_f_typescriptdef", - "d.cts": "_f_typescriptdef", - "d.mts": "_f_typescriptdef", - "ua": "_f_uiua", - "u": "_f_unison", - "vala": "_f_vala", - "css.ts": "_f_vanilla_extract", - "vapi": "_f_vapi", - "vash": "_f_light_vash", - "vbhtml": "_f_vbhtml", - "vbproj": "_f_vbproj", - "vcxproj": "_f_vcxproj", - "vto": "_f_vento", - "vento": "_f_vento", - "3g2": "_f_video", - "3gp": "_f_video", - "asf": "_f_video", - "amv": "_f_video", - "avi": "_f_video", - "divx": "_f_video", - "qt": "_f_video", - "f4a": "_f_video", - "f4b": "_f_video", - "f4p": "_f_video", - "f4v": "_f_video", - "flv": "_f_video", - "m2v": "_f_video", - "m4v": "_f_video", - "mkv": "_f_video", - "mk3d": "_f_video", - "mov": "_f_video", - "mp2": "_f_video", - "mp4": "_f_video", - "mpe": "_f_video", - "mpeg": "_f_video", - "mpeg2": "_f_video", - "mpg": "_f_video", - "mpv": "_f_video", - "nsv": "_f_video", - "ogv": "_f_video", - "rm": "_f_video", - "rmvb": "_f_video", - "svi": "_f_video", - "vob": "_f_video", - "webm": "_f_video", - "wmv": "_f_video", - "code-snippets": "_f_vscode", - "code-workspace": "_f_vscode", - "vsix": "_f_light_vsix", - "vsixmanifest": "_f_light_vsixmanifest", - "vvvvvv": "_f_vvvvvv", - "vyi": "_f_vyper", - "wasm": "_f_wasm", - "wikitext": "_f_wikitext", - "wit": "_f_wit", - "doc": "_f_word", - "docx": "_f_word", - "docm": "_f_word", - "dot": "_f_word", - "dotx": "_f_word", - "dotm": "_f_word", - "wll": "_f_word", - "wxml": "_f_wxml", - "wxss": "_f_wxss", - "xaml": "_f_xaml", - "axaml": "_f_xaml", - "xcodeproj": "_f_xcode", - "xfl": "_f_light_xfl", - "xib": "_f_xib", - "xliff": "_f_xliff", - "xlf": "_f_xliff", - "pex": "_f_xml", - "tmlanguage": "_f_xml", - "zip": "_f_zip", - "rar": "_f_zip", - "7z": "_f_zip", - "tar": "_f_zip", - "tgz": "_f_zip", - "bz": "_f_zip", - "gz": "_f_zip", - "bzip2": "_f_zip", - "xz": "_f_zip", - "bz2": "_f_zip", - "whl": "_f_zip", - "zipx": "_f_zip", - "br": "_f_zip" - }, - "fileNames": { - "agents.md": "_f_light_agents", - "alchemy.run.ts": "_f_alchemy", - ".all-contributorsrc": "_f_allcontributors", - "allurerc.js": "_f_allure", - "allurerc.mjs": "_f_allure", - "allurerc.cjs": "_f_allure", - "allurerc.json": "_f_allure", - "allurerc.yaml": "_f_allure", - "allurerc.yml": "_f_allure", - ".angular-cli.json": "_f_angular", - "angular-cli.json": "_f_angular", - "angular.json": "_f_angular", - ".angular.json": "_f_angular", - "antlers.html": "_f_antlers_html", - "api-extractor.json": "_f_api_extractor", - "api-extractor-base.json": "_f_api_extractor", - ".appsemblerc.yaml": "_f_appsemble", - "app-definition.yaml": "_f_appsemble", - "appveyor.yml": "_f_appveyor", - ".appveyor.yml": "_f_appveyor", - "asconfig.json": "_f_assembly_script", - "astro.config.js": "_f_light_astroconfig", - "astro.config.cjs": "_f_light_astroconfig", - "astro.config.mjs": "_f_light_astroconfig", - "astro.config.ts": "_f_light_astroconfig", - "astro.config.cts": "_f_light_astroconfig", - "astro.config.mts": "_f_light_astroconfig", - ".attw.json": "_f_attw", - "aurelia.json": "_f_aurelia", - "azure-pipelines.yml": "_f_azurepipelines", - ".vsts-ci.yml": "_f_azurepipelines", - ".babelrc": "_f_light_babel", - ".babelignore": "_f_light_babel", - ".babelrc.js": "_f_light_babel", - ".babelrc.cjs": "_f_light_babel", - ".babelrc.mjs": "_f_light_babel", - ".babelrc.json": "_f_light_babel", - "babel.config.js": "_f_light_babel", - "babel.config.cjs": "_f_light_babel", - "babel.config.mjs": "_f_light_babel", - "babel.config.json": "_f_light_babel", - ".bzrignore": "_f_bazaar", - "BUILD.bazel": "_f_bazel", - ".bazelrc": "_f_bazel", - "bazel.rc": "_f_bazel", - "bazel.bazelrc": "_f_bazel", - ".bazelignore": "_f_bazel_ignore", - ".bazelversion": "_f_bazel_version", - "biome.json": "_f_biome", - "biome.jsonc": "_f_biome", - "bitbucket-pipelines.yml": "_f_bitbucketpipeline", - ".bithoundrc": "_f_bithound", - ".bowerrc": "_f_bower", - "bower.json": "_f_bower", - ".browserslistrc": "_f_browserslist", - "browserslist": "_f_browserslist", - ".buckconfig": "_f_buckbuild", - ".bunfig.toml": "_f_bun", - "bunfig.toml": "_f_bunfig", - "bun.lockb": "_f_bun", - "bun.lock": "_f_bun", - ".bundlemonrc": "_f_bundlemon", - "bundlemon.config.js": "_f_bundlemon", - "bundlemon.config.mjs": "_f_bundlemon", - "bundlemon.config.cjs": "_f_bundlemon", - ".bundlemonrc.js": "_f_bundlemon", - ".bundlemonrc.mjs": "_f_bundlemon", - ".bundlemonrc.cjs": "_f_bundlemon", - ".bundlemonrc.json": "_f_bundlemon", - ".bundlemonrc.yaml": "_f_bundlemon", - ".bundlemonrc.yml": "_f_bundlemon", - "gemfile": "_f_bundler", - "gemfile.lock": "_f_bundler", - "capacitor.config.json": "_f_capacitor", - "capacitor.config.ts": "_f_capacitor", - "Cargo.toml": "_f_cargo", - "Cargo.lock": "_f_cargo", - ".changie.yaml": "_f_changie", - ".changie.yml": "_f_changie", - "chefignore": "_f_chef", - "berksfile": "_f_chef", - "berksfile.lock": "_f_chef", - "policyfile.rb": "_f_chef", - "policyfile.lock.json": "_f_chef", - "circle.yml": "_f_light_circleci", - "claude.md": "_f_claude", - "wrangler.toml": "_f_cloudflare", - ".cfignore": "_f_light_cloudfoundry", - ".codacy.yml": "_f_light_codacy", - ".codacy.yaml": "_f_light_codacy", - ".codeclimate.yml": "_f_light_codeclimate", - "codecov.yml": "_f_codecov", - ".codecov.yml": "_f_codecov", - "config.codekit": "_f_codekit", - "config.codekit2": "_f_codekit", - "config.codekit3": "_f_codekit", - ".config.codekit": "_f_codekit", - ".config.codekit2": "_f_codekit", - ".config.codekit3": "_f_codekit", - "codemagic.yaml": "_f_codemagic", - "codeowners": "_f_light_codeowners", - ".coderabbit.yaml": "_f_coderabbit", - "coffeelint.json": "_f_coffeelint", - ".coffeelintignore": "_f_coffeelint", - ".czrc": "_f_commitizen", - ".cz.json": "_f_commitizen", - ".commitlintrc": "_f_commitlint", - "commitlint.config.js": "_f_commitlint", - "commitlint.config.cjs": "_f_commitlint", - "commitlint.config.mjs": "_f_commitlint", - "commitlint.config.ts": "_f_commitlint", - "commitlint.config.cts": "_f_commitlint", - ".commitlintrc.json": "_f_commitlint", - ".commitlintrc.yaml": "_f_commitlint", - ".commitlintrc.yml": "_f_commitlint", - ".commitlintrc.js": "_f_commitlint", - ".commitlintrc.cjs": "_f_commitlint", - ".commitlintrc.mjs": "_f_commitlint", - ".commitlintrc.ts": "_f_commitlint", - ".commitlintrc.cts": "_f_commitlint", - "composer.json": "_f_composer", - "composer.lock": "_f_composer", - "conanfile.txt": "_f_conan", - "conanfile.py": "_f_conan", - ".condarc": "_f_conda", - ".tool-versions": "_f_light_config", - "copilot-instructions.md": "_f_light_copilot", - "github-copilot.xml": "_f_light_copilot", - ".coverage": "_f_coverage", - "lcov.info": "_f_coverage", - ".coveralls.yml": "_f_coveralls", - "craco.config.ts": "_f_craco", - "craco.config.js": "_f_craco", - "craco.config.cjs": "_f_craco", - ".cracorc.ts": "_f_craco", - ".cracorc.js": "_f_craco", - ".cracorc": "_f_craco", - "crowdin.yml": "_f_crowdin", - "cspell.config.json": "_f_cspell", - "cspell.config.js": "_f_cspell", - "cspell.config.mjs": "_f_cspell", - "cspell.config.cjs": "_f_cspell", - "cspell.config.yaml": "_f_cspell", - "cspell.config.yml": "_f_cspell", - "cspell.json": "_f_cspell", - "cspell.js": "_f_cspell", - "cspell.mjs": "_f_cspell", - "cspell.cjs": "_f_cspell", - "cspell.yaml": "_f_cspell", - "cspell.yml": "_f_cspell", - ".cspell.json": "_f_cspell", - ".cspell.js": "_f_cspell", - ".cspell.mjs": "_f_cspell", - ".cspell.cjs": "_f_cspell", - ".cspell.yaml": "_f_cspell", - ".cspell.yml": "_f_cspell", - ".csscomb.json": "_f_csscomb", - ".csslintrc": "_f_csslint", - ".cursorignore": "_f_cursorrules", - ".cursorindexingignore": "_f_cursorrules", - ".cursorrules": "_f_cursorrules", - ".cvsignore": "_f_cvs", - "cypress.json": "_f_light_cypress", - "cypress.env.json": "_f_light_cypress", - "cypress.config.js": "_f_light_cypress", - "cypress.config.ts": "_f_light_cypress", - "cypress.config.cjs": "_f_light_cypress", - "cypress.config.mjs": "_f_light_cypress", - ".boringignore": "_f_darcs", - ".pubignore": "_f_dartlang_ignore", - "service.datadog.yaml": "_f_datadog", - "datadog-ci.json": "_f_datadog", - "static-analysis.datadog.yml": "_f_datadog", - "static-analysis.datadog.yaml": "_f_datadog", - "aptfile": "_f_debian", - "deno.json": "_f_deno", - "deno.jsonc": "_f_deno", - "deno.lock": "_f_deno", - ".denoifyrc": "_f_denoify", - "denoify.config.json": "_f_denoify", - "denoify.config.js": "_f_denoify", - "dependabot.yml": "_f_dependabot", - "dependabot.yaml": "_f_dependabot", - "dependencies.yml": "_f_dependencies", - "devcontainer.json": "_f_devcontainer", - ".devcontainer.json": "_f_devcontainer", - "devvit.json": "_f_devvit", - "devvit.dev.json": "_f_devvit", - "devvit.prod.json": "_f_devvit", - "devvit.test.json": "_f_devvit", - "devvit.config.js": "_f_devvit", - "devvit.config.cjs": "_f_devvit", - "devvit.config.mjs": "_f_devvit", - "devvit.config.ts": "_f_devvit", - "devvit.config.mts": "_f_devvit", - "devvit.config.dev.js": "_f_devvit", - "devvit.config.dev.cjs": "_f_devvit", - "devvit.config.dev.mjs": "_f_devvit", - "devvit.config.dev.ts": "_f_devvit", - "devvit.config.dev.mts": "_f_devvit", - "devvit.config.prod.js": "_f_devvit", - "devvit.config.prod.cjs": "_f_devvit", - "devvit.config.prod.mjs": "_f_devvit", - "devvit.config.prod.ts": "_f_devvit", - "devvit.config.prod.mts": "_f_devvit", - "devvit.config.test.js": "_f_devvit", - "devvit.config.test.cjs": "_f_devvit", - "devvit.config.test.mjs": "_f_devvit", - "devvit.config.test.ts": "_f_devvit", - "devvit.config.test.mts": "_f_devvit", - ".dockerignore": "_f_docker", - "compose.yaml": "_f_docker", - "compose.yml": "_f_docker", - "docker-compose.yaml": "_f_docker", - "docker-compose.yml": "_f_docker", - "docker-compose.debug.yaml": "_f_docker", - "docker-compose.debug.yml": "_f_docker", - "docker-compose.ci-build.yaml": "_f_docker", - "docker-compose.ci-build.yml": "_f_docker", - "docker-compose.override.yaml": "_f_docker", - "docker-compose.override.yml": "_f_docker", - "docker-compose.vs.debug.yaml": "_f_docker", - "docker-compose.vs.debug.yml": "_f_docker", - "docker-compose.vs.release.yaml": "_f_docker", - "docker-compose.vs.release.yml": "_f_docker", - "docker-cloud.yaml": "_f_docker", - "docker-cloud.yml": "_f_docker", - "docker-compose.test.yml": "_f_dockertest", - "docusaurus.config.ts": "_f_docusaurus", - "docusaurus.config.mts": "_f_docusaurus", - "docusaurus.config.cts": "_f_docusaurus", - "docusaurus.config.js": "_f_docusaurus", - "docusaurus.config.mjs": "_f_docusaurus", - "docusaurus.config.cjs": "_f_docusaurus", - ".doczrc": "_f_docz", - "docz.js": "_f_docz", - "docz.json": "_f_docz", - ".docz.js": "_f_docz", - ".docz.json": "_f_docz", - "doczrc.js": "_f_docz", - "doczrc.json": "_f_docz", - "docz.config.js": "_f_docz", - "docz.config.json": "_f_docz", - ".dojorc": "_f_dojo", - "doppler.yaml": "_f_doppler", - "doppler-template.yaml": "_f_doppler", - ".drone.yml": "_f_light_drone", - ".drone.yml.sig": "_f_light_drone", - "dune": "_f_dune", - "dune-project": "_f_dune", - "dune-workspace": "_f_dune", - ".dvc": "_f_dvc", - ".earthlyignore": "_f_earthly", - "Earthfile": "_f_earthly", - "store.config.json": "_f_light_eas-metadata", - ".editorconfig": "_f_editorconfig", - "forge.config.js": "_f_electron", - "forge.config.ts": "_f_electron", - ".eleventy.js": "_f_light_eleventy", - "eleventy.config.js": "_f_light_eleventy", - "eleventy.config.cjs": "_f_light_eleventy", - "eleventy.config.mjs": "_f_light_eleventy", - "elm-package.json": "_f_elm", - ".ember-cli": "_f_ember", - "emakefile": "_f_erlang", - ".emakerfile": "_f_erlang", - "esbuild.js": "_f_esbuild", - "esbuild.mjs": "_f_esbuild", - "esbuild.cjs": "_f_esbuild", - "esbuild.ts": "_f_esbuild", - "esbuild.config.js": "_f_esbuild", - "esbuild.config.mjs": "_f_esbuild", - "esbuild.config.cjs": "_f_esbuild", - "esbuild.config.ts": "_f_esbuild", - ".eslintrc": "_f_eslint", - ".eslintignore": "_f_eslint", - ".eslintcache": "_f_eslint", - "eslint.config.js": "_f_eslint", - "eslint.config.mjs": "_f_eslint", - "eslint.config.cjs": "_f_eslint", - "eslint.config.ts": "_f_eslint", - "eslint.config.mts": "_f_eslint", - "eslint.config.cts": "_f_eslint", - ".eslintrc.js": "_f_eslint", - ".eslintrc.mjs": "_f_eslint", - ".eslintrc.cjs": "_f_eslint", - ".eslintrc.ts": "_f_eslint", - ".eslintrc.mts": "_f_eslint", - ".eslintrc.cts": "_f_eslint", - ".eslintrc.json": "_f_eslint", - ".eslintrc.yaml": "_f_eslint", - ".eslintrc.yml": "_f_eslint", - "app.json": "_f_light_expo", - "app.config.js": "_f_light_expo", - "app.config.json": "_f_light_expo", - "app.config.json5": "_f_light_expo", - ".fantasticonrc": "_f_fantasticon", - "fantasticonrc": "_f_fantasticon", - ".fantasticonrc.json": "_f_fantasticon", - "fantasticonrc.json": "_f_fantasticon", - ".fantasticonrc.js": "_f_fantasticon", - "fantasticonrc.js": "_f_fantasticon", - "fastly.toml": "_f_fastly", - ".faunarc": "_f_fauna", - "favicon.ico": "_f_favicon", - ".firebaserc": "_f_firebase", - "firebase.json": "_f_light_firebasehosting", - "storage.rules": "_f_firebasestorage", - "firestore.rules": "_f_firestore", - "firestore.indexes.json": "_f_firestore", - "flareact.config.js": "_f_flareact", - ".flooignore": "_f_floobits", - ".flowconfig": "_f_flow", - ".flutter-plugins": "_f_flutter", - ".metadata": "_f_flutter", - ".flutter-plugins-dependencies": "_f_flutter", - "pubspec.lock": "_f_flutter_package", - "pubspec.yaml": "_f_flutter_package", - ".packages": "_f_flutter_package", - "fly.toml": "_f_flyio", - "formkit.config.js": "_f_formkit", - "formkit.config.mjs": "_f_formkit", - "formkit.config.cjs": "_f_formkit", - "formkit.config.ts": "_f_formkit", - ".fossaignore": "_f_fossa", - "ignore-glob": "_f_fossil", - ".front-commerce.js": "_f_frontcommerce", - "front-commerce.config.ts": "_f_frontcommerce", - "funding.yml": "_f_funding", - "fuse.js": "_f_fusebox", - "gatsby-browser.js": "_f_gatsby", - "gatsby-browser.ts": "_f_gatsby", - "gatsby-browser.tsx": "_f_gatsby", - "gatsby-ssr.js": "_f_gatsby", - "gatsby-ssr.ts": "_f_gatsby", - "gatsby-ssr.tsx": "_f_gatsby", - "gatsby-config.js": "_f_gatsby", - "gatsby-config.ts": "_f_gatsby", - "gatsby-config.mjs": "_f_gatsby", - "gatsby-node.js": "_f_gatsby", - "gatsby-node.ts": "_f_gatsby", - "gatsby-node.mjs": "_f_gatsby", - ".gcloudignore": "_f_gcloud", - "gemini.md": "_f_gemini", - "GEMINI.md": "_f_gemini", - ".git": "_f_git", - ".gitattributes": "_f_git", - ".gitconfig": "_f_git", - ".gitignore": "_f_git", - ".gitmodules": "_f_git", - ".gitkeep": "_f_git", - ".git-blame-ignore-revs": "_f_git", - ".mailmap": "_f_git", - ".issuetracker": "_f_git", - ".gitlab-ci.yml": "_f_gitlab", - ".gitpod.yaml": "_f_gitpod", - ".gitpod.yml": "_f_gitpod", - "gitpod.yaml": "_f_gitpod", - "gitpod.yml": "_f_gitpod", - "gleam.toml": "_f_gleamconfig", - "glide.yml": "_f_glide", - ".glitterrc": "_f_glitter", - "go.sum": "_f_go_package", - "go.mod": "_f_go_package", - "go.work": "_f_go_work", - "go.work.sum": "_f_go_work", - ".gqlconfig": "_f_graphql", - ".graphqlconfig": "_f_graphql_config", - ".graphqlconfig.yml": "_f_graphql_config", - ".graphqlconfig.yaml": "_f_graphql_config", - "greenkeeper.json": "_f_greenkeeper", - "gridsome.config.js": "_f_gridsome", - "gridsome.config.ts": "_f_gridsome", - "gridsome.server.js": "_f_gridsome", - "gridsome.server.ts": "_f_gridsome", - "gridsome.client.js": "_f_gridsome", - "gridsome.client.ts": "_f_gridsome", - "gruntfile.js": "_f_grunt", - "gruntfile.cjs": "_f_grunt", - "gruntfile.coffee": "_f_grunt", - "gruntfile.ts": "_f_grunt", - "gruntfile.babel.js": "_f_grunt", - "gruntfile.babel.cjs": "_f_grunt", - "gruntfile.babel.coffee": "_f_grunt", - "gruntfile.babel.ts": "_f_grunt", - "gulpfile.js": "_f_gulp", - "gulpfile.coffee": "_f_gulp", - "gulpfile.ts": "_f_gulp", - "gulpfile.mjs": "_f_gulp", - "gulpfile.esm.js": "_f_gulp", - "gulpfile.esm.coffee": "_f_gulp", - "gulpfile.esm.ts": "_f_gulp", - "gulpfile.esm.mjs": "_f_gulp", - "gulpfile.babel.js": "_f_gulp", - "gulpfile.babel.coffee": "_f_gulp", - "gulpfile.babel.ts": "_f_gulp", - "gulpfile.babel.mjs": "_f_gulp", - "hardhat.config.cjs": "_f_hardhat", - "hardhat.config.js": "_f_hardhat", - "hardhat.config.ts": "_f_hardhat", - "haxelib.json": "_f_haxe", - "checkstyle.json": "_f_haxecheckstyle", - ".p4ignore": "_f_helix", - "chart.lock": "_f_helm", - "chart.yaml": "_f_helm", - "histoire.config.ts": "_f_histoire", - "histoire.config.js": "_f_histoire", - ".histoire.ts": "_f_histoire", - ".histoire.js": "_f_histoire", - "horusec-config.json": "_f_horusec", - ".htmlhintrc": "_f_htmlhint", - ".htmlvalidateignore": "_f_htmlvalidate", - ".htmlvalidate.js": "_f_htmlvalidate", - ".htmlvalidate.cjs": "_f_htmlvalidate", - ".htmlvalidate.json": "_f_htmlvalidate", - "hugo.json": "_f_hugo", - "hugo.toml": "_f_hugo", - "hugo.yaml": "_f_hugo", - ".hugo_build.lock": "_f_hugo", - "humans.txt": "_f_humanstxt", - ".huskyrc": "_f_husky", - "husky.config.js": "_f_husky", - ".huskyrc.js": "_f_husky", - ".huskyrc.json": "_f_husky", - ".huskyrc.yaml": "_f_husky", - ".huskyrc.yml": "_f_husky", - "ionic.project": "_f_ionic", - "ionic.config.json": "_f_ionic", - "jakefile": "_f_jake", - "jakefile.js": "_f_jake", - "jasmine.json": "_f_jasmine", - ".nojekyll": "_f_jekyll", - "jest.json": "_f_jest", - "jest.config.babel.js": "_f_jest", - ".jestrc": "_f_jest", - ".jestrc.js": "_f_jest", - ".jestrc.json": "_f_jest", - "jest.config.js": "_f_jest", - "jest.config.cjs": "_f_jest", - "jest.config.mjs": "_f_jest", - "jest.config.json": "_f_jest", - "jest.config.ts": "_f_jest", - "jest.config.base.js": "_f_jest", - "jest.config.base.cjs": "_f_jest", - "jest.config.base.mjs": "_f_jest", - "jest.config.base.json": "_f_jest", - "jest.config.base.ts": "_f_jest", - "jest.config.common.js": "_f_jest", - "jest.config.common.cjs": "_f_jest", - "jest.config.common.mjs": "_f_jest", - "jest.config.common.json": "_f_jest", - "jest.config.common.ts": "_f_jest", - "jest.config.e2e.js": "_f_jest", - "jest.config.e2e.cjs": "_f_jest", - "jest.config.e2e.mjs": "_f_jest", - "jest.config.e2e.json": "_f_jest", - "jest.config.e2e.ts": "_f_jest", - "jest.config.int.js": "_f_jest", - "jest.config.int.cjs": "_f_jest", - "jest.config.int.mjs": "_f_jest", - "jest.config.int.json": "_f_jest", - "jest.config.int.ts": "_f_jest", - "jest.config.integration.js": "_f_jest", - "jest.config.integration.cjs": "_f_jest", - "jest.config.integration.mjs": "_f_jest", - "jest.config.integration.json": "_f_jest", - "jest.config.integration.ts": "_f_jest", - "jest.config.unit.js": "_f_jest", - "jest.config.unit.cjs": "_f_jest", - "jest.config.unit.mjs": "_f_jest", - "jest.config.unit.json": "_f_jest", - "jest.config.unit.ts": "_f_jest", - ".jpmignore": "_f_jpm", - ".jsbeautifyrc": "_f_jsbeautify", - "jsbeautifyrc": "_f_jsbeautify", - ".jsbeautify": "_f_jsbeautify", - "jsbeautify": "_f_jsbeautify", - "jsconfig.json": "_f_light_jsconfig", - ".jscpd.json": "_f_jscpd", - "jscpd-report.xml": "_f_jscpd", - "jscpd-report.json": "_f_jscpd", - "jscpd-report.html": "_f_jscpd", - ".jshintrc": "_f_jshint", - ".jshintignore": "_f_jshint", - "jsr.json": "_f_jsr", - "karma.conf.js": "_f_karma", - "karma.conf.coffee": "_f_karma", - "karma.conf.ts": "_f_karma", - ".kitchen.yml": "_f_kitchenci", - "kitchen.yml": "_f_kitchenci", - ".kiteignore": "_f_light_kite", - "knip.json": "_f_knip", - "knip.jsonc": "_f_knip", - ".knip.json": "_f_knip", - ".knip.jsonc": "_f_knip", - "knip.ts": "_f_knip", - "knip.js": "_f_knip", - "knip.config.ts": "_f_knip", - "knip.config.js": "_f_knip", - "language-configuration.json": "_f_language_configuration", - "layout.html": "_f_layout", - "layout.htm": "_f_layout", - "lakefile.lean": "_f_light_leanconfig", - "lakefile.toml": "_f_light_leanconfig", - "lake-manifest.json": "_f_light_leanconfig", - "lean-toolchain": "_f_light_leanconfig", - "lefthook.json": "_f_lefthook", - "lefthook.toml": "_f_lefthook", - "lefthook.yaml": "_f_lefthook", - "lefthook.yml": "_f_lefthook", - "lefthook-local.json": "_f_lefthook", - "lefthook-local.toml": "_f_lefthook", - "lefthook-local.yaml": "_f_lefthook", - "lefthook-local.yml": "_f_lefthook", - ".lefthook.json": "_f_lefthook", - ".lefthook.toml": "_f_lefthook", - ".lefthook.yaml": "_f_lefthook", - ".lefthook.yml": "_f_lefthook", - ".lefthook-local.json": "_f_lefthook", - ".lefthook-local.toml": "_f_lefthook", - ".lefthook-local.yaml": "_f_lefthook", - ".lefthook-local.yml": "_f_lefthook", - "lerna.json": "_f_light_lerna", - "liara.json": "_f_liara", - ".liaraignore": "_f_liara", - "licence": "_f_license", - "LICENCE": "_f_license", - "license": "_f_license", - "LICENSE": "_f_license", - "copying": "_f_license", - "copying.lesser": "_f_license", - "LICENSE-MIT": "_f_license", - "license-mit": "_f_license", - "LICENSE-APACHE": "_f_license", - "license-apache": "_f_license", - "LICENSE-GPL": "_f_license", - "license-gpl": "_f_license", - "LICENSE-AGPL": "_f_license", - "license-agpl": "_f_license", - "LICENCE.md": "_f_license", - "LICENCE.txt": "_f_license", - "licence.md": "_f_license", - "licence.txt": "_f_license", - "LICENSE.md": "_f_license", - "LICENSE.txt": "_f_license", - "license.md": "_f_license", - "license.txt": "_f_license", - "copying.md": "_f_license", - "copying.txt": "_f_license", - "copying.lesser.md": "_f_license", - "copying.lesser.txt": "_f_license", - "LICENSE-MIT.md": "_f_license", - "LICENSE-MIT.txt": "_f_license", - "license-mit.md": "_f_license", - "license-mit.txt": "_f_license", - "LICENSE-APACHE.md": "_f_license", - "LICENSE-APACHE.txt": "_f_license", - "license-apache.md": "_f_license", - "license-apache.txt": "_f_license", - "LICENSE-GPL.md": "_f_license", - "LICENSE-GPL.txt": "_f_license", - "license-gpl.md": "_f_license", - "license-gpl.txt": "_f_license", - "LICENSE-AGPL.md": "_f_license", - "LICENSE-AGPL.txt": "_f_license", - "license-agpl.md": "_f_license", - "license-agpl.txt": "_f_license", - ".licrc": "_f_licensebat", - "budget.json": "_f_lighthouse", - "budgets.json": "_f_lighthouse", - ".lighthouserc.cjs": "_f_lighthouse", - ".lighthouserc.js": "_f_lighthouse", - ".lighthouserc.json": "_f_lighthouse", - ".lighthouserc.yaml": "_f_lighthouse", - ".lighthouserc.yml": "_f_lighthouse", - "include.xml": "_f_lime", - ".lintstagedrc": "_f_lintstagedrc", - ".lintstagedrc.json": "_f_lintstagedrc", - ".lintstagedrc.yaml": "_f_lintstagedrc", - ".lintstagedrc.yml": "_f_lintstagedrc", - ".lintstagedrc.mjs": "_f_lintstagedrc", - ".lintstagedrc.mts": "_f_lintstagedrc", - ".lintstagedrc.js": "_f_lintstagedrc", - ".lintstagedrc.ts": "_f_lintstagedrc", - ".lintstagedrc.cjs": "_f_lintstagedrc", - ".lintstagedrc.cts": "_f_lintstagedrc", - "lint-staged.config.mjs": "_f_lintstagedrc", - "lint-staged.config.mts": "_f_lintstagedrc", - "lint-staged.config.js": "_f_lintstagedrc", - "lint-staged.config.ts": "_f_lintstagedrc", - "lint-staged.config.cjs": "_f_lintstagedrc", - "lint-staged.config.cts": "_f_lintstagedrc", - "mailing.config.json": "_f_light_mailing", - "manifest": "_f_manifest", - "manifest.bak": "_f_manifest_bak", - "manifest.skip": "_f_manifest_skip", - ".markdownlintrc": "_f_markdownlint", - ".markdownlint.json": "_f_markdownlint", - ".markdownlint.jsonc": "_f_markdownlint", - ".markdownlint.yml": "_f_markdownlint", - ".markdownlint.yaml": "_f_markdownlint", - ".markdownlint.cjs": "_f_markdownlint", - ".markdownlint-cli2.json": "_f_markdownlint", - ".markdownlint-cli2.jsonc": "_f_markdownlint", - ".markdownlint-cli2.yml": "_f_markdownlint", - ".markdownlint-cli2.yaml": "_f_markdownlint", - ".markdownlint-cli2.cjs": "_f_markdownlint", - ".markdownlintignore": "_f_markdownlint_ignore", - ".markuplintrc": "_f_light_markuplint", - ".markuplintrc.json": "_f_light_markuplint", - ".markuplintrc.yaml": "_f_light_markuplint", - ".markuplintrc.yml": "_f_light_markuplint", - ".markuplintrc.js": "_f_light_markuplint", - ".markuplintrc.cjs": "_f_light_markuplint", - ".markuplintrc.mjs": "_f_light_markuplint", - ".markuplintrc.ts": "_f_light_markuplint", - "markuplint.config.json": "_f_light_markuplint", - "markuplint.config.yaml": "_f_light_markuplint", - "markuplint.config.yml": "_f_light_markuplint", - "markuplint.config.js": "_f_light_markuplint", - "markuplint.config.cjs": "_f_light_markuplint", - "markuplint.config.mjs": "_f_light_markuplint", - "markuplint.config.ts": "_f_light_markuplint", - "master.js": "_f_master-co", - "master.ts": "_f_master-co", - "master.mjs": "_f_master-co", - "master.json": "_f_master-co", - "master.css.js": "_f_master-co", - "master.css.ts": "_f_master-co", - "master.css.mjs": "_f_master-co", - "master.css.json": "_f_master-co", - "maven.config": "_f_maven", - "pom.xml": "_f_maven", - "extensions.xml": "_f_maven", - "settings.xml": "_f_maven", - "mcp.json": "_f_light_mcp", - "mdx-components.cjs": "_f_light_mdx-components", - "mdx-components.cts": "_f_light_mdx-components", - "mdx-components.js": "_f_light_mdx-components", - "mdx-components.jsx": "_f_light_mdx-components", - "mdx-components.mjs": "_f_light_mdx-components", - "mdx-components.mts": "_f_light_mdx-components", - "mdx-components.ts": "_f_light_mdx-components", - "mdx-components.tsx": "_f_light_mdx-components", - ".mdxlintrc": "_f_mdxlint", - ".mdxlintignore": "_f_mdxlint", - ".mdxlintrc.cjs": "_f_mdxlint", - ".mdxlintrc.js": "_f_mdxlint", - ".mdxlintrc.json": "_f_mdxlint", - ".mdxlintrc.mjs": "_f_mdxlint", - ".mdxlintrc.yml": "_f_mdxlint", - ".mdxlintrc.yaml": "_f_mdxlint", - ".hgignore": "_f_mercurial", - "mocha.opts": "_f_mocha", - ".mocharc.cjs": "_f_mocha", - ".mocharc.js": "_f_mocha", - ".mocharc.json": "_f_mocha", - ".mocharc.jsonc": "_f_mocha", - ".mocharc.mjs": "_f_mocha", - ".mocharc.yaml": "_f_mocha", - ".mocharc.yml": "_f_mocha", - "modernizr": "_f_modernizr", - "modernizr.js": "_f_modernizr", - "modernizrrc.js": "_f_modernizr", - ".modernizr.js": "_f_modernizr", - ".modernizrrc.js": "_f_modernizr", - "moleculer.config.js": "_f_moleculer", - "moleculer.config.json": "_f_moleculer", - "moleculer.config.ts": "_f_moleculer", - ".mtn-ignore": "_f_monotone", - "motif.json": "_f_motif", - "mypy.ini": "_f_light_mypy", - ".mypy.ini": "_f_light_mypy", - ".nano-staged.js": "_f_nanostaged", - "nano-staged.js": "_f_nanostaged", - ".nano-staged.cjs": "_f_nanostaged", - "nano-staged.cjs": "_f_nanostaged", - ".nano-staged.mjs": "_f_nanostaged", - "nano-staged.mjs": "_f_nanostaged", - ".nano-staged.json": "_f_nanostaged", - "nano-staged.json": "_f_nanostaged", - ".nanostagedrc": "_f_nanostaged", - ".nest-cli.json": "_f_nestjs", - "nest-cli.json": "_f_nestjs", - "nestconfig.json": "_f_nestjs", - ".nestconfig.json": "_f_nestjs", - "netlify.toml": "_f_light_netlify", - "next.config.js": "_f_light_next", - "next.config.cjs": "_f_light_next", - "next.config.mjs": "_f_light_next", - "next.config.ts": "_f_light_next", - ".nf": "_f_nextflow", - "ng-tailwind.js": "_f_ng_tailwind", - "nginx.conf": "_f_nginx", - "build.ninja": "_f_ninja", - "flake.lock": "_f_nix", - ".node-version": "_f_node", - ".nvmrc": "_f_node", - "node.config.json": "_f_node", - "nodemon.json": "_f_nodemon", - ".npmignore": "_f_npm", - ".npmrc": "_f_npm", - ".package-lock.json": "_f_npm", - "package.json": "_f_npm", - "package-lock.json": "_f_npm", - "npm-shrinkwrap.json": "_f_npm", - ".npmpackagejsonlintrc": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.cjs": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.js": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.json": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.yaml": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.yml": "_f_npmpackagejsonlint", - ".npmpackagejsonlintrc.mjs": "_f_npmpackagejsonlint", - ".npmpackagejsonlintignore": "_f_npmpackagejsonlint", - "npmpackagejsonlint.config.cjs": "_f_npmpackagejsonlint", - "npmpackagejsonlint.config.js": "_f_npmpackagejsonlint", - "npmpackagejsonlint.config.mjs": "_f_npmpackagejsonlint", - ".nsrirc": "_f_nsri", - ".nsriignore": "_f_nsri", - "nsri.config.js": "_f_nsri", - ".nsrirc.js": "_f_nsri", - ".nsrirc.json": "_f_nsri", - ".nsrirc.yaml": "_f_nsri", - ".nsrirc.yml": "_f_nsri", - ".integrity.json": "_f_nsri-integrity", - ".nuxtignore": "_f_nuxt", - ".nuxtrc": "_f_nuxt", - "nuxt.config.js": "_f_nuxt", - "nuxt.config.ts": "_f_nuxt", - "nuxt.config.mjs": "_f_nuxt", - "nuxt.js": "_f_nuxt", - "nuxt.ts": "_f_nuxt", - "nuxt.mjs": "_f_nuxt", - "nx.json": "_f_light_nx", - ".nycrc": "_f_nyc", - ".nycrc.json": "_f_nyc", - ".objidconfig": "_f_light_objidconfig", - ".merlin": "_f_ocaml", - ".oxlintignore": "_f_light_oxc", - ".oxlintrc.json": "_f_light_oxc", - ".oxlintrc.jsonc": "_f_light_oxc", - ".oxfmtrc.json": "_f_light_oxc", - ".oxfmtrc.jsonc": "_f_light_oxc", - ".packshiprc": "_f_light_packship", - ".packshiprc.json": "_f_light_packship", - ".packshiprc.js": "_f_light_packship", - ".packshiprc.ts": "_f_light_packship", - "packship.config.js": "_f_light_packship", - "packship.config.ts": "_f_light_packship", - "packship.config.mjs": "_f_light_packship", - "packship.config.mts": "_f_light_packship", - "packship.config.json": "_f_light_packship", - "paket.dependencies": "_f_paket", - "paket.lock": "_f_paket", - "paket.references": "_f_paket", - "paket.template": "_f_paket", - "paket.local": "_f_paket", - "panda.config.js": "_f_pandacss", - "panda.config.mjs": "_f_pandacss", - "panda.config.ts": "_f_pandacss", - ".pdm-python": "_f_pdm", - "pdm.lock": "_f_pdm", - "pdm.toml": "_f_pdm", - "peeky.config.ts": "_f_peeky", - "peeky.config.js": "_f_peeky", - "peeky.config.mjs": "_f_peeky", - ".php-cs-fixer.php": "_f_phpcsfixer", - ".php-cs-fixer.dist.php": "_f_phpcsfixer", - ".php_cs": "_f_phpcsfixer", - ".php_cs.dist": "_f_phpcsfixer", - "phpstan.neon": "_f_phpstan", - "phpstan.dist.neon": "_f_phpstan", - "phpunit": "_f_phpunit", - "phpunit.xml": "_f_phpunit", - "phpunit.xml.dist": "_f_phpunit", - ".phraseapp.yml": "_f_phraseapp", - "pipfile": "_f_pip", - "pipfile.lock": "_f_pip", - "platformio.ini": "_f_platformio", - "playwright.config.js": "_f_playwright", - "playwright.config.ts": "_f_playwright", - "playwright.config.mts": "_f_playwright", - "playwright.config.mjs": "_f_playwright", - "playwright.config.cts": "_f_playwright", - "playwright.config.cjs": "_f_playwright", - "ecosystem.config.js": "_f_pm2", - "ecosystem.config.cjs": "_f_pm2", - "ecosystem.config.json": "_f_pm2", - "ecosystem.config.yaml": "_f_pm2", - "ecosystem.config.yml": "_f_pm2", - ".pnpmfile.cjs": "_f_light_pnpm", - "pnpmfile.js": "_f_light_pnpm", - "pnpm-lock.yaml": "_f_light_pnpm", - "pnpm-workspace.yaml": "_f_light_pnpm", - "poetry.lock": "_f_poetry", - ".postcssrc": "_f_postcssconfig", - ".postcssrc.json": "_f_postcssconfig", - ".postcssrc.yaml": "_f_postcssconfig", - ".postcssrc.yml": "_f_postcssconfig", - ".postcssrc.ts": "_f_postcssconfig", - ".postcssrc.cts": "_f_postcssconfig", - ".postcssrc.mts": "_f_postcssconfig", - ".postcssrc.js": "_f_postcssconfig", - ".postcssrc.cjs": "_f_postcssconfig", - ".postcssrc.mjs": "_f_postcssconfig", - "postcss.config.ts": "_f_postcssconfig", - "postcss.config.cts": "_f_postcssconfig", - "postcss.config.mts": "_f_postcssconfig", - "postcss.config.js": "_f_postcssconfig", - "postcss.config.cjs": "_f_postcssconfig", - "postcss.config.mjs": "_f_postcssconfig", - "preact.config.js": "_f_preact", - ".pre-commit-config.yaml": "_f_precommit", - ".prettierrc": "_f_light_prettier", - ".prettierignore": "_f_light_prettier", - "prettier.config.js": "_f_light_prettier", - "prettier.config.cjs": "_f_light_prettier", - "prettier.config.mjs": "_f_light_prettier", - "prettier.config.ts": "_f_light_prettier", - "prettier.config.coffee": "_f_light_prettier", - ".prettierrc.js": "_f_light_prettier", - ".prettierrc.cjs": "_f_light_prettier", - ".prettierrc.mjs": "_f_light_prettier", - ".prettierrc.json": "_f_light_prettier", - ".prettierrc.json5": "_f_light_prettier", - ".prettierrc.yml": "_f_light_prettier", - ".prettierrc.yaml": "_f_light_prettier", - ".prettierrc.toml": "_f_light_prettier", - "prisma.config.js": "_f_prismaconfig", - "prisma.config.ts": "_f_prismaconfig", - "procfile": "_f_procfile", - "protractor.conf.js": "_f_protractor", - "protractor.conf.coffee": "_f_protractor", - "protractor.conf.ts": "_f_protractor", - "publiccode.yml": "_f_publiccode", - ".jade-lintrc": "_f_pug", - ".pug-lintrc": "_f_pug", - ".jade-lint.json": "_f_pug", - ".pug-lintrc.js": "_f_pug", - ".pug-lintrc.json": "_f_pug", - "Pulumi.yaml": "_f_pulumi", - "Pulumi.yml": "_f_pulumi", - "Pulumi.dev.yaml": "_f_pulumi", - "Pulumi.dev.yml": "_f_pulumi", - "Pulumi.prod.yaml": "_f_pulumi", - "Pulumi.prod.yml": "_f_pulumi", - "purgecss.config.js": "_f_purgecss", - ".python-version": "_f_pyenv", - "pyproject.toml": "_f_pypi", - "pytest.ini": "_f_pytest", - ".pytest.ini": "_f_pytest", - "pytest.toml": "_f_pytest", - ".pytest.toml": "_f_pytest", - "py.typed": "_f_pytyped", - ".pyup": "_f_pyup", - ".pyup.yml": "_f_pyup", - "qmldir": "_f_qmldir", - "quasar.conf.js": "_f_light_quasar", - "quasar.config.js": "_f_light_quasar", - "quasar.config.mjs": "_f_light_quasar", - "quasar.config.cjs": "_f_light_quasar", - "quasar.config.ts": "_f_light_quasar", - "Rakefile": "_f_rake", - "razzle.config.js": "_f_light_razzle", - "react-router.config.js": "_f_light_reactrouter", - "react-router.config.ts": "_f_light_reactrouter", - ".rehyperc": "_f_light_rehype", - ".rehypeignore": "_f_light_rehype", - ".rehyperc.cjs": "_f_light_rehype", - ".rehyperc.js": "_f_light_rehype", - ".rehyperc.json": "_f_light_rehype", - ".rehyperc.mjs": "_f_light_rehype", - ".rehyperc.yml": "_f_light_rehype", - ".rehyperc.yaml": "_f_light_rehype", - ".remarkrc": "_f_light_remark", - ".remarkignore": "_f_light_remark", - ".remarkrc.cjs": "_f_light_remark", - ".remarkrc.js": "_f_light_remark", - ".remarkrc.json": "_f_light_remark", - ".remarkrc.mjs": "_f_light_remark", - ".remarkrc.yml": "_f_light_remark", - ".remarkrc.yaml": "_f_light_remark", - ".renovaterc": "_f_renovate", - ".renovaterc.json": "_f_renovate", - "renovate.json": "_f_renovate", - "renovate.json5": "_f_renovate", - ".replit": "_f_light_replit", - "replit.nix": "_f_light_replit", - ".retextrc": "_f_light_retext", - ".retextignore": "_f_light_retext", - ".retextrc.cjs": "_f_light_retext", - ".retextrc.js": "_f_light_retext", - ".retextrc.json": "_f_light_retext", - ".retextrc.mjs": "_f_light_retext", - ".retextrc.yml": "_f_light_retext", - ".retextrc.yaml": "_f_light_retext", - "robots.txt": "_f_robots", - "rolldown.config.js": "_f_light_rolldown", - "rolldown.config.cjs": "_f_light_rolldown", - "rolldown.config.mjs": "_f_light_rolldown", - "rolldown.config.coffee": "_f_light_rolldown", - "rolldown.config.ts": "_f_light_rolldown", - "rolldown.config.mts": "_f_light_rolldown", - "rolldown.config.cts": "_f_light_rolldown", - "rolldown.config.common.js": "_f_light_rolldown", - "rolldown.config.common.cjs": "_f_light_rolldown", - "rolldown.config.common.mjs": "_f_light_rolldown", - "rolldown.config.common.coffee": "_f_light_rolldown", - "rolldown.config.common.ts": "_f_light_rolldown", - "rolldown.config.common.mts": "_f_light_rolldown", - "rolldown.config.common.cts": "_f_light_rolldown", - "rolldown.config.dev.js": "_f_light_rolldown", - "rolldown.config.dev.cjs": "_f_light_rolldown", - "rolldown.config.dev.mjs": "_f_light_rolldown", - "rolldown.config.dev.coffee": "_f_light_rolldown", - "rolldown.config.dev.ts": "_f_light_rolldown", - "rolldown.config.dev.mts": "_f_light_rolldown", - "rolldown.config.dev.cts": "_f_light_rolldown", - "rolldown.config.prod.js": "_f_light_rolldown", - "rolldown.config.prod.cjs": "_f_light_rolldown", - "rolldown.config.prod.mjs": "_f_light_rolldown", - "rolldown.config.prod.coffee": "_f_light_rolldown", - "rolldown.config.prod.ts": "_f_light_rolldown", - "rolldown.config.prod.mts": "_f_light_rolldown", - "rolldown.config.prod.cts": "_f_light_rolldown", - "rollup.config.js": "_f_rollup", - "rollup.config.cjs": "_f_rollup", - "rollup.config.mjs": "_f_rollup", - "rollup.config.coffee": "_f_rollup", - "rollup.config.ts": "_f_rollup", - "rollup.config.common.js": "_f_rollup", - "rollup.config.common.cjs": "_f_rollup", - "rollup.config.common.mjs": "_f_rollup", - "rollup.config.common.coffee": "_f_rollup", - "rollup.config.common.ts": "_f_rollup", - "rollup.config.dev.js": "_f_rollup", - "rollup.config.dev.cjs": "_f_rollup", - "rollup.config.dev.mjs": "_f_rollup", - "rollup.config.dev.coffee": "_f_rollup", - "rollup.config.dev.ts": "_f_rollup", - "rollup.config.prod.js": "_f_rollup", - "rollup.config.prod.cjs": "_f_rollup", - "rollup.config.prod.mjs": "_f_rollup", - "rollup.config.prod.coffee": "_f_rollup", - "rollup.config.prod.ts": "_f_rollup", - "rome.json": "_f_light_rome", - ".rspec": "_f_rspec", - ".rubocop.yml": "_f_light_rubocop", - ".rubocop_todo.yml": "_f_light_rubocop", - ".ruby-version": "_f_ruby", - "rust-toolchain": "_f_light_rust_toolchain", - "rust-toolchain.toml": "_f_light_rust_toolchain", - ".slshrc": "_f_s-lang", - ".isisrc": "_f_s-lang", - ".jedrc": "_f_s-lang", - ".sailsrc": "_f_sails", - ".sapphirerc.json": "_f_sapphire_framework_cli", - ".sapphirerc.yml": "_f_sapphire_framework_cli", - ".sapphirerc": "_f_sapphire_framework_cli", - "seedkit.config.js": "_f_seedkit", - "seedkit.config.ts": "_f_seedkit", - "seedkit.config.mjs": "_f_seedkit", - ".sentryclirc": "_f_sentry", - ".sequelizerc": "_f_sequelize", - ".sequelizerc.js": "_f_sequelize", - ".sequelizerc.json": "_f_sequelize", - "serverless.yml": "_f_serverless", - "serverless.json": "_f_serverless", - "serverless.js": "_f_serverless", - "serverless.ts": "_f_serverless", - "components.json": "_f_light_shadcn", - ".shellcheckrc": "_f_shellcheck", - "Shuttle.toml": "_f_shuttle", - "sitemap.xml": "_f_sitemap", - "sitemap.rss": "_f_sitemap", - "sitemap.txt": "_f_sitemap", - "sitemap.atom": "_f_sitemap", - "slash-up.config.js": "_f_slashup", - "smithery.yaml": "_f_smithery", - "snapcraft.yaml": "_f_snapcraft", - "snaplet.config.js": "_f_snaplet", - "snaplet.config.ts": "_f_snaplet", - ".snyk": "_f_snyk", - ".solidarity": "_f_solidarity", - ".solidarity.json": "_f_solidarity", - "spin.toml": "_f_light_spin", - "sst-env.d.ts": "_f_sst", - "sst-env.ts": "_f_sst", - "sst-env.js": "_f_sst", - "sst.config.d.ts": "_f_sst", - "sst.config.ts": "_f_sst", - "sst.config.js": "_f_sst", - ".stackblitzrc": "_f_stackblitz", - "stryker.conf.mjs": "_f_stryker", - "stryker.conf.cjs": "_f_stryker", - "stryker.conf.js": "_f_stryker", - "stryker.conf.conf": "_f_stryker", - "stryker.conf.json": "_f_stryker", - ".stryker.conf.mjs": "_f_stryker", - ".stryker.conf.cjs": "_f_stryker", - ".stryker.conf.js": "_f_stryker", - ".stryker.conf.conf": "_f_stryker", - ".stryker.conf.json": "_f_stryker", - "stryker.config.mjs": "_f_stryker", - "stryker.config.cjs": "_f_stryker", - "stryker.config.js": "_f_stryker", - "stryker.config.conf": "_f_stryker", - "stryker.config.json": "_f_stryker", - ".stryker.config.mjs": "_f_stryker", - ".stryker.config.cjs": "_f_stryker", - ".stryker.config.js": "_f_stryker", - ".stryker.config.conf": "_f_stryker", - ".stryker.config.json": "_f_stryker", - "stryker-config.mjs": "_f_stryker", - "stryker-config.cjs": "_f_stryker", - "stryker-config.js": "_f_stryker", - "stryker-config.conf": "_f_stryker", - "stryker-config.json": "_f_stryker", - "stryker4s.mjs": "_f_stryker", - "stryker4s.cjs": "_f_stryker", - "stryker4s.js": "_f_stryker", - "stryker4s.conf": "_f_stryker", - "stryker4s.json": "_f_stryker", - ".stylelintrc": "_f_light_stylelint", - ".stylelintignore": "_f_light_stylelint", - ".stylelintcache": "_f_light_stylelint", - "stylelint.config.js": "_f_light_stylelint", - "stylelint.config.json": "_f_light_stylelint", - "stylelint.config.yaml": "_f_light_stylelint", - "stylelint.config.yml": "_f_light_stylelint", - "stylelint.config.ts": "_f_light_stylelint", - "stylelint.config.cjs": "_f_light_stylelint", - "stylelint.config.mjs": "_f_light_stylelint", - ".stylelintrc.js": "_f_light_stylelint", - ".stylelintrc.json": "_f_light_stylelint", - ".stylelintrc.yaml": "_f_light_stylelint", - ".stylelintrc.yml": "_f_light_stylelint", - ".stylelintrc.ts": "_f_light_stylelint", - ".stylelintrc.cjs": "_f_light_stylelint", - ".stylelintrc.mjs": "_f_light_stylelint", - ".stylish-haskell.yaml": "_f_stylish_haskell", - ".svnignore": "_f_subversion", - "svelte.config.js": "_f_svelteconfig", - "svelte.config.ts": "_f_svelteconfig", - "svgo.config.cjs": "_f_svgo", - "svgo.config.js": "_f_svgo", - "svgo.config.mjs": "_f_svgo", - ".swcrc": "_f_swc", - "package.pins": "_f_swift", - "symfony.lock": "_f_light_symfony", - ".syncpackrc": "_f_syncpack", - ".syncpackrc.json": "_f_syncpack", - ".syncpackrc.yaml": "_f_syncpack", - ".syncpackrc.yml": "_f_syncpack", - ".syncpackrc.js": "_f_syncpack", - ".syncpackrc.cjs": "_f_syncpack", - "syncpack.config.js": "_f_syncpack", - "syncpack.config.cjs": "_f_syncpack", - "tailwind.js": "_f_tailwind", - "tailwind.cjs": "_f_tailwind", - "tailwind.coffee": "_f_tailwind", - "tailwind.ts": "_f_tailwind", - "tailwind.json": "_f_tailwind", - "tailwind.mjs": "_f_tailwind", - "tailwind.config.js": "_f_tailwind", - "tailwind.config.cjs": "_f_tailwind", - "tailwind.config.coffee": "_f_tailwind", - "tailwind.config.ts": "_f_tailwind", - "tailwind.config.json": "_f_tailwind", - "tailwind.config.mjs": "_f_tailwind", - ".tailwind.js": "_f_tailwind", - ".tailwind.cjs": "_f_tailwind", - ".tailwind.coffee": "_f_tailwind", - ".tailwind.ts": "_f_tailwind", - ".tailwind.json": "_f_tailwind", - ".tailwind.mjs": "_f_tailwind", - ".tailwindrc.js": "_f_tailwind", - ".tailwindrc.cjs": "_f_tailwind", - ".tailwindrc.coffee": "_f_tailwind", - ".tailwindrc.ts": "_f_tailwind", - ".tailwindrc.json": "_f_tailwind", - ".tailwindrc.mjs": "_f_tailwind", - "tamagui.js": "_f_tamagui", - "tamagui.mjs": "_f_tamagui", - "tamagui.cjs": "_f_tamagui", - "tamagui.ts": "_f_tamagui", - "tamagui.mts": "_f_tamagui", - "tamagui.cts": "_f_tamagui", - "tamagui.config.js": "_f_tamagui", - "tamagui.config.mjs": "_f_tamagui", - "tamagui.config.cjs": "_f_tamagui", - "tamagui.config.ts": "_f_tamagui", - "tamagui.config.mts": "_f_tamagui", - "tamagui.config.cts": "_f_tamagui", - ".taplo.toml": "_f_taplo", - "taplo.toml": "_f_taplo", - "taskfile.yml": "_f_taskfile", - "taskfile.yaml": "_f_taskfile", - "taskfile.dist.yml": "_f_taskfile", - "taskfile.dist.yaml": "_f_taskfile", - "tauri.conf.json": "_f_tauri", - ".taurignore": "_f_tauri", - ".testcaferc.json": "_f_light_testcafe", - "testplane.conf.ts": "_f_testplane", - "testplane.conf.js": "_f_testplane", - "testplane.conf.cts": "_f_testplane", - "testplane.conf.cjs": "_f_testplane", - "testplane.config.ts": "_f_testplane", - "testplane.config.js": "_f_testplane", - "testplane.config.cts": "_f_testplane", - "testplane.config.cjs": "_f_testplane", - ".tfignore": "_f_tfs", - ".tiltignore": "_f_tiltfile", - ".tmux.conf": "_f_light_tmux", - "tox.ini": "_f_tox", - ".travis.yml": "_f_travis", - "truffle-config.js": "_f_truffle", - "truffle-config.ts": "_f_truffle", - "trunk.yaml": "_f_trunk", - "tsconfig.json": "_f_tsconfig", - "tsconfig.app.json": "_f_tsconfig", - "tsconfig.base.json": "_f_tsconfig", - "tsconfig.build.json": "_f_tsconfig", - "tsconfig.cjs.json": "_f_tsconfig", - "tsconfig.common.json": "_f_tsconfig", - "tsconfig.debug.json": "_f_tsconfig", - "tsconfig.dev.json": "_f_tsconfig", - "tsconfig.development.json": "_f_tsconfig", - "tsconfig.e2e.json": "_f_tsconfig", - "tsconfig.eslint.json": "_f_tsconfig", - "tsconfig.esm.json": "_f_tsconfig", - "tsconfig.mjs.json": "_f_tsconfig", - "tsconfig.node.json": "_f_tsconfig", - "tsconfig.prod.json": "_f_tsconfig", - "tsconfig.production.json": "_f_tsconfig", - "tsconfig.release.json": "_f_tsconfig", - "tsconfig.server.json": "_f_tsconfig", - "tsconfig.spec.json": "_f_tsconfig", - "tsconfig.staging.json": "_f_tsconfig", - "tsconfig.test.json": "_f_tsconfig", - "tsconfig.types.json": "_f_tsconfig", - "tsconfig.lib.json": "_f_tsconfig", - "tsconfig.lib.prod.json": "_f_tsconfig", - "tsdoc.json": "_f_tsdoc", - "tsdown.config.ts": "_f_tsdown", - "tsdown.config.mts": "_f_tsdown", - "tsdown.config.cts": "_f_tsdown", - "tsdown.config.js": "_f_tsdown", - "tsdown.config.mjs": "_f_tsdown", - "tsdown.config.cjs": "_f_tsdown", - "tsdown.config.json": "_f_tsdown", - "tslint.json": "_f_tslint", - "tslint.yaml": "_f_tslint", - "tslint.yml": "_f_tslint", - "turbo.json": "_f_light_turbo", - "turbo.jsonc": "_f_light_turbo", - "microfrontends.json": "_f_light_turbo", - "microfrontends.jsonc": "_f_light_turbo", - "typedoc.cjs": "_f_typedoc", - "typedoc.js": "_f_typedoc", - "typedoc.json": "_f_typedoc", - "typedoc.jsonc": "_f_typedoc", - "typedoc.mjs": "_f_typedoc", - "typedoc.config.cjs": "_f_typedoc", - "typedoc.config.js": "_f_typedoc", - "typedoc.config.json": "_f_typedoc", - "typedoc.config.jsonc": "_f_typedoc", - "typedoc.config.mjs": "_f_typedoc", - ".unibeautifyrc": "_f_light_unibeautify", - "unibeautify.config.js": "_f_light_unibeautify", - ".unibeautifyrc.js": "_f_light_unibeautify", - ".unibeautifyrc.json": "_f_light_unibeautify", - ".unibeautifyrc.yaml": "_f_light_unibeautify", - ".unibeautifyrc.yml": "_f_light_unibeautify", - "unlicense": "_f_unlicense", - "unlicence": "_f_unlicense", - "UNLICENSE": "_f_unlicense", - "UNLICENCE": "_f_unlicense", - "unlicense.md": "_f_unlicense", - "unlicense.txt": "_f_unlicense", - "unlicence.md": "_f_unlicense", - "unlicence.txt": "_f_unlicense", - "UNLICENSE.md": "_f_unlicense", - "UNLICENSE.txt": "_f_unlicense", - "UNLICENCE.md": "_f_unlicense", - "UNLICENCE.txt": "_f_unlicense", - "uno.config.js": "_f_unocss", - "uno.config.mjs": "_f_unocss", - "uno.config.ts": "_f_unocss", - "uno.config.mts": "_f_unocss", - "unocss.config.js": "_f_unocss", - "unocss.config.mjs": "_f_unocss", - "unocss.config.ts": "_f_unocss", - "unocss.config.mts": "_f_unocss", - "uv.lock": "_f_uv", - "vagrantfile": "_f_vagrant", - "vapor.yml": "_f_vapor", - "now.json": "_f_light_vercel", - ".nowignore": "_f_light_vercel", - "vercel.json": "_f_light_vercel", - ".vercelignore": "_f_light_vercel", - ".vimrc": "_f_vim", - ".gvimrc": "_f_vim", - "vite.config.js": "_f_light_vite", - "vite.config.mjs": "_f_light_vite", - "vite.config.ts": "_f_light_vite", - "vite.config.cjs": "_f_light_vite", - "vite.config.mts": "_f_light_vite", - "vite.config.cts": "_f_light_vite", - "vitest.config.js": "_f_light_vitest", - "vitest.config.mjs": "_f_light_vitest", - "vitest.config.ts": "_f_light_vitest", - "vitest.config.cjs": "_f_light_vitest", - "vitest.config.mts": "_f_light_vitest", - "vitest.config.cts": "_f_light_vitest", - "vitest.workspace.json": "_f_light_vitest", - "vitest.workspace.js": "_f_light_vitest", - "vitest.workspace.mjs": "_f_light_vitest", - "vitest.workspace.ts": "_f_light_vitest", - "vitest.workspace.cjs": "_f_light_vitest", - "vitest.workspace.mts": "_f_light_vitest", - "vitest.workspace.cts": "_f_light_vitest", - "vitest.projects.json": "_f_light_vitest", - "vitest.projects.js": "_f_light_vitest", - "vitest.projects.mjs": "_f_light_vitest", - "vitest.projects.ts": "_f_light_vitest", - "vitest.projects.cjs": "_f_light_vitest", - "vitest.projects.mts": "_f_light_vitest", - "vitest.projects.cts": "_f_light_vitest", - ".vscodeignore": "_f_vscode", - "launch.json": "_f_vscode", - "tasks.json": "_f_vscode", - "vscodeignore.json": "_f_vscode", - ".vscode-test.js": "_f_vscode_test", - ".vscode-test.json": "_f_vscode_test", - ".vscode-test.mjs": "_f_vscode_test", - ".vuerc": "_f_vueconfig", - "vue.config.js": "_f_vueconfig", - "vue.config.cjs": "_f_vueconfig", - "vue.config.mjs": "_f_vueconfig", - "wallaby.json": "_f_wallaby", - "wallaby.js": "_f_wallaby", - "wallaby.ts": "_f_wallaby", - "wallaby.coffee": "_f_wallaby", - "wallaby.conf.json": "_f_wallaby", - "wallaby.conf.js": "_f_wallaby", - "wallaby.conf.ts": "_f_wallaby", - "wallaby.conf.coffee": "_f_wallaby", - ".wallaby.json": "_f_wallaby", - ".wallaby.js": "_f_wallaby", - ".wallaby.ts": "_f_wallaby", - ".wallaby.coffee": "_f_wallaby", - ".wallaby.conf.json": "_f_wallaby", - ".wallaby.conf.js": "_f_wallaby", - ".wallaby.conf.ts": "_f_wallaby", - ".wallaby.conf.coffee": "_f_wallaby", - "wally.toml": "_f_wally", - "wally.lock": "_f_wally", - ".watchmanconfig": "_f_watchmanconfig", - "wdio.json": "_f_wdio", - "wdio.js": "_f_wdio", - "wdio.mjs": "_f_wdio", - "wdio.cjs": "_f_wdio", - "wdio.ts": "_f_wdio", - "wdio.mts": "_f_wdio", - "wdio.cts": "_f_wdio", - "wdio.conf.json": "_f_wdio", - "wdio.conf.js": "_f_wdio", - "wdio.conf.mjs": "_f_wdio", - "wdio.conf.cjs": "_f_wdio", - "wdio.conf.ts": "_f_wdio", - "wdio.conf.mts": "_f_wdio", - "wdio.conf.cts": "_f_wdio", - ".weblate": "_f_weblate", - ".weblate.ini": "_f_weblate", - "weblate": "_f_weblate", - "weblate.ini": "_f_weblate", - "webpack.base.conf.js": "_f_webpack", - "webpack.base.conf.cjs": "_f_webpack", - "webpack.base.conf.mjs": "_f_webpack", - "webpack.base.conf.coffee": "_f_webpack", - "webpack.base.conf.ts": "_f_webpack", - "webpack.common.js": "_f_webpack", - "webpack.common.cjs": "_f_webpack", - "webpack.common.mjs": "_f_webpack", - "webpack.common.coffee": "_f_webpack", - "webpack.common.ts": "_f_webpack", - "webpack.config.js": "_f_webpack", - "webpack.config.cjs": "_f_webpack", - "webpack.config.mjs": "_f_webpack", - "webpack.config.coffee": "_f_webpack", - "webpack.config.ts": "_f_webpack", - "webpack.config.base.js": "_f_webpack", - "webpack.config.base.cjs": "_f_webpack", - "webpack.config.base.mjs": "_f_webpack", - "webpack.config.base.coffee": "_f_webpack", - "webpack.config.base.ts": "_f_webpack", - "webpack.config.build.js": "_f_webpack", - "webpack.config.build.cjs": "_f_webpack", - "webpack.config.build.mjs": "_f_webpack", - "webpack.config.build.coffee": "_f_webpack", - "webpack.config.build.ts": "_f_webpack", - "webpack.config.common.js": "_f_webpack", - "webpack.config.common.cjs": "_f_webpack", - "webpack.config.common.mjs": "_f_webpack", - "webpack.config.common.coffee": "_f_webpack", - "webpack.config.common.ts": "_f_webpack", - "webpack.config.dev.js": "_f_webpack", - "webpack.config.dev.cjs": "_f_webpack", - "webpack.config.dev.mjs": "_f_webpack", - "webpack.config.dev.coffee": "_f_webpack", - "webpack.config.dev.ts": "_f_webpack", - "webpack.config.development.js": "_f_webpack", - "webpack.config.development.cjs": "_f_webpack", - "webpack.config.development.mjs": "_f_webpack", - "webpack.config.development.coffee": "_f_webpack", - "webpack.config.development.ts": "_f_webpack", - "webpack.config.staging.js": "_f_webpack", - "webpack.config.staging.cjs": "_f_webpack", - "webpack.config.staging.mjs": "_f_webpack", - "webpack.config.staging.coffee": "_f_webpack", - "webpack.config.staging.ts": "_f_webpack", - "webpack.config.test.js": "_f_webpack", - "webpack.config.test.cjs": "_f_webpack", - "webpack.config.test.mjs": "_f_webpack", - "webpack.config.test.coffee": "_f_webpack", - "webpack.config.test.ts": "_f_webpack", - "webpack.config.prod.js": "_f_webpack", - "webpack.config.prod.cjs": "_f_webpack", - "webpack.config.prod.mjs": "_f_webpack", - "webpack.config.prod.coffee": "_f_webpack", - "webpack.config.prod.ts": "_f_webpack", - "webpack.config.production.js": "_f_webpack", - "webpack.config.production.cjs": "_f_webpack", - "webpack.config.production.mjs": "_f_webpack", - "webpack.config.production.coffee": "_f_webpack", - "webpack.config.production.ts": "_f_webpack", - "webpack.config.babel.js": "_f_webpack", - "webpack.config.babel.cjs": "_f_webpack", - "webpack.config.babel.mjs": "_f_webpack", - "webpack.config.babel.coffee": "_f_webpack", - "webpack.config.babel.ts": "_f_webpack", - "webpack.config.base.babel.js": "_f_webpack", - "webpack.config.base.babel.cjs": "_f_webpack", - "webpack.config.base.babel.mjs": "_f_webpack", - "webpack.config.base.babel.coffee": "_f_webpack", - "webpack.config.base.babel.ts": "_f_webpack", - "webpack.config.common.babel.js": "_f_webpack", - "webpack.config.common.babel.cjs": "_f_webpack", - "webpack.config.common.babel.mjs": "_f_webpack", - "webpack.config.common.babel.coffee": "_f_webpack", - "webpack.config.common.babel.ts": "_f_webpack", - "webpack.config.dev.babel.js": "_f_webpack", - "webpack.config.dev.babel.cjs": "_f_webpack", - "webpack.config.dev.babel.mjs": "_f_webpack", - "webpack.config.dev.babel.coffee": "_f_webpack", - "webpack.config.dev.babel.ts": "_f_webpack", - "webpack.config.development.babel.js": "_f_webpack", - "webpack.config.development.babel.cjs": "_f_webpack", - "webpack.config.development.babel.mjs": "_f_webpack", - "webpack.config.development.babel.coffee": "_f_webpack", - "webpack.config.development.babel.ts": "_f_webpack", - "webpack.config.staging.babel.js": "_f_webpack", - "webpack.config.staging.babel.cjs": "_f_webpack", - "webpack.config.staging.babel.mjs": "_f_webpack", - "webpack.config.staging.babel.coffee": "_f_webpack", - "webpack.config.staging.babel.ts": "_f_webpack", - "webpack.config.test.babel.js": "_f_webpack", - "webpack.config.test.babel.cjs": "_f_webpack", - "webpack.config.test.babel.mjs": "_f_webpack", - "webpack.config.test.babel.coffee": "_f_webpack", - "webpack.config.test.babel.ts": "_f_webpack", - "webpack.config.prod.babel.js": "_f_webpack", - "webpack.config.prod.babel.cjs": "_f_webpack", - "webpack.config.prod.babel.mjs": "_f_webpack", - "webpack.config.prod.babel.coffee": "_f_webpack", - "webpack.config.prod.babel.ts": "_f_webpack", - "webpack.config.production.babel.js": "_f_webpack", - "webpack.config.production.babel.cjs": "_f_webpack", - "webpack.config.production.babel.mjs": "_f_webpack", - "webpack.config.production.babel.coffee": "_f_webpack", - "webpack.config.production.babel.ts": "_f_webpack", - "webpack.dev.js": "_f_webpack", - "webpack.dev.cjs": "_f_webpack", - "webpack.dev.mjs": "_f_webpack", - "webpack.dev.coffee": "_f_webpack", - "webpack.dev.ts": "_f_webpack", - "webpack.dev.conf.js": "_f_webpack", - "webpack.dev.conf.cjs": "_f_webpack", - "webpack.dev.conf.mjs": "_f_webpack", - "webpack.dev.conf.coffee": "_f_webpack", - "webpack.dev.conf.ts": "_f_webpack", - "webpack.local.js": "_f_webpack", - "webpack.local.cjs": "_f_webpack", - "webpack.local.mjs": "_f_webpack", - "webpack.local.coffee": "_f_webpack", - "webpack.local.ts": "_f_webpack", - "webpack.prod.js": "_f_webpack", - "webpack.prod.cjs": "_f_webpack", - "webpack.prod.mjs": "_f_webpack", - "webpack.prod.coffee": "_f_webpack", - "webpack.prod.ts": "_f_webpack", - "webpack.prod.conf.js": "_f_webpack", - "webpack.prod.conf.cjs": "_f_webpack", - "webpack.prod.conf.mjs": "_f_webpack", - "webpack.prod.conf.coffee": "_f_webpack", - "webpack.prod.conf.ts": "_f_webpack", - "webpack.main.config.js": "_f_webpack", - "webpack.main.config.cjs": "_f_webpack", - "webpack.main.config.mjs": "_f_webpack", - "webpack.main.config.coffee": "_f_webpack", - "webpack.main.config.ts": "_f_webpack", - "webpack.mix.js": "_f_webpack", - "webpack.mix.cjs": "_f_webpack", - "webpack.mix.mjs": "_f_webpack", - "webpack.mix.coffee": "_f_webpack", - "webpack.mix.ts": "_f_webpack", - "webpack.plugins.js": "_f_webpack", - "webpack.plugins.cjs": "_f_webpack", - "webpack.plugins.mjs": "_f_webpack", - "webpack.plugins.coffee": "_f_webpack", - "webpack.plugins.ts": "_f_webpack", - "webpack.renderer.config.js": "_f_webpack", - "webpack.renderer.config.cjs": "_f_webpack", - "webpack.renderer.config.mjs": "_f_webpack", - "webpack.renderer.config.coffee": "_f_webpack", - "webpack.renderer.config.ts": "_f_webpack", - "webpack.rules.js": "_f_webpack", - "webpack.rules.cjs": "_f_webpack", - "webpack.rules.mjs": "_f_webpack", - "webpack.rules.coffee": "_f_webpack", - "webpack.rules.ts": "_f_webpack", - "webpack.test.conf.js": "_f_webpack", - "webpack.test.conf.cjs": "_f_webpack", - "webpack.test.conf.mjs": "_f_webpack", - "webpack.test.conf.coffee": "_f_webpack", - "webpack.test.conf.ts": "_f_webpack", - "wercker.yml": "_f_wercker", - "windi.config.ts": "_f_windi", - "windi.config.js": "_f_windi", - "wpml-config.xml": "_f_wpml", - "wxt.config.js": "_f_wxt", - "wxt.config.cjs": "_f_wxt", - "wxt.config.mjs": "_f_wxt", - "wxt.config.ts": "_f_wxt", - "wxt.config.cts": "_f_wxt", - "wxt.config.mts": "_f_wxt", - ".xo-config": "_f_xo", - "xo.config.js": "_f_xo", - "xo.config.cjs": "_f_xo", - "xo.config.mjs": "_f_xo", - "xo.config.ts": "_f_xo", - "xo.config.cts": "_f_xo", - "xo.config.mts": "_f_xo", - ".xo-config.js": "_f_xo", - ".xo-config.json": "_f_xo", - ".xo-config.cjs": "_f_xo", - ".xcompose": "_f_light_xorg", - ".yamllint": "_f_yamllint", - ".yaspellerrc": "_f_yandex", - ".yaspeller.json": "_f_yandex", - "yarn.lock": "_f_yarn", - ".yarnrc": "_f_yarn", - ".yarnrc.yml": "_f_yarn", - ".yarnclean": "_f_yarn", - ".yarn-integrity": "_f_yarn", - ".yarn-metadata.json": "_f_yarn", - ".yarn-state.yml": "_f_yarn", - ".yarnignore": "_f_yarn", - ".yo-rc.json": "_f_yeoman" - }, - "languageIds": { - "actionscript": "_f_actionscript", - "ada": "_f_light_ada", - "advpl": "_f_advpl", - "affectscript": "_f_affectscript", - "agda": "_f_light_agda", - "lagda-md": "_f_light_agda", - "lagda-rst": "_f_light_agda", - "lagda-tex": "_f_light_agda", - "al": "_f_al", - "alloy": "_f_alloy", - "ansible": "_f_ansible", - "antlr": "_f_antlr", - "anyscript": "_f_anyscript", - "apacheconf": "_f_apache", - "apex": "_f_apex", - "apiblueprint": "_f_apib", - "apl": "_f_light_apl", - "applescript": "_f_applescript", - "asciidoc": "_f_asciidoc", - "asp": "_f_asp", - "asp (html)": "_f_asp", - "arm": "_f_assembly", - "asm": "_f_assembly", - "asm-intel-x86-generic": "_f_assembly", - "platformio-debug.asm": "_f_platformio", - "asm-collection": "_f_assembly", - "astro": "_f_light_astro", - "ats": "_f_ats", - "ahk": "_f_autohotkey", - "ahk2": "_f_autohotkey", - "autoit": "_f_autoit", - "avro": "_f_avro", - "azcli": "_f_azure", - "azure-pipelines": "_f_azurepipelines", - "ballerina": "_f_ballerina", - "bat": "_f_bat", - "bats": "_f_bats", - "bazel": "_f_bazel", - "bazelrc": "_f_bazel", - "starlark": "_f_bazel", - "befunge": "_f_befunge", - "befunge98": "_f_befunge", - "bicep": "_f_bicep", - "biml": "_f_biml", - "code-text-binary": "_f_binary", - "biome_syntax_tree": "_f_biome", - "blade": "_f_blade", - "laravel-blade": "_f_blade", - "blitzbasic": "_f_blitzbasic", - "bolt": "_f_bolt", - "bosque": "_f_bosque", - "browserslist": "_f_browserslist", - "bruno": "_f_bruno", - "buf": "_f_buf", - "buf-gen": "_f_buf", - "bun.lockb": "_f_bun", - "c": "_f_c", - "c3": "_f_c3", - "c-al": "_f_c_al", - "cabal": "_f_cabal", - "caddyfile": "_f_caddy", - "capnp": "_f_capnp", - "capnproto": "_f_capnp", - "casc": "_f_casc", - "cddl": "_f_cddl", - "ceylon": "_f_ceylon", - "cfml": "_f_cf", - "lang-cfml": "_f_cf", - "cfc": "_f_cfc", - "cfmhtml": "_f_cfm", - "cookbook": "_f_chef_cookbook", - "circom": "_f_circom", - "clojure": "_f_clojure", - "clojurescript": "_f_clojurescript", - "manifest-yaml": "_f_light_cloudfoundry", - "cmake": "_f_cmake", - "cmake-cache": "_f_cmake", - "cobol": "_f_cobol", - "ql": "_f_codeql", - "coffeescript": "_f_coffeescript", - "java-properties": "_f_light_config", - "properties": "_f_light_config", - "spring-boot-properties": "_f_light_config", - "confluence": "_f_confluence", - "instructions": "_f_light_copilot", - "prompt": "_f_light_copilot", - "cpp": "_f_cpp", - "crystal": "_f_light_crystal", - "csharp": "_f_csharp", - "css": "_f_css", - "cucumber": "_f_cucumber", - "feature": "_f_cucumber", - "cuda": "_f_cuda", - "cuda-cpp": "_f_cuda", - "cython": "_f_cython", - "dal": "_f_dal", - "dart": "_f_dartlang", - "debian-changelog": "_f_debian", - "debian-control": "_f_debian", - "debian-copyright": "_f_debian", - "debian-upstream-metadata": "_f_debian", - "pascal": "_f_delphi", - "objectpascal": "_f_delphi", - "dhall": "_f_light_dhall", - "diff": "_f_diff", - "django-html": "_f_django", - "django-txt": "_f_django", - "d": "_f_dlang", - "dscript": "_f_dlang", - "dml": "_f_dlang", - "diet": "_f_dlang", - "dockerbake": "_f_docker", - "dockercompose": "_f_docker", - "dockerfile": "_f_docker", - "dotenv": "_f_dotenv", - "env": "_f_dotenv", - "dotjs": "_f_dotjs", - "doxygen": "_f_doxygen", - "drawio": "_f_drawio", - "drools": "_f_drools", - "dtd": "_f_dtd", - "dustjs": "_f_dustjs", - "dylan": "_f_dylan", - "dylan-lid": "_f_dylan", - "earthfile": "_f_earthly", - "edge": "_f_edge", - "editorconfig": "_f_editorconfig", - "eex": "_f_eex", - "html-eex": "_f_eex", - "es": "_f_elastic", - "elixir": "_f_elixir", - "elm": "_f_elm", - "erb": "_f_erb", - "html.erb": "_f_erb", - "erlang": "_f_erlang", - "esphome": "_f_light_esphome", - "excel": "_f_excel", - "falcon": "_f_falcon", - "fql": "_f_fauna", - "fortran": "_f_fortran", - "fortran-modern": "_f_fortran", - "FortranFreeForm": "_f_fortran", - "FortranFixedForm": "_f_fortran", - "fortran_fixed-form": "_f_fortran", - "ftl": "_f_freemarker", - "fsharp": "_f_fsharp", - "fthtml": "_f_fthtml", - "galen": "_f_galen", - "gml-gms": "_f_gamemaker", - "gml-gms2": "_f_light_gamemaker2", - "gml-gm81": "_f_gamemaker81", - "gcode": "_f_gcode", - "gdscript": "_f_gdscript", - "genstat": "_f_genstat", - "git-commit": "_f_git", - "git-rebase": "_f_git", - "ignore": "_f_git", - "gleam": "_f_gleam", - "glimmer-js": "_f_glimmer", - "glimmer-ts": "_f_glimmer", - "glsl": "_f_glsl", - "glyphs": "_f_glyphs", - "automake": "_f_gnu", - "m4": "_f_gnu", - "makefile": "_f_gnu", - "makefile2": "_f_gnu", - "gnuplot": "_f_gnuplot", - "go": "_f_go", - "go.mod": "_f_go_package", - "go.work": "_f_go_work", - "goctl": "_f_goctl", - "gradle-kotlin-dsl": "_f_light_gradle", - "grain": "_f_grain", - "graphql": "_f_graphql", - "dot": "_f_graphviz", - "grit": "_f_grit", - "groovy": "_f_groovy", - "haml": "_f_haml", - "handlebars": "_f_handlebars", - "harbour": "_f_harbour", - "hcl": "_f_light_hashicorp", - "haskell": "_f_haskell", - "literate haskell": "_f_haskell", - "haxe": "_f_haxe", - "hxml": "_f_haxe", - "Haxe AST dump": "_f_haxe", - "helm": "_f_helm", - "hjson": "_f_light_hjson", - "hlsl": "_f_hlsl", - "home-assistant": "_f_homeassistant", - "hosts": "_f_host", - "html": "_f_html", - "http": "_f_http", - "hunspell.aff": "_f_hunspell", - "hunspell.dic": "_f_hunspell", - "hy": "_f_hy", - "hypr": "_f_hypr", - "icl": "_f_icl", - "imba": "_f_imba", - "4GL": "_f_informix", - "ini": "_f_light_ini", - "ink": "_f_ink", - "innosetup": "_f_innosetup", - "io": "_f_light_io", - "iodine": "_f_iodine", - "janet": "_f_janet", - "java": "_f_java", - "jekyll": "_f_jekyll", - "jenkins": "_f_jenkins", - "declarative": "_f_jenkins", - "jenkinsfile": "_f_jenkins", - "jest-snapshot": "_f_jest_snapshot", - "jinja": "_f_jinja", - "jinja-java": "_f_jinja", - "jinja-html": "_f_jinja", - "jinja-xml": "_f_jinja", - "jinja-css": "_f_jinja", - "jinja-json": "_f_jinja", - "jinja-md": "_f_jinja", - "jinja-py": "_f_jinja", - "jinja-rb": "_f_jinja", - "jinja-js": "_f_jinja", - "jinja-yaml": "_f_jinja", - "jinja-toml": "_f_jinja", - "jinja-latex": "_f_jinja", - "jinja-lua": "_f_jinja", - "jinja-properties": "_f_jinja", - "jinja-shell": "_f_jinja", - "jinja-dockerfile": "_f_jinja", - "jinja-sql": "_f_jinja", - "jinja-terraform": "_f_jinja", - "jinja-nginx": "_f_jinja", - "jinja-groovy": "_f_jinja", - "jinja-systemd": "_f_jinja", - "jinja-cpp": "_f_jinja", - "javascript": "_f_light_js", - "json": "_f_light_json", - "json-tmlanguage": "_f_light_json", - "jsonc": "_f_light_json", - "jsonl": "_f_light_json", - "json5": "_f_light_json5", - "jsonnet": "_f_jsonnet", - "julia": "_f_julia", - "juliamarkdown": "_f_julia", - "just": "_f_just", - "k": "_f_k", - "kivy": "_f_kivy", - "kos": "_f_kos", - "kotlin": "_f_kotlin", - "kotlinscript": "_f_kotlin", - "kusto": "_f_kusto", - "lark": "_f_light_lark", - "latino": "_f_latino", - "lean4": "_f_light_lean", - "lean4markdown": "_f_light_lean", - "less": "_f_less", - "lex": "_f_lex", - "lilypond": "_f_lilypond", - "lisp": "_f_lisp", - "autolisp": "_f_lisp", - "autolispdcl": "_f_lisp", - "log": "_f_log", - "lolcode": "_f_lolcode", - "lsl": "_f_lsl", - "lua": "_f_lua", - "markdown": "_f_markdown", - "marko": "_f_marko", - "matlab": "_f_matlab", - "maxscript": "_f_maxscript", - "mel": "_f_maya", - "mdx": "_f_light_mdx", - "mediawiki": "_f_mediawiki", - "mermaid": "_f_mermaid", - "meson": "_f_meson", - "metal": "_f_metal", - "bc-mcfunction": "_f_minecraft", - "bc-minecraft-language": "_f_minecraft", - "bc-minecraft-molang": "_f_minecraft", - "bc-minecraft-project": "_f_minecraft", - "mcdoc": "_f_minecraft", - "mcfunction": "_f_minecraft", - "mcmeta": "_f_minecraft", - "mcscript": "_f_minecraft", - "minecraft-lang": "_f_minecraft", - "options-txt": "_f_minecraft", - "snbt": "_f_minecraft", - "mv": "_f_mivascript", - "mjml": "_f_mjml", - "powerquery": "_f_light_mlang", - "mojo": "_f_mojo", - "mojolicious": "_f_mojolicious", - "mongo": "_f_mongo", - "mson": "_f_mson", - "mvt": "_f_mvt", - "mvtcss": "_f_mvtcss", - "mvtjs": "_f_mvtjs", - "nearley": "_f_nearly", - "cypher": "_f_light_neo4j", - "nginx": "_f_nginx", - "nim": "_f_nim", - "nimble": "_f_nimble", - "nix": "_f_nix", - "nsis": "_f_nsi", - "nfl": "_f_nsi", - "nsl": "_f_nsi", - "bridlensis": "_f_nsi", - "nunjucks": "_f_nunjucks", - "nushell": "_f_nushell", - "objective-c": "_f_objectivec", - "objective-cpp": "_f_objectivecpp", - "ocaml": "_f_ocaml", - "ocamllex": "_f_ocaml", - "menhir": "_f_ocaml", - "ogone": "_f_ogone", - "openhab": "_f_light_openHAB", - "scad": "_f_openscad", - "org": "_f_org", - "pddl": "_f_pddl", - "happenings": "_f_pddl_happenings", - "plan": "_f_pddl_plan", - "perl": "_f_perl", - "perl6": "_f_perl6", - "pgsql": "_f_pgsql", - "php": "_f_php", - "pine": "_f_pine", - "pinescript": "_f_pine", - "pip-requirements": "_f_pip", - "platformio-debug.disassembly": "_f_platformio", - "platformio-debug.memoryview": "_f_platformio", - "plsql": "_f_plsql", - "oracle": "_f_plsql", - "oraclesql": "_f_plsql", - "oracle-sql": "_f_plsql", - "po": "_f_poedit", - "polyglot-notebook": "_f_polyglot", - "polymer": "_f_polymer", - "pony": "_f_pony", - "postcss": "_f_postcss", - "postscript": "_f_postscript", - "powershell": "_f_powershell", - "prisma": "_f_light_prisma", - "pde": "_f_processinglang", - "abl": "_f_progress", - "prolog": "_f_prolog", - "prometheus": "_f_prometheus", - "proto3": "_f_protobuf", - "proto": "_f_protobuf", - "prototext": "_f_protobuf", - "jade": "_f_pug", - "puppet": "_f_puppet", - "purescript": "_f_light_purescript", - "pyret": "_f_pyret", - "pyscript": "_f_pyscript", - "python": "_f_python", - "pythowo": "_f_pythowo", - "qlik": "_f_qlikview", - "qml": "_f_qml", - "qsharp": "_f_qsharp", - "r": "_f_r", - "ra_syntax_tree": "_f_ra_syntax_tree", - "racket": "_f_racket", - "raku": "_f_light_raku", - "raml": "_f_raml", - "razor": "_f_razor", - "aspnetcorerazor": "_f_razor", - "javascriptreact": "_f_reactjs", - "typescriptreact": "_f_reactts", - "reason": "_f_reason", - "red": "_f_red", - "rescript": "_f_rescript", - "restructuredtext": "_f_rest", - "rexx": "_f_rexx", - "riot": "_f_riot", - "ripple": "_f_ripple", - "rmd": "_f_rmd", - "rnc": "_f_rnc", - "robot": "_f_robotframework", - "robots-txt": "_f_robots", - "ruby": "_f_ruby", - "rust": "_f_light_rust", - "s-lang": "_f_s-lang", - "san": "_f_san", - "SAS": "_f_sas", - "sass": "_f_sass", - "sass.hover": "_f_sass", - "sbt": "_f_sbt", - "scala": "_f_scala", - "scilab": "_f_scilab", - "vbscript": "_f_script", - "scss": "_f_scss", - "sdl": "_f_sdlang", - "search-result": "_f_search_result", - "shaderlab": "_f_light_shaderlab", - "shellscript": "_f_shell", - "silverstripe": "_f_silverstripe", - "sino": "_f_sino", - "eskip": "_f_skipper", - "slang": "_f_slang", - "slice": "_f_slice", - "slim": "_f_slim", - "slint": "_f_slint", - "sln": "_f_sln", - "smarty": "_f_smarty", - "snakemake": "_f_snakemake", - "snort": "_f_snort", - "solidity": "_f_light_solidity", - "sparql": "_f_sparql", - "sqf": "_f_sqf", - "sql": "_f_sql", - "squirrel": "_f_squirrel", - "stan": "_f_stan", - "stata": "_f_stata", - "stencil": "_f_stencil", - "stencil-html": "_f_stencil", - "stylable": "_f_stylable", - "source.css.styled": "_f_styled", - "stylus": "_f_light_stylus", - "svelte": "_f_svelte", - "svg": "_f_svg", - "Swagger": "_f_swagger", - "swagger": "_f_swagger", - "swift": "_f_swift", - "swig": "_f_swig", - "systemd-conf": "_f_light_systemd", - "systemd-unit-file": "_f_light_systemd", - "systemverilog": "_f_light_systemverilog", - "t4": "_f_t4tt", - "tailwindcss": "_f_tailwind", - "teal": "_f_teal", - "templ": "_f_templ", - "tera": "_f_tera", - "terraform": "_f_terraform", - "tex": "_f_light_tex", - "latex": "_f_light_tex", - "bibtex": "_f_light_tex", - "doctex": "_f_light_tex", - "csv": "_f_text", - "csv (pipe)": "_f_text", - "csv (semicolon)": "_f_text", - "csv (whitespace)": "_f_text", - "dynamic csv": "_f_text", - "tsv": "_f_text", - "plaintext": "_f_text", - "vim-help": "_f_text", - "textile": "_f_textile", - "tiltfile": "_f_tiltfile", - "toit": "_f_light_toit", - "toml": "_f_light_toml", - "toon": "_f_light_toon", - "tt": "_f_tt", - "ttcn": "_f_ttcn", - "tuc": "_f_tuc", - "twig": "_f_twig", - "typescript": "_f_typescript", - "typoscript": "_f_typo3", - "uiua": "_f_uiua", - "unison": "_f_unison", - "vb": "_f_vb", - "vba": "_f_vba", - "velocity": "_f_velocity", - "vento": "_f_vento", - "verilog": "_f_verilog", - "vhdl": "_f_vhdl", - "viml": "_f_vim", - "vim-snippet": "_f_vim", - "vitest-snapshot": "_f_light_vitest", - "v": "_f_vlang", - "volt": "_f_volt", - "vroom": "_f_vroom", - "snippets": "_f_vscode", - "vue": "_f_vue", - "vyper": "_f_vyper", - "wasm": "_f_wasm", - "wat": "_f_wasm", - "wenyan": "_f_wenyan", - "wgsl": "_f_wgsl", - "wikitext": "_f_wikitext", - "wai": "_f_wit", - "wolfram": "_f_wolfram", - "wurstlang": "_f_wurst", - "wurst": "_f_wurst", - "xmake": "_f_xmake", - "xml": "_f_xml", - "xcompose": "_f_light_xorg", - "xquery": "_f_xquery", - "xsl": "_f_xsl", - "xslt": "_f_xsl", - "yacc": "_f_yacc", - "yaml": "_f_light_yaml", - "yaml-tmlanguage": "_f_light_yaml", - "spring-boot-properties-yaml": "_f_light_yaml", - "yang": "_f_yang", - "yarnlock": "_f_yarn", - "zig": "_f_zig", - "zip": "_f_zip" - } - }, - "hidesExplorerArrows": false -} diff --git a/apps/web/src/vscode-icons.test.ts b/apps/web/src/vscode-icons.test.ts deleted file mode 100644 index 936189a921..0000000000 --- a/apps/web/src/vscode-icons.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { assert, describe, it } from "vite-plus/test"; - -import { getVscodeIconUrlForEntry } from "./vscode-icons"; - -describe("getVscodeIconUrlForEntry", () => { - it("uses exact filename matches from the vscode-icons manifest", () => { - const darkUrl = getVscodeIconUrlForEntry("pnpm-workspace.yaml", "file", "dark"); - const lightUrl = getVscodeIconUrlForEntry("pnpm-workspace.yaml", "file", "light"); - - assert.isTrue(darkUrl.endsWith("/file_type_pnpm.svg")); - assert.isTrue(lightUrl.endsWith("/file_type_light_pnpm.svg")); - }); - - it("uses longest extension match for compound extensions", () => { - const iconUrl = getVscodeIconUrlForEntry("tsconfig.tsbuildinfo", "file", "dark"); - const manifestStyleUrl = getVscodeIconUrlForEntry("buf.yaml", "file", "dark"); - assert.isTrue(iconUrl.endsWith("/file_type_tsbuildinfo.svg")); - assert.isTrue(manifestStyleUrl.endsWith("/file_type_buf.svg")); - }); - - it("uses folder mappings and light-aware filename mappings", () => { - const folderUrl = getVscodeIconUrlForEntry("packages/src", "directory", "light"); - const fileUrl = getVscodeIconUrlForEntry("AGENTS.md", "file", "light"); - - assert.isTrue(folderUrl.endsWith("/folder_type_src.svg")); - assert.isTrue(fileUrl.endsWith("/file_type_light_agents.svg")); - }); - - it("falls back to language-based mappings for path-only cases", () => { - const tsxUrl = getVscodeIconUrlForEntry("checkbox.tsx", "file", "light"); - const dockerfileUrl = getVscodeIconUrlForEntry("Dockerfile", "file", "dark"); - const shellUrl = getVscodeIconUrlForEntry("entrypoint.sh", "file", "dark"); - const htmlUrl = getVscodeIconUrlForEntry("index.html", "file", "dark"); - const cursorRulesUrl = getVscodeIconUrlForEntry("general.mdc", "file", "dark"); - const githubWorkflowUrl = getVscodeIconUrlForEntry(".github/workflows/ci.yml", "file", "light"); - - assert.isTrue(tsxUrl.endsWith("/file_type_reactts.svg")); - assert.isTrue(dockerfileUrl.endsWith("/file_type_docker.svg")); - assert.isTrue(shellUrl.endsWith("/file_type_shell.svg")); - assert.isTrue(htmlUrl.endsWith("/file_type_html.svg")); - assert.isTrue(cursorRulesUrl.endsWith("/file_type_markdown.svg")); - assert.isTrue(githubWorkflowUrl.endsWith("/file_type_light_yaml.svg")); - }); - - it("falls back to defaults when there is no match", () => { - const fileUrl = getVscodeIconUrlForEntry("foo.unknown-ext", "file", "dark"); - const folderUrl = getVscodeIconUrlForEntry("totally-unknown-folder", "directory", "dark"); - - assert.isTrue(fileUrl.endsWith("/default_file.svg")); - assert.isTrue(folderUrl.endsWith("/default_folder.svg")); - }); -}); diff --git a/apps/web/src/vscode-icons.ts b/apps/web/src/vscode-icons.ts deleted file mode 100644 index 13051c5f93..0000000000 --- a/apps/web/src/vscode-icons.ts +++ /dev/null @@ -1,211 +0,0 @@ -import vscodeIconsManifest from "./vscode-icons-manifest.json"; -import languageAssociationsData from "./vscode-icons-language-associations.json"; - -const VSCODE_ICONS_VERSION = "v12.17.0"; -const VSCODE_ICONS_BASE_URL = `https://cdn.jsdelivr.net/gh/vscode-icons/vscode-icons@${VSCODE_ICONS_VERSION}/icons`; - -interface IconDefinition { - iconPath: string; -} - -interface IconLookupSection { - file?: string; - folder?: string; - fileNames: Record; - fileExtensions: Record; - folderNames: Record; - languageIds?: Record; -} - -interface VscodeIconsManifest extends IconLookupSection { - iconDefinitions: Record; - light: IconLookupSection; -} - -interface LanguageAssociations { - version: string; - extensionToLanguageId: Record; - fileNameToLanguageId: Record; -} - -const manifest = vscodeIconsManifest as VscodeIconsManifest; -const languageAssociations = languageAssociationsData as LanguageAssociations; -const iconDefinitions = manifest.iconDefinitions; - -const darkFileNames = toLowercaseLookup(manifest.fileNames); -const lightFileNames = toLowercaseLookup(manifest.light.fileNames); -const darkFileExtensions = toLowercaseLookup(manifest.fileExtensions); -const lightFileExtensions = toLowercaseLookup(manifest.light.fileExtensions); -const darkFolderNames = toLowercaseLookup(manifest.folderNames); -const lightFolderNames = toLowercaseLookup(manifest.light.folderNames); -const darkLanguageIds = toLowercaseLookup(manifest.languageIds ?? {}); -const lightLanguageIds = toLowercaseLookup(manifest.light.languageIds ?? {}); -const languageIdByExtension = toLowercaseLookup(languageAssociations.extensionToLanguageId); -const languageIdByFileName = toLowercaseLookup(languageAssociations.fileNameToLanguageId); -const localLanguageIdByExtensionOverrides = { - // Cursor rules files (*.mdc) are commonly treated as markdown in VSCode/Cursor. - mdc: "markdown", - // Upstream languages.ts currently maps .html to django-html before html. - // Prefer the base HTML icon for standalone HTML files. - html: "html", - // Upstream languages.ts maps yml/yaml to specialized language ids that can produce - // non-generic YAML icons (for example cloudfoundry/esphome). Prefer the base YAML icon - // unless a more specific basename/extension match (e.g. azure-pipelines.yml) is found. - yml: "yaml", - yaml: "yaml", -} as const; - -const defaultDarkFileIconDefinition = manifest.file ?? "_file"; -const defaultLightFileIconDefinition = manifest.light.file ?? defaultDarkFileIconDefinition; -const defaultDarkFolderIconDefinition = manifest.folder ?? "_folder"; -const defaultLightFolderIconDefinition = manifest.light.folder ?? defaultDarkFolderIconDefinition; - -function toLowercaseLookup(source: Record): Record { - const entries = Object.entries(source); - const lookup: Record = {}; - for (const [key, value] of entries) { - lookup[key.toLowerCase()] = value; - } - return lookup; -} - -const extensionByLanguageId: Record = {}; -for (const [extension, languageId] of Object.entries(languageAssociations.extensionToLanguageId)) { - const key = languageId.toLowerCase(); - if (!(key in extensionByLanguageId)) { - extensionByLanguageId[key] = extension.toLowerCase(); - } -} - -/** - * Synthesizes a file name whose icon resolution best represents a markdown - * fence language id — handles both extension-style ids ("ts", "py") and - * language ids ("typescript", "python", "shellscript"). - */ -export function syntheticFileNameForLanguageId(languageId: string): string { - const normalized = languageId.toLowerCase(); - return `file.${extensionByLanguageId[normalized] ?? normalized}`; -} - -export function basenameOfPath(pathValue: string): string { - const slashIndex = pathValue.lastIndexOf("/"); - if (slashIndex === -1) return pathValue; - return pathValue.slice(slashIndex + 1); -} - -export function inferEntryKindFromPath(pathValue: string): "file" | "directory" { - const base = basenameOfPath(pathValue); - if (base.startsWith(".") && !base.slice(1).includes(".")) { - return "directory"; - } - if (base.includes(".")) { - return "file"; - } - return "directory"; -} - -function extensionCandidates(fileName: string): string[] { - const candidates = new Set(); - if (fileName.includes(".")) { - candidates.add(fileName); - } - let dotIndex = fileName.indexOf("."); - while (dotIndex !== -1 && dotIndex < fileName.length - 1) { - const candidate = fileName.slice(dotIndex + 1); - if (candidate.length > 0) { - candidates.add(candidate); - } - dotIndex = fileName.indexOf(".", dotIndex + 1); - } - return [...candidates]; -} - -function resolveLanguageFallbackDefinition( - pathValue: string, - theme: "light" | "dark", -): string | null { - const basename = basenameOfPath(pathValue).toLowerCase(); - const languageIds = theme === "light" ? lightLanguageIds : darkLanguageIds; - - const fromBasenameLanguage = languageIdByFileName[basename]; - if (fromBasenameLanguage) { - return languageIds[fromBasenameLanguage] ?? darkLanguageIds[fromBasenameLanguage] ?? null; - } - - for (const candidate of extensionCandidates(basename)) { - const languageId = - localLanguageIdByExtensionOverrides[ - candidate as keyof typeof localLanguageIdByExtensionOverrides - ] ?? languageIdByExtension[candidate]; - if (!languageId) continue; - return languageIds[languageId] ?? darkLanguageIds[languageId] ?? null; - } - - return null; -} - -function iconFilenameForDefinitionKey(definitionKey: string | undefined): string | null { - if (!definitionKey) return null; - const iconPath = iconDefinitions[definitionKey]?.iconPath; - if (!iconPath) return null; - const slashIndex = iconPath.lastIndexOf("/"); - if (slashIndex === -1) { - return iconPath; - } - return iconPath.slice(slashIndex + 1); -} - -function resolveFileDefinition(pathValue: string, theme: "light" | "dark"): string { - const basename = basenameOfPath(pathValue).toLowerCase(); - const fileNames = theme === "light" ? lightFileNames : darkFileNames; - const fileExtensions = theme === "light" ? lightFileExtensions : darkFileExtensions; - - const fromFileName = fileNames[basename] ?? darkFileNames[basename]; - if (fromFileName) return fromFileName; - - for (const candidate of extensionCandidates(basename)) { - const fromExtension = fileExtensions[candidate] ?? darkFileExtensions[candidate]; - if (fromExtension) return fromExtension; - } - - const fromLanguage = resolveLanguageFallbackDefinition(pathValue, theme); - if (fromLanguage) return fromLanguage; - - return theme === "light" ? defaultLightFileIconDefinition : defaultDarkFileIconDefinition; -} - -function resolveFolderDefinition(pathValue: string, theme: "light" | "dark"): string { - const basename = basenameOfPath(pathValue).toLowerCase(); - const folderNames = theme === "light" ? lightFolderNames : darkFolderNames; - return ( - folderNames[basename] ?? - darkFolderNames[basename] ?? - (theme === "light" ? defaultLightFolderIconDefinition : defaultDarkFolderIconDefinition) - ); -} - -/** True when the file name resolves to a real icon rather than the generic default. */ -export function hasSpecificVscodeIconForFileName( - fileName: string, - theme: "light" | "dark", -): boolean { - const definition = resolveFileDefinition(fileName, theme); - return ( - definition !== defaultDarkFileIconDefinition && definition !== defaultLightFileIconDefinition - ); -} - -export function getVscodeIconUrlForEntry( - pathValue: string, - kind: "file" | "directory", - theme: "light" | "dark", -): string { - const definitionKey = - kind === "directory" - ? resolveFolderDefinition(pathValue, theme) - : resolveFileDefinition(pathValue, theme); - const iconFilename = - iconFilenameForDefinitionKey(definitionKey) ?? - (kind === "directory" ? "default_folder.svg" : "default_file.svg"); - return `${VSCODE_ICONS_BASE_URL}/${iconFilename}`; -} diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index cc15820edf..bfa0f8e461 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -19,6 +19,9 @@ const configuredWsUrl = process.env.VITE_WS_URL?.trim(); const configuredRelayUrl = repoEnv.VITE_T3CODE_RELAY_URL?.trim() || ""; const configuredClerkPublishableKey = repoEnv.VITE_CLERK_PUBLISHABLE_KEY?.trim() || ""; const configuredClerkJwtTemplate = repoEnv.VITE_CLERK_JWT_TEMPLATE?.trim() || ""; +const configuredRelayTracingUrl = repoEnv.VITE_RELAY_OTLP_TRACES_URL?.trim() || ""; +const configuredRelayTracingDataset = repoEnv.VITE_RELAY_OTLP_TRACES_DATASET?.trim() || ""; +const configuredRelayTracingToken = repoEnv.VITE_RELAY_OTLP_TRACES_TOKEN?.trim() || ""; const configuredHostedAppChannel = process.env.VITE_HOSTED_APP_CHANNEL?.trim() || ""; const configuredAppVersion = process.env.APP_VERSION?.trim() || pkg.version; const configuredHostedAppUrl = (() => { @@ -121,6 +124,7 @@ export default defineConfig(() => { optimizeDeps: { include: [ "@pierre/diffs", + "@pierre/diffs/editor", "@pierre/diffs/react", "@pierre/diffs/worker/worker.js", "effect/Array", @@ -134,6 +138,11 @@ export default defineConfig(() => { "import.meta.env.VITE_T3CODE_RELAY_URL": JSON.stringify(configuredRelayUrl), "import.meta.env.VITE_CLERK_PUBLISHABLE_KEY": JSON.stringify(configuredClerkPublishableKey), "import.meta.env.VITE_CLERK_JWT_TEMPLATE": JSON.stringify(configuredClerkJwtTemplate), + "import.meta.env.VITE_RELAY_OTLP_TRACES_URL": JSON.stringify(configuredRelayTracingUrl), + "import.meta.env.VITE_RELAY_OTLP_TRACES_DATASET": JSON.stringify( + configuredRelayTracingDataset, + ), + "import.meta.env.VITE_RELAY_OTLP_TRACES_TOKEN": JSON.stringify(configuredRelayTracingToken), "import.meta.env.VITE_HOSTED_APP_URL": JSON.stringify(configuredHostedAppUrl ?? ""), "import.meta.env.VITE_HOSTED_APP_CHANNEL": JSON.stringify(configuredHostedAppChannel), "import.meta.env.APP_VERSION": JSON.stringify(configuredAppVersion), diff --git a/infra/relay/alchemy.run.ts b/infra/relay/alchemy.run.ts index 5dbdea8dfd..b9e35fd132 100644 --- a/infra/relay/alchemy.run.ts +++ b/infra/relay/alchemy.run.ts @@ -42,6 +42,9 @@ export default Alchemy.Stack( mobileTracingUrl: observability.traces.otelTracesEndpoint, mobileTracingDataset: observability.traces.name, mobileTracingToken: observability.mobileIngestToken.token, + clientTracingUrl: observability.traces.otelTracesEndpoint, + clientTracingDataset: observability.traces.name, + clientTracingToken: observability.clientIngestToken.token, }; }), ); diff --git a/infra/relay/package.json b/infra/relay/package.json index 4fa7686e76..213c1fe5cc 100644 --- a/infra/relay/package.json +++ b/infra/relay/package.json @@ -9,7 +9,7 @@ "typecheck": "tsgo --noEmit" }, "dependencies": { - "@clerk/backend": "3.4.14", + "@clerk/backend": "3.6.1", "@effect/sql-pg": "catalog:", "@t3tools/client-runtime": "workspace:*", "@t3tools/contracts": "workspace:*", diff --git a/infra/relay/scripts/deploy.test.ts b/infra/relay/scripts/deploy.test.ts index 08f6bb55cb..992cb2d887 100644 --- a/infra/relay/scripts/deploy.test.ts +++ b/infra/relay/scripts/deploy.test.ts @@ -1,10 +1,16 @@ -import { describe, expect, it } from "vite-plus/test"; +import * as NodeServices from "@effect/platform-node/NodeServices"; +import { describe, expect, it } from "@effect/vitest"; +import * as Effect from "effect/Effect"; +import * as FileSystem from "effect/FileSystem"; +import * as Path from "effect/Path"; import { hasDeployChanges, + publicConfigFromOutput, reconcileRootEnvPublicConfig, reconcileRootEnvRelayUrl, serializeGithubOutput, + serializeRelayClientTracingEnvironment, } from "./deploy.ts"; describe("hasDeployChanges", () => { @@ -62,6 +68,9 @@ describe("reconcileRootEnvPublicConfig", () => { mobileTracingUrl: "https://api.axiom.co/v1/traces", mobileTracingDataset: "t3-code-mobile-traces-dev", mobileTracingToken: "xaat-public-ingest", + clientTracingUrl: "https://api.axiom.co/v1/traces", + clientTracingDataset: "t3-code-relay-client-traces-dev", + clientTracingToken: "xaat-relay-client-ingest", } as const; it("adds the complete local client config", () => { @@ -71,6 +80,9 @@ describe("reconcileRootEnvPublicConfig", () => { "T3CODE_MOBILE_OTLP_TRACES_URL=https://api.axiom.co/v1/traces", "T3CODE_MOBILE_OTLP_TRACES_DATASET=t3-code-mobile-traces-dev", "T3CODE_MOBILE_OTLP_TRACES_TOKEN=xaat-public-ingest", + "T3CODE_RELAY_CLIENT_OTLP_TRACES_URL=https://api.axiom.co/v1/traces", + "T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET=t3-code-relay-client-traces-dev", + "T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=xaat-relay-client-ingest", "", ].join("\n"), ); @@ -85,6 +97,9 @@ describe("reconcileRootEnvPublicConfig", () => { "T3CODE_MOBILE_OTLP_TRACES_URL=https://old.example.test/v1/traces", "T3CODE_MOBILE_OTLP_TRACES_DATASET=old-dataset", "T3CODE_MOBILE_OTLP_TRACES_TOKEN=old-token", + "T3CODE_RELAY_CLIENT_OTLP_TRACES_URL=https://old.example.test/v1/traces", + "T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET=old-client-dataset", + "T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=old-client-token", "", ].join("\n"), config, @@ -96,6 +111,9 @@ describe("reconcileRootEnvPublicConfig", () => { "T3CODE_MOBILE_OTLP_TRACES_URL=https://api.axiom.co/v1/traces", "T3CODE_MOBILE_OTLP_TRACES_DATASET=t3-code-mobile-traces-dev", "T3CODE_MOBILE_OTLP_TRACES_TOKEN=xaat-public-ingest", + "T3CODE_RELAY_CLIENT_OTLP_TRACES_URL=https://api.axiom.co/v1/traces", + "T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET=t3-code-relay-client-traces-dev", + "T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=xaat-relay-client-ingest", "", ].join("\n"), ); @@ -113,3 +131,73 @@ describe("serializeGithubOutput", () => { ).toBe("changed=false\nresult=noop\nrelay_url=https://relay.example.test\n"); }); }); + +describe("serializeRelayClientTracingEnvironment", () => { + it("serializes tracing config for downstream GITHUB_ENV loading", () => { + expect( + serializeRelayClientTracingEnvironment({ + relayUrl: "https://relay.example.test", + mobileTracingUrl: "https://api.axiom.co/v1/traces", + mobileTracingDataset: "mobile", + mobileTracingToken: "mobile-token", + clientTracingUrl: "https://api.axiom.co/v1/traces", + clientTracingDataset: "relay", + clientTracingToken: "client-token", + }), + ).toBe( + [ + "T3CODE_RELAY_CLIENT_OTLP_TRACES_URL=https://api.axiom.co/v1/traces", + "T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET=relay", + "T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=client-token", + "", + ].join("\n"), + ); + }); +}); + +describe("release workflow tracing config propagation", () => { + it.effect("uses an artifact instead of a masked cross-job token output", () => + Effect.gen(function* () { + const fileSystem = yield* FileSystem.FileSystem; + const path = yield* Path.Path; + const workflowPath = yield* path.fromFileUrl( + new URL("../../../.github/workflows/release.yml", import.meta.url), + ); + const workflow = yield* fileSystem.readFileString(workflowPath); + + expect(workflow).not.toContain("client_tracing_token:"); + expect(workflow).not.toContain("needs.relay_public_config.outputs.client_tracing_token"); + expect(workflow).toContain('--github-env-file "$RUNNER_TEMP/relay-client-tracing.env"'); + expect(workflow).toContain("name: relay-client-tracing-config"); + expect(workflow).toContain('cat "$config_path" >> "$GITHUB_ENV"'); + }).pipe(Effect.provide(NodeServices.layer)), + ); +}); + +describe("publicConfigFromOutput", () => { + it("reads the complete public tracing config from persisted Alchemy output", () => { + expect( + publicConfigFromOutput({ + url: "https://relay.example.test", + mobileTracingUrl: "https://api.axiom.co/v1/traces", + mobileTracingDataset: "mobile", + mobileTracingToken: "mobile-token", + clientTracingUrl: "https://api.axiom.co/v1/traces", + clientTracingDataset: "relay", + clientTracingToken: "client-token", + }), + ).toEqual({ + relayUrl: "https://relay.example.test", + mobileTracingUrl: "https://api.axiom.co/v1/traces", + mobileTracingDataset: "mobile", + mobileTracingToken: "mobile-token", + clientTracingUrl: "https://api.axiom.co/v1/traces", + clientTracingDataset: "relay", + clientTracingToken: "client-token", + }); + }); + + it("rejects incomplete stack output", () => { + expect(publicConfigFromOutput({ url: "https://relay.example.test" })).toBeNull(); + }); +}); diff --git a/infra/relay/scripts/deploy.ts b/infra/relay/scripts/deploy.ts index e4ed492dbb..2ef82ec4ff 100644 --- a/infra/relay/scripts/deploy.ts +++ b/infra/relay/scripts/deploy.ts @@ -8,10 +8,12 @@ import { provideFreshArtifactStore } from "alchemy/Artifacts"; import { AuthProviders } from "alchemy/Auth/AuthProvider"; import { CredentialsStoreLive } from "alchemy/Auth/Credentials"; import { ProfileLive } from "alchemy/Auth/Profile"; +import * as Cloudflare from "alchemy/Cloudflare"; import { Cli } from "alchemy/Cli/Cli"; import { LoggingCli } from "alchemy/Cli/LoggingCli"; import * as Plan from "alchemy/Plan"; import * as Stage from "alchemy/Stage"; +import * as State from "alchemy/State/State"; import { TelemetryLive } from "alchemy/Telemetry/Layer"; import { PlatformServices } from "alchemy/Util/PlatformServices"; import * as Config from "effect/Config"; @@ -41,6 +43,8 @@ export interface RelayDeployOptions { readonly yes: boolean; readonly adopt: boolean; readonly githubOutput: boolean; + readonly githubEnvFile: Option.Option; + readonly readState: boolean; } export interface RelayPublicConfig { @@ -48,6 +52,9 @@ export interface RelayPublicConfig { readonly mobileTracingUrl: string; readonly mobileTracingDataset: string; readonly mobileTracingToken: string; + readonly clientTracingUrl: string; + readonly clientTracingDataset: string; + readonly clientTracingToken: string; } const publicConfigEnvEntries = (config: RelayPublicConfig) => @@ -56,6 +63,9 @@ const publicConfigEnvEntries = (config: RelayPublicConfig) => T3CODE_MOBILE_OTLP_TRACES_URL: config.mobileTracingUrl, T3CODE_MOBILE_OTLP_TRACES_DATASET: config.mobileTracingDataset, T3CODE_MOBILE_OTLP_TRACES_TOKEN: config.mobileTracingToken, + T3CODE_RELAY_CLIENT_OTLP_TRACES_URL: config.clientTracingUrl, + T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET: config.clientTracingDataset, + T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN: config.clientTracingToken, }) as const; export function reconcileRootEnvPublicConfig(contents: string, config: RelayPublicConfig): string { @@ -82,9 +92,13 @@ export function reconcileRootEnvRelayUrl(contents: string, relayUrl: string): st mobileTracingUrl: "", mobileTracingDataset: "", mobileTracingToken: "", + clientTracingUrl: "", + clientTracingDataset: "", + clientTracingToken: "", }) .split("\n") .filter((line) => !line.startsWith("T3CODE_MOBILE_OTLP_TRACES_")) + .filter((line) => !line.startsWith("T3CODE_RELAY_CLIENT_OTLP_TRACES_")) .join("\n"); } @@ -98,7 +112,7 @@ export function hasDeployChanges(plan: Plan.Plan): boolean { ); } -export type RelayDeployResult = "applied" | "noop" | "dry-run" | "cancelled"; +export type RelayDeployResult = "applied" | "noop" | "dry-run" | "cancelled" | "state"; export interface RelayDeployOutcome { readonly result: RelayDeployResult; @@ -112,6 +126,14 @@ export function serializeGithubOutput(entries: Readonly path.fromFileUrl(new URL("..", import.meta.url))), ); @@ -151,7 +173,7 @@ const reconcileRootEnv = Effect.fn("relay.deploy.reconcileRootEnv")(function* ( const contents = (yield* fs.exists(rootEnvPath)) ? yield* fs.readFileString(rootEnvPath) : ""; yield* fs.writeFileString(rootEnvPath, reconcileRootEnvPublicConfig(contents, config)); - yield* Console.log(`Updated ${rootEnvPath} with relay URL and mobile tracing configuration`); + yield* Console.log(`Updated ${rootEnvPath} with relay public client configuration`); }); const writeGithubOutput = Effect.fn("relay.deploy.writeGithubOutput")(function* ( @@ -165,14 +187,34 @@ const writeGithubOutput = Effect.fn("relay.deploy.writeGithubOutput")(function* changed: outcome.changed, result: outcome.result, ...(Option.isSome(outcome.publicConfig) - ? { relay_url: outcome.publicConfig.value.relayUrl } + ? { + relay_url: outcome.publicConfig.value.relayUrl, + } : {}), }), { flag: "a" }, ); }); -const deployServices = Layer.mergeAll( +const writeGithubEnvFile = Effect.fn("relay.deploy.writeGithubEnvFile")(function* ( + outcome: RelayDeployOutcome, + outputPath: string, +) { + if (Option.isNone(outcome.publicConfig)) { + return yield* new RelayDeployError({ + message: "Relay public client config is unavailable for the GitHub environment file", + }); + } + const fs = yield* FileSystem.FileSystem; + yield* Console.log(`::add-mask::${outcome.publicConfig.value.clientTracingToken}`); + yield* fs.writeFileString( + outputPath, + serializeRelayClientTracingEnvironment(outcome.publicConfig.value), + ); +}); + +const deployBaseServices = Layer.mergeAll( + Layer.succeed(AuthProviders, {}), Layer.provideMerge(AlchemyContextLive, PlatformServices), Layer.provide(ProfileLive, PlatformServices), Layer.provide(CredentialsStoreLive, PlatformServices), @@ -180,6 +222,64 @@ const deployServices = Layer.mergeAll( TelemetryLive, LoggingCli, ); +const deployServices = deployBaseServices; + +export function publicConfigFromOutput(output: unknown): RelayPublicConfig | null { + if (typeof output !== "object" || output === null) { + return null; + } + const value = output as Record; + const text = (name: string) => (typeof value[name] === "string" ? value[name] : undefined); + const secret = (name: string): string | undefined => { + const candidate = value[name]; + if (!Redacted.isRedacted(candidate)) { + return text(name); + } + const redacted = Redacted.value(candidate); + return typeof redacted === "string" ? redacted : undefined; + }; + const relayUrl = text("url"); + const mobileTracingUrl = text("mobileTracingUrl"); + const mobileTracingDataset = text("mobileTracingDataset"); + const mobileTracingToken = secret("mobileTracingToken"); + const clientTracingUrl = text("clientTracingUrl"); + const clientTracingDataset = text("clientTracingDataset"); + const clientTracingToken = secret("clientTracingToken"); + return relayUrl && + mobileTracingUrl && + mobileTracingDataset && + mobileTracingToken && + clientTracingUrl && + clientTracingDataset && + clientTracingToken + ? { + relayUrl, + mobileTracingUrl, + mobileTracingDataset, + mobileTracingToken, + clientTracingUrl, + clientTracingDataset, + clientTracingToken, + } + : null; +} + +const readRelayPublicConfig = Effect.fn("relay.deploy.readState")(function* (stage: string) { + const state = yield* State.State; + const service = yield* state; + const output = yield* service.getOutput({ stack: "T3CodeRelay", stage }); + const publicConfig = publicConfigFromOutput(output); + if (publicConfig === null) { + return yield* new RelayDeployError({ + message: `Alchemy relay state for stage ${stage} did not include complete public client config`, + }); + } + return { + result: "state", + changed: false, + publicConfig: Option.some(publicConfig), + } satisfies RelayDeployOutcome; +}); const runRelayDeploy = Effect.fn("relay.deploy.run")( function* ( @@ -188,7 +288,6 @@ const runRelayDeploy = Effect.fn("relay.deploy.run")( _stage: string, ) { const stack = yield* RelayStack; - const cli = yield* Cli; const plan = yield* Plan.make(stack, { force: options.force }).pipe( Effect.provide(stack.services), @@ -223,7 +322,10 @@ const runRelayDeploy = Effect.fn("relay.deploy.run")( output.url === undefined || output.mobileTracingUrl === undefined || output.mobileTracingDataset === undefined || - output.mobileTracingToken === undefined + output.mobileTracingToken === undefined || + output.clientTracingUrl === undefined || + output.clientTracingDataset === undefined || + output.clientTracingToken === undefined ) { return yield* new RelayDeployError({ message: "Alchemy relay deploy output did not include complete public client config", @@ -237,6 +339,9 @@ const runRelayDeploy = Effect.fn("relay.deploy.run")( mobileTracingUrl: output.mobileTracingUrl, mobileTracingDataset: output.mobileTracingDataset, mobileTracingToken: Redacted.value(output.mobileTracingToken), + clientTracingUrl: output.clientTracingUrl, + clientTracingDataset: output.clientTracingDataset, + clientTracingToken: Redacted.value(output.clientTracingToken), }), } satisfies RelayDeployOutcome; }, @@ -264,13 +369,18 @@ export const deploy = Effect.fn("relay.deploy")(function* (options: RelayDeployO Effect.provide(ConfigProvider.layer(configProvider)), ); const stage = Option.getOrElse(options.stage, () => configuredStage); - const outcome = yield* runRelayDeploy(options, configProvider, stage); + const outcome = options.readState + ? yield* readRelayPublicConfig(stage).pipe(Effect.provide(Cloudflare.state())) + : yield* runRelayDeploy(options, configProvider, stage); if (Option.isSome(outcome.publicConfig)) { yield* reconcileRootEnv(outcome.publicConfig.value); } if (options.githubOutput) { yield* writeGithubOutput(outcome); } + if (Option.isSome(options.githubEnvFile)) { + yield* writeGithubEnvFile(outcome, options.githubEnvFile.value); + } }); export const relayDeployCommand = Command.make( @@ -306,6 +416,16 @@ export const relayDeployCommand = Command.make( Flag.withDescription("Append relay deployment metadata to GITHUB_OUTPUT."), Flag.withDefault(false), ), + githubEnvFile: Flag.string("github-env-file").pipe( + Flag.withDescription( + "Write relay client tracing variables to a file suitable for GITHUB_ENV.", + ), + Flag.optional, + ), + readState: Flag.boolean("read-state").pipe( + Flag.withDescription("Read the deployed stack output without planning or applying changes."), + Flag.withDefault(false), + ), }, deploy, ).pipe(Command.withDescription("Deploy the T3 Code relay through Alchemy.")); diff --git a/infra/relay/src/observability.ts b/infra/relay/src/observability.ts index 0f831586ec..e0a79599cf 100644 --- a/infra/relay/src/observability.ts +++ b/infra/relay/src/observability.ts @@ -50,6 +50,14 @@ export const RelayObservability = Effect.gen(function* () { })), }); + const clientIngestToken = yield* Axiom.ApiToken("RelayClientAxiomIngestToken", { + name: relayResourceNameForStage("t3-code-relay-client-otel-ingest", stage), + description: "Owned by Alchemy. Scoped OTLP ingest token for first-party relay client spans.", + datasetCapabilities: Output.map(traces.name, (dataset) => ({ + [dataset]: { ingest: ["create" as const] }, + })), + }); + yield* Axiom.View("RelayRecentSpansView", { name: relayResourceNameForStage("t3-code-relay-recent-spans", stage), description: "Recent relay HTTP request spans.", @@ -57,7 +65,7 @@ export const RelayObservability = Effect.gen(function* () { aplQuery: Output.map(traces.name, relayRecentSpansQuery), }); - return { traces, workerIngestToken, mobileIngestToken } as const; + return { traces, workerIngestToken, mobileIngestToken, clientIngestToken } as const; }); export const withSpanAttributes = diff --git a/package.json b/package.json index ec11096b45..f97275e60b 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,6 @@ "dist:desktop:win:x64": "node scripts/build-desktop-artifact.ts --platform win --target nsis --arch x64", "release:smoke": "node scripts/release-smoke.ts", "clean": "rm -rf node_modules apps/*/node_modules packages/*/node_modules apps/*/dist apps/*/dist-electron packages/*/dist .vite-plus apps/*/.vite-plus packages/*/.vite-plus", - "sync:vscode-icons": "node scripts/sync-vscode-icons.mjs", "sync:repos": "node scripts/sync-reference-repos.ts" }, "devDependencies": { diff --git a/packages/client-runtime/src/composerPathSearchState.ts b/packages/client-runtime/src/composerPathSearchState.ts index e8652ce561..693d60cb46 100644 --- a/packages/client-runtime/src/composerPathSearchState.ts +++ b/packages/client-runtime/src/composerPathSearchState.ts @@ -8,7 +8,6 @@ import { Atom, type AtomRegistry } from "effect/unstable/reactivity"; export interface ComposerPathSearchEntry { readonly path: string; readonly kind: "file" | "directory"; - readonly parentPath?: string; } export interface ComposerPathSearchState { @@ -84,11 +83,7 @@ export function getComposerPathSearchTargetKey(target: ComposerPathSearchTarget) function toSearchEntries( entries: ProjectSearchEntriesResult["entries"], ): ReadonlyArray { - return entries.map((entry) => ({ - path: entry.path, - kind: entry.kind === "directory" ? "directory" : "file", - ...(entry.parentPath !== undefined ? { parentPath: entry.parentPath } : {}), - })); + return entries; } export function createComposerPathSearchManager(config: { diff --git a/packages/client-runtime/src/managedRelay.ts b/packages/client-runtime/src/managedRelay.ts index a3bc973c64..f4b9b1f935 100644 --- a/packages/client-runtime/src/managedRelay.ts +++ b/packages/client-runtime/src/managedRelay.ts @@ -26,6 +26,7 @@ import { RelayUnregisterDeviceEndpoint, } from "@t3tools/contracts/relay"; import { encodeOAuthScope, oauthScopeSetEquals } from "@t3tools/shared/oauthScope"; +import { withRelayClientTracing } from "@t3tools/shared/relayTracing"; import { normalizeSecureRelayUrl } from "@t3tools/shared/relayUrl"; import * as Clock from "effect/Clock"; import * as Context from "effect/Context"; @@ -357,6 +358,7 @@ export function managedRelayClientLayer(options: ManagedRelayClientLayerOptions) relayClientError("Could not list relay-managed environments.", cause), ), timeoutRelayRequest("Relay environment listing timed out."), + withRelayClientTracing, ), listDevices: (input) => client.client @@ -369,6 +371,7 @@ export function managedRelayClientLayer(options: ManagedRelayClientLayerOptions) relayClientError("Could not list relay client devices.", cause), ), timeoutRelayRequest("Relay client device listing timed out."), + withRelayClientTracing, ), createEnvironmentLinkChallenge: (input) => client.client @@ -381,6 +384,7 @@ export function managedRelayClientLayer(options: ManagedRelayClientLayerOptions) relayClientError("Could not create relay environment link challenge.", cause), ), timeoutRelayRequest("Relay environment link challenge timed out."), + withRelayClientTracing, ), linkEnvironment: (input) => client.client @@ -393,6 +397,7 @@ export function managedRelayClientLayer(options: ManagedRelayClientLayerOptions) relayClientError("Could not link relay environment.", cause), ), timeoutRelayRequest("Relay environment linking timed out."), + withRelayClientTracing, ), unlinkEnvironment: (input) => client.client @@ -405,6 +410,7 @@ export function managedRelayClientLayer(options: ManagedRelayClientLayerOptions) relayClientError("Could not unlink relay environment.", cause), ), timeoutRelayRequest("Relay environment unlinking timed out."), + withRelayClientTracing, ), getEnvironmentStatus: (input) => Effect.gen(function* () { @@ -424,7 +430,7 @@ export function managedRelayClientLayer(options: ManagedRelayClientLayerOptions) ), timeoutRelayRequest("Relay environment status request timed out."), ); - }), + }).pipe(withRelayClientTracing), connectEnvironment: (input) => Effect.gen(function* () { const authorization = yield* authorize({ @@ -448,7 +454,7 @@ export function managedRelayClientLayer(options: ManagedRelayClientLayerOptions) ), timeoutRelayRequest("Relay environment connection timed out."), ); - }), + }).pipe(withRelayClientTracing), registerDevice: (input) => Effect.gen(function* () { const authorization = yield* authorizeMobileRegistration({ @@ -466,7 +472,7 @@ export function managedRelayClientLayer(options: ManagedRelayClientLayerOptions) ), timeoutRelayRequest("Relay mobile device registration timed out."), ); - }), + }).pipe(withRelayClientTracing), unregisterDevice: (input) => Effect.gen(function* () { const authorization = yield* authorizeMobileRegistration({ @@ -484,7 +490,7 @@ export function managedRelayClientLayer(options: ManagedRelayClientLayerOptions) ), timeoutRelayRequest("Relay mobile device unregistration timed out."), ); - }), + }).pipe(withRelayClientTracing), registerLiveActivity: (input) => Effect.gen(function* () { const authorization = yield* authorizeMobileRegistration({ @@ -502,7 +508,7 @@ export function managedRelayClientLayer(options: ManagedRelayClientLayerOptions) ), timeoutRelayRequest("Relay Live Activity registration timed out."), ); - }), + }).pipe(withRelayClientTracing), resetTokenCache: SynchronizedRef.set(cachedTokens, []), }); }), diff --git a/packages/client-runtime/src/wsRpcClient.ts b/packages/client-runtime/src/wsRpcClient.ts index 3e4e9f343c..18a6559f31 100644 --- a/packages/client-runtime/src/wsRpcClient.ts +++ b/packages/client-runtime/src/wsRpcClient.ts @@ -96,6 +96,8 @@ export interface WsRpcClient { readonly subscribePorts: RpcStreamMethod; }; readonly projects: { + readonly listEntries: RpcUnaryMethod; + readonly readFile: RpcUnaryMethod; readonly searchEntries: RpcUnaryMethod; readonly writeFile: RpcUnaryMethod; }; @@ -267,6 +269,10 @@ export function createWsRpcClient( ), }, projects: { + listEntries: (input) => + transport.request((client) => client[WS_METHODS.projectsListEntries](input)), + readFile: (input) => + transport.request((client) => client[WS_METHODS.projectsReadFile](input)), searchEntries: (input) => transport.request((client) => client[WS_METHODS.projectsSearchEntries](input)), writeFile: (input) => diff --git a/packages/contracts/src/ipc.ts b/packages/contracts/src/ipc.ts index 4a4ccfce25..691449744a 100644 --- a/packages/contracts/src/ipc.ts +++ b/packages/contracts/src/ipc.ts @@ -22,6 +22,10 @@ import type { ReviewDiffPreviewInput, ReviewDiffPreviewResult } from "./review.t import type { FilesystemBrowseInput, FilesystemBrowseResult } from "./filesystem.ts"; import type { AssetCreateUrlInput, AssetCreateUrlResult } from "./assets.ts"; import type { + ProjectListEntriesInput, + ProjectListEntriesResult, + ProjectReadFileInput, + ProjectReadFileResult, ProjectSearchEntriesInput, ProjectSearchEntriesResult, ProjectWriteFileInput, @@ -1177,6 +1181,8 @@ export interface EnvironmentApi { ) => () => void; }; projects: { + listEntries: (input: ProjectListEntriesInput) => Promise; + readFile: (input: ProjectReadFileInput) => Promise; searchEntries: (input: ProjectSearchEntriesInput) => Promise; writeFile: (input: ProjectWriteFileInput) => Promise; }; diff --git a/packages/contracts/src/project.ts b/packages/contracts/src/project.ts index d9cb71fca4..2961084528 100644 --- a/packages/contracts/src/project.ts +++ b/packages/contracts/src/project.ts @@ -1,8 +1,9 @@ import * as Schema from "effect/Schema"; -import { PositiveInt, TrimmedNonEmptyString } from "./baseSchemas.ts"; +import { NonNegativeInt, PositiveInt, TrimmedNonEmptyString } from "./baseSchemas.ts"; const PROJECT_SEARCH_ENTRIES_MAX_LIMIT = 200; const PROJECT_WRITE_FILE_PATH_MAX_LENGTH = 512; +const PROJECT_READ_FILE_PATH_MAX_LENGTH = 512; export const ProjectSearchEntriesInput = Schema.Struct({ cwd: TrimmedNonEmptyString, @@ -16,7 +17,6 @@ const ProjectEntryKind = Schema.Literals(["file", "directory"]); export const ProjectEntry = Schema.Struct({ path: TrimmedNonEmptyString, kind: ProjectEntryKind, - parentPath: Schema.optional(TrimmedNonEmptyString), }); export type ProjectEntry = typeof ProjectEntry.Type; @@ -26,6 +26,17 @@ export const ProjectSearchEntriesResult = Schema.Struct({ }); export type ProjectSearchEntriesResult = typeof ProjectSearchEntriesResult.Type; +export const ProjectListEntriesInput = Schema.Struct({ + cwd: TrimmedNonEmptyString, +}); +export type ProjectListEntriesInput = typeof ProjectListEntriesInput.Type; + +export const ProjectListEntriesResult = Schema.Struct({ + entries: Schema.Array(ProjectEntry), + truncated: Schema.Boolean, +}); +export type ProjectListEntriesResult = typeof ProjectListEntriesResult.Type; + export class ProjectSearchEntriesError extends Schema.TaggedErrorClass()( "ProjectSearchEntriesError", { @@ -34,6 +45,36 @@ export class ProjectSearchEntriesError extends Schema.TaggedErrorClass()( + "ProjectListEntriesError", + { + message: TrimmedNonEmptyString, + cause: Schema.optional(Schema.Defect()), + }, +) {} + +export const ProjectReadFileInput = Schema.Struct({ + cwd: TrimmedNonEmptyString, + relativePath: TrimmedNonEmptyString.check(Schema.isMaxLength(PROJECT_READ_FILE_PATH_MAX_LENGTH)), +}); +export type ProjectReadFileInput = typeof ProjectReadFileInput.Type; + +export const ProjectReadFileResult = Schema.Struct({ + relativePath: TrimmedNonEmptyString, + contents: Schema.String, + byteLength: NonNegativeInt, + truncated: Schema.Boolean, +}); +export type ProjectReadFileResult = typeof ProjectReadFileResult.Type; + +export class ProjectReadFileError extends Schema.TaggedErrorClass()( + "ProjectReadFileError", + { + message: TrimmedNonEmptyString, + cause: Schema.optional(Schema.Defect()), + }, +) {} + export const ProjectWriteFileInput = Schema.Struct({ cwd: TrimmedNonEmptyString, relativePath: TrimmedNonEmptyString.check(Schema.isMaxLength(PROJECT_WRITE_FILE_PATH_MAX_LENGTH)), diff --git a/packages/contracts/src/rpc.ts b/packages/contracts/src/rpc.ts index b1dc36651e..87c5a49c73 100644 --- a/packages/contracts/src/rpc.ts +++ b/packages/contracts/src/rpc.ts @@ -65,6 +65,12 @@ import { RelayClientStatusSchema, } from "./relayClient.ts"; import { + ProjectListEntriesError, + ProjectListEntriesInput, + ProjectListEntriesResult, + ProjectReadFileError, + ProjectReadFileInput, + ProjectReadFileResult, ProjectSearchEntriesError, ProjectSearchEntriesInput, ProjectSearchEntriesResult, @@ -141,6 +147,8 @@ export const WS_METHODS = { projectsList: "projects.list", projectsAdd: "projects.add", projectsRemove: "projects.remove", + projectsListEntries: "projects.listEntries", + projectsReadFile: "projects.readFile", projectsSearchEntries: "projects.searchEntries", projectsWriteFile: "projects.writeFile", @@ -350,6 +358,18 @@ export const WsProjectsSearchEntriesRpc = Rpc.make(WS_METHODS.projectsSearchEntr error: Schema.Union([ProjectSearchEntriesError, EnvironmentAuthorizationError]), }); +export const WsProjectsListEntriesRpc = Rpc.make(WS_METHODS.projectsListEntries, { + payload: ProjectListEntriesInput, + success: ProjectListEntriesResult, + error: Schema.Union([ProjectListEntriesError, EnvironmentAuthorizationError]), +}); + +export const WsProjectsReadFileRpc = Rpc.make(WS_METHODS.projectsReadFile, { + payload: ProjectReadFileInput, + success: ProjectReadFileResult, + error: Schema.Union([ProjectReadFileError, EnvironmentAuthorizationError]), +}); + export const WsProjectsWriteFileRpc = Rpc.make(WS_METHODS.projectsWriteFile, { payload: ProjectWriteFileInput, success: ProjectWriteFileResult, @@ -676,6 +696,8 @@ export const WsRpcGroup = RpcGroup.make( WsSourceControlLookupRepositoryRpc, WsSourceControlCloneRepositoryRpc, WsSourceControlPublishRepositoryRpc, + WsProjectsListEntriesRpc, + WsProjectsReadFileRpc, WsProjectsSearchEntriesRpc, WsProjectsWriteFileRpc, WsShellOpenInEditorRpc, diff --git a/packages/shared/package.json b/packages/shared/package.json index ad3db08eb2..8daad0b9b8 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -143,6 +143,10 @@ "types": "./src/composerTrigger.ts", "import": "./src/composerTrigger.ts" }, + "./composerInlineTokens": { + "types": "./src/composerInlineTokens.ts", + "import": "./src/composerInlineTokens.ts" + }, "./terminalLabels": { "types": "./src/terminalLabels.ts", "import": "./src/terminalLabels.ts" @@ -158,6 +162,10 @@ "./hostProcess": { "types": "./src/hostProcess.ts", "import": "./src/hostProcess.ts" + }, + "./relayTracing": { + "types": "./src/relayTracing.ts", + "import": "./src/relayTracing.ts" } }, "scripts": { diff --git a/packages/shared/src/composerInlineTokens.test.ts b/packages/shared/src/composerInlineTokens.test.ts new file mode 100644 index 0000000000..f99d0b6654 --- /dev/null +++ b/packages/shared/src/composerInlineTokens.test.ts @@ -0,0 +1,84 @@ +import { describe, expect, it } from "vite-plus/test"; + +import { collectComposerInlineTokens } from "./composerInlineTokens.ts"; + +describe("collectComposerInlineTokens", () => { + it("collects file links, mentions, and skills with source ranges", () => { + const text = "Use $ui and inspect [Chat.tsx](src/Chat.tsx) with @AGENTS.md please"; + + expect(collectComposerInlineTokens(text)).toEqual([ + { + type: "skill", + value: "ui", + source: "$ui", + start: 4, + end: 7, + }, + { + type: "mention", + value: "src/Chat.tsx", + source: "[Chat.tsx](src/Chat.tsx)", + start: 20, + end: 44, + }, + { + type: "mention", + value: "AGENTS.md", + source: "@AGENTS.md", + start: 50, + end: 60, + }, + ]); + }); + + it("does not convert incomplete trailing tokens", () => { + expect(collectComposerInlineTokens("Use $ui")).toEqual([]); + expect(collectComposerInlineTokens("Inspect @AGENTS.md")).toEqual([]); + }); + + it("keeps the delimiter after a token outside its source range", () => { + const text = "Inspect [package.json](package.json) next"; + + expect(collectComposerInlineTokens(text)).toEqual([ + { + type: "mention", + value: "package.json", + source: "[package.json](package.json)", + start: 8, + end: 36, + }, + ]); + expect(text.slice(36)).toBe(" next"); + }); + + it("preserves a confirmed pill when only its trailing delimiter is removed", () => { + const withDelimiter = "[package.json](package.json) "; + const confirmed = collectComposerInlineTokens(withDelimiter); + + expect( + collectComposerInlineTokens(withDelimiter.trimEnd(), { preserveTrailingFrom: confirmed }), + ).toEqual([ + { + type: "mention", + value: "package.json", + source: "[package.json](package.json)", + start: 0, + end: 28, + }, + ]); + }); + + it("does not preserve a pill after its source is edited", () => { + const confirmed = collectComposerInlineTokens("[package.json](package.json) "); + + expect( + collectComposerInlineTokens("[package.json](package-json)", { + preserveTrailingFrom: confirmed, + }), + ).toEqual([]); + }); + + it("ignores normal web links", () => { + expect(collectComposerInlineTokens("Read [docs](https://example.com) first")).toEqual([]); + }); +}); diff --git a/packages/shared/src/composerInlineTokens.ts b/packages/shared/src/composerInlineTokens.ts new file mode 100644 index 0000000000..aa5e67d6fc --- /dev/null +++ b/packages/shared/src/composerInlineTokens.ts @@ -0,0 +1,118 @@ +export type ComposerInlineToken = + | { + readonly type: "mention"; + readonly value: string; + readonly source: string; + readonly start: number; + readonly end: number; + } + | { + readonly type: "skill"; + readonly value: string; + readonly source: string; + readonly start: number; + readonly end: number; + }; + +export interface CollectComposerInlineTokensOptions { + readonly preserveTrailingFrom?: ReadonlyArray; +} + +const SKILL_TOKEN_REGEX = /(^|\s)\$([a-zA-Z][a-zA-Z0-9:_-]*)(?=\s)/g; +const MENTION_TOKEN_REGEX = /(^|\s)@(?:"((?:\\.|[^"\\])*)"|([^\s@"]+))(?=\s)/g; +const FILE_LINK_TOKEN_REGEX = /(^|\s)\[((?:\\.|[^\]\\])*)\]\(([^)\s]+)\)(?=\s)/g; +const URI_SCHEME_REGEX = /^[A-Za-z][A-Za-z0-9+.-]*:/; +const WINDOWS_DRIVE_PATH_REGEX = /^[A-Za-z]:[\\/]/; + +function collectMentionTokens(text: string): ComposerInlineToken[] { + const matches: ComposerInlineToken[] = []; + + for (const match of text.matchAll(FILE_LINK_TOKEN_REGEX)) { + const fullMatch = match[0]; + const prefix = match[1] ?? ""; + const label = (match[2] ?? "").replace(/\\(.)/g, "$1"); + const encodedPath = match[3] ?? ""; + let path = encodedPath; + try { + path = decodeURIComponent(encodedPath); + } catch { + // Preserve malformed source rather than dropping a user-authored token. + } + const separatorIndex = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\")); + const basename = separatorIndex >= 0 ? path.slice(separatorIndex + 1) : path; + const hasExternalScheme = URI_SCHEME_REGEX.test(path) && !WINDOWS_DRIVE_PATH_REGEX.test(path); + if (!path || hasExternalScheme || label !== basename) { + continue; + } + const start = (match.index ?? 0) + prefix.length; + const end = start + fullMatch.length - prefix.length; + matches.push({ + type: "mention", + value: path, + source: text.slice(start, end), + start, + end, + }); + } + + for (const match of text.matchAll(MENTION_TOKEN_REGEX)) { + const fullMatch = match[0]; + const prefix = match[1] ?? ""; + const quotedPath = match[2]; + const path = quotedPath !== undefined ? quotedPath.replace(/\\(.)/g, "$1") : (match[3] ?? ""); + if (!path) { + continue; + } + const start = (match.index ?? 0) + prefix.length; + const end = start + fullMatch.length - prefix.length; + matches.push({ + type: "mention", + value: path, + source: text.slice(start, end), + start, + end, + }); + } + + return matches; +} + +export function collectComposerInlineTokens( + text: string, + options: CollectComposerInlineTokensOptions = {}, +): ReadonlyArray { + const matches = collectMentionTokens(text); + + for (const match of text.matchAll(SKILL_TOKEN_REGEX)) { + const fullMatch = match[0]; + const prefix = match[1] ?? ""; + const value = match[2] ?? ""; + if (!value) { + continue; + } + const start = (match.index ?? 0) + prefix.length; + const end = start + fullMatch.length - prefix.length; + matches.push({ + type: "skill", + value, + source: text.slice(start, end), + start, + end, + }); + } + + for (const token of options.preserveTrailingFrom ?? []) { + if ( + token.end === text.length && + text.slice(token.start, token.end) === token.source && + !matches.some( + (match) => + match.type === token.type && match.start === token.start && match.end === token.end, + ) + ) { + matches.push(token); + } + } + + return [...matches].sort((left, right) => left.start - right.start); +} diff --git a/packages/shared/src/relayTracing.test.ts b/packages/shared/src/relayTracing.test.ts new file mode 100644 index 0000000000..10f4e1087a --- /dev/null +++ b/packages/shared/src/relayTracing.test.ts @@ -0,0 +1,57 @@ +import { describe, expect, it } from "@effect/vitest"; +import * as Effect from "effect/Effect"; +import * as Option from "effect/Option"; +import * as Tracer from "effect/Tracer"; + +import { RelayClientTracer, withRelayClientTracing } from "./relayTracing.ts"; + +function collectingTracer(spans: Array): Tracer.Tracer { + return Tracer.make({ + span: (options) => { + const span = new Tracer.NativeSpan(options); + const end = span.end.bind(span); + span.end = (endTime, exit) => { + end(endTime, exit); + spans.push(span.name); + }; + return span; + }, + }); +} + +describe("withRelayClientTracing", () => { + it.effect("uses the product tracer only for relay operations", () => + Effect.gen(function* () { + const userSpans: Array = []; + const productSpans: Array = []; + const userTracer = collectingTracer(userSpans); + const productTracer = collectingTracer(productSpans); + + yield* Effect.void.pipe(Effect.withSpan("user.operation"), Effect.withTracer(userTracer)); + yield* Effect.void.pipe( + Effect.withSpan("relay.operation"), + withRelayClientTracing, + Effect.provideService(RelayClientTracer, Option.some(productTracer)), + Effect.withTracer(userTracer), + ); + + expect(userSpans).toEqual(["user.operation"]); + expect(productSpans).toEqual(["relay.operation"]); + }), + ); + + it.effect("preserves the active tracer when product tracing is disabled", () => + Effect.gen(function* () { + const userSpans: Array = []; + const userTracer = collectingTracer(userSpans); + + yield* Effect.void.pipe( + Effect.withSpan("relay.operation"), + withRelayClientTracing, + Effect.withTracer(userTracer), + ); + + expect(userSpans).toEqual(["relay.operation"]); + }), + ); +}); diff --git a/packages/shared/src/relayTracing.ts b/packages/shared/src/relayTracing.ts new file mode 100644 index 0000000000..6005856d9d --- /dev/null +++ b/packages/shared/src/relayTracing.ts @@ -0,0 +1,70 @@ +import * as Context from "effect/Context"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; +import * as Option from "effect/Option"; +import * as Tracer from "effect/Tracer"; +import type { HttpClient } from "effect/unstable/http"; +import { OtlpSerialization, OtlpTracer } from "effect/unstable/observability"; + +export interface RelayClientTracingConfig { + readonly tracesUrl: string; + readonly tracesDataset: string; + readonly tracesToken: string; +} + +export interface RelayClientTracingResource { + readonly serviceName: string; + readonly serviceVersion?: string; + readonly runtime: string; + readonly client: string; + readonly component?: string; +} + +export class RelayClientTracer extends Context.Reference( + "@t3tools/shared/relayTracing/RelayClientTracer", + { + defaultValue: () => Option.none(), + }, +) {} + +export const withRelayClientTracing = ( + effect: Effect.Effect, +): Effect.Effect => + RelayClientTracer.pipe( + Effect.flatMap( + Option.match({ + onNone: () => effect, + onSome: (tracer) => effect.pipe(Effect.provideService(Tracer.Tracer, tracer)), + }), + ), + ); + +export function makeRelayClientTracingLayer( + config: RelayClientTracingConfig | null, + resource: RelayClientTracingResource, +): Layer.Layer { + if (config === null) { + return Layer.succeed(RelayClientTracer, Option.none()); + } + + const tracerLayer = OtlpTracer.layer({ + url: config.tracesUrl, + headers: { + Authorization: `Bearer ${config.tracesToken}`, + "X-Axiom-Dataset": config.tracesDataset, + }, + resource: { + serviceName: resource.serviceName, + serviceVersion: resource.serviceVersion, + attributes: { + "service.runtime": resource.runtime, + "service.component": resource.component ?? "relay-client", + "t3.client.surface": resource.client, + }, + }, + }).pipe(Layer.provide(OtlpSerialization.layerJson)); + + return Layer.effect(RelayClientTracer, Tracer.Tracer.pipe(Effect.map(Option.some))).pipe( + Layer.provide(tracerLayer), + ); +} diff --git a/patches/@ff-labs__fff-node@0.9.4.patch b/patches/@ff-labs__fff-node@0.9.4.patch new file mode 100644 index 0000000000..2d0c16133e --- /dev/null +++ b/patches/@ff-labs__fff-node@0.9.4.patch @@ -0,0 +1,37 @@ +diff --git a/dist/src/binary.js b/dist/src/binary.js +index ee181aef5007e4bf34a49479c089ca30f73a320b..327e2c55c83cc4c50d396a3109190ef10af75ca7 100644 +--- a/dist/src/binary.js ++++ b/dist/src/binary.js +@@ -7,7 +7,7 @@ + */ + import { existsSync, readFileSync } from "node:fs"; + import { createRequire } from "node:module"; +-import { dirname, join } from "node:path"; ++import { dirname, join, sep } from "node:path"; + import { fileURLToPath } from "node:url"; + import { getLibFilename, getNpmPackageName } from "./platform.js"; + /** +@@ -46,6 +46,14 @@ function getPackageDir() { + // Fallback: assume we're one level deep in src/ + return dirname(currentDir); + } ++function resolveUnpackedAsarPath(binaryPath) { ++ const asarSegment = `${sep}app.asar${sep}`; ++ if (!binaryPath.includes(asarSegment)) { ++ return binaryPath; ++ } ++ const unpackedPath = binaryPath.replace(asarSegment, `${sep}app.asar.unpacked${sep}`); ++ return existsSync(unpackedPath) ? unpackedPath : binaryPath; ++} + /** + * Check if the binary exists in any known location + */ +@@ -69,7 +77,7 @@ function resolveFromNpmPackage() { + const packageDir = dirname(packageJsonPath); + const binaryPath = join(packageDir, getLibFilename()); + if (existsSync(binaryPath)) { +- return binaryPath; ++ return resolveUnpackedAsarPath(binaryPath); + } + } + catch { diff --git a/patches/@pierre%2Fdiffs@1.1.20.patch b/patches/@pierre%2Fdiffs@1.3.0-beta.4.patch similarity index 85% rename from patches/@pierre%2Fdiffs@1.1.20.patch rename to patches/@pierre%2Fdiffs@1.3.0-beta.4.patch index 43790874bb..7f2619fee0 100644 --- a/patches/@pierre%2Fdiffs@1.1.20.patch +++ b/patches/@pierre%2Fdiffs@1.3.0-beta.4.patch @@ -1,5 +1,5 @@ diff --git a/package.json b/package.json -index c0e762b13b56247b256520754e439cbc16bb797d..d298b87c175ec891d1b50f681c9031f4b1929e67 100644 +index b18c94f3f7b40bdb15084ab7cabcb19dd29c61f7..ab96ac589d368e806ef45480283d6e0fa199117f 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,18 @@ @@ -20,4 +20,4 @@ index c0e762b13b56247b256520754e439cbc16bb797d..d298b87c175ec891d1b50f681c9031f4 + "import": "./dist/utils/parsePatchFiles.js" } }, - "scripts": { + "publishConfig": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 501422ec25..17d3f4d63e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,8 +19,8 @@ catalogs: specifier: 1.8.0 version: 1.8.0 '@pierre/diffs': - specifier: 1.1.20 - version: 1.1.20 + specifier: 1.3.0-beta.4 + version: 1.3.0-beta.4 '@typescript/native-preview': specifier: 7.0.0-dev.20260604.1 version: 7.0.0-dev.20260604.1 @@ -66,9 +66,12 @@ patchedDependencies: '@expo/metro-config@56.0.13': hash: 8cb08b5bb7051ed9d2dbe46a2c293c5a1e17f1bd6ddf30de27909e18c921ff46 path: patches/@expo%2Fmetro-config@56.0.13.patch - '@pierre/diffs@1.1.20': - hash: e4e35ba95100de3708f900e0d9ea62bca732b1e4486024b5055f48cd128dd9e0 - path: patches/@pierre%2Fdiffs@1.1.20.patch + '@ff-labs/fff-node@0.9.4': + hash: 2b16019ce7ab61aec6478dd02f79ef468cc1d5c51e9d00764f7d2ab8167210c8 + path: patches/@ff-labs__fff-node@0.9.4.patch + '@pierre/diffs@1.3.0-beta.4': + hash: f5d41705ce94bbafc731d92e9cb1671db710df046dd135cb894e3e3e9164a75b + path: patches/@pierre%2Fdiffs@1.3.0-beta.4.patch effect@4.0.0-beta.78: hash: 883249d8efbb462e928e21fefef96027b66aec50751178cafdce45f08eee3754 path: patches/effect@4.0.0-beta.78.patch @@ -176,8 +179,8 @@ importers: specifier: ^0.7.1 version: 0.7.1(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3) '@clerk/expo': - specifier: ^3.3.0 - version: 3.3.1(expo-auth-session@56.0.13(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3))(expo-constants@56.0.16)(expo-crypto@56.0.4(expo@56.0.8))(expo-secure-store@56.0.4(expo@56.0.8))(expo-web-browser@56.0.5(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6)))(expo@56.0.8)(react-dom@19.2.3(react@19.2.3))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3) + specifier: ^3.4.1 + version: 3.4.1(expo-auth-session@56.0.13(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3))(expo-constants@56.0.16)(expo-crypto@56.0.4(expo@56.0.8))(expo-secure-store@56.0.4(expo@56.0.8))(expo-web-browser@56.0.5(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6)))(expo@56.0.8)(react-dom@19.2.3(react@19.2.3))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3) '@effect/atom-react': specifier: 4.0.0-beta.78 version: 4.0.0-beta.78(effect@4.0.0-beta.78(patch_hash=883249d8efbb462e928e21fefef96027b66aec50751178cafdce45f08eee3754))(react@19.2.3)(scheduler@0.27.0) @@ -198,7 +201,7 @@ importers: version: 1.8.0 '@pierre/diffs': specifier: 'catalog:' - version: 1.1.20(patch_hash=e4e35ba95100de3708f900e0d9ea62bca732b1e4486024b5055f48cd128dd9e0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + version: 1.3.0-beta.4(patch_hash=f5d41705ce94bbafc731d92e9cb1671db710df046dd135cb894e3e3e9164a75b)(@shikijs/themes@3.23.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@react-native-menu/menu': specifier: ^2.0.0 version: 2.0.0(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3) @@ -220,6 +223,9 @@ importers: '@t3tools/contracts': specifier: workspace:* version: link:../../packages/contracts + '@t3tools/mobile-markdown-text': + specifier: file:./modules/t3-markdown-text + version: file:apps/mobile/modules/t3-markdown-text(e909ee9a8f7fbe234da80c739fca4984) '@t3tools/mobile-review-diff-native': specifier: file:./modules/t3-review-diff version: file:apps/mobile/modules/t3-review-diff @@ -241,6 +247,9 @@ importers: expo: specifier: ^56.0.0 version: 56.0.8(@babel/core@7.29.7)(@expo/dom-webview@56.0.5)(@expo/metro-runtime@56.0.13)(bufferutil@4.1.0)(expo-router@56.2.8)(expo-widgets@56.0.16)(react-dom@19.2.3(react@19.2.3))(react-native-worklets@0.8.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3)(typescript@6.0.3)(utf-8-validate@6.0.6) + expo-asset: + specifier: ~56.0.15 + version: 56.0.15(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3)(typescript@6.0.3) expo-auth-session: specifier: ~56.0.12 version: 56.0.13(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3) @@ -365,6 +374,9 @@ importers: '@effect/vitest': specifier: 4.0.0-beta.78 version: 4.0.0-beta.78(patch_hash=42b87cc47e70d74e62496e7a8261b3fd298ecad4464d209348ab04b96f853a5f)(effect@4.0.0-beta.78(patch_hash=883249d8efbb462e928e21fefef96027b66aec50751178cafdce45f08eee3754)) + '@pierre/trees': + specifier: 1.0.0-beta.4 + version: 1.0.0-beta.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@types/react': specifier: ~19.2.0 version: 19.2.16 @@ -395,12 +407,15 @@ importers: '@effect/sql-sqlite-bun': specifier: 4.0.0-beta.78 version: 4.0.0-beta.78(effect@4.0.0-beta.78(patch_hash=883249d8efbb462e928e21fefef96027b66aec50751178cafdce45f08eee3754)) + '@ff-labs/fff-node': + specifier: 0.9.4 + version: 0.9.4(patch_hash=2b16019ce7ab61aec6478dd02f79ef468cc1d5c51e9d00764f7d2ab8167210c8) '@opencode-ai/sdk': specifier: ^1.3.15 version: 1.15.13 '@pierre/diffs': specifier: 'catalog:' - version: 1.1.20(patch_hash=e4e35ba95100de3708f900e0d9ea62bca732b1e4486024b5055f48cd128dd9e0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + version: 1.3.0-beta.4(patch_hash=f5d41705ce94bbafc731d92e9cb1671db710df046dd135cb894e3e3e9164a75b)(@shikijs/themes@4.1.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) effect: specifier: 4.0.0-beta.78 version: 4.0.0-beta.78(patch_hash=883249d8efbb462e928e21fefef96027b66aec50751178cafdce45f08eee3754) @@ -445,11 +460,11 @@ importers: specifier: ^1.4.1 version: 1.5.0(@types/react@19.2.16)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) '@clerk/clerk-js': - specifier: ^6.13.0 - version: 6.14.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + specifier: ^6.16.0 + version: 6.16.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6) '@clerk/react': - specifier: ^6.7.2 - version: 6.7.3(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + specifier: ^6.9.0 + version: 6.9.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6) '@dnd-kit/core': specifier: ^6.3.1 version: 6.3.1(react-dom@19.2.6(react@19.2.6))(react@19.2.6) @@ -482,7 +497,10 @@ importers: version: 0.41.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(yjs@13.6.31) '@pierre/diffs': specifier: 'catalog:' - version: 1.1.20(patch_hash=e4e35ba95100de3708f900e0d9ea62bca732b1e4486024b5055f48cd128dd9e0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + version: 1.3.0-beta.4(patch_hash=f5d41705ce94bbafc731d92e9cb1671db710df046dd135cb894e3e3e9164a75b)(@shikijs/themes@4.1.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + '@pierre/trees': + specifier: 1.0.0-beta.4 + version: 1.0.0-beta.4(react-dom@19.2.6(react@19.2.6))(react@19.2.6) '@t3tools/client-runtime': specifier: workspace:* version: link:../../packages/client-runtime @@ -605,8 +623,8 @@ importers: infra/relay: dependencies: '@clerk/backend': - specifier: 3.4.14 - version: 3.4.14(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + specifier: 3.6.1 + version: 3.6.1(react-dom@19.2.6(react@19.2.6))(react@19.2.6) '@effect/sql-pg': specifier: 4.0.0-beta.78 version: 4.0.0-beta.78(effect@4.0.0-beta.78(patch_hash=883249d8efbb462e928e21fefef96027b66aec50751178cafdce45f08eee3754)) @@ -1500,16 +1518,16 @@ packages: resolution: {integrity: sha512-wKh+wTjmrUoUdkZg8KpJO5X+p9PWV+KE9mePseq9UYWkukgTKsGS47RRL2HstwVcvDQH+PenrPJWII8+MfiiyA==} engines: {node: '>= 20.12.0'} - '@clerk/backend@3.4.14': - resolution: {integrity: sha512-0iaMT7k4wDk31QVC3HMaoeVFttblwsCECTHKNQpbRzIyD8j2gHdKEw/FNjffoyqyBqPw869IQlk1YokUlwVAqQ==} + '@clerk/backend@3.6.1': + resolution: {integrity: sha512-LkfekzF/0UMXacX+17xy3ExRraO0mm+thXejC8Q32gWHd1wLdxK3YXDsLDF00E1r1InWBKIt2ZOxs6hTwZPJjA==} engines: {node: '>=20.9.0'} - '@clerk/clerk-js@6.14.0': - resolution: {integrity: sha512-xreDPw31OIk/VQj36qdgjzc4Rk2HwMar25nOu/ts2gf7PrbhU4XQdrtnt74g4fTmSMp8xeyjzHqa9adDXVjISw==} + '@clerk/clerk-js@6.16.0': + resolution: {integrity: sha512-8xv/XDsxhOZd1n4DNIRJ2EehIRUg6UiqKAnfd0L88R2t1g6sVnLi1FInJ5i8Qyx5oY/creXx6X1AZ1V5PobRkA==} engines: {node: '>=20.9.0'} - '@clerk/expo@3.3.1': - resolution: {integrity: sha512-c4g64z5sgJoGYjK0NeasNwOMy9Di7cEjICq56BHSowdOuB+6UGtWBNw+yHzgS1gxi2kJgl7WQCmmXRsoZNWxAg==} + '@clerk/expo@3.4.1': + resolution: {integrity: sha512-gpAXsuUnsUdUD0/2XjyxaC9quF5rT+2umkmV74nBLVAFurGMMMMHvnHqrQEtZ7tH5GHNXYw5+pgmnzd1HiMQbQ==} engines: {node: '>=20.9.0'} peerDependencies: '@clerk/expo-passkeys': '>=0.0.6' @@ -1541,16 +1559,18 @@ packages: optional: true expo-web-browser: optional: true + react-dom: + optional: true - '@clerk/react@6.7.3': - resolution: {integrity: sha512-xdml8bFXbOQ/Egyp7iI1f0ksLjw5nYu2Db+mttHpJzet7PRXQ3jBEEc2c0AYhOJvIYxJifHGBsf75NM8SwlOag==} + '@clerk/react@6.9.0': + resolution: {integrity: sha512-M0QGyGS732tYBXeG+28UgElXM2TfoSZ+4mWGisC8yxJX8NjH4hEPJTAQuZmYRLNaCyGQCuzjYVQiQRC+GbDtmA==} engines: {node: '>=20.9.0'} peerDependencies: react: ^18.0.0 || ~19.0.3 || ~19.1.4 || ~19.2.3 || ~19.3.0-0 react-dom: ^18.0.0 || ~19.0.3 || ~19.1.4 || ~19.2.3 || ~19.3.0-0 - '@clerk/shared@4.15.0': - resolution: {integrity: sha512-uX8nfLb69m8mA6KWKWfuPSwoVNDRyUdufeCeTEZsdZxbRUsEYT/c0KWFN28IOQCtK09tpVtzrUHvW44v5Dc5OA==} + '@clerk/shared@4.17.0': + resolution: {integrity: sha512-YeQ+6zDmqyor1mPHjZx18j+LssL6Pobvid8hb7HQMioSo8sGDBEVi/Z12bs+gUhe9KbdP+ygHsKOqqeGAPuPZA==} engines: {node: '>=20.9.0'} peerDependencies: react: ^18.0.0 || ~19.0.3 || ~19.1.4 || ~19.2.3 || ~19.3.0-0 @@ -2371,6 +2391,52 @@ packages: resolution: {integrity: sha512-4aQzz9vgxcNXFfo/iyNgDDYfsU5XGKKxWxZopw0cVotHiW+U8IJbIxMaxsINs6bHhtkG3StKNPcOrn3eBuxKPw==} hasBin: true + '@ff-labs/fff-bin-darwin-arm64@0.9.4': + resolution: {integrity: sha512-xyivu2xB++O5xXDx5Qm50JsU2aXt8YgXlGVhH/HE7UMYDrE6L6f1RYdYs8Y0bn0D3D0+bFBrN5ELPszK9E4Wbw==} + cpu: [arm64] + os: [darwin] + + '@ff-labs/fff-bin-darwin-x64@0.9.4': + resolution: {integrity: sha512-xLooAhCnTDCipPSMMZz7kGF3lhRHx6aP5fb6DJ0Ipyw/w/UWJb+xITJFszUl/QnIBoJ/qjDc93/FZMo1dk6gVA==} + cpu: [x64] + os: [darwin] + + '@ff-labs/fff-bin-linux-arm64-gnu@0.9.4': + resolution: {integrity: sha512-m5+8vA+1veaUUWonwva1WsU6m1HRm8CpYUzr06KDB65mewlmPbqz7+Fh7hjEfiD8C4mHVHe6RysULvAH1yhsdw==} + cpu: [arm64] + os: [linux] + + '@ff-labs/fff-bin-linux-arm64-musl@0.9.4': + resolution: {integrity: sha512-EMeWm7CSTVkizy4ZEzUkLDP024tVcbCUthduuIhekFQRDsiaAze0YboIylWb9HBHJCZlCCoZrWAl4nnJbsX7AA==} + cpu: [arm64] + os: [linux] + + '@ff-labs/fff-bin-linux-x64-gnu@0.9.4': + resolution: {integrity: sha512-pglE0uLkhnlE6bStXqfgUjYTSj+2sVwXaPfoA0QksidAsQor6NRt8004mygzC9DPubgHq5B9QezPfEwigKaP9Q==} + cpu: [x64] + os: [linux] + + '@ff-labs/fff-bin-linux-x64-musl@0.9.4': + resolution: {integrity: sha512-VNKxgl8qs3aTfXViX7lqRK1aLu311h8dtBFqG4Scv+9Oi7WprybUp5L7IZ8sxKERaDAaiJMXHodXa1c90QdK8w==} + cpu: [x64] + os: [linux] + + '@ff-labs/fff-bin-win32-arm64@0.9.4': + resolution: {integrity: sha512-uFEt0aNL54vQxq1ivjxRuo+thnhS4wLqa4INl4VXnXJUmwB42XXxD+gsj7vzhBLLx4cFf0aWgy/+TVDR8yjZtQ==} + cpu: [arm64] + os: [win32] + + '@ff-labs/fff-bin-win32-x64@0.9.4': + resolution: {integrity: sha512-Yd2Eyxj+slWv+0QDW9/xBpu9FXq+hwD0rXQD5184/88d+xwWCLKhEP2w8I6OO9XCg+kLT79UJb+k0WwXUtBtMw==} + cpu: [x64] + os: [win32] + + '@ff-labs/fff-node@0.9.4': + resolution: {integrity: sha512-yUphwzcVBuNrg1iEAE5XVPOWfCLuq/BE1scUxtHMmLo+e1KuKWBRgSKFXGjNBfL8lV3c5VGwIgK66aBqmhqVBQ==} + engines: {node: '>=18.0.0'} + cpu: [x64, arm64] + os: [darwin, linux, win32] + '@floating-ui/core@1.7.5': resolution: {integrity: sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==} @@ -3203,16 +3269,42 @@ packages: resolution: {integrity: sha512-titLmukUt/h8ho7Svlf0xSBjoy2ccZKrXjpXpZCj+v6V4CJccC2KyP45BLSCMx8YIpifMyiDyUptM4+5sruKbQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@pierre/diffs@1.1.20': - resolution: {integrity: sha512-lLi+3sLCm3QDd5/aLO9pw+WbF6UzhrkWm2oTZ5WZJTGemOyUNRJ4DDhcEKmVusu4C4bXx9Nssh6fF+wQcapb5w==} + '@pierre/diffs@1.3.0-beta.4': + resolution: {integrity: sha512-poFcsvhcQt9lH/InzAPaGs47WYHMidnFCjuYGNU41HiVLJP4mkIQDSdvcnPIkBuh/cYbPOQg/YE3T1kSpr01GA==} peerDependencies: react: ^18.3.1 || ^19.0.0 react-dom: ^18.3.1 || ^19.0.0 - '@pierre/theme@0.0.28': - resolution: {integrity: sha512-1j/H/fECBuc9dEvntdWI+l435HZapw+RCJTlqCA6BboQ5TjlnE005j/ROWutXIs8aq5OAc82JI2Kwk4A1WWBgw==} + '@pierre/theme@1.0.3': + resolution: {integrity: sha512-sWHv11TMoqKxKDgTIk5VbhQjdPhs8DCcBxbjh3mRlS3YOM/OcrWoGX6MM8eBGn9cUu3M46Py0JnxsG2nJaFTuA==} engines: {vscode: ^1.0.0} + '@pierre/theming@0.0.1': + resolution: {integrity: sha512-1thlEtJbqdyLzc1ZS2KQa1q7FzDGHT4dTEdKHoyQjOMeWWOmbVG5/ndEfOKfAb5Fzkz8cNJrOjFLiZoDH/A03A==} + peerDependencies: + '@pierre/theme': ^1.0.0 + '@shikijs/themes': ^3.0.0 || ^4.0.0 + react: ^18.3.1 || ^19.0.0 + react-dom: ^18.3.1 || ^19.0.0 + shiki: ^3.0.0 || ^4.0.0 + peerDependenciesMeta: + '@pierre/theme': + optional: true + '@shikijs/themes': + optional: true + react: + optional: true + react-dom: + optional: true + shiki: + optional: true + + '@pierre/trees@1.0.0-beta.4': + resolution: {integrity: sha512-OfT1yk9ne8Te5+GB5zUY8yqE6B8BqjBHQJleH4lu8ltwNpoocZl4vXt1AzlEExpxI/pp+AFX5QG+lR3JjtTEag==} + peerDependencies: + react: ^18.3.1 || ^19.0.0 + react-dom: ^18.3.1 || ^19.0.0 + '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} @@ -4087,6 +4179,17 @@ packages: resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} engines: {node: '>=10'} + '@t3tools/mobile-markdown-text@file:apps/mobile/modules/t3-markdown-text': + resolution: {directory: apps/mobile/modules/t3-markdown-text, type: directory} + peerDependencies: + expo-asset: '*' + expo-clipboard: '*' + expo-haptics: '*' + expo-symbols: '*' + react: '*' + react-native: '*' + react-native-nitro-markdown: '*' + '@t3tools/mobile-review-diff-native@file:apps/mobile/modules/t3-review-diff': resolution: {directory: apps/mobile/modules/t3-review-diff, type: directory} @@ -4775,6 +4878,72 @@ packages: '@xterm/xterm@6.0.0': resolution: {integrity: sha512-TQwDdQGtwwDt+2cgKDLn0IRaSxYu1tSUjgKarSDkUM0ZNiSRXFpjxEsvc/Zgc5kq5omJ+V0a8/kIM2WD3sMOYg==} + '@yuuang/ffi-rs-android-arm64@1.3.2': + resolution: {integrity: sha512-eDYLT0kVBkp7e2BwdRDmt6N1rkeDPUHDefk3ZX0/nok+GLsqfy1WBoSL3Yg7HVXN1EyW8OBVc2uK8Zq8HbmaSA==} + engines: {node: '>= 12'} + cpu: [arm64] + os: [android] + + '@yuuang/ffi-rs-darwin-arm64@1.3.2': + resolution: {integrity: sha512-kRdgPaOM6TfuC5wHUwstlatk4HNie2lwSLJWQL2LiAUIJ7+96CoiWUNVhwBcFrhdfxhnWenYS6F668CV0vit8Q==} + engines: {node: '>= 12'} + cpu: [arm64] + os: [darwin] + + '@yuuang/ffi-rs-darwin-x64@1.3.2': + resolution: {integrity: sha512-O3AlVgre8FQcZRJe44Xs7A6iDLumoPXqbw40+eJCa2gyXaXyLPdHoWrS1W9rBCa1QZRRnG7zRulPVFw8C5uo8g==} + engines: {node: '>= 12'} + cpu: [x64] + os: [darwin] + + '@yuuang/ffi-rs-linux-arm-gnueabihf@1.3.2': + resolution: {integrity: sha512-IXiNdTbIcTCPny5eeElijFWYeKSJjQWSjt9ZyJNdLHYiB1Np+XD6K7wNZS6EOMgMelhW1kQE62T654skGkVDIA==} + engines: {node: '>= 12'} + cpu: [arm] + os: [linux] + + '@yuuang/ffi-rs-linux-arm64-gnu@1.3.2': + resolution: {integrity: sha512-gWFO6xufUK9lPYUqDvKa6IR243dPqdetgl9Q7HrZWaDu7wLo06QQrosw8QTzndafQnOcBKm6LoLujmGCfTgJOA==} + engines: {node: '>= 12'} + cpu: [arm64] + os: [linux] + + '@yuuang/ffi-rs-linux-arm64-musl@1.3.2': + resolution: {integrity: sha512-lejvOSqypPziQH5rzfkDlJ6e92qhWbDutE9ttOO6z5I2k83zoh9iZhZWhaXSU5VqgQpcshRkrbtXb9gy1ft5dA==} + engines: {node: '>= 12'} + cpu: [arm64] + os: [linux] + + '@yuuang/ffi-rs-linux-x64-gnu@1.3.2': + resolution: {integrity: sha512-s8VCFazaJKmgY2hgMTpWk4TtBY/zy5ovbaGgwyY0FvBD0YvyhcET4IrMsDJpHhFVTPCYfKZ1dN45clD/YiFp6g==} + engines: {node: '>= 12'} + cpu: [x64] + os: [linux] + + '@yuuang/ffi-rs-linux-x64-musl@1.3.2': + resolution: {integrity: sha512-Ahr5chfKZKWUik20bEZRug+be57LZ2yYrtolyjSRoo7A4ZniBUHBZUNWm6TD6i0CJayqyxWeVk/XiaABD8bY0w==} + engines: {node: '>= 12'} + cpu: [x64] + os: [linux] + + '@yuuang/ffi-rs-win32-arm64-msvc@1.3.2': + resolution: {integrity: sha512-yhpLcj0qel5VNlpzxPZfNmi7+rEX8444QHjUP6WWLxdRfqPllROu/Cp3OpkBpw3BLdxfcDhWkjWMD5QsJN0Pvg==} + engines: {node: '>= 12'} + cpu: [arm64] + os: [win32] + + '@yuuang/ffi-rs-win32-ia32-msvc@1.3.2': + resolution: {integrity: sha512-BFVSbdtg/7mJBw5kQFOPKFiA+SF7z3240HpzHN81Umm4Bp4dWkyx0msYn8+Q7/BBJiLQ4F6bi3Nftk58YA9r9w==} + engines: {node: '>= 12'} + cpu: [x64, ia32] + os: [win32] + + '@yuuang/ffi-rs-win32-x64-msvc@1.3.2': + resolution: {integrity: sha512-ZL5MJ76n2rjwGo26kCWW7wK6QT/cee00Rx8pfW79pz6vM6jqfhoE7zTnwFiw4aOQUes9+HUc5DeeJ3z+Vb9oLg==} + engines: {node: '>= 12'} + cpu: [x64] + os: [win32] + '@zxcvbn-ts/core@3.0.4': resolution: {integrity: sha512-aQeiT0F09FuJaAqNrxynlAwZ2mW/1MdXakKWNmGM1Qp/VaY6CnB/GfnMS2T8gB2231Esp1/maCWd8vTG4OuShw==} @@ -6324,6 +6493,9 @@ packages: fetch-nodeshim@0.4.10: resolution: {integrity: sha512-m6I8ALe4L4XpdETy7MJZWs6L1IVMbjs99bwbpIKphxX+0CTns4IKDWJY0LWfr4YsFjfg+z1TjzTMU8lKl8rG0w==} + ffi-rs@1.3.2: + resolution: {integrity: sha512-4s8dX9VbBw/jd5NOuE3EJRqXaIVdjMyiumeeDzrOhtjQRwp6Bz2za7iksWXTnvTQKV/tTdm1s1w7mObe92zPjQ==} + filelist@1.0.6: resolution: {integrity: sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA==} @@ -8078,6 +8250,14 @@ packages: engines: {node: '>=14.0.0'} hasBin: true + preact-render-to-string@6.6.5: + resolution: {integrity: sha512-O6MHzYNIKYaiSX3bOw0gGZfEbOmlIDtDfWwN1JJdc/T3ihzRT6tGGSEWE088dWrEDGa1u7101q+6fzQnO9XCPA==} + peerDependencies: + preact: '>=10 || >= 11.0.0-0' + + preact@11.0.0-beta.0: + resolution: {integrity: sha512-IcODoASASYwJ9kxz7+MJeiJhvLriwSb4y4mHIyxdgaRZp6kPUud7xytrk/6GZw8U3y6EFJaRb5wi9SrEK+8+lg==} + prettier@3.8.3: resolution: {integrity: sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw==} engines: {node: '>=14'} @@ -10671,18 +10851,18 @@ snapshots: fast-wrap-ansi: 0.2.2 sisteransi: 1.0.5 - '@clerk/backend@3.4.14(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': + '@clerk/backend@3.6.1(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': dependencies: - '@clerk/shared': 4.15.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + '@clerk/shared': 4.17.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6) standardwebhooks: 1.0.0 tslib: 2.8.1 transitivePeerDependencies: - react - react-dom - '@clerk/clerk-js@6.14.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + '@clerk/clerk-js@6.16.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/shared': 4.15.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/shared': 4.17.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@stripe/stripe-js': 5.6.0 '@swc/helpers': 0.5.21 '@tanstack/query-core': 5.100.14 @@ -10697,9 +10877,9 @@ snapshots: - react - react-dom - '@clerk/clerk-js@6.14.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': + '@clerk/clerk-js@6.16.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': dependencies: - '@clerk/shared': 4.15.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + '@clerk/shared': 4.17.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6) '@stripe/stripe-js': 5.6.0 '@swc/helpers': 0.5.21 '@tanstack/query-core': 5.100.14 @@ -10714,15 +10894,14 @@ snapshots: - react - react-dom - '@clerk/expo@3.3.1(expo-auth-session@56.0.13(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3))(expo-constants@56.0.16)(expo-crypto@56.0.4(expo@56.0.8))(expo-secure-store@56.0.4(expo@56.0.8))(expo-web-browser@56.0.5(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6)))(expo@56.0.8)(react-dom@19.2.3(react@19.2.3))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3)': + '@clerk/expo@3.4.1(expo-auth-session@56.0.13(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3))(expo-constants@56.0.16)(expo-crypto@56.0.4(expo@56.0.8))(expo-secure-store@56.0.4(expo@56.0.8))(expo-web-browser@56.0.5(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6)))(expo@56.0.8)(react-dom@19.2.3(react@19.2.3))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3)': dependencies: - '@clerk/clerk-js': 6.14.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - '@clerk/react': 6.7.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - '@clerk/shared': 4.15.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/clerk-js': 6.16.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/react': 6.9.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/shared': 4.17.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) base-64: 1.0.0 expo: 56.0.8(@babel/core@7.29.7)(@expo/dom-webview@56.0.5)(@expo/metro-runtime@56.0.13)(bufferutil@4.1.0)(expo-router@56.2.8)(expo-widgets@56.0.16)(react-dom@19.2.3(react@19.2.3))(react-native-worklets@0.8.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3)(typescript@6.0.3)(utf-8-validate@6.0.6) react: 19.2.3 - react-dom: 19.2.3(react@19.2.3) react-native: 0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6) react-native-url-polyfill: 2.0.0(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6)) tslib: 2.8.1 @@ -10732,22 +10911,23 @@ snapshots: expo-crypto: 56.0.4(expo@56.0.8) expo-secure-store: 56.0.4(expo@56.0.8) expo-web-browser: 56.0.5(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6)) + react-dom: 19.2.3(react@19.2.3) - '@clerk/react@6.7.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + '@clerk/react@6.9.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/shared': 4.15.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/shared': 4.17.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react: 19.2.3 react-dom: 19.2.3(react@19.2.3) tslib: 2.8.1 - '@clerk/react@6.7.3(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': + '@clerk/react@6.9.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': dependencies: - '@clerk/shared': 4.15.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + '@clerk/shared': 4.17.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6) react: 19.2.6 react-dom: 19.2.6(react@19.2.6) tslib: 2.8.1 - '@clerk/shared@4.15.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + '@clerk/shared@4.17.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@tanstack/query-core': 5.100.14 dequal: 2.0.3 @@ -10757,7 +10937,7 @@ snapshots: react: 19.2.3 react-dom: 19.2.3(react@19.2.3) - '@clerk/shared@4.15.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': + '@clerk/shared@4.17.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': dependencies: '@tanstack/query-core': 5.100.14 dequal: 2.0.3 @@ -11675,6 +11855,43 @@ snapshots: chalk: 4.1.2 js-yaml: 4.2.0 + '@ff-labs/fff-bin-darwin-arm64@0.9.4': + optional: true + + '@ff-labs/fff-bin-darwin-x64@0.9.4': + optional: true + + '@ff-labs/fff-bin-linux-arm64-gnu@0.9.4': + optional: true + + '@ff-labs/fff-bin-linux-arm64-musl@0.9.4': + optional: true + + '@ff-labs/fff-bin-linux-x64-gnu@0.9.4': + optional: true + + '@ff-labs/fff-bin-linux-x64-musl@0.9.4': + optional: true + + '@ff-labs/fff-bin-win32-arm64@0.9.4': + optional: true + + '@ff-labs/fff-bin-win32-x64@0.9.4': + optional: true + + '@ff-labs/fff-node@0.9.4(patch_hash=2b16019ce7ab61aec6478dd02f79ef468cc1d5c51e9d00764f7d2ab8167210c8)': + dependencies: + ffi-rs: 1.3.2 + optionalDependencies: + '@ff-labs/fff-bin-darwin-arm64': 0.9.4 + '@ff-labs/fff-bin-darwin-x64': 0.9.4 + '@ff-labs/fff-bin-linux-arm64-gnu': 0.9.4 + '@ff-labs/fff-bin-linux-arm64-musl': 0.9.4 + '@ff-labs/fff-bin-linux-x64-gnu': 0.9.4 + '@ff-labs/fff-bin-linux-x64-musl': 0.9.4 + '@ff-labs/fff-bin-win32-arm64': 0.9.4 + '@ff-labs/fff-bin-win32-x64': 0.9.4 + '@floating-ui/core@1.7.5': dependencies: '@floating-ui/utils': 0.2.11 @@ -12439,9 +12656,10 @@ snapshots: '@oxlint/plugins@1.68.0': {} - '@pierre/diffs@1.1.20(patch_hash=e4e35ba95100de3708f900e0d9ea62bca732b1e4486024b5055f48cd128dd9e0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + '@pierre/diffs@1.3.0-beta.4(patch_hash=f5d41705ce94bbafc731d92e9cb1671db710df046dd135cb894e3e3e9164a75b)(@shikijs/themes@3.23.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@pierre/theme': 0.0.28 + '@pierre/theme': 1.0.3 + '@pierre/theming': 0.0.1(@pierre/theme@1.0.3)(@shikijs/themes@3.23.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(shiki@3.23.0) '@shikijs/transformers': 3.23.0 diff: 8.0.3 hast-util-to-html: 9.0.5 @@ -12449,10 +12667,13 @@ snapshots: react: 19.2.3 react-dom: 19.2.3(react@19.2.3) shiki: 3.23.0 + transitivePeerDependencies: + - '@shikijs/themes' - '@pierre/diffs@1.1.20(patch_hash=e4e35ba95100de3708f900e0d9ea62bca732b1e4486024b5055f48cd128dd9e0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': + '@pierre/diffs@1.3.0-beta.4(patch_hash=f5d41705ce94bbafc731d92e9cb1671db710df046dd135cb894e3e3e9164a75b)(@shikijs/themes@4.1.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': dependencies: - '@pierre/theme': 0.0.28 + '@pierre/theme': 1.0.3 + '@pierre/theming': 0.0.1(@pierre/theme@1.0.3)(@shikijs/themes@4.1.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(shiki@3.23.0) '@shikijs/transformers': 3.23.0 diff: 8.0.3 hast-util-to-html: 9.0.5 @@ -12460,8 +12681,40 @@ snapshots: react: 19.2.6 react-dom: 19.2.6(react@19.2.6) shiki: 3.23.0 + transitivePeerDependencies: + - '@shikijs/themes' - '@pierre/theme@0.0.28': {} + '@pierre/theme@1.0.3': {} + + '@pierre/theming@0.0.1(@pierre/theme@1.0.3)(@shikijs/themes@3.23.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(shiki@3.23.0)': + optionalDependencies: + '@pierre/theme': 1.0.3 + '@shikijs/themes': 3.23.0 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + shiki: 3.23.0 + + '@pierre/theming@0.0.1(@pierre/theme@1.0.3)(@shikijs/themes@4.1.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(shiki@3.23.0)': + optionalDependencies: + '@pierre/theme': 1.0.3 + '@shikijs/themes': 4.1.0 + react: 19.2.6 + react-dom: 19.2.6(react@19.2.6) + shiki: 3.23.0 + + '@pierre/trees@1.0.0-beta.4(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': + dependencies: + preact: 11.0.0-beta.0 + preact-render-to-string: 6.6.5(preact@11.0.0-beta.0) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + + '@pierre/trees@1.0.0-beta.4(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': + dependencies: + preact: 11.0.0-beta.0 + preact-render-to-string: 6.6.5(preact@11.0.0-beta.0) + react: 19.2.6 + react-dom: 19.2.6(react@19.2.6) '@polka/url@1.0.0-next.29': {} @@ -13228,6 +13481,16 @@ snapshots: dependencies: defer-to-connect: 2.0.1 + '@t3tools/mobile-markdown-text@file:apps/mobile/modules/t3-markdown-text(e909ee9a8f7fbe234da80c739fca4984)': + dependencies: + expo-asset: 56.0.15(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3)(typescript@6.0.3) + expo-clipboard: 56.0.3(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3) + expo-haptics: 56.0.3(expo@56.0.8) + expo-symbols: 56.0.5(expo-font@56.0.5)(expo@56.0.8)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3) + react: 19.2.3 + react-native: 0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6) + react-native-nitro-markdown: 0.5.8(react-native-nitro-modules@0.35.9(patch_hash=825622aae63a8fb5b904f3c77908a0e216261d727ea171709f2c0b6088422675)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3))(react-native-svg@15.15.4(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.85.3(@babel/core@7.29.7))(@types/react@19.2.16)(bufferutil@4.1.0)(react@19.2.3)(utf-8-validate@6.0.6))(react@19.2.3) + '@t3tools/mobile-review-diff-native@file:apps/mobile/modules/t3-review-diff': {} '@t3tools/mobile-terminal-native@file:apps/mobile/modules/t3-terminal': {} @@ -13872,6 +14135,39 @@ snapshots: '@xterm/xterm@6.0.0': {} + '@yuuang/ffi-rs-android-arm64@1.3.2': + optional: true + + '@yuuang/ffi-rs-darwin-arm64@1.3.2': + optional: true + + '@yuuang/ffi-rs-darwin-x64@1.3.2': + optional: true + + '@yuuang/ffi-rs-linux-arm-gnueabihf@1.3.2': + optional: true + + '@yuuang/ffi-rs-linux-arm64-gnu@1.3.2': + optional: true + + '@yuuang/ffi-rs-linux-arm64-musl@1.3.2': + optional: true + + '@yuuang/ffi-rs-linux-x64-gnu@1.3.2': + optional: true + + '@yuuang/ffi-rs-linux-x64-musl@1.3.2': + optional: true + + '@yuuang/ffi-rs-win32-arm64-msvc@1.3.2': + optional: true + + '@yuuang/ffi-rs-win32-ia32-msvc@1.3.2': + optional: true + + '@yuuang/ffi-rs-win32-x64-msvc@1.3.2': + optional: true + '@zxcvbn-ts/core@3.0.4': dependencies: fastest-levenshtein: 1.0.16 @@ -15666,6 +15962,20 @@ snapshots: fetch-nodeshim@0.4.10: {} + ffi-rs@1.3.2: + optionalDependencies: + '@yuuang/ffi-rs-android-arm64': 1.3.2 + '@yuuang/ffi-rs-darwin-arm64': 1.3.2 + '@yuuang/ffi-rs-darwin-x64': 1.3.2 + '@yuuang/ffi-rs-linux-arm-gnueabihf': 1.3.2 + '@yuuang/ffi-rs-linux-arm64-gnu': 1.3.2 + '@yuuang/ffi-rs-linux-arm64-musl': 1.3.2 + '@yuuang/ffi-rs-linux-x64-gnu': 1.3.2 + '@yuuang/ffi-rs-linux-x64-musl': 1.3.2 + '@yuuang/ffi-rs-win32-arm64-msvc': 1.3.2 + '@yuuang/ffi-rs-win32-ia32-msvc': 1.3.2 + '@yuuang/ffi-rs-win32-x64-msvc': 1.3.2 + filelist@1.0.6: dependencies: minimatch: 5.1.9 @@ -17748,6 +18058,12 @@ snapshots: commander: 9.5.0 optional: true + preact-render-to-string@6.6.5(preact@11.0.0-beta.0): + dependencies: + preact: 11.0.0-beta.0 + + preact@11.0.0-beta.0: {} + prettier@3.8.3: {} pretty-cache-header@1.0.0: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4ab589fffb..58f4b6e0df 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,9 +1,36 @@ packages: - - "apps/*" - - "infra/*" - - "oxlint-plugin-t3code" - - "packages/*" - - "scripts" + - apps/* + - infra/* + - oxlint-plugin-t3code + - packages/* + - scripts + +catalog: + "@effect/atom-react": 4.0.0-beta.78 + "@effect/openapi-generator": 4.0.0-beta.78 + "@effect/platform-bun": 4.0.0-beta.78 + "@effect/platform-node": 4.0.0-beta.78 + "@effect/platform-node-shared": 4.0.0-beta.78 + "@effect/sql-pg": 4.0.0-beta.78 + "@effect/sql-sqlite-bun": 4.0.0-beta.78 + "@effect/tsgo": 0.13.2 + "@effect/vitest": 4.0.0-beta.78 + "@noble/curves": 1.9.1 + "@noble/hashes": 1.8.0 + "@pierre/diffs": 1.3.0-beta.4 + "@types/node": 24.12.4 + "@typescript/native-preview": 7.0.0-dev.20260604.1 + "@vitest/runner": 4.1.8 + effect: 4.0.0-beta.78 + jose: 6.2.2 + typescript: ~6.0.3 + vite: npm:@voidzero-dev/vite-plus-core@0.1.24 + vite-plus: 0.1.24 + vitest: npm:@voidzero-dev/vite-plus-test@0.1.24 + yaml: ^2.9.0 + +ignoredBuiltDependencies: + - msw onlyBuiltDependencies: - electron @@ -12,35 +39,7 @@ onlyBuiltDependencies: - node-pty - sharp -ignoredBuiltDependencies: - - msw - -catalog: - effect: 4.0.0-beta.78 - "@effect/atom-react": 4.0.0-beta.78 - "@effect/openapi-generator": 4.0.0-beta.78 - "@effect/platform-bun": 4.0.0-beta.78 - "@effect/platform-node": 4.0.0-beta.78 - "@effect/platform-node-shared": 4.0.0-beta.78 - "@effect/sql-pg": 4.0.0-beta.78 - "@effect/sql-sqlite-bun": 4.0.0-beta.78 - "@effect/vitest": 4.0.0-beta.78 - "@effect/tsgo": 0.13.2 - "@noble/curves": 1.9.1 - "@noble/hashes": 1.8.0 - "@pierre/diffs": 1.1.20 - "@vitest/runner": 4.1.8 - "@types/node": 24.12.4 - "@typescript/native-preview": 7.0.0-dev.20260604.1 - jose: 6.2.2 - typescript: ~6.0.3 - vitest: npm:@voidzero-dev/vite-plus-test@0.1.24 - vite: npm:@voidzero-dev/vite-plus-core@0.1.24 - vite-plus: 0.1.24 - yaml: ^2.9.0 overrides: - # Clerk publishes wallet auth integrations as required dependencies. T3 Code does - # not support wallet auth, so keep that unused dependency tree out of installs. "@clerk/clerk-js>@base-org/account": "-" "@clerk/clerk-js>@coinbase/wallet-sdk": "-" "@clerk/clerk-js>@solana/wallet-adapter-base": "-" @@ -56,22 +55,13 @@ overrides: "@effect/vitest": "catalog:" "@effect/vitest>@vitest/runner": "-" "@effect/vitest>vitest": "-" - # Pinned to the version the patch in patchedDependencies targets — a fresh - # resolve (e.g. release-smoke regenerating the lockfile) must not drift to a - # newer release and orphan the patch (ERR_PNPM_UNUSED_PATCH). - "@expo/metro-config": "56.0.13" + "@expo/metro-config": 56.0.13 "@types/node": "catalog:" effect: "catalog:" vite: "catalog:" vitest: "catalog:" yaml: "catalog:" -peerDependencyRules: - allowAny: - - vite - - vitest - allowedVersions: - vite: "*" - vitest: "*" + packageExtensions: "@effect/vitest@*": dependencies: @@ -79,12 +69,22 @@ packageExtensions: peerDependenciesMeta: vitest: optional: true - "vite-plus@*": + vite-plus@*: dependencies: vite: "catalog:" + patchedDependencies: "@effect/vitest@4.0.0-beta.78": patches/@effect__vitest@4.0.0-beta.78.patch "@expo/metro-config@56.0.13": patches/@expo%2Fmetro-config@56.0.13.patch - "@pierre/diffs@1.1.20": patches/@pierre%2Fdiffs@1.1.20.patch + "@ff-labs/fff-node@0.9.4": patches/@ff-labs__fff-node@0.9.4.patch + "@pierre/diffs@1.3.0-beta.4": patches/@pierre%2Fdiffs@1.3.0-beta.4.patch effect@4.0.0-beta.78: patches/effect@4.0.0-beta.78.patch react-native-nitro-modules@0.35.9: patches/react-native-nitro-modules@0.35.9.patch + +peerDependencyRules: + allowAny: + - vite + - vitest + allowedVersions: + vite: "*" + vitest: "*" diff --git a/scripts/build-desktop-artifact.test.ts b/scripts/build-desktop-artifact.test.ts index a4a82c8fb5..3488013641 100644 --- a/scripts/build-desktop-artifact.test.ts +++ b/scripts/build-desktop-artifact.test.ts @@ -6,8 +6,11 @@ import * as Layer from "effect/Layer"; import * as Option from "effect/Option"; import { + createStageWorkspaceConfig, createStagePnpmConfig, + DESKTOP_ASAR_UNPACK, resolveDesktopRuntimeDependencies, + resolveFffNativeDependencies, resolveBuildOptions, resolveDesktopBuildIconAssets, resolveDesktopProductName, @@ -15,6 +18,7 @@ import { resolveGitHubPublishConfig, resolveMockUpdateServerPort, resolveMockUpdateServerUrl, + STAGE_INSTALL_ARGS, } from "./build-desktop-artifact.ts"; import { BRAND_ASSET_PATHS } from "./lib/brand-assets.ts"; import { HostProcessArchitecture, HostProcessPlatform } from "@t3tools/shared/hostProcess"; @@ -114,17 +118,20 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { createStagePnpmConfig( { "@expo/metro-config@56.0.13": "patches/@expo%2Fmetro-config@56.0.13.patch", + "@ff-labs/fff-node@0.9.4": "patches/@ff-labs__fff-node@0.9.4.patch", "@pierre/diffs@1.1.20": "patches/@pierre%2Fdiffs@1.1.20.patch", "alchemy@2.0.0-beta.49": "patches/alchemy@2.0.0-beta.49.patch", "effect@4.0.0-beta.73": "patches/effect@4.0.0-beta.73.patch", }, { + "@ff-labs/fff-node": "0.9.4", "@pierre/diffs": "1.1.20", effect: "4.0.0-beta.73", }, ), { patchedDependencies: { + "@ff-labs/fff-node@0.9.4": "patches/@ff-labs__fff-node@0.9.4.patch", "@pierre/diffs@1.1.20": "patches/@pierre%2Fdiffs@1.1.20.patch", "effect@4.0.0-beta.73": "patches/effect@4.0.0-beta.73.patch", }, @@ -142,6 +149,49 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { ); }); + it("installs optional native dependencies for the target desktop architecture", () => { + assert.deepStrictEqual(STAGE_INSTALL_ARGS, ["install", "--prod"]); + assert.deepStrictEqual(createStageWorkspaceConfig("mac", "x64"), { + supportedArchitectures: { + os: ["darwin"], + cpu: ["x64"], + }, + }); + assert.deepStrictEqual(createStageWorkspaceConfig("win", "arm64"), { + supportedArchitectures: { + os: ["win32"], + cpu: ["arm64"], + }, + }); + assert.deepStrictEqual(createStageWorkspaceConfig("mac", "universal"), { + supportedArchitectures: { + os: ["darwin"], + cpu: ["arm64", "x64"], + }, + }); + }); + + it("unpacks the fff shared library for filesystem and FFI access", () => { + assert.deepStrictEqual(DESKTOP_ASAR_UNPACK, ["node_modules/@ff-labs/fff-bin-*/**/*"]); + }); + + it("promotes target fff binaries to direct staged dependencies", () => { + assert.deepStrictEqual(resolveFffNativeDependencies("mac", "arm64", "0.9.4"), { + "@ff-labs/fff-bin-darwin-arm64": "0.9.4", + }); + assert.deepStrictEqual(resolveFffNativeDependencies("mac", "universal", "0.9.4"), { + "@ff-labs/fff-bin-darwin-arm64": "0.9.4", + "@ff-labs/fff-bin-darwin-x64": "0.9.4", + }); + assert.deepStrictEqual(resolveFffNativeDependencies("win", "x64", "0.9.4"), { + "@ff-labs/fff-bin-win32-x64": "0.9.4", + }); + assert.deepStrictEqual(resolveFffNativeDependencies("linux", "arm64", "0.9.4"), { + "@ff-labs/fff-bin-linux-arm64-gnu": "0.9.4", + "@ff-labs/fff-bin-linux-arm64-musl": "0.9.4", + }); + }); + it("falls back to the default mock update port when the configured port is blank", () => { assert.equal(resolveMockUpdateServerUrl(undefined), "http://localhost:3000"); assert.equal(resolveMockUpdateServerUrl(4123), "http://localhost:4123"); diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts index 5f73324adb..ae33031e15 100644 --- a/scripts/build-desktop-artifact.ts +++ b/scripts/build-desktop-artifact.ts @@ -38,6 +38,13 @@ const WorkspaceConfig = Schema.Struct({ }); type WorkspaceConfig = typeof WorkspaceConfig.Type; +const StageWorkspaceConfig = Schema.Struct({ + supportedArchitectures: Schema.Struct({ + os: Schema.Array(Schema.String), + cpu: Schema.Array(Schema.String), + }), +}); + const RepoRoot = Effect.service(Path.Path).pipe( Effect.flatMap((path) => path.fromFileUrl(new URL("..", import.meta.url))), ); @@ -46,6 +53,7 @@ const decodeWorkspaceConfig = Schema.decodeEffect(fromYaml(WorkspaceConfig)); const decodeNodePtyManifest = Schema.decodeUnknownEffect( Schema.fromJsonString(Schema.Struct({ version: Schema.String })), ); +const encodeStageWorkspaceConfig = Schema.encodeEffect(fromYaml(StageWorkspaceConfig)); const readWorkspaceConfig = Effect.fn("readWorkspaceConfig")(function* () { const fs = yield* FileSystem.FileSystem; @@ -287,6 +295,47 @@ interface StagePackageJson { }; } +export const STAGE_INSTALL_ARGS = ["install", "--prod"] as const; +export const DESKTOP_ASAR_UNPACK = ["node_modules/@ff-labs/fff-bin-*/**/*"] as const; + +export function resolveFffNativeDependencies( + platform: typeof BuildPlatform.Type, + arch: typeof BuildArch.Type, + version: string, +): Record { + const architectures = arch === "universal" ? (["arm64", "x64"] as const) : [arch]; + + if (platform === "mac") { + return Object.fromEntries( + architectures.map((architecture) => [`@ff-labs/fff-bin-darwin-${architecture}`, version]), + ); + } + + if (platform === "win") { + return Object.fromEntries( + architectures.map((architecture) => [`@ff-labs/fff-bin-win32-${architecture}`, version]), + ); + } + + return Object.fromEntries( + architectures.flatMap((architecture) => + ["gnu", "musl"].map((libc) => [`@ff-labs/fff-bin-linux-${architecture}-${libc}`, version]), + ), + ); +} + +export function createStageWorkspaceConfig( + platform: typeof BuildPlatform.Type, + arch: typeof BuildArch.Type, +): typeof StageWorkspaceConfig.Type { + return { + supportedArchitectures: { + os: [platform === "mac" ? "darwin" : platform === "win" ? "win32" : "linux"], + cpu: arch === "universal" ? ["arm64", "x64"] : [arch], + }, + }; +} + export function createStagePnpmConfig( patchedDependencies: Record, dependencies: Record, @@ -728,10 +777,11 @@ const createBuildConfig = Effect.fn("createBuildConfig")(function* ( // them, so unpacking just the bundle + node-pty isn't enough — the Linux Node // fails with ERR_MODULE_NOT_FOUND (e.g. "Cannot find package 'effect'") before // it even reaches node-pty. Unpack the server bundle AND the whole - // node_modules tree so every import resolves. The Windows primary keeps - // reading the same files through the asar (transparently redirected to the - // unpacked copy), so there's no duplication. - asarUnpack: ["apps/server/dist/**", "**/node_modules/**"], + // node_modules tree so every import resolves (this also covers the fff native + // binaries in DESKTOP_ASAR_UNPACK). The Windows primary keeps reading the same + // files through the asar (transparently redirected to the unpacked copy), so + // there's no duplication. + asarUnpack: [...DESKTOP_ASAR_UNPACK, "apps/server/dist/**", "**/node_modules/**"], }; const updateChannel = resolveDesktopUpdateChannel(version); const publishConfig = yield* resolveGitHubPublishConfig(updateChannel); @@ -1005,6 +1055,11 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( const stageDependencies = { ...resolvedServerDependencies, ...resolvedDesktopRuntimeDependencies, + ...resolveFffNativeDependencies( + options.platform, + options.arch, + serverPackageJson.dependencies["@ff-labs/fff-node"], + ), }; const stagePnpmConfig = createStagePnpmConfig(workspacePatchedDependencies, stageDependencies); const stagePackageJson: StagePackageJson = { @@ -1035,19 +1090,25 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( const stagePackageJsonString = yield* encodeJsonString(stagePackageJson); yield* fs.writeFileString(path.join(stageAppDir, "package.json"), `${stagePackageJsonString}\n`); + const stageWorkspaceConfig = createStageWorkspaceConfig(options.platform, options.arch); + const stageWorkspaceConfigString = yield* encodeStageWorkspaceConfig(stageWorkspaceConfig); + yield* fs.writeFileString( + path.join(stageAppDir, "pnpm-workspace.yaml"), + stageWorkspaceConfigString, + ); if (Object.keys(workspacePatchedDependencies).length > 0) { yield* fs.copy(path.join(repoRoot, "patches"), path.join(stageAppDir, "patches")); } yield* Effect.log("[desktop-artifact] Installing staged production dependencies..."); - const installCommand = yield* resolveSpawnCommand("vp", ["install", "--prod", "--no-optional"]); + const installCommand = yield* resolveSpawnCommand("vp", [...STAGE_INSTALL_ARGS]); yield* runCommand( ChildProcess.make(installCommand.command, installCommand.args, { cwd: stageAppDir, shell: installCommand.shell, }), - { label: "vp install --prod --no-optional", verbose: options.verbose }, + { label: "vp install --prod", verbose: options.verbose }, ); // WSL is Windows-only, so only the Windows artifact carries the Linux backend diff --git a/scripts/lib/public-config.test.ts b/scripts/lib/public-config.test.ts index 3d4a8f6dea..6f6e831566 100644 --- a/scripts/lib/public-config.test.ts +++ b/scripts/lib/public-config.test.ts @@ -33,6 +33,12 @@ describe("loadRepoEnv", () => { expect(env.EXPO_PUBLIC_OTLP_TRACES_URL).toBeUndefined(); expect(env.EXPO_PUBLIC_OTLP_TRACES_DATASET).toBeUndefined(); expect(env.EXPO_PUBLIC_OTLP_TRACES_TOKEN).toBeUndefined(); + expect(env.T3CODE_RELAY_CLIENT_OTLP_TRACES_URL).toBeUndefined(); + expect(env.T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET).toBeUndefined(); + expect(env.T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN).toBeUndefined(); + expect(env.VITE_RELAY_OTLP_TRACES_URL).toBeUndefined(); + expect(env.VITE_RELAY_OTLP_TRACES_DATASET).toBeUndefined(); + expect(env.VITE_RELAY_OTLP_TRACES_TOKEN).toBeUndefined(); }); it("applies process, root local, and root precedence in that order", () => { @@ -91,6 +97,29 @@ describe("loadRepoEnv", () => { mobileOtlpTracesUrl: "https://api.axiom.co/v1/traces", mobileOtlpTracesDataset: "mobile-traces", mobileOtlpTracesToken: "mobile-token", + relayClientOtlpTracesUrl: undefined, + relayClientOtlpTracesDataset: undefined, + relayClientOtlpTracesToken: undefined, + }); + }); + + it("projects canonical relay client tracing values to web build aliases", () => { + expect( + loadRepoEnv({ + baseEnv: { + T3CODE_RELAY_CLIENT_OTLP_TRACES_URL: "https://api.axiom.co/v1/traces", + T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET: "relay-client-traces", + T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN: "relay-client-token", + }, + repoRoot: makeTemporaryDirectory(), + }), + ).toEqual({ + T3CODE_RELAY_CLIENT_OTLP_TRACES_URL: "https://api.axiom.co/v1/traces", + T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET: "relay-client-traces", + T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN: "relay-client-token", + VITE_RELAY_OTLP_TRACES_URL: "https://api.axiom.co/v1/traces", + VITE_RELAY_OTLP_TRACES_DATASET: "relay-client-traces", + VITE_RELAY_OTLP_TRACES_TOKEN: "relay-client-token", }); }); diff --git a/scripts/lib/public-config.ts b/scripts/lib/public-config.ts index fcae153120..9b988df9c5 100644 --- a/scripts/lib/public-config.ts +++ b/scripts/lib/public-config.ts @@ -12,6 +12,9 @@ export interface T3CodePublicConfig { readonly mobileOtlpTracesUrl: string | undefined; readonly mobileOtlpTracesDataset: string | undefined; readonly mobileOtlpTracesToken: string | undefined; + readonly relayClientOtlpTracesUrl: string | undefined; + readonly relayClientOtlpTracesDataset: string | undefined; + readonly relayClientOtlpTracesToken: string | undefined; } type Environment = Readonly>; @@ -78,6 +81,24 @@ export function loadRepoEnv({ EXPO_PUBLIC_OTLP_TRACES_TOKEN: config.mobileOtlpTracesToken, } : {}), + ...(config.relayClientOtlpTracesUrl + ? { + T3CODE_RELAY_CLIENT_OTLP_TRACES_URL: config.relayClientOtlpTracesUrl, + VITE_RELAY_OTLP_TRACES_URL: config.relayClientOtlpTracesUrl, + } + : {}), + ...(config.relayClientOtlpTracesDataset + ? { + T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET: config.relayClientOtlpTracesDataset, + VITE_RELAY_OTLP_TRACES_DATASET: config.relayClientOtlpTracesDataset, + } + : {}), + ...(config.relayClientOtlpTracesToken + ? { + T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN: config.relayClientOtlpTracesToken, + VITE_RELAY_OTLP_TRACES_TOKEN: config.relayClientOtlpTracesToken, + } + : {}), }; } @@ -112,6 +133,21 @@ export function resolvePublicConfig(...sources: readonly Environment[]): T3CodeP "T3CODE_MOBILE_OTLP_TRACES_TOKEN", "EXPO_PUBLIC_OTLP_TRACES_TOKEN", ), + relayClientOtlpTracesUrl: firstNonEmpty( + sources, + "T3CODE_RELAY_CLIENT_OTLP_TRACES_URL", + "VITE_RELAY_OTLP_TRACES_URL", + ), + relayClientOtlpTracesDataset: firstNonEmpty( + sources, + "T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET", + "VITE_RELAY_OTLP_TRACES_DATASET", + ), + relayClientOtlpTracesToken: firstNonEmpty( + sources, + "T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN", + "VITE_RELAY_OTLP_TRACES_TOKEN", + ), }; } diff --git a/scripts/release-smoke.ts b/scripts/release-smoke.ts index 01676087cb..2fe6716466 100644 --- a/scripts/release-smoke.ts +++ b/scripts/release-smoke.ts @@ -26,6 +26,7 @@ const workspaceFiles = [ "apps/web/package.json", "apps/mobile/package.json", "apps/mobile/deps/react-native-nitro-markdown-0.5.0.tgz", + "apps/mobile/modules/t3-markdown-text/package.json", "apps/mobile/modules/t3-review-diff/package.json", "apps/mobile/modules/t3-terminal/package.json", "apps/marketing/package.json", diff --git a/scripts/sync-vscode-icons.mjs b/scripts/sync-vscode-icons.mjs deleted file mode 100644 index 85406d85a6..0000000000 --- a/scripts/sync-vscode-icons.mjs +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/env node - -import fs from "node:fs/promises"; -import os from "node:os"; -import path from "node:path"; -import vm from "node:vm"; -import { execFile } from "node:child_process"; -import { promisify } from "node:util"; - -const execFileAsync = promisify(execFile); - -const VERSION = process.argv[2] ?? "12.17.0"; -const VERSION_TAG = `v${VERSION}`; -const VSIX_URL = `https://open-vsx.org/api/vscode-icons-team/vscode-icons/${VERSION}/file/vscode-icons-team.vscode-icons-${VERSION}.vsix`; -const LANGUAGES_URL = `https://raw.githubusercontent.com/vscode-icons/vscode-icons/${VERSION_TAG}/src/iconsManifest/languages.ts`; - -const REPO_ROOT = process.cwd(); -const MANIFEST_PATH = path.join(REPO_ROOT, "apps/web/src/vscode-icons-manifest.json"); -const ASSOCIATIONS_PATH = path.join( - REPO_ROOT, - "apps/web/src/vscode-icons-language-associations.json", -); - -function normalizeExtension(value) { - return value.trim().toLowerCase().replace(/^\./, ""); -} - -function normalizeFileName(value) { - return value.trim().toLowerCase(); -} - -function putIfAbsent(target, key, value) { - if (!(key in target)) { - target[key] = value; - } -} - -async function downloadVsix(tmpDir) { - const vsixPath = path.join(tmpDir, `vscode-icons-${VERSION}.vsix`); - const response = await fetch(VSIX_URL); - if (!response.ok) { - throw new Error(`Failed to download VSIX: ${response.status} ${response.statusText}`); - } - const bytes = Buffer.from(await response.arrayBuffer()); - await fs.writeFile(vsixPath, bytes); - return vsixPath; -} - -async function extractManifestFromVsix(vsixPath) { - const { stdout } = await execFileAsync("unzip", [ - "-p", - vsixPath, - "extension/dist/src/vsicons-icon-theme.json", - ]); - if (!stdout || stdout.trim().length === 0) { - throw new Error("Could not extract vsicons-icon-theme.json from VSIX"); - } - return JSON.parse(stdout); -} - -async function loadLanguagesCollection() { - const response = await fetch(LANGUAGES_URL); - if (!response.ok) { - throw new Error(`Failed to fetch languages.ts: ${response.status} ${response.statusText}`); - } - const rawSource = await response.text(); - const source = rawSource - .replace(/^import[^;]+;\s*/gm, "") - .replace(/export const languages(?:\s*:\s*[^=]+)?\s*=/, "const languages =") - .replace(/\}\s*satisfies\s*Record<[^;]+>;/, "};"); - - const context = {}; - vm.createContext(context); - vm.runInContext(`${source}\n;globalThis.__languages = languages;`, context); - const languages = context.__languages; - if (!languages || typeof languages !== "object") { - throw new Error("Failed to parse languages.ts into a collection"); - } - return languages; -} - -function buildLanguageAssociations(manifest, languages) { - const availableLanguageIds = new Set(Object.keys(manifest.languageIds ?? {})); - const extensionToLanguageId = {}; - const fileNameToLanguageId = {}; - - for (const entry of Object.values(languages)) { - if (!entry || typeof entry !== "object") continue; - const idsRaw = entry.ids; - const ids = Array.isArray(idsRaw) ? idsRaw : [idsRaw]; - const knownExtensions = Array.isArray(entry.knownExtensions) ? entry.knownExtensions : []; - const knownFilenames = Array.isArray(entry.knownFilenames) ? entry.knownFilenames : []; - - for (const idValue of ids) { - if (typeof idValue !== "string") continue; - const languageId = idValue.trim(); - if (languageId.length === 0) continue; - if (!availableLanguageIds.has(languageId)) continue; - - for (const extensionValue of knownExtensions) { - if (typeof extensionValue !== "string") continue; - const extension = normalizeExtension(extensionValue); - if (extension.length === 0) continue; - putIfAbsent(extensionToLanguageId, extension, languageId); - } - - for (const fileNameValue of knownFilenames) { - if (typeof fileNameValue !== "string") continue; - const fileName = normalizeFileName(fileNameValue); - if (fileName.length === 0) continue; - putIfAbsent(fileNameToLanguageId, fileName, languageId); - } - } - } - - return { - version: VERSION, - source: LANGUAGES_URL, - generatedAt: new Date().toISOString(), - extensionToLanguageId, - fileNameToLanguageId, - }; -} - -async function main() { - const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "t3-vscode-icons-sync-")); - try { - const vsixPath = await downloadVsix(tmpDir); - const manifest = await extractManifestFromVsix(vsixPath); - const languages = await loadLanguagesCollection(); - const associations = buildLanguageAssociations(manifest, languages); - - await fs.writeFile(MANIFEST_PATH, `${JSON.stringify(manifest)}\n`, "utf8"); - await fs.writeFile(ASSOCIATIONS_PATH, `${JSON.stringify(associations)}\n`, "utf8"); - - process.stdout.write( - [ - `Synced vscode-icons ${VERSION}`, - `manifest: ${MANIFEST_PATH}`, - `language associations: ${ASSOCIATIONS_PATH}`, - `extension mappings: ${Object.keys(associations.extensionToLanguageId).length}`, - `filename mappings: ${Object.keys(associations.fileNameToLanguageId).length}`, - ].join("\n") + "\n", - ); - } finally { - await fs.rm(tmpDir, { recursive: true, force: true }); - } -} - -main().catch((error) => { - process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`); - process.exit(1); -});