Fix rebased runtime integration
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
a4d6d64c6e
commit
e5b2ce1518
4 files changed
+5
-12
No files matched your search
@@ -212,7 +212,7 @@ export const makeServerRpcHandlersLayer = Layer.unwrap(
|
||||
),
|
||||
subscribeServerConfig: () =>
|
||||
mapRpcStreamError(
|
||||
keybindingsManager.changes.pipe(
|
||||
keybindingsManager.streamChanges.pipe(
|
||||
Stream.mapEffect((event) =>
|
||||
providerHealth.getStatuses.pipe(
|
||||
Effect.map((providers) => ({
|
||||
|
||||
@@ -11,7 +11,6 @@ import { Keybindings } from "./keybindings";
|
||||
import { OrchestrationEngineService } from "./orchestration/Services/OrchestrationEngine";
|
||||
import { ProjectionSnapshotQuery } from "./orchestration/Services/ProjectionSnapshotQuery";
|
||||
import { OrchestrationReactor } from "./orchestration/Services/OrchestrationReactor";
|
||||
import { ProviderService } from "./provider/Services/ProviderService";
|
||||
|
||||
export interface ServerBootstrapStateShape {
|
||||
readonly cwd: string;
|
||||
@@ -109,7 +108,6 @@ export const ServerRuntimeStateLive = Layer.effect(
|
||||
Effect.gen(function* () {
|
||||
const keybindingsManager = yield* Keybindings;
|
||||
const orchestrationReactor = yield* OrchestrationReactor;
|
||||
const providerService = yield* ProviderService;
|
||||
|
||||
yield* keybindingsManager.syncDefaultKeybindingsOnStartup.pipe(
|
||||
Effect.catch((error) =>
|
||||
@@ -124,11 +122,6 @@ export const ServerRuntimeStateLive = Layer.effect(
|
||||
const startupScope = yield* Scope.make("sequential");
|
||||
yield* Effect.addFinalizer(() => Scope.close(startupScope, Exit.void));
|
||||
yield* Scope.provide(orchestrationReactor.start, startupScope);
|
||||
yield* Effect.addFinalizer(() =>
|
||||
providerService
|
||||
.stopAll()
|
||||
.pipe(Effect.catch((cause) => Effect.logWarning("failed to stop provider service", { cause }))),
|
||||
);
|
||||
|
||||
return {
|
||||
bootstrapState: yield* resolveBootstrapState(),
|
||||
|
||||
@@ -7,6 +7,7 @@ import * as NodeHttpServer from "@effect/platform-node/NodeHttpServer";
|
||||
import * as NodeServices from "@effect/platform-node/NodeServices";
|
||||
import {
|
||||
DEFAULT_TERMINAL_ID,
|
||||
DEFAULT_PROVIDER_INTERACTION_MODE,
|
||||
type ProviderRuntimeEvent,
|
||||
ServerRpcGroup,
|
||||
type ServerConfig as ServerConfigPayload,
|
||||
@@ -64,7 +65,6 @@ const defaultProviderService: ProviderServiceShape = {
|
||||
listSessions: () => Effect.succeed([]),
|
||||
getCapabilities: () => Effect.die(new Error("getCapabilities not implemented in test")),
|
||||
rollbackConversation: () => Effect.die(new Error("rollbackConversation not implemented in test")),
|
||||
stopAll: () => Effect.void,
|
||||
streamEvents: Stream.empty as Stream.Stream<ProviderRuntimeEvent>,
|
||||
};
|
||||
|
||||
@@ -340,7 +340,9 @@ describe("wsServer", () => {
|
||||
expect(snapshot.threads).toHaveLength(1);
|
||||
expect(snapshot.projects[0]?.workspaceRoot).toBe("/workspace/example-project");
|
||||
expect(snapshot.threads[0]?.projectId).toBe(bootstrap.bootstrapProjectId);
|
||||
expect(snapshot.threads[0]?.interactionMode).toBe("chat");
|
||||
expect(snapshot.threads[0]?.interactionMode).toBe(
|
||||
DEFAULT_PROVIDER_INTERACTION_MODE,
|
||||
);
|
||||
expect(snapshot.threads[0]?.runtimeMode).toBe("full-access");
|
||||
}),
|
||||
),
|
||||
|
||||
@@ -81,8 +81,6 @@ export class WsTransport {
|
||||
: envUrl && envUrl.length > 0
|
||||
? envUrl
|
||||
: `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.hostname}:${window.location.port}`);
|
||||
this.url = normalizeWsUrl(resolvedUrl);
|
||||
: `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.hostname}:${window.location.port}`);
|
||||
this.url = normalizeWsUrl(resolvedUrl);
|
||||
this.connect();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user