|
1 | | -import { CancellationToken, env, EventEmitter, ExtensionContext } from "vscode"; |
| 1 | +import { CancellationToken, EventEmitter, ExtensionContext } from "vscode"; |
2 | 2 | import { join } from "path"; |
3 | 3 | import { pathExists, readFile, remove } from "fs-extra"; |
4 | | -import { EOL } from "os"; |
5 | 4 |
|
6 | 5 | import { CodeQLCliServer } from "../cli"; |
7 | 6 | import { showAndLogExceptionWithTelemetry } from "../helpers"; |
@@ -152,37 +151,10 @@ export class RemoteQueriesManager extends DisposableObject { |
152 | 151 | ); |
153 | 152 | } |
154 | 153 |
|
155 | | - public async copyRemoteQueryRepoListToClipboard(queryId: string) { |
156 | | - const queryResult = await this.getRemoteQueryResult(queryId); |
157 | | - const repos = queryResult.analysisSummaries |
158 | | - .filter((a) => a.resultCount > 0) |
159 | | - .map((a) => a.nwo); |
160 | | - |
161 | | - if (repos.length > 0) { |
162 | | - const text = [ |
163 | | - '"new-repo-list": [', |
164 | | - ...repos.slice(0, -1).map((repo) => ` "${repo}",`), |
165 | | - ` "${repos[repos.length - 1]}"`, |
166 | | - "]", |
167 | | - ]; |
168 | | - |
169 | | - await env.clipboard.writeText(text.join(EOL)); |
170 | | - } |
171 | | - } |
172 | | - |
173 | 154 | public async openResults(query: RemoteQuery, queryResult: RemoteQueryResult) { |
174 | 155 | await this.view.showResults(query, queryResult); |
175 | 156 | } |
176 | 157 |
|
177 | | - private async getRemoteQueryResult( |
178 | | - queryId: string, |
179 | | - ): Promise<RemoteQueryResult> { |
180 | | - return await this.retrieveJsonFile<RemoteQueryResult>( |
181 | | - queryId, |
182 | | - "query-result.json", |
183 | | - ); |
184 | | - } |
185 | | - |
186 | 158 | private async retrieveJsonFile<T>( |
187 | 159 | queryId: string, |
188 | 160 | fileName: string, |
|
0 commit comments