Re-use setRepoResults instead of having a setReposResult message (#3506)
This commit is contained in:
Родитель
1739af4013
Коммит
a6b3d38939
|
@ -732,11 +732,6 @@ interface SetModelAlertsViewStateMessage {
|
|||
viewState: ModelAlertsViewState;
|
||||
}
|
||||
|
||||
interface SetReposResultsMessage {
|
||||
t: "setReposResults";
|
||||
reposResults: VariantAnalysisScannedRepositoryResult[];
|
||||
}
|
||||
|
||||
interface OpenModelPackMessage {
|
||||
t: "openModelPack";
|
||||
path: string;
|
||||
|
@ -754,8 +749,7 @@ interface StopEvaluationRunMessage {
|
|||
export type ToModelAlertsMessage =
|
||||
| SetModelAlertsViewStateMessage
|
||||
| SetVariantAnalysisMessage
|
||||
| SetRepoResultsMessage
|
||||
| SetReposResultsMessage;
|
||||
| SetRepoResultsMessage;
|
||||
|
||||
export type FromModelAlertsMessage =
|
||||
| CommonFromViewMessages
|
||||
|
|
|
@ -143,15 +143,15 @@ export class ModelAlertsView extends AbstractWebview<
|
|||
}
|
||||
|
||||
public async updateReposResults(
|
||||
reposResults: VariantAnalysisScannedRepositoryResult[],
|
||||
repoResults: VariantAnalysisScannedRepositoryResult[],
|
||||
): Promise<void> {
|
||||
if (!this.isShowingPanel) {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.postMessage({
|
||||
t: "setReposResults",
|
||||
reposResults,
|
||||
t: "setRepoResults",
|
||||
repoResults,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -66,10 +66,6 @@ export function ModelAlerts({
|
|||
setVariantAnalysis(msg.variantAnalysis);
|
||||
break;
|
||||
}
|
||||
case "setReposResults": {
|
||||
setRepoResults(msg.reposResults);
|
||||
break;
|
||||
}
|
||||
case "setRepoResults": {
|
||||
setRepoResults((oldRepoResults) => {
|
||||
const newRepoIds = msg.repoResults.map((r) => r.repositoryId);
|
||||
|
|
Загрузка…
Ссылка в новой задаче