Files
tf_code/packages/opencode/src/env/index.ts
Jérôme Benoit 52bb43eebd fix: SAP AI Core Vercel AI SDK v2 support (#5180)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
2025-12-08 11:27:47 -06:00

27 lines
505 B
TypeScript

import { Instance } from "../project/instance"
export namespace Env {
const state = Instance.state(() => {
return process.env as Record<string, string | undefined>
})
export function get(key: string) {
const env = state()
return env[key]
}
export function all() {
return state()
}
export function set(key: string, value: string) {
const env = state()
env[key] = value
}
export function remove(key: string) {
const env = state()
delete env[key]
}
}