Files
Termind/Frameworks/TermindDomain/Sessions/TerminalCustomConfiguration.swift
T
Kaede Akino 82d871c4fe refactor: separate feature policies and UI workflows
Move connection policy out of ProAccess, keep terminal uploads with their
session, and share question interaction and highlight editing operations.
Consolidate CPU usage and settings snapshot handling, and remove obsolete
terminal selection, theme helpers, and hard-coded latest-schema assertions.

Fix draining connection-pool recovery and stale pane upload bindings. Keep
screenshot matrices opt-in and retain behavioral migration coverage.

Validation: 2468 macOS tests passed serially, 31 iOS tests passed, and both
SSH forwarding regressions passed against the local OpenSSH fixture.
Both app builds, Swift formatting, AppStrings, and Chinese localization
checks passed. Parallel test runs still exhibit intermittent timeouts.
2026-10-02 16:40:27 +08:00

28 lines
1016 B
Swift

import Foundation
public nonisolated struct TerminalCustomConfiguration: Hashable, Sendable {
public nonisolated struct Entry: Hashable, Sendable {
public var key: String
public var value: String
public init(key: String, value: String) {
self.key = key
self.value = value
}
}
public var entries: [Entry]
public init(_ text: String) {
entries = text.split(separator: "\n", omittingEmptySubsequences: false).compactMap {
rawLine in
let line = rawLine.trimmingCharacters(in: .whitespaces)
guard !line.isEmpty, !line.hasPrefix("#"), let separator = line.firstIndex(of: "=")
else { return nil }
let key = line[..<separator].trimmingCharacters(in: .whitespaces)
guard !key.isEmpty else { return nil }
let value = line[line.index(after: separator)...].trimmingCharacters(in: .whitespaces)
return Entry(key: key, value: value)
}
}
}