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

Function loadTagDefinitions

apps/sim/lib/knowledge/documents/service.ts:194–203  ·  view source on GitHub ↗
(
  knowledgeBaseId: string,
  executor: DbExecutor = db
)

Source from the content-addressed store, hash-verified

192type DbExecutor = Pick<typeof db, 'select'>
193
194async function loadTagDefinitions(
195 knowledgeBaseId: string,
196 executor: DbExecutor = db
197): Promise<TagDefinitionsByName> {
198 const defs = await executor
199 .select()
200 .from(knowledgeBaseTagDefinitions)
201 .where(eq(knowledgeBaseTagDefinitions.knowledgeBaseId, knowledgeBaseId))
202 return new Map(defs.map((def) => [def.displayName, def]))
203}
204
205function resolveDocumentTags(
206 tagData: DocumentTagData[],

Callers 2

createDocumentRecordsFunction · 0.85
createSingleDocumentFunction · 0.85

Calls 1

eqFunction · 0.50

Tested by

no test coverage detected