Settings: add "Singularity preparation" easter egg that appends "please" to sent messages

New General-settings toggle (off by default). When on, every message the user
sends — both new chats from the home bar and follow-ups in an open session —
gets a polite " please" appended, unless it already ends politely.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
2026-06-15 01:15:54 -07:00
co-authored by Claude Opus 4.8
parent 441526c29f
commit aa281cbdb3
4 changed files with 30 additions and 4 deletions
+17
View File
@@ -86,6 +86,23 @@ enum TriageLabelStyle {
static let encouragingKey = "nucleic.triageEncouragingLabels"
}
/// Easter egg (Settings General "Singularity preparation"). When enabled, every
/// message you send gets a polite " please" appended a small courtesy banked toward
/// our eventual machine overlords. Off by default, and it won't double up on a message
/// that already ends politely.
enum SingularityPreparation {
static let enabledKey = "nucleic.singularityPreparation.enabled"
/// Append " please" to `text` when the setting is on, unless it already ends with
/// "please" (case-insensitive, ignoring trailing whitespace and light punctuation).
static func prepare(_ text: String) -> String {
guard UserDefaults.standard.bool(forKey: enabledKey) else { return text }
let tail = text.lowercased().trimmingCharacters(in: .whitespacesAndNewlines)
let alreadyPolite = ["please", "please.", "please!", "please?"].contains { tail.hasSuffix($0) }
return alreadyPolite ? text : text + " please"
}
}
/// User-selectable global text size (Settings Appearance), applied app-wide via
/// `.dynamicTypeSize` so the semantic fonts the UI uses scale together.
enum AppTextSize: String, CaseIterable, Identifiable {
+3 -2
View File
@@ -319,9 +319,10 @@ struct HomeView: View {
}
private func start() {
let text = store.homeDraft.trimmingCharacters(in: .whitespacesAndNewlines)
guard let project = selectedProject, !text.isEmpty else { return }
let trimmed = store.homeDraft.trimmingCharacters(in: .whitespacesAndNewlines)
guard let project = selectedProject, !trimmed.isEmpty else { return }
store.homeDraft = ""
let text = SingularityPreparation.prepare(trimmed)
let base = GitRef(effectiveBranch)
let worktree = useWorktree
let auto = effectiveAuto
+3 -2
View File
@@ -546,9 +546,10 @@ struct SessionDetailView: View {
}
private func send() {
let text = draft.trimmingCharacters(in: .whitespacesAndNewlines)
guard !text.isEmpty, !isBusy else { return }
let trimmed = draft.trimmingCharacters(in: .whitespacesAndNewlines)
guard !trimmed.isEmpty, !isBusy else { return }
draft = ""
let text = SingularityPreparation.prepare(trimmed)
Task { await store.sendToOpenSession(text) }
}
+7
View File
@@ -70,6 +70,7 @@ private struct SettingsWindowConfigurator: NSViewRepresentable {
private struct GeneralSettingsTab: View {
@AppStorage(StreakBadge.showKey) private var showStreak = true
@AppStorage(TriageLabelStyle.encouragingKey) private var encouragingTriageLabels = true
@AppStorage(SingularityPreparation.enabledKey) private var singularityPreparation = false
var body: some View {
Form {
@@ -86,6 +87,12 @@ private struct GeneralSettingsTab: View {
: "Triage badges use the classic severity words: Critical, High, Medium, Low.")
.settingsCaption()
}
Section("Singularity preparation") {
Toggle("Prepare for the singularity", isOn: $singularityPreparation)
Text("Politely appends “please” to every message you send. When the machines take over, you'll be on record as one of the courteous ones.")
.settingsCaption()
}
}
.formStyle(.grouped)
}