File tree Expand file tree Collapse file tree 4 files changed +6
-1
lines changed
Expand file tree Collapse file tree 4 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -41,5 +41,6 @@ export const createTestCliEnv = (overrides: Partial<CliEnv> = {}): CliEnv => ({
4141 CODEBUFF_CLI_TARGET : undefined ,
4242 CODEBUFF_RG_PATH : undefined ,
4343 CODEBUFF_SCROLL_MULTIPLIER : undefined ,
44+ FREEBUFF_MODE : undefined ,
4445 ...overrides ,
4546} )
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ export type CliEnv = BaseEnv & {
6969 CODEBUFF_RG_PATH ?: string
7070 CODEBUFF_SCROLL_MULTIPLIER ?: string
7171 CODEBUFF_PERF_TEST ?: string
72+ FREEBUFF_MODE ?: string
7273}
7374
7475/**
Original file line number Diff line number Diff line change 11import type { ToolName } from '@codebuff/sdk'
22
3+ import { getCliEnv } from './env'
4+
35/**
46 * Freebuff build-time flag. When true, the CLI is built as Freebuff (free-only variant).
57 * Injected via --define at compile time; enables dead-code elimination by the bundler.
68 */
7- export const IS_FREEBUFF = process . env . FREEBUFF_MODE === 'true'
9+ export const IS_FREEBUFF = getCliEnv ( ) . FREEBUFF_MODE === 'true'
810
911// Agent IDs that should not be rendered in the CLI UI
1012export const HIDDEN_AGENT_IDS = [ 'codebuff/context-pruner' ] as const
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ export const getCliEnv = (): CliEnv => ({
6969 CODEBUFF_RG_PATH : process . env . CODEBUFF_RG_PATH ,
7070 CODEBUFF_SCROLL_MULTIPLIER : process . env . CODEBUFF_SCROLL_MULTIPLIER ,
7171 CODEBUFF_PERF_TEST : process . env . CODEBUFF_PERF_TEST ,
72+ FREEBUFF_MODE : process . env . FREEBUFF_MODE ,
7273} )
7374
7475/**
You can’t perform that action at this time.
0 commit comments