mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-11 11:54:55 +01:00
8 lines
231 B
TypeScript
8 lines
231 B
TypeScript
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)
|
|
}
|