Skip to content

Commit

Permalink
feat: Auto-select recommended version for read-only sessions
Browse files Browse the repository at this point in the history
This updates the read-only session creator so that it picks the recommended version, should there be one.
Fixes #1354
  • Loading branch information
zusorio committed Aug 2, 2024
1 parent 52a41ea commit ef4ef9e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ export class CreateReadonlySessionComponent implements OnInit {
.flat()
.filter((v) => v.tool.id === tool.id),
);
const recommendedVersion = this.relevantToolVersions?.find(
(t) => t.config.is_recommended,
);
if (recommendedVersion) {
this.toolSelectionForm.controls.version.patchValue(recommendedVersion);
}
}

removeVersionDuplicates(
Expand Down

0 comments on commit ef4ef9e

Please sign in to comment.