mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 09:37:33 +00:00
refactor(providers): an ssh: route carries no provider and throws one typed error (#27477)
Co-authored-by: m4air <m4air@Mac.localdomain>
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
resolveGitRouteForHost
|
||||
} from '../providers/execution-host-provider-dispatch'
|
||||
import type { createLocalGitProvider, LocalGitProvider } from '../providers/local-git-provider'
|
||||
import { sshGitProviderMissingError } from '../providers/ssh-git-dispatch'
|
||||
import { getSshGitProvider, sshGitProviderMissingError } from '../providers/ssh-git-dispatch'
|
||||
import type { SshGitProvider } from '../providers/ssh-git-provider'
|
||||
import type { CommitMessageAgentEnvironmentResolvers } from '../text-generation/commit-message-agent-environment'
|
||||
import type { PullRequestLinkedIssueMeta } from '../source-control/pull-request-linked-issue'
|
||||
@@ -71,7 +71,11 @@ export function runtimeGitRouteForTarget(target: RuntimeGitTarget): RuntimeGitRo
|
||||
case 'local':
|
||||
return { kind: 'local', createProvider: route.createProvider }
|
||||
case 'ssh':
|
||||
return { kind: 'ssh', connectionId: route.connectionId, provider: route.provider }
|
||||
return {
|
||||
kind: 'ssh',
|
||||
connectionId: route.connectionId,
|
||||
provider: getSshGitProvider(route.connectionId) ?? null
|
||||
}
|
||||
case 'runtime':
|
||||
throw new ExecutionHostNotDispatchableError(route.hostId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user