Skip to content

Commit 4e08d7f

Browse files
fix python bundle script for cross-platform desktop bundles. begin exploration of mobile implementation
1 parent 156d664 commit 4e08d7f

File tree

20 files changed

+11995
-47
lines changed

20 files changed

+11995
-47
lines changed

.github/workflows/build-release.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,13 @@ jobs:
4747
cd desktop
4848
npm ci
4949
50-
- name: Setup Python bundle (macOS)
51-
if: matrix.platform == 'macos-latest'
50+
- name: Setup full bundle (Python + default model + KB)
5251
env:
5352
BUNDLE_PYTHON: 1
5453
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5554
run: |
5655
cd desktop
57-
bash scripts/setup-python-bundle.sh
58-
59-
- name: Setup Python bundle (Windows)
60-
if: matrix.platform == 'windows-latest'
61-
env:
62-
BUNDLE_PYTHON: 1
63-
run: |
64-
cd desktop
65-
bash scripts/setup-python-bundle.sh
56+
bash scripts/setup-full-bundle.sh
6657
6758
- name: Build frontend
6859
run: |

apps/confidant-mobile/App.tsx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { StatusBar } from 'expo-status-bar';
2+
import { Text, TouchableOpacity } from 'react-native';
3+
import { NavigationContainer } from '@react-navigation/native';
4+
import { createNativeStackNavigator } from '@react-navigation/native-stack';
5+
import { ChatScreen } from './src/screens/ChatScreen';
6+
import { SettingsScreen } from './src/screens/SettingsScreen';
7+
import { LockScreen } from './src/screens/LockScreen';
8+
import type { RootStackParamList } from './src/types/navigation';
9+
10+
const Stack = createNativeStackNavigator<RootStackParamList>();
11+
12+
export default function App() {
13+
// TODO: replace with real lock state (e.g. from secure store)
14+
const isLocked = false;
15+
16+
return (
17+
<>
18+
<StatusBar style="auto" />
19+
<NavigationContainer>
20+
<Stack.Navigator
21+
screenOptions={{ headerShown: true }}
22+
initialRouteName={isLocked ? 'Lock' : 'Chat'}
23+
>
24+
<Stack.Screen name="Lock" component={LockScreen} options={{ title: 'Confidant' }} />
25+
<Stack.Screen
26+
name="Chat"
27+
component={ChatScreen}
28+
options={({ navigation }) => ({
29+
title: 'Chat',
30+
headerRight: () => (
31+
<TouchableOpacity onPress={() => navigation.navigate('Settings')} style={{ marginRight: 16 }}>
32+
<Text style={{ fontSize: 17, color: '#007AFF' }}>Settings</Text>
33+
</TouchableOpacity>
34+
),
35+
})}
36+
/>
37+
<Stack.Screen name="Settings" component={SettingsScreen} options={{ title: 'Settings' }} />
38+
</Stack.Navigator>
39+
</NavigationContainer>
40+
</>
41+
);
42+
}

apps/confidant-mobile/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Confidant Mobile
2+
3+
On-device chat + RAG for iOS and Android (Expo). See [mobile-on-device-plan.md](../../docs/mobile-on-device-plan.md) and [mobile-rag-design.md](../../docs/mobile-rag-design.md).
4+
5+
## Setup
6+
7+
```bash
8+
cd apps/confidant-mobile
9+
npm install
10+
```
11+
12+
Add app icons for production builds: place `icon.png` (1024×1024) and `adaptive-icon.png` (1024×1024) in `./assets/`. Expo will use defaults in development if missing.
13+
14+
## Run
15+
16+
```bash
17+
npm start
18+
```
19+
20+
Then press `i` for iOS simulator or `a` for Android emulator, or scan the QR code with Expo Go.
21+
22+
## Development build (for native modules, e.g. llama.cpp)
23+
24+
When integrating @runanywhere/llamacpp or llama.rn, create a development build:
25+
26+
```bash
27+
npx expo install expo-dev-client
28+
npx expo prebuild
29+
```
30+
31+
Then build and run with Xcode (iOS) or Android Studio (Android).

apps/confidant-mobile/app.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"expo": {
3+
"name": "Confidant",
4+
"slug": "confidant-mobile",
5+
"version": "0.1.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/icon.png",
8+
"userInterfaceStyle": "automatic",
9+
"scheme": "confidant",
10+
"ios": {
11+
"supportsTablet": true,
12+
"bundleIdentifier": "ai.confidant.mobile"
13+
},
14+
"android": {
15+
"adaptiveIcon": {
16+
"foregroundImage": "./assets/adaptive-icon.png",
17+
"backgroundColor": "#ffffff"
18+
},
19+
"package": "ai.confidant.mobile"
20+
},
21+
"plugins": []
22+
}
23+
}

apps/confidant-mobile/assets/.gitkeep

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = function (api) {
2+
api.cache(true);
3+
return {
4+
presets: ['babel-preset-expo'],
5+
};
6+
};

0 commit comments

Comments
 (0)