add docs
This commit is contained in:
parent
66998efad9
commit
d1a451ccf4
3 changed files with 24 additions and 5 deletions
|
|
@ -20,7 +20,7 @@ class RepoMapContextProvider extends BaseContextProvider {
|
|||
REPO_MAX_CONTEXT_LENGTH_RATIO = 0.5;
|
||||
|
||||
static description: ContextProviderDescription = {
|
||||
title: "repo_map",
|
||||
title: "repo-map",
|
||||
displayTitle: "Repository Map",
|
||||
description: "List of files and signatures",
|
||||
type: "normal",
|
||||
|
|
|
|||
|
|
@ -299,23 +299,30 @@ export class CodeSnippetsCodebaseIndex implements CodebaseIndex {
|
|||
for (let i = 0; i < results.removeTag.length; i++) {
|
||||
const removeTag = results.removeTag[i];
|
||||
|
||||
const snippet = await db.get(
|
||||
let snippets = await db.get(
|
||||
`SELECT id FROM code_snippets
|
||||
WHERE cacheKey = ? AND path = ?`,
|
||||
[removeTag.cacheKey, removeTag.path],
|
||||
);
|
||||
|
||||
if (!Array.isArray(snippets)) {
|
||||
snippets = [snippets];
|
||||
}
|
||||
|
||||
if (snippet) {
|
||||
if (snippets) {
|
||||
if (!Array.isArray(snippets)) {
|
||||
snippets = [snippets];
|
||||
}
|
||||
|
||||
const snippetIds = snippets.map((row: any) => row.id).join(",");
|
||||
|
||||
await db.run(
|
||||
`
|
||||
DELETE FROM code_snippets_tags
|
||||
WHERE tag = ?
|
||||
AND snippetId = ?
|
||||
AND snippetId IN (${snippetIds})
|
||||
`,
|
||||
[tagString, snippet.id],
|
||||
[tagString],
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -301,6 +301,18 @@ Type `@locals` to reference the contents of the local variables with top n level
|
|||
}
|
||||
```
|
||||
|
||||
### Repository map
|
||||
|
||||
Provides an overview of all files and the call signatures of top-level classes, functions, and methods. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
|
||||
|
||||
This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html).
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "repo-map"
|
||||
}
|
||||
```
|
||||
|
||||
### Operating System
|
||||
|
||||
Type `@os` to reference the architecture and platform of your current operating system.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue