MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / limitedModeReasonFromRow

Function limitedModeReasonFromRow

web/src/server/free-session/session-view.ts:3–10  ·  view source on GitHub ↗
(row: InternalSessionRow)

Source from the content-addressed store, hash-verified

1import type { InternalSessionRow, SessionStateResponse } from './types'
2
3function limitedModeReasonFromRow(row: InternalSessionRow) {
4 if ((row.access_tier ?? 'full') !== 'limited') return {}
5 return {
6 countryCode: row.country_code ?? null,
7 countryBlockReason: row.country_block_reason ?? null,
8 ipPrivacySignals: row.ip_privacy_signals ?? null,
9 }
10}
11
12/**
13 * Pure function converting an internal session row (or absence thereof) into

Callers 1

toSessionStateResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected