MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / assertActiveEnvironment

Function assertActiveEnvironment

src/utils/assert-active-environment.ts:6–16  ·  view source on GitHub ↗
(expected: ResolvedActiveBackend)

Source from the content-addressed store, hash-verified

4import { I18nKey } from "#/i18n/declaration";
5
6export function assertActiveEnvironment(expected: ResolvedActiveBackend): void {
7 const current = getActiveBackend();
8 if (
9 expected.backend.id !== current.backend.id ||
10 expected.backend.connectionRevision !==
11 current.backend.connectionRevision ||
12 expected.orgId !== current.orgId
13 ) {
14 throw new Error(i18n.t(I18nKey.CONVERSATION$START_ENVIRONMENT_CHANGED));
15 }
16}

Callers 7

uploadFileFunction · 0.90
useTaskPollingControllerFunction · 0.90
useUpdateConversationFunction · 0.90
launchConversationFunction · 0.90

Calls 1

getActiveBackendFunction · 0.90

Tested by

no test coverage detected