MCPcopy Index your code
hub / github.com/continuedev/continue / updateMetadataInSqlite

Method updateMetadataInSqlite

core/indexing/docs/DocsService.ts:1165–1184  ·  view source on GitHub ↗
(siteIndexingConfig: SiteIndexingConfig)

Source from the content-addressed store, hash-verified

1163 }
1164
1165 private async updateMetadataInSqlite(siteIndexingConfig: SiteIndexingConfig) {
1166 const { startUrl, title, faviconUrl } = siteIndexingConfig;
1167 const favicon = faviconUrl || (await fetchFavicon(new URL(startUrl)));
1168 if (!this.config.selectedModelByRole.embed) {
1169 console.warn(
1170 `Attempting to add metadata for ${startUrl} without embeddings provider specified`,
1171 );
1172 return;
1173 }
1174
1175 const db = await this.getOrCreateSqliteDb();
1176
1177 await db.run(
1178 `UPDATE ${DocsService.sqlitebTableName} SET title = ?, favicon = ? WHERE startUrl = ? AND embeddingsProviderId = ?`,
1179 title,
1180 favicon,
1181 startUrl,
1182 this.config.selectedModelByRole.embed.embeddingId,
1183 );
1184 }
1185
1186 private addToConfig(siteIndexingConfig: SiteIndexingConfig) {
1187 // Handles the case where a user has manually added the doc to config.json

Callers 1

syncDocsMethod · 0.95

Calls 4

getOrCreateSqliteDbMethod · 0.95
fetchFaviconFunction · 0.90
warnMethod · 0.80
runMethod · 0.65

Tested by

no test coverage detected