MCPcopy Create free account
hub / github.com/ShipSecAI/studio / fetchLibrary

Function fetchLibrary

frontend/src/store/artifactStore.ts:77–92  ·  view source on GitHub ↗
(filters)

Source from the content-addressed store, hash-verified

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 },

Callers 4

ArtifactSelectorFunction · 0.85
ArtifactLibraryFunction · 0.85
handleSearchFunction · 0.85
handleRefreshFunction · 0.85

Calls 1

listMethod · 0.65

Tested by

no test coverage detected