Prettier backfill

This commit is contained in:
Matt Rubens
2025-01-17 14:11:28 -05:00
parent 3bcb4ff8c5
commit 60a0a824b9
174 changed files with 15715 additions and 15428 deletions

View File

@@ -10,26 +10,26 @@ export interface GitCommit {
class GitService {
private commits: GitCommit[] | null = null
private lastQuery: string = ''
private lastQuery: string = ""
async searchCommits(query: string = ''): Promise<GitCommit[]> {
async searchCommits(query: string = ""): Promise<GitCommit[]> {
if (query === this.lastQuery && this.commits) {
return this.commits
}
// Request search from extension
vscode.postMessage({ type: 'searchCommits', query })
vscode.postMessage({ type: "searchCommits", query })
// Wait for response
const response = await new Promise<GitCommit[]>((resolve) => {
const handler = (event: MessageEvent) => {
const message = event.data
if (message.type === 'commitSearchResults') {
window.removeEventListener('message', handler)
if (message.type === "commitSearchResults") {
window.removeEventListener("message", handler)
resolve(message.commits)
}
}
window.addEventListener('message', handler)
window.addEventListener("message", handler)
})
this.commits = response
@@ -39,8 +39,8 @@ class GitService {
clearCache() {
this.commits = null
this.lastQuery = ''
this.lastQuery = ""
}
}
export const gitService = new GitService()
export const gitService = new GitService()