MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / updateDataSource

Function updateDataSource

src/stores/apiServer.ts:362–377  ·  view source on GitHub ↗
(
    id: string,
    updates: Partial<Pick<DataSource, 'name' | 'baseUrl' | 'token' | 'intervalMinutes' | 'pullLimit' | 'enabled'>>
  )

Source from the content-addressed store, hash-verified

360 }
361
362 async function updateDataSource(
363 id: string,
364 updates: Partial<Pick<DataSource, 'name' | 'baseUrl' | 'token' | 'intervalMinutes' | 'pullLimit' | 'enabled'>>
365 ) {
366 try {
367 const ds = await transport.updateDataSource(id, updates)
368 if (ds) {
369 const idx = dataSources.value.findIndex((s) => s.id === id)
370 if (idx !== -1) dataSources.value[idx] = ds
371 }
372 return ds
373 } catch (err) {
374 console.error('[ApiServerStore] Failed to update data source:', err)
375 return null
376 }
377 }
378
379 async function deleteDataSource(id: string) {
380 try {

Callers

nothing calls this directly

Calls 2

updateDataSourceMethod · 0.80
errorMethod · 0.65

Tested by

no test coverage detected