MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _pasteCollapseLinesFromConfig

Function _pasteCollapseLinesFromConfig

ui-tui/src/app/useConfigSync.ts:137–157  ·  view source on GitHub ↗
(cfg: ConfigFullResponse | null)

Source from the content-addressed store, hash-verified

135}
136
137const _pasteCollapseLinesFromConfig = (cfg: ConfigFullResponse | null): number => {
138 if (!cfg?.config) {
139 return 5
140 }
141
142 const raw = cfg.config.paste_collapse_threshold
143
144 if (typeof raw === 'number' && Number.isFinite(raw) && raw >= 0) {
145 return Math.round(raw)
146 }
147
148 if (typeof raw === 'string') {
149 const n = parseInt(raw, 10)
150
151 if (Number.isFinite(n) && n >= 0) {
152 return n
153 }
154 }
155
156 return 5
157}
158
159const _pasteCollapseCharsFromConfig = (cfg: ConfigFullResponse | null): number => {
160 if (!cfg?.config) {

Callers 1

applyDisplayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected