MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getCompanion

Function getCompanion

src/buddy/companion.ts:127–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125// so species renames and SPECIES-array edits can't break stored companions,
126// and editing config.companion can't fake a rarity.
127export function getCompanion(): Companion | undefined {
128 const stored = getGlobalConfig().companion
129 if (!stored) return undefined
130 const { bones } = roll(companionUserId())
131 // bones last so stale bones fields in old-format configs get overridden
132 return { ...stored, ...bones }
133}
134
135

Callers 4

companionReservedColumnsFunction · 0.85
CompanionSpriteFunction · 0.85
CompanionFloatingBubbleFunction · 0.85

Calls 3

getGlobalConfigFunction · 0.85
rollFunction · 0.85
companionUserIdFunction · 0.85

Tested by

no test coverage detected