Terminal Work In Progress

This commit is contained in:
Hariharan Mudaliar 2026-03-04 01:46:26 +05:30
commit e59d35d89a
No known key found for this signature in database
GPG key ID: 025583EB0BE5640E
12 changed files with 570 additions and 77 deletions

View file

@ -109,6 +109,14 @@ struct ContentView: View {
return CGSize(width: baseSize.width, height: resolvedHeight)
}
if coordinator.currentView == .terminal {
// Dynamic height: up to terminalMaxHeightFraction of screen, min 300pt
let screenHeight = NSScreen.main?.visibleFrame.height ?? 800
let maxFraction = Defaults[.terminalMaxHeightFraction]
let terminalHeight = min(screenHeight * maxFraction, max(300, screenHeight * maxFraction))
return CGSize(width: baseSize.width, height: terminalHeight)
}
if coordinator.currentView == .extensionExperience {
if let preferredHeight = extensionTabPreferredHeight(baseSize: baseSize) {
return CGSize(width: baseSize.width, height: preferredHeight)
@ -832,6 +840,8 @@ struct ContentView: View {
NotchNotesView()
case .clipboard:
NotchNotesView()
case .terminal:
NotchTerminalView()
case .extensionExperience:
if let payload = currentExtensionTabPayload() {
ExtensionNotchExperienceTabView(payload: payload)