SYMBOL INDEX (1574 symbols across 267 files) FILE: App.tsx function App (line 30) | function App() { FILE: __tests__/contracts/coreMLDiffusion.contract.test.ts type CoreMLDiffusionModuleInterface (line 10) | interface CoreMLDiffusionModuleInterface { FILE: __tests__/contracts/iosDownloadManager.contract.test.ts type DownloadManagerModuleInterface (line 13) | interface DownloadManagerModuleInterface { FILE: __tests__/contracts/localDream.contract.test.ts type LocalDreamModuleInterface (line 9) | interface LocalDreamModuleInterface { FILE: __tests__/contracts/whisper.contract.test.ts type WhisperContextOptions (line 11) | interface WhisperContextOptions { type TranscribeOptions (line 16) | interface TranscribeOptions { type TranscribeRealtimeOptions (line 22) | interface TranscribeRealtimeOptions { type TranscribeResult (line 31) | interface TranscribeResult { type RealtimeTranscribeEvent (line 35) | interface RealtimeTranscribeEvent { type WhisperContext (line 42) | interface WhisperContext { FILE: __tests__/integration/models/activeModelService.test.ts function expectLoadedSettings (line 34) | function expectLoadedSettings(expected: Record) { function loadBothModelsWithSizes (line 353) | async function loadBothModelsWithSizes(textId: string, imageId: string) { function setupAndLoadBothModels (line 370) | async function setupAndLoadBothModels(textId = 'text-model', imageId = '... FILE: __tests__/integration/stores/remoteServerDiscovery.test.ts function addServer (line 37) | function addServer(opts: { function jsonResponse (line 59) | function jsonResponse(body: unknown, ok = true, status = 200): Response { function rejectWith (line 68) | function rejectWith(msg: string): Promise { FILE: __tests__/rntl/components/AppSheet.test.tsx function getHandleContainer (line 645) | function getHandleContainer(getAllByType: (type: any) => any[]) { function makeTouchEvent (line 657) | function makeTouchEvent(pageY: number, previousY?: number, timestamp = D... FILE: __tests__/rntl/components/ChatInput.test.tsx method pick (line 28) | get pick() { return mockPick; } method isErrorWithCode (line 29) | get isErrorWithCode() { return mockIsErrorWithCode; } method isSupported (line 46) | get isSupported() { return mockIsSupported; } method processDocumentFromPath (line 47) | get processDocumentFromPath() { return mockProcessDocument; } FILE: __tests__/rntl/components/ChatMessageTools.test.tsx function renderToolResult (line 26) | function renderToolResult(toolName: string | undefined, content: string,... FILE: __tests__/rntl/components/RemoteServerModal.test.tsx function createMockServer (line 102) | function createMockServer(overrides: Partial = {}) { constant VALID_ENDPOINT (line 114) | const VALID_ENDPOINT = 'http://192.168.1.50:11434'; function fillValidForm (line 243) | function fillValidForm(getByPlaceholderText: any) { function connectAndEnableSave (line 312) | async function connectAndEnableSave(getByText: any, getByPlaceholderText... function connectForEdit (line 360) | async function connectForEdit(getByText: any) { function setupPublicEndpointWithTest (line 408) | async function setupPublicEndpointWithTest(getByText: any, getByPlacehol... FILE: __tests__/rntl/components/SharePromptSheet.test.tsx function renderSheet (line 17) | function renderSheet(onClose = jest.fn()) { FILE: __tests__/rntl/onboarding/ChatScreenSpotlight.test.tsx method current (line 33) | get current() { return mockCurrent; } function renderChatScreen (line 169) | function renderChatScreen() { FILE: __tests__/rntl/onboarding/ChatsListScreenSpotlight.test.tsx function renderScreen (line 57) | function renderScreen() { FILE: __tests__/rntl/onboarding/HomeScreenSpotlight.test.tsx function renderHomeScreen (line 172) | function renderHomeScreen() { FILE: __tests__/rntl/onboarding/ModelSettingsScreenSpotlight.test.tsx function renderScreen (line 39) | function renderScreen() { FILE: __tests__/rntl/onboarding/ProjectEditScreenSpotlight.test.tsx function renderScreen (line 39) | function renderScreen() { FILE: __tests__/rntl/screens/ChatScreen.test.tsx function setupTwoModelChat (line 1429) | function setupTwoModelChat() { function setupChatWithAssistantImage (line 1589) | function setupChatWithAssistantImage() { function setupRetryEditChat (line 1702) | function setupRetryEditChat(userMsgText: string, assistantMsgText: strin... function setupImageViewerChat (line 1771) | function setupImageViewerChat() { FILE: __tests__/rntl/screens/ModelDownloadScreen.test.tsx constant MOCK_FILE (line 220) | const MOCK_FILE = { function flushPromises (line 235) | async function flushPromises(count = 10) { function setupDownloadCompletion (line 379) | async function setupDownloadCompletion() { FILE: __tests__/rntl/screens/ModelsScreen.test.tsx constant VISION_PIPELINE_TAG (line 19) | const VISION_PIPELINE_TAG = 'image-text-to-text'; constant CODE_FALLBACK_QUERY (line 20) | const CODE_FALLBACK_QUERY = 'coder'; FILE: __tests__/rntl/screens/RemoteServersScreen.test.tsx function createMockServer (line 105) | function createMockServer(overrides: Partial = {}) { FILE: __tests__/unit/hooks/useChatGenerationActions.test.ts function makeRef (line 183) | function makeRef(value: T): React.MutableRefObject { function makeGenerationDeps (line 190) | function makeGenerationDeps(overrides: Record = {}): any { FILE: __tests__/unit/hooks/useChatModelActions.test.ts function makeRef (line 82) | function makeRef(value: T): React.MutableRefObject { function makeDeps (line 86) | function makeDeps(overrides: Partial = {}) { FILE: __tests__/unit/hooks/useKeyboardAwarePopover.test.ts function showPopoverWithKeyboard (line 59) | function showPopoverWithKeyboard() { FILE: __tests__/unit/hooks/useModelLoading.test.ts function makeTextModel (line 49) | function makeTextModel(overrides: Partial = {}): any { function makeImageModel (line 53) | function makeImageModel(overrides: Partial = {}): any { function makeSetters (line 57) | function makeSetters() { FILE: __tests__/unit/onboarding/chatScreenSpotlight.test.ts class ChatScreenSpotlightSimulator (line 36) | class ChatScreenSpotlightSimulator { method goTo (line 43) | private goTo(step: number) { method simulateMount (line 48) | simulateMount() { method simulateTourStop (line 64) | simulateTourStop() { method simulateImageDrawCheck (line 84) | simulateImageDrawCheck(imageModelLoaded: boolean) { method simulateImageSettingsCheck (line 98) | simulateImageSettingsCheck() { function getAttachStepConfig (line 112) | function getAttachStepConfig(spotlight: number | null) { FILE: __tests__/unit/onboarding/handleStepPress.test.ts type ImageState (line 33) | interface ImageState { constant DEFAULT_IMAGE_STATE (line 39) | const DEFAULT_IMAGE_STATE: ImageState = { constant PENDING_MAP (line 50) | const PENDING_MAP: Record = { function simulateHandleStepPress (line 62) | function simulateHandleStepPress( FILE: __tests__/unit/onboarding/reactiveSpotlightConditions.test.ts function shouldShowImageLoad (line 33) | function shouldShowImageLoad(): boolean { function shouldShowImageNewChat (line 80) | function shouldShowImageNewChat(): boolean { function shouldShowImageDraw (line 120) | function shouldShowImageDraw(imageModelLoaded: boolean): boolean { function shouldShowImageSettings (line 157) | function shouldShowImageSettings(): boolean { FILE: __tests__/unit/screens/ModelsScreen/imageDownloadActions.test.ts function makeDeps (line 80) | function makeDeps(overrides: Partial = {}): ImageDown... function makeHFModelInfo (line 100) | function makeHFModelInfo(overrides: Partial = {}):... function makeZipModelInfo (line 118) | function makeZipModelInfo(overrides: Partial = {})... function makeCoreMLModelInfo (line 131) | function makeCoreMLModelInfo(overrides: Partial = ... FILE: __tests__/unit/screens/ModelsScreen/restoreImageDownloads.test.ts function makeDownload (line 131) | function makeDownload(overrides: Partial = {}): ... function makeMetadata (line 144) | function makeMetadata(overrides: Partial = {}): P... function renderUseImageModels (line 161) | function renderUseImageModels() { FILE: __tests__/unit/services/contextCompaction.test.ts function mockTokenCounts (line 38) | function mockTokenCounts(nonSystemTokens = 500) { function compactWith (line 45) | function compactWith(messages: Message[], extra?: { previousSummary?: st... FILE: __tests__/unit/services/coreMLModelBrowser.test.ts function setupSuccessfulFetch (line 81) | function setupSuccessfulFetch(_repo?: string) { function setupFailingFetch (line 114) | function setupFailingFetch() { FILE: __tests__/unit/services/downloadHelpers.test.ts constant MODELS_DIR (line 18) | const MODELS_DIR = '/mock/documents/models'; constant IMAGE_MODELS_DIR (line 19) | const IMAGE_MODELS_DIR = '/mock/documents/image_models'; function makeDownloadedModel (line 25) | function makeDownloadedModel(overrides: Partial = {}): ... function makeImageModel (line 39) | function makeImageModel(overrides: Partial = {}): ONNXIm... function makeRNFSFile (line 51) | function makeRNFSFile(name: string, path: string, size: number | string ... function makeRNFSDir (line 55) | function makeRNFSDir(name: string, path: string) { FILE: __tests__/unit/services/generationToolLoop.test.ts function makeMessage (line 78) | function makeMessage(overrides: Partial = {}): Message { function makeToolCall (line 82) | function makeToolCall(overrides: Partial = {}): ToolCall { function makeToolResult (line 91) | function makeToolResult(overrides: Partial = {}): ToolResult { function createContext (line 101) | function createContext(overrides: Partial = {}): ToolLo... function createStreamingContext (line 977) | function createStreamingContext(overrides: Partial = {}... FILE: __tests__/unit/services/httpClient.test.ts function parseSSEData (line 32) | async function parseSSEData(...chunks: string[]): Promise<{ events: any[... function mockFileReaderSuccess (line 481) | function mockFileReaderSuccess(result = 'data:image/png;base64,encoded') { function mockFileReaderError (line 498) | function mockFileReaderError() { function startStream (line 818) | function startStream(headers: Record = {}): Promise { function simulateProgress (line 823) | function simulateProgress(responseText: string) { function simulateComplete (line 831) | function simulateComplete(responseText: string) { FILE: __tests__/unit/services/huggingFaceModelBrowser.test.ts function treeEntry (line 15) | function treeEntry( function mockFetchResponses (line 35) | function mockFetchResponses(...responses: { ok: boolean; body?: unknown ... FILE: __tests__/unit/services/imageModelRecommendation.test.ts type TestImageModel (line 12) | interface TestImageModel { function isRecommendedModel (line 20) | function isRecommendedModel(model: TestImageModel, imageRec: ImageModelR... constant COREML_MODELS (line 36) | const COREML_MODELS: TestImageModel[] = [ constant QNN_MODELS (line 70) | const QNN_MODELS: TestImageModel[] = [ constant MNN_MODELS (line 77) | const MNN_MODELS: TestImageModel[] = [ FILE: __tests__/unit/services/llm.test.ts function setupScalingTest (line 23) | function setupScalingTest({ method chatTemplates (line 2342) | get chatTemplates() { throw new Error('boom'); } FILE: __tests__/unit/services/llmHelpers.test.ts method model (line 143) | get model() { throw new Error('boom'); } method model (line 172) | get model() { throw new Error('boom'); } function makeMsg (line 197) | function makeMsg(content: string): any { FILE: __tests__/unit/services/llmToolGeneration.test.ts function createMockDeps (line 24) | function createMockDeps(overrides: Partial = {}): To... constant SAMPLE_TOOLS (line 50) | const SAMPLE_TOOLS = [ FILE: __tests__/unit/services/modelManager.test.ts constant MODELS_STORAGE_KEY (line 49) | const MODELS_STORAGE_KEY = '@local_llm/downloaded_models'; FILE: __tests__/unit/services/modelManager/imageSync.test.ts function makeOpts (line 52) | function makeOpts(overrides: Partial = {}) { FILE: __tests__/unit/services/parallelMmproj.test.ts constant MODELS_DIR (line 54) | const MODELS_DIR = '/mock/documents/models'; function visionFile (line 57) | function visionFile(mainSize = 4_000_000_000, mmProjSize = 500_000_000) { function stubStartDownload (line 69) | function stubStartDownload(ids: number[]) { function captureCompleteCallbacks (line 83) | function captureCompleteCallbacks(): Record Prom... function captureErrorCallbacks (line 93) | function captureErrorCallbacks(): Record void> { function captureProgressCallbacks (line 103) | function captureProgressCallbacks(): Record void> { function setupVisionDownload (line 327) | async function setupVisionDownload() { FILE: __tests__/unit/services/providers/registry.test.ts function makeProvider (line 16) | function makeProvider(id: string) { FILE: __tests__/unit/services/rag/database.test.ts function expectDeleteCascade (line 23) | function expectDeleteCascade() { FILE: __tests__/unit/services/restore.test.ts constant MODELS_DIR (line 25) | const MODELS_DIR = '/mock/documents/models'; function makePersistedInfo (line 27) | function makePersistedInfo(overrides: Partial = {... function makeActiveDownload (line 38) | function makeActiveDownload(overrides: Partial<{ function callRestore (line 64) | function callRestore(overrides: { FILE: __tests__/unit/services/tools/handlers.test.ts function makeToolCall (line 34) | function makeToolCall(name: string, args: Record = {}): Too... function runTool (line 39) | async function runTool(name: string, args: Record = {}) { function buildBraveSearchHTML (line 48) | function buildBraveSearchHTML( FILE: __tests__/unit/stores/authStore.test.ts constant MAX_FAILED_ATTEMPTS (line 12) | const MAX_FAILED_ATTEMPTS = 5; constant LOCKOUT_DURATION (line 13) | const LOCKOUT_DURATION = 5 * 60 * 1000; FILE: __tests__/unit/stores/remoteServerStore.test.ts function addTestServer (line 24) | function addTestServer(name = 'Test Server', endpoint = 'http://test:114... function addServerWithModel (line 36) | function addServerWithModel(modelId = 'model1', modelName = 'Model 1'): ... function discoverWithModels (line 806) | async function discoverWithModels(modelIds: string[]) { FILE: __tests__/unit/utils/coreMLModelUtils.test.ts type MockReadDirItem (line 24) | interface MockReadDirItem { function makeFileItem (line 32) | function makeFileItem(name: string, parentPath: string, size = 1000): Mo... function makeDirItem (line 42) | function makeDirItem(name: string, parentPath: string): MockReadDirItem { FILE: __tests__/utils/factories.ts type MessageFactoryOptions (line 43) | interface MessageFactoryOptions { type ConversationFactoryOptions (line 91) | interface ConversationFactoryOptions { type DownloadedModelFactoryOptions (line 130) | interface DownloadedModelFactoryOptions { type ModelFileFactoryOptions (line 176) | interface ModelFileFactoryOptions { type ModelInfoFactoryOptions (line 190) | interface ModelInfoFactoryOptions { type DeviceInfoFactoryOptions (line 220) | interface DeviceInfoFactoryOptions { type ModelRecommendationFactoryOptions (line 258) | interface ModelRecommendationFactoryOptions { type ONNXImageModelFactoryOptions (line 276) | interface ONNXImageModelFactoryOptions { type GeneratedImageFactoryOptions (line 304) | interface GeneratedImageFactoryOptions { type MediaAttachmentFactoryOptions (line 336) | interface MediaAttachmentFactoryOptions { type GenerationMetaFactoryOptions (line 377) | interface GenerationMetaFactoryOptions { type ProjectFactoryOptions (line 409) | interface ProjectFactoryOptions { FILE: __tests__/utils/spotlightMocks.tsx function createSpotlightTourMock (line 24) | function createSpotlightTourMock() { function createNavigationMock (line 43) | function createNavigationMock(extras?: Record) { function createCustomAlertMock (line 58) | function createCustomAlertMock() { function createAnimatedEntryMock (line 68) | function createAnimatedEntryMock() { function createAnimatedPressableMock (line 72) | function createAnimatedPressableMock() { function createAnimatedListItemMock (line 85) | function createAnimatedListItemMock() { function createHardwareServiceMock (line 99) | function createHardwareServiceMock() { function createModelManagerMock (line 112) | function createModelManagerMock() { function clearSpotlightMocks (line 124) | function clearSpotlightMocks() { FILE: e2e/scripts/seedSimulatorFiles.js function makeMinimalGguf (line 82) | function makeMinimalGguf() { FILE: jest.setup.ts function makeGroupAnimation (line 436) | function makeGroupAnimation(animations: any[]) { FILE: src/components/AdvancedToggle.tsx type AdvancedToggleProps (line 8) | interface AdvancedToggleProps { FILE: src/components/AnimatedEntry.tsx type AnimatedEntryProps (line 11) | interface AnimatedEntryProps { function AnimatedEntry (line 24) | function AnimatedEntry({ FILE: src/components/AnimatedListItem.tsx type AnimatedListItemProps (line 7) | interface AnimatedListItemProps { function AnimatedListItem (line 37) | function AnimatedListItem({ FILE: src/components/AnimatedPressable.tsx type AnimatedPressableProps (line 17) | interface AnimatedPressableProps { function AnimatedPressable (line 33) | function AnimatedPressable({ FILE: src/components/AppSheet.tsx type AppSheetProps (line 21) | interface AppSheetProps { function resolveSnapPoint (line 35) | function resolveSnapPoint(snap: string | number): number { function createSheetPanResponder (line 43) | function createSheetPanResponder({ FILE: src/components/Button.tsx type ButtonProps (line 13) | interface ButtonProps { FILE: src/components/Card.tsx type CardProps (line 11) | interface CardProps { FILE: src/components/ChatInput/Attachments.tsx function useAttachments (line 18) | function useAttachments(setAlertState: (state: AlertState) => void) { type AttachmentPreviewProps (line 121) | interface AttachmentPreviewProps { FILE: src/components/ChatInput/Popovers.tsx constant SHADOW_COLOR (line 12) | const SHADOW_COLOR = '#000'; type QuickSettingsPopoverProps (line 59) | interface QuickSettingsPopoverProps { function getImageModeBadge (line 73) | function getImageModeBadge(mode: ImageModeState, colors: any) { function getToolsStyle (line 79) | function getToolsStyle(supported: boolean, count: number, colors: any) { type AttachPickerPopoverProps (line 178) | interface AttachPickerPopoverProps { FILE: src/components/ChatInput/Toolbar.tsx type QueueRowProps (line 7) | interface QueueRowProps { FILE: src/components/ChatInput/Voice.ts type UseVoiceInputParams (line 5) | interface UseVoiceInputParams { function useVoiceInput (line 10) | function useVoiceInput({ conversationId, onTranscript }: UseVoiceInputPa... FILE: src/components/ChatInput/index.tsx type ChatInputProps (line 17) | interface ChatInputProps { constant IMAGE_MODE_CYCLE (line 40) | const IMAGE_MODE_CYCLE: ImageModeState[] = ['auto', 'force', 'disabled']; FILE: src/components/ChatInput/styles.ts constant PILL_ICON_SIZE (line 5) | const PILL_ICON_SIZE = 32; constant NUM_PILL_ICONS (line 6) | const NUM_PILL_ICONS = 2; constant PILL_ICONS_WIDTH (line 7) | const PILL_ICONS_WIDTH = PILL_ICON_SIZE * NUM_PILL_ICONS; constant ANIM_DURATION_IN (line 8) | const ANIM_DURATION_IN = 180; constant ANIM_DURATION_OUT (line 9) | const ANIM_DURATION_OUT = 200; FILE: src/components/ChatInput/useKeyboardAwarePopover.ts function useKeyboardAwarePopover (line 10) | function useKeyboardAwarePopover(offsetX: number = SPACING.md) { FILE: src/components/ChatMessage/components/ActionMenuSheet.tsx type ActionMenuSheetProps (line 8) | interface ActionMenuSheetProps { function ActionMenuSheet (line 22) | function ActionMenuSheet({ type EditSheetProps (line 97) | interface EditSheetProps { function EditSheet (line 108) | function EditSheet({ FILE: src/components/ChatMessage/components/BlinkingCursor.tsx function BlinkingCursor (line 13) | function BlinkingCursor() { FILE: src/components/ChatMessage/components/GenerationMeta.tsx type GenerationMetaProps (line 6) | interface GenerationMetaProps { type MetaItem (line 11) | type MetaItem = { key: string; label: string; maxLines?: number }; function formatOptionalMeta (line 13) | function formatOptionalMeta(meta: NonNullable... function buildMetaItems (line 30) | function buildMetaItems( function GenerationMeta (line 42) | function GenerationMeta({ generationMeta, styles }: Readonly = { constant FALLBACK_MAX_CONTEXT (line 36) | const FALLBACK_MAX_CONTEXT = 32768; constant HIGH_CONTEXT_THRESHOLD (line 37) | const HIGH_CONTEXT_THRESHOLD = 8192; constant BASIC_KEYS (line 44) | const BASIC_KEYS = ['temperature', 'maxTokens', 'contextLength']; type SettingSliderProps (line 95) | interface SettingSliderProps { FILE: src/components/GenerationSettingsModal/index.tsx constant DEFAULT_SETTINGS (line 13) | const DEFAULT_SETTINGS = { type GenerationSettingsModalProps (line 23) | interface GenerationSettingsModalProps { FILE: src/components/MadeWithLove.tsx constant WEDNESDAY_URL (line 5) | const WEDNESDAY_URL = 'https://www.wednesday.is/?utm_source=off-grid-mob... constant TEXT_COLOR (line 21) | const TEXT_COLOR = '#8C8C8C'; constant HEART_COLOR (line 22) | const HEART_COLOR = '#FF0000'; FILE: src/components/MarkdownText.tsx function preprocessMarkdown (line 13) | function preprocessMarkdown(text: string): string { function createLinkRule (line 22) | function createLinkRule(onPress: (url: string) => void) { type MarkdownTextProps (line 35) | interface MarkdownTextProps { function MarkdownText (line 40) | function MarkdownText({ children, dimmed }: MarkdownTextProps) { function createMarkdownStyles (line 62) | function createMarkdownStyles(colors: ThemeColors, dimmed?: boolean) { FILE: src/components/ModelCard.tsx type ModelCardProps (line 15) | interface ModelCardProps { function resolveQuantInfo (line 49) | function resolveQuantInfo(file?: ModelFile, downloadedModel?: Downloaded... function resolveFileSize (line 54) | function resolveFileSize(file?: ModelFile, downloadedModel?: DownloadedM... function resolveCredibility (line 60) | function resolveCredibility( function formatNumber (line 208) | function formatNumber(num: number): string { function formatBytes (line 214) | function formatBytes(bytes: number): string { FILE: src/components/ModelCardContent.tsx type CredibilityInfo (line 12) | interface CredibilityInfo { type CompactModelCardContentProps (line 19) | interface CompactModelCardContentProps { function formatNumber (line 34) | function formatNumber(num: number): string { type ModelType (line 40) | type ModelType = 'text' | 'vision' | 'code'; function modelTypeLabel (line 42) | function modelTypeLabel(modelType: ModelType): string { function modelTypeBadgeStyle (line 48) | function modelTypeBadgeStyle( function modelTypeTextStyle (line 57) | function modelTypeTextStyle( type StandardModelCardContentProps (line 135) | interface StandardModelCardContentProps { type ModelInfoBadgesProps (line 194) | interface ModelInfoBadgesProps { type ModelCardActionsProps (line 273) | interface ModelCardActionsProps { constant HIT_SLOP (line 287) | const HIT_SLOP = { top: 8, bottom: 8, left: 8, right: 8 }; function ActionButton (line 289) | function ActionButton({ icon, color, haptic, onPress, disabled, testID, ... function DownloadedActions (line 306) | function DownloadedActions({ isActive, testID, colors, styles, onSelect,... FILE: src/components/ModelSelectorModal/ImageTab.tsx type ImageTabProps (line 9) | interface ImageTabProps { FILE: src/components/ModelSelectorModal/TextTab.tsx type TextTabProps (line 9) | interface TextTabProps { FILE: src/components/ModelSelectorModal/index.tsx type TabType (line 21) | type TabType = 'text' | 'image'; type ModelSelectorModalProps (line 23) | interface ModelSelectorModalProps { FILE: src/components/ProjectSelectorSheet.tsx type ProjectSelectorSheetProps (line 14) | interface ProjectSelectorSheetProps { FILE: src/components/RemoteServerModal/index.tsx type RemoteServerModalProps (line 24) | interface RemoteServerModalProps { type TestResultSectionProps (line 31) | interface TestResultSectionProps { FILE: src/components/RemoteServerModal/styles.ts function createStyles (line 3) | function createStyles(colors: ThemeColors, _shadows: ThemeShadows) { FILE: src/components/RemoteServerModal/useRemoteServerForm.ts type FormOptions (line 8) | interface FormOptions { function useRemoteServerForm (line 15) | function useRemoteServerForm({ server, visible, onSave, onClose }: FormO... FILE: src/components/SharePromptSheet.tsx type SharePromptSheetProps (line 11) | interface SharePromptSheetProps { FILE: src/components/ThinkingIndicator.tsx type ThinkingIndicatorProps (line 5) | interface ThinkingIndicatorProps { FILE: src/components/ToolPickerSheet.tsx type ToolPickerSheetProps (line 10) | interface ToolPickerSheetProps { FILE: src/components/VoiceRecordButton/index.tsx type VoiceRecordButtonProps (line 28) | interface VoiceRecordButtonProps { constant CANCEL_DISTANCE (line 42) | const CANCEL_DISTANCE = 80; type CallbacksRef (line 44) | type CallbacksRef = { onStartRecording: () => void; onStopRecording: () ... function buildPanResponder (line 46) | function buildPanResponder({ FILE: src/components/VoiceRecordButton/states.tsx type LoadingStateProps (line 9) | interface LoadingStateProps { type TranscribingStateProps (line 31) | interface TranscribingStateProps { type UnavailableButtonProps (line 53) | interface UnavailableButtonProps { type ButtonIconProps (line 80) | interface ButtonIconProps { FILE: src/components/checklist/ProgressBar.tsx type ProgressBarProps (line 6) | interface ProgressBarProps { function ProgressBar (line 12) | function ProgressBar({ completed, total, theme }: ProgressBarProps) { FILE: src/components/checklist/animations.ts type SpringConfig (line 4) | interface SpringConfig { function springTo (line 9) | function springTo( function useStaggeredEntrance (line 23) | function useStaggeredEntrance( function useCheckmark (line 59) | function useCheckmark(completed: boolean, spring: SpringConfig) { function useStrikethrough (line 95) | function useStrikethrough(completed: boolean) { function useProgressAnimation (line 110) | function useProgressAnimation(progress: number) { FILE: src/components/checklist/types.ts type OnboardingStep (line 1) | interface OnboardingStep { type ChecklistTheme (line 10) | interface ChecklistTheme { FILE: src/components/checklist/useOnboardingSteps.ts function useOnboardingSteps (line 9) | function useOnboardingSteps() { function useChecklistTheme (line 35) | function useChecklistTheme(): ChecklistTheme { function useAutoDismiss (line 65) | function useAutoDismiss(completedCount: number, totalCount: number) { FILE: src/components/onboarding/OnboardingSheet.tsx type OnboardingSheetProps (line 18) | interface OnboardingSheetProps { type ChecklistRowProps (line 24) | interface ChecklistRowProps { FILE: src/components/onboarding/PulsatingIcon.tsx type PulsatingIconProps (line 6) | interface PulsatingIconProps { FILE: src/components/onboarding/spotlightConfig.tsx type TooltipProps (line 8) | interface TooltipProps { constant STEP_INDEX_MAP (line 29) | const STEP_INDEX_MAP: Record = { constant CHAT_INPUT_STEP_INDEX (line 39) | const CHAT_INPUT_STEP_INDEX = 3; constant MODEL_SETTINGS_STEP_INDEX (line 42) | const MODEL_SETTINGS_STEP_INDEX = 6; constant PROJECT_EDIT_STEP_INDEX (line 45) | const PROJECT_EDIT_STEP_INDEX = 8; constant DOWNLOAD_FILE_STEP_INDEX (line 48) | const DOWNLOAD_FILE_STEP_INDEX = 9; constant DOWNLOAD_MANAGER_STEP_INDEX (line 51) | const DOWNLOAD_MANAGER_STEP_INDEX = 10; constant MODEL_PICKER_STEP_INDEX (line 54) | const MODEL_PICKER_STEP_INDEX = 11; constant VOICE_HINT_STEP_INDEX (line 57) | const VOICE_HINT_STEP_INDEX = 12; constant IMAGE_LOAD_STEP_INDEX (line 60) | const IMAGE_LOAD_STEP_INDEX = 13; constant IMAGE_NEW_CHAT_STEP_INDEX (line 63) | const IMAGE_NEW_CHAT_STEP_INDEX = 14; constant IMAGE_DRAW_STEP_INDEX (line 66) | const IMAGE_DRAW_STEP_INDEX = 15; constant IMAGE_SETTINGS_STEP_INDEX (line 69) | const IMAGE_SETTINGS_STEP_INDEX = 16; constant IMAGE_DOWNLOAD_STEP_INDEX (line 72) | const IMAGE_DOWNLOAD_STEP_INDEX = 17; constant STEP_TAB_MAP (line 74) | const STEP_TAB_MAP: Record = { function createSpotlightSteps (line 83) | function createSpotlightSteps(): TourStep[] { FILE: src/components/onboarding/spotlightState.ts function setPendingSpotlight (line 6) | function setPendingSpotlight(stepIndex: number | null) { function consumePendingSpotlight (line 10) | function consumePendingSpotlight(): number | null { function peekPendingSpotlight (line 16) | function peekPendingSpotlight(): number | null { FILE: src/components/onboarding/useOnboardingSheet.ts function useOnboardingSheet (line 5) | function useOnboardingSheet() { FILE: src/constants/index.ts constant HF_API (line 4) | const HF_API = { constant LMSTUDIO_AUTHORS (line 18) | const LMSTUDIO_AUTHORS = [ constant OFFICIAL_MODEL_AUTHORS (line 24) | const OFFICIAL_MODEL_AUTHORS: Record = { constant VERIFIED_QUANTIZERS (line 49) | const VERIFIED_QUANTIZERS: Record = { constant CREDIBILITY_LABELS (line 62) | const CREDIBILITY_LABELS = { constant APP_CONFIG (line 86) | const APP_CONFIG = { constant ONBOARDING_SLIDES (line 102) | const ONBOARDING_SLIDES = [ constant FONTS (line 130) | const FONTS = { constant TYPOGRAPHY (line 135) | const TYPOGRAPHY = { constant SPACING (line 204) | const SPACING = { FILE: src/constants/models.ts constant MODEL_RECOMMENDATIONS (line 2) | const MODEL_RECOMMENDATIONS = { constant RECOMMENDED_MODELS (line 16) | const RECOMMENDED_MODELS = [ constant TRENDING_FAMILIES (line 128) | const TRENDING_FAMILIES: Record = { constant TRENDING_MODEL_IDS (line 133) | const TRENDING_MODEL_IDS = Object.values(TRENDING_FAMILIES).flat(); constant MODEL_ORGS (line 136) | const MODEL_ORGS = [ constant QUANTIZATION_INFO (line 148) | const QUANTIZATION_INFO: Record = { constant GPU_LAYERS_MAX (line 16) | const GPU_LAYERS_MAX = 99; constant CACHE_TYPE_OPTIONS (line 17) | const CACHE_TYPE_OPTIONS: CacheType[] = ['f16', 'q8_0', 'q4_0']; function useTextGenerationAdvanced (line 19) | function useTextGenerationAdvanced() { FILE: src/hooks/useVoiceRecording.ts type UseVoiceRecordingResult (line 5) | interface UseVoiceRecordingResult { FILE: src/hooks/useWhisperTranscription.ts type UseWhisperTranscriptionResult (line 14) | interface UseWhisperTranscriptionResult { FILE: src/navigation/AppNavigator.tsx constant TAB_ICON_MAP (line 50) | const TAB_ICON_MAP: Record = { FILE: src/navigation/types.ts type RootStackParamList (line 3) | type RootStackParamList = { type MainTabParamList (line 28) | type MainTabParamList = { FILE: src/screens/ChatScreen/ChatMessageArea.tsx type ChatMessageAreaProps (line 17) | type ChatMessageAreaProps = { FILE: src/screens/ChatScreen/ChatModalSection.tsx type StylesType (line 11) | type StylesType = ReturnType; type ColorsType (line 12) | type ColorsType = ReturnType['colors']; type ChatModalSectionProps (line 14) | type ChatModalSectionProps = { FILE: src/screens/ChatScreen/ChatScreenComponents.tsx type StylesType (line 19) | type StylesType = ReturnType; type ColorsType (line 20) | type ColorsType = ReturnType['colors']; FILE: src/screens/ChatScreen/MessageRenderer.tsx type MessageRendererProps (line 6) | type MessageRendererProps = { FILE: src/screens/ChatScreen/index.tsx function countConversationImages (line 20) | function countConversationImages(conv: Conversation | undefined): number { FILE: src/screens/ChatScreen/toolUsage.ts constant SIMPLE_CALC_CHARS (line 1) | const SIMPLE_CALC_CHARS = new Set([' ', '+', '-', '*', '/', '^', '%', '.... function looksLikeSimpleMathExpression (line 3) | function looksLikeSimpleMathExpression(text: string): boolean { constant TOOL_TRIGGER_PATTERNS (line 15) | const TOOL_TRIGGER_PATTERNS = { function shouldUseToolsForMessage (line 30) | function shouldUseToolsForMessage(messageText: string, enabledTools: str... FILE: src/screens/ChatScreen/types.ts type ChatMessageItem (line 3) | type ChatMessageItem = { type StreamingState (line 13) | type StreamingState = { function getDisplayMessages (line 20) | function getDisplayMessages( type PlaceholderTextOptions (line 40) | type PlaceholderTextOptions = { function getPlaceholderText (line 47) | function getPlaceholderText({ FILE: src/screens/ChatScreen/useChatGenerationActions.ts type SetState (line 25) | type SetState = Dispatch>; constant FALLBACK_RECENT_MESSAGE_COUNT (line 26) | const FALLBACK_RECENT_MESSAGE_COUNT = 2; type GenerationDeps (line 27) | type GenerationDeps = { function applyCompactionPrefix (line 70) | function applyCompactionPrefix(conversation: any, systemPrompt: string, ... function appendAttachmentText (line 80) | function appendAttachmentText(text: string, attachments?: MediaAttachmen... function buildMessagesForContext (line 85) | function buildMessagesForContext(conversationId: string, messageText: st... function shouldRouteToImageGenerationFn (line 93) | async function shouldRouteToImageGenerationFn( type ImageGenCall (line 131) | type ImageGenCall = { function handleImageGenerationFn (line 136) | async function handleImageGenerationFn( type StartGenerationCall (line 153) | type StartGenerationCall = { setDebugInfo: SetState; targetConversa... function ensureModelReady (line 154) | async function ensureModelReady(deps: GenerationDeps): Promise { function prepareContext (line 161) | async function prepareContext(setDebugInfo: SetState, systemPrompt:... function generateWithCompactionRetry (line 172) | async function generateWithCompactionRetry( function injectRagContext (line 195) | async function injectRagContext(projectId: string | undefined, query: st... function resolveToolsAndPrompt (line 221) | function resolveToolsAndPrompt(deps: GenerationDeps, conversation: any, ... function startGenerationFn (line 249) | async function startGenerationFn(deps: GenerationDeps, call: StartGenera... type SendCall (line 295) | type SendCall = { text: string; attachments?: MediaAttachment[]; imageMo... function handleSendFn (line 296) | async function handleSendFn(deps: GenerationDeps, call: SendCall): Promi... function handleStopFn (line 322) | async function handleStopFn(deps: Pick; userMessage: Messag... function regenerateResponseFn (line 341) | async function regenerateResponseFn(deps: GenerationDeps, call: Regenera... type SelectProjectDeps (line 374) | type SelectProjectDeps = { activeConversationId: string | null | undefin... function handleSelectProjectFn (line 375) | function handleSelectProjectFn(deps: SelectProjectDeps, project: Project... FILE: src/screens/ChatScreen/useChatMessageHandlers.ts type SetState (line 9) | type SetState = Dispatch>; type RetryParams (line 11) | type RetryParams = { function handleRetryMessageFn (line 19) | async function handleRetryMessageFn( type EditParams (line 38) | type EditParams = { function handleEditMessageFn (line 48) | async function handleEditMessageFn(genDeps: GenerationDeps, p: EditParam... function handleDeleteConversationFn (line 55) | function handleDeleteConversationFn( function handleGenerateImageFromMsgFn (line 70) | async function handleGenerateImageFromMsgFn( FILE: src/screens/ChatScreen/useChatModelActions.ts type SetState (line 11) | type SetState = Dispatch>; type ActiveModelInfo (line 13) | type ActiveModelInfo = { type ModelActionDeps (line 20) | type ModelActionDeps = { function waitForRenderFrame (line 42) | function waitForRenderFrame(): Promise { function addSystemMsg (line 48) | function addSystemMsg( function doLoadTextModel (line 60) | async function doLoadTextModel(deps: ModelActionDeps): Promise { function initiateModelLoad (line 80) | async function initiateModelLoad( function ensureModelLoadedFn (line 135) | async function ensureModelLoadedFn( function proceedWithModelLoadFn (line 152) | async function proceedWithModelLoadFn( function handleModelSelectFn (line 182) | async function handleModelSelectFn( function handleUnloadModelFn (line 224) | async function handleUnloadModelFn(deps: ModelActionDeps): Promise { type ImageModelEffectsDeps (line 248) | type ImageModelEffectsDeps = { function useChatImageModelEffects (line 254) | function useChatImageModelEffects(deps: ImageModelEffectsDeps): void { type ModelStateSyncDeps (line 289) | type ModelStateSyncDeps = { function useChatModelStateSync (line 301) | function useChatModelStateSync(deps: ModelStateSyncDeps): void { FILE: src/screens/ChatScreen/useChatScreen.ts type ChatScreenRouteProp (line 22) | type ChatScreenRouteProp = RouteProp; type ActiveModelInfo (line 24) | type ActiveModelInfo = { FILE: src/screens/ChatScreen/useSaveImage.ts function saveImageToGallery (line 7) | async function saveImageToGallery( FILE: src/screens/ChatsListScreen.tsx type NavigationProp (line 25) | type NavigationProp = CompositeNavigationProp< FILE: src/screens/DocumentPreviewScreen.tsx type NavigationProp (line 21) | type NavigationProp = NativeStackNavigationProp; type RouteProps (line 22) | type RouteProps = RouteProp; FILE: src/screens/DownloadManagerScreen/items.tsx type DownloadItem (line 14) | type DownloadItem = { type DownloadItemsData (line 34) | interface DownloadItemsData { function formatBytes (line 44) | function formatBytes(bytes: number): string { function extractQuantization (line 52) | function extractQuantization(fileName: string): string { function getStatusText (line 64) | function getStatusText(status: string): string { function buildDownloadItems (line 75) | function buildDownloadItems(data: DownloadItemsData): DownloadItem[] { function getStatusLabel (line 180) | function getStatusLabel(item: DownloadItem): string { type ActiveDownloadCardProps (line 190) | interface ActiveDownloadCardProps { type CompletedDownloadCardProps (line 284) | interface CompletedDownloadCardProps { FILE: src/screens/DownloadManagerScreen/useDownloadManager.ts type UseDownloadManagerResult (line 19) | interface UseDownloadManagerResult { function isNetworkRetryReason (line 33) | function isNetworkRetryReason(reason?: string, reasonCode?: string): boo... function isMmProjSidecar (line 43) | function isMmProjSidecar(metadata: { fileName: string; mmProjFileName?: ... function purgeStaleImageDownloads (line 49) | async function purgeStaleImageDownloads(downloads: BackgroundDownloadInf... function clearStaleTextProgressEntries (line 72) | function clearStaleTextProgressEntries( function shouldSyncSnapshot (line 95) | function shouldSyncSnapshot( function updateActiveDownloadStatus (line 110) | function updateActiveDownloadStatus( type RetryProgressContext (line 126) | type RetryProgressContext = { function handleRetryingProgressEvent (line 132) | function handleRetryingProgressEvent( function syncDownloadSnapshot (line 162) | function syncDownloadSnapshot( function useDownloadManager (line 198) | function useDownloadManager(): UseDownloadManagerResult { FILE: src/screens/GalleryScreen/FullscreenViewer.tsx type FullscreenViewerProps (line 16) | interface FullscreenViewerProps { FILE: src/screens/GalleryScreen/GridItem.tsx type GalleryGridItemProps (line 9) | interface GalleryGridItemProps { FILE: src/screens/GalleryScreen/index.tsx type GalleryScreenRouteProp (line 15) | type GalleryScreenRouteProp = RouteProp; FILE: src/screens/GalleryScreen/styles.ts constant COLUMN_COUNT (line 6) | const COLUMN_COUNT = 3; constant GRID_SPACING (line 7) | const GRID_SPACING = 4; constant CELL_SIZE (line 8) | const CELL_SIZE = (screenWidth - GRID_SPACING * (COLUMN_COUNT + 1)) / CO... FILE: src/screens/HomeScreen/components/ActiveModelsSection.tsx function ModelLoadingState (line 11) | function ModelLoadingState({ loadingState, styles }: { loadingState: Loa... type ActiveTextModel (line 23) | type ActiveTextModel = DownloadedModel | RemoteModel | undefined; type ActiveImageModel (line 24) | type ActiveImageModel = ONNXImageModel | RemoteModel | undefined; function isDownloadedModel (line 27) | function isDownloadedModel(model: ActiveTextModel): model is DownloadedM... function isRemoteModel (line 31) | function isRemoteModel(model: ActiveTextModel | ActiveImageModel): model... function isOnnxImageModel (line 35) | function isOnnxImageModel(model: ActiveImageModel): model is ONNXImageMo... type TextModelCardProps (line 39) | type TextModelCardProps = { type ImageModelCardProps (line 108) | type ImageModelCardProps = { type Props (line 182) | type Props = { FILE: src/screens/HomeScreen/components/LoadingOverlay.tsx function getLoadingTitle (line 44) | function getLoadingTitle(state: LoadingState): string { type Props (line 50) | type Props = { FILE: src/screens/HomeScreen/components/ModelPickerSheet.tsx type Props (line 15) | type Props = { type ImageTabColors (line 40) | type ImageTabColors = ReturnType['colors']; type ImageTabStyles (line 41) | type ImageTabStyles = ReturnType; type ImageTabProps (line 42) | type ImageTabProps = Pick; type RouteProps (line 28) | type RouteProps = RouteProp; FILE: src/screens/LockScreen.tsx type LockScreenProps (line 25) | interface LockScreenProps { FILE: src/screens/ModelDownloadHelpers.tsx function fetchModelFiles (line 19) | async function fetchModelFiles( FILE: src/screens/ModelDownloadScreen.tsx type Props (line 26) | type Props = { navigation: NativeStackNavigationProp ... type SortPanelProps (line 197) | interface SortPanelProps { FILE: src/screens/ModelsScreen/constants.ts constant VISION_PIPELINE_TAG (line 11) | const VISION_PIPELINE_TAG = 'image-text-to-text'; constant CODE_FALLBACK_QUERY (line 12) | const CODE_FALLBACK_QUERY = 'coder'; constant CREDIBILITY_OPTIONS (line 14) | const CREDIBILITY_OPTIONS: { key: CredibilityFilter; label: string; colo... constant MODEL_TYPE_OPTIONS (line 22) | const MODEL_TYPE_OPTIONS: { key: ModelTypeFilter; label: string }[] = [ constant SIZE_OPTIONS (line 29) | const SIZE_OPTIONS: { key: SizeFilter; label: string; min: number; max: ... constant QUANT_OPTIONS (line 37) | const QUANT_OPTIONS = [ constant STYLE_OPTIONS (line 46) | const STYLE_OPTIONS = [ constant SD_VERSION_OPTIONS (line 52) | const SD_VERSION_OPTIONS = [ constant BACKEND_OPTIONS (line 59) | const BACKEND_OPTIONS: { key: BackendFilter; label: string }[] = [ constant SORT_OPTIONS (line 65) | const SORT_OPTIONS: { key: SortOption; label: string; icon: string }[] = [ FILE: src/screens/ModelsScreen/imageDownloadActions.ts function cleanupDownloadState (line 16) | function cleanupDownloadState(deps: ImageDownloadDeps, modelId: string, ... function registerAndNotify (line 34) | async function registerAndNotify( function wireDownloadListeners (line 50) | function wireDownloadListeners( type ImageDownloadDeps (line 73) | interface ImageDownloadDeps { function downloadHuggingFaceModel (line 99) | async function downloadHuggingFaceModel( function downloadCoreMLMultiFile (line 168) | async function downloadCoreMLMultiFile( function proceedWithDownload (line 245) | async function proceedWithDownload( function getQnnWarningMessage (line 352) | function getQnnWarningMessage( function showQnnWarningAlert (line 375) | function showQnnWarningAlert( function handleDownloadImageModel (line 392) | async function handleDownloadImageModel( FILE: src/screens/ModelsScreen/importHelpers.ts type GgufFileRef (line 6) | type GgufFileRef = { uri: string; name: string; size: number }; type GgufImportDeps (line 8) | type GgufImportDeps = { function isMmProj (line 14) | function isMmProj(name: string): boolean { function classifyGgufPair (line 23) | function classifyGgufPair( function getErrorMessage (line 37) | function getErrorMessage(error: unknown): string { function importGgufFiles (line 42) | async function importGgufFiles( FILE: src/screens/ModelsScreen/types.ts type BackendFilter (line 7) | type BackendFilter = 'all' | 'mnn' | 'qnn' | 'coreml'; type ImageModelDescriptor (line 9) | interface ImageModelDescriptor { type CredibilityFilter (line 28) | type CredibilityFilter = 'all' | ModelSource; type ModelTypeFilter (line 29) | type ModelTypeFilter = 'all' | 'text' | 'vision' | 'code' | 'image-gen'; type SizeFilter (line 30) | type SizeFilter = 'all' | 'tiny' | 'small' | 'medium' | 'large'; type SortOption (line 31) | type SortOption = 'recommended' | 'bestfit' | 'size' | 'downloads' | 're... type FilterDimension (line 32) | type FilterDimension = 'org' | 'type' | 'source' | 'size' | 'quant' | 's... type ImageFilterDimension (line 33) | type ImageFilterDimension = 'backend' | 'style' | 'sdVersion' | null; type ModelTab (line 34) | type ModelTab = 'text' | 'image'; type FilterState (line 36) | interface FilterState { type NavigationProp (line 46) | type NavigationProp = CompositeNavigationProp< FILE: src/screens/ModelsScreen/useImageModels.ts function handleCompletedImageDownload (line 24) | async function handleCompletedImageDownload(opts: { function useImageModels (line 85) | function useImageModels(setAlertState: (s: AlertState) => void) { FILE: src/screens/ModelsScreen/useModelsScreen.ts type ZipImportDeps (line 21) | type ZipImportDeps = { function importImageModelZip (line 29) | async function importImageModelZip(sourceUri: string, fileName: string, ... function useModelsScreen (line 74) | function useModelsScreen() { type ModelsScreenViewModel (line 287) | type ModelsScreenViewModel = ReturnType; FILE: src/screens/ModelsScreen/useTextModels.ts constant PARAM_COUNT_REGEX (line 15) | const PARAM_COUNT_REGEX = /\b(\d+[.]\d+|\d+)\s?[Bb]\b/; function parseParamCount (line 17) | function parseParamCount(model: ModelInfo): number | null { function bestFitScore (line 23) | function bestFitScore(model: ModelInfo, ramGB: number): number { function applySort (line 30) | function applySort(models: T[], sort: SortOption, r... function matchesOrgFilter (line 42) | function matchesOrgFilter(model: ModelInfo, orgs: string[]): boolean { function mapCuratedModel (line 52) | function mapCuratedModel(m: typeof RECOMMENDED_MODELS[number], details: ... function fetchRecommendedModelDetails (line 59) | async function fetchRecommendedModelDetails(): Promise void) { FILE: src/screens/ModelsScreen/utils.ts function formatNumber (line 6) | function formatNumber(num: number): string { function formatBytes (line 12) | function formatBytes(bytes: number): string { function getDirectorySize (line 19) | async function getDirectorySize(dirPath: string): Promise { function isImageGenModel (line 35) | function isImageGenModel(tags: string[], name: string, id: string): bool... function isVisionModel (line 43) | function isVisionModel(tags: string[], name: string, id: string): boolean { function isCodeModel (line 51) | function isCodeModel(tags: string[], name: string, id: string): boolean { function getModelType (line 59) | function getModelType(model: ModelInfo): ModelTypeFilter { function isPhiModel (line 71) | function isPhiModel(modelName: string, modelId: string): boolean { function getTextModelCompatibility (line 77) | function getTextModelCompatibility( function matchesSdVersionFilter (line 91) | function matchesSdVersionFilter(modelName: string, sdVersionFilter: stri... function getImageModelCompatibility (line 104) | function getImageModelCompatibility( function hfModelToDescriptor (line 141) | function hfModelToDescriptor( FILE: src/screens/OnboardingScreen.tsx type OnboardingScreenProps (line 32) | type OnboardingScreenProps = { FILE: src/screens/OrphanedFilesSection.tsx type OrphanedFile (line 17) | interface OrphanedFile { type Props (line 23) | interface Props { FILE: src/screens/PassphraseSetupScreen.tsx type PassphraseSetupScreenProps (line 22) | interface PassphraseSetupScreenProps { FILE: src/screens/ProjectChatsScreen.tsx type NavigationProp (line 23) | type NavigationProp = NativeStackNavigationProp; type RouteProps (line 24) | type RouteProps = RouteProp; FILE: src/screens/ProjectDetailKnowledgeBaseSection.tsx type KBSectionProps (line 18) | interface KBSectionProps { FILE: src/screens/ProjectDetailScreen.tsx type NavigationProp (line 22) | type NavigationProp = NativeStackNavigationProp; type RouteProps (line 23) | type RouteProps = RouteProp; FILE: src/screens/ProjectEditScreen.tsx type NavigationProp (line 24) | type NavigationProp = NativeStackNavigationProp; FILE: src/screens/ProjectsScreen.tsx type NavigationProp (line 28) | type NavigationProp = CompositeNavigationProp< FILE: src/screens/RemoteServersScreen.styles.ts function createStyles (line 3) | function createStyles(colors: ThemeColors, _shadows: ThemeShadows) { FILE: src/screens/RemoteServersScreen.tsx type NavigationProp (line 28) | type NavigationProp = NativeStackNavigationProp void; ready: Promise { method checkImageModelCanLoad (line 160) | private async checkImageModelCanLoad( method loadImageModel (line 184) | async loadImageModel( method unloadImageModel (line 246) | async unloadImageModel(): Promise { method unloadAllModels (line 273) | async unloadAllModels(): Promise<{ textUnloaded: boolean; imageUnloade... method getResourceUsage (line 300) | async getResourceUsage(): Promise { method getIds (line 303) | private getIds() { method getLists (line 306) | private getLists() { method getCurrentlyLoadedMemoryGB (line 310) | private getCurrentlyLoadedMemoryGB(): number { method checkMemoryForModel (line 313) | async checkMemoryForModel(modelId: string, modelType: ModelType): Prom... method checkMemoryForDualModel (line 316) | async checkMemoryForDualModel(textModelId: string | null, imageModelId... method clearTextModelCache (line 319) | async clearTextModelCache(): Promise { method syncWithNativeState (line 324) | async syncWithNativeState(): Promise { method subscribe (line 339) | subscribe(listener: ModelChangeListener): () => void { method notifyListeners (line 343) | private notifyListeners(): void { FILE: src/services/activeModelService/loaders.ts function isMMProjFile (line 19) | function isMMProjFile(fileName: string): boolean { function scanDirForMmProj (line 31) | async function scanDirForMmProj(modelFilePath: string): Promise { type ImageLoadContext (line 184) | interface ImageLoadContext { function doLoadImageModel (line 198) | async function doLoadImageModel(ctx: ImageLoadContext): Promise { FILE: src/services/activeModelService/memory.ts function estimateModelMemoryGB (line 39) | function estimateModelMemoryGB( type LoadedModelIds (line 53) | interface LoadedModelIds { type ModelLists (line 58) | interface ModelLists { function getCurrentlyLoadedMemoryGB (line 63) | function getCurrentlyLoadedMemoryGB( function getOtherLoadedMemoryGB (line 89) | function getOtherLoadedMemoryGB( type CheckMemoryParams (line 116) | interface CheckMemoryParams { function checkMemoryForModel (line 123) | async function checkMemoryForModel( type CheckDualMemoryParams (line 201) | interface CheckDualMemoryParams { function checkMemoryForDualModel (line 207) | async function checkMemoryForDualModel( FILE: src/services/activeModelService/types.ts type ModelType (line 4) | type ModelType = 'text' | 'image'; type MemoryCheckSeverity (line 6) | type MemoryCheckSeverity = 'safe' | 'warning' | 'critical' | 'blocked'; type MemoryCheckResult (line 8) | interface MemoryCheckResult { type ActiveModelInfo (line 19) | interface ActiveModelInfo { type ResourceUsage (line 32) | interface ResourceUsage { type ModelChangeListener (line 41) | type ModelChangeListener = (info: ActiveModelInfo) => void; constant TEXT_MODEL_OVERHEAD_MULTIPLIER (line 51) | const TEXT_MODEL_OVERHEAD_MULTIPLIER = 1.5; constant IMAGE_MODEL_OVERHEAD_MULTIPLIER (line 53) | const IMAGE_MODEL_OVERHEAD_MULTIPLIER = Platform.OS === 'ios' ? 1.5 : 1.8; FILE: src/services/activeModelService/utils.ts function getResourceUsage (line 11) | async function getResourceUsage(): Promise { type SyncStateTarget (line 38) | interface SyncStateTarget { function syncWithNativeState (line 46) | async function syncWithNativeState(target: SyncStateTarget): Promise { method verifyPassphrase (line 46) | async verifyPassphrase(passphrase: string): Promise { method hasPassphrase (line 64) | async hasPassphrase(): Promise { method removePassphrase (line 76) | async removePassphrase(): Promise { method changePassphrase (line 88) | async changePassphrase(oldPassphrase: string, newPassphrase: string): ... FILE: src/services/backgroundDownloadService.ts class BackgroundDownloadService (line 11) | class BackgroundDownloadService { method constructor (line 20) | constructor() { method isAvailable (line 27) | isAvailable(): boolean { method startDownload (line 31) | async startDownload(params: DownloadParams): Promise { method getActiveDownloads (line 90) | async getActiveDownloads(): Promise { method getDownloadProgress (line 110) | async getDownloadProgress(downloadId: number): Promise<{ method moveCompletedDownload (line 132) | async moveCompletedDownload(downloadId: number, targetPath: string): P... method registerListener (line 139) | private registerListener(listeners: Map, key: string, ca... method onProgress (line 144) | onProgress(downloadId: number, callback: DownloadProgressCallback): ()... method onComplete (line 147) | onComplete(downloadId: number, callback: DownloadCompleteCallback): ()... method onError (line 150) | onError(downloadId: number, callback: DownloadErrorCallback): () => vo... method onAnyProgress (line 153) | onAnyProgress(callback: DownloadProgressCallback): () => void { method onAnyComplete (line 156) | onAnyComplete(callback: DownloadCompleteCallback): () => void { method onAnyError (line 159) | onAnyError(callback: DownloadErrorCallback): () => void { method startProgressPolling (line 162) | startProgressPolling(): void { method stopProgressPolling (line 170) | stopProgressPolling(): void { method isBatteryOptimizationIgnored (line 179) | async isBatteryOptimizationIgnored(): Promise { method requestBatteryOptimizationIgnore (line 189) | requestBatteryOptimizationIgnore(): void { method checkAndPromptBatteryOptimization (line 199) | async checkAndPromptBatteryOptimization(): Promise { method downloadFileTo (line 227) | downloadFileTo(opts: { method markSilent (line 294) | markSilent(downloadId: number): void { this.silentDownloadIds.add(down... method unmarkSilent (line 295) | unmarkSilent(downloadId: number): void { this.silentDownloadIds.delete... method excludeFromBackup (line 297) | async excludeFromBackup(path: string): Promise { method cleanup (line 302) | cleanup(): void { method dispatchToListeners (line 311) | private dispatchToListeners( method setupEventListeners (line 322) | private setupEventListeners(): void { FILE: src/services/backgroundDownloadTypes.ts type DownloadParams (line 3) | interface DownloadParams { type MultiFileDownloadParams (line 13) | interface MultiFileDownloadParams { type DownloadProgressEvent (line 21) | interface DownloadProgressEvent { type DownloadCompleteEvent (line 32) | interface DownloadCompleteEvent { type DownloadErrorEvent (line 42) | interface DownloadErrorEvent { type DownloadProgressCallback (line 51) | type DownloadProgressCallback = (event: DownloadProgressEvent) => void; type DownloadCompleteCallback (line 52) | type DownloadCompleteCallback = (event: DownloadCompleteEvent) => void; type DownloadErrorCallback (line 53) | type DownloadErrorCallback = (event: DownloadErrorEvent) => void; FILE: src/services/contextCompaction.ts constant CONTEXT_FULL_PATTERNS (line 20) | const CONTEXT_FULL_PATTERNS = [ constant PROMPT_BUDGET_RATIO (line 28) | const PROMPT_BUDGET_RATIO = 0.55; constant SUMMARY_BUDGET_RATIO (line 31) | const SUMMARY_BUDGET_RATIO = 0.12; constant CHARS_PER_TOKEN_ESTIMATE (line 34) | const CHARS_PER_TOKEN_ESTIMATE = 4; constant SUMMARIZER_INSTRUCTION_OVERHEAD_TOKENS (line 37) | const SUMMARIZER_INSTRUCTION_OVERHEAD_TOKENS = 100; constant SUMMARIZER_SYSTEM_PROMPT (line 40) | const SUMMARIZER_SYSTEM_PROMPT = class ContextCompactionService (line 43) | class ContextCompactionService { method isCompacting (line 47) | get isCompacting(): boolean { return this._isCompacting; } method subscribeCompacting (line 49) | subscribeCompacting(listener: (v: boolean) => void): () => void { method setCompacting (line 55) | private setCompacting(v: boolean): void { method isContextFullError (line 60) | isContextFullError(error: unknown): boolean { method countTokens (line 66) | private async countTokens(text: string): Promise { method compact (line 84) | async compact( method summarizeMessages (line 171) | private async summarizeMessages( method clearSummary (line 214) | clearSummary(conversationId: string): void { FILE: src/services/coreMLModelBrowser.ts type CoreMLModelFile (line 2) | interface CoreMLModelFile { type CoreMLImageModel (line 9) | interface CoreMLImageModel { type HFTreeEntry (line 24) | interface HFTreeEntry { type RepoEntry (line 35) | interface RepoEntry { constant REPOS (line 43) | const REPOS: RepoEntry[] = [ constant CACHE_TTL (line 85) | const CACHE_TTL = 5 * 60 * 1000; function fetchRepoTree (line 87) | async function fetchRepoTree(repo: string, path = ''): Promise { method isSupported (line 38) | isSupported(fileName: string): boolean { method resolveContentUri (line 52) | private async resolveContentUri(uri: string, fileName: string): Promis... method validateFileType (line 109) | private validateFileType(extension: string, isPdf: boolean): void { method readContent (line 118) | private async readContent(resolvedPath: string, isPdf: boolean, maxCha... method savePersistentCopy (line 135) | private async savePersistentCopy(resolvedPath: string, originalPath: s... method processDocumentFromPath (line 153) | async processDocumentFromPath(filePath: string, fileName?: string, max... method createFromText (line 200) | async createFromText(text: string, fileName: string = 'pasted-text.txt... method formatForContext (line 234) | formatForContext(attachment: MediaAttachment): string { method getPreview (line 246) | getPreview(attachment: MediaAttachment, maxLength: number = 100): stri... method getSupportedExtensions (line 258) | getSupportedExtensions(): string[] { FILE: src/services/generationService.ts constant SHARE_PROMPT_DELAY_MS (line 20) | const SHARE_PROMPT_DELAY_MS = 1500; type StreamChunk (line 21) | type StreamChunk = string | { content?: string; reasoningContent?: strin... type QueuedMessage (line 23) | interface QueuedMessage { type GenerationState (line 28) | interface GenerationState { type GenerationListener (line 37) | type GenerationListener = (state: GenerationState) => void; type QueueProcessor (line 38) | type QueueProcessor = (item: QueuedMessage) => Promise; class GenerationService (line 40) | class GenerationService { method getCurrentProvider (line 60) | private getCurrentProvider() { method isUsingRemoteProvider (line 69) | private isUsingRemoteProvider(): boolean { method flushTokenBuffer (line 85) | private flushTokenBuffer(): void { method forceFlushTokens (line 98) | private forceFlushTokens(): void { method normalizeStreamChunk (line 106) | private normalizeStreamChunk(data: StreamChunk): { content?: string; r... method getState (line 110) | getState(): GenerationState { return { ...this.state }; } method isGeneratingFor (line 112) | isGeneratingFor(conversationId: string): boolean { method subscribe (line 116) | subscribe(listener: GenerationListener): () => void { method notifyListeners (line 120) | private notifyListeners(): void { this.listeners.forEach(l => l(this.g... method updateState (line 122) | private updateState(partial: Partial): void { method checkSharePrompt (line 127) | private checkSharePrompt(delayMs = SHARE_PROMPT_DELAY_MS): void { method buildToolLoopHandlers (line 133) | private buildToolLoopHandlers() { return buildToolLoopHandlersImpl(thi... method buildGenerationMeta (line 134) | private buildGenerationMeta(): GenerationMeta { return buildGeneration... method prepareGeneration (line 135) | private async prepareGeneration(conversationId: string): Promise { method generateRemoteResponse (line 263) | async generateRemoteResponse( method generateRemoteWithTools (line 272) | async generateRemoteWithTools( method enqueueMessage (line 280) | enqueueMessage(entry: QueuedMessage): void { method removeFromQueue (line 285) | removeFromQueue(id: string): void { method clearQueue (line 290) | clearQueue(): void { this.state = { ...this.state, queuedMessages: [] ... method setQueueProcessor (line 292) | setQueueProcessor(processor: QueueProcessor | null): void { this.queue... method processNextInQueue (line 294) | private processNextInQueue(): void { method resetState (line 308) | private resetState(): void { FILE: src/services/generationServiceHelpers.ts constant FLUSH_INTERVAL_MS (line 13) | const FLUSH_INTERVAL_MS = 50; type StreamChunk (line 14) | type StreamChunk = string | { content?: string; reasoningContent?: strin... type GenerationRequest (line 16) | interface GenerationRequest { type GenerationWithToolsRequest (line 22) | interface GenerationWithToolsRequest { function buildGenerationMetaImpl (line 34) | function buildGenerationMetaImpl(svc: any): GenerationMeta { function buildToolLoopHandlersImpl (line 69) | function buildToolLoopHandlersImpl(svc: any) { function prepareGenerationImpl (line 105) | async function prepareGenerationImpl(svc: any, conversationId: string): ... function generateResponseImpl (line 140) | async function generateResponseImpl( function generateRemoteResponseImpl (line 192) | async function generateRemoteResponseImpl( function generateRemoteWithToolsImpl (line 277) | async function generateRemoteWithToolsImpl( FILE: src/services/generationToolLoop.ts constant MAX_TOOL_ITERATIONS (line 11) | const MAX_TOOL_ITERATIONS = 3; constant MAX_TOTAL_TOOL_CALLS (line 12) | const MAX_TOTAL_TOOL_CALLS = 5; type StreamChunk (line 13) | type StreamChunk = string | StreamToken; function parseXmlStyleToolCall (line 14) | function parseXmlStyleToolCall(body: string, idSuffix: number): ToolCall... function parseToolCallBody (line 25) | function parseToolCallBody(body: string, idSuffix: number): ToolCall | n... function parseToolCallsFromText (line 33) | function parseToolCallsFromText(text: string): { cleanText: string; tool... type ToolLoopCallbacks (line 61) | interface ToolLoopCallbacks { type ToolLoopContext (line 66) | interface ToolLoopContext { function normalizeStreamChunk (line 79) | function normalizeStreamChunk(data: StreamChunk): StreamToken { function getLastUserQuery (line 82) | function getLastUserQuery(messages: Message[]): string { function executeToolCalls (line 87) | async function executeToolCalls(ctx: ToolLoopContext, toolCalls: import(... constant MAX_LLM_RETRIES (line 114) | const MAX_LLM_RETRIES = 4; constant RETRY_BACKOFF_MS (line 115) | const RETRY_BACKOFF_MS = 1000; constant CONTEXT_RELEASE_PAUSE_MS (line 116) | const CONTEXT_RELEASE_PAUSE_MS = 500; function isNonRetryableError (line 117) | function isNonRetryableError(msg: string): boolean { function callRemoteLLMWithTools (line 121) | async function callRemoteLLMWithTools( function callLocalWithRetry (line 169) | async function callLocalWithRetry( type CallLLMOptions (line 190) | interface CallLLMOptions { onStream?: (data: StreamToken) => void; force... function callLLMWithRetry (line 193) | async function callLLMWithRetry( function resolveToolCalls (line 211) | function resolveToolCalls(fullResponse: string, toolCalls: ToolCall[]) { type ToolLoopState (line 222) | interface ToolLoopState { function buildStreamHandler (line 229) | function buildStreamHandler(ctx: ToolLoopContext, state: ToolLoopState):... function emitFinalResponse (line 246) | function emitFinalResponse(ctx: ToolLoopContext, state: ToolLoopState, d... function forceFinalTextResponse (line 260) | async function forceFinalTextResponse(ctx: ToolLoopContext, state: ToolL... function runToolLoop (line 276) | async function runToolLoop(ctx: ToolLoopContext): Promise { FILE: src/services/hardware.ts constant FLAGSHIP_8GEN2 (line 23) | const FLAGSHIP_8GEN2 = new Set([8550, 8650, 8735, 8750, 8845, 8850]); constant FLAGSHIP_8GEN1 (line 24) | const FLAGSHIP_8GEN1 = new Set([8450, 8475]); class HardwareService (line 25) | class HardwareService { method getDeviceInfo (line 30) | async getDeviceInfo(): Promise { method refreshMemoryInfo (line 60) | async refreshMemoryInfo(): Promise { method getAppMemoryUsage (line 80) | async getAppMemoryUsage(): Promise<{ method getTotalMemoryGB (line 93) | getTotalMemoryGB(): number { method getAvailableMemoryGB (line 108) | getAvailableMemoryGB(): number { method getModelRecommendation (line 128) | getModelRecommendation(): ModelRecommendation { method canRunModel (line 153) | canRunModel( method estimateModelMemoryGB (line 166) | estimateModelMemoryGB( method getQuantizationBits (line 173) | private getQuantizationBits(quantization: string): number { method formatBytes (line 180) | formatBytes(bytes: number): string { method getModelTotalSize (line 186) | getModelTotalSize(model: { fileSize?: number; size?: number; mmProjFil... method formatModelSize (line 189) | formatModelSize(model: { fileSize?: number; size?: number; mmProjFileS... method estimateModelRam (line 192) | estimateModelRam(model: { fileSize?: number; size?: number; mmProjFile... method formatModelRam (line 195) | formatModelRam(model: { fileSize?: number; size?: number; mmProjFileSi... method detectAppleChip (line 198) | private detectAppleChip(deviceId: string): SoCInfo['appleChip'] { method getSoCInfo (line 209) | async getSoCInfo(): Promise { method getQnnVariantFromSoC (line 237) | private async getQnnVariantFromSoC(): Promise< method fetchSoCModel (line 244) | private async fetchSoCModel(): Promise { method classifySmNumber (line 253) | private classifySmNumber( method getIosImageRec (line 266) | private getIosImageRec(chip: SoCInfo['appleChip'], ramGB: number): Ima... method getQualcommImageRec (line 276) | private getQualcommImageRec(socInfo: SoCInfo): ImageModelRecommendation { method getImageModelRecommendation (line 288) | async getImageModelRecommendation(): Promise { method getDeviceTier (line 318) | getDeviceTier(): 'low' | 'medium' | 'high' | 'flagship' { method getCpuCoreCount (line 325) | async getCpuCoreCount(): Promise { method getRecommendedThreadCount (line 333) | async getRecommendedThreadCount(): Promise { method getOpenCLCapability (line 337) | async getOpenCLCapability(): Promise<{ supported: boolean; reason?: st... FILE: src/services/httpClient.ts type SSEEvent (line 15) | interface SSEEvent { type FetchOptions (line 25) | interface FetchOptions extends RequestInit { type StreamRequestOptions (line 35) | interface StreamRequestOptions { type StreamRequestConfig (line 42) | interface StreamRequestConfig extends StreamRequestOptions { type OpenAIStreamMessage (line 47) | interface OpenAIStreamMessage { type AnthropicStreamMessage (line 77) | interface AnthropicStreamMessage { constant DEFAULT_TIMEOUT (line 103) | const DEFAULT_TIMEOUT = 30000; constant DEFAULT_RETRIES (line 104) | const DEFAULT_RETRIES = 0; constant DEFAULT_RETRY_DELAY (line 105) | const DEFAULT_RETRY_DELAY = 1000; function fetchWithTimeout (line 110) | async function fetchWithTimeout( function createStreamingRequest (line 170) | async function createStreamingRequest( function createNDJSONStreamingRequest (line 265) | async function createNDJSONStreamingRequest( FILE: src/services/httpClientSSE.ts function yieldSSEvent (line 11) | function yieldSSEvent(currentEvent: Partial): SSEEvent { function parseSSELine (line 23) | function parseSSELine( function createSSELineProcessor (line 54) | function createSSELineProcessor(onEvent: (event: SSEEvent) => void) { function processSSELines (line 92) | function processSSELines( function parseOpenAIMessage (line 178) | function parseOpenAIMessage(event: SSEEvent): OpenAIStreamMessage | null { function parseAnthropicMessage (line 197) | function parseAnthropicMessage(event: SSEEvent): AnthropicStreamMessage ... FILE: src/services/httpClientUtils.ts function mimeTypeFromExtension (line 5) | function mimeTypeFromExtension(ext: string | undefined): string { function fetchBlobAsBase64 (line 12) | async function fetchBlobAsBase64(uri: string): Promise { function imageToBase64DataUrl (line 29) | async function imageToBase64DataUrl(uri: string): Promise { function isPrivateNetworkEndpoint (line 65) | function isPrivateNetworkEndpoint(endpoint: string): boolean { function testEndpoint (line 120) | async function testEndpoint( function checkOllamaEndpoint (line 184) | async function checkOllamaEndpoint( function checkLmStudioEndpoint (line 205) | async function checkLmStudioEndpoint( function detectServerType (line 232) | async function detectServerType( FILE: src/services/huggingFaceModelBrowser.ts type HFImageModel (line 1) | interface HFImageModel { type HFTreeEntry (line 13) | interface HFTreeEntry { constant REPOS (line 20) | const REPOS = { constant VARIANT_LABELS (line 25) | const VARIANT_LABELS: Record = { constant CACHE_TTL (line 33) | const CACHE_TTL = 5 * 60 * 1000; function insertSpaces (line 35) | function insertSpaces(name: string): string { function parseFileName (line 41) | function parseFileName(fileName: string, backend: 'mnn' | 'qnn'): Omit { function fetchAvailableModels (line 80) | async function fetchAvailableModels(forceRefresh = false, opts?: { skipQ... function getVariantLabel (line 128) | function getVariantLabel(variant?: string): string | undefined { function guessStyle (line 132) | function guessStyle(name: string): string { FILE: src/services/huggingface.ts class HuggingFaceService (line 4) | class HuggingFaceService { method fetchJson (line 8) | private async fetchJson(url: string): Promise { method searchModels (line 14) | async searchModels( method getModelDetails (line 26) | async getModelDetails(modelId: string): Promise { method getModelFiles (line 31) | async getModelFiles(modelId: string): Promise { method getModelFilesFromSiblings (line 53) | private async getModelFilesFromSiblings(modelId: string): Promise = { constant COUPLED_TOOLS (line 388) | const COUPLED_TOOLS: string[][] = [['web_search', 'read_url']]; function classifyToolsNeeded (line 398) | function classifyToolsNeeded(message: string): string[] { FILE: src/services/llm.ts type StreamToken (line 22) | type StreamToken = { content?: string; reasoningContent?: string }; type StreamCallback (line 23) | type StreamCallback = (data: StreamToken) => void; type CompleteCallback (line 24) | type CompleteCallback = (result: { content: string; reasoningContent: st... function resolveGpuBackend (line 25) | function resolveGpuBackend(enabled: boolean, devices: string[]): string { class LLMService (line 29) | class LLMService { method acquireContextMutex (line 47) | private acquireContextMutex(): { release: () => void; ready: Promise { return ensureSessionC... method getSessionPath (line 55) | private getSessionPath(promptHash: string): string { return getSession... method validateAndPrepareModel (line 56) | private async validateAndPrepareModel(modelPath: string): Promise<{ fi... method applyLoadedContext (line 76) | private async applyLoadedContext(opts: { context: LlamaContext; actual... method loadModel (line 91) | async loadModel(modelPath: string, mmProjPath?: string): Promise { method initWithAutoContext (line 119) | private async initWithAutoContext(params: { baseParams: object; ctxLen... method initializeMultimodal (line 159) | async initializeMultimodal(mmProjPath: string): Promise { method checkMultimodalSupport (line 173) | async checkMultimodalSupport(): Promise { method getMultimodalSupport (line 177) | getMultimodalSupport(): MultimodalSupport | null { return this.multimo... method supportsVision (line 178) | supportsVision(): boolean { return this.multimodalSupport?.vision || f... method supportsToolCalling (line 179) | supportsToolCalling(): boolean { return this.toolCallingSupported; } method supportsThinking (line 180) | supportsThinking(): boolean { return this.thinkingSupported; } method isThinkingEnabled (line 181) | isThinkingEnabled(): boolean { return this.thinkingSupported && useApp... method isGemma4Model (line 182) | isGemma4Model(): boolean { method shouldDisableCtxShift (line 187) | private shouldDisableCtxShift(): boolean { return Platform.OS === 'and... method detectToolCallingSupport (line 188) | private detectToolCallingSupport(): void { method detectThinkingSupport (line 200) | private detectThinkingSupport(): void { method doUnloadModel (line 204) | private async doUnloadModel(): Promise { method unloadModel (line 215) | async unloadModel(): Promise { method isModelLoaded (line 219) | isModelLoaded(): boolean { return this.context !== null; } method getLoadedModelPath (line 220) | getLoadedModelPath(): string | null { return this.currentModelPath; } method generateResponse (line 221) | async generateResponse(messages: Message[], onStream?: StreamCallback,... method generateResponseWithTools (line 263) | async generateResponseWithTools(messages: Message[], options: { tools:... method manageContextWindow (line 283) | private async manageContextWindow(messages: Message[], _extraReserve =... method generateWithMaxTokens (line 287) | async generateWithMaxTokens(messages: Message[], maxTokens: number): P... method stopGeneration (line 302) | async stopGeneration(): Promise { method clearKVCache (line 307) | async clearKVCache(clearData: boolean = false): Promise { method getEstimatedMemoryUsage (line 311) | getEstimatedMemoryUsage() { method getGpuInfo (line 315) | getGpuInfo() { method isCurrentlyGenerating (line 318) | isCurrentlyGenerating(): boolean { return this.isGenerating; } method formatMessages (line 319) | private formatMessages(messages: Message[]): string { return formatLla... method convertToOAIMessages (line 320) | private convertToOAIMessages(messages: Message[]): RNLlamaOAICompatibl... method getModelInfo (line 321) | async getModelInfo() { return this.context ? { contextLength: APP_CONF... method tokenize (line 322) | async tokenize(text: string) { method getTokenCount (line 326) | async getTokenCount(text: string) { method estimateContextUsage (line 330) | async estimateContextUsage(messages: Message[]) { method getFormattedPrompt (line 335) | getFormattedPrompt(messages: Message[]): string { return this.formatMe... method getContextDebugInfo (line 336) | async getContextDebugInfo(messages: Message[]) { method updatePerformanceSettings (line 350) | updatePerformanceSettings(settings: Partial): ... method getPerformanceSettings (line 354) | getPerformanceSettings(): LLMPerformanceSettings { return { ...this.cu... method getPerformanceStats (line 355) | getPerformanceStats(): LLMPerformanceStats { return { ...this.performa... method reloadWithSettings (line 356) | async reloadWithSettings(modelPath: string, settings: LLMPerformanceSe... FILE: src/services/llmHelpers.ts constant HTP_ENABLED (line 11) | const HTP_ENABLED = false; constant SYSTEM_PROMPT_RESERVE (line 13) | const SYSTEM_PROMPT_RESERVE = 256; constant RESPONSE_RESERVE (line 14) | const RESPONSE_RESERVE = 512; constant CONTEXT_SAFETY_MARGIN (line 15) | const CONTEXT_SAFETY_MARGIN = 0.85; constant DEFAULT_THREADS (line 16) | const DEFAULT_THREADS = 4; constant DEFAULT_BATCH (line 17) | const DEFAULT_BATCH = 512; constant DEFAULT_GPU_LAYERS (line 18) | const DEFAULT_GPU_LAYERS = Platform.OS === 'ios' ? 99 : 0; function getOptimalThreadCount (line 19) | function getOptimalThreadCount(): number { return DEFAULT_THREADS; } function getOptimalBatchSize (line 20) | function getOptimalBatchSize(): number { return DEFAULT_BATCH; } function logInferenceInit (line 21) | function logInferenceInit(level: 'log' | 'warn' | 'error', message: stri... constant REPACKABLE_QUANTS (line 24) | const REPACKABLE_QUANTS = ['q4_0', 'iq4_nl']; function shouldDisableMmap (line 26) | function shouldDisableMmap(modelPath: string): boolean { function hashString (line 30) | function hashString(str: string): string { function ensureSessionCacheDir (line 41) | async function ensureSessionCacheDir(cacheDir: string): Promise { function getSessionPath (line 48) | function getSessionPath(cacheDir: string, promptHash: string): string { type ModelLoadParams (line 51) | interface ModelLoadParams { function buildModelParams (line 59) | function buildModelParams( type ContextInitResult (line 93) | interface ContextInitResult { constant GPU_INIT_TIMEOUT_MS (line 99) | const GPU_INIT_TIMEOUT_MS = 8000; constant HTP_INIT_TIMEOUT_MS (line 101) | const HTP_INIT_TIMEOUT_MS = 30000; function withTimeout (line 103) | function withTimeout(promise: Promise, ms: number, label: string):... function safeRelease (line 111) | async function safeRelease(ctx: LlamaContext | null): Promise { function tryGpuInit (line 116) | async function tryGpuInit(promise: Promise, nGpuLayers: nu... function initContextWithFallback (line 126) | async function initContextWithFallback( type GpuInfo (line 190) | interface GpuInfo { function captureGpuInfo (line 197) | function captureGpuInfo( function supportsNativeThinking (line 209) | function supportsNativeThinking(context: LlamaContext | null): boolean { function buildThinkingCompletionParams (line 221) | function buildThinkingCompletionParams(enableThinking: boolean, isGemma4... function getStreamingDelta (line 226) | function getStreamingDelta(nextValue: string | undefined, previousValue:... function getModelMaxContext (line 233) | function getModelMaxContext(context: LlamaContext): number | null { function logContextMetadata (line 245) | function logContextMetadata(context: LlamaContext, contextLength: number... type MultimodalInitResult (line 251) | interface MultimodalInitResult { function initMultimodal (line 255) | async function initMultimodal( function checkContextMultimodal (line 281) | async function checkContextMultimodal(context: LlamaContext): Promise', '<|end|>', '<|eot_id|>']; function buildCompletionParams (line 354) | function buildCompletionParams(settings: { function recordGenerationStats (line 367) | function recordGenerationStats( FILE: src/services/llmMessages.ts function formatLlamaMessages (line 4) | function formatLlamaMessages(messages: Message[], supportsVision: boolea... function extractImageUris (line 27) | function extractImageUris(messages: Message[]): string[] { function formatToolCallAsText (line 46) | function formatToolCallAsText(tc: { name: string; arguments: string }): ... function buildOAIMessages (line 51) | function buildOAIMessages(messages: Message[]): RNLlamaOAICompatibleMess... FILE: src/services/llmSafetyChecks.ts constant GGUF_MAGIC (line 9) | const GGUF_MAGIC = 'GGUF'; constant MIN_GGUF_FILE_SIZE (line 12) | const MIN_GGUF_FILE_SIZE = 1024; function validateModelFile (line 18) | async function validateModelFile(modelPath: string): Promise<{ valid: bo... function checkMemoryForModel (line 71) | async function checkMemoryForModel( function safeCompletion (line 109) | async function safeCompletion( FILE: src/services/llmToolGeneration.ts type ToolStreamCallback (line 13) | type ToolStreamCallback = (data: StreamToken) => void; type ToolCompleteCallback (line 14) | type ToolCompleteCallback = (fullResponse: string) => void; class ToolCallTokenFilter (line 22) | class ToolCallTokenFilter { method process (line 26) | process(token: string): string { method flush (line 31) | private flush(): string { method partialSuffix (line 70) | private partialSuffix(text: string, tag: string): number { function parseToolCall (line 78) | function parseToolCall(tc: any): ToolCall { type ToolGenerationDeps (line 87) | interface ToolGenerationDeps { function generateWithToolsImpl (line 99) | async function generateWithToolsImpl( FILE: src/services/llmTypes.ts type MultimodalSupport (line 1) | interface MultimodalSupport { type LLMPerformanceSettings (line 6) | interface LLMPerformanceSettings { type LLMPerformanceStats (line 12) | interface LLMPerformanceStats { FILE: src/services/localDreamGenerator.ts type ProgressCallback (line 19) | type ProgressCallback = (progress: ImageGenerationProgress) => void; type PreviewCallback (line 20) | type PreviewCallback = (preview: { previewPath: string; step: number; to... class LocalDreamGeneratorService (line 33) | class LocalDreamGeneratorService { method getEmitter (line 38) | private getEmitter(): NativeEventEmitter { method isAvailable (line 45) | isAvailable(): boolean { method isModelLoaded (line 49) | async isModelLoaded(): Promise { method getLoadedModelPath (line 58) | async getLoadedModelPath(): Promise { method loadModel (line 67) | async loadModel(modelPath: string, threads?: number, opts: { backend?:... method getLoadedThreads (line 92) | getLoadedThreads(): number | null { method unloadModel (line 96) | async unloadModel(): Promise { method subscribeToProgress (line 109) | private subscribeToProgress(onProgress?: ProgressCallback, onPreview?:... method buildNativeParams (line 125) | private buildNativeParams(params: ImageGenerationParams & { previewInt... method buildResult (line 139) | private buildResult(params: ImageGenerationParams, result: any): Gener... method generateImage (line 154) | async generateImage( method cancelGeneration (line 191) | async cancelGeneration(): Promise { method isGenerating (line 197) | async isGenerating(): Promise { method getGeneratedImages (line 201) | async getGeneratedImages(): Promise { method deleteGeneratedImage (line 221) | async deleteGeneratedImage(imageId: string): Promise { method clearOpenCLCache (line 226) | async clearOpenCLCache(modelPath: string): Promise { method hasKernelCache (line 231) | async hasKernelCache(modelPath: string): Promise { method getConstants (line 236) | getConstants() { FILE: src/services/modelManager/download.ts type PerformBackgroundDownloadOpts (line 23) | interface PerformBackgroundDownloadOpts { function performBackgroundDownload (line 32) | async function performBackgroundDownload(opts: PerformBackgroundDownload... function checkMmProjExists (line 52) | async function checkMmProjExists(path: string | null, expectedSize?: num... type AlreadyDownloadedOpts (line 71) | interface AlreadyDownloadedOpts { function handleAlreadyDownloaded (line 79) | async function handleAlreadyDownloaded(opts: AlreadyDownloadedOpts): Pro... type StartBgDownloadOpts (line 91) | interface StartBgDownloadOpts { function startBgDownload (line 103) | async function startBgDownload(opts: StartBgDownloadOpts): Promise { function isItemTracked (line 57) | function isItemTracked(itemPath: string, trackedPaths: string[]): boolean { function getOrphanedImageDirs (line 61) | async function getOrphanedImageDirs( type SyncDownloadsOpts (line 86) | interface SyncDownloadsOpts { function resolveMmProjPath (line 93) | async function resolveMmProjPath(metadata: PersistedDownloadInfo): Promi... function isMmProjStillRunning (line 108) | function isMmProjStillRunning( function processCompletedDownload (line 117) | async function processCompletedDownload( function handleFailedDownload (line 139) | function handleFailedDownload( function syncCompletedBackgroundDownloads (line 148) | async function syncCompletedBackgroundDownloads(opts: SyncDownloadsOpts)... FILE: src/services/modelManager/imageSync.ts type SyncCompletedImageDownloadsOpts (line 7) | interface SyncCompletedImageDownloadsOpts { function isRecoverableImageDownload (line 15) | function isRecoverableImageDownload(metadata: PersistedDownloadInfo | un... function buildRecoveredImageModel (line 19) | function buildRecoveredImageModel( function recoverZipDownload (line 36) | async function recoverZipDownload(opts: { function recoverMultifileDownload (line 61) | async function recoverMultifileDownload( function syncCompletedImageDownloads (line 71) | async function syncCompletedImageDownloads(opts: SyncCompletedImageDownl... FILE: src/services/modelManager/index.ts class ModelManager (line 45) | class ModelManager { method constructor (line 51) | constructor() { method resolveStoredPath (line 56) | private resolveStoredPath(p: string, d: string) { return resolveStored... method determineCredibility (line 57) | private determineCredibility(a: string) { return determineCredibility(... method isMMProjFile (line 58) | private isMMProjFile(f: string) { return isMMProjFile(f); } method initialize (line 60) | async initialize(): Promise { method linkOrphanMmProj (line 68) | async linkOrphanMmProj(): Promise { method getDownloadedModels (line 107) | async getDownloadedModels(): Promise { method deleteModel (line 115) | async deleteModel(modelId: string): Promise { method getModelPath (line 131) | async getModelPath(modelId: string): Promise { method getStorageUsed (line 136) | async getStorageUsed(): Promise { method getAvailableStorage (line 141) | async getAvailableStorage(): Promise { method getOrphanedFiles (line 146) | async getOrphanedFiles(): Promise { method setBackgroundDownloadMetadataCallback (line 161) | setBackgroundDownloadMetadataCallback(callback: BackgroundDownloadMeta... method isBackgroundDownloadSupported (line 165) | isBackgroundDownloadSupported(): boolean { method downloadModelBackground (line 169) | async downloadModelBackground( method watchDownload (line 188) | watchDownload( method cleanupCancelledTextArtifacts (line 203) | private async cleanupCancelledTextArtifacts(ctx: Extract { method syncBackgroundDownloads (line 235) | async syncBackgroundDownloads( method syncCompletedImageDownloads (line 243) | async syncCompletedImageDownloads( method restoreInProgressDownloads (line 258) | async restoreInProgressDownloads( method getActiveBackgroundDownloads (line 273) | async getActiveBackgroundDownloads(): Promise { method startBackgroundDownloadPolling (line 277) | startBackgroundDownloadPolling(): void { method stopBackgroundDownloadPolling (line 281) | stopBackgroundDownloadPolling(): void { method repairMmProj (line 284) | async repairMmProj( method saveModelWithMmproj (line 330) | async saveModelWithMmproj(modelId: string, mmProjPath: string): Promis... method clearMmProjLink (line 344) | async clearMmProjLink(modelId: string): Promise { method cleanupMMProjEntries (line 353) | async cleanupMMProjEntries(): Promise { method importLocalModel (line 357) | async importLocalModel(opts: Omit):... method getDownloadedImageModels (line 362) | async getDownloadedImageModels(): Promise { method addDownloadedImageModel (line 370) | async addDownloadedImageModel(model: ONNXImageModel): Promise { method deleteImageModel (line 378) | async deleteImageModel(modelId: string): Promise { method getImageModelPath (line 390) | async getImageModelPath(modelId: string): Promise { method getImageModelsStorageUsed (line 395) | async getImageModelsStorageUsed(): Promise { method getImageModelsDirectory (line 400) | getImageModelsDirectory(): string { method scanForUntrackedImageModels (line 404) | async scanForUntrackedImageModels(): Promise { method scanForUntrackedTextModels (line 413) | async scanForUntrackedTextModels(): Promise { method refreshModelLists (line 418) | async refreshModelLists(): Promise<{ textModels: DownloadedModel[]; im... FILE: src/services/modelManager/restore.ts type RestoreDownloadsOpts (line 11) | interface RestoreDownloadsOpts { function isRestorable (line 20) | function isRestorable(download: BackgroundDownloadInfo): boolean { function resolveMmProjState (line 31) | async function resolveMmProjState( function buildFileInfo (line 60) | function buildFileInfo(metadata: PersistedDownloadInfo): ModelFile { type RestoreEntryOpts (line 74) | interface RestoreEntryOpts { function restoreDownloadEntry (line 84) | async function restoreDownloadEntry(opts: RestoreEntryOpts): Promise { function deleteOrphanedFile (line 25) | async function deleteOrphanedFile(filePath: string): Promise { function looksLikeVisionModel (line 32) | function looksLikeVisionModel(model: DownloadedModel): boolean { function extractBaseName (line 39) | function extractBaseName(fileName: string): string { function findMatchingMmProj (line 44) | function findMatchingMmProj( function cleanupMMProjEntries (line 55) | async function cleanupMMProjEntries(modelsDir: string): Promise { function detectBackend (line 88) | function detectBackend(dirName: string): 'mnn' | 'qnn' | 'coreml' { type ScanImageModelsOpts (line 94) | interface ScanImageModelsOpts { function scanForUntrackedImageModels (line 100) | async function scanForUntrackedImageModels(opts: ScanImageModelsOpts): P... function scanForUntrackedTextModels (line 134) | async function scanForUntrackedTextModels( function doScanForUntrackedTextModels (line 147) | async function doScanForUntrackedTextModels( type ImportLocalModelOpts (line 194) | interface ImportLocalModelOpts { function resolveUri (line 205) | function resolveUri(uri: string): string { function importLocalModel (line 215) | async function importLocalModel(opts: ImportLocalModelOpts): Promise { function saveImageModelsList (line 61) | async function saveImageModelsList(models: ONNXImageModel[]): Promise void; type DownloadCompleteCallback (line 4) | type DownloadCompleteCallback = (model: DownloadedModel) => void; type DownloadErrorCallback (line 5) | type DownloadErrorCallback = (error: Error) => void; type BackgroundDownloadMetadataCallback (line 8) | type BackgroundDownloadMetadataCallback = ( type BackgroundDownloadContext (line 24) | type BackgroundDownloadContext = FILE: src/services/networkDiscovery.ts type DiscoveredServer (line 12) | interface DiscoveredServer { constant PROVIDERS (line 18) | const PROVIDERS = [ constant TIMEOUT_MS (line 23) | const TIMEOUT_MS = 500; constant BATCH_SIZE (line 24) | const BATCH_SIZE = 50; constant BATCH_DELAY_MS (line 25) | const BATCH_DELAY_MS = 50; function probe (line 28) | async function probe(ip: string, port: number, path: string): Promise(tasks: (() => Promise)[]): Promise { function subnetBase (line 53) | function subnetBase(ip: string): string | null { constant FALLBACK_SUBNETS (line 65) | const FALLBACK_SUBNETS = ['192.168.1', '192.168.0']; function findReachableSubnet (line 72) | async function findReachableSubnet(subnets: string[]): Promise { FILE: src/services/pdfExtractor.ts class PDFExtractor (line 10) | class PDFExtractor { method isAvailable (line 14) | isAvailable(): boolean { method extractText (line 22) | async extractText(filePath: string, maxChars: number = 50000): Promise... FILE: src/services/providers/localProvider.ts function getLocalCapabilities (line 20) | function getLocalCapabilities(): ProviderCapabilities { class LocalProvider (line 35) | class LocalProvider implements LLMProvider { method capabilities (line 41) | get capabilities(): ProviderCapabilities { method loadModel (line 45) | async loadModel(modelId: string): Promise { method unloadModel (line 54) | async unloadModel(): Promise { method isModelLoaded (line 60) | isModelLoaded(): boolean { method getLoadedModelId (line 64) | getLoadedModelId(): string | null { method generate (line 68) | async generate( method generateSimple (line 108) | private async generateSimple( method generateWithTools (line 142) | private async generateWithTools( method stopGeneration (line 185) | async stopGeneration(): Promise { method getTokenCount (line 189) | async getTokenCount(text: string): Promise { method isReady (line 197) | async isReady(): Promise { method dispose (line 201) | async dispose(): Promise { FILE: src/services/providers/openAICompatibleProvider.ts function isOllamaEndpoint (line 29) | function isOllamaEndpoint(endpoint: string): boolean { function isLMStudioEndpoint (line 34) | function isLMStudioEndpoint(endpoint: string): boolean { class OpenAICompatibleProvider (line 41) | class OpenAICompatibleProvider implements LLMProvider { method constructor (line 48) | constructor( method capabilities (line 60) | get capabilities(): ProviderCapabilities { method updateConfig (line 64) | updateConfig(config: Partial): void { method loadModel (line 68) | async loadModel(modelId: string): Promise { method updateCapabilities (line 76) | updateCapabilities(capabilities: Partial): void { method unloadModel (line 80) | async unloadModel(): Promise { method isModelLoaded (line 85) | isModelLoaded(): boolean { return !!this.config.modelId; } method getLoadedModelId (line 87) | getLoadedModelId(): string | null { return this.config.modelId || null; } method buildRequestBody (line 92) | private buildRequestBody( method generate (line 111) | async generate( method buildOpenAIMessages (line 226) | private buildOpenAIMessages( method stopGeneration (line 233) | async stopGeneration(): Promise { method getTokenCount (line 240) | async getTokenCount(text: string): Promise { method isReady (line 246) | async isReady(): Promise { method dispose (line 250) | async dispose(): Promise { function createOpenAIProvider (line 259) | function createOpenAIProvider( FILE: src/services/providers/openAICompatibleStream.ts class ThinkTagParser (line 20) | class ThinkTagParser { method process (line 24) | process(content: string, onToken: (t: string) => void, onReasoning: (t... method handleOutsideThink (line 33) | private handleOutsideThink(openTag: string, onToken: (t: string) => vo... method handleInsideThink (line 56) | private handleInsideThink(closeTag: string, onReasoning: (t: string) =... method flush (line 75) | private flush(onToken: (t: string) => void, onReasoning: (t: string) =... method partialSuffix (line 87) | private partialSuffix(text: string, tag: string): number { type DeltaCtx (line 96) | interface DeltaCtx { type DeltaShape (line 102) | type DeltaShape = { function processToolCallChunk (line 113) | function processToolCallChunk( function processDelta (line 133) | function processDelta( function buildOllamaCompletion (line 169) | function buildOllamaCompletion( type OllamaStreamState (line 186) | interface OllamaStreamState { function handleOllamaChatLine (line 195) | function handleOllamaChatLine( function generateOllamaChatImpl (line 237) | async function generateOllamaChatImpl( FILE: src/services/providers/openAICompatibleTypes.ts type OpenAIChatMessage (line 7) | interface OpenAIChatMessage { type OpenAIContentPart (line 16) | interface OpenAIContentPart { type OpenAIToolCall (line 26) | interface OpenAIToolCall { type OpenAIConfig (line 36) | interface OpenAIConfig { type OpenAIStreamState (line 43) | interface OpenAIStreamState { type OllamaChatRequest (line 53) | interface OllamaChatRequest { FILE: src/services/providers/openAIMessageBuilder.ts function buildVisionContent (line 14) | async function buildVisionContent( function buildAssistantToolCallMessage (line 36) | function buildAssistantToolCallMessage(msg: Message): OpenAIChatMessage { function buildOpenAIMessagesImpl (line 52) | async function buildOpenAIMessagesImpl( FILE: src/services/providers/registry.ts type ProviderChangeListener (line 12) | type ProviderChangeListener = (providerId: string | null) => void; class ProviderRegistry (line 14) | class ProviderRegistry { method constructor (line 19) | constructor() { method registerProvider (line 27) | registerProvider(id: string, provider: LLMProvider): void { method unregisterProvider (line 35) | unregisterProvider(id: string): void { method getProvider (line 54) | getProvider(id: string): LLMProvider | undefined { method getActiveProvider (line 63) | getActiveProvider(): LLMProvider { method getActiveProviderId (line 75) | getActiveProviderId(): string { method setActiveProvider (line 82) | setActiveProvider(id: string): boolean { method hasProvider (line 97) | hasProvider(id: string): boolean { method getProviderIds (line 104) | getProviderIds(): string[] { method subscribe (line 111) | subscribe(listener: ProviderChangeListener): () => void { method notifyListeners (line 119) | private notifyListeners(): void { method clear (line 127) | clear(): void { function getProviderForServer (line 148) | function getProviderForServer(serverId: string | null): LLMProvider { FILE: src/services/providers/types.ts type ProviderType (line 11) | type ProviderType = 'local' | 'openai-compatible' | 'anthropic'; type ProviderCapabilities (line 14) | interface ProviderCapabilities { type CompletionResult (line 28) | interface CompletionResult { type ToolCallResult (line 40) | interface ToolCallResult { type GenerationOptions (line 50) | interface GenerationOptions { type ToolDefinition (line 74) | interface ToolDefinition { type StreamCallbacks (line 89) | interface StreamCallbacks { type ModelLoadState (line 101) | interface ModelLoadState { type LLMProvider (line 118) | interface LLMProvider { type ProviderFactory (line 175) | type ProviderFactory = (config: ProviderConfig) => LLMProvider; type ProviderConfig (line 178) | interface ProviderConfig { FILE: src/services/rag/chunking.ts type ChunkOptions (line 1) | interface ChunkOptions { type Chunk (line 7) | interface Chunk { constant DEFAULT_CHUNK_SIZE (line 12) | const DEFAULT_CHUNK_SIZE = 500; constant DEFAULT_OVERLAP (line 13) | const DEFAULT_OVERLAP = 100; constant DEFAULT_MIN_CHUNK_LENGTH (line 14) | const DEFAULT_MIN_CHUNK_LENGTH = 20; function slidingWindowChunks (line 16) | function slidingWindowChunks( function flushChunk (line 33) | function flushChunk( function chunkDocument (line 44) | function chunkDocument(text: string, options?: ChunkOptions): Chunk[] { FILE: src/services/rag/database.ts type RagDocument (line 6) | interface RagDocument { type RagSearchResult (line 16) | interface RagSearchResult { type StoredEmbedding (line 24) | interface StoredEmbedding { class RagDatabase (line 33) | class RagDatabase { method ensureReady (line 37) | async ensureReady(): Promise { method getDb (line 78) | private getDb(): DB { method insertDocument (line 83) | insertDocument(doc: { projectId: string; name: string; path: string; s... method insertChunks (line 93) | insertChunks(docId: number, chunks: Chunk[]): number[] { method embeddingToBlob (line 114) | private embeddingToBlob(embedding: number[]): ArrayBuffer { method blobToEmbedding (line 118) | private blobToEmbedding(blob: any): number[] { method insertEmbeddingsBatch (line 124) | insertEmbeddingsBatch(entries: { chunkRowid: number; docId: number; em... method getEmbeddingsByProject (line 141) | getEmbeddingsByProject(projectId: string): StoredEmbedding[] { method hasEmbeddingsForDocument (line 157) | hasEmbeddingsForDocument(docId: number): boolean { method getChunksByDocument (line 167) | getChunksByDocument(docId: number): { id: number; content: string; pos... method deleteDocument (line 176) | deleteDocument(docId: number): void { method getDocumentsByProject (line 183) | getDocumentsByProject(projectId: string): RagDocument[] { method toggleEnabled (line 192) | toggleEnabled(docId: number, enabled: boolean): void { method getChunksByProject (line 197) | getChunksByProject(projectId: string, topK: number = 5): RagSearchResu... method deleteDocumentsByProject (line 209) | deleteDocumentsByProject(projectId: string): void { FILE: src/services/rag/embedding.ts constant EMBEDDING_MODEL_FILENAME (line 6) | const EMBEDDING_MODEL_FILENAME = 'all-MiniLM-L6-v2-Q8_0.gguf'; constant EMBEDDING_DIMENSION (line 7) | const EMBEDDING_DIMENSION = 384; constant EMBEDDING_CTX_SIZE (line 8) | const EMBEDDING_CTX_SIZE = 512; class EmbeddingService (line 10) | class EmbeddingService { method load (line 14) | async load(): Promise { method doLoad (line 26) | private async doLoad(): Promise { method ensureModelCopied (line 42) | private async ensureModelCopied(): Promise { method embed (line 57) | async embed(text: string): Promise { method embedBatch (line 76) | async embedBatch(texts: string[]): Promise { method unload (line 84) | async unload(): Promise { method isLoaded (line 96) | isLoaded(): boolean { method getDimension (line 100) | getDimension(): number { FILE: src/services/rag/index.ts type IndexProgress (line 15) | interface IndexProgress { type IndexDocumentParams (line 20) | interface IndexDocumentParams { class RagService (line 28) | class RagService { method ensureReady (line 29) | async ensureReady(): Promise { method indexDocument (line 33) | async indexDocument(params: IndexDocumentParams): Promise { method backfillEmbeddings (line 82) | async backfillEmbeddings(projectId: string): Promise { method deleteDocument (line 113) | async deleteDocument(docId: number): Promise { method getDocumentsByProject (line 118) | async getDocumentsByProject(projectId: string) { method toggleDocument (line 123) | async toggleDocument(docId: number, enabled: boolean): Promise { method searchProject (line 128) | async searchProject(projectId: string, query: string, contextLength?: ... method deleteProjectDocuments (line 136) | async deleteProjectDocuments(projectId: string): Promise { FILE: src/services/rag/retrieval.ts function stripAngleBracketTags (line 7) | function stripAngleBracketTags(text: string): string { type SearchResult (line 18) | interface SearchResult { class RetrievalService (line 23) | class RetrievalService { method search (line 24) | async search(projectId: string, query: string, topK: number = 5): Prom... method searchSemantic (line 29) | private async searchSemantic(projectId: string, query: string, topK: n... method formatForPrompt (line 68) | formatForPrompt(result: SearchResult): string { method estimateCharBudget (line 81) | estimateCharBudget(contextLengthTokens: number): number { method searchWithBudget (line 86) | async searchWithBudget(params: { projectId: string; query: string; con... FILE: src/services/rag/vectorMath.ts function dotProduct (line 1) | function dotProduct(a: number[], b: number[]): number { function cosineSimilarity (line 9) | function cosineSimilarity(a: number[], b: number[]): number { type SimilarityResult (line 23) | interface SimilarityResult { function topKSimilar (line 28) | function topKSimilar(queryVec: number[], candidates: number[][], k: numb... FILE: src/services/remoteServerManager.ts class RemoteServerManager (line 25) | class RemoteServerManager { method addServer (line 29) | async addServer( method updateServer (line 61) | async updateServer( method removeServer (line 96) | async removeServer(id: string): Promise { method getServers (line 104) | getServers(): RemoteServer[] { method getServer (line 109) | getServer(id: string): RemoteServer | null { method getServerWithApiKey (line 114) | async getServerWithApiKey(id: string): Promise<(RemoteServer & { apiKe... method testConnection (line 124) | async testConnection( method testConnectionByEndpoint (line 132) | async testConnectionByEndpoint( method discoverModels (line 142) | async discoverModels(id: string): Promise { method setActiveServer (line 153) | setActiveServer(id: string | null): void { method setActiveRemoteTextModel (line 160) | async setActiveRemoteTextModel(serverId: string, modelId: string): Pro... method setActiveRemoteImageModel (line 165) | async setActiveRemoteImageModel(serverId: string, modelId: string): Pr... method clearActiveRemoteModel (line 172) | clearActiveRemoteModel(): void { method getActiveServer (line 182) | getActiveServer(): RemoteServer | null { method initializeProviders (line 191) | async initializeProviders(): Promise { method clearAllServers (line 198) | async clearAllServers(): Promise { method storeApiKey (line 210) | async storeApiKey(serverId: string, apiKey: string): Promise { method getApiKey (line 214) | async getApiKey(serverId: string): Promise { method removeApiKey (line 218) | private async removeApiKey(serverId: string): Promise { FILE: src/services/remoteServerManagerUtils.ts constant KEYCHAIN_SERVICE (line 12) | const KEYCHAIN_SERVICE = 'ai.offgridmobile.servers'; function storeApiKeyImpl (line 18) | async function storeApiKeyImpl(serverId: string, apiKey: string): Promis... function getApiKeyImpl (line 35) | async function getApiKeyImpl(serverId: string): Promise { function removeApiKeyImpl (line 47) | async function removeApiKeyImpl(serverId: string): Promise { function detectVisionCapability (line 60) | function detectVisionCapability(modelId: string): boolean { function detectToolCallingCapability (line 71) | function detectToolCallingCapability(modelId: string): boolean { function createProviderForServerImpl (line 86) | async function createProviderForServerImpl(server: RemoteServer): Promis... function setActiveRemoteTextModelImpl (line 97) | async function setActiveRemoteTextModelImpl( function setActiveRemoteImageModelImpl (line 138) | async function setActiveRemoteImageModelImpl( function initializeProvidersImpl (line 169) | async function initializeProvidersImpl( FILE: src/services/tools/handlers.ts function makeResult (line 6) | function makeResult(call: ToolCall, start: number, opts: { content: stri... function requireString (line 9) | function requireString(call: ToolCall, param: string): string | null { function executeToolCall (line 14) | async function executeToolCall(call: ToolCall): Promise { function dispatchTool (line 25) | async function dispatchTool(call: ToolCall): Promise { function handleWebSearch (line 53) | async function handleWebSearch(query: string): Promise { type SearchResult (line 85) | type SearchResult = { title: string; snippet: string; url?: string }; function stripHtmlTags (line 87) | function stripHtmlTags(html: string): string { function parseResultBlock (line 98) | function parseResultBlock(block: string): SearchResult | null { function parseBraveResults (line 116) | function parseBraveResults(html: string): SearchResult[] { function decodeHTMLEntities (line 140) | function decodeHTMLEntities(text: string): string { function evaluateExpression (line 160) | function evaluateExpression(expr: string): number { function handleCalculator (line 221) | function handleCalculator(expression: string): string { function handleGetDatetime (line 236) | function handleGetDatetime(timezone?: string): string { function collectDeviceSection (line 254) | async function collectDeviceSection( function handleGetDeviceInfo (line 260) | async function handleGetDeviceInfo(infoType = 'all'): Promise { function isPrivateUrl (line 299) | function isPrivateUrl(url: string): boolean { function handleReadUrl (line 307) | async function handleReadUrl(rawUrl: string): Promise { function handleSearchKnowledgeBase (line 336) | async function handleSearchKnowledgeBase(query: string, projectId?: stri... function formatBytes (line 346) | function formatBytes(bytes: number): string { FILE: src/services/tools/registry.ts constant AVAILABLE_TOOLS (line 3) | const AVAILABLE_TOOLS: ToolDefinition[] = [ function getToolsAsOpenAISchema (line 91) | function getToolsAsOpenAISchema(enabledToolIds: string[]) { function buildToolSystemPromptHint (line 119) | function buildToolSystemPromptHint(enabledToolIds: string[]): string { FILE: src/services/tools/types.ts type ToolDefinition (line 1) | interface ToolDefinition { type ToolParameter (line 11) | interface ToolParameter { type ToolCall (line 18) | interface ToolCall { type ToolResult (line 25) | interface ToolResult { FILE: src/services/voiceService.ts type VoiceEventCallbacks (line 10) | type VoiceEventCallbacks = { class VoiceService (line 18) | class VoiceService { method initialize (line 22) | async initialize(): Promise { method requestPermissions (line 60) | async requestPermissions(): Promise { method setCallbacks (line 82) | setCallbacks(callbacks: VoiceEventCallbacks) { method startListening (line 111) | async startListening(): Promise { method stopListening (line 121) | async stopListening(): Promise { method cancelListening (line 130) | async cancelListening(): Promise { method destroy (line 139) | async destroy(): Promise { method isRecognizing (line 148) | async isRecognizing(): Promise { FILE: src/services/whisperService.ts type TranscriptionResult (line 7) | interface TranscriptionResult { type TranscriptionCallback (line 13) | type TranscriptionCallback = (result: TranscriptionResult) => void; constant WHISPER_MODELS (line 15) | const WHISPER_MODELS = [ class WhisperService (line 23) | class WhisperService { method getModelsDir (line 33) | getModelsDir(): string { return `${RNFS.DocumentDirectoryPath}/whisper... method ensureModelsDirExists (line 34) | async ensureModelsDirExists(): Promise { method getModelPath (line 38) | getModelPath(modelId: string): string { return `${this.getModelsDir()}... method isModelDownloaded (line 39) | async isModelDownloaded(modelId: string): Promise { return RN... method downloadModel (line 41) | async downloadModel(modelId: string, onProgress?: (progress: number) =... method deleteModel (line 85) | async deleteModel(modelId: string): Promise { method validateModelFile (line 107) | async validateModelFile(modelPath: string): Promise { method loadModel (line 131) | async loadModel(modelPath: string): Promise { method unloadModel (line 156) | async unloadModel(): Promise { method isModelLoaded (line 172) | isModelLoaded(): boolean { return this.context !== null; } method getLoadedModelPath (line 173) | getLoadedModelPath(): string | null { return this.currentModelPath; } method requestPermissions (line 175) | async requestPermissions(): Promise { method startRealtimeTranscription (line 208) | async startRealtimeTranscription( method stopTranscription (line 307) | async stopTranscription(): Promise { method forceReset (line 333) | forceReset(): void { method isCurrentlyTranscribing (line 345) | isCurrentlyTranscribing(): boolean { return this.isTranscribing; } method transcribeFile (line 348) | async transcribeFile( FILE: src/stores/appStore.ts type DownloadProgressInfo (line 7) | type DownloadProgressInfo = { type OnboardingChecklist (line 17) | type OnboardingChecklist = { type AppSettings (line 22) | type AppSettings = { type ThemeMode (line 36) | type ThemeMode = 'system' | 'light' | 'dark'; type AppState (line 38) | interface AppState { constant DEFAULT_CHECKLIST (line 108) | const DEFAULT_CHECKLIST: OnboardingChecklist = { constant DEFAULT_SETTINGS (line 113) | const DEFAULT_SETTINGS: AppSettings = { function migrateEnabledTools (line 143) | function migrateEnabledTools(merged: any): void { function migratePersistedState (line 148) | function migratePersistedState(persistedState: any, currentState: AppSta... FILE: src/stores/authStore.ts type AuthState (line 5) | interface AuthState { constant MAX_FAILED_ATTEMPTS (line 22) | const MAX_FAILED_ATTEMPTS = 5; constant LOCKOUT_DURATION (line 23) | const LOCKOUT_DURATION = 5 * 60 * 1000; FILE: src/stores/chatStore.ts function nextUpdatedAt (line 8) | function nextUpdatedAt(previousUpdatedAt?: string): string { function updateMessageInConv (line 17) | function updateMessageInConv( function sliceThinkingBlock (line 30) | function sliceThinkingBlock( function extractChannelThinking (line 47) | function extractChannelThinking(rawContent: string): { reasoningContent:... function deriveTitle (line 58) | function deriveTitle(currentTitle: string, role: string, content: string... function mapConversation (line 65) | function mapConversation( type ChatState (line 73) | interface ChatState { FILE: src/stores/debugLogsStore.ts type DebugLogEntry (line 3) | interface DebugLogEntry { type DebugLogsState (line 9) | interface DebugLogsState { FILE: src/stores/projectStore.ts type ProjectState (line 9) | interface ProjectState { constant DEFAULT_PROJECTS (line 21) | const DEFAULT_PROJECTS: Project[] = [ FILE: src/stores/remoteModelCapabilities.ts type RemoteModelInfo (line 11) | interface RemoteModelInfo { function parseModelInfoKeys (line 18) | function parseModelInfoKeys(modelInfo: Record): { conte... function parseNumCtx (line 33) | function parseNumCtx(parameters: string): number { function extractOllamaCapabilities (line 42) | function extractOllamaCapabilities(data: Record): Remot... function fetchRemoteModelInfo (line 75) | async function fetchRemoteModelInfo( function fetchLmStudioModelInfo (line 108) | async function fetchLmStudioModelInfo( function deltaHasThinking (line 177) | function deltaHasThinking(delta: Record): boolean { function probeLmStudioThinking (line 185) | async function probeLmStudioThinking(endpoint: string, modelId: string):... function hasRealData (line 229) | function hasRealData(info: RemoteModelInfo): boolean { function fetchModelCapabilities (line 238) | async function fetchModelCapabilities( function isGenerativeModel (line 260) | function isGenerativeModel(modelId: string): boolean { FILE: src/stores/remoteServerHelpers.ts constant DISCOVERY_FETCH_TIMEOUT_MS (line 22) | const DISCOVERY_FETCH_TIMEOUT_MS = 5000; function testServerConnection (line 24) | async function testServerConnection(server: RemoteServer): Promise>( FILE: src/types/index.ts type ModelCategory (line 2) | type ModelCategory = 'text-generation' | 'image-generation' | 'vision' |... type ModelSource (line 4) | type ModelSource = 'lmstudio' | 'official' | 'verified-quantizer' | 'com... type ModelCredibility (line 6) | interface ModelCredibility { type ModelInfo (line 13) | interface ModelInfo { type ModelFile (line 29) | interface ModelFile { type DownloadedModel (line 44) | interface DownloadedModel { type PersistedDownloadInfo (line 61) | interface PersistedDownloadInfo { type DownloadProgress (line 82) | interface DownloadProgress { type SoCVendor (line 91) | type SoCVendor = 'qualcomm' | 'mediatek' | 'exynos' | 'tensor' | 'apple'... type SoCInfo (line 92) | interface SoCInfo { type ImageModelRecommendation (line 99) | interface ImageModelRecommendation { type DeviceInfo (line 110) | interface DeviceInfo { type ModelRecommendation (line 120) | interface ModelRecommendation { type MediaAttachment (line 128) | interface MediaAttachment { type GenerationMeta (line 143) | interface GenerationMeta { type Message (line 170) | interface Message { type Conversation (line 194) | interface Conversation { type OnboardingStep (line 207) | interface OnboardingStep { type HFModelSearchResult (line 215) | interface HFModelSearchResult { type HFModelFile (line 236) | interface HFModelFile { type ImageGenerationModel (line 248) | interface ImageGenerationModel { type ONNXImageModel (line 261) | interface ONNXImageModel { type ImageGenerationState (line 274) | interface ImageGenerationState { type ImageGenerationMode (line 282) | type ImageGenerationMode = 'auto' | 'manual'; type AutoDetectMethod (line 283) | type AutoDetectMethod = 'pattern' | 'llm'; type ModelLoadingStrategy (line 284) | type ModelLoadingStrategy = 'performance' | 'memory'; type CacheType (line 285) | type CacheType = 'f16' | 'q8_0' | 'q4_0'; type InferenceBackend (line 286) | type InferenceBackend = 'cpu' | 'opencl' | 'htp' | 'metal'; constant INFERENCE_BACKENDS (line 287) | const INFERENCE_BACKENDS = { type ImageModeState (line 294) | type ImageModeState = 'auto' | 'force' | 'disabled'; type GeneratedImage (line 296) | interface GeneratedImage { type ImageGenerationParams (line 310) | interface ImageGenerationParams { type ImageGenerationProgress (line 320) | interface ImageGenerationProgress { type Project (line 325) | interface Project { type BackgroundDownloadStatus (line 334) | type BackgroundDownloadStatus = type BackgroundDownloadReasonCode (line 344) | type BackgroundDownloadReasonCode = type BackgroundDownloadInfo (line 360) | interface BackgroundDownloadInfo { type DebugInfo (line 375) | interface DebugInfo { type AppScreen (line 383) | type AppScreen = 'onboarding' | 'home' | 'models' | 'chat' | 'settings' ... FILE: src/types/remoteServer.ts type RemoteProviderType (line 9) | type RemoteProviderType = 'openai-compatible' | 'anthropic'; type RemoteServer (line 12) | interface RemoteServer { type RemoteModel (line 34) | interface RemoteModel { type RemoteModelCapabilities (line 50) | interface RemoteModelCapabilities { type ServerTestResult (line 64) | interface ServerTestResult { type ServerInfo (line 78) | interface ServerInfo { type RemoteGenerationSettings (line 88) | interface RemoteGenerationSettings { constant DEFAULT_REMOTE_GENERATION_SETTINGS (line 100) | const DEFAULT_REMOTE_GENERATION_SETTINGS: RemoteGenerationSettings = { type SelectableModel (line 108) | interface SelectableModel { FILE: src/types/whisper.rn.d.ts type WhisperContextOptions (line 2) | interface WhisperContextOptions { type TranscribeOptions (line 10) | interface TranscribeOptions { type TranscribeRealtimeOptions (line 16) | interface TranscribeRealtimeOptions { type TranscribeResult (line 25) | interface TranscribeResult { type RealtimeTranscribeEvent (line 29) | interface RealtimeTranscribeEvent { type WhisperContext (line 38) | interface WhisperContext { FILE: src/utils/coreMLModelUtils.ts function resolveCoreMLModelDir (line 11) | async function resolveCoreMLModelDir(modelDir: string): Promise { function downloadCoreMLTokenizerFiles (line 32) | async function downloadCoreMLTokenizerFiles(modelDir: string, repo: stri... FILE: src/utils/downloadErrors.ts function getReasonMessageFromCode (line 3) | function getReasonMessageFromCode(reasonCode?: BackgroundDownloadReasonC... function getLegacyMessage (line 46) | function getLegacyMessage(reason?: string | null): string { function isRetryableError (line 98) | function isRetryableError( function getUserFacingDownloadMessage (line 121) | function getUserFacingDownloadMessage( constant NETWORK_LOST_LABEL (line 128) | const NETWORK_LOST_LABEL = 'Network connection lost - waiting to resume.... constant SIMPLE_STATUS_LABELS (line 130) | const SIMPLE_STATUS_LABELS: Partial> = { function getPendingLabel (line 138) | function getPendingLabel( function getRetryingLabel (line 149) | function getRetryingLabel( function getDownloadStatusLabel (line 161) | function getDownloadStatusLabel( FILE: src/utils/generateId.ts function generateId (line 6) | function generateId(): string { function generateRandomSeed (line 23) | function generateRandomSeed(): number { FILE: src/utils/haptics.ts type HapticType (line 3) | type HapticType = function triggerHaptic (line 17) | function triggerHaptic(type: HapticType): void { FILE: src/utils/logger.ts constant LOG_FILE_NAME (line 4) | const LOG_FILE_NAME = 'download-debug.log'; constant MAX_LOG_FILE_BYTES (line 5) | const MAX_LOG_FILE_BYTES = 2 * 1024 * 1024; constant RETAINED_LOG_LINES (line 6) | const RETAINED_LOG_LINES = 4000; function getLogFilePath (line 10) | function getLogFilePath(): string { function formatArg (line 14) | function formatArg(arg: unknown): string { function appendPersistentLog (line 27) | function appendPersistentLog(level: 'log' | 'warn' | 'error', args: unkn... function capture (line 53) | function capture(level: 'log' | 'warn' | 'error', args: unknown[]): void { FILE: src/utils/messageContent.ts constant CONTROL_TOKEN_PATTERNS (line 1) | const CONTROL_TOKEN_PATTERNS: RegExp[] = [ constant CHANNEL_ANALYSIS_START (line 17) | const CHANNEL_ANALYSIS_START = /<\|channel\|>analysis<\|message\|>/gi; constant CHANNEL_FINAL_START (line 18) | const CHANNEL_FINAL_START = /<\|channel\|>final<\|message\|>/gi; constant GEMMA4_THINK_OPEN (line 21) | const GEMMA4_THINK_OPEN = /<\|channel>thought\n/gi; constant GEMMA4_THINK_CLOSE (line 22) | const GEMMA4_THINK_CLOSE = //gi; function stripControlTokens (line 29) | function stripControlTokens(content: string): string { function stripStreamingControlTokens (line 44) | function stripStreamingControlTokens(content: string): string { FILE: src/utils/network.ts function isPrivateIPv4 (line 4) | function isPrivateIPv4(ip: string): boolean { function isIPv6 (line 17) | function isIPv6(ip: string): boolean { function isOnLocalNetwork (line 25) | async function isOnLocalNetwork(): Promise { FILE: src/utils/pickerErrorUtils.ts function isPickerStuck (line 5) | function isPickerStuck(err: unknown): boolean { FILE: src/utils/resolvePickedFileUri.ts function decodePickedUri (line 4) | function decodePickedUri(uri: string): string { FILE: src/utils/sharePrompt.ts constant GITHUB_URL (line 1) | const GITHUB_URL = 'https://github.com/alichherawalla/off-grid-mobile-ai'; constant SHARE_TEXT (line 3) | const SHARE_TEXT = `Just tried Off Grid - a completely free, open-source... constant SHARE_ON_X_URL (line 9) | const SHARE_ON_X_URL = `https://twitter.com/intent/tweet?text=${encodeUR... function shouldShowSharePrompt (line 14) | function shouldShowSharePrompt(count: number): boolean { type ShareVariant (line 20) | type ShareVariant = 'text' | 'image'; type SharePromptListener (line 21) | type SharePromptListener = (variant: ShareVariant) => void; function subscribeSharePrompt (line 25) | function subscribeSharePrompt( function emitSharePrompt (line 32) | function emitSharePrompt(variant: ShareVariant): void { FILE: src/utils/visionRepair.ts type VisionRepairCandidate (line 3) | interface VisionRepairCandidate { function needsVisionRepair (line 14) | function needsVisionRepair(