forked from continuedev/continue
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.ts
61 lines (57 loc) · 2.36 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { ContextProviderName } from "../../index.js";
import { BaseContextProvider } from "../index.js";
import CodeContextProvider from "./CodeContextProvider.js";
import CodebaseContextProvider from "./CodebaseContextProvider.js";
import CurrentFileContextProvider from "./CurrentFileContextProvider.js";
import DatabaseContextProvider from "./DatabaseContextProvider.js";
import DiffContextProvider from "./DiffContextProvider.js";
import DocsContextProvider from "./DocsContextProvider.js";
import FileTreeContextProvider from "./FileTreeContextProvider.js";
import FolderContextProvider from "./FolderContextProvider.js";
import GitHubIssuesContextProvider from "./GitHubIssuesContextProvider.js";
import GitLabMergeRequestContextProvider from "./GitLabMergeRequestContextProvider.js";
import GoogleContextProvider from "./GoogleContextProvider.js";
import HttpContextProvider from "./HttpContextProvider.js";
import JiraIssuesContextProvider from "./JiraIssuesContextProvider/index.js";
import LocalsProvider from "./LocalsProvider.js";
import OSContextProvider from "./OSContextProvider.js";
import OpenFilesContextProvider from "./OpenFilesContextProvider.js";
import PostgresContextProvider from "./PostgresContextProvider.js";
import ProblemsContextProvider from "./ProblemsContextProvider.js";
import SearchContextProvider from "./SearchContextProvider.js";
import TerminalContextProvider from "./TerminalContextProvider.js";
import URLContextProvider from "./URLContextProvider.js";
const Providers: (typeof BaseContextProvider)[] = [
DiffContextProvider,
FileTreeContextProvider,
GitHubIssuesContextProvider,
GoogleContextProvider,
TerminalContextProvider,
LocalsProvider,
OpenFilesContextProvider,
HttpContextProvider,
SearchContextProvider,
OSContextProvider,
CodebaseContextProvider,
ProblemsContextProvider,
FolderContextProvider,
DocsContextProvider,
GitLabMergeRequestContextProvider,
// CodeHighlightsContextProvider,
// CodeOutlineContextProvider,
JiraIssuesContextProvider,
PostgresContextProvider,
DatabaseContextProvider,
CodeContextProvider,
CurrentFileContextProvider,
URLContextProvider,
];
export function contextProviderClassFromName(
name: ContextProviderName,
): typeof BaseContextProvider | undefined {
const cls = Providers.find((cls) => cls.description.title === name);
if (!cls) {
return undefined;
}
return cls;
}