diff --git a/src/renderer/src/components/editor/MonacoGutterContextMenu.tsx b/src/renderer/src/components/editor/MonacoGutterContextMenu.tsx index c29c11bb3e1..30824fcd81d 100644 --- a/src/renderer/src/components/editor/MonacoGutterContextMenu.tsx +++ b/src/renderer/src/components/editor/MonacoGutterContextMenu.tsx @@ -10,7 +10,7 @@ import { import { useAppStore } from '@/store' import { getConnectionId } from '@/lib/connection-context' import { findWorktreeById } from '@/store/slices/worktree-helpers' -import { getRuntimeGitRemoteFileUrl } from '@/runtime/runtime-git-client' +import { getRuntimeGitRemoteFileUrl } from '@/runtime/runtime-git-working-tree-client' import { formatPathLineReference } from './line-copy-path' import { translate } from '@/i18n/i18n' diff --git a/src/renderer/src/components/editor/combined-diff/load-sections/fetch-combined-diff-section.ts b/src/renderer/src/components/editor/combined-diff/load-sections/fetch-combined-diff-section.ts index 680db610cf7..cdb0bee8572 100644 --- a/src/renderer/src/components/editor/combined-diff/load-sections/fetch-combined-diff-section.ts +++ b/src/renderer/src/components/editor/combined-diff/load-sections/fetch-combined-diff-section.ts @@ -4,7 +4,7 @@ import { getRuntimeGitBranchDiff, getRuntimeGitCommitDiff, getRuntimeGitDiff -} from '@/runtime/runtime-git-client' +} from '@/runtime/runtime-git-diff-client' import type { OpenFile } from '@/store/slices/editor' import type { GitBranchChangeEntry, diff --git a/src/renderer/src/components/editor/useEditorPanelContentState.test.tsx b/src/renderer/src/components/editor/useEditorPanelContentState.test.tsx index 20774783c33..d7c84e81ee5 100644 --- a/src/renderer/src/components/editor/useEditorPanelContentState.test.tsx +++ b/src/renderer/src/components/editor/useEditorPanelContentState.test.tsx @@ -30,12 +30,12 @@ vi.mock('@/runtime/runtime-file-read-client', () => ({ })) vi.mock('@/runtime/runtime-file-watch-client', () => ({ subscribeRuntimeFileChanges: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-diff-client', () => ({ getRuntimeGitBranchDiff: mocks.getRuntimeGitBranchDiff, getRuntimeGitCommitDiff: vi.fn(), - getRuntimeGitDiff: mocks.getRuntimeGitDiff, - getRuntimeGitScope: vi.fn(() => null) + getRuntimeGitDiff: mocks.getRuntimeGitDiff })) +vi.mock('@/runtime/runtime-git-client-context', () => ({ getRuntimeGitScope: vi.fn(() => null) })) vi.mock('@/lib/connection-context', () => ({ getConnectionId: mocks.getConnectionId, diff --git a/src/renderer/src/components/editor/useEditorPanelDiffContentLoader.ts b/src/renderer/src/components/editor/useEditorPanelDiffContentLoader.ts index e254a1928e3..48475f42627 100644 --- a/src/renderer/src/components/editor/useEditorPanelDiffContentLoader.ts +++ b/src/renderer/src/components/editor/useEditorPanelDiffContentLoader.ts @@ -6,9 +6,9 @@ import { useAppStore } from '@/store' import { getRuntimeGitBranchDiff, getRuntimeGitCommitDiff, - getRuntimeGitDiff, - getRuntimeGitScope -} from '@/runtime/runtime-git-client' + getRuntimeGitDiff +} from '@/runtime/runtime-git-diff-client' +import { getRuntimeGitScope } from '@/runtime/runtime-git-client-context' import type { DiffContent, InFlightContentRead } from './editor-panel-content-types' import { canUseChangesModeForFile } from './editor-panel-file-mode' import type { EditorPanelContentLoadOptions } from './useEditorPanelExternalContentEvents' diff --git a/src/renderer/src/components/editor/useEditorPanelFloatingTabContentState.test.tsx b/src/renderer/src/components/editor/useEditorPanelFloatingTabContentState.test.tsx index e164f238c4a..846959390f3 100644 --- a/src/renderer/src/components/editor/useEditorPanelFloatingTabContentState.test.tsx +++ b/src/renderer/src/components/editor/useEditorPanelFloatingTabContentState.test.tsx @@ -26,12 +26,12 @@ vi.mock('@/runtime/runtime-file-read-client', () => ({ })) vi.mock('@/runtime/runtime-file-watch-client', () => ({ subscribeRuntimeFileChanges: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-diff-client', () => ({ getRuntimeGitBranchDiff: vi.fn(), getRuntimeGitCommitDiff: vi.fn(), - getRuntimeGitDiff: vi.fn(), - getRuntimeGitScope: vi.fn(() => null) + getRuntimeGitDiff: vi.fn() })) +vi.mock('@/runtime/runtime-git-client-context', () => ({ getRuntimeGitScope: vi.fn(() => null) })) vi.mock('@/lib/connection-context', () => ({ getConnectionId: vi.fn(() => null), diff --git a/src/renderer/src/components/editor/useEditorPanelHostUnresolvedContentState.test.tsx b/src/renderer/src/components/editor/useEditorPanelHostUnresolvedContentState.test.tsx index f6d94f1a093..11a8248210c 100644 --- a/src/renderer/src/components/editor/useEditorPanelHostUnresolvedContentState.test.tsx +++ b/src/renderer/src/components/editor/useEditorPanelHostUnresolvedContentState.test.tsx @@ -22,12 +22,12 @@ vi.mock('@/runtime/runtime-file-read-client', () => ({ })) vi.mock('@/runtime/runtime-file-watch-client', () => ({ subscribeRuntimeFileChanges: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-diff-client', () => ({ getRuntimeGitBranchDiff: vi.fn(), getRuntimeGitCommitDiff: vi.fn(), - getRuntimeGitDiff: vi.fn(), - getRuntimeGitScope: vi.fn(() => null) + getRuntimeGitDiff: vi.fn() })) +vi.mock('@/runtime/runtime-git-client-context', () => ({ getRuntimeGitScope: vi.fn(() => null) })) vi.mock('@/lib/connection-context', () => ({ getConnectionId: vi.fn(), diff --git a/src/renderer/src/components/editor/useEditorPanelRemoteSiblingContentState.test.tsx b/src/renderer/src/components/editor/useEditorPanelRemoteSiblingContentState.test.tsx index 45407cf03d2..40e4e377896 100644 --- a/src/renderer/src/components/editor/useEditorPanelRemoteSiblingContentState.test.tsx +++ b/src/renderer/src/components/editor/useEditorPanelRemoteSiblingContentState.test.tsx @@ -26,12 +26,12 @@ vi.mock('@/runtime/runtime-file-read-client', () => ({ })) vi.mock('@/runtime/runtime-file-watch-client', () => ({ subscribeRuntimeFileChanges: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-diff-client', () => ({ getRuntimeGitBranchDiff: vi.fn(), getRuntimeGitCommitDiff: vi.fn(), - getRuntimeGitDiff: vi.fn(), - getRuntimeGitScope: vi.fn(() => null) + getRuntimeGitDiff: vi.fn() })) +vi.mock('@/runtime/runtime-git-client-context', () => ({ getRuntimeGitScope: vi.fn(() => null) })) vi.mock('@/lib/connection-context', () => ({ getConnectionId: vi.fn(), diff --git a/src/renderer/src/components/editor/useEditorPanelVisibilityContentState.test.tsx b/src/renderer/src/components/editor/useEditorPanelVisibilityContentState.test.tsx index c8ac2c67daf..62c129a7203 100644 --- a/src/renderer/src/components/editor/useEditorPanelVisibilityContentState.test.tsx +++ b/src/renderer/src/components/editor/useEditorPanelVisibilityContentState.test.tsx @@ -19,12 +19,12 @@ vi.mock('@/runtime/runtime-file-read-client', () => ({ })) vi.mock('@/runtime/runtime-file-watch-client', () => ({ subscribeRuntimeFileChanges: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-diff-client', () => ({ getRuntimeGitBranchDiff: vi.fn(), getRuntimeGitCommitDiff: vi.fn(), - getRuntimeGitDiff: mocks.getRuntimeGitDiff, - getRuntimeGitScope: vi.fn(() => null) + getRuntimeGitDiff: mocks.getRuntimeGitDiff })) +vi.mock('@/runtime/runtime-git-client-context', () => ({ getRuntimeGitScope: vi.fn(() => null) })) vi.mock('@/lib/connection-context', () => ({ getConnectionId: vi.fn(), diff --git a/src/renderer/src/components/native-chat/native-chat-session-option-discovery.ts b/src/renderer/src/components/native-chat/native-chat-session-option-discovery.ts index 1b06b5953be..1808f41b25e 100644 --- a/src/renderer/src/components/native-chat/native-chat-session-option-discovery.ts +++ b/src/renderer/src/components/native-chat/native-chat-session-option-discovery.ts @@ -16,11 +16,8 @@ import { getLocalProjectExecutionRuntimeContext, getWslDistroFromPath } from '@/lib/local-preflight-context' -import { - discoverRuntimeCommitMessageModels, - getRuntimeGitScope, - type RuntimeGitContext -} from '@/runtime/runtime-git-client' +import { discoverRuntimeCommitMessageModels } from '@/runtime/runtime-git-generation-client' +import { getRuntimeGitScope, type RuntimeGitContext } from '@/runtime/runtime-git-client-context' import { callStructuredAgentSession } from '@/runtime/structured-agent-session-client' import type { AgentSessionModelCatalogResult, diff --git a/src/renderer/src/components/native-chat/native-chat-session-option-enrichment.test.ts b/src/renderer/src/components/native-chat/native-chat-session-option-enrichment.test.ts index 2efa39cd550..67240d3763c 100644 --- a/src/renderer/src/components/native-chat/native-chat-session-option-enrichment.test.ts +++ b/src/renderer/src/components/native-chat/native-chat-session-option-enrichment.test.ts @@ -19,10 +19,10 @@ const mocks = vi.hoisted(() => ({ callStructuredAgentSession: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', () => ({ - discoverRuntimeCommitMessageModels: mocks.discoverRuntimeCommitMessageModels, - getRuntimeGitScope: vi.fn() +vi.mock('@/runtime/runtime-git-generation-client', () => ({ + discoverRuntimeCommitMessageModels: mocks.discoverRuntimeCommitMessageModels })) +vi.mock('@/runtime/runtime-git-client-context', () => ({ getRuntimeGitScope: vi.fn() })) vi.mock('@/runtime/structured-agent-session-client', () => ({ callStructuredAgentSession: mocks.callStructuredAgentSession diff --git a/src/renderer/src/components/right-sidebar/SourceControl.preview-open.test.tsx b/src/renderer/src/components/right-sidebar/SourceControl.preview-open.test.tsx index ff6af37c05c..c69dfeb608c 100644 --- a/src/renderer/src/components/right-sidebar/SourceControl.preview-open.test.tsx +++ b/src/renderer/src/components/right-sidebar/SourceControl.preview-open.test.tsx @@ -82,7 +82,7 @@ vi.mock('@/components/confirmation-dialog-context', () => ({ useConfirmationDialog: () => vi.fn().mockResolvedValue(true) })) -vi.mock('@/runtime/runtime-git-client', async (importOriginal) => { +vi.mock('@/runtime/runtime-git-working-tree-client', async (importOriginal) => { const actual = await importOriginal>() return { ...actual, diff --git a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-generation.test.tsx b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-generation.test.tsx index e9964cd00ab..cdf14d85939 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-generation.test.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-generation.test.tsx @@ -2,7 +2,7 @@ import { act, cleanup, renderHook } from '@testing-library/react' import { afterEach, describe, expect, it, vi } from 'vitest' -import type * as RuntimeGitClient from '@/runtime/runtime-git-client' +import type * as RuntimeGitGenerationClient from '@/runtime/runtime-git-generation-client' import type { RuntimeGeneratePullRequestFieldsResult } from '@/runtime/runtime-git-client-context' import { useAppStore } from '@/store' import { resolvePullRequestGenerationCancel } from '@/store/slices/pull-request-generation' @@ -12,8 +12,8 @@ const runtime = vi.hoisted(() => ({ generate: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', async (importOriginal) => { - const original = await importOriginal() +vi.mock('@/runtime/runtime-git-generation-client', async (importOriginal) => { + const original = await importOriginal() return { ...original, cancelRuntimeGeneratePullRequestFields: runtime.cancel, diff --git a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-generation.tsx b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-generation.tsx index b744f8d24a0..c5ca8aa2f8d 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-generation.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-generation.tsx @@ -5,9 +5,9 @@ import { useAppStore } from '@/store' import { getConnectionId } from '@/lib/connection-context' import { generateRuntimePullRequestFields, - cancelRuntimeGeneratePullRequestFields, - type RuntimeGeneratePullRequestFieldsOverrides -} from '@/runtime/runtime-git-client' + cancelRuntimeGeneratePullRequestFields +} from '@/runtime/runtime-git-generation-client' +import type { RuntimeGeneratePullRequestFieldsOverrides } from '@/runtime/runtime-git-client-context' import type { ChecksPanelReviewState } from './use-checks-panel-review-state' import type { ChecksPanelControllerState } from './use-checks-panel-controller-state' import { stripBaseRef } from '../create-pull-request-base-ref-normalization' diff --git a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-git-status-effects.test.tsx b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-git-status-effects.test.tsx index 7ff5f1c1396..d169cec7115 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-git-status-effects.test.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-git-status-effects.test.tsx @@ -9,7 +9,12 @@ const mocks = vi.hoisted(() => ({ getRuntimeGitUpstreamStatus: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', () => mocks) +vi.mock('@/runtime/runtime-git-status-client', () => ({ + getRuntimeGitStatus: mocks.getRuntimeGitStatus +})) +vi.mock('@/runtime/runtime-git-sync-client', () => ({ + getRuntimeGitUpstreamStatus: mocks.getRuntimeGitUpstreamStatus +})) import { useChecksPanelGitStatusEffects } from './use-checks-panel-git-status-effects' import { deferred, flush, mountProbe, unmountProbes } from '../source-control-hook-test-harness' diff --git a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-git-status-effects.tsx b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-git-status-effects.tsx index df494deeb09..87c12053b24 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-git-status-effects.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-git-status-effects.tsx @@ -1,5 +1,6 @@ import { useEffect, useRef } from 'react' -import { getRuntimeGitStatus, getRuntimeGitUpstreamStatus } from '@/runtime/runtime-git-client' +import { getRuntimeGitStatus } from '@/runtime/runtime-git-status-client' +import { getRuntimeGitUpstreamStatus } from '@/runtime/runtime-git-sync-client' import { buildChecksPanelEligibilityGitFingerprint, shouldClearChecksPanelGitStatusSnapshot, diff --git a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-manual-refresh.tsx b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-manual-refresh.tsx index 1e3a419dfda..4e2e75c84ea 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-manual-refresh.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-manual-refresh.tsx @@ -2,7 +2,8 @@ import { useCallback } from 'react' import { useAppStore } from '@/store' import { buildGitHubPRRefreshStateClearToken } from '@/store/github/pr-refresh-state' import { refreshHostedReviewCard } from '@/store/slices/hosted-review-card-refresh' -import { getRuntimeGitStatus, getRuntimeGitUpstreamStatus } from '@/runtime/runtime-git-client' +import { getRuntimeGitStatus } from '@/runtime/runtime-git-status-client' +import { getRuntimeGitUpstreamStatus } from '@/runtime/runtime-git-sync-client' import { hasChecksPanelGitStatusBranchChanged, readChecksPanelRefreshGitIdentitySnapshot, diff --git a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-review-state.tsx b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-review-state.tsx index 44166f2565a..9b6c147724e 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-review-state.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-review-state.tsx @@ -28,7 +28,7 @@ import { resolveSourceControlAiForOperation, resolveSourceControlAiPrCreationDefaults } from '../../../../../shared/source-control-ai' -import { getRuntimeGitScope } from '@/runtime/runtime-git-client' +import { getRuntimeGitScope } from '@/runtime/runtime-git-client-context' import type { ChecksPanelReviewStateInput } from './review-state-dependencies' export function useChecksPanelReviewState(model: ChecksPanelReviewStateInput) { diff --git a/src/renderer/src/components/right-sidebar/create-pull-request-dialog-field-model.ts b/src/renderer/src/components/right-sidebar/create-pull-request-dialog-field-model.ts index 9ddaa300dc4..7f3533ca5da 100644 --- a/src/renderer/src/components/right-sidebar/create-pull-request-dialog-field-model.ts +++ b/src/renderer/src/components/right-sidebar/create-pull-request-dialog-field-model.ts @@ -3,7 +3,7 @@ import type { RuntimeClientTarget } from '@/runtime/runtime-client-target' import type { RuntimeGeneratePullRequestFieldsOverrides, RuntimeGitContext -} from '@/runtime/runtime-git-client' +} from '@/runtime/runtime-git-client-context' import type { Repo } from '../../../../shared/repo-types' import type { HostedReviewCreationEligibility } from '../../../../shared/hosted-review' import type { SourceControlAiPrCreationDefaults } from '../../../../shared/source-control-ai-types' diff --git a/src/renderer/src/components/right-sidebar/git-status-refresh.ts b/src/renderer/src/components/right-sidebar/git-status-refresh.ts index 7a8978a2193..96e5817421f 100644 --- a/src/renderer/src/components/right-sidebar/git-status-refresh.ts +++ b/src/renderer/src/components/right-sidebar/git-status-refresh.ts @@ -1,4 +1,5 @@ -import { getRuntimeGitStatus, getRuntimeGitUpstreamStatus } from '@/runtime/runtime-git-client' +import { getRuntimeGitStatus } from '@/runtime/runtime-git-status-client' +import { getRuntimeGitUpstreamStatus } from '@/runtime/runtime-git-sync-client' import { getBranchLineTotalMergeBase } from './branch-line-total-request-gate' import { clearAutomaticPushTargetUpstreamStatusCache, diff --git a/src/renderer/src/components/right-sidebar/source-control/ai/use-ai.ts b/src/renderer/src/components/right-sidebar/source-control/ai/use-ai.ts index f90ab131d67..2d1491ee9ad 100644 --- a/src/renderer/src/components/right-sidebar/source-control/ai/use-ai.ts +++ b/src/renderer/src/components/right-sidebar/source-control/ai/use-ai.ts @@ -1,7 +1,7 @@ import { useCallback, useMemo, useState } from 'react' import { toast } from 'sonner' import { useAppStore } from '@/store' -import { getRuntimeGitScope } from '@/runtime/runtime-git-client' +import { getRuntimeGitScope } from '@/runtime/runtime-git-client-context' import { getCommitMessageModelDiscoveryHostKeyForScope } from '../../../../../../shared/commit-message-host-key' import { DEFAULT_SOURCE_CONTROL_AI_PR_CREATION_DEFAULTS, diff --git a/src/renderer/src/components/right-sidebar/source-control/commit/discard-all-failure-description.test.tsx b/src/renderer/src/components/right-sidebar/source-control/commit/discard-all-failure-description.test.tsx index 07f2c52608f..642462f8fe5 100644 --- a/src/renderer/src/components/right-sidebar/source-control/commit/discard-all-failure-description.test.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/commit/discard-all-failure-description.test.tsx @@ -17,7 +17,9 @@ const mocks = vi.hoisted(() => ({ vi.mock('sonner', () => ({ toast: { error: mocks.toastError, dismiss: vi.fn() } })) vi.mock('@/lib/connection-context', () => ({ getConnectionId: () => undefined })) -vi.mock('@/runtime/runtime-git-client', () => ({ bulkUnstageRuntimeGitPaths: vi.fn() })) +vi.mock('@/runtime/runtime-git-working-tree-client', () => ({ + bulkUnstageRuntimeGitPaths: vi.fn() +})) vi.mock('./discard-all-sequence', () => ({ getDiscardAllPaths: () => [], runDiscardAllForArea: (area: DiscardAllArea, paths: readonly string[], deps: DiscardAllDeps) => diff --git a/src/renderer/src/components/right-sidebar/source-control/commit/source-control-discard-editor-owner.test.tsx b/src/renderer/src/components/right-sidebar/source-control/commit/source-control-discard-editor-owner.test.tsx index ff440933757..af0c81be226 100644 --- a/src/renderer/src/components/right-sidebar/source-control/commit/source-control-discard-editor-owner.test.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/commit/source-control-discard-editor-owner.test.tsx @@ -22,7 +22,7 @@ vi.mock('@/components/editor/editor-autosave', () => ({ requestEditorSaveQuiesce: mocks.quiesce, notifyEditorExternalFileChange: mocks.notify })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-working-tree-client', () => ({ discardRuntimeGitPath: mocks.discard, bulkDiscardRuntimeGitPaths: mocks.bulkDiscard, stageRuntimeGitPath: vi.fn(), diff --git a/src/renderer/src/components/right-sidebar/source-control/commit/source-control-entry-mutation-failures.test.tsx b/src/renderer/src/components/right-sidebar/source-control/commit/source-control-entry-mutation-failures.test.tsx index b477c25beb2..4d13ecebbbc 100644 --- a/src/renderer/src/components/right-sidebar/source-control/commit/source-control-entry-mutation-failures.test.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/commit/source-control-entry-mutation-failures.test.tsx @@ -22,7 +22,7 @@ vi.mock('@/components/editor/editor-autosave', () => ({ notifyEditorExternalFileChange: vi.fn(), requestEditorSaveQuiesce: vi.fn(async () => {}) })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-working-tree-client', () => ({ stageRuntimeGitPath: (...args: unknown[]) => mocks.stagePath(...args), unstageRuntimeGitPath: (...args: unknown[]) => mocks.unstagePath(...args), discardRuntimeGitPath: (...args: unknown[]) => mocks.discardPath(...args), diff --git a/src/renderer/src/components/right-sidebar/source-control/commit/use-bulk-actions-capped-stage.test.tsx b/src/renderer/src/components/right-sidebar/source-control/commit/use-bulk-actions-capped-stage.test.tsx index ee10c5b68d4..6c99a2ae338 100644 --- a/src/renderer/src/components/right-sidebar/source-control/commit/use-bulk-actions-capped-stage.test.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/commit/use-bulk-actions-capped-stage.test.tsx @@ -8,7 +8,7 @@ const mocks = vi.hoisted(() => ({ bulkStage: vi.fn(), stageScope: vi.fn(), toast vi.mock('sonner', () => ({ toast: { error: mocks.toastError } })) vi.mock('@/lib/connection-context', () => ({ getConnectionId: () => 'ssh-1' })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-working-tree-client', () => ({ bulkStageRuntimeGitPaths: (...args: unknown[]) => mocks.bulkStage(...args), stageRuntimeGitWorktreeScope: (...args: unknown[]) => mocks.stageScope(...args), bulkUnstageRuntimeGitPaths: vi.fn() diff --git a/src/renderer/src/components/right-sidebar/source-control/commit/use-bulk-actions.ts b/src/renderer/src/components/right-sidebar/source-control/commit/use-bulk-actions.ts index e474bd56e10..0788cf99b32 100644 --- a/src/renderer/src/components/right-sidebar/source-control/commit/use-bulk-actions.ts +++ b/src/renderer/src/components/right-sidebar/source-control/commit/use-bulk-actions.ts @@ -9,7 +9,7 @@ import { bulkStageRuntimeGitPaths, bulkUnstageRuntimeGitPaths, stageRuntimeGitWorktreeScope -} from '@/runtime/runtime-git-client' +} from '@/runtime/runtime-git-working-tree-client' import { getStageAllPaths, getUnstageAllPaths, diff --git a/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-action.ts b/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-action.ts index e44bfaba267..8aa1c0188c2 100644 --- a/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-action.ts +++ b/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-action.ts @@ -1,7 +1,7 @@ import { useCallback } from 'react' import { requireGitOwnerTarget } from '../../worktree-git-owner-target' import { getConnectionId } from '@/lib/connection-context' -import { commitRuntimeGit } from '@/runtime/runtime-git-client' +import { commitRuntimeGit } from '@/runtime/runtime-git-sync-client' import type { SourceControlOperationTarget } from '../listing/operation-target' import type { SourceControlStoreActions } from '../listing/use-store-actions' import type { SourceControlWorktreeContext } from '../listing/use-worktree-context' diff --git a/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-message-generation.ts b/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-message-generation.ts index a9e6f86c851..d7bc77ed887 100644 --- a/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-message-generation.ts +++ b/src/renderer/src/components/right-sidebar/source-control/commit/use-commit-message-generation.ts @@ -2,9 +2,9 @@ import { useCallback, useEffect } from 'react' import { getConnectionId } from '@/lib/connection-context' import { cancelRuntimeGenerateCommitMessage, - generateRuntimeCommitMessage, - type RuntimeGenerateCommitMessageOverrides -} from '@/runtime/runtime-git-client' + generateRuntimeCommitMessage +} from '@/runtime/runtime-git-generation-client' +import type { RuntimeGenerateCommitMessageOverrides } from '@/runtime/runtime-git-client-context' import { useAppStore } from '@/store' import { createRunningCommitMessageGenerationRecord, diff --git a/src/renderer/src/components/right-sidebar/source-control/commit/use-discard-confirmation.ts b/src/renderer/src/components/right-sidebar/source-control/commit/use-discard-confirmation.ts index d3f164b2f34..dc4c90543f5 100644 --- a/src/renderer/src/components/right-sidebar/source-control/commit/use-discard-confirmation.ts +++ b/src/renderer/src/components/right-sidebar/source-control/commit/use-discard-confirmation.ts @@ -4,7 +4,7 @@ import type { RuntimeClientTarget } from '@/runtime/runtime-client-target' import { toast } from 'sonner' import { getConnectionId } from '@/lib/connection-context' import { basename } from '@/lib/path' -import { bulkUnstageRuntimeGitPaths } from '@/runtime/runtime-git-client' +import { bulkUnstageRuntimeGitPaths } from '@/runtime/runtime-git-working-tree-client' import { translate } from '@/i18n/i18n' import type { GitStatusEntry } from '../../../../../../shared/git-status-types' import { diff --git a/src/renderer/src/components/right-sidebar/source-control/commit/use-entry-mutations.ts b/src/renderer/src/components/right-sidebar/source-control/commit/use-entry-mutations.ts index cd3b3525e83..079059b116b 100644 --- a/src/renderer/src/components/right-sidebar/source-control/commit/use-entry-mutations.ts +++ b/src/renderer/src/components/right-sidebar/source-control/commit/use-entry-mutations.ts @@ -12,9 +12,9 @@ import { bulkUnstageRuntimeGitPaths, discardRuntimeGitPath, stageRuntimeGitPath, - unstageRuntimeGitPath, - type RuntimeGitContext -} from '@/runtime/runtime-git-client' + unstageRuntimeGitPath +} from '@/runtime/runtime-git-working-tree-client' +import type { RuntimeGitContext } from '@/runtime/runtime-git-client-context' import { dismissSourceControlEntryFailureToast, showSourceControlEntryFailureToast diff --git a/src/renderer/src/components/right-sidebar/source-control/listing/operation-target.ts b/src/renderer/src/components/right-sidebar/source-control/listing/operation-target.ts index ba0aa7db720..a9179b381aa 100644 --- a/src/renderer/src/components/right-sidebar/source-control/listing/operation-target.ts +++ b/src/renderer/src/components/right-sidebar/source-control/listing/operation-target.ts @@ -1,4 +1,4 @@ -import type { RuntimeGitContext } from '@/runtime/runtime-git-client' +import type { RuntimeGitContext } from '@/runtime/runtime-git-client-context' import type { RuntimeClientTarget } from '@/runtime/runtime-client-target' import { requireGitOwnerTarget } from '../../worktree-git-owner-target' import type { GitConflictOperation } from '../../../../../../shared/git-status-types' diff --git a/src/renderer/src/components/right-sidebar/source-control/listing/use-submodule-status.ts b/src/renderer/src/components/right-sidebar/source-control/listing/use-submodule-status.ts index acbc35c083d..e9a1fb9cc7e 100644 --- a/src/renderer/src/components/right-sidebar/source-control/listing/use-submodule-status.ts +++ b/src/renderer/src/components/right-sidebar/source-control/listing/use-submodule-status.ts @@ -3,7 +3,7 @@ import { requireGitOwnerTarget } from '../../worktree-git-owner-target' import type { RuntimeClientTarget } from '@/runtime/runtime-client-target' import type { GitStatusEntry } from '../../../../../../shared/git-status-types' import { getConnectionId } from '@/lib/connection-context' -import { getRuntimeGitSubmoduleStatus } from '@/runtime/runtime-git-client' +import { getRuntimeGitSubmoduleStatus } from '@/runtime/runtime-git-status-client' import { getSubmoduleExpansionKey, isExpandableSubmoduleEntry, diff --git a/src/renderer/src/components/right-sidebar/source-control/review/create-pr-intent-run-snapshot.ts b/src/renderer/src/components/right-sidebar/source-control/review/create-pr-intent-run-snapshot.ts index b5d41234ce8..87ef6837a25 100644 --- a/src/renderer/src/components/right-sidebar/source-control/review/create-pr-intent-run-snapshot.ts +++ b/src/renderer/src/components/right-sidebar/source-control/review/create-pr-intent-run-snapshot.ts @@ -1,4 +1,4 @@ -import { bulkStageRuntimeGitPaths } from '@/runtime/runtime-git-client' +import { bulkStageRuntimeGitPaths } from '@/runtime/runtime-git-working-tree-client' import { operationGitContext } from '../listing/operation-target' import type { GitStatusEntry } from '../../../../../../shared/git-status-types' import { diff --git a/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-commit-message.ts b/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-commit-message.ts index f82a15edc68..91cb41620d2 100644 --- a/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-commit-message.ts +++ b/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-commit-message.ts @@ -1,6 +1,6 @@ import { useCallback } from 'react' import { operationGitContext } from '../listing/operation-target' -import { generateRuntimeCommitMessage } from '@/runtime/runtime-git-client' +import { generateRuntimeCommitMessage } from '@/runtime/runtime-git-generation-client' import { useAppStore } from '@/store' import { isCustomAgentId } from '../../../../../../shared/commit-message-agent-spec' import type { CreatePrIntentRunToken } from './create-pr-intent-flow' diff --git a/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-probes.ts b/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-probes.ts index af517cf691b..59923d9cbcb 100644 --- a/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-probes.ts +++ b/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-probes.ts @@ -1,7 +1,7 @@ import { useCallback } from 'react' import { requireGitOwnerTarget } from '../../worktree-git-owner-target' import { getConnectionId } from '@/lib/connection-context' -import { getRuntimeGitBranchCompare } from '@/runtime/runtime-git-client' +import { getRuntimeGitBranchCompare } from '@/runtime/runtime-git-diff-client' import type { HostedReviewCreationEligibility } from '../../../../../../shared/hosted-review' import { refreshGitStatusForWorktreeStrict } from '../../git-status-refresh' import type { CreatePrIntentRunToken } from './create-pr-intent-flow' diff --git a/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-review.ts b/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-review.ts index 330dd0b21e3..beb3433ab2c 100644 --- a/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-review.ts +++ b/src/renderer/src/components/right-sidebar/source-control/review/use-create-pr-intent-review.ts @@ -2,7 +2,7 @@ import { useCallback } from 'react' import { useAppStore } from '@/store' import { operationGitContext } from '../listing/operation-target' import { translate } from '@/i18n/i18n' -import { generateRuntimePullRequestFields } from '@/runtime/runtime-git-client' +import { generateRuntimePullRequestFields } from '@/runtime/runtime-git-generation-client' import type { HostedReviewCreationEligibility } from '../../../../../../shared/hosted-review' import { normalizeHostedReviewHeadRef } from '../../../../../../shared/hosted-review-refs' import { resolveCreateReviewDraftTitle } from '../../create-review-draft-title' diff --git a/src/renderer/src/components/right-sidebar/source-control/review/use-hosted-review-creation.test.tsx b/src/renderer/src/components/right-sidebar/source-control/review/use-hosted-review-creation.test.tsx index 1e5757bfced..f78b4dabd2e 100644 --- a/src/renderer/src/components/right-sidebar/source-control/review/use-hosted-review-creation.test.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/review/use-hosted-review-creation.test.tsx @@ -3,7 +3,7 @@ import { act, cleanup, renderHook } from '@testing-library/react' import { useRef, useState } from 'react' import { afterEach, describe, expect, it, vi } from 'vitest' -import type * as RuntimeGitClient from '@/runtime/runtime-git-client' +import type * as RuntimeGitGenerationClient from '@/runtime/runtime-git-generation-client' import type { RuntimeGeneratePullRequestFieldsResult } from '@/runtime/runtime-git-client-context' import { useAppStore } from '@/store' import { @@ -31,8 +31,8 @@ import { useSourceControlPullRequestGeneration } from './use-pull-request-genera const runtime = vi.hoisted(() => ({ cancel: vi.fn(), generate: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', async (importOriginal) => { - const original = await importOriginal() +vi.mock('@/runtime/runtime-git-generation-client', async (importOriginal) => { + const original = await importOriginal() return { ...original, cancelRuntimeGeneratePullRequestFields: runtime.cancel, diff --git a/src/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.test.tsx b/src/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.test.tsx index 12a667c38e5..be63515f4b3 100644 --- a/src/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.test.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.test.tsx @@ -2,7 +2,7 @@ import { act, cleanup, renderHook } from '@testing-library/react' import { afterEach, describe, expect, it, vi } from 'vitest' -import type * as RuntimeGitClient from '@/runtime/runtime-git-client' +import type * as RuntimeGitGenerationClient from '@/runtime/runtime-git-generation-client' import type { RuntimeGeneratePullRequestFieldsResult } from '@/runtime/runtime-git-client-context' import { useAppStore } from '@/store' import { DEFAULT_SOURCE_CONTROL_AI_PR_CREATION_DEFAULTS } from '../../../../../../shared/source-control-ai-settings' @@ -12,8 +12,8 @@ const runtime = vi.hoisted(() => ({ generate: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', async (importOriginal) => { - const original = await importOriginal() +vi.mock('@/runtime/runtime-git-generation-client', async (importOriginal) => { + const original = await importOriginal() return { ...original, cancelRuntimeGeneratePullRequestFields: runtime.cancel, diff --git a/src/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.ts b/src/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.ts index 566104fdfa9..22215eca6a9 100644 --- a/src/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.ts +++ b/src/renderer/src/components/right-sidebar/source-control/review/use-pull-request-generation.ts @@ -2,9 +2,9 @@ import { useCallback } from 'react' import { getConnectionId } from '@/lib/connection-context' import { cancelRuntimeGeneratePullRequestFields, - generateRuntimePullRequestFields, - type RuntimeGeneratePullRequestFieldsOverrides -} from '@/runtime/runtime-git-client' + generateRuntimePullRequestFields +} from '@/runtime/runtime-git-generation-client' +import type { RuntimeGeneratePullRequestFieldsOverrides } from '@/runtime/runtime-git-client-context' import type { PullRequestGenerationOutcome } from '../../create-pull-request-dialog-field-model' import { settlePullRequestGenerationRequest } from '../../pull-request-generation-request-outcome' import { useAppStore } from '@/store' diff --git a/src/renderer/src/components/right-sidebar/source-control/sync/use-branch-compare.ts b/src/renderer/src/components/right-sidebar/source-control/sync/use-branch-compare.ts index 858c3355e28..fbd55bc2180 100644 --- a/src/renderer/src/components/right-sidebar/source-control/sync/use-branch-compare.ts +++ b/src/renderer/src/components/right-sidebar/source-control/sync/use-branch-compare.ts @@ -3,7 +3,7 @@ import { requireGitOwnerTarget } from '../../worktree-git-owner-target' import type { RuntimeClientTarget } from '@/runtime/runtime-client-target' import { installWindowVisibilityInterval } from '@/lib/window-visibility-interval' import { getConnectionId } from '@/lib/connection-context' -import { getRuntimeGitBranchCompare } from '@/runtime/runtime-git-client' +import { getRuntimeGitBranchCompare } from '@/runtime/runtime-git-diff-client' import { useAppStore } from '@/store' import { createLoadingBranchCompareSummary } from '@/store/slices/editor/git/branch-compare-state' import type { GitUpstreamStatus } from '../../../../../../shared/git-status-types' diff --git a/src/renderer/src/components/right-sidebar/source-control/sync/use-conflict-abort.ts b/src/renderer/src/components/right-sidebar/source-control/sync/use-conflict-abort.ts index 5e7c99a2371..d99a9ddf7d7 100644 --- a/src/renderer/src/components/right-sidebar/source-control/sync/use-conflict-abort.ts +++ b/src/renderer/src/components/right-sidebar/source-control/sync/use-conflict-abort.ts @@ -4,7 +4,7 @@ import { toast } from 'sonner' import { useConfirmationDialog } from '@/components/confirmation-dialog-context' import { translate } from '@/i18n/i18n' import { getConnectionId } from '@/lib/connection-context' -import { abortRuntimeGitMerge, abortRuntimeGitRebase } from '@/runtime/runtime-git-client' +import { abortRuntimeGitMerge, abortRuntimeGitRebase } from '@/runtime/runtime-git-sync-client' import type { GitConflictOperation } from '../../../../../../shared/git-status-types' import type { AbortConflictOperation } from '../listing/operation-target' import type { SourceControlWorktreeContext } from '../listing/use-worktree-context' diff --git a/src/renderer/src/components/right-sidebar/source-control/sync/use-git-history-commit-actions.ts b/src/renderer/src/components/right-sidebar/source-control/sync/use-git-history-commit-actions.ts index 800e6a2c593..ee1f1fbd268 100644 --- a/src/renderer/src/components/right-sidebar/source-control/sync/use-git-history-commit-actions.ts +++ b/src/renderer/src/components/right-sidebar/source-control/sync/use-git-history-commit-actions.ts @@ -3,10 +3,8 @@ import { requireGitOwnerTarget } from '../../worktree-git-owner-target' import type { RuntimeClientTarget } from '@/runtime/runtime-client-target' import { toast } from 'sonner' import { useAppStore } from '@/store' -import { - getRuntimeGitCommitCompare, - getRuntimeGitRemoteCommitUrl -} from '@/runtime/runtime-git-client' +import { getRuntimeGitCommitCompare } from '@/runtime/runtime-git-diff-client' +import { getRuntimeGitRemoteCommitUrl } from '@/runtime/runtime-git-working-tree-client' import { getConnectionId } from '@/lib/connection-context' import { detectLanguage } from '@/lib/language-detect' import { launchAgentInNewTab } from '@/lib/launch-agent-in-new-tab' diff --git a/src/renderer/src/components/right-sidebar/source-control/sync/use-git-history.ts b/src/renderer/src/components/right-sidebar/source-control/sync/use-git-history.ts index 96a4808106f..e09d54566c0 100644 --- a/src/renderer/src/components/right-sidebar/source-control/sync/use-git-history.ts +++ b/src/renderer/src/components/right-sidebar/source-control/sync/use-git-history.ts @@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef, useState, type RefObject } from 'react' import { requireGitOwnerTarget } from '../../worktree-git-owner-target' import type { RuntimeClientTarget } from '@/runtime/runtime-client-target' import { getConnectionId } from '@/lib/connection-context' -import { getRuntimeGitHistory } from '@/runtime/runtime-git-client' +import { getRuntimeGitHistory } from '@/runtime/runtime-git-status-client' import type { GitHistoryPanelState } from './git-history-panel' const EMPTY_GIT_HISTORY_STATE: GitHistoryPanelState = { status: 'idle' } diff --git a/src/renderer/src/components/right-sidebar/stale-conflict-operation-poll.ts b/src/renderer/src/components/right-sidebar/stale-conflict-operation-poll.ts index 0bd794ea6b2..80d4f91c604 100644 --- a/src/renderer/src/components/right-sidebar/stale-conflict-operation-poll.ts +++ b/src/renderer/src/components/right-sidebar/stale-conflict-operation-poll.ts @@ -3,7 +3,7 @@ import type { GitConflictOperation } from '../../../../shared/git-status-types' import type { Repo } from '../../../../shared/repo-types' import { isGitRepoKind } from '../../../../shared/repo-kind' import { getConnectionId } from '@/lib/connection-context' -import { getRuntimeGitConflictOperation } from '@/runtime/runtime-git-client' +import { getRuntimeGitConflictOperation } from '@/runtime/runtime-git-status-client' import { createCoalescedPollRunner, type SlowTaskBackoffOptions } from './coalesced-poll-runner' import { installWindowVisibilityInterval, isWindowVisible } from '@/lib/window-visibility-interval' import { getWorktreeGitOwnerTarget } from './worktree-git-owner-target' diff --git a/src/renderer/src/components/right-sidebar/use-create-pull-request-field-generation.ts b/src/renderer/src/components/right-sidebar/use-create-pull-request-field-generation.ts index 8bf1ab25f0b..f1264b0b809 100644 --- a/src/renderer/src/components/right-sidebar/use-create-pull-request-field-generation.ts +++ b/src/renderer/src/components/right-sidebar/use-create-pull-request-field-generation.ts @@ -4,9 +4,9 @@ import { getConnectionId } from '@/lib/connection-context' import { useAppStore, type AppState } from '@/store' import { cancelRuntimeGeneratePullRequestFields, - generateRuntimePullRequestFields, - type RuntimeGeneratePullRequestFieldsOverrides -} from '@/runtime/runtime-git-client' + generateRuntimePullRequestFields +} from '@/runtime/runtime-git-generation-client' +import type { RuntimeGeneratePullRequestFieldsOverrides } from '@/runtime/runtime-git-client-context' import type { HostedReviewCreationEligibility } from '../../../../shared/hosted-review' import type { ResolveSourceControlAiResult } from '../../../../shared/source-control-ai' import type { SourceControlAiPrCreationDefaults } from '../../../../shared/source-control-ai-types' diff --git a/src/renderer/src/components/right-sidebar/use-create-pull-request-field-seeding.ts b/src/renderer/src/components/right-sidebar/use-create-pull-request-field-seeding.ts index 15da41120b3..87c342d717f 100644 --- a/src/renderer/src/components/right-sidebar/use-create-pull-request-field-seeding.ts +++ b/src/renderer/src/components/right-sidebar/use-create-pull-request-field-seeding.ts @@ -1,5 +1,5 @@ import { useEffect, type Dispatch, type RefObject, type SetStateAction } from 'react' -import { cancelRuntimeGeneratePullRequestFields } from '@/runtime/runtime-git-client' +import { cancelRuntimeGeneratePullRequestFields } from '@/runtime/runtime-git-generation-client' import type { HostedReviewCreationEligibility } from '../../../../shared/hosted-review' import type { SourceControlAiPrCreationDefaults } from '../../../../shared/source-control-ai-types' import type { diff --git a/src/renderer/src/components/right-sidebar/use-file-explorer-ignored-paths.ts b/src/renderer/src/components/right-sidebar/use-file-explorer-ignored-paths.ts index 0625ef54f10..5e0126a1699 100644 --- a/src/renderer/src/components/right-sidebar/use-file-explorer-ignored-paths.ts +++ b/src/renderer/src/components/right-sidebar/use-file-explorer-ignored-paths.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import { getConnectionId } from '@/lib/connection-context' -import { getRuntimeGitIgnoredPaths } from '@/runtime/runtime-git-client' +import { getRuntimeGitIgnoredPaths } from '@/runtime/runtime-git-status-client' import { getWorktreeGitOwnerTarget } from './worktree-git-owner-target' const EMPTY_IGNORED_PATHS: readonly string[] = [] diff --git a/src/renderer/src/components/right-sidebar/use-git-status-upstream-ref-watch.test.ts b/src/renderer/src/components/right-sidebar/use-git-status-upstream-ref-watch.test.ts index 824aeeacf0b..6a75bfcfd9c 100644 --- a/src/renderer/src/components/right-sidebar/use-git-status-upstream-ref-watch.test.ts +++ b/src/renderer/src/components/right-sidebar/use-git-status-upstream-ref-watch.test.ts @@ -7,7 +7,7 @@ const { runtimeState, setWatch } = vi.hoisted(() => ({ })) let cleanup: (() => void) | undefined -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-status-client', () => ({ setRuntimeGitStatusUpstreamRefWatch: setWatch })) diff --git a/src/renderer/src/components/right-sidebar/use-git-status-upstream-ref-watch.ts b/src/renderer/src/components/right-sidebar/use-git-status-upstream-ref-watch.ts index e6c1021da96..7065cec670c 100644 --- a/src/renderer/src/components/right-sidebar/use-git-status-upstream-ref-watch.ts +++ b/src/renderer/src/components/right-sidebar/use-git-status-upstream-ref-watch.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect } from 'react' import { getConnectionId } from '@/lib/connection-context' -import { setRuntimeGitStatusUpstreamRefWatch } from '@/runtime/runtime-git-client' +import { setRuntimeGitStatusUpstreamRefWatch } from '@/runtime/runtime-git-status-client' import type { GitStatusResult } from '../../../../shared/git-status-types' import { runtimeTargetForOwnerEnvironment } from '@/runtime/runtime-client-target' import { getWorktreeGitOwnerTarget } from './worktree-git-owner-target' diff --git a/src/renderer/src/components/right-sidebar/use-source-control-branch-compare.test.tsx b/src/renderer/src/components/right-sidebar/use-source-control-branch-compare.test.tsx index b7e2387129b..b0cc022a23e 100644 --- a/src/renderer/src/components/right-sidebar/use-source-control-branch-compare.test.tsx +++ b/src/renderer/src/components/right-sidebar/use-source-control-branch-compare.test.tsx @@ -15,7 +15,7 @@ const mocks = vi.hoisted(() => ({ > })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-diff-client', () => ({ getRuntimeGitBranchCompare: mocks.getRuntimeGitBranchCompare })) vi.mock('@/lib/connection-context', () => ({ getConnectionId: () => undefined })) diff --git a/src/renderer/src/components/right-sidebar/use-source-control-git-history.test.tsx b/src/renderer/src/components/right-sidebar/use-source-control-git-history.test.tsx index 5811d4ee659..2f29a28cde9 100644 --- a/src/renderer/src/components/right-sidebar/use-source-control-git-history.test.tsx +++ b/src/renderer/src/components/right-sidebar/use-source-control-git-history.test.tsx @@ -7,7 +7,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' const mocks = vi.hoisted(() => ({ getRuntimeGitHistory: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-status-client', () => ({ getRuntimeGitHistory: mocks.getRuntimeGitHistory })) vi.mock('@/lib/connection-context', () => ({ getConnectionId: () => undefined })) diff --git a/src/renderer/src/components/right-sidebar/useFileExplorerTree.refresh-projection-churn.test.tsx b/src/renderer/src/components/right-sidebar/useFileExplorerTree.refresh-projection-churn.test.tsx index ba86900d0b1..cb74a52a6f0 100644 --- a/src/renderer/src/components/right-sidebar/useFileExplorerTree.refresh-projection-churn.test.tsx +++ b/src/renderer/src/components/right-sidebar/useFileExplorerTree.refresh-projection-churn.test.tsx @@ -23,7 +23,7 @@ vi.mock('./file-explorer-operation-owner', async (importOriginal) => ({ ...(await importOriginal>()), getFileExplorerOperationOwner: () => ({ kind: 'local' as const }) })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-status-client', () => ({ getRuntimeGitIgnoredPaths: vi.fn().mockResolvedValue([]) })) diff --git a/src/renderer/src/components/right-sidebar/useFileExplorerVisibleRowProjection.debounce.test.tsx b/src/renderer/src/components/right-sidebar/useFileExplorerVisibleRowProjection.debounce.test.tsx index a52c0b8894e..1e61955d7c7 100644 --- a/src/renderer/src/components/right-sidebar/useFileExplorerVisibleRowProjection.debounce.test.tsx +++ b/src/renderer/src/components/right-sidebar/useFileExplorerVisibleRowProjection.debounce.test.tsx @@ -12,7 +12,7 @@ vi.mock('./worktree-git-owner-target', () => ({ getWorktreeGitOwnerTarget: () => ({ kind: 'local' }) })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-status-client', () => ({ getRuntimeGitIgnoredPaths: getRuntimeGitIgnoredPathsMock })) diff --git a/src/renderer/src/components/right-sidebar/useSourceControlSubmoduleStatus.test.tsx b/src/renderer/src/components/right-sidebar/useSourceControlSubmoduleStatus.test.tsx index 58ec40b7dc7..254d6099e30 100644 --- a/src/renderer/src/components/right-sidebar/useSourceControlSubmoduleStatus.test.tsx +++ b/src/renderer/src/components/right-sidebar/useSourceControlSubmoduleStatus.test.tsx @@ -9,7 +9,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest' const mocks = vi.hoisted(() => ({ getRuntimeGitSubmoduleStatus: vi.fn() })) -vi.mock('@/runtime/runtime-git-client', () => ({ +vi.mock('@/runtime/runtime-git-status-client', () => ({ getRuntimeGitSubmoduleStatus: mocks.getRuntimeGitSubmoduleStatus })) vi.mock('@/lib/connection-context', () => ({ getConnectionId: () => undefined })) diff --git a/src/renderer/src/components/settings/CommitMessageAiPane.tsx b/src/renderer/src/components/settings/CommitMessageAiPane.tsx index e12ed8e7c59..78f19cc3afc 100644 --- a/src/renderer/src/components/settings/CommitMessageAiPane.tsx +++ b/src/renderer/src/components/settings/CommitMessageAiPane.tsx @@ -19,7 +19,7 @@ import { type CommitMessageModelCapability } from '../../../../shared/commit-message-agent-spec' import { getCommitMessageModelDiscoveryHostKeyForScope } from '../../../../shared/commit-message-host-key' -import { getRuntimeGitScope } from '../../runtime/runtime-git-client' +import { getRuntimeGitScope } from '../../runtime/runtime-git-client-context' import { useAppStore } from '../../store' import { CustomAgentCommandField } from './CustomAgentCommandField' import { Label } from '../ui/label' diff --git a/src/renderer/src/components/settings/RepositoryForkSyncSection.test.tsx b/src/renderer/src/components/settings/RepositoryForkSyncSection.test.tsx index 53545eaf740..48a89dfefd4 100644 --- a/src/renderer/src/components/settings/RepositoryForkSyncSection.test.tsx +++ b/src/renderer/src/components/settings/RepositoryForkSyncSection.test.tsx @@ -6,7 +6,7 @@ import { RepositoryForkSyncSection } from './RepositoryForkSyncSection' const syncRuntimeGitForkDefaultBranch = vi.fn() -vi.mock('../../runtime/runtime-git-client', () => ({ +vi.mock('../../runtime/runtime-git-sync-client', () => ({ syncRuntimeGitForkDefaultBranch: (...args: unknown[]) => syncRuntimeGitForkDefaultBranch(...args) })) diff --git a/src/renderer/src/components/settings/RepositoryForkSyncSection.tsx b/src/renderer/src/components/settings/RepositoryForkSyncSection.tsx index 9d517d1d722..485cf1df003 100644 --- a/src/renderer/src/components/settings/RepositoryForkSyncSection.tsx +++ b/src/renderer/src/components/settings/RepositoryForkSyncSection.tsx @@ -7,7 +7,7 @@ import { getRepoMainWorktreeId } from '../../../../shared/worktree/id' import { Button } from '../ui/button' import { SearchableSetting } from './SearchableSetting' import { SettingsSegmentedControl } from './SettingsFormControls' -import { syncRuntimeGitForkDefaultBranch } from '../../runtime/runtime-git-client' +import { syncRuntimeGitForkDefaultBranch } from '../../runtime/runtime-git-sync-client' import { runtimeTargetForOwnerHostId } from '@/runtime/runtime-client-target' import { UNRESOLVED_GIT_HOST_ERROR } from '@/store/slices/editor/actions/git-operation-target' import { getRepoExecutionHostId } from '../../../../shared/execution-host' diff --git a/src/renderer/src/components/sidebar/delete-worktree-dirty-change-hydration.test.tsx b/src/renderer/src/components/sidebar/delete-worktree-dirty-change-hydration.test.tsx index 21de6daec9a..a3cb16e27be 100644 --- a/src/renderer/src/components/sidebar/delete-worktree-dirty-change-hydration.test.tsx +++ b/src/renderer/src/components/sidebar/delete-worktree-dirty-change-hydration.test.tsx @@ -16,7 +16,7 @@ import { getDeleteWorktreeDirtyChangePreview, getDeleteWorktreeDirtyChangePreviews } from './delete-worktree-dirty-change-counts' -import { getRuntimeGitStatus } from '@/runtime/runtime-git-client' +import { getRuntimeGitStatus } from '@/runtime/runtime-git-status-client' import { getWorktreeHostIdentity } from '../../../../shared/worktree/host-qualified-identity' const state = vi.hoisted(() => ({ @@ -31,7 +31,7 @@ vi.mock('@/store', () => ({ getState: () => state }) })) -vi.mock('@/runtime/runtime-git-client', () => ({ getRuntimeGitStatus: vi.fn() })) +vi.mock('@/runtime/runtime-git-status-client', () => ({ getRuntimeGitStatus: vi.fn() })) vi.mock('@/lib/connection-context', () => ({ getConnectionId: () => null })) const repoMap = new Map() diff --git a/src/renderer/src/components/sidebar/use-delete-worktree-status-hydration.ts b/src/renderer/src/components/sidebar/use-delete-worktree-status-hydration.ts index f6f8d874bd0..cabd75816c9 100644 --- a/src/renderer/src/components/sidebar/use-delete-worktree-status-hydration.ts +++ b/src/renderer/src/components/sidebar/use-delete-worktree-status-hydration.ts @@ -3,7 +3,7 @@ import { useAppStore } from '@/store' import { getConnectionId } from '@/lib/connection-context' import { runtimeTargetForWorkspaceOwner } from '@/lib/resolve-owner' import { runtimeTargetForOwnerHostId } from '@/runtime/runtime-client-target' -import { getRuntimeGitStatus } from '@/runtime/runtime-git-client' +import { getRuntimeGitStatus } from '@/runtime/runtime-git-status-client' import { findRepoForHost } from '@/store/slices/repo-host-identity' import type { Repo } from '../../../../shared/repo-types' import type { Worktree } from '../../../../shared/worktree/types' diff --git a/src/renderer/src/components/status-bar/use-workspace-space-git-refresh-action.ts b/src/renderer/src/components/status-bar/use-workspace-space-git-refresh-action.ts index 03d11bc374f..654636c2189 100644 --- a/src/renderer/src/components/status-bar/use-workspace-space-git-refresh-action.ts +++ b/src/renderer/src/components/status-bar/use-workspace-space-git-refresh-action.ts @@ -5,7 +5,7 @@ import type { WorkspaceSpaceWorktree } from '../../../../shared/workspace-space- import { getWorkspaceSpaceWorktreeIdentity } from './workspace-space-delete-selection' import { useAppStore } from '../../store' import { findRepoForHost } from '../../store/slices/repo-host-identity' -import { getRuntimeGitStatus } from '@/runtime/runtime-git-client' +import { getRuntimeGitStatus } from '@/runtime/runtime-git-status-client' import type { useWorkspaceSpaceManagerBindings } from './use-workspace-space-manager-bindings' type WorkspaceSpaceManagerBindings = ReturnType diff --git a/src/renderer/src/runtime/runtime-git-client-branch-line-total.test.ts b/src/renderer/src/runtime/runtime-git-client-branch-line-total.test.ts index ec0df932050..6bc7428057a 100644 --- a/src/renderer/src/runtime/runtime-git-client-branch-line-total.test.ts +++ b/src/renderer/src/runtime/runtime-git-client-branch-line-total.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { getRuntimeGitStatus } from './runtime-git-client' +import { getRuntimeGitStatus } from './runtime-git-status-client' import { createCompatibleRuntimeStatusResponseIfNeeded, type RuntimeEnvironmentCallRequest diff --git a/src/renderer/src/runtime/runtime-git-client-merge.test.ts b/src/renderer/src/runtime/runtime-git-client-merge.test.ts index 9fd157f13d8..7a4805be223 100644 --- a/src/renderer/src/runtime/runtime-git-client-merge.test.ts +++ b/src/renderer/src/runtime/runtime-git-client-merge.test.ts @@ -3,7 +3,7 @@ import { createCompatibleRuntimeStatusResponseIfNeeded, type RuntimeEnvironmentCallRequest } from './runtime-compatibility-test-fixture' -import { abortRuntimeGitMerge, abortRuntimeGitRebase } from './runtime-git-client' +import { abortRuntimeGitMerge, abortRuntimeGitRebase } from './runtime-git-sync-client' import { clearRuntimeCompatibilityCacheForTests } from './runtime-rpc-client' const gitAbortMerge = vi.fn() diff --git a/src/renderer/src/runtime/runtime-git-client.test.ts b/src/renderer/src/runtime/runtime-git-client.test.ts index 59289816be9..74a555affaa 100644 --- a/src/renderer/src/runtime/runtime-git-client.test.ts +++ b/src/renderer/src/runtime/runtime-git-client.test.ts @@ -1,23 +1,28 @@ import { beforeEach, describe, expect, it, vi } from 'vitest' import { bulkDiscardRuntimeGitPaths, - bulkStageRuntimeGitPaths, + bulkStageRuntimeGitPaths +} from './runtime-git-working-tree-client' +import { cancelRuntimeGenerateCommitMessage, - commitRuntimeGit, discoverRuntimeCommitMessageModels, + generateRuntimeCommitMessage, + generateRuntimePullRequestFields +} from './runtime-git-generation-client' +import { + commitRuntimeGit, fastForwardRuntimeGit, fetchRuntimeGit, - generateRuntimeCommitMessage, - generateRuntimePullRequestFields, - getRuntimeGitBranchCompare, - getRuntimeGitDiff, + pushRuntimeGit, + rebaseRuntimeGitFromBase +} from './runtime-git-sync-client' +import { getRuntimeGitBranchCompare, getRuntimeGitDiff } from './runtime-git-diff-client' +import { getRuntimeGitHistory, getRuntimeGitIgnoredPaths, getRuntimeGitStatus, - getRuntimeGitSubmoduleStatus, - pushRuntimeGit, - rebaseRuntimeGitFromBase -} from './runtime-git-client' + getRuntimeGitSubmoduleStatus +} from './runtime-git-status-client' import { createCompatibleRuntimeStatusResponseIfNeeded, type RuntimeEnvironmentCallRequest diff --git a/src/renderer/src/runtime/runtime-git-client.ts b/src/renderer/src/runtime/runtime-git-client.ts deleted file mode 100644 index 32f7b33cb39..00000000000 --- a/src/renderer/src/runtime/runtime-git-client.ts +++ /dev/null @@ -1,54 +0,0 @@ -export { getRuntimeGitScope } from './runtime-git-client-context' -export { - getRuntimeGitBranchCompare, - getRuntimeGitBranchDiff, - getRuntimeGitCommitCompare, - getRuntimeGitCommitDiff, - getRuntimeGitDiff -} from './runtime-git-diff-client' -export { - cancelRuntimeGenerateCommitMessage, - cancelRuntimeGeneratePullRequestFields, - discoverRuntimeCommitMessageModels, - generateRuntimeCommitMessage, - generateRuntimePullRequestFields -} from './runtime-git-generation-client' -export { - getRuntimeGitConflictOperation, - getRuntimeGitHistory, - getRuntimeGitIgnoredPaths, - getRuntimeGitStatus, - getRuntimeGitSubmoduleStatus, - setRuntimeGitStatusUpstreamRefWatch -} from './runtime-git-status-client' -export { - abortRuntimeGitMerge, - abortRuntimeGitRebase, - commitRuntimeGit, - fastForwardRuntimeGit, - fetchRuntimeGit, - getRuntimeGitUpstreamStatus, - pullRuntimeGit, - pushRuntimeGit, - rebaseRuntimeGitFromBase, - syncRuntimeGitForkDefaultBranch -} from './runtime-git-sync-client' -export { - bulkDiscardRuntimeGitPaths, - bulkStageRuntimeGitPaths, - bulkUnstageRuntimeGitPaths, - discardRuntimeGitPath, - getRuntimeGitRemoteCommitUrl, - getRuntimeGitRemoteFileUrl, - stageRuntimeGitPath, - stageRuntimeGitWorktreeScope, - unstageRuntimeGitPath -} from './runtime-git-working-tree-client' -export type { - RuntimeGenerateCommitMessageOverrides, - RuntimeGenerateCommitMessageResult, - RuntimeGeneratePullRequestFieldsOverrides, - RuntimeGeneratePullRequestFieldsResult, - RuntimeGitContext, - RuntimePullRequestGenerationInput -} from './runtime-git-client-context' diff --git a/src/renderer/src/store/repos/safe-auto-fork-sync.ts b/src/renderer/src/store/repos/safe-auto-fork-sync.ts index 38285d0d155..05e120cf3ba 100644 --- a/src/renderer/src/store/repos/safe-auto-fork-sync.ts +++ b/src/renderer/src/store/repos/safe-auto-fork-sync.ts @@ -1,5 +1,5 @@ import type { Repo } from '../../../../shared/repo-types' -import { syncRuntimeGitForkDefaultBranch } from '../../runtime/runtime-git-client' +import { syncRuntimeGitForkDefaultBranch } from '../../runtime/runtime-git-sync-client' import { getRepoExecutionHostId } from '../../../../shared/execution-host' import { getRepoMainWorktreeId } from '../../../../shared/worktree/id' import { runtimeTargetForOwnerHostId } from '../../runtime/runtime-client-target' diff --git a/src/renderer/src/store/slices/editor/actions/git-remote-push-pull.ts b/src/renderer/src/store/slices/editor/actions/git-remote-push-pull.ts index 1afda076aa8..2f35d244777 100644 --- a/src/renderer/src/store/slices/editor/actions/git-remote-push-pull.ts +++ b/src/renderer/src/store/slices/editor/actions/git-remote-push-pull.ts @@ -7,7 +7,7 @@ import { pullRuntimeGit, pushRuntimeGit, fastForwardRuntimeGit -} from '@/runtime/runtime-git-client' +} from '@/runtime/runtime-git-sync-client' import { isNonFastForwardRemoteError, resolveRemoteOperationErrorMessage diff --git a/src/renderer/src/store/slices/editor/actions/git-remote-status.ts b/src/renderer/src/store/slices/editor/actions/git-remote-status.ts index 70552373a68..e1c9c19da04 100644 --- a/src/renderer/src/store/slices/editor/actions/git-remote-status.ts +++ b/src/renderer/src/store/slices/editor/actions/git-remote-status.ts @@ -1,7 +1,7 @@ import type { EditorGet, EditorSet } from '../types/editor-set-get' import type { EditorSlice } from '../types/editor-slice' import { tryResolveGitOperationTarget } from './git-operation-target' -import { getRuntimeGitUpstreamStatus } from '@/runtime/runtime-git-client' +import { getRuntimeGitUpstreamStatus } from '@/runtime/runtime-git-sync-client' import { invalidateAutomaticPushTargetUpstreamStatusCache } from '@/components/right-sidebar/push-target-upstream-refresh-cache' import { areUpstreamStatusesEqual } from '../git/git-status-reconciliation' diff --git a/src/renderer/src/store/slices/editor/actions/git-remote-sync.ts b/src/renderer/src/store/slices/editor/actions/git-remote-sync.ts index f90936a0a8e..5972724aff6 100644 --- a/src/renderer/src/store/slices/editor/actions/git-remote-sync.ts +++ b/src/renderer/src/store/slices/editor/actions/git-remote-sync.ts @@ -8,7 +8,7 @@ import { pullRuntimeGit, pushRuntimeGit, rebaseRuntimeGitFromBase -} from '@/runtime/runtime-git-client' +} from '@/runtime/runtime-git-sync-client' import { markSyncPushStageError, resolveRemoteOperationErrorMessage diff --git a/src/renderer/src/store/slices/repos-module-lifetime-coordinators.test.ts b/src/renderer/src/store/slices/repos-module-lifetime-coordinators.test.ts index 17e6a132463..cf0d4e6b17d 100644 --- a/src/renderer/src/store/slices/repos-module-lifetime-coordinators.test.ts +++ b/src/renderer/src/store/slices/repos-module-lifetime-coordinators.test.ts @@ -9,7 +9,7 @@ import { createTestStore } from './store-test-helpers' const { syncFork } = vi.hoisted(() => ({ syncFork: vi.fn() })) -vi.mock('../../runtime/runtime-git-client', async (importOriginal) => { +vi.mock('../../runtime/runtime-git-sync-client', async (importOriginal) => { const original = await importOriginal>() return { ...original,