Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ final class AssemblyAIStreamingTranscriptionProvider: BuddyTranscriptionProvider
) async throws -> any BuddyStreamingTranscriptionSession {
// Fetch a fresh temporary token from the proxy before each session
let temporaryToken = try await fetchTemporaryToken()
print("🎙️ AssemblyAI: fetched temporary token (\(temporaryToken.prefix(20))...)")
// Log success only — never log any part of the token value.
// Even a 20-char prefix narrows brute-force space and confirms a valid token was issued.
print("🎙️ AssemblyAI: fetched temporary token (OK)")

let session = AssemblyAIStreamingTranscriptionSession(
apiKey: nil,
Expand Down
11 changes: 7 additions & 4 deletions leanring-buddy/CompanionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ final class CompanionManager: ObservableObject {
},
submitDraftText: { [weak self] finalTranscript in
self?.lastTranscript = finalTranscript
print("🗣️ Companion received transcript: \(finalTranscript)")
// Do not log the transcript verbatim — it contains user speech (PII).
print("🗣️ Companion received transcript (\(finalTranscript.count) chars)")
ClickyAnalytics.trackUserMessageSent(transcript: finalTranscript)
self?.sendTranscriptToClaudeWithScreenshot(transcript: finalTranscript)
}
Expand Down Expand Up @@ -676,9 +677,10 @@ final class CompanionManager: ObservableObject {
detectedElementScreenLocation = globalLocation
detectedElementDisplayFrame = displayFrame
ClickyAnalytics.trackElementPointed(elementLabel: parseResult.elementLabel)
print("🎯 Element pointing: (\(Int(pointCoordinate.x)), \(Int(pointCoordinate.y))) → \"\(parseResult.elementLabel ?? "element")\"")
// Do not log coordinates or element labels — they reveal what is on the user's screen.
print("🎯 Element pointing: coordinate resolved")
} else {
print("🎯 Element pointing: \(parseResult.elementLabel ?? "no element")")
print("🎯 Element pointing: no coordinate, skipping navigation")
}

// Save this exchange to conversation history (with the point tag
Expand Down Expand Up @@ -1017,7 +1019,8 @@ final class CompanionManager: ObservableObject {
detectedElementBubbleText = parseResult.spokenText
detectedElementScreenLocation = globalLocation
detectedElementDisplayFrame = displayFrame
print("🎯 Onboarding demo: pointing at \"\(parseResult.elementLabel ?? "element")\" — \"\(parseResult.spokenText)\"")
// Do not log element labels or spoken text — they reveal screen content.
print("🎯 Onboarding demo: pointing at element")
} catch {
print("⚠️ Onboarding demo error: \(error)")
}
Expand Down
7 changes: 2 additions & 5 deletions leanring-buddy/ElementLocationDetector.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,7 @@ class ElementLocationDetector {
// Convert from top-left origin (Computer Use / CoreGraphics) to bottom-left origin (AppKit)
let scaledYBottomLeftOrigin = CGFloat(displayHeightInPoints) - scaledYTopLeftOrigin

print("🎯 ElementLocationDetector: mapped (\(Int(clampedX)), \(Int(clampedY))) in " +
"\(computerUseResolution.width)x\(computerUseResolution.height) → " +
"(\(Int(scaledX)), \(Int(scaledYBottomLeftOrigin))) in " +
"\(displayWidthInPoints)x\(displayHeightInPoints) display-local AppKit coords")
// Do not log coordinates — they reveal the pixel location of elements on the user's screen.

return CGPoint(x: scaledX, y: scaledYBottomLeftOrigin)
}
Expand Down Expand Up @@ -254,7 +251,7 @@ class ElementLocationDetector {

let x = CGFloat(coordinate[0].doubleValue)
let y = CGFloat(coordinate[1].doubleValue)
print("🎯 ElementLocationDetector: raw coordinate (\(Int(x)), \(Int(y)))")
// Do not log coordinate values — they reveal element positions on the user's screen.
return CGPoint(x: x, y: y)
}

Expand Down