adds schema view and schema generating command

This commit is contained in:
2026-11-03 09:35:41 +01:00
parent cc41decccb
commit 600d4874d2
62 changed files with 4416 additions and 105 deletions
@@ -93,6 +93,28 @@ extension WorkspaceModel {
if panel == .editor { editor?.requestTextFocus() }
}
// MARK: Schema view
/// Opens the Schema view in a Laravel app and reads the command and dump; anywhere else it does nothing.
func openSchemaView() {
guard let schema, schema.isLaravelApp, !layout.isSchemaViewOpen else { return }
layout.openSchemaView()
focusRequest = nil
track { await schema.opened() }
}
/// Hands the keyboard back to the column that had it before the view opened.
func closeSchemaView() {
guard layout.isSchemaViewOpen else { return }
layout.closeSchemaView()
guard let panel = layout.activePanel else {
focusRequest = nil
return
}
focusRequest = FocusRequest(.panel(panel))
if panel == .editor { editor?.requestTextFocus() }
}
// MARK: Focus and the row cursor
func focus(_ panel: Panel) {