clawdex-mobile 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/docs/setup-and-operations.md +3 -1
- package/docs/troubleshooting.md +1 -0
- package/package.json +18 -8
- package/scripts/setup-secure-dev.sh +26 -17
- package/services/rust-bridge/Cargo.lock +1 -1
- package/services/rust-bridge/Cargo.toml +1 -1
- package/vendor/bridge-binaries/darwin-arm64/codex-rust-bridge +0 -0
- package/vendor/bridge-binaries/darwin-x64/codex-rust-bridge +0 -0
- package/vendor/bridge-binaries/linux-x64/codex-rust-bridge +0 -0
- package/vendor/bridge-binaries/win32-x64/codex-rust-bridge.exe +0 -0
- package/.artifacts/bridge-binaries/bridge-binaries-darwin-arm64/codex-rust-bridge +0 -0
- package/.artifacts/bridge-binaries/bridge-binaries-darwin-x64/codex-rust-bridge +0 -0
- package/.artifacts/bridge-binaries/bridge-binaries-linux-x64/codex-rust-bridge +0 -0
- package/.artifacts/bridge-binaries/bridge-binaries-win32-x64/codex-rust-bridge.exe +0 -0
- package/.github/workflows/ci.yml +0 -80
- package/.github/workflows/npm-release.yml +0 -208
- package/.github/workflows/pages.yml +0 -41
- package/AGENTS.md +0 -273
- package/STATUS.md +0 -115
- package/apps/mobile/.env.example +0 -6
- package/apps/mobile/App.tsx +0 -943
- package/apps/mobile/app.json +0 -77
- package/apps/mobile/assets/brand/adaptive-icon.png +0 -0
- package/apps/mobile/assets/brand/app-icon.png +0 -0
- package/apps/mobile/assets/brand/favicon.png +0 -0
- package/apps/mobile/assets/brand/mark.png +0 -0
- package/apps/mobile/assets/brand/splash-icon-white.png +0 -0
- package/apps/mobile/assets/brand/splash-icon.png +0 -0
- package/apps/mobile/babel.config.js +0 -7
- package/apps/mobile/eas.json +0 -40
- package/apps/mobile/eslint.config.cjs +0 -28
- package/apps/mobile/index.js +0 -5
- package/apps/mobile/package.json +0 -57
- package/apps/mobile/plugins/withAndroidCleartextTraffic.js +0 -14
- package/apps/mobile/src/api/__tests__/chatMapping.test.ts +0 -351
- package/apps/mobile/src/api/__tests__/client.test.ts +0 -1494
- package/apps/mobile/src/api/__tests__/ws.test.ts +0 -640
- package/apps/mobile/src/api/account.ts +0 -47
- package/apps/mobile/src/api/chatMapping.ts +0 -1048
- package/apps/mobile/src/api/client.ts +0 -1430
- package/apps/mobile/src/api/rateLimits.ts +0 -143
- package/apps/mobile/src/api/types.ts +0 -435
- package/apps/mobile/src/api/ws.ts +0 -852
- package/apps/mobile/src/bridgeUrl.ts +0 -105
- package/apps/mobile/src/components/ActivityBar.tsx +0 -95
- package/apps/mobile/src/components/ApprovalBanner.tsx +0 -207
- package/apps/mobile/src/components/BrandMark.tsx +0 -43
- package/apps/mobile/src/components/ChatHeader.tsx +0 -107
- package/apps/mobile/src/components/ChatInput.tsx +0 -457
- package/apps/mobile/src/components/ChatMessage.tsx +0 -959
- package/apps/mobile/src/components/ComposerUsageLimits.tsx +0 -167
- package/apps/mobile/src/components/SelectionSheet.tsx +0 -466
- package/apps/mobile/src/components/StatusLine.tsx +0 -52
- package/apps/mobile/src/components/ToolBlock.tsx +0 -67
- package/apps/mobile/src/components/TypingIndicator.tsx +0 -64
- package/apps/mobile/src/components/VoiceRecordingWaveform.tsx +0 -181
- package/apps/mobile/src/components/WorkspacePickerModal.tsx +0 -812
- package/apps/mobile/src/components/__tests__/chat-input-layout.test.ts +0 -35
- package/apps/mobile/src/components/__tests__/chatImageSource.test.ts +0 -44
- package/apps/mobile/src/components/__tests__/composerUsageLimits.test.ts +0 -138
- package/apps/mobile/src/components/__tests__/voiceWaveform.test.ts +0 -31
- package/apps/mobile/src/components/chat-input-layout.ts +0 -59
- package/apps/mobile/src/components/chatImageSource.ts +0 -86
- package/apps/mobile/src/components/usageLimitBadges.ts +0 -109
- package/apps/mobile/src/components/voiceWaveform.ts +0 -46
- package/apps/mobile/src/config.ts +0 -64
- package/apps/mobile/src/hooks/useVoiceRecorder.ts +0 -271
- package/apps/mobile/src/navigation/DrawerContent.tsx +0 -1129
- package/apps/mobile/src/navigation/__tests__/chatThreadTree.test.ts +0 -89
- package/apps/mobile/src/navigation/__tests__/drawerChats.test.ts +0 -65
- package/apps/mobile/src/navigation/chatThreadTree.ts +0 -191
- package/apps/mobile/src/navigation/drawerChats.ts +0 -9
- package/apps/mobile/src/screens/GitScreen.tsx +0 -1489
- package/apps/mobile/src/screens/MainScreen.tsx +0 -10511
- package/apps/mobile/src/screens/OnboardingScreen.tsx +0 -1746
- package/apps/mobile/src/screens/PrivacyScreen.tsx +0 -196
- package/apps/mobile/src/screens/SettingsScreen.tsx +0 -870
- package/apps/mobile/src/screens/TerminalScreen.tsx +0 -248
- package/apps/mobile/src/screens/TermsScreen.tsx +0 -192
- package/apps/mobile/src/screens/__tests__/agentThreadDisplay.test.ts +0 -80
- package/apps/mobile/src/screens/__tests__/agentThreads.test.ts +0 -170
- package/apps/mobile/src/screens/__tests__/gitDiff.test.ts +0 -131
- package/apps/mobile/src/screens/__tests__/planCardState.test.ts +0 -88
- package/apps/mobile/src/screens/__tests__/subAgentTranscript.test.ts +0 -102
- package/apps/mobile/src/screens/__tests__/transcriptMessages.test.ts +0 -97
- package/apps/mobile/src/screens/agentThreadDisplay.ts +0 -261
- package/apps/mobile/src/screens/agentThreads.ts +0 -167
- package/apps/mobile/src/screens/gitDiff.ts +0 -380
- package/apps/mobile/src/screens/planCardState.ts +0 -40
- package/apps/mobile/src/screens/subAgentTranscript.ts +0 -149
- package/apps/mobile/src/screens/transcriptMessages.ts +0 -102
- package/apps/mobile/src/theme.ts +0 -106
- package/apps/mobile/src/types/assets.d.ts +0 -4
- package/apps/mobile/tsconfig.json +0 -33
- package/docs/app-review-notes.md +0 -116
- package/docs/codex-app-server-cli-gap-tracker.md +0 -90
- package/docs/eas-builds.md +0 -91
- package/docs/open-source-license-requirements.md +0 -32
- package/docs/plans/2026-02-20-codex-desktop-style-redesign.md +0 -190
- package/docs/plans/2026-02-20-codex-mobile-implementation.md +0 -1630
- package/docs/plans/2026-02-21-codex-ui-redesign-design.md +0 -101
- package/docs/plans/2026-02-21-codex-ui-redesign.md +0 -1229
- package/docs/privacy-policy.md +0 -54
- package/docs/realtime-streaming-limitations.md +0 -161
- package/docs/terms-of-service.md +0 -33
- package/docs/voice-transcription.md +0 -87
- package/scripts/codex-live-demo.sh +0 -69
- package/scripts/start-bridge-secure.sh +0 -5
- package/scripts/start-expo.sh +0 -176
- package/scripts/sync-versions.js +0 -63
- package/scripts/teardown.sh +0 -136
- package/services/mac-bridge/.env.example +0 -10
- package/services/mac-bridge/codex-types/AbsolutePathBuf.ts +0 -14
- package/services/mac-bridge/codex-types/AddConversationListenerParams.ts +0 -6
- package/services/mac-bridge/codex-types/AddConversationSubscriptionResponse.ts +0 -5
- package/services/mac-bridge/codex-types/AgentMessageContent.ts +0 -5
- package/services/mac-bridge/codex-types/AgentMessageContentDeltaEvent.ts +0 -5
- package/services/mac-bridge/codex-types/AgentMessageDeltaEvent.ts +0 -5
- package/services/mac-bridge/codex-types/AgentMessageEvent.ts +0 -5
- package/services/mac-bridge/codex-types/AgentMessageItem.ts +0 -21
- package/services/mac-bridge/codex-types/AgentReasoningDeltaEvent.ts +0 -5
- package/services/mac-bridge/codex-types/AgentReasoningEvent.ts +0 -5
- package/services/mac-bridge/codex-types/AgentReasoningRawContentDeltaEvent.ts +0 -5
- package/services/mac-bridge/codex-types/AgentReasoningRawContentEvent.ts +0 -5
- package/services/mac-bridge/codex-types/AgentReasoningSectionBreakEvent.ts +0 -5
- package/services/mac-bridge/codex-types/AgentStatus.ts +0 -8
- package/services/mac-bridge/codex-types/ApplyPatchApprovalParams.ts +0 -21
- package/services/mac-bridge/codex-types/ApplyPatchApprovalRequestEvent.ts +0 -23
- package/services/mac-bridge/codex-types/ApplyPatchApprovalResponse.ts +0 -6
- package/services/mac-bridge/codex-types/ArchiveConversationParams.ts +0 -6
- package/services/mac-bridge/codex-types/ArchiveConversationResponse.ts +0 -5
- package/services/mac-bridge/codex-types/AskForApproval.ts +0 -9
- package/services/mac-bridge/codex-types/AuthMode.ts +0 -8
- package/services/mac-bridge/codex-types/AuthStatusChangeNotification.ts +0 -9
- package/services/mac-bridge/codex-types/BackgroundEventEvent.ts +0 -5
- package/services/mac-bridge/codex-types/ByteRange.ts +0 -13
- package/services/mac-bridge/codex-types/CallToolResult.ts +0 -9
- package/services/mac-bridge/codex-types/CancelLoginChatGptParams.ts +0 -5
- package/services/mac-bridge/codex-types/CancelLoginChatGptResponse.ts +0 -5
- package/services/mac-bridge/codex-types/ClientInfo.ts +0 -5
- package/services/mac-bridge/codex-types/ClientNotification.ts +0 -5
- package/services/mac-bridge/codex-types/ClientRequest.ts +0 -60
- package/services/mac-bridge/codex-types/CodexErrorInfo.ts +0 -8
- package/services/mac-bridge/codex-types/CollabAgentInteractionBeginEvent.ts +0 -23
- package/services/mac-bridge/codex-types/CollabAgentInteractionEndEvent.ts +0 -28
- package/services/mac-bridge/codex-types/CollabAgentSpawnBeginEvent.ts +0 -19
- package/services/mac-bridge/codex-types/CollabAgentSpawnEndEvent.ts +0 -28
- package/services/mac-bridge/codex-types/CollabCloseBeginEvent.ts +0 -18
- package/services/mac-bridge/codex-types/CollabCloseEndEvent.ts +0 -24
- package/services/mac-bridge/codex-types/CollabResumeBeginEvent.ts +0 -18
- package/services/mac-bridge/codex-types/CollabResumeEndEvent.ts +0 -24
- package/services/mac-bridge/codex-types/CollabWaitingBeginEvent.ts +0 -18
- package/services/mac-bridge/codex-types/CollabWaitingEndEvent.ts +0 -19
- package/services/mac-bridge/codex-types/CollaborationMode.ts +0 -10
- package/services/mac-bridge/codex-types/CollaborationModeMask.ts +0 -11
- package/services/mac-bridge/codex-types/ContentItem.ts +0 -5
- package/services/mac-bridge/codex-types/ContextCompactedEvent.ts +0 -5
- package/services/mac-bridge/codex-types/ContextCompactionItem.ts +0 -5
- package/services/mac-bridge/codex-types/ConversationGitInfo.ts +0 -5
- package/services/mac-bridge/codex-types/ConversationSummary.ts +0 -8
- package/services/mac-bridge/codex-types/CreditsSnapshot.ts +0 -5
- package/services/mac-bridge/codex-types/CustomPrompt.ts +0 -5
- package/services/mac-bridge/codex-types/DeprecationNoticeEvent.ts +0 -13
- package/services/mac-bridge/codex-types/DynamicToolCallRequest.ts +0 -6
- package/services/mac-bridge/codex-types/ElicitationRequestEvent.ts +0 -5
- package/services/mac-bridge/codex-types/ErrorEvent.ts +0 -6
- package/services/mac-bridge/codex-types/EventMsg.ts +0 -78
- package/services/mac-bridge/codex-types/ExecApprovalRequestEvent.ts +0 -44
- package/services/mac-bridge/codex-types/ExecCommandApprovalParams.ts +0 -16
- package/services/mac-bridge/codex-types/ExecCommandApprovalResponse.ts +0 -6
- package/services/mac-bridge/codex-types/ExecCommandBeginEvent.ts +0 -35
- package/services/mac-bridge/codex-types/ExecCommandEndEvent.ts +0 -64
- package/services/mac-bridge/codex-types/ExecCommandOutputDeltaEvent.ts +0 -18
- package/services/mac-bridge/codex-types/ExecCommandSource.ts +0 -5
- package/services/mac-bridge/codex-types/ExecCommandStatus.ts +0 -5
- package/services/mac-bridge/codex-types/ExecOneOffCommandParams.ts +0 -6
- package/services/mac-bridge/codex-types/ExecOneOffCommandResponse.ts +0 -5
- package/services/mac-bridge/codex-types/ExecOutputStream.ts +0 -5
- package/services/mac-bridge/codex-types/ExecPolicyAmendment.ts +0 -12
- package/services/mac-bridge/codex-types/ExitedReviewModeEvent.ts +0 -6
- package/services/mac-bridge/codex-types/FileChange.ts +0 -5
- package/services/mac-bridge/codex-types/ForcedLoginMethod.ts +0 -5
- package/services/mac-bridge/codex-types/ForkConversationParams.ts +0 -7
- package/services/mac-bridge/codex-types/ForkConversationResponse.ts +0 -7
- package/services/mac-bridge/codex-types/FunctionCallOutputBody.ts +0 -6
- package/services/mac-bridge/codex-types/FunctionCallOutputContentItem.ts +0 -9
- package/services/mac-bridge/codex-types/FunctionCallOutputPayload.ts +0 -12
- package/services/mac-bridge/codex-types/FuzzyFileSearchParams.ts +0 -5
- package/services/mac-bridge/codex-types/FuzzyFileSearchResponse.ts +0 -6
- package/services/mac-bridge/codex-types/FuzzyFileSearchResult.ts +0 -8
- package/services/mac-bridge/codex-types/FuzzyFileSearchSessionCompletedNotification.ts +0 -5
- package/services/mac-bridge/codex-types/FuzzyFileSearchSessionUpdatedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/GetAuthStatusParams.ts +0 -5
- package/services/mac-bridge/codex-types/GetAuthStatusResponse.ts +0 -6
- package/services/mac-bridge/codex-types/GetConversationSummaryParams.ts +0 -6
- package/services/mac-bridge/codex-types/GetConversationSummaryResponse.ts +0 -6
- package/services/mac-bridge/codex-types/GetHistoryEntryResponseEvent.ts +0 -10
- package/services/mac-bridge/codex-types/GetUserAgentResponse.ts +0 -5
- package/services/mac-bridge/codex-types/GetUserSavedConfigResponse.ts +0 -6
- package/services/mac-bridge/codex-types/GhostCommit.ts +0 -8
- package/services/mac-bridge/codex-types/GitDiffToRemoteParams.ts +0 -5
- package/services/mac-bridge/codex-types/GitDiffToRemoteResponse.ts +0 -6
- package/services/mac-bridge/codex-types/GitSha.ts +0 -5
- package/services/mac-bridge/codex-types/HistoryEntry.ts +0 -5
- package/services/mac-bridge/codex-types/InitializeCapabilities.ts +0 -17
- package/services/mac-bridge/codex-types/InitializeParams.ts +0 -7
- package/services/mac-bridge/codex-types/InitializeResponse.ts +0 -5
- package/services/mac-bridge/codex-types/InputItem.ts +0 -10
- package/services/mac-bridge/codex-types/InputModality.ts +0 -8
- package/services/mac-bridge/codex-types/InterruptConversationParams.ts +0 -6
- package/services/mac-bridge/codex-types/InterruptConversationResponse.ts +0 -6
- package/services/mac-bridge/codex-types/ItemCompletedEvent.ts +0 -7
- package/services/mac-bridge/codex-types/ItemStartedEvent.ts +0 -7
- package/services/mac-bridge/codex-types/ListConversationsParams.ts +0 -5
- package/services/mac-bridge/codex-types/ListConversationsResponse.ts +0 -6
- package/services/mac-bridge/codex-types/ListCustomPromptsResponseEvent.ts +0 -9
- package/services/mac-bridge/codex-types/ListRemoteSkillsResponseEvent.ts +0 -9
- package/services/mac-bridge/codex-types/ListSkillsResponseEvent.ts +0 -9
- package/services/mac-bridge/codex-types/LocalShellAction.ts +0 -6
- package/services/mac-bridge/codex-types/LocalShellExecAction.ts +0 -5
- package/services/mac-bridge/codex-types/LocalShellStatus.ts +0 -5
- package/services/mac-bridge/codex-types/LoginApiKeyParams.ts +0 -5
- package/services/mac-bridge/codex-types/LoginApiKeyResponse.ts +0 -5
- package/services/mac-bridge/codex-types/LoginChatGptCompleteNotification.ts +0 -8
- package/services/mac-bridge/codex-types/LoginChatGptResponse.ts +0 -5
- package/services/mac-bridge/codex-types/LogoutChatGptResponse.ts +0 -5
- package/services/mac-bridge/codex-types/McpAuthStatus.ts +0 -5
- package/services/mac-bridge/codex-types/McpInvocation.ts +0 -18
- package/services/mac-bridge/codex-types/McpListToolsResponseEvent.ts +0 -25
- package/services/mac-bridge/codex-types/McpStartupCompleteEvent.ts +0 -6
- package/services/mac-bridge/codex-types/McpStartupFailure.ts +0 -5
- package/services/mac-bridge/codex-types/McpStartupStatus.ts +0 -5
- package/services/mac-bridge/codex-types/McpStartupUpdateEvent.ts +0 -14
- package/services/mac-bridge/codex-types/McpToolCallBeginEvent.ts +0 -10
- package/services/mac-bridge/codex-types/McpToolCallEndEvent.ts +0 -15
- package/services/mac-bridge/codex-types/MessagePhase.ts +0 -11
- package/services/mac-bridge/codex-types/ModeKind.ts +0 -8
- package/services/mac-bridge/codex-types/ModelRerouteEvent.ts +0 -6
- package/services/mac-bridge/codex-types/ModelRerouteReason.ts +0 -5
- package/services/mac-bridge/codex-types/NetworkAccess.ts +0 -8
- package/services/mac-bridge/codex-types/NetworkApprovalContext.ts +0 -6
- package/services/mac-bridge/codex-types/NetworkApprovalProtocol.ts +0 -5
- package/services/mac-bridge/codex-types/NewConversationParams.ts +0 -8
- package/services/mac-bridge/codex-types/NewConversationResponse.ts +0 -7
- package/services/mac-bridge/codex-types/ParsedCommand.ts +0 -12
- package/services/mac-bridge/codex-types/PatchApplyBeginEvent.ts +0 -23
- package/services/mac-bridge/codex-types/PatchApplyEndEvent.ts +0 -36
- package/services/mac-bridge/codex-types/PatchApplyStatus.ts +0 -5
- package/services/mac-bridge/codex-types/Personality.ts +0 -5
- package/services/mac-bridge/codex-types/PlanDeltaEvent.ts +0 -5
- package/services/mac-bridge/codex-types/PlanItem.ts +0 -5
- package/services/mac-bridge/codex-types/PlanItemArg.ts +0 -6
- package/services/mac-bridge/codex-types/PlanType.ts +0 -5
- package/services/mac-bridge/codex-types/Profile.ts +0 -9
- package/services/mac-bridge/codex-types/RateLimitSnapshot.ts +0 -8
- package/services/mac-bridge/codex-types/RateLimitWindow.ts +0 -17
- package/services/mac-bridge/codex-types/RawResponseItemEvent.ts +0 -6
- package/services/mac-bridge/codex-types/ReadOnlyAccess.ts +0 -19
- package/services/mac-bridge/codex-types/ReasoningContentDeltaEvent.ts +0 -5
- package/services/mac-bridge/codex-types/ReasoningEffort.ts +0 -8
- package/services/mac-bridge/codex-types/ReasoningItem.ts +0 -5
- package/services/mac-bridge/codex-types/ReasoningItemContent.ts +0 -5
- package/services/mac-bridge/codex-types/ReasoningItemReasoningSummary.ts +0 -5
- package/services/mac-bridge/codex-types/ReasoningRawContentDeltaEvent.ts +0 -5
- package/services/mac-bridge/codex-types/ReasoningSummary.ts +0 -10
- package/services/mac-bridge/codex-types/RemoteSkillDownloadedEvent.ts +0 -8
- package/services/mac-bridge/codex-types/RemoteSkillSummary.ts +0 -5
- package/services/mac-bridge/codex-types/RemoveConversationListenerParams.ts +0 -5
- package/services/mac-bridge/codex-types/RemoveConversationSubscriptionResponse.ts +0 -5
- package/services/mac-bridge/codex-types/RequestId.ts +0 -5
- package/services/mac-bridge/codex-types/RequestUserInputEvent.ts +0 -15
- package/services/mac-bridge/codex-types/RequestUserInputQuestion.ts +0 -6
- package/services/mac-bridge/codex-types/RequestUserInputQuestionOption.ts +0 -5
- package/services/mac-bridge/codex-types/Resource.ts +0 -9
- package/services/mac-bridge/codex-types/ResourceTemplate.ts +0 -9
- package/services/mac-bridge/codex-types/ResponseItem.ts +0 -18
- package/services/mac-bridge/codex-types/ResumeConversationParams.ts +0 -8
- package/services/mac-bridge/codex-types/ResumeConversationResponse.ts +0 -7
- package/services/mac-bridge/codex-types/ReviewCodeLocation.ts +0 -9
- package/services/mac-bridge/codex-types/ReviewDecision.ts +0 -9
- package/services/mac-bridge/codex-types/ReviewFinding.ts +0 -9
- package/services/mac-bridge/codex-types/ReviewLineRange.ts +0 -8
- package/services/mac-bridge/codex-types/ReviewOutputEvent.ts +0 -9
- package/services/mac-bridge/codex-types/ReviewRequest.ts +0 -9
- package/services/mac-bridge/codex-types/ReviewTarget.ts +0 -9
- package/services/mac-bridge/codex-types/SandboxMode.ts +0 -5
- package/services/mac-bridge/codex-types/SandboxPolicy.ts +0 -44
- package/services/mac-bridge/codex-types/SandboxSettings.ts +0 -6
- package/services/mac-bridge/codex-types/SendUserMessageParams.ts +0 -7
- package/services/mac-bridge/codex-types/SendUserMessageResponse.ts +0 -5
- package/services/mac-bridge/codex-types/SendUserTurnParams.ts +0 -16
- package/services/mac-bridge/codex-types/SendUserTurnResponse.ts +0 -5
- package/services/mac-bridge/codex-types/ServerNotification.ts +0 -45
- package/services/mac-bridge/codex-types/ServerRequest.ts +0 -16
- package/services/mac-bridge/codex-types/SessionConfiguredEvent.ts +0 -57
- package/services/mac-bridge/codex-types/SessionConfiguredNotification.ts +0 -8
- package/services/mac-bridge/codex-types/SessionNetworkProxyRuntime.ts +0 -5
- package/services/mac-bridge/codex-types/SessionSource.ts +0 -6
- package/services/mac-bridge/codex-types/SetDefaultModelParams.ts +0 -6
- package/services/mac-bridge/codex-types/SetDefaultModelResponse.ts +0 -5
- package/services/mac-bridge/codex-types/Settings.ts +0 -9
- package/services/mac-bridge/codex-types/SkillDependencies.ts +0 -6
- package/services/mac-bridge/codex-types/SkillErrorInfo.ts +0 -5
- package/services/mac-bridge/codex-types/SkillInterface.ts +0 -5
- package/services/mac-bridge/codex-types/SkillMetadata.ts +0 -12
- package/services/mac-bridge/codex-types/SkillScope.ts +0 -5
- package/services/mac-bridge/codex-types/SkillToolDependency.ts +0 -5
- package/services/mac-bridge/codex-types/SkillsListEntry.ts +0 -7
- package/services/mac-bridge/codex-types/StepStatus.ts +0 -5
- package/services/mac-bridge/codex-types/StreamErrorEvent.ts +0 -12
- package/services/mac-bridge/codex-types/SubAgentSource.ts +0 -6
- package/services/mac-bridge/codex-types/TerminalInteractionEvent.ts +0 -17
- package/services/mac-bridge/codex-types/TextElement.ts +0 -14
- package/services/mac-bridge/codex-types/ThreadId.ts +0 -5
- package/services/mac-bridge/codex-types/ThreadNameUpdatedEvent.ts +0 -6
- package/services/mac-bridge/codex-types/ThreadRolledBackEvent.ts +0 -9
- package/services/mac-bridge/codex-types/TokenCountEvent.ts +0 -7
- package/services/mac-bridge/codex-types/TokenUsage.ts +0 -5
- package/services/mac-bridge/codex-types/TokenUsageInfo.ts +0 -6
- package/services/mac-bridge/codex-types/Tool.ts +0 -9
- package/services/mac-bridge/codex-types/Tools.ts +0 -5
- package/services/mac-bridge/codex-types/TurnAbortReason.ts +0 -5
- package/services/mac-bridge/codex-types/TurnAbortedEvent.ts +0 -6
- package/services/mac-bridge/codex-types/TurnCompleteEvent.ts +0 -5
- package/services/mac-bridge/codex-types/TurnDiffEvent.ts +0 -5
- package/services/mac-bridge/codex-types/TurnItem.ts +0 -11
- package/services/mac-bridge/codex-types/TurnStartedEvent.ts +0 -6
- package/services/mac-bridge/codex-types/UndoCompletedEvent.ts +0 -5
- package/services/mac-bridge/codex-types/UndoStartedEvent.ts +0 -5
- package/services/mac-bridge/codex-types/UpdatePlanArgs.ts +0 -10
- package/services/mac-bridge/codex-types/UserInfoResponse.ts +0 -5
- package/services/mac-bridge/codex-types/UserInput.ts +0 -16
- package/services/mac-bridge/codex-types/UserMessageEvent.ts +0 -22
- package/services/mac-bridge/codex-types/UserMessageItem.ts +0 -6
- package/services/mac-bridge/codex-types/UserSavedConfig.ts +0 -14
- package/services/mac-bridge/codex-types/Verbosity.ts +0 -9
- package/services/mac-bridge/codex-types/ViewImageToolCallEvent.ts +0 -13
- package/services/mac-bridge/codex-types/WarningEvent.ts +0 -5
- package/services/mac-bridge/codex-types/WebSearchAction.ts +0 -5
- package/services/mac-bridge/codex-types/WebSearchBeginEvent.ts +0 -5
- package/services/mac-bridge/codex-types/WebSearchEndEvent.ts +0 -6
- package/services/mac-bridge/codex-types/WebSearchItem.ts +0 -6
- package/services/mac-bridge/codex-types/WebSearchMode.ts +0 -5
- package/services/mac-bridge/codex-types/index.ts +0 -234
- package/services/mac-bridge/codex-types/serde_json/JsonValue.ts +0 -5
- package/services/mac-bridge/codex-types/v2/Account.ts +0 -6
- package/services/mac-bridge/codex-types/v2/AccountLoginCompletedNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/AccountRateLimitsUpdatedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/AccountUpdatedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/AgentMessageDeltaNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/AnalyticsConfig.ts +0 -6
- package/services/mac-bridge/codex-types/v2/AppBranding.ts +0 -8
- package/services/mac-bridge/codex-types/v2/AppDisabledReason.ts +0 -5
- package/services/mac-bridge/codex-types/v2/AppInfo.ts +0 -19
- package/services/mac-bridge/codex-types/v2/AppListUpdatedNotification.ts +0 -9
- package/services/mac-bridge/codex-types/v2/AppMetadata.ts +0 -7
- package/services/mac-bridge/codex-types/v2/AppReview.ts +0 -5
- package/services/mac-bridge/codex-types/v2/AppScreenshot.ts +0 -5
- package/services/mac-bridge/codex-types/v2/AppsConfig.ts +0 -6
- package/services/mac-bridge/codex-types/v2/AppsListParams.ts +0 -24
- package/services/mac-bridge/codex-types/v2/AppsListResponse.ts +0 -14
- package/services/mac-bridge/codex-types/v2/AskForApproval.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ByteRange.ts +0 -5
- package/services/mac-bridge/codex-types/v2/CancelLoginAccountParams.ts +0 -5
- package/services/mac-bridge/codex-types/v2/CancelLoginAccountResponse.ts +0 -6
- package/services/mac-bridge/codex-types/v2/CancelLoginAccountStatus.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ChatgptAuthTokensRefreshParams.ts +0 -16
- package/services/mac-bridge/codex-types/v2/ChatgptAuthTokensRefreshReason.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ChatgptAuthTokensRefreshResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/CodexErrorInfo.ts +0 -11
- package/services/mac-bridge/codex-types/v2/CollabAgentState.ts +0 -6
- package/services/mac-bridge/codex-types/v2/CollabAgentStatus.ts +0 -5
- package/services/mac-bridge/codex-types/v2/CollabAgentTool.ts +0 -5
- package/services/mac-bridge/codex-types/v2/CollabAgentToolCallStatus.ts +0 -5
- package/services/mac-bridge/codex-types/v2/CommandAction.ts +0 -5
- package/services/mac-bridge/codex-types/v2/CommandExecParams.ts +0 -6
- package/services/mac-bridge/codex-types/v2/CommandExecResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/CommandExecutionApprovalDecision.ts +0 -6
- package/services/mac-bridge/codex-types/v2/CommandExecutionOutputDeltaNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/CommandExecutionRequestApprovalParams.ts +0 -37
- package/services/mac-bridge/codex-types/v2/CommandExecutionRequestApprovalResponse.ts +0 -6
- package/services/mac-bridge/codex-types/v2/CommandExecutionStatus.ts +0 -5
- package/services/mac-bridge/codex-types/v2/Config.ts +0 -17
- package/services/mac-bridge/codex-types/v2/ConfigBatchWriteParams.ts +0 -10
- package/services/mac-bridge/codex-types/v2/ConfigEdit.ts +0 -7
- package/services/mac-bridge/codex-types/v2/ConfigLayer.ts +0 -7
- package/services/mac-bridge/codex-types/v2/ConfigLayerMetadata.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ConfigLayerSource.ts +0 -16
- package/services/mac-bridge/codex-types/v2/ConfigReadParams.ts +0 -11
- package/services/mac-bridge/codex-types/v2/ConfigReadResponse.ts +0 -8
- package/services/mac-bridge/codex-types/v2/ConfigRequirements.ts +0 -9
- package/services/mac-bridge/codex-types/v2/ConfigRequirementsReadResponse.ts +0 -10
- package/services/mac-bridge/codex-types/v2/ConfigValueWriteParams.ts +0 -11
- package/services/mac-bridge/codex-types/v2/ConfigWarningNotification.ts +0 -22
- package/services/mac-bridge/codex-types/v2/ConfigWriteResponse.ts +0 -12
- package/services/mac-bridge/codex-types/v2/ContextCompactedNotification.ts +0 -8
- package/services/mac-bridge/codex-types/v2/CreditsSnapshot.ts +0 -5
- package/services/mac-bridge/codex-types/v2/DeprecationNoticeNotification.ts +0 -13
- package/services/mac-bridge/codex-types/v2/DynamicToolCallOutputContentItem.ts +0 -5
- package/services/mac-bridge/codex-types/v2/DynamicToolCallParams.ts +0 -6
- package/services/mac-bridge/codex-types/v2/DynamicToolCallResponse.ts +0 -6
- package/services/mac-bridge/codex-types/v2/DynamicToolSpec.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ErrorNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ExecPolicyAmendment.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ExperimentalFeature.ts +0 -37
- package/services/mac-bridge/codex-types/v2/ExperimentalFeatureListParams.ts +0 -13
- package/services/mac-bridge/codex-types/v2/ExperimentalFeatureListResponse.ts +0 -11
- package/services/mac-bridge/codex-types/v2/ExperimentalFeatureStage.ts +0 -5
- package/services/mac-bridge/codex-types/v2/FeedbackUploadParams.ts +0 -5
- package/services/mac-bridge/codex-types/v2/FeedbackUploadResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/FileChangeApprovalDecision.ts +0 -5
- package/services/mac-bridge/codex-types/v2/FileChangeOutputDeltaNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/FileChangeRequestApprovalParams.ts +0 -14
- package/services/mac-bridge/codex-types/v2/FileChangeRequestApprovalResponse.ts +0 -6
- package/services/mac-bridge/codex-types/v2/FileUpdateChange.ts +0 -6
- package/services/mac-bridge/codex-types/v2/GetAccountParams.ts +0 -13
- package/services/mac-bridge/codex-types/v2/GetAccountRateLimitsResponse.ts +0 -14
- package/services/mac-bridge/codex-types/v2/GetAccountResponse.ts +0 -6
- package/services/mac-bridge/codex-types/v2/GitInfo.ts +0 -5
- package/services/mac-bridge/codex-types/v2/HazelnutScope.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ItemCompletedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ItemStartedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ListMcpServerStatusParams.ts +0 -13
- package/services/mac-bridge/codex-types/v2/ListMcpServerStatusResponse.ts +0 -11
- package/services/mac-bridge/codex-types/v2/LoginAccountParams.ts +0 -21
- package/services/mac-bridge/codex-types/v2/LoginAccountResponse.ts +0 -9
- package/services/mac-bridge/codex-types/v2/LogoutAccountResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/McpAuthStatus.ts +0 -5
- package/services/mac-bridge/codex-types/v2/McpServerOauthLoginCompletedNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/McpServerOauthLoginParams.ts +0 -5
- package/services/mac-bridge/codex-types/v2/McpServerOauthLoginResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/McpServerRefreshResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/McpServerStatus.ts +0 -9
- package/services/mac-bridge/codex-types/v2/McpToolCallError.ts +0 -5
- package/services/mac-bridge/codex-types/v2/McpToolCallProgressNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/McpToolCallResult.ts +0 -6
- package/services/mac-bridge/codex-types/v2/McpToolCallStatus.ts +0 -5
- package/services/mac-bridge/codex-types/v2/MergeStrategy.ts +0 -5
- package/services/mac-bridge/codex-types/v2/Model.ts +0 -8
- package/services/mac-bridge/codex-types/v2/ModelListParams.ts +0 -17
- package/services/mac-bridge/codex-types/v2/ModelListResponse.ts +0 -11
- package/services/mac-bridge/codex-types/v2/ModelRerouteReason.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ModelReroutedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/NetworkAccess.ts +0 -5
- package/services/mac-bridge/codex-types/v2/NetworkRequirements.ts +0 -5
- package/services/mac-bridge/codex-types/v2/OverriddenMetadata.ts +0 -7
- package/services/mac-bridge/codex-types/v2/PatchApplyStatus.ts +0 -5
- package/services/mac-bridge/codex-types/v2/PatchChangeKind.ts +0 -5
- package/services/mac-bridge/codex-types/v2/PlanDeltaNotification.ts +0 -9
- package/services/mac-bridge/codex-types/v2/ProductSurface.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ProfileV2.ts +0 -11
- package/services/mac-bridge/codex-types/v2/RateLimitSnapshot.ts +0 -8
- package/services/mac-bridge/codex-types/v2/RateLimitWindow.ts +0 -5
- package/services/mac-bridge/codex-types/v2/RawResponseItemCompletedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ReadOnlyAccess.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ReasoningEffortOption.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ReasoningSummaryPartAddedNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ReasoningSummaryTextDeltaNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ReasoningTextDeltaNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/RemoteSkillSummary.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ResidencyRequirement.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ReviewDelivery.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ReviewStartParams.ts +0 -12
- package/services/mac-bridge/codex-types/v2/ReviewStartResponse.ts +0 -13
- package/services/mac-bridge/codex-types/v2/ReviewTarget.ts +0 -9
- package/services/mac-bridge/codex-types/v2/SandboxMode.ts +0 -5
- package/services/mac-bridge/codex-types/v2/SandboxPolicy.ts +0 -8
- package/services/mac-bridge/codex-types/v2/SandboxWorkspaceWrite.ts +0 -5
- package/services/mac-bridge/codex-types/v2/SessionSource.ts +0 -6
- package/services/mac-bridge/codex-types/v2/SkillDependencies.ts +0 -6
- package/services/mac-bridge/codex-types/v2/SkillErrorInfo.ts +0 -5
- package/services/mac-bridge/codex-types/v2/SkillInterface.ts +0 -5
- package/services/mac-bridge/codex-types/v2/SkillMetadata.ts +0 -12
- package/services/mac-bridge/codex-types/v2/SkillScope.ts +0 -5
- package/services/mac-bridge/codex-types/v2/SkillToolDependency.ts +0 -5
- package/services/mac-bridge/codex-types/v2/SkillsConfigWriteParams.ts +0 -5
- package/services/mac-bridge/codex-types/v2/SkillsConfigWriteResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/SkillsListEntry.ts +0 -7
- package/services/mac-bridge/codex-types/v2/SkillsListExtraRootsForCwd.ts +0 -5
- package/services/mac-bridge/codex-types/v2/SkillsListParams.ts +0 -18
- package/services/mac-bridge/codex-types/v2/SkillsListResponse.ts +0 -6
- package/services/mac-bridge/codex-types/v2/SkillsRemoteReadParams.ts +0 -7
- package/services/mac-bridge/codex-types/v2/SkillsRemoteReadResponse.ts +0 -6
- package/services/mac-bridge/codex-types/v2/SkillsRemoteWriteParams.ts +0 -5
- package/services/mac-bridge/codex-types/v2/SkillsRemoteWriteResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/TerminalInteractionNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/TextElement.ts +0 -14
- package/services/mac-bridge/codex-types/v2/TextPosition.ts +0 -13
- package/services/mac-bridge/codex-types/v2/TextRange.ts +0 -6
- package/services/mac-bridge/codex-types/v2/Thread.ts +0 -51
- package/services/mac-bridge/codex-types/v2/ThreadArchiveParams.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ThreadArchiveResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ThreadArchivedNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ThreadCompactStartParams.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ThreadCompactStartResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ThreadForkParams.ts +0 -28
- package/services/mac-bridge/codex-types/v2/ThreadForkResponse.ts +0 -9
- package/services/mac-bridge/codex-types/v2/ThreadItem.ts +0 -81
- package/services/mac-bridge/codex-types/v2/ThreadListParams.ts +0 -39
- package/services/mac-bridge/codex-types/v2/ThreadListResponse.ts +0 -11
- package/services/mac-bridge/codex-types/v2/ThreadLoadedListParams.ts +0 -13
- package/services/mac-bridge/codex-types/v2/ThreadLoadedListResponse.ts +0 -14
- package/services/mac-bridge/codex-types/v2/ThreadNameUpdatedNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ThreadReadParams.ts +0 -9
- package/services/mac-bridge/codex-types/v2/ThreadReadResponse.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ThreadResumeParams.ts +0 -37
- package/services/mac-bridge/codex-types/v2/ThreadResumeResponse.ts +0 -9
- package/services/mac-bridge/codex-types/v2/ThreadRollbackParams.ts +0 -12
- package/services/mac-bridge/codex-types/v2/ThreadRollbackResponse.ts +0 -14
- package/services/mac-bridge/codex-types/v2/ThreadSetNameParams.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ThreadSetNameResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ThreadSortKey.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ThreadSourceKind.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ThreadStartParams.ts +0 -17
- package/services/mac-bridge/codex-types/v2/ThreadStartResponse.ts +0 -9
- package/services/mac-bridge/codex-types/v2/ThreadStartedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ThreadTokenUsage.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ThreadTokenUsageUpdatedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ThreadUnarchiveParams.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ThreadUnarchiveResponse.ts +0 -6
- package/services/mac-bridge/codex-types/v2/ThreadUnarchivedNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/TokenUsageBreakdown.ts +0 -5
- package/services/mac-bridge/codex-types/v2/ToolRequestUserInputAnswer.ts +0 -8
- package/services/mac-bridge/codex-types/v2/ToolRequestUserInputOption.ts +0 -8
- package/services/mac-bridge/codex-types/v2/ToolRequestUserInputParams.ts +0 -9
- package/services/mac-bridge/codex-types/v2/ToolRequestUserInputQuestion.ts +0 -9
- package/services/mac-bridge/codex-types/v2/ToolRequestUserInputResponse.ts +0 -9
- package/services/mac-bridge/codex-types/v2/ToolsV2.ts +0 -5
- package/services/mac-bridge/codex-types/v2/Turn.ts +0 -18
- package/services/mac-bridge/codex-types/v2/TurnCompletedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/TurnDiffUpdatedNotification.ts +0 -9
- package/services/mac-bridge/codex-types/v2/TurnError.ts +0 -6
- package/services/mac-bridge/codex-types/v2/TurnInterruptParams.ts +0 -5
- package/services/mac-bridge/codex-types/v2/TurnInterruptResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/TurnPlanStep.ts +0 -6
- package/services/mac-bridge/codex-types/v2/TurnPlanStepStatus.ts +0 -5
- package/services/mac-bridge/codex-types/v2/TurnPlanUpdatedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/TurnStartParams.ts +0 -44
- package/services/mac-bridge/codex-types/v2/TurnStartResponse.ts +0 -6
- package/services/mac-bridge/codex-types/v2/TurnStartedNotification.ts +0 -6
- package/services/mac-bridge/codex-types/v2/TurnStatus.ts +0 -5
- package/services/mac-bridge/codex-types/v2/TurnSteerParams.ts +0 -11
- package/services/mac-bridge/codex-types/v2/TurnSteerResponse.ts +0 -5
- package/services/mac-bridge/codex-types/v2/UserInput.ts +0 -10
- package/services/mac-bridge/codex-types/v2/WebSearchAction.ts +0 -5
- package/services/mac-bridge/codex-types/v2/WindowsWorldWritableWarningNotification.ts +0 -5
- package/services/mac-bridge/codex-types/v2/WriteStatus.ts +0 -5
- package/services/mac-bridge/codex-types/v2/index.ts +0 -204
- package/services/mac-bridge/eslint.config.cjs +0 -22
- package/services/mac-bridge/package.json +0 -30
- package/services/mac-bridge/schema.ts +0 -0
- package/services/mac-bridge/src/index.ts +0 -18
- package/services/mac-bridge/src/server.ts +0 -426
- package/services/mac-bridge/src/services/__tests__/gitService.test.ts +0 -157
- package/services/mac-bridge/src/services/__tests__/realtimeHub.test.ts +0 -116
- package/services/mac-bridge/src/services/__tests__/terminalService.test.ts +0 -51
- package/services/mac-bridge/src/services/codexAppServerClient.ts +0 -507
- package/services/mac-bridge/src/services/codexCliAdapter.ts +0 -622
- package/services/mac-bridge/src/services/gitService.ts +0 -61
- package/services/mac-bridge/src/services/realtimeHub.ts +0 -25
- package/services/mac-bridge/src/services/terminalService.ts +0 -226
- package/services/mac-bridge/src/types.ts +0 -151
- package/services/mac-bridge/src/utils/__tests__/threadMapping.test.ts +0 -397
- package/services/mac-bridge/src/utils/threadMapping.ts +0 -176
- package/services/mac-bridge/tsconfig.json +0 -16
- package/services/mac-bridge/vitest.config.ts +0 -9
- package/services/rust-bridge/.env.example +0 -14
- package/services/rust-bridge/package.json +0 -13
- package/services/rust-bridge/security_best_practices_report.md +0 -24
- package/site/index.html +0 -54
- package/site/privacy/index.html +0 -80
- package/site/styles.css +0 -135
- package/site/support/index.html +0 -51
- package/site/terms/index.html +0 -68
- package/tsconfig.json +0 -4
|
@@ -1,457 +0,0 @@
|
|
|
1
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
-
import { useEffect, useState, type ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
ActivityIndicator,
|
|
5
|
-
type NativeSyntheticEvent,
|
|
6
|
-
Platform,
|
|
7
|
-
Pressable,
|
|
8
|
-
ScrollView,
|
|
9
|
-
StyleSheet,
|
|
10
|
-
Text,
|
|
11
|
-
TextInput,
|
|
12
|
-
type TextLayoutEventData,
|
|
13
|
-
type TextInputKeyPressEventData,
|
|
14
|
-
View,
|
|
15
|
-
} from 'react-native';
|
|
16
|
-
|
|
17
|
-
import type { VoiceState } from '../hooks/useVoiceRecorder';
|
|
18
|
-
import { resolveComposerBottomSpacing } from './chat-input-layout';
|
|
19
|
-
import { VoiceRecordingWaveform } from './VoiceRecordingWaveform';
|
|
20
|
-
import { colors, radius, spacing } from '../theme';
|
|
21
|
-
|
|
22
|
-
interface ChatInputProps {
|
|
23
|
-
value: string;
|
|
24
|
-
onChangeText: (text: string) => void;
|
|
25
|
-
onFocus?: () => void;
|
|
26
|
-
onSubmit: () => void;
|
|
27
|
-
onStop?: () => void;
|
|
28
|
-
onAttachPress: () => void;
|
|
29
|
-
attachDisabled?: boolean;
|
|
30
|
-
attachments?: Array<{ id: string; label: string }>;
|
|
31
|
-
onRemoveAttachment?: (id: string) => void;
|
|
32
|
-
isLoading: boolean;
|
|
33
|
-
showStopButton?: boolean;
|
|
34
|
-
isStopping?: boolean;
|
|
35
|
-
placeholder?: string;
|
|
36
|
-
onVoiceToggle?: () => void;
|
|
37
|
-
voiceState?: VoiceState;
|
|
38
|
-
voiceRecordingDurationMillis?: number;
|
|
39
|
-
voiceMetering?: number | null;
|
|
40
|
-
safeAreaBottomInset?: number;
|
|
41
|
-
keyboardVisible?: boolean;
|
|
42
|
-
footer?: ReactNode;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function ChatInput({
|
|
46
|
-
value,
|
|
47
|
-
onChangeText,
|
|
48
|
-
onFocus,
|
|
49
|
-
onSubmit,
|
|
50
|
-
onStop,
|
|
51
|
-
onAttachPress,
|
|
52
|
-
attachDisabled = false,
|
|
53
|
-
attachments = [],
|
|
54
|
-
onRemoveAttachment,
|
|
55
|
-
isLoading,
|
|
56
|
-
showStopButton = false,
|
|
57
|
-
isStopping = false,
|
|
58
|
-
placeholder = 'Message Codex...',
|
|
59
|
-
onVoiceToggle,
|
|
60
|
-
voiceState = 'idle',
|
|
61
|
-
voiceRecordingDurationMillis = 0,
|
|
62
|
-
voiceMetering = null,
|
|
63
|
-
safeAreaBottomInset = 0,
|
|
64
|
-
keyboardVisible = false,
|
|
65
|
-
footer = null,
|
|
66
|
-
}: ChatInputProps) {
|
|
67
|
-
const INPUT_TEXT_LINE_HEIGHT = 20;
|
|
68
|
-
const INPUT_TEXT_VERTICAL_PADDING = Platform.OS === 'ios' ? 2 : 0;
|
|
69
|
-
const INPUT_TEXT_MIN_HEIGHT = 20;
|
|
70
|
-
const INPUT_TEXT_MAX_HEIGHT = 96;
|
|
71
|
-
const [inputHeight, setInputHeight] = useState(INPUT_TEXT_MIN_HEIGHT);
|
|
72
|
-
const [inputWidth, setInputWidth] = useState(0);
|
|
73
|
-
const updateInputHeight = (height: number) => {
|
|
74
|
-
const nextHeight = Math.max(
|
|
75
|
-
INPUT_TEXT_MIN_HEIGHT,
|
|
76
|
-
Math.min(INPUT_TEXT_MAX_HEIGHT, Math.ceil(height))
|
|
77
|
-
);
|
|
78
|
-
setInputHeight((previousHeight) =>
|
|
79
|
-
previousHeight === nextHeight ? previousHeight : nextHeight
|
|
80
|
-
);
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
useEffect(() => {
|
|
84
|
-
if (!value && inputHeight !== INPUT_TEXT_MIN_HEIGHT) {
|
|
85
|
-
setInputHeight(INPUT_TEXT_MIN_HEIGHT);
|
|
86
|
-
}
|
|
87
|
-
}, [inputHeight, value]);
|
|
88
|
-
|
|
89
|
-
const canSend = value.trim().length > 0 && voiceState === 'idle';
|
|
90
|
-
const canStop = Boolean(showStopButton && onStop);
|
|
91
|
-
const showVoiceButton = Boolean(onVoiceToggle);
|
|
92
|
-
const showSendButton = canSend || isLoading;
|
|
93
|
-
const inputScrollEnabled = inputHeight >= INPUT_TEXT_MAX_HEIGHT;
|
|
94
|
-
const showVoiceRecordingUi = voiceState === 'recording';
|
|
95
|
-
const showVoiceTranscribingUi = voiceState === 'transcribing';
|
|
96
|
-
const showVoiceStatusUi = showVoiceRecordingUi || showVoiceTranscribingUi;
|
|
97
|
-
const shouldShowActionButton =
|
|
98
|
-
canStop || showSendButton || showVoiceButton || voiceState !== 'idle';
|
|
99
|
-
const composerBottomSpacing = resolveComposerBottomSpacing(
|
|
100
|
-
Platform.OS,
|
|
101
|
-
safeAreaBottomInset,
|
|
102
|
-
keyboardVisible
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
return (
|
|
106
|
-
<View style={styles.shell}>
|
|
107
|
-
<View
|
|
108
|
-
style={[
|
|
109
|
-
styles.container,
|
|
110
|
-
{
|
|
111
|
-
paddingBottom: composerBottomSpacing.totalBottomPadding,
|
|
112
|
-
},
|
|
113
|
-
]}
|
|
114
|
-
>
|
|
115
|
-
{attachments.length > 0 ? (
|
|
116
|
-
<ScrollView
|
|
117
|
-
horizontal
|
|
118
|
-
showsHorizontalScrollIndicator={false}
|
|
119
|
-
contentContainerStyle={styles.attachmentListContent}
|
|
120
|
-
style={styles.attachmentList}
|
|
121
|
-
>
|
|
122
|
-
{attachments.map((attachment, index) => (
|
|
123
|
-
<Pressable
|
|
124
|
-
key={`${attachment.id}-${String(index)}`}
|
|
125
|
-
onPress={
|
|
126
|
-
onRemoveAttachment
|
|
127
|
-
? () => onRemoveAttachment(attachment.id)
|
|
128
|
-
: undefined
|
|
129
|
-
}
|
|
130
|
-
style={({ pressed }) => [
|
|
131
|
-
styles.attachmentChip,
|
|
132
|
-
pressed && styles.attachmentChipPressed,
|
|
133
|
-
]}
|
|
134
|
-
>
|
|
135
|
-
<Ionicons name="attach-outline" size={12} color={colors.textMuted} />
|
|
136
|
-
<Text style={styles.attachmentChipText} numberOfLines={1}>
|
|
137
|
-
{attachment.label}
|
|
138
|
-
</Text>
|
|
139
|
-
{onRemoveAttachment ? (
|
|
140
|
-
<Ionicons name="close-outline" size={12} color={colors.textMuted} />
|
|
141
|
-
) : null}
|
|
142
|
-
</Pressable>
|
|
143
|
-
))}
|
|
144
|
-
</ScrollView>
|
|
145
|
-
) : null}
|
|
146
|
-
|
|
147
|
-
<View style={styles.row}>
|
|
148
|
-
<Pressable
|
|
149
|
-
disabled={attachDisabled}
|
|
150
|
-
onPress={onAttachPress}
|
|
151
|
-
style={({ pressed }) => [
|
|
152
|
-
styles.plusBtn,
|
|
153
|
-
attachDisabled && styles.plusBtnDisabled,
|
|
154
|
-
pressed && !attachDisabled && styles.plusBtnPressed,
|
|
155
|
-
]}
|
|
156
|
-
>
|
|
157
|
-
<Ionicons name="add" size={20} color={colors.textMuted} />
|
|
158
|
-
</Pressable>
|
|
159
|
-
|
|
160
|
-
<View
|
|
161
|
-
style={[
|
|
162
|
-
styles.inputWrapper,
|
|
163
|
-
showVoiceStatusUi && styles.inputWrapperVoiceActive,
|
|
164
|
-
]}
|
|
165
|
-
>
|
|
166
|
-
{showVoiceStatusUi ? (
|
|
167
|
-
showVoiceRecordingUi ? (
|
|
168
|
-
<VoiceRecordingWaveform
|
|
169
|
-
durationMillis={voiceRecordingDurationMillis}
|
|
170
|
-
metering={voiceMetering}
|
|
171
|
-
/>
|
|
172
|
-
) : (
|
|
173
|
-
<View
|
|
174
|
-
accessible
|
|
175
|
-
accessibilityLabel="Transcribing recorded audio into text"
|
|
176
|
-
style={styles.voiceStatusContent}
|
|
177
|
-
>
|
|
178
|
-
<View style={styles.voiceStatusLabelRow}>
|
|
179
|
-
<View style={[styles.voiceStatusDot, styles.voiceStatusDotBusy]} />
|
|
180
|
-
<Text style={styles.voiceStatusTitle}>Transcribing audio</Text>
|
|
181
|
-
</View>
|
|
182
|
-
<Text style={styles.voiceStatusHint}>
|
|
183
|
-
Converting your latest recording into text.
|
|
184
|
-
</Text>
|
|
185
|
-
</View>
|
|
186
|
-
)
|
|
187
|
-
) : (
|
|
188
|
-
<>
|
|
189
|
-
<Text
|
|
190
|
-
pointerEvents="none"
|
|
191
|
-
accessibilityElementsHidden
|
|
192
|
-
importantForAccessibility="no-hide-descendants"
|
|
193
|
-
style={[
|
|
194
|
-
styles.inputMeasure,
|
|
195
|
-
{
|
|
196
|
-
width: inputWidth,
|
|
197
|
-
lineHeight: INPUT_TEXT_LINE_HEIGHT,
|
|
198
|
-
paddingVertical: INPUT_TEXT_VERTICAL_PADDING,
|
|
199
|
-
},
|
|
200
|
-
]}
|
|
201
|
-
onTextLayout={(event: NativeSyntheticEvent<TextLayoutEventData>) => {
|
|
202
|
-
if (inputWidth <= 0) {
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
const lineCount = Math.max(1, event.nativeEvent.lines.length);
|
|
206
|
-
const measuredHeight =
|
|
207
|
-
lineCount * INPUT_TEXT_LINE_HEIGHT + INPUT_TEXT_VERTICAL_PADDING * 2;
|
|
208
|
-
updateInputHeight(measuredHeight);
|
|
209
|
-
}}
|
|
210
|
-
>
|
|
211
|
-
{value.length > 0 ? `${value}\u200b` : ' '}
|
|
212
|
-
</Text>
|
|
213
|
-
<TextInput
|
|
214
|
-
style={[styles.input, { height: inputHeight }]}
|
|
215
|
-
value={value}
|
|
216
|
-
onChangeText={onChangeText}
|
|
217
|
-
keyboardAppearance="dark"
|
|
218
|
-
onLayout={(event) => {
|
|
219
|
-
const nextWidth = Math.floor(event.nativeEvent.layout.width);
|
|
220
|
-
setInputWidth((previousWidth) =>
|
|
221
|
-
previousWidth === nextWidth ? previousWidth : nextWidth
|
|
222
|
-
);
|
|
223
|
-
}}
|
|
224
|
-
onFocus={onFocus}
|
|
225
|
-
placeholder={placeholder}
|
|
226
|
-
placeholderTextColor={colors.textMuted}
|
|
227
|
-
multiline
|
|
228
|
-
scrollEnabled={inputScrollEnabled}
|
|
229
|
-
onKeyPress={(e: NativeSyntheticEvent<TextInputKeyPressEventData>) => {
|
|
230
|
-
const keyEvent = e.nativeEvent as TextInputKeyPressEventData & {
|
|
231
|
-
shiftKey?: boolean;
|
|
232
|
-
};
|
|
233
|
-
if (
|
|
234
|
-
Platform.OS === 'web' &&
|
|
235
|
-
keyEvent.key === 'Enter' &&
|
|
236
|
-
!keyEvent.shiftKey
|
|
237
|
-
) {
|
|
238
|
-
e.preventDefault();
|
|
239
|
-
if (canSend) onSubmit();
|
|
240
|
-
}
|
|
241
|
-
}}
|
|
242
|
-
/>
|
|
243
|
-
</>
|
|
244
|
-
)}
|
|
245
|
-
{shouldShowActionButton ? (
|
|
246
|
-
<View style={styles.actionButtons}>
|
|
247
|
-
{showVoiceButton || voiceState !== 'idle' ? (
|
|
248
|
-
voiceState === 'transcribing' ? (
|
|
249
|
-
<View style={styles.sendBtn}>
|
|
250
|
-
<ActivityIndicator size="small" color={colors.textMuted} />
|
|
251
|
-
</View>
|
|
252
|
-
) : voiceState === 'recording' ? (
|
|
253
|
-
<Pressable
|
|
254
|
-
onPress={onVoiceToggle}
|
|
255
|
-
style={[styles.sendBtn, styles.micBtnRecording]}
|
|
256
|
-
>
|
|
257
|
-
<Ionicons name="mic" size={14} color={colors.error} />
|
|
258
|
-
</Pressable>
|
|
259
|
-
) : (
|
|
260
|
-
<Pressable
|
|
261
|
-
onPress={onVoiceToggle}
|
|
262
|
-
style={styles.sendBtn}
|
|
263
|
-
>
|
|
264
|
-
<Ionicons name="mic-outline" size={14} color={colors.textMuted} />
|
|
265
|
-
</Pressable>
|
|
266
|
-
)
|
|
267
|
-
) : null}
|
|
268
|
-
{canStop ? (
|
|
269
|
-
<Pressable
|
|
270
|
-
onPress={onStop}
|
|
271
|
-
style={styles.sendBtn}
|
|
272
|
-
disabled={isStopping}
|
|
273
|
-
>
|
|
274
|
-
<View style={styles.stopButtonContent}>
|
|
275
|
-
<Ionicons name="square" size={10} color={colors.textPrimary} />
|
|
276
|
-
<ActivityIndicator
|
|
277
|
-
size="small"
|
|
278
|
-
color={colors.textMuted}
|
|
279
|
-
style={styles.stopButtonSpinner}
|
|
280
|
-
/>
|
|
281
|
-
</View>
|
|
282
|
-
</Pressable>
|
|
283
|
-
) : null}
|
|
284
|
-
{showSendButton ? (
|
|
285
|
-
<Pressable
|
|
286
|
-
onPress={canSend ? onSubmit : undefined}
|
|
287
|
-
style={styles.sendBtn}
|
|
288
|
-
disabled={!canSend}
|
|
289
|
-
>
|
|
290
|
-
{isLoading && !canSend ? (
|
|
291
|
-
<ActivityIndicator size="small" color={colors.textMuted} />
|
|
292
|
-
) : (
|
|
293
|
-
<Ionicons name="arrow-up" size={14} color={colors.textPrimary} />
|
|
294
|
-
)}
|
|
295
|
-
</Pressable>
|
|
296
|
-
) : null}
|
|
297
|
-
</View>
|
|
298
|
-
) : null}
|
|
299
|
-
</View>
|
|
300
|
-
</View>
|
|
301
|
-
{footer ? <View style={styles.footer}>{footer}</View> : null}
|
|
302
|
-
</View>
|
|
303
|
-
</View>
|
|
304
|
-
);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
const styles = StyleSheet.create({
|
|
308
|
-
shell: {
|
|
309
|
-
overflow: 'hidden',
|
|
310
|
-
},
|
|
311
|
-
container: {
|
|
312
|
-
gap: spacing.xs,
|
|
313
|
-
paddingHorizontal: spacing.lg,
|
|
314
|
-
paddingTop: spacing.sm,
|
|
315
|
-
},
|
|
316
|
-
row: {
|
|
317
|
-
flexDirection: 'row',
|
|
318
|
-
alignItems: 'center',
|
|
319
|
-
gap: spacing.sm,
|
|
320
|
-
},
|
|
321
|
-
footer: {
|
|
322
|
-
alignItems: 'flex-start',
|
|
323
|
-
marginTop: 2,
|
|
324
|
-
},
|
|
325
|
-
attachmentList: {
|
|
326
|
-
maxHeight: 34,
|
|
327
|
-
},
|
|
328
|
-
attachmentListContent: {
|
|
329
|
-
gap: spacing.xs,
|
|
330
|
-
paddingRight: spacing.sm,
|
|
331
|
-
},
|
|
332
|
-
attachmentChip: {
|
|
333
|
-
height: 28,
|
|
334
|
-
borderRadius: 14,
|
|
335
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
336
|
-
borderColor: colors.borderHighlight,
|
|
337
|
-
backgroundColor: colors.bgInput,
|
|
338
|
-
paddingHorizontal: spacing.sm,
|
|
339
|
-
alignItems: 'center',
|
|
340
|
-
flexDirection: 'row',
|
|
341
|
-
gap: spacing.xs,
|
|
342
|
-
maxWidth: 260,
|
|
343
|
-
},
|
|
344
|
-
attachmentChipPressed: {
|
|
345
|
-
backgroundColor: colors.bgItem,
|
|
346
|
-
},
|
|
347
|
-
attachmentChipText: {
|
|
348
|
-
color: colors.textSecondary,
|
|
349
|
-
fontSize: 12,
|
|
350
|
-
flexShrink: 1,
|
|
351
|
-
},
|
|
352
|
-
plusBtn: {
|
|
353
|
-
width: 36,
|
|
354
|
-
height: 36,
|
|
355
|
-
borderRadius: 18,
|
|
356
|
-
borderWidth: 1,
|
|
357
|
-
borderColor: colors.border,
|
|
358
|
-
alignItems: 'center',
|
|
359
|
-
justifyContent: 'center',
|
|
360
|
-
},
|
|
361
|
-
plusBtnPressed: {
|
|
362
|
-
backgroundColor: colors.bgItem,
|
|
363
|
-
},
|
|
364
|
-
plusBtnDisabled: {
|
|
365
|
-
opacity: 0.45,
|
|
366
|
-
},
|
|
367
|
-
inputWrapper: {
|
|
368
|
-
flex: 1,
|
|
369
|
-
flexDirection: 'row',
|
|
370
|
-
alignItems: 'center',
|
|
371
|
-
backgroundColor: colors.bgInput,
|
|
372
|
-
borderWidth: 1,
|
|
373
|
-
borderColor: colors.borderHighlight,
|
|
374
|
-
borderRadius: radius.lg,
|
|
375
|
-
paddingHorizontal: spacing.md,
|
|
376
|
-
paddingVertical: spacing.xs,
|
|
377
|
-
minHeight: 40,
|
|
378
|
-
maxHeight: 120,
|
|
379
|
-
},
|
|
380
|
-
inputWrapperVoiceActive: {
|
|
381
|
-
minHeight: 58,
|
|
382
|
-
paddingVertical: spacing.sm,
|
|
383
|
-
},
|
|
384
|
-
input: {
|
|
385
|
-
flex: 1,
|
|
386
|
-
color: colors.textPrimary,
|
|
387
|
-
fontSize: 14,
|
|
388
|
-
lineHeight: 20,
|
|
389
|
-
paddingVertical: Platform.OS === 'ios' ? 2 : 0,
|
|
390
|
-
textAlignVertical: 'top',
|
|
391
|
-
},
|
|
392
|
-
inputMeasure: {
|
|
393
|
-
position: 'absolute',
|
|
394
|
-
opacity: 0,
|
|
395
|
-
color: colors.textPrimary,
|
|
396
|
-
fontSize: 14,
|
|
397
|
-
left: spacing.md,
|
|
398
|
-
top: spacing.xs,
|
|
399
|
-
},
|
|
400
|
-
voiceStatusContent: {
|
|
401
|
-
flex: 1,
|
|
402
|
-
gap: 2,
|
|
403
|
-
justifyContent: 'center',
|
|
404
|
-
minHeight: 40,
|
|
405
|
-
},
|
|
406
|
-
voiceStatusLabelRow: {
|
|
407
|
-
alignItems: 'center',
|
|
408
|
-
flexDirection: 'row',
|
|
409
|
-
gap: spacing.xs,
|
|
410
|
-
},
|
|
411
|
-
voiceStatusDot: {
|
|
412
|
-
backgroundColor: colors.error,
|
|
413
|
-
borderRadius: 4,
|
|
414
|
-
height: 8,
|
|
415
|
-
width: 8,
|
|
416
|
-
},
|
|
417
|
-
voiceStatusDotBusy: {
|
|
418
|
-
opacity: 0.82,
|
|
419
|
-
},
|
|
420
|
-
voiceStatusTitle: {
|
|
421
|
-
color: colors.textPrimary,
|
|
422
|
-
fontSize: 13,
|
|
423
|
-
fontWeight: '600',
|
|
424
|
-
},
|
|
425
|
-
voiceStatusHint: {
|
|
426
|
-
color: colors.textMuted,
|
|
427
|
-
fontSize: 12,
|
|
428
|
-
lineHeight: 16,
|
|
429
|
-
},
|
|
430
|
-
actionButtons: {
|
|
431
|
-
flexDirection: 'row',
|
|
432
|
-
alignItems: 'center',
|
|
433
|
-
marginLeft: spacing.xs,
|
|
434
|
-
gap: spacing.xs,
|
|
435
|
-
},
|
|
436
|
-
sendBtn: {
|
|
437
|
-
width: 28,
|
|
438
|
-
height: 28,
|
|
439
|
-
borderRadius: 14,
|
|
440
|
-
backgroundColor: colors.bgItem,
|
|
441
|
-
alignItems: 'center',
|
|
442
|
-
justifyContent: 'center',
|
|
443
|
-
},
|
|
444
|
-
micBtnRecording: {
|
|
445
|
-
borderWidth: 1.5,
|
|
446
|
-
borderColor: colors.error,
|
|
447
|
-
},
|
|
448
|
-
stopButtonContent: {
|
|
449
|
-
width: 20,
|
|
450
|
-
height: 20,
|
|
451
|
-
alignItems: 'center',
|
|
452
|
-
justifyContent: 'center',
|
|
453
|
-
},
|
|
454
|
-
stopButtonSpinner: {
|
|
455
|
-
position: 'absolute',
|
|
456
|
-
},
|
|
457
|
-
});
|