Skip to content

Commit 88e54cb

Browse files
authored
Test feedback - continued (#34)
- App name - Submit key on the software kb - No fix for the visionOS window 😿
1 parent 4172567 commit 88e54cb

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

VoiceAgent.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@
600600
ENABLE_PREVIEWS = YES;
601601
GENERATE_INFOPLIST_FILE = YES;
602602
INFOPLIST_FILE = VoiceAgent/Info.plist;
603-
INFOPLIST_KEY_CFBundleDisplayName = VoiceAgent;
603+
INFOPLIST_KEY_CFBundleDisplayName = "LiveKit Agent";
604604
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
605605
INFOPLIST_KEY_LSApplicationCategoryType = "";
606606
INFOPLIST_KEY_NSCameraUsageDescription = "VoiceAgent uses your camera";
@@ -646,7 +646,7 @@
646646
ENABLE_PREVIEWS = YES;
647647
GENERATE_INFOPLIST_FILE = YES;
648648
INFOPLIST_FILE = VoiceAgent/Info.plist;
649-
INFOPLIST_KEY_CFBundleDisplayName = VoiceAgent;
649+
INFOPLIST_KEY_CFBundleDisplayName = "LiveKit Agent";
650650
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
651651
INFOPLIST_KEY_LSApplicationCategoryType = "";
652652
INFOPLIST_KEY_NSCameraUsageDescription = "VoiceAgent uses your camera";

VoiceAgent/Chat/View/ChatTextInputView.swift

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,19 @@ struct ChatTextInputView: View {
3939
.lineLimit(3)
4040
.submitLabel(.send)
4141
.onSubmit {
42+
// will be called on macOS/Simulator with hardware keyboard
4243
Task {
4344
await sendMessage()
4445
}
4546
}
47+
.onChange(of: messageText.last?.isNewline ?? false) { _, submit in
48+
// onSubmit won't be called by the submit key with software keybaord and .vertical TextField
49+
if submit {
50+
Task {
51+
await sendMessage()
52+
}
53+
}
54+
}
4655
#if !os(visionOS)
4756
.foregroundStyle(.fg1)
4857
#endif
@@ -70,11 +79,10 @@ struct ChatTextInputView: View {
7079

7180
private func sendMessage() async {
7281
guard !messageText.isEmpty else { return }
73-
defer {
74-
messageText = ""
75-
keyboardFocus = false
76-
}
77-
await chatViewModel.sendMessage(messageText)
82+
let text = messageText
83+
messageText = ""
84+
keyboardFocus = false
85+
await chatViewModel.sendMessage(text)
7886
}
7987
}
8088

VoiceAgent/Interactions/VisionInteractionView.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ struct VisionInteractionView: View {
88

99
var body: some View {
1010
HStack {
11-
participants()
11+
participants().rotation3DEffect(.degrees(30), axis: .y, anchor: .trailing)
1212
agent()
13-
chat()
13+
chat().rotation3DEffect(.degrees(-30), axis: .y, anchor: .leading)
1414
}
15-
.frame(maxWidth: .infinity, maxHeight: .infinity)
1615
}
1716

1817
@ViewBuilder

0 commit comments

Comments
 (0)