GeezerVison is showing github.com — chore: clear Effect language service suggestions (#13536) · incognitojam/styal@568c9bc
File treeExpand file treeCollapse file tree Open diff view settings effect-codex-app-server/src
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/app/DesktopAppIdentity.test.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -76,7 +76,7 @@ const makeAssetsLayer = (png: Option.Option<string>) => | 76 | 76 | icns: Option.none(), | 77 | 77 | png, | 78 | 78 | }), | 79 | | - resolveResourcePath: () => Effect.succeed(Option.none()), | | 79 | + resolveResourcePath: () => Effect.succeedNone, | 80 | 80 | } satisfies DesktopAssets.DesktopAssets["Service"]); | 81 | 81 |
| 82 | 82 | const makeEnvironmentLayer = (overrides: TestEnvironmentInput = {}) => { | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/app/DesktopConnectionCatalogStore.test.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -46,7 +46,7 @@ function makeSafeStorageLayer(available: boolean, failDecrypt: Ref.Ref<boolean> | 46 | 46 | return decoded.slice("encrypted:".length); | 47 | 47 | }); | 48 | 48 | }, | 49 | | - selectedStorageBackend: Effect.succeed(Option.none()), | | 49 | + selectedStorageBackend: Effect.succeedNone, | 50 | 50 | } satisfies ElectronSafeStorage.ElectronSafeStorage["Service"]); | 51 | 51 | } | 52 | 52 |
| |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/app/DesktopConnectionCatalogStore.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -205,7 +205,7 @@ const readDocument = ( | 205 | 205 | raw === null | 206 | 206 | ? Effect.succeed(Option.none<EncryptedConnectionCatalogDocument>()) | 207 | 207 | : decodeEncryptedConnectionCatalogDocumentJson(raw).pipe( | 208 | | - Effect.map(Option.some), | | 208 | + Effect.asSome, | 209 | 209 | Effect.mapError( | 210 | 210 | (cause) => | 211 | 211 | new DesktopConnectionCatalogStoreDocumentDecodeError({ | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/backend/DesktopBackendConfiguration.ts +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -199,11 +199,11 @@ const readPersistedBackendObservabilitySettings = Effect.gen(function* () { | 199 | 199 | const fileSystem = yield* FileSystem.FileSystem; | 200 | 200 | const environment = yield* DesktopEnvironment.DesktopEnvironment; | 201 | 201 | const raw = yield* fileSystem.readFileString(environment.serverSettingsPath).pipe( | 202 | | - Effect.map(Option.some), | | 202 | + Effect.asSome, | 203 | 203 | Effect.catchTags({ | 204 | 204 | PlatformError: (cause) => | 205 | 205 | cause.reason._tag === "NotFound" | 206 | | - ? Effect.succeed(Option.none()) | | 206 | + ? Effect.succeedNone | 207 | 207 | : logBackendObservabilitySettingsReadFailure(environment.serverSettingsPath, cause).pipe( | 208 | 208 | Effect.as(Option.none()), | 209 | 209 | ), | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/backend/DesktopBackendManager.test.ts +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -162,7 +162,7 @@ function makeTestInstance(input: MakeInstanceInput) { | 162 | 162 | forInstance: () => Effect.succeed(stubLog), | 163 | 163 | } satisfies DesktopObservability.DesktopBackendOutputLogFactory["Service"]), | 164 | 164 | Layer.succeed(DesktopTelemetryPublisher.DesktopTelemetryPublisher, { | 165 | | - latest: Effect.succeed(Option.none()), | | 165 | + latest: Effect.succeedNone, | 166 | 166 | changes: Stream.empty, | 167 | 167 | encoded: input.desktopTelemetryStream ?? Stream.empty, | 168 | 168 | handleControlForSource: () => Effect.void, | @@ -1545,7 +1545,7 @@ describe("DesktopBackendManager", () => { | 1545 | 1545 |
| 1546 | 1546 | const mockPool = Layer.succeed(DesktopBackendPool.DesktopBackendPool, { | 1547 | 1547 | list: Effect.succeed([instance1, instance2]), | 1548 | | - get: () => Effect.succeed(Option.none()), | | 1548 | + get: () => Effect.succeedNone, | 1549 | 1549 | primary: Effect.die(new Error("primary not implemented")), | 1550 | 1550 | register: () => Effect.die(new Error("register not implemented")), | 1551 | 1551 | unregister: () => Effect.die(new Error("unregister not implemented")), | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/backend/DesktopBackendPool.test.ts +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -67,7 +67,7 @@ function makePoolLayer( | 67 | 67 | } satisfies DesktopObservability.DesktopBackendOutputLogShape), | 68 | 68 | } satisfies DesktopObservability.DesktopBackendOutputLogFactory["Service"]), | 69 | 69 | Layer.succeed(DesktopTelemetryPublisher.DesktopTelemetryPublisher, { | 70 | | - latest: Effect.succeed(Option.none()), | | 70 | + latest: Effect.succeedNone, | 71 | 71 | changes: Stream.empty, | 72 | 72 | encoded: Stream.empty, | 73 | 73 | handleControlForSource: () => Effect.void, | @@ -135,9 +135,7 @@ describe("DesktopBackendPool", () => { | 135 | 135 |
| 136 | 136 | it.effect("layerTest dies when no instances are supplied", () => | 137 | 137 | Effect.exit( | 138 | | - Effect.gen(function* () { | 139 | | - yield* DesktopBackendPool.DesktopBackendPool; | 140 | | - }).pipe(Effect.provide(DesktopBackendPool.layerTest([]))), | | 138 | + DesktopBackendPool.DesktopBackendPool.pipe(Effect.provide(DesktopBackendPool.layerTest([]))), | 141 | 139 | ).pipe(Effect.map((exit) => assert.equal(exit._tag, "Failure"))), | 142 | 140 | ); | 143 | 141 |
| |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/backend/DesktopLocalEnvironmentAuth.test.ts +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | import { assert, describe, it } from "@effect/vitest"; | 2 | 2 | import * as Effect from "effect/Effect"; | 3 | 3 | import * as Layer from "effect/Layer"; | 4 | | -import * as Option from "effect/Option"; | 5 | 4 | import * as Ref from "effect/Ref"; | 6 | 5 | import * as HttpClient from "effect/unstable/http/HttpClient"; | 7 | 6 | import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse"; | @@ -60,7 +59,7 @@ describe("DesktopLocalEnvironmentAuth", () => { | 60 | 59 | { | 61 | 60 | id: PRIMARY_LOCAL_ENVIRONMENT_ID, | 62 | 61 | label: Effect.succeed("Windows"), | 63 | | - currentConfig: Effect.succeed(Option.some(config)), | | 62 | + currentConfig: Effect.succeedSome(config), | 64 | 63 | }, | 65 | 64 | ]), | 66 | 65 | } as unknown as DesktopBackendPool.DesktopBackendPool["Service"]); | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/electron/ElectronMenu.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -226,7 +226,7 @@ export const make = Effect.gen(function* () { | 226 | 226 | Effect.callback<Option.Option<string>>((resume) => { | 227 | 227 | const normalizedItems = normalizeContextMenuItems(input.items); | 228 | 228 | if (normalizedItems.length === 0) { | 229 | | - resume(Effect.succeed(Option.none())); | | 229 | + resume(Effect.succeedNone); | 230 | 230 | return; | 231 | 231 | } | 232 | 232 |
| |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/ipc/methods/snapShot.test.ts +13-15Lines changed: 13 additions & 15 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -51,7 +51,7 @@ describe("window capture IPC", () => { | 51 | 51 | Effect.provide( | 52 | 52 | Layer.mergeAll( | 53 | 53 | Layer.succeed(ElectronWindow.ElectronWindow, { | 54 | | - main: Effect.succeed(Option.some({ webContents: { id: 7 } })), | | 54 | + main: Effect.succeedSome({ webContents: { id: 7 } }), | 55 | 55 | } as ElectronWindow.ElectronWindow["Service"]), | 56 | 56 | Layer.succeed(DesktopSnapShot.DesktopSnapShot, { | 57 | 57 | previewConfig: () => | @@ -87,7 +87,7 @@ describe("window capture IPC", () => { | 87 | 87 | Effect.provide( | 88 | 88 | Layer.mergeAll( | 89 | 89 | Layer.succeed(ElectronWindow.ElectronWindow, { | 90 | | - main: Effect.succeed(Option.some({ webContents: { id: 7 } })), | | 90 | + main: Effect.succeedSome({ webContents: { id: 7 } }), | 91 | 91 | } as ElectronWindow.ElectronWindow["Service"]), | 92 | 92 | Layer.succeed(DesktopSnapShot.DesktopSnapShot, { | 93 | 93 | state: Effect.succeed({ | @@ -120,7 +120,7 @@ describe("window capture IPC", () => { | 120 | 120 | Effect.provide( | 121 | 121 | Layer.mergeAll( | 122 | 122 | Layer.succeed(ElectronWindow.ElectronWindow, { | 123 | | - main: Effect.succeed(Option.some({ webContents: { id: 7 } })), | | 123 | + main: Effect.succeedSome({ webContents: { id: 7 } }), | 124 | 124 | } as ElectronWindow.ElectronWindow["Service"]), | 125 | 125 | Layer.succeed(DesktopSnapShot.DesktopSnapShot, { | 126 | 126 | state: Effect.succeed({ linuxBackend: "niri" }), | @@ -156,13 +156,11 @@ describe("window capture IPC", () => { | 156 | 156 | Layer.succeed( | 157 | 157 | ElectronWindow.ElectronWindow, | 158 | 158 | ElectronWindow.ElectronWindow.of({ | 159 | | - main: Effect.succeed( | 160 | | - Option.some({ | 161 | | - getBounds: () => ({ x: 100, y: 80, width: 1_000, height: 700 }), | 162 | | - getContentBounds: () => ({ x: 100, y: 118, width: 1_000, height: 662 }), | 163 | | - webContents, | 164 | | - }), | 165 | | - ), | | 159 | + main: Effect.succeedSome({ | | 160 | + getBounds: () => ({ x: 100, y: 80, width: 1_000, height: 700 }), | | 161 | + getContentBounds: () => ({ x: 100, y: 118, width: 1_000, height: 662 }), | | 162 | + webContents, | | 163 | + }), | 166 | 164 | } as ElectronWindow.ElectronWindow["Service"]), | 167 | 165 | ), | 168 | 166 | Layer.succeed( | @@ -220,7 +218,7 @@ describe("window capture IPC", () => { | 220 | 218 | Layer.succeed( | 221 | 219 | ElectronWindow.ElectronWindow, | 222 | 220 | ElectronWindow.ElectronWindow.of({ | 223 | | - main: Effect.succeed(Option.some({ webContents })), | | 221 | + main: Effect.succeedSome({ webContents }), | 224 | 222 | } as ElectronWindow.ElectronWindow["Service"]), | 225 | 223 | ), | 226 | 224 | Layer.succeed( | @@ -256,7 +254,7 @@ describe("window capture IPC", () => { | 256 | 254 | Effect.provideService( | 257 | 255 | ElectronWindow.ElectronWindow, | 258 | 256 | ElectronWindow.ElectronWindow.of({ | 259 | | - main: Effect.succeed(Option.some({ webContents: { id: 7 } })), | | 257 | + main: Effect.succeedSome({ webContents: { id: 7 } }), | 260 | 258 | } as ElectronWindow.ElectronWindow["Service"]), | 261 | 259 | ), | 262 | 260 | Effect.provideService(DesktopSnapShot.DesktopSnapShot, null as never), | @@ -277,7 +275,7 @@ describe("window capture IPC", () => { | 277 | 275 | Effect.provide( | 278 | 276 | Layer.mergeAll( | 279 | 277 | Layer.succeed(ElectronWindow.ElectronWindow, { | 280 | | - main: Effect.succeed(Option.some({ webContents: { id: 7 } })), | | 278 | + main: Effect.succeedSome({ webContents: { id: 7 } }), | 281 | 279 | } as ElectronWindow.ElectronWindow["Service"]), | 282 | 280 | Layer.succeed(DesktopSnapShot.DesktopSnapShot, { | 283 | 281 | setup: (action: string) => | @@ -295,7 +293,7 @@ describe("window capture IPC", () => { | 295 | 293 | Layer.succeed( | 296 | 294 | ElectronWindow.ElectronWindow, | 297 | 295 | ElectronWindow.ElectronWindow.of({ | 298 | | - main: Effect.succeed(Option.some({ webContents: { id: 7 } })), | | 296 | + main: Effect.succeedSome({ webContents: { id: 7 } }), | 299 | 297 | } as ElectronWindow.ElectronWindow["Service"]), | 300 | 298 | ), | 301 | 299 | Layer.succeed( | @@ -320,7 +318,7 @@ describe("window capture IPC", () => { | 320 | 318 | Layer.succeed( | 321 | 319 | ElectronWindow.ElectronWindow, | 322 | 320 | ElectronWindow.ElectronWindow.of({ | 323 | | - main: Effect.succeed(Option.some({ webContents: { id: 7 } })), | | 321 | + main: Effect.succeedSome({ webContents: { id: 7 } }), | 324 | 322 | } as ElectronWindow.ElectronWindow["Service"]), | 325 | 323 | ), | 326 | 324 | Layer.succeed( | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/ipc/methods/sshEnvironment.ts +5-7Lines changed: 5 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -137,13 +137,11 @@ export const ensureSshEnvironment = DesktopIpc.makeIpcMethod({ | 137 | 137 | }) { | 138 | 138 | const sshEnvironment = yield* DesktopSshEnvironment.DesktopSshEnvironment; | 139 | 139 | return yield* sshEnvironment.ensureEnvironment(target, options).pipe( | 140 | | - Effect.catch((error) => | 141 | | - DesktopSshEnvironment.isDesktopSshPasswordPromptCancellation(error) | 142 | | - ? Effect.succeed({ | 143 | | - type: DesktopSshPasswordPromptCancelledType, | 144 | | - message: error.message, | 145 | | - }) | 146 | | - : Effect.fail(error), | | 140 | + Effect.catchIf(DesktopSshEnvironment.isDesktopSshPasswordPromptCancellation, (error) => | | 141 | + Effect.succeed({ | | 142 | + type: DesktopSshPasswordPromptCancelledType, | | 143 | + message: error.message, | | 144 | + }), | 147 | 145 | ), | 148 | 146 | ); | 149 | 147 | }), | |
|