mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-29 05:34:19 +01:00
wip: zen
This commit is contained in:
7
packages/console/app/src/context/auth.withActor.ts
Normal file
7
packages/console/app/src/context/auth.withActor.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Actor } from "@opencode/console-core/actor.js"
|
||||
import { getActor } from "./auth"
|
||||
|
||||
export async function withActor<T>(fn: () => T, workspace?: string) {
|
||||
const actor = await getActor(workspace)
|
||||
return Actor.provide(actor.type, actor.properties, fn)
|
||||
}
|
||||
Reference in New Issue
Block a user