MCPcopy Index your code
hub / github.com/simstudioai/sim / serializeConnectorOverview

Function serializeConnectorOverview

apps/sim/lib/copilot/vfs/serializers.ts:260–279  ·  view source on GitHub ↗
(connectors: SerializableConnectorConfig[])

Source from the content-addressed store, hash-verified

258 * per-connector schema file for full config details.
259 */
260export function serializeConnectorOverview(connectors: SerializableConnectorConfig[]): string {
261 const rows = connectors.map((c) => {
262 const provider = c.auth.provider ?? c.auth.mode
263 const scopes = c.auth.requiredScopes?.length ? c.auth.requiredScopes.join(', ') : '(none)'
264 return `| ${c.id} | ${c.name} | ${provider} | ${scopes} |`
265 })
266
267 return [
268 '# Available KB Connectors',
269 '',
270 'Use `read("knowledgebases/connectors/{type}.json")` to get the full config schema before calling `add_connector`.',
271 '',
272 '| Type | Name | OAuth Provider | Required Scopes |',
273 '|------|------|---------------|-----------------|',
274 ...rows,
275 '',
276 'To add a connector, the user must have an OAuth credential for that provider.',
277 'Check `environment/credentials.json` for available credential IDs.',
278 ].join('\n')
279}
280
281/**
282 * Serialize workspace file metadata for VFS files/{path}/{name}/meta.json.

Callers 1

getStaticComponentFilesFunction · 0.90

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected