Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7c62d75
install solito
rfigueroa-truelogic Feb 22, 2023
c41f4dd
add api routes from promptable next.js starter
rfigueroa-truelogic Feb 22, 2023
1853152
r
rfigueroa-truelogic Feb 22, 2023
08c9335
add design system
rfigueroa-truelogic Feb 22, 2023
0ca545f
style fixes
rfigueroa-truelogic Feb 22, 2023
4e3ad2e
fix: uuid for react native
rfigueroa-truelogic Feb 22, 2023
0180f83
fix: onchange to onchangetext
rfigueroa-truelogic Feb 22, 2023
3a7985d
s
rfigueroa-truelogic Feb 22, 2023
0266b93
s
rfigueroa-truelogic Feb 22, 2023
b6fd3e0
add fetchPrefix for ios fetching of api
rfigueroa-truelogic Feb 22, 2023
4172dff
prefix proxy url only for mobile
rfigueroa-truelogic Feb 22, 2023
1ee6311
wip getting back stream on console on react native
rfigueroa-truelogic Feb 22, 2023
5178157
wip stream rn
rfigueroa-truelogic Feb 22, 2023
84b2f9d
add chat.web
rfigueroa-truelogic Feb 23, 2023
127449e
npm script
rfigueroa-truelogic Feb 23, 2023
e228326
fix: streaming working correctly with ngrok
rfigueroa-truelogic Feb 23, 2023
19af87b
chat component back to be universal with uniFetch
rfigueroa-truelogic Feb 23, 2023
fddabd3
s
rfigueroa-truelogic Feb 23, 2023
fd99b4f
s
rfigueroa-truelogic Feb 23, 2023
5484db9
s
rfigueroa-truelogic Feb 23, 2023
b228653
s
rfigueroa-truelogic Feb 23, 2023
5c8e6cc
s
rfigueroa-truelogic Feb 23, 2023
65631ea
s
rfigueroa-truelogic Feb 23, 2023
f26dba9
f: scroll to universal
rfigueroa-truelogic Feb 23, 2023
29dbd15
r: streaming btn and default to true back to web
rfigueroa-truelogic Feb 23, 2023
f62959a
readme
rfigueroa-truelogic Feb 23, 2023
6a3c97d
c
rfigueroa-truelogic Feb 23, 2023
645f96a
add const utility for constants
rfigueroa-truelogic Feb 23, 2023
2091571
readme update
rfigueroa-truelogic Feb 23, 2023
e5cd403
remove .idea files
rfigueroa-truelogic Feb 24, 2023
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
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ build
# misc
.DS_Store
*.pem
.idea
.idea/

# debug
npm-debug.log*
Expand All @@ -28,7 +30,7 @@ yarn-error.log*
.env.development.local
.env.test.local
.env.production.local
**/.env
**/.env

# turbo
.turbo
Expand All @@ -41,4 +43,4 @@ out.csv
.vscode


data/cache
data/cache
4 changes: 4 additions & 0 deletions apps/nextjs-promptable/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ next-env.d.ts
# misc
.DS_Store
*.pem
.idea
.idea/



