目录

向量数据库存储位置

生成规则

LanceDB 存储位置:~/.continue/index/lancedb

  • UsersjunjianGitHubcontinuedevcontinue-0.9.191-vscodeextensionsvscodeNONEvectordb_OpenAIEmbeddingsProviderbge-base-zh-v1.5.lance
  • UsersjunjianGitHubcontinuedevcontinue-0.9.191-vscodeextensionsvscodeNONEvectordb_TransformersJsEmbeddingsProviderall-MiniLM-L6-v2.lance
  • UsersjunjianGitHubcontinuedevcontinue-0.9.191-vscodeextensionsvscodeNONEvectordb_TransformersJsEmbeddingsProviderbge-small-zh-v1.5.lance

向量数据库存储目录名字的组成部分:

  • IndexTag.directory: /Users/junjian/GitHub/continuedev/continue-0.9.191-vscode/extensions/vscode
  • IndexTag.branch: NONE
  • IndexTag.artifactId: vectordb::_TransformersJsEmbeddingsProvider::bge-small-zh-v1.5

变量IDE ExtensionsBranchEmbedding ProviderEmbedding Model

代码分析

源代码:core/indexing/LanceDbIndex.ts

export class LanceDbIndex implements CodebaseIndex {
  get artifactId(): string {
    return `vectordb::${this.embeddingsProvider.id}`;
  }

  private tableNameForTag(tag: IndexTag) {
    return tagToString(tag).replace(/[^\w-_.]/g, "");
  }

}

源代码:core/indexing/refreshIndex.ts

export function tagToString(tag: IndexTag): string {
  return `${tag.directory}::${tag.branch}::${tag.artifactId}`;
}

参考资料