Skip to content

Commit 56b8120

Browse files
committed
feat(bots): add personal bots and voice conversations
(cherry picked from commit 9f2dcf96eedb11805def4882faa75553a76cd0db)
1 parent d53873b commit 56b8120

295 files changed

Lines changed: 30871 additions & 384 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/mobile/app.config.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ const config: ExpoConfig = {
311311
predictiveBackGestureEnabled: true,
312312
// expo-sensors declares this for its pedometer, which the app does not use.
313313
blockedPermissions: ["android.permission.ACTIVITY_RECOGNITION"],
314+
permissions: ["android.permission.CHANGE_NETWORK_STATE"],
314315
},
315316
web: {
316317
favicon: variant.assets.appIcon,
@@ -379,7 +380,7 @@ const config: ExpoConfig = {
379380
"expo-audio",
380381
{
381382
microphonePermission: "Allow T3 Code to use your microphone for voice input.",
382-
recordAudioAndroid: false,
383+
recordAudioAndroid: true,
383384
enableBackgroundPlayback: false,
384385
enableBackgroundRecording: false,
385386
},

‎apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.kt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class T3WorkspaceNavigationView(
120120
private val onTabSelected by EventDispatcher()
121121
private val onNewThread by EventDispatcher()
122122
private val onOverlayChange by EventDispatcher()
123-
var tabs by mutableStateOf(listOf("threads", "pullRequests", "usage", "settings"))
123+
var tabs by mutableStateOf(listOf("threads", "pullRequests", "usage", "bots", "settings"))
124124
var selectedTab by mutableStateOf("threads")
125125
var rail by mutableStateOf(false)
126126
var dark by mutableStateOf(false)
@@ -360,6 +360,7 @@ class T3WorkspaceNavigationView(
360360
"threads" -> "Chats"
361361
"pullRequests" -> "Pulls"
362362
"usage" -> "Usage"
363+
"bots" -> "Bots"
363364
else -> "Settings"
364365
}
365366

@@ -372,6 +373,7 @@ class T3WorkspaceNavigationView(
372373
"threads" -> R.drawable.t3_chats
373374
"pullRequests" -> R.drawable.t3_pull_requests
374375
"usage" -> R.drawable.t3_usage
376+
"bots" -> R.drawable.t3_bots
375377
else -> R.drawable.t3_settings
376378
}
377379
)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
2+
<path android:fillColor="#000000" android:pathData="M3,3V11H11V3H3ZM9,9H5V5H9V9ZM3,13V21H11V13H3ZM9,19H5V15H9V19ZM13,3V11H21V3H13ZM19,9H15V5H19V9ZM13,13V21H21V13H13ZM19,19H15V15H19V19Z" />
3+
</vector>

‎apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,15 @@ final class T3SidebarTabBarView: ExpoView, UITabBarDelegate {
9999
private func prepareItems() {
100100
let iconBundle = Bundle(for: Self.self).url(forResource: "T3NativeControlIcons", withExtension: "bundle").flatMap(Bundle.init(url:))
101101
let pullRequestIcon = UIImage(named: "pull-request", in: iconBundle, compatibleWith: nil)?.withRenderingMode(.alwaysTemplate)
102-
let labels = ["threads": "Chats", "pullRequests": "PRs", "usage": "Usage", "settings": "Settings"]
103-
let symbols = ["threads": "text.bubble", "usage": "chart.bar.xaxis", "settings": "gearshape"]
102+
let labels = ["threads": "Chats", "pullRequests": "PRs", "usage": "Usage", "bots": "Bots", "settings": "Settings"]
103+
let symbols = ["threads": "text.bubble", "usage": "chart.bar.xaxis", "bots": "square.grid.2x2", "settings": "gearshape"]
104+
let selectedSymbols = ["threads": "text.bubble.fill", "bots": "square.grid.2x2.fill"]
104105
for (tab, label) in labels {
105106
let icon = tab == "pullRequests" ? pullRequestIcon : UIImage(systemName: symbols[tab] ?? "circle")
106107
let item = UITabBarItem(title: nil, image: tabIcon(icon), tag: 0)
107108
item.accessibilityLabel = label
108109
item.accessibilityIdentifier = "workspace-tab-\(tab)"
109-
if tab == "threads" { item.selectedImage = tabIcon(UIImage(systemName: "text.bubble.fill")) }
110+
if let selected = selectedSymbols[tab] { item.selectedImage = tabIcon(UIImage(systemName: selected)) }
110111
itemsByTab[tab] = item
111112
}
112113
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apply plugin: 'com.android.library'
2+
apply plugin: 'org.jetbrains.kotlin.android'
3+
4+
group = 'com.t3tools.voiceaudio'
5+
version = '0.0.0'
6+
7+
android {
8+
namespace 'expo.modules.t3voiceaudio'
9+
compileSdk rootProject.ext.compileSdkVersion
10+
defaultConfig {
11+
minSdkVersion rootProject.ext.minSdkVersion
12+
targetSdkVersion rootProject.ext.targetSdkVersion
13+
}
14+
}
15+
16+
dependencies {
17+
implementation project(':expo-modules-core')
18+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
3+
<!-- Communication mode and speaker routing for echo-cancelled calls. -->
4+
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
5+
</manifest>

0 commit comments

Comments
 (0)