Skip to content

Commit 49183c3

Browse files
grokifyclaude
andcommitted
fix(desktop): resolve Swift concurrency error in release build
- Fix 'reference to captured var in concurrently-executing code' error by creating immutable copy of session before MainActor.run - Exclude Info.plist and entitlements from SPM target to remove warnings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f60bd9e commit 49183c3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

apps/desktop/Package.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ let package = Package(
2323
.product(name: "AssistantKit", package: "assistantkit-swift")
2424
],
2525
path: "Sources/PlexusOneDesktop",
26+
exclude: [
27+
"Info.plist",
28+
"PlexusOneDesktop.entitlements"
29+
],
2630
resources: [
2731
.copy("Resources/AppIcon.icns")
2832
]

apps/desktop/Sources/PlexusOneDesktop/Views/NewSessionSheet.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@ struct NewSessionSheet: View {
112112
do {
113113
var session = try await sessionManager.createSession(name: sessionName, command: command)
114114
session.agentType = selectedAgentType
115+
let createdSession = session // Immutable copy for concurrent access
115116

116117
await MainActor.run {
117-
onSessionCreated(session)
118+
onSessionCreated(createdSession)
118119
dismiss()
119120
}
120121
} catch {

0 commit comments

Comments
 (0)