Skip to content

Commit fe26570

Browse files
m4airm4air
authored andcommitted
refactor(renderer): remove the runtime-file-client barrel
1 parent f8daed0 commit fe26570

136 files changed

Lines changed: 223 additions & 248 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎config/scripts/pr-e2e-source-routing.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ export const PR_E2E_SOURCE_ROUTES = [
285285
specs: ['tests/e2e/paired-quick-open-large-tree.spec.ts'],
286286
matches: (file) =>
287287
isProductSource(file) &&
288-
/^(?:src\/main\/ipc\/filesystem-(?:list-files|search-file-paths)\.ts|src\/main\/ripgrep\/bundled-ripgrep-path\.ts|src\/main\/providers\/(?:filesystem-provider-contract|ssh-filesystem-provider(?:-capabilities)?)\.ts|src\/main\/runtime\/(?:orca-runtime-files|rpc\/methods\/files)\.ts|src\/renderer\/src\/(?:components\/(?:QuickOpen|quick-open-file-list|quick-open-search)\.tsx?|runtime\/(?:runtime-file-client|runtime-legacy-quick-open-inventory)\.ts)|src\/shared\/(?:quick-open-(?:install-rg|path-search|transport-budget)|ripgrep-process-availability|bundled-ripgrep)\.ts)$/.test(
288+
/^(?:src\/main\/ipc\/filesystem-(?:list-files|search-file-paths)\.ts|src\/main\/ripgrep\/bundled-ripgrep-path\.ts|src\/main\/providers\/(?:filesystem-provider-contract|ssh-filesystem-provider(?:-capabilities)?)\.ts|src\/main\/runtime\/(?:orca-runtime-files|rpc\/methods\/files)\.ts|src\/renderer\/src\/(?:components\/(?:QuickOpen|quick-open-file-list|quick-open-search)\.tsx?|runtime\/(?:runtime-file-search-client|runtime-legacy-quick-open-inventory)\.ts)|src\/shared\/(?:quick-open-(?:install-rg|path-search|transport-budget)|ripgrep-process-availability|bundled-ripgrep)\.ts)$/.test(
289289
file
290290
)
291291
},

‎src/renderer/src/components/NewWorkspaceComposerCard.file-drop.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { useAttachmentDropState } from '../hooks/composer-state/attachment-drop-
1010
import type { ProjectGroup } from '../../../shared/project-group-types'
1111

1212
const uploads = vi.hoisted(() => ({ importPaths: vi.fn() }))
13-
vi.mock('@/runtime/runtime-file-client', () => ({
13+
vi.mock('@/runtime/runtime-file-import-client', () => ({
1414
importExternalPathsToRuntime: uploads.importPaths
1515
}))
1616

‎src/renderer/src/components/browser-pane/navigate/navigate-browser-page-url.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { detectLanguage } from '@/lib/language-detect'
22
import { getConnectionId } from '@/lib/connection-context'
33
import { isPathInsideWorktree, toWorktreeRelativePath } from '@/lib/terminal-links'
44
import { useAppStore } from '@/store'
5-
import type { RuntimeFileOperationArgs } from '@/runtime/runtime-file-client'
5+
import type { RuntimeFileOperationArgs } from '@/runtime/runtime-file-client-types'
66
import {
77
normalizeBrowserNavigationUrl,
88
redactKagiSessionToken

‎src/renderer/src/components/editor/ExternalFileChangeBanner.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ vi.mock('@/store', () => ({
1212
getState: vi.fn()
1313
}
1414
}))
15-
vi.mock('@/runtime/runtime-file-client', () => ({
15+
vi.mock('@/runtime/runtime-file-read-client', () => ({
1616
readRuntimeFileContent: readRuntimeFileContentMock
1717
}))
1818
vi.mock('@/runtime/runtime-rpc-client', () => ({}))

‎src/renderer/src/components/editor/ExternalFileChangeBanner.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { toast } from 'sonner'
44
import { Button } from '@/components/ui/button'
55
import { getConnectionIdForFile } from '@/lib/connection-context'
66
import { editorTabFileAccess } from '@/lib/local-file-access'
7-
import { readRuntimeFileContent } from '@/runtime/runtime-file-client'
7+
import { readRuntimeFileContent } from '@/runtime/runtime-file-read-client'
88
import { getRuntimeTargetForFileOwner } from '@/lib/file-owner-runtime-target'
99
import { useAppStore } from '@/store'
1010
import { translate } from '@/i18n/i18n'

‎src/renderer/src/components/editor/ExternalFileChangeCompareDialog.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const mocks = vi.hoisted(() => ({
1010
getState: vi.fn()
1111
}))
1212

13-
vi.mock('@/runtime/runtime-file-client', () => ({
13+
vi.mock('@/runtime/runtime-file-read-client', () => ({
1414
readRuntimeFileContent: mocks.readRuntimeFileContent
1515
}))
1616
vi.mock('@/runtime/runtime-rpc-client', () => ({}))

‎src/renderer/src/components/editor/ExternalFileChangeCompareDialog.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { lazyWithRetry as lazy } from '@/lib/lazy-with-retry'
1313
import { getConnectionIdForFile } from '@/lib/connection-context'
1414
import { editorTabFileAccess } from '@/lib/local-file-access'
1515
import { detectLanguage } from '@/lib/language-detect'
16-
import { readRuntimeFileContent } from '@/runtime/runtime-file-client'
16+
import { readRuntimeFileContent } from '@/runtime/runtime-file-read-client'
1717
import {
1818
FILE_OWNER_UNRESOLVED_MESSAGE,
1919
getRuntimeTargetForFileOwner

‎src/renderer/src/components/editor/MarkdownPreview.image-access.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ vi.mock('@/runtime/use-worktree-runtime-target', () => ({
5959
? { kind: 'environment', environmentId: runtimeEnvironmentId }
6060
: { kind: 'local' }
6161
}))
62-
vi.mock('@/runtime/runtime-file-client', () => ({
62+
vi.mock('@/runtime/runtime-file-metadata-client', () => ({
6363
statRuntimePath: vi.fn(async () => ({ isDirectory: false }))
6464
}))
6565
vi.mock('@/lib/connection-context', () => ({ getConnectionIdForFile: () => null }))

‎src/renderer/src/components/editor/MarkdownPreview.link-routing.interaction.test.tsx‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ vi.mock('@/runtime/use-worktree-runtime-target', () => ({
7979
? { kind: 'environment', environmentId: runtimeEnvironmentId }
8080
: { kind: 'local' }
8181
}))
82-
vi.mock('@/runtime/runtime-file-client', () => ({
83-
statRuntimePath: statRuntimePathMock
84-
}))
82+
vi.mock('@/runtime/runtime-file-metadata-client', () => ({ statRuntimePath: statRuntimePathMock }))
8583
vi.mock('@/lib/connection-context', () => ({
8684
getConnectionIdForFile: (worktreeId: string) => targetConnectionOwners.get(worktreeId)
8785
}))

‎src/renderer/src/components/editor/MarkdownPreview.toc-visibility-gate.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ vi.mock('@/runtime/use-worktree-runtime-target', () => ({
6565
? { kind: 'environment', environmentId: runtimeEnvironmentId }
6666
: { kind: 'local' }
6767
}))
68-
vi.mock('@/runtime/runtime-file-client', () => ({
68+
vi.mock('@/runtime/runtime-file-metadata-client', () => ({
6969
statRuntimePath: vi.fn(async () => ({ isDirectory: false }))
7070
}))
7171
vi.mock('@/lib/connection-context', () => ({ getConnectionIdForFile: () => null }))

0 commit comments

Comments
 (0)