# debug
npm-debug.log*
Expand Down
1 change: 1 addition & 0 deletions apps/nextjs-promptable/src/pages/api/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default async function handler(

// clear the chat history
if (clear) {
console.log('clearing chat history')
chatHistory.clear();
return res.status(200).json({});
}
Expand Down
3 changes: 2 additions & 1 deletion apps/nextjs-promptable/src/pages/api/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default async function handler(

// clear the chat history
if (clear) {
console.log('clearing chat history')
chatHistory.clear();
return res.status(200).json({});
}
Expand All @@ -28,7 +29,7 @@ export default async function handler(

// We don't know what the last message was b/c we streamed it to the client.
// so we need to find it in the list of previous messages.
const lastBotMessage = messages.reverse().find((m) => !m.isUserMessage);
const lastBotMessage = messages?.reverse().find((m) => !m.isUserMessage);
console.log("The last bot message was:", lastBotMessage);
chatHistory.addBotMessage(lastBotMessage?.text ?? "");

Expand Down
9 changes: 9 additions & 0 deletions apps/solito-app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
extends: 'next',
settings: {
next: {
rootDir: 'apps/next/',
},
},
root: true,
}
74 changes: 74 additions & 0 deletions apps/solito-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.idea/
.gradle
local.properties
*.iml

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifacts
*.jsbundle

# CocoaPods
/ios/Pods/

# Expo
.expo/*
web-build/

**/*/.expo

**/*/.next

**/*/ios
**/*/android

.turbo
build/**
7 changes: 7 additions & 0 deletions apps/solito-app/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"useTabs": false,
"tabWidth": 2,
"singleQuote": true,
"plugins": ["prettier-plugin-tailwindcss"]
}
125 changes: 125 additions & 0 deletions apps/solito-app/apps/expo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifacts
*.jsbundle

# CocoaPods
/ios/Pods/

# Expo
.expo/*
web-build/

# @generated expo-cli sync-e7dcf75f4e856f7b6f3239b3f3a7dd614ee755a8
# The following patterns were generated by expo-cli

# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# Bundle artifacts
*.jsbundle

# CocoaPods
/ios/Pods/

# Expo
.expo/
web-build/
dist/

# @end expo-cli
10 changes: 10 additions & 0 deletions apps/solito-app/apps/expo/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { NativeNavigation } from 'app/navigation/native'
import { Provider } from 'app/provider'

export default function App() {
return (
<Provider>
<NativeNavigation />
</Provider>
)
}
2 changes: 2 additions & 0 deletions apps/solito-app/apps/expo/app-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="app/rnw-overrides" />
/// <reference types="nativewind/types" />
12 changes: 12 additions & 0 deletions apps/solito-app/apps/expo/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"expo": {
"name": "solito-nativewind",
"slug": "solito-nativewind",
"version": "1.0.0",
"scheme": "solito-nativewind",
"platforms": ["ios", "android"],
"ios": {
"bundleIdentifier": "com.solito.nativewind"
}
}
}
10 changes: 10 additions & 0 deletions apps/solito-app/apps/expo/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = function (api) {
api.cache(true)
return {
presets: [['babel-preset-expo', { jsxRuntime: 'automatic' }]],
plugins: [
'react-native-reanimated/plugin',
'nativewind/babel',
],
}
}
9 changes: 9 additions & 0 deletions apps/solito-app/apps/expo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { registerRootComponent } from 'expo'
import 'react-native-polyfill-globals/auto';

import App from './App'

// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App)
19 changes: 19 additions & 0 deletions apps/solito-app/apps/expo/metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Learn more https://docs.expo.io/guides/customizing-metro
/**
* @type {import('expo/metro-config')}
*/
const { getDefaultConfig } = require('expo/metro-config')
const path = require('path')

const projectRoot = __dirname
const workspaceRoot = path.resolve(__dirname, '../..')

const config = getDefaultConfig(projectRoot)

config.watchFolders = [workspaceRoot]
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, 'node_modules'),
path.resolve(workspaceRoot, 'node_modules'),
]

module.exports = config
41 changes: 41 additions & 0 deletions apps/solito-app/apps/expo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"dependencies": {
"app": "*",
"base-64": "^1.0.0",
"expo": "^46.0.0",
"expo-linking": "~3.2.2",
"expo-splash-screen": "~0.16.1",
"expo-status-bar": "~1.4.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.69.5",
"react-native-fetch-api": "^3.0.0",
"react-native-gesture-handler": "~2.5.0",
"react-native-get-random-values": "^1.8.0",
"react-native-polyfill-globals": "^3.1.0",
"react-native-reanimated": "2.9.1",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-url-polyfill": "^1.3.0",
"react-native-web": "~0.18.7",
"text-encoding": "^0.7.0",
"web-streams-polyfill": "^3.2.1"
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@types/react": "~18.0.0",
"@types/react-native": "~0.69.1",
"tailwindcss": "^3.0.24",
"typescript": "^4.6.3"
},
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"main": "index.js",
"version": "1.0.0",
"private": true,
"name": "expo-app"
}
Loading