MCPcopy Create free account
hub / github.com/Railly/agentfiles / toggleFavorite

Method toggleFavorite

src/store.ts:213–223  ·  view source on GitHub ↗
(id: string, settings: ChopsSettings)

Source from the content-addressed store, hash-verified

211 }
212
213 toggleFavorite(id: string, settings: ChopsSettings): void {
214 const item = this.items.get(id);
215 if (!item) return;
216 item.isFavorite = !item.isFavorite;
217 if (item.isFavorite) {
218 if (!settings.favorites.includes(id)) settings.favorites.push(id);
219 } else {
220 settings.favorites = settings.favorites.filter((f) => f !== id);
221 }
222 this.trigger("updated");
223 }
224
225 getToolCounts(): Map<string, number> {
226 const counts = new Map<string, number>();

Callers

nothing calls this directly

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected