MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / worstState

Function worstState

graph-ui/src/twin/twin-view-model.ts:265–270  ·  view source on GitHub ↗
(states: KnowledgeState[])

Source from the content-addressed store, hash-verified

263 * could answer is not a `known` section, and saying so would launder the gap.
264 */
265export function worstState(states: KnowledgeState[]): KnowledgeState {
266 return states.reduce<KnowledgeState>(
267 (worst, state) => (STATE_RANK[state] > STATE_RANK[worst] ? state : worst),
268 'known'
269 );
270}
271
272/** Last path segment of a URI, for `file:line` captions. */
273export function displayFile(uri: string | undefined): string | undefined {

Callers 2

dataSectionFunction · 0.85

Calls 1

reduceMethod · 0.80

Tested by

no test coverage detected