The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import * as Duration from "effect/Duration" |
| 2 | import * as Effect from "effect/Effect" |
| 3 | import * as Schema from "effect/Schema" |
| 4 | import * as SchemaTransformation from "effect/SchemaTransformation" |
| 5 | |
| 6 | const schema = Schema.String.pipe(Schema.decodeTo( |
| 7 | Schema.String, |
| 8 | SchemaTransformation.transformEffect({ |
| 9 | decode: Effect.fnUntraced(function*(s) { |
| 10 | yield* Effect.clockWith((clock) => clock.sleep(Duration.millis(300))) |
| 11 | return s |
| 12 | }), |
| 13 | encode: (_) => Effect.succeed(_) |
| 14 | }) |
| 15 | )) |
| 16 | |
| 17 | Schema.decodeUnknownEffect(schema)("a").pipe( |
| 18 | Effect.runFork |
| 19 | ) |