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

Function addDataSource

src/stores/apiServer.ts:345–360  ·  view source on GitHub ↗
(partial: {
    name?: string
    baseUrl: string
    token: string
    intervalMinutes: number
    pullLimit?: number
  })

Source from the content-addressed store, hash-verified

343 }
344
345 async function addDataSource(partial: {
346 name?: string
347 baseUrl: string
348 token: string
349 intervalMinutes: number
350 pullLimit?: number
351 }) {
352 try {
353 const ds = await transport.addDataSource(partial)
354 dataSources.value.push(ds)
355 return ds
356 } catch (err) {
357 console.error('[ApiServerStore] Failed to add data source:', err)
358 return null
359 }
360 }
361
362 async function updateDataSource(
363 id: string,

Callers

nothing calls this directly

Calls 2

addDataSourceMethod · 0.80
errorMethod · 0.65

Tested by

no test coverage detected