MCPcopy Index your code
hub / github.com/codeaashu/claude-code / transition

Method transition

src/ink/screen.ts:153–162  ·  view source on GitHub ↗

* Returns the pre-serialized ANSI string to transition from one style to * another. Cached by (fromId, toId) — zero allocations after first call * for a given pair.

(fromId: number, toId: number)

Source from the content-addressed store, hash-verified

151 * for a given pair.
152 */
153 transition(fromId: number, toId: number): string {
154 if (fromId === toId) return ''
155 const key = fromId * 0x100000 + toId
156 let str = this.transitionCache.get(key)
157 if (str === undefined) {
158 str = ansiCodesToString(diffAnsiCodes(this.get(fromId), this.get(toId)))
159 this.transitionCache.set(key, str)
160 }
161 return str
162 }
163
164 /**
165 * Intern a style that is `base + inverse`. Cached by base ID so

Callers 3

renderMethod · 0.80
transitionStyleFunction · 0.80
renderFrameSliceFunction · 0.80

Calls 3

getMethod · 0.95
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected