forked from continuedev/continue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
49 lines (45 loc) · 1.8 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
import { BaseContextProvider } from "..";
import { ContextProviderName } from "../..";
import CodebaseContextProvider from "./CodebaseContextProvider";
import CodeHighlightsContextProvider from "./CodeHighlightsContextProvider";
import CodeOutlineContextProvider from "./CodeOutlineContextProvider";
import DiffContextProvider from "./DiffContextProvider";
import DocsContextProvider from "./DocsContextProvider";
import FileTreeContextProvider from "./FileTreeContextProvider";
import FolderContextProvider from "./FolderContextProvider";
import GitHubIssuesContextProvider from "./GitHubIssuesContextProvider";
import GoogleContextProvider from "./GoogleContextProvider";
import HttpContextProvider from "./HttpContextProvider";
import OpenFilesContextProvider from "./OpenFilesContextProvider";
import ProblemsContextProvider from "./ProblemsContextProvider";
import SearchContextProvider from "./SearchContextProvider";
import TerminalContextProvider from "./TerminalContextProvider";
import URLContextProvider from "./URLContextProvider";
import JiraIssuesContextProvider from "./JiraIssuesContextProvider";
const Providers: (typeof BaseContextProvider)[] = [
DiffContextProvider,
FileTreeContextProvider,
GitHubIssuesContextProvider,
GoogleContextProvider,
TerminalContextProvider,
URLContextProvider,
OpenFilesContextProvider,
HttpContextProvider,
SearchContextProvider,
CodebaseContextProvider,
ProblemsContextProvider,
FolderContextProvider,
DocsContextProvider,
CodeHighlightsContextProvider,
CodeOutlineContextProvider,
JiraIssuesContextProvider,
];
export function contextProviderClassFromName(
name: ContextProviderName
): typeof BaseContextProvider | undefined {
const cls = Providers.find((cls) => cls.description.title === name);
if (!cls) {
return undefined;
}
return cls;
}