diff options
| author | Dax Raad <[email protected]> | 2025-08-29 11:58:17 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-08-29 11:58:17 -0400 |
| commit | 4496cd4b64e51805b790728e67a018791e731cd6 (patch) | |
| tree | e85cedfa322bd98e1f1443a725cb0dcd820891ac /cloud/app/src/context/auth.withActor.ts | |
| parent | 7f5e5fccc8d9248871d59e5adbfe52a7d307d09a (diff) | |
| download | opencode-4496cd4b64e51805b790728e67a018791e731cd6.tar.gz opencode-4496cd4b64e51805b790728e67a018791e731cd6.zip | |
ignore: cloud solid fixes
Diffstat (limited to 'cloud/app/src/context/auth.withActor.ts')
| -rw-r--r-- | cloud/app/src/context/auth.withActor.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cloud/app/src/context/auth.withActor.ts b/cloud/app/src/context/auth.withActor.ts new file mode 100644 index 000000000..a61b728ef --- /dev/null +++ b/cloud/app/src/context/auth.withActor.ts @@ -0,0 +1,7 @@ +import { Actor } from "@opencode/cloud-core/actor.js" +import { getActor } from "./auth" + +export async function withActor<T>(fn: () => T) { + const actor = await getActor() + return Actor.provide(actor.type, actor.properties, fn) +} |
