(input: {
readonly messages?: Effect.Effect<readonly UsageService.SessionMessage[], unknown>
readonly providers?: (directory: string) => Effect.Effect<Record<ProviderV2.ID, Provider.Info>, unknown>
})
| 95 | } |
| 96 | |
| 97 | const fakeLayer = (input: { |
| 98 | readonly messages?: Effect.Effect<readonly UsageService.SessionMessage[], unknown> |
| 99 | readonly providers?: (directory: string) => Effect.Effect<Record<ProviderV2.ID, Provider.Info>, unknown> |
| 100 | }) => |
| 101 | LayerNode.compile(UsageService.node, [ |
| 102 | [ |
| 103 | UsageService.messageLoaderNode, |
| 104 | Layer.succeed( |
| 105 | UsageService.MessageLoader, |
| 106 | UsageService.MessageLoader.of({ |
| 107 | messages: () => input.messages ?? Effect.succeed([]), |
| 108 | }), |
| 109 | ), |
| 110 | ], |
| 111 | [ |
| 112 | UsageService.contextLimitLoaderNode, |
| 113 | Layer.succeed( |
| 114 | UsageService.ContextLimitLoader, |
| 115 | UsageService.ContextLimitLoader.of({ |
| 116 | providers: input.providers ?? (() => Effect.succeed(providers())), |
| 117 | }), |
| 118 | ), |
| 119 | ], |
| 120 | ]) |
| 121 | |
| 122 | const connection = (updates: SessionNotification[]) => ({ |
| 123 | sessionUpdate(params: SessionNotification) { |
no test coverage detected