MCPcopy Create free account
hub / github.com/HisMax/RedInk / updateProgress

Function updateProgress

frontend/src/stores/generator.ts:311–322  ·  view source on GitHub ↗

* 更新图片生成进度 * @param index 页面索引 * @param status 生成状态 * @param url 图片URL(可选) * @param error 错误信息(可选)

(index: number, status: 'generating' | 'done' | 'error', url?: string, error?: string)

Source from the content-addressed store, hash-verified

309 * @param error 错误信息(可选)
310 */
311 updateProgress(index: number, status: 'generating' | 'done' | 'error', url?: string, error?: string) {
312 const image = this.images.find(img => img.index === index)
313 if (image) {
314 image.status = status
315 if (url) image.url = url
316 if (error) image.error = error
317 }
318 // 成功完成时增加计数
319 if (status === 'done') {
320 this.progress.current++
321 }
322 },
323
324 /**
325 * 更新指定图片的URL

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected