MCPcopy Index your code
hub / github.com/TanStack/ai / getSprite

Method getSprite

packages/ai-sandbox-sprites/src/client.ts:209–217  ·  view source on GitHub ↗
(name: string, signal?: AbortSignal)

Source from the content-addressed store, hash-verified

207 }
208
209 async getSprite(name: string, signal?: AbortSignal): Promise<SpriteResource> {
210 const response = await fetch(this.spritePath(name), {
211 method: 'GET',
212 headers: this.headers(),
213 ...(signal ? { signal } : {}),
214 })
215 if (!response.ok) await this.fail('GET', this.spritePath(name), response)
216 return parseSprite(await response.text())
217 }
218
219 async deleteSprite(name: string, signal?: AbortSignal): Promise<void> {
220 const response = await fetch(this.spritePath(name), {

Callers 1

resumeMethod · 0.80

Calls 6

spritePathMethod · 0.95
headersMethod · 0.95
failMethod · 0.95
parseSpriteFunction · 0.85
textMethod · 0.65
fetchFunction · 0.50

Tested by

no test coverage detected