diff --git a/app/BookInfo/[bookName].js b/app/BookInfo/[bookName].js index 6325d78..9aa1a06 100644 --- a/app/BookInfo/[bookName].js +++ b/app/BookInfo/[bookName].js @@ -1,4 +1,4 @@ -import { Lorebooks } from '@constants/Lorebooks' +import { Lorebooks } from 'app/constants/Lorebooks' import { Style } from '@globals' import { Stack, useLocalSearchParams } from 'expo-router' import React, { useEffect, useState } from 'react' diff --git a/app/CharInfo.tsx b/app/CharInfo.tsx index 9785ea3..9575992 100644 --- a/app/CharInfo.tsx +++ b/app/CharInfo.tsx @@ -1,9 +1,9 @@ import AnimatedView from '@components/AnimatedView' -import { CharacterCardV2 } from '@constants/Characters' -import { RecentMessages } from '@constants/RecentMessages' -import { Tokenizer } from '@constants/Tokenizer' import { FontAwesome } from '@expo/vector-icons' import { Characters, Logger, Style } from '@globals' +import { CharacterCardV2 } from 'app/constants/Characters' +import { RecentMessages } from 'app/constants/RecentMessages' +import { Tokenizer } from 'app/constants/Tokenizer' import * as DocumentPicker from 'expo-document-picker' import { Stack, useRouter } from 'expo-router' import { useState } from 'react' diff --git a/app/CharMenu.tsx b/app/CharMenu.tsx index 4038554..719f390 100644 --- a/app/CharMenu.tsx +++ b/app/CharMenu.tsx @@ -1,7 +1,7 @@ import AnimatedView from '@components/AnimatedView' import TextBoxModal from '@components/TextBoxModal' import { AntDesign, FontAwesome, Ionicons } from '@expo/vector-icons' -import { Global, Characters, Chats, Logger, Style } from '@globals' +import { Characters, Chats, Logger, Style } from '@globals' import { useRouter, Stack, usePathname } from 'expo-router' import { useEffect, useState } from 'react' import { diff --git a/app/CharacterList.tsx b/app/CharacterList.tsx new file mode 100644 index 0000000..fb5180d --- /dev/null +++ b/app/CharacterList.tsx @@ -0,0 +1,342 @@ +import AnimatedView from '@components/AnimatedView' +import TextBoxModal from '@components/TextBoxModal' +import { AntDesign, FontAwesome, Ionicons } from '@expo/vector-icons' +import { Characters, Chats, Logger, Style } from '@globals' +import { useRouter, Stack, usePathname } from 'expo-router' +import { useEffect, useState } from 'react' +import { + SafeAreaView, + TouchableOpacity, + ScrollView, + Text, + Image, + StyleSheet, + View, + ActivityIndicator, +} from 'react-native' +import { Gesture, GestureDetector } from 'react-native-gesture-handler' +import { runOnJS } from 'react-native-reanimated' +import { useShallow } from 'zustand/react/shallow' + +type CharInfo = { + name: string + id: number + image_id: number + tags: string[] +} + +const CharacterList = () => { + const router = useRouter() + const { setCurrentCard, id } = Characters.useCharacterCard( + useShallow((state) => ({ + setCurrentCard: state.setCard, + id: state.id, + })) + ) + const loadChat = Chats.useChat((state) => state.load) + + const [characterList, setCharacterList] = useState([]) + const [showNewChar, setShowNewChar] = useState(false) + const [showDownload, setShowDownload] = useState(false) + const [nowLoading, setNowLoading] = useState(false) + const [loadedCharId, setLoadedCharId] = useState(id) + + const goBack = () => router.back() + + const gesture = Gesture.Fling() + .direction(1) + .onEnd(() => { + runOnJS(goBack)() + }) + const getCharacterList = async () => { + try { + const list = await Characters.db.query.cardList('character') + setCharacterList(list) + } catch (error) { + Logger.log(`Could not retrieve characters.\n${error}`, true) + } + } + const setCurrentCharacter = async (charId: number, edit: boolean = false) => { + if (nowLoading) return + setLoadedCharId(charId) + + try { + await setCurrentCard(charId) + setNowLoading(true) + const returnedChatId = await Chats.db.query.chatNewest(charId) + let chatId = returnedChatId + if (!chatId) { + chatId = await Chats.db.mutate.createChat(charId) + } + if (!chatId) { + Logger.log('Chat creation backup has failed! Please report.', true) + return + } + + await loadChat(chatId) + + setNowLoading(false) + if (edit) router.push('/CharInfo') + else router.back() + } catch (error) { + Logger.log(`Couldn't load character: ${error}`, true) + setNowLoading(false) + } + setLoadedCharId(-1) + } + + const handleCreateCharacter = async (text: string) => { + if (!text) { + Logger.log('Name Cannot Be Empty!', true) + return + } + Characters.db.mutate.createCard(text).then(async (id) => { + await setCurrentCharacter(id, true) + }) + } + + useEffect(() => { + getCharacterList() + }, [usePathname()]) + + return ( + + + ( + + { + setShowDownload(true) + }}> + + + + + Characters.importCharacterFromImage().then(async () => { + getCharacterList() + }) + }> + + + + { + setShowNewChar(true) + }}> + + + + ), + }} + /> + + + + + Characters.importCharacterFromRemote(text).then(() => { + getCharacterList() + }) + } + showPaste + /> + {characterList.length === 0 && ( + + + + No Characters Found. Try Importing Some! + + + )} + + {characterList.length !== 0 && ( + + {characterList.map((character, index) => ( + + setCurrentCharacter(character.id)}> + + + {character.name} + + {character.tags.map((item, index) => ( + + {item} + + ))} + + + + + {nowLoading && character.id === loadedCharId ? ( + + ) : ( + { + setCurrentCharacter(character.id, true) + }} + disabled={nowLoading}> + + + )} + + + ))} + + )} + + + ) +} + +export default CharacterList + +const styles = StyleSheet.create({ + mainContainer: { + paddingVertical: 16, + paddingHorizontal: 8, + flex: 1, + }, + + longButton: { + flexDirection: 'row', + flex: 1, + padding: 8, + }, + + longButtonContainer: { + backgroundColor: Style.getColor('primary-surface1'), + borderColor: Style.getColor('primary-surface1'), + borderWidth: 2, + flexDirection: 'row', + marginBottom: 8, + justifyContent: 'space-between', + alignItems: 'center', + borderRadius: 8, + flex: 1, + }, + + longButtonSelectedContainer: { + backgroundColor: Style.getColor('primary-surface1'), + borderColor: Style.getColor('primary-brand'), + borderWidth: 2, + flexDirection: 'row', + marginBottom: 8, + justifyContent: 'space-between', + alignItems: 'center', + borderRadius: 8, + flex: 1, + }, + + secondaryButton: { + paddingHorizontal: 12, + paddingVertical: 20, + }, + + avatar: { + width: 48, + height: 48, + borderRadius: 12, + margin: 4, + backgroundColor: Style.getColor('primary-surface2'), + }, + + nametag: { + fontSize: 16, + marginLeft: 20, + color: Style.getColor('primary-text1'), + }, + + subtag: { + fontSize: 16, + marginLeft: 20, + color: Style.getColor('primary-text2'), + }, + + headerButtonRight: { + marginLeft: 20, + marginRight: 4, + }, + + headerButtonContainer: { + flexDirection: 'row', + }, +}) diff --git a/app/ChatSelector.tsx b/app/ChatSelector.tsx index 6bcf50a..f7e18fa 100644 --- a/app/ChatSelector.tsx +++ b/app/ChatSelector.tsx @@ -1,5 +1,5 @@ import AnimatedView from '@components/AnimatedView' -import { RecentMessages } from '@constants/RecentMessages' +import { RecentMessages } from 'app/constants/RecentMessages' import { FontAwesome } from '@expo/vector-icons' import { Chats, Characters, saveStringExternal, Logger, Style } from '@globals' import { useRouter, Stack } from 'expo-router' diff --git a/app/ColorSettings.tsx b/app/ColorSettings.tsx index 56e512a..e66c141 100644 --- a/app/ColorSettings.tsx +++ b/app/ColorSettings.tsx @@ -1,5 +1,5 @@ import { AppSettings } from '@constants/GlobalValues' -import { ColorId, Style } from '@constants/Style' +import { ColorId, Style } from 'app/constants/Style' import { FontAwesome } from '@expo/vector-icons' import Slider from '@react-native-community/slider' import { reloadAppAsync } from 'expo' diff --git a/app/Instruct.tsx b/app/Instruct.tsx index 7b972d1..e3fa137 100644 --- a/app/Instruct.tsx +++ b/app/Instruct.tsx @@ -3,7 +3,7 @@ import CheckboxTitle from '@components/CheckboxTitle' import SliderItem from '@components/SliderItem' import TextBox from '@components/TextBox' import TextBoxModal from '@components/TextBoxModal' -import { InstructListItem } from '@constants/Instructs' +import { InstructListItem } from 'app/constants/Instructs' import { FontAwesome } from '@expo/vector-icons' import { Global, Instructs, saveStringExternal, Logger, Style } from '@globals' import Slider from '@react-native-community/slider' diff --git a/app/LorebookMenu.js b/app/LorebookMenu.js index a7a2bcb..7300515 100644 --- a/app/LorebookMenu.js +++ b/app/LorebookMenu.js @@ -1,5 +1,5 @@ -import TextBoxModal from '@components/TextBoxModal' -import { Lorebooks } from '@constants/Lorebooks' +import TextBoxModal from 'app/components/TextBoxModal' +import { Lorebooks } from 'app/constants/Lorebooks' import { FontAwesome } from '@expo/vector-icons' import { Stack, useRouter } from 'expo-router' import { Style } from '@globals' diff --git a/app/PresetMenu.jsx b/app/PresetMenu.jsx index 347de02..1a99e11 100644 --- a/app/PresetMenu.jsx +++ b/app/PresetMenu.jsx @@ -1,7 +1,7 @@ import { TextBoxModal, SliderItem, TextBox, CheckboxTitle } from '@components' import AnimatedView from '@components/AnimatedView' +import { Global, Presets, saveStringExternal, Logger, Style } from './constants/Global' import { FontAwesome } from '@expo/vector-icons' -import { Global, Presets, saveStringExternal, Logger, Style } from '@globals' import { Stack } from 'expo-router' import { useState, useEffect } from 'react' import { diff --git a/app/SamplerMenu.tsx b/app/SamplerMenu.tsx index b00d94c..7c29667 100644 --- a/app/SamplerMenu.tsx +++ b/app/SamplerMenu.tsx @@ -1,7 +1,7 @@ import AnimatedView from '@components/AnimatedView' -import { APIState } from '@constants/APIState' -import { SamplerPreset } from '@constants/Presets' -import { SamplerID, Samplers } from '@constants/Samplers' +import { APIState } from 'app/constants/APIState' +import { SamplerPreset } from 'app/constants/Presets' +import { SamplerID, Samplers } from 'app/constants/Samplers' import { FontAwesome } from '@expo/vector-icons' import { Global, Presets, saveStringExternal, Logger, Style, API } from '@globals' import { Stack } from 'expo-router' @@ -19,7 +19,7 @@ import { Dropdown } from 'react-native-element-dropdown' import { TextInput } from 'react-native-gesture-handler' import { useMMKVObject, useMMKVString } from 'react-native-mmkv' -import { TextBoxModal, SliderItem, TextBox, CheckboxTitle } from '../components' +import { TextBoxModal, SliderItem, TextBox, CheckboxTitle } from './components' type PresetLabel = { label: string diff --git a/app/UserInfo.tsx b/app/UserInfo.tsx index 0578667..175deaf 100644 --- a/app/UserInfo.tsx +++ b/app/UserInfo.tsx @@ -1,4 +1,4 @@ -import { CharacterCardV2 } from '@constants/Characters' +import { CharacterCardV2 } from 'app/constants/Characters' import { FontAwesome } from '@expo/vector-icons' import { Characters, Style } from '@globals' import * as DocumentPicker from 'expo-document-picker' diff --git a/components/AnimatedView.tsx b/app/components/AnimatedView.tsx similarity index 100% rename from components/AnimatedView.tsx rename to app/components/AnimatedView.tsx diff --git a/components/ChatMenu/ChatInput.tsx b/app/components/ChatMenu/ChatInput.tsx similarity index 97% rename from components/ChatMenu/ChatInput.tsx rename to app/components/ChatMenu/ChatInput.tsx index 78d508e..7c840d4 100644 --- a/components/ChatMenu/ChatInput.tsx +++ b/app/components/ChatMenu/ChatInput.tsx @@ -1,5 +1,5 @@ -import { useInference } from '@constants/Chat' -import { generateResponse } from '@constants/Inference' +import { useInference } from 'app/constants/Chat' +import { generateResponse } from 'app/constants/Inference' import { MaterialIcons } from '@expo/vector-icons' import { AppSettings, Characters, Chats, Logger, Style } from '@globals' import React, { useState } from 'react' diff --git a/components/ChatMenu/ChatMenu.tsx b/app/components/ChatMenu/ChatMenu.tsx similarity index 100% rename from components/ChatMenu/ChatMenu.tsx rename to app/components/ChatMenu/ChatMenu.tsx diff --git a/components/ChatMenu/ChatWindow/ChatBody.tsx b/app/components/ChatMenu/ChatWindow/ChatBody.tsx similarity index 100% rename from components/ChatMenu/ChatWindow/ChatBody.tsx rename to app/components/ChatMenu/ChatWindow/ChatBody.tsx diff --git a/components/ChatMenu/ChatWindow/ChatFrame.tsx b/app/components/ChatMenu/ChatWindow/ChatFrame.tsx similarity index 98% rename from components/ChatMenu/ChatWindow/ChatFrame.tsx rename to app/components/ChatMenu/ChatWindow/ChatFrame.tsx index 61976e1..7b3576e 100644 --- a/components/ChatMenu/ChatWindow/ChatFrame.tsx +++ b/app/components/ChatMenu/ChatWindow/ChatFrame.tsx @@ -1,4 +1,4 @@ -import { Chats } from '@constants/Chat' +import { Chats } from 'app/constants/Chat' import { Characters, Global, Style } from '@globals' import { ReactNode, useEffect, useState } from 'react' import { View, Text, Image, StyleSheet } from 'react-native' diff --git a/components/ChatMenu/ChatWindow/ChatItem.tsx b/app/components/ChatMenu/ChatWindow/ChatItem.tsx similarity index 96% rename from components/ChatMenu/ChatWindow/ChatItem.tsx rename to app/components/ChatMenu/ChatWindow/ChatItem.tsx index bbf9888..b673364 100644 --- a/components/ChatMenu/ChatWindow/ChatItem.tsx +++ b/app/components/ChatMenu/ChatWindow/ChatItem.tsx @@ -1,5 +1,5 @@ import AnimatedView from '@components/AnimatedView' -import { useInference } from '@constants/Chat' +import { useInference } from 'app/constants/Chat' import { View, StyleSheet } from 'react-native' import ChatBody from './ChatBody' diff --git a/components/ChatMenu/ChatWindow/ChatText.tsx b/app/components/ChatMenu/ChatWindow/ChatText.tsx similarity index 100% rename from components/ChatMenu/ChatWindow/ChatText.tsx rename to app/components/ChatMenu/ChatWindow/ChatText.tsx diff --git a/components/ChatMenu/ChatWindow/ChatWindow.tsx b/app/components/ChatMenu/ChatWindow/ChatWindow.tsx similarity index 97% rename from components/ChatMenu/ChatWindow/ChatWindow.tsx rename to app/components/ChatMenu/ChatWindow/ChatWindow.tsx index a9e3d18..4ba1a50 100644 --- a/components/ChatMenu/ChatWindow/ChatWindow.tsx +++ b/app/components/ChatMenu/ChatWindow/ChatWindow.tsx @@ -1,4 +1,4 @@ -import { useInference } from '@constants/Chat' +import { useInference } from 'app/constants/Chat' import { AppSettings, Characters, Chats, Global } from '@globals' import { StyleSheet, FlatList } from 'react-native' import { useMMKVBoolean } from 'react-native-mmkv' diff --git a/components/ChatMenu/ChatWindow/Editor.tsx b/app/components/ChatMenu/ChatWindow/Editor.tsx similarity index 100% rename from components/ChatMenu/ChatWindow/Editor.tsx rename to app/components/ChatMenu/ChatWindow/Editor.tsx diff --git a/components/ChatMenu/ChatWindow/EditorModal.tsx b/app/components/ChatMenu/ChatWindow/EditorModal.tsx similarity index 99% rename from components/ChatMenu/ChatWindow/EditorModal.tsx rename to app/components/ChatMenu/ChatWindow/EditorModal.tsx index 0390610..8ab7a29 100644 --- a/components/ChatMenu/ChatWindow/EditorModal.tsx +++ b/app/components/ChatMenu/ChatWindow/EditorModal.tsx @@ -1,4 +1,4 @@ -import { ColorId } from '@constants/Style' +import { ColorId } from 'app/constants/Style' import { MaterialIcons } from '@expo/vector-icons' import { Chats, Style } from '@globals' import { useState } from 'react' diff --git a/components/ChatMenu/ChatWindow/Swipes.tsx b/app/components/ChatMenu/ChatWindow/Swipes.tsx similarity index 98% rename from components/ChatMenu/ChatWindow/Swipes.tsx rename to app/components/ChatMenu/ChatWindow/Swipes.tsx index b35dcda..5601ffb 100644 --- a/components/ChatMenu/ChatWindow/Swipes.tsx +++ b/app/components/ChatMenu/ChatWindow/Swipes.tsx @@ -1,5 +1,5 @@ -import { Chats } from '@constants/Chat' -import { continueResponse, generateResponse, regenerateResponse } from '@constants/Inference' +import { Chats } from 'app/constants/Chat' +import { continueResponse, generateResponse, regenerateResponse } from 'app/constants/Inference' import { AntDesign } from '@expo/vector-icons' import { Style } from '@globals' import React from 'react' diff --git a/components/ChatMenu/ChatWindow/TTS.tsx b/app/components/ChatMenu/ChatWindow/TTS.tsx similarity index 98% rename from components/ChatMenu/ChatWindow/TTS.tsx rename to app/components/ChatMenu/ChatWindow/TTS.tsx index 5ae7e44..be5ecc7 100644 --- a/components/ChatMenu/ChatWindow/TTS.tsx +++ b/app/components/ChatMenu/ChatWindow/TTS.tsx @@ -1,4 +1,4 @@ -import { Chats, useInference } from '@constants/Chat' +import { Chats, useInference } from 'app/constants/Chat' import { FontAwesome } from '@expo/vector-icons' import { Global, Logger, Style } from '@globals' import * as Speech from 'expo-speech' diff --git a/components/ChatMenu/Recents.tsx b/app/components/ChatMenu/Recents.tsx similarity index 98% rename from components/ChatMenu/Recents.tsx rename to app/components/ChatMenu/Recents.tsx index f8b8e6e..9a43f08 100644 --- a/components/ChatMenu/Recents.tsx +++ b/app/components/ChatMenu/Recents.tsx @@ -1,5 +1,5 @@ import AnimatedView from '@components/AnimatedView' -import { RecentEntry, RecentMessages } from '@constants/RecentMessages' +import { RecentEntry, RecentMessages } from 'app/constants/RecentMessages' import { FontAwesome, Ionicons } from '@expo/vector-icons' import { Characters, Chats, Global, Logger, Style } from '@globals' import { useState } from 'react' @@ -17,7 +17,6 @@ const Recents = () => { const [recentMessages, setRecentMessages] = useMMKVObject(Global.RecentMessages) const setCurrentCard = Characters.useCharacterCard((state) => state.setCard) - const [nowLoading, setNowLoading] = useState(false) const { loadChat } = Chats.useChat((state) => ({ loadChat: state.load })) const handleLoadEntry = async (entry: RecentEntry) => { diff --git a/components/ChatMenu/SettingsDrawer.tsx b/app/components/ChatMenu/SettingsDrawer.tsx similarity index 99% rename from components/ChatMenu/SettingsDrawer.tsx rename to app/components/ChatMenu/SettingsDrawer.tsx index a3b121e..a96cb5e 100644 --- a/components/ChatMenu/SettingsDrawer.tsx +++ b/app/components/ChatMenu/SettingsDrawer.tsx @@ -211,7 +211,7 @@ const SettingsDrawer: React.FC = ({ booleans: [showModal, s }}> {__DEV__ && 'DEV BUILD\t'} {devMode && 'DEV MODE\t'} - {'v' + require(`../../app.json`).expo.version} + {'v' + require(`../../../app.json`).expo.version} diff --git a/components/CheckboxTitle.tsx b/app/components/CheckboxTitle.tsx similarity index 100% rename from components/CheckboxTitle.tsx rename to app/components/CheckboxTitle.tsx diff --git a/components/Endpoint/Claude.tsx b/app/components/Endpoint/Claude.tsx similarity index 100% rename from components/Endpoint/Claude.tsx rename to app/components/Endpoint/Claude.tsx diff --git a/components/Endpoint/HeartbeatButton.tsx b/app/components/Endpoint/HeartbeatButton.tsx similarity index 100% rename from components/Endpoint/HeartbeatButton.tsx rename to app/components/Endpoint/HeartbeatButton.tsx diff --git a/components/Endpoint/Horde.tsx b/app/components/Endpoint/Horde.tsx similarity index 99% rename from components/Endpoint/Horde.tsx rename to app/components/Endpoint/Horde.tsx index 6c5bd53..6e2b7c6 100644 --- a/components/Endpoint/Horde.tsx +++ b/app/components/Endpoint/Horde.tsx @@ -1,4 +1,4 @@ -import { hordeHeader } from '@constants/APIState/HordeAPI' +import { hordeHeader } from 'app/constants/APIState/HordeAPI' import { FontAwesome, MaterialIcons } from '@expo/vector-icons' import { Global, Logger, Style } from '@globals' import { useState, useEffect, useRef } from 'react' diff --git a/components/Endpoint/KAI.tsx b/app/components/Endpoint/KAI.tsx similarity index 100% rename from components/Endpoint/KAI.tsx rename to app/components/Endpoint/KAI.tsx diff --git a/components/Endpoint/Local.tsx b/app/components/Endpoint/Local.tsx similarity index 99% rename from components/Endpoint/Local.tsx rename to app/components/Endpoint/Local.tsx index 1d99f62..42bdd2d 100644 --- a/components/Endpoint/Local.tsx +++ b/app/components/Endpoint/Local.tsx @@ -1,4 +1,4 @@ -import { Llama, LlamaPreset } from '@constants/LlamaLocal' +import { Llama, LlamaPreset } from 'app/constants/LlamaLocal' import { AppSettings, Global, Logger, Style } from '@globals' import { useEffect, useState } from 'react' import { diff --git a/components/Endpoint/Mancer.tsx b/app/components/Endpoint/Mancer.tsx similarity index 100% rename from components/Endpoint/Mancer.tsx rename to app/components/Endpoint/Mancer.tsx diff --git a/components/Endpoint/Ollama.tsx b/app/components/Endpoint/Ollama.tsx similarity index 100% rename from components/Endpoint/Ollama.tsx rename to app/components/Endpoint/Ollama.tsx diff --git a/components/Endpoint/OpenAI.tsx b/app/components/Endpoint/OpenAI.tsx similarity index 100% rename from components/Endpoint/OpenAI.tsx rename to app/components/Endpoint/OpenAI.tsx diff --git a/components/Endpoint/OpenRouter.tsx b/app/components/Endpoint/OpenRouter.tsx similarity index 100% rename from components/Endpoint/OpenRouter.tsx rename to app/components/Endpoint/OpenRouter.tsx diff --git a/components/Endpoint/TGWUI.tsx b/app/components/Endpoint/TGWUI.tsx similarity index 100% rename from components/Endpoint/TGWUI.tsx rename to app/components/Endpoint/TGWUI.tsx diff --git a/components/Endpoint/TextCompletions.tsx b/app/components/Endpoint/TextCompletions.tsx similarity index 100% rename from components/Endpoint/TextCompletions.tsx rename to app/components/Endpoint/TextCompletions.tsx diff --git a/components/Endpoint/index.tsx b/app/components/Endpoint/index.tsx similarity index 100% rename from components/Endpoint/index.tsx rename to app/components/Endpoint/index.tsx diff --git a/components/FontText.tsx b/app/components/FontText.tsx similarity index 100% rename from components/FontText.tsx rename to app/components/FontText.tsx diff --git a/components/SliderItem.tsx b/app/components/SliderItem.tsx similarity index 100% rename from components/SliderItem.tsx rename to app/components/SliderItem.tsx diff --git a/components/SupportButton.tsx b/app/components/SupportButton.tsx similarity index 100% rename from components/SupportButton.tsx rename to app/components/SupportButton.tsx diff --git a/components/TextBox.tsx b/app/components/TextBox.tsx similarity index 100% rename from components/TextBox.tsx rename to app/components/TextBox.tsx diff --git a/components/TextBoxModal.tsx b/app/components/TextBoxModal.tsx similarity index 100% rename from components/TextBoxModal.tsx rename to app/components/TextBoxModal.tsx diff --git a/components/index.ts b/app/components/index.ts similarity index 100% rename from components/index.ts rename to app/components/index.ts diff --git a/constants/API.ts b/app/constants/API.ts similarity index 100% rename from constants/API.ts rename to app/constants/API.ts diff --git a/constants/APIState/BaseAPI.ts b/app/constants/APIState/BaseAPI.ts similarity index 96% rename from constants/APIState/BaseAPI.ts rename to app/constants/APIState/BaseAPI.ts index 722cd53..433d3ab 100644 --- a/constants/APIState/BaseAPI.ts +++ b/app/constants/APIState/BaseAPI.ts @@ -1,11 +1,11 @@ -import { Characters } from '@constants/Characters' -import { Chats, useInference } from '@constants/Chat' +import { Characters } from 'app/constants/Characters' +import { Chats, useInference } from 'app/constants/Chat' import { AppSettings, Global } from '@constants/GlobalValues' -import { InstructType, Instructs } from '@constants/Instructs' -import { Logger } from '@constants/Logger' -import { SamplerPreset } from '@constants/Presets' -import { replaceMacros } from '@constants/Utils' -import { mmkv } from '@constants/mmkv' +import { InstructType, Instructs } from 'app/constants/Instructs' +import { Logger } from 'app/constants/Logger' +import { SamplerPreset } from 'app/constants/Presets' +import { replaceMacros } from 'app/constants/Utils' +import { mmkv } from 'app/constants/MMKV' import EventSource from 'react-native-sse' import { SamplerID, Samplers } from '../Samplers' diff --git a/constants/APIState/ClaudeAPI.ts b/app/constants/APIState/ClaudeAPI.ts similarity index 96% rename from constants/APIState/ClaudeAPI.ts rename to app/constants/APIState/ClaudeAPI.ts index 8a24771..fa3345a 100644 --- a/constants/APIState/ClaudeAPI.ts +++ b/app/constants/APIState/ClaudeAPI.ts @@ -1,6 +1,6 @@ import { Global } from '@constants/GlobalValues' -import { Logger } from '@constants/Logger' -import { SamplerID } from '@constants/Samplers' +import { Logger } from 'app/constants/Logger' +import { SamplerID } from 'app/constants/Samplers' import { APIBase, APISampler } from './BaseAPI' diff --git a/constants/APIState/HordeAPI.ts b/app/constants/APIState/HordeAPI.ts similarity index 97% rename from constants/APIState/HordeAPI.ts rename to app/constants/APIState/HordeAPI.ts index d81e67c..090b4c2 100644 --- a/constants/APIState/HordeAPI.ts +++ b/app/constants/APIState/HordeAPI.ts @@ -1,7 +1,7 @@ -import { Chats, useInference } from '@constants/Chat' +import { Chats, useInference } from 'app/constants/Chat' import { Global } from '@constants/GlobalValues' -import { Logger } from '@constants/Logger' -import { SamplerID } from '@constants/Samplers' +import { Logger } from 'app/constants/Logger' +import { SamplerID } from 'app/constants/Samplers' import { nativeApplicationVersion } from 'expo-application' import { APIBase, APISampler } from './BaseAPI' diff --git a/constants/APIState/KoboldAPI.ts b/app/constants/APIState/KoboldAPI.ts similarity index 95% rename from constants/APIState/KoboldAPI.ts rename to app/constants/APIState/KoboldAPI.ts index f7a2df1..6b774cf 100644 --- a/constants/APIState/KoboldAPI.ts +++ b/app/constants/APIState/KoboldAPI.ts @@ -1,7 +1,7 @@ import { Global } from '@constants/GlobalValues' -import { Logger } from '@constants/Logger' -import { SamplerID } from '@constants/Samplers' -import { mmkv } from '@constants/mmkv' +import { Logger } from 'app/constants/Logger' +import { SamplerID } from 'app/constants/Samplers' +import { mmkv } from 'app/constants/MMKV' import axios from 'axios' import { APIBase, APISampler } from './BaseAPI' diff --git a/constants/APIState/LocalAPI.ts b/app/constants/APIState/LocalAPI.ts similarity index 94% rename from constants/APIState/LocalAPI.ts rename to app/constants/APIState/LocalAPI.ts index e56c1e6..7ce2e5b 100644 --- a/constants/APIState/LocalAPI.ts +++ b/app/constants/APIState/LocalAPI.ts @@ -1,9 +1,9 @@ -import { Chats, useInference } from '@constants/Chat' +import { Chats, useInference } from 'app/constants/Chat' import { AppSettings, Global } from '@constants/GlobalValues' -import { Llama, LlamaPreset } from '@constants/LlamaLocal' -import { Logger } from '@constants/Logger' -import { SamplerID } from '@constants/Samplers' -import { mmkv } from '@constants/mmkv' +import { Llama, LlamaPreset } from 'app/constants/LlamaLocal' +import { Logger } from 'app/constants/Logger' +import { SamplerID } from 'app/constants/Samplers' +import { mmkv } from 'app/constants/MMKV' import { APIBase, APISampler } from './BaseAPI' diff --git a/constants/APIState/MancerAPI.ts b/app/constants/APIState/MancerAPI.ts similarity index 96% rename from constants/APIState/MancerAPI.ts rename to app/constants/APIState/MancerAPI.ts index a6f8e12..c2d9a8c 100644 --- a/constants/APIState/MancerAPI.ts +++ b/app/constants/APIState/MancerAPI.ts @@ -1,6 +1,6 @@ import { Global } from '@constants/GlobalValues' -import { Logger } from '@constants/Logger' -import { SamplerID } from '@constants/Samplers' +import { Logger } from 'app/constants/Logger' +import { SamplerID } from 'app/constants/Samplers' import { APIBase, APISampler } from './BaseAPI' diff --git a/constants/APIState/OllamaAPI.ts b/app/constants/APIState/OllamaAPI.ts similarity index 96% rename from constants/APIState/OllamaAPI.ts rename to app/constants/APIState/OllamaAPI.ts index aa954db..31ac358 100644 --- a/constants/APIState/OllamaAPI.ts +++ b/app/constants/APIState/OllamaAPI.ts @@ -1,6 +1,6 @@ import { Global } from '@constants/GlobalValues' -import { Logger } from '@constants/Logger' -import { SamplerID } from '@constants/Samplers' +import { Logger } from 'app/constants/Logger' +import { SamplerID } from 'app/constants/Samplers' import axios from 'axios' import { APIBase, APISampler } from './BaseAPI' diff --git a/constants/APIState/OpenAIAPI.ts b/app/constants/APIState/OpenAIAPI.ts similarity index 94% rename from constants/APIState/OpenAIAPI.ts rename to app/constants/APIState/OpenAIAPI.ts index 3733287..79f9afc 100644 --- a/constants/APIState/OpenAIAPI.ts +++ b/app/constants/APIState/OpenAIAPI.ts @@ -1,6 +1,6 @@ import { Global } from '@constants/GlobalValues' -import { Logger } from '@constants/Logger' -import { SamplerID } from '@constants/Samplers' +import { Logger } from 'app/constants/Logger' +import { SamplerID } from 'app/constants/Samplers' import { APIBase, APISampler } from './BaseAPI' diff --git a/constants/APIState/OpenRouterAPI.ts b/app/constants/APIState/OpenRouterAPI.ts similarity index 95% rename from constants/APIState/OpenRouterAPI.ts rename to app/constants/APIState/OpenRouterAPI.ts index 1cffef4..2413a39 100644 --- a/constants/APIState/OpenRouterAPI.ts +++ b/app/constants/APIState/OpenRouterAPI.ts @@ -1,6 +1,6 @@ import { Global } from '@constants/GlobalValues' -import { Logger } from '@constants/Logger' -import { SamplerID } from '@constants/Samplers' +import { Logger } from 'app/constants/Logger' +import { SamplerID } from 'app/constants/Samplers' import { APIBase, APISampler } from './BaseAPI' diff --git a/constants/APIState/TGWUIAPI.ts b/app/constants/APIState/TGWUIAPI.ts similarity index 98% rename from constants/APIState/TGWUIAPI.ts rename to app/constants/APIState/TGWUIAPI.ts index f134cac..b50860e 100644 --- a/constants/APIState/TGWUIAPI.ts +++ b/app/constants/APIState/TGWUIAPI.ts @@ -1,5 +1,5 @@ import { Global } from '@constants/GlobalValues' -import { SamplerID } from '@constants/Samplers' +import { SamplerID } from 'app/constants/Samplers' import { APIBase, APISampler } from './BaseAPI' diff --git a/constants/APIState/TextCompletionAPI.ts b/app/constants/APIState/TextCompletionAPI.ts similarity index 97% rename from constants/APIState/TextCompletionAPI.ts rename to app/constants/APIState/TextCompletionAPI.ts index cbd1c0e..ba3dae0 100644 --- a/constants/APIState/TextCompletionAPI.ts +++ b/app/constants/APIState/TextCompletionAPI.ts @@ -1,7 +1,7 @@ import { OpenAIModel } from '@components/Endpoint/OpenAI' import { Global } from '@constants/GlobalValues' -import { Logger } from '@constants/Logger' -import { SamplerID } from '@constants/Samplers' +import { Logger } from 'app/constants/Logger' +import { SamplerID } from 'app/constants/Samplers' import { APIBase, APISampler } from './BaseAPI' diff --git a/constants/APIState/index.ts b/app/constants/APIState/index.ts similarity index 89% rename from constants/APIState/index.ts rename to app/constants/APIState/index.ts index 04554f5..3ef4b6d 100644 --- a/constants/APIState/index.ts +++ b/app/constants/APIState/index.ts @@ -1,6 +1,6 @@ -import { API } from '@constants/API' -import { useInference } from '@constants/Chat' -import { Logger } from '@constants/Logger' +import { API } from 'app/constants/API' +import { useInference } from 'app/constants/Chat' +import { Logger } from 'app/constants/Logger' import { APIBase } from './BaseAPI' import claudeAPI from './ClaudeAPI' diff --git a/constants/Characters.ts b/app/constants/Characters.ts similarity index 99% rename from constants/Characters.ts rename to app/constants/Characters.ts index b66e6a0..68491fe 100644 --- a/constants/Characters.ts +++ b/app/constants/Characters.ts @@ -13,8 +13,8 @@ import { create } from 'zustand' import { Global } from './GlobalValues' import { Logger } from './Logger' +import { mmkv } from './MMKV' import { Tokenizer } from './Tokenizer' -import { mmkv } from './mmkv' type CharacterTokenCache = { otherName: string @@ -353,6 +353,7 @@ export namespace Characters { }) const charactercard = JSON.parse(atob(textChunks[0].text)) + // dangerous here, card is never verified if (charactercard === undefined) { Logger.log('No character was found.', true) diff --git a/constants/Chat.ts b/app/constants/Chat.ts similarity index 99% rename from constants/Chat.ts rename to app/constants/Chat.ts index 385065b..bf01858 100644 --- a/constants/Chat.ts +++ b/app/constants/Chat.ts @@ -10,7 +10,7 @@ import { RecentMessages } from './RecentMessages' import { convertToFormatInstruct } from './TextFormat' import { Tokenizer } from './Tokenizer' import { replaceMacros } from './Utils' -import { mmkv } from './mmkv' +import { mmkv } from './MMKV' export type ChatSwipe = { id: number diff --git a/constants/global.tsx b/app/constants/Global.ts similarity index 99% rename from constants/global.tsx rename to app/constants/Global.ts index c69a541..f9701d6 100644 --- a/constants/global.tsx +++ b/app/constants/Global.ts @@ -16,7 +16,7 @@ import { Presets } from './Presets' import { RecentEntry, RecentMessages } from './RecentMessages' import { Style } from './Style' import { humanizedISO8601DateTime } from './Utils' -import { mmkv } from './mmkv' +import { mmkv } from './MMKV' export { mmkv, Presets, diff --git a/constants/GlobalValues.ts b/app/constants/GlobalValues.ts similarity index 100% rename from constants/GlobalValues.ts rename to app/constants/GlobalValues.ts diff --git a/constants/Inference.ts b/app/constants/Inference.ts similarity index 95% rename from constants/Inference.ts rename to app/constants/Inference.ts index 70840e9..ca5b043 100644 --- a/constants/Inference.ts +++ b/app/constants/Inference.ts @@ -1,11 +1,11 @@ -import { Chats, useInference } from '@constants/Chat' +import { Chats, useInference } from 'app/constants/Chat' import { API } from './API' import { APIState } from './APIState' import { Characters } from './Characters' import { Global } from './GlobalValues' import { Logger } from './Logger' -import { mmkv } from './mmkv' +import { mmkv } from './MMKV' export const regenerateResponse = async () => { const charName = Characters.useCharacterCard.getState().card?.data.name diff --git a/constants/Instructs.ts b/app/constants/Instructs.ts similarity index 99% rename from constants/Instructs.ts rename to app/constants/Instructs.ts index e86dd9c..fec17d4 100644 --- a/constants/Instructs.ts +++ b/app/constants/Instructs.ts @@ -8,7 +8,7 @@ import { Global } from './GlobalValues' import { Logger } from './Logger' import { Tokenizer } from './Tokenizer' import { replaceMacros } from './Utils' -import { mmkv, mmkvStorage } from './mmkv' +import { mmkv, mmkvStorage } from './MMKV' const defaultInstructs: InstructType[] = [ { diff --git a/constants/LlamaLocal.ts b/app/constants/LlamaLocal.ts similarity index 99% rename from constants/LlamaLocal.ts rename to app/constants/LlamaLocal.ts index 2c9552c..48fbe49 100644 --- a/constants/LlamaLocal.ts +++ b/app/constants/LlamaLocal.ts @@ -6,7 +6,7 @@ import { create } from 'zustand' import { AppSettings, Global } from './GlobalValues' import { Logger } from './Logger' -import { mmkv } from './mmkv' +import { mmkv } from './MMKV' type CompletionTimings = { predicted_per_token_ms: number diff --git a/constants/Logger.ts b/app/constants/Logger.ts similarity index 97% rename from constants/Logger.ts rename to app/constants/Logger.ts index 9a1b953..f6c8785 100644 --- a/constants/Logger.ts +++ b/app/constants/Logger.ts @@ -1,6 +1,6 @@ import { AppSettings, Global } from './GlobalValues' import { humanizedISO8601DateTime } from './Utils' -import { mmkv } from './mmkv' +import { mmkv } from './MMKV' import Toast from 'react-native-simple-toast' export namespace Logger { diff --git a/constants/Lorebooks.ts b/app/constants/Lorebooks.ts similarity index 100% rename from constants/Lorebooks.ts rename to app/constants/Lorebooks.ts diff --git a/constants/mmkv.ts b/app/constants/MMKV.ts similarity index 100% rename from constants/mmkv.ts rename to app/constants/MMKV.ts diff --git a/constants/Markdown.ts b/app/constants/Markdown.ts similarity index 100% rename from constants/Markdown.ts rename to app/constants/Markdown.ts diff --git a/constants/Presets.ts b/app/constants/Presets.ts similarity index 100% rename from constants/Presets.ts rename to app/constants/Presets.ts diff --git a/constants/RecentMessages.tsx b/app/constants/RecentMessages.tsx similarity index 98% rename from constants/RecentMessages.tsx rename to app/constants/RecentMessages.tsx index d68a91e..91aea8e 100644 --- a/constants/RecentMessages.tsx +++ b/app/constants/RecentMessages.tsx @@ -1,5 +1,5 @@ import { Global } from './GlobalValues' -import { mmkv } from './mmkv' +import { mmkv } from './MMKV' export type RecentEntry = { charId: number diff --git a/constants/Samplers.ts b/app/constants/Samplers.ts similarity index 100% rename from constants/Samplers.ts rename to app/constants/Samplers.ts diff --git a/constants/Style.ts b/app/constants/Style.ts similarity index 87% rename from constants/Style.ts rename to app/constants/Style.ts index 078e484..9287bbe 100644 --- a/constants/Style.ts +++ b/app/constants/Style.ts @@ -4,7 +4,7 @@ import { createJSONStorage, persist } from 'zustand/middleware' import { AppSettings } from './GlobalValues' import { Logger } from './Logger' -import { mmkv, mmkvStorage } from './mmkv' +import { mmkv, mmkvStorage } from './MMKV' type HSL = { h: number; s: number; l: number } @@ -180,7 +180,14 @@ export namespace Style { })) }, }), - { name: 'color-storage', storage: createJSONStorage(() => mmkvStorage) } + { + name: 'color-storage', + storage: createJSONStorage(() => mmkvStorage), + version: 1, + migrate: (persistedState: any, version) => { + return persistedState + }, + } ) ) @@ -225,12 +232,12 @@ export namespace Style { flex: 1, }, - headerButtonRight: { + headerRight: { marginLeft: 20, marginRight: 4, }, - headerButtonLeft: { + headerLeft: { marginRight: 20, padding: 2, }, @@ -239,7 +246,7 @@ export namespace Style { borderRadius: 8, minWidth: 42, minHeight: 42, - backgroundColor: Style.getColor('primary-brand'), + backgroundColor: getColor('primary-brand'), padding: 6, }, @@ -247,4 +254,39 @@ export namespace Style { flexDirection: 'row', }, }) + + //type Spacing = 2 | 4 | 8 | 12 | 16 | 24 | 28 | 32 | 48 | 64 + //type Border = 1 | 2 | 4 + //type FontSize = 12 | 16 | 18 | 20 + + const Border = { + _1: 1, + _2: 2, + _4: 4, + } + + const FontSize = { + _12: 12, + _16: 16, + _18: 18, + _20: 20, + } + + const Spacing = { + _2: 2, + _4: 4, + _8: 8, + _12: 12, + _16: 16, + _24: 24, + _32: 32, + _64: 64, + } + + const Radius = { + _4: 4, + _8: 8, + _16: 16, + _24: 24, + } } diff --git a/constants/TextFormat.ts b/app/constants/TextFormat.ts similarity index 100% rename from constants/TextFormat.ts rename to app/constants/TextFormat.ts diff --git a/constants/Tokenizer.ts b/app/constants/Tokenizer.ts similarity index 100% rename from constants/Tokenizer.ts rename to app/constants/Tokenizer.ts diff --git a/constants/Users.ts b/app/constants/Users.ts similarity index 100% rename from constants/Users.ts rename to app/constants/Users.ts diff --git a/constants/Utils.ts b/app/constants/Utils.ts similarity index 100% rename from constants/Utils.ts rename to app/constants/Utils.ts diff --git a/babel.config.js b/babel.config.js index fe9e0b6..4a0699f 100644 --- a/babel.config.js +++ b/babel.config.js @@ -12,22 +12,6 @@ module.exports = function (api) { ['inline-import', { extensions: ['.sql'] }], // Required for expo-routerouter/ 'react-native-reanimated/plugin', - [ - 'module-resolver', - { - root: ['.'], - extension: ['.js', '.jsx', '.ts', '.tsx'], - alias: { - '@globals': './constants/global', - '@components': './components', - '@assets': './assets', - '@public': './public', - '@constants': './constants', - '@lib': './lib', - '@db': './db/db', - }, - }, - ], ], } } diff --git a/constants/theme.tsx b/constants/theme.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/package-lock.json b/package-lock.json index 2a3044a..10a8680 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,10 +22,9 @@ "@shopify/flash-list": "1.6.4", "axios": "^1.7.2", "babel-plugin-inline-import": "^3.0.0", - "babel-plugin-module-resolver": "^5.0.0", - "babel-plugin-react-compiler": "^0.0.0-experimental-592953e-20240517", + "babel-plugin-react-compiler": "^0.0.0-experimental-696af53-20240625", "bert-tokenizer": "^1.1.8", - "cui-llama.rn": "^1.0.2", + "cui-llama.rn": "^1.0.3", "drizzle-orm": "^0.30.10", "eas-cli": "^9.1.0", "expo": "^51.0.21", @@ -13126,55 +13125,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/babel-plugin-module-resolver": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", - "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", - "dependencies": { - "find-babel-config": "^2.0.0", - "glob": "^8.0.3", - "pkg-up": "^3.1.0", - "reselect": "^4.1.7", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">= 16" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/brace-expansion": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/glob": { - "version": "8.1.0", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/minimatch": { - "version": "5.1.6", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.4.5", "license": "MIT", @@ -13217,9 +13167,10 @@ } }, "node_modules/babel-plugin-react-compiler": { - "version": "0.0.0-experimental-592953e-20240517", - "resolved": "https://registry.npmjs.org/babel-plugin-react-compiler/-/babel-plugin-react-compiler-0.0.0-experimental-592953e-20240517.tgz", - "integrity": "sha512-OjG1SVaeQZaJrqkMFJatg8W/MTow8Ak5rx2SI0ETQBO1XvOk/XZGMbltNCPdFJLKghBYoBjC+Y3Ap/Xr7B01mA==", + "version": "0.0.0-experimental-696af53-20240625", + "resolved": "https://registry.npmjs.org/babel-plugin-react-compiler/-/babel-plugin-react-compiler-0.0.0-experimental-696af53-20240625.tgz", + "integrity": "sha512-OUDKms8qmcm5bX0D+sJWC1YcKcd7AZ2aJ7eY6gkR+Xr7PDfkXLbqAld4Qs9B0ntjVbUMEtW/PjlQrxDtY4raHg==", + "license": "MIT", "dependencies": { "@babel/generator": "7.2.0", "@babel/types": "^7.19.0", @@ -14741,9 +14692,9 @@ "license": "MIT" }, "node_modules/cui-llama.rn": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cui-llama.rn/-/cui-llama.rn-1.0.2.tgz", - "integrity": "sha512-MZmAN7opKpLbE+OU7NUPplDCeXccdVOjXpzIzYk82SrD6Luk6+uWEa9QQXHP/xzbJfrX7E+p9X8A/nfqYGgFjA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cui-llama.rn/-/cui-llama.rn-1.0.3.tgz", + "integrity": "sha512-ZWPKxH7DTNqk2T5inZ4u7WMu/tPcIZtPap/gt6aNQ0MkP6/02h4TO+RZhKVw3fcIWxxnoDepC3VI/9YJisANXg==", "license": "MIT", "engines": { "node": ">= 16.0.0" @@ -18223,17 +18174,6 @@ "node": ">= 0.8" } }, - "node_modules/find-babel-config": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "json5": "^2.1.1", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/find-cache-dir": { "version": "2.1.0", "license": "MIT", @@ -25604,67 +25544,6 @@ "node": ">=8" } }, - "node_modules/pkg-up": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "find-up": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-up/node_modules/find-up": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up/node_modules/locate-path": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up/node_modules/p-limit": { - "version": "2.3.0", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-up/node_modules/p-locate": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up/node_modules/path-exists": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/plist": { "version": "3.1.0", "license": "MIT", @@ -27107,10 +26986,6 @@ "dev": true, "license": "MIT" }, - "node_modules/reselect": { - "version": "4.1.8", - "license": "MIT" - }, "node_modules/resolve": { "version": "1.22.6", "license": "MIT", diff --git a/package.json b/package.json index e4f2d5d..0006be1 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,9 @@ "@shopify/flash-list": "1.6.4", "axios": "^1.7.2", "babel-plugin-inline-import": "^3.0.0", - "babel-plugin-module-resolver": "^5.0.0", - "babel-plugin-react-compiler": "^0.0.0-experimental-592953e-20240517", + "babel-plugin-react-compiler": "^0.0.0-experimental-696af53-20240625", "bert-tokenizer": "^1.1.8", - "cui-llama.rn": "^1.0.2", + "cui-llama.rn": "^1.0.3", "drizzle-orm": "^0.30.10", "eas-cli": "^9.1.0", "expo": "^51.0.21", diff --git a/tsconfig.json b/tsconfig.json index fae772f..8ee3066 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,11 +4,12 @@ "strict": true, "baseUrl": ".", "paths": { - "@globals": ["constants/global"], - "@components/*": ["components/*"], + "@globals": ["app/constants/Global"], + "@components/*": ["app/components/*"], + "@components": ["app/components"], + "@constants/*": ["app/constants/*"], "@assets/*": ["assets/*"], "@public/*": ["public/*"], - "@constants/*": ["constants/*"], "@lib/*": ["lib/*"], "@db": ["db/db"], }, @@ -18,7 +19,7 @@ "**/*.ts", "**/*.tsx", "**/*.js", - "constants/*.ts", + "**/*.jsx", ".expo/types/**/*.ts", "expo-env.d.ts", "app/_layout.tsx",