-
Notifications
You must be signed in to change notification settings - Fork 807
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from justinmilner1/Add_Ctrl+backspace
- Loading branch information
Showing
82 changed files
with
1,945 additions
and
586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Chunk } from ".."; | ||
|
||
export interface EmbeddingsCacheChunk { | ||
vector: number[]; | ||
startLine: number; | ||
endLine: number; | ||
contents: string; | ||
} | ||
|
||
interface ArtifactReturnTypes { | ||
chunks: Chunk[]; | ||
embeddings: EmbeddingsCacheChunk[]; | ||
} | ||
|
||
export type ArtifactType = keyof ArtifactReturnTypes; | ||
|
||
export interface EmbeddingsCacheResponse<T extends ArtifactType> { | ||
files: { [cacheKey: string]: ArtifactReturnTypes[T] }; | ||
} | ||
|
||
export interface IContinueServerClient { | ||
getConfig(): Promise<{ configJson: string; configJs: string }>; | ||
getFromIndexCache<T extends ArtifactType>( | ||
keys: string[], | ||
artifactId: T, | ||
repoName: string | undefined, | ||
): Promise<EmbeddingsCacheResponse<T>>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { | ||
ArtifactType, | ||
EmbeddingsCacheResponse, | ||
IContinueServerClient, | ||
} from "../interface"; | ||
|
||
export class ContinueServerClient implements IContinueServerClient { | ||
constructor( | ||
private readonly serverUrl: string, | ||
private readonly userToken: Promise<string | undefined>, | ||
) {} | ||
|
||
public async getConfig(): Promise<{ configJson: string; configJs: string }> { | ||
throw new Error("Not Implemented"); | ||
} | ||
|
||
public async getFromIndexCache<T extends ArtifactType>( | ||
keys: string[], | ||
artifactId: T, | ||
repoName: string | undefined, | ||
): Promise<EmbeddingsCacheResponse<T>> { | ||
return { files: {} }; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.