mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-05 16:02:19 +00:00
8 lines
278 B
TypeScript
8 lines
278 B
TypeScript
import { Actor } from "@opencode/cloud-core/actor.js"
|
|
import { getActor } from "./auth"
|
|
import { getRequestEvent } from "solid-js/web"
|
|
|
|
export async function withActor<T>(fn: () => T) {
|
|
const actor = await getActor()
|
|
return Actor.provide(actor.type, actor.properties, fn)
|
|
}
|