mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
- Add Flag module for environment variable configuration - Implement OPENCODE_AUTO_SHARE flag to automatically share new sessions - Update session creation to conditionally auto-share based on flag 🤖 Generated with [OpenCode](https://opencode.ai) Co-Authored-By: OpenCode <noreply@opencode.ai>
9 lines
226 B
TypeScript
9 lines
226 B
TypeScript
export namespace Flag {
|
|
export const OPENCODE_AUTO_SHARE = truthy("OPENCODE_AUTO_SHARE")
|
|
|
|
function truthy(key: string) {
|
|
const value = process.env[key]?.toLowerCase()
|
|
return value === "true" || value === "1"
|
|
}
|
|
}
|