(filters)
| 75 | } |
| 76 | }, |
| 77 | async fetchLibrary(filters) { |
| 78 | set({ libraryLoading: true, libraryError: null, libraryFilters: filters }); |
| 79 | try { |
| 80 | const response = await api.artifacts.list(filters); |
| 81 | set({ |
| 82 | library: response.artifacts ?? [], |
| 83 | libraryLoading: false, |
| 84 | libraryError: null, |
| 85 | }); |
| 86 | } catch (error) { |
| 87 | set({ |
| 88 | libraryLoading: false, |
| 89 | libraryError: error instanceof Error ? error.message : 'Failed to load artifacts', |
| 90 | }); |
| 91 | } |
| 92 | }, |
| 93 | async downloadArtifact(artifact, options) { |
| 94 | set((state) => ({ |
| 95 | downloading: { ...state.downloading, [artifact.id]: true }, |
no test coverage detected