Tweak workspace settings and a bunch of small things

This commit is contained in:
Gregory Schier
2025-07-18 08:47:14 -07:00
parent 4c375ed3e9
commit bcde4de4a7
28 changed files with 450 additions and 271 deletions

View File

@@ -4,8 +4,11 @@ import { InlineCode } from '../components/core/InlineCode';
import { showConfirmDelete } from './confirm';
import { resolvedModelName } from './resolvedModelName';
export async function deleteModelWithConfirm(model: AnyModel | null): Promise<boolean> {
if (model == null ) {
export async function deleteModelWithConfirm(
model: AnyModel | null,
options: { confirmName?: string } = {},
): Promise<boolean> {
if (model == null) {
console.warn('Tried to delete null model');
return false;
}
@@ -13,6 +16,7 @@ export async function deleteModelWithConfirm(model: AnyModel | null): Promise<bo
const confirmed = await showConfirmDelete({
id: 'delete-model-' + model.id,
title: 'Delete ' + modelTypeLabel(model),
requireTyping: options.confirmName,
description: (
<>
Permanently delete <InlineCode>{resolvedModelName(model)}</InlineCode>?