nastech-app 1.0.0
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/.claude/agents/i18n-translator.md +119 -0
- package/.claude/settings.json +8 -0
- package/.eas/workflows/ota.yaml +9 -0
- package/.eas/workflows/preview.yaml +12 -0
- package/.easignore +12 -0
- package/.github/workflows/eas-build.yml +24 -0
- package/CHANGELOG.md +117 -0
- package/CLAUDE.md +413 -0
- package/GoogleService-Info.plist +30 -0
- package/LICENSE +21 -0
- package/NasTechapp.md +383 -0
- package/README.md +75 -0
- package/Stores.md +85 -0
- package/TERMS.md +83 -0
- package/app.config.js +153 -0
- package/babel.config.js +28 -0
- package/deploy/nastech-app.yaml +51 -0
- package/docs/marketing/README-creators.md +73 -0
- package/eas-build-post-install.sh +11 -0
- package/eas-build-pre-install.sh +27 -0
- package/eas.json +78 -0
- package/google-services.json +67 -0
- package/index.ts +3 -0
- package/logo.png +0 -0
- package/metro.config.js +54 -0
- package/nativewind-env.d.ts +1 -0
- package/package.json +233 -0
- package/patches/.keep +0 -0
- package/plugins/withEinkCompatibility.js +156 -0
- package/public/.well-known/apple-app-site-association +22 -0
- package/public/.well-known/assetlinks.json +12 -0
- package/public/canvaskit.wasm +0 -0
- package/public/favicon-active.ico +0 -0
- package/release-dev.sh +7 -0
- package/release-production.sh +3 -0
- package/release.cjs +160 -0
- package/sources/-session/SessionView.tsx +944 -0
- package/sources/-session/sessionOverlayNav.ts +34 -0
- package/sources/app/(app)/_layout.tsx +321 -0
- package/sources/app/(app)/artifacts/[id].tsx +279 -0
- package/sources/app/(app)/artifacts/edit/[id].tsx +318 -0
- package/sources/app/(app)/artifacts/index.tsx +264 -0
- package/sources/app/(app)/artifacts/new.tsx +219 -0
- package/sources/app/(app)/changelog.tsx +113 -0
- package/sources/app/(app)/dev/colors.tsx +197 -0
- package/sources/app/(app)/dev/device-info.tsx +183 -0
- package/sources/app/(app)/dev/expo-constants.tsx +394 -0
- package/sources/app/(app)/dev/index.tsx +400 -0
- package/sources/app/(app)/dev/input-styles.tsx +1951 -0
- package/sources/app/(app)/dev/inverted-list.tsx +295 -0
- package/sources/app/(app)/dev/list-demo.tsx +125 -0
- package/sources/app/(app)/dev/logs.tsx +160 -0
- package/sources/app/(app)/dev/messages-demo-data.ts +479 -0
- package/sources/app/(app)/dev/messages-demo.tsx +45 -0
- package/sources/app/(app)/dev/modal-demo.tsx +211 -0
- package/sources/app/(app)/dev/multi-text-input.tsx +224 -0
- package/sources/app/(app)/dev/purchases.tsx +228 -0
- package/sources/app/(app)/dev/qr-test.tsx +168 -0
- package/sources/app/(app)/dev/session-composer.tsx +812 -0
- package/sources/app/(app)/dev/shimmer-demo.tsx +275 -0
- package/sources/app/(app)/dev/tests.tsx +203 -0
- package/sources/app/(app)/dev/tools2.tsx +556 -0
- package/sources/app/(app)/dev/typography.tsx +177 -0
- package/sources/app/(app)/dev/unistyles-demo.tsx +376 -0
- package/sources/app/(app)/friends/index.tsx +167 -0
- package/sources/app/(app)/friends/search.tsx +232 -0
- package/sources/app/(app)/inbox/index.tsx +124 -0
- package/sources/app/(app)/index.tsx +264 -0
- package/sources/app/(app)/machine/[id].tsx +646 -0
- package/sources/app/(app)/new/index.tsx +1611 -0
- package/sources/app/(app)/restore/index.tsx +167 -0
- package/sources/app/(app)/restore/manual.tsx +138 -0
- package/sources/app/(app)/server.tsx +234 -0
- package/sources/app/(app)/session/[id]/file.tsx +527 -0
- package/sources/app/(app)/session/[id]/files.tsx +442 -0
- package/sources/app/(app)/session/[id]/info.tsx +655 -0
- package/sources/app/(app)/session/[id]/message/[messageId].tsx +125 -0
- package/sources/app/(app)/session/[id].tsx +10 -0
- package/sources/app/(app)/session/recent.tsx +270 -0
- package/sources/app/(app)/settings/account.tsx +600 -0
- package/sources/app/(app)/settings/agents.tsx +180 -0
- package/sources/app/(app)/settings/appearance.tsx +259 -0
- package/sources/app/(app)/settings/connect/claude.tsx +178 -0
- package/sources/app/(app)/settings/features.tsx +177 -0
- package/sources/app/(app)/settings/index.tsx +3 -0
- package/sources/app/(app)/settings/language.tsx +106 -0
- package/sources/app/(app)/settings/usage.tsx +11 -0
- package/sources/app/(app)/settings/voice/language.tsx +114 -0
- package/sources/app/(app)/settings/voice.tsx +274 -0
- package/sources/app/(app)/terminal/connect.tsx +241 -0
- package/sources/app/(app)/terminal/index.tsx +184 -0
- package/sources/app/(app)/text-selection.tsx +149 -0
- package/sources/app/(app)/user/[id].tsx +314 -0
- package/sources/app/+html.tsx +39 -0
- package/sources/app/_layout.tsx +402 -0
- package/sources/assets/animations/game.json +1 -0
- package/sources/assets/animations/owl.json +1 -0
- package/sources/assets/animations/popcorn.json +1 -0
- package/sources/assets/animations/robot.json +1 -0
- package/sources/assets/animations/sparkles.json +1 -0
- package/sources/assets/animations/stone.json +1 -0
- package/sources/assets/fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/sources/assets/fonts/IBMPlexMono-Italic.ttf +0 -0
- package/sources/assets/fonts/IBMPlexMono-Regular.ttf +0 -0
- package/sources/assets/fonts/IBMPlexMono-SemiBold.ttf +0 -0
- package/sources/assets/fonts/IBMPlexSans-Italic.ttf +0 -0
- package/sources/assets/fonts/IBMPlexSans-Regular.ttf +0 -0
- package/sources/assets/fonts/IBMPlexSans-SemiBold.ttf +0 -0
- package/sources/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/sources/assets/images/brutalist/Abstract-1.png +0 -0
- package/sources/assets/images/brutalist/Abstract-10.png +0 -0
- package/sources/assets/images/brutalist/Abstract-100.png +0 -0
- package/sources/assets/images/brutalist/Abstract-101.png +0 -0
- package/sources/assets/images/brutalist/Abstract-102.png +0 -0
- package/sources/assets/images/brutalist/Abstract-103.png +0 -0
- package/sources/assets/images/brutalist/Abstract-104.png +0 -0
- package/sources/assets/images/brutalist/Abstract-105.png +0 -0
- package/sources/assets/images/brutalist/Abstract-106.png +0 -0
- package/sources/assets/images/brutalist/Abstract-107.png +0 -0
- package/sources/assets/images/brutalist/Abstract-108.png +0 -0
- package/sources/assets/images/brutalist/Abstract-109.png +0 -0
- package/sources/assets/images/brutalist/Abstract-11.png +0 -0
- package/sources/assets/images/brutalist/Abstract-110.png +0 -0
- package/sources/assets/images/brutalist/Abstract-111.png +0 -0
- package/sources/assets/images/brutalist/Abstract-112.png +0 -0
- package/sources/assets/images/brutalist/Abstract-113.png +0 -0
- package/sources/assets/images/brutalist/Abstract-114.png +0 -0
- package/sources/assets/images/brutalist/Abstract-115.png +0 -0
- package/sources/assets/images/brutalist/Abstract-116.png +0 -0
- package/sources/assets/images/brutalist/Abstract-117.png +0 -0
- package/sources/assets/images/brutalist/Abstract-118.png +0 -0
- package/sources/assets/images/brutalist/Abstract-119.png +0 -0
- package/sources/assets/images/brutalist/Abstract-12.png +0 -0
- package/sources/assets/images/brutalist/Abstract-120.png +0 -0
- package/sources/assets/images/brutalist/Abstract-121.png +0 -0
- package/sources/assets/images/brutalist/Abstract-122.png +0 -0
- package/sources/assets/images/brutalist/Abstract-123.png +0 -0
- package/sources/assets/images/brutalist/Abstract-124.png +0 -0
- package/sources/assets/images/brutalist/Abstract-125.png +0 -0
- package/sources/assets/images/brutalist/Abstract-126.png +0 -0
- package/sources/assets/images/brutalist/Abstract-127.png +0 -0
- package/sources/assets/images/brutalist/Abstract-128.png +0 -0
- package/sources/assets/images/brutalist/Abstract-129.png +0 -0
- package/sources/assets/images/brutalist/Abstract-13.png +0 -0
- package/sources/assets/images/brutalist/Abstract-130.png +0 -0
- package/sources/assets/images/brutalist/Abstract-131.png +0 -0
- package/sources/assets/images/brutalist/Abstract-132.png +0 -0
- package/sources/assets/images/brutalist/Abstract-133.png +0 -0
- package/sources/assets/images/brutalist/Abstract-134.png +0 -0
- package/sources/assets/images/brutalist/Abstract-135.png +0 -0
- package/sources/assets/images/brutalist/Abstract-136.png +0 -0
- package/sources/assets/images/brutalist/Abstract-137.png +0 -0
- package/sources/assets/images/brutalist/Abstract-138.png +0 -0
- package/sources/assets/images/brutalist/Abstract-139.png +0 -0
- package/sources/assets/images/brutalist/Abstract-14.png +0 -0
- package/sources/assets/images/brutalist/Abstract-140.png +0 -0
- package/sources/assets/images/brutalist/Abstract-141.png +0 -0
- package/sources/assets/images/brutalist/Abstract-142.png +0 -0
- package/sources/assets/images/brutalist/Abstract-143.png +0 -0
- package/sources/assets/images/brutalist/Abstract-144.png +0 -0
- package/sources/assets/images/brutalist/Abstract-145.png +0 -0
- package/sources/assets/images/brutalist/Abstract-146.png +0 -0
- package/sources/assets/images/brutalist/Abstract-147.png +0 -0
- package/sources/assets/images/brutalist/Abstract-148.png +0 -0
- package/sources/assets/images/brutalist/Abstract-149.png +0 -0
- package/sources/assets/images/brutalist/Abstract-15.png +0 -0
- package/sources/assets/images/brutalist/Abstract-150.png +0 -0
- package/sources/assets/images/brutalist/Abstract-151.png +0 -0
- package/sources/assets/images/brutalist/Abstract-152.png +0 -0
- package/sources/assets/images/brutalist/Abstract-153.png +0 -0
- package/sources/assets/images/brutalist/Abstract-154.png +0 -0
- package/sources/assets/images/brutalist/Abstract-155.png +0 -0
- package/sources/assets/images/brutalist/Abstract-156.png +0 -0
- package/sources/assets/images/brutalist/Abstract-157.png +0 -0
- package/sources/assets/images/brutalist/Abstract-158.png +0 -0
- package/sources/assets/images/brutalist/Abstract-159.png +0 -0
- package/sources/assets/images/brutalist/Abstract-16.png +0 -0
- package/sources/assets/images/brutalist/Abstract-160.png +0 -0
- package/sources/assets/images/brutalist/Abstract-161.png +0 -0
- package/sources/assets/images/brutalist/Abstract-162.png +0 -0
- package/sources/assets/images/brutalist/Abstract-163.png +0 -0
- package/sources/assets/images/brutalist/Abstract-164.png +0 -0
- package/sources/assets/images/brutalist/Abstract-165.png +0 -0
- package/sources/assets/images/brutalist/Abstract-166.png +0 -0
- package/sources/assets/images/brutalist/Abstract-167.png +0 -0
- package/sources/assets/images/brutalist/Abstract-168.png +0 -0
- package/sources/assets/images/brutalist/Abstract-169.png +0 -0
- package/sources/assets/images/brutalist/Abstract-17.png +0 -0
- package/sources/assets/images/brutalist/Abstract-170.png +0 -0
- package/sources/assets/images/brutalist/Abstract-171.png +0 -0
- package/sources/assets/images/brutalist/Abstract-172.png +0 -0
- package/sources/assets/images/brutalist/Abstract-173.png +0 -0
- package/sources/assets/images/brutalist/Abstract-174.png +0 -0
- package/sources/assets/images/brutalist/Abstract-175.png +0 -0
- package/sources/assets/images/brutalist/Abstract-176.png +0 -0
- package/sources/assets/images/brutalist/Abstract-177.png +0 -0
- package/sources/assets/images/brutalist/Abstract-178.png +0 -0
- package/sources/assets/images/brutalist/Abstract-179.png +0 -0
- package/sources/assets/images/brutalist/Abstract-18.png +0 -0
- package/sources/assets/images/brutalist/Abstract-180.png +0 -0
- package/sources/assets/images/brutalist/Abstract-181.png +0 -0
- package/sources/assets/images/brutalist/Abstract-182.png +0 -0
- package/sources/assets/images/brutalist/Abstract-183.png +0 -0
- package/sources/assets/images/brutalist/Abstract-184.png +0 -0
- package/sources/assets/images/brutalist/Abstract-185.png +0 -0
- package/sources/assets/images/brutalist/Abstract-186.png +0 -0
- package/sources/assets/images/brutalist/Abstract-187.png +0 -0
- package/sources/assets/images/brutalist/Abstract-188.png +0 -0
- package/sources/assets/images/brutalist/Abstract-189.png +0 -0
- package/sources/assets/images/brutalist/Abstract-19.png +0 -0
- package/sources/assets/images/brutalist/Abstract-190.png +0 -0
- package/sources/assets/images/brutalist/Abstract-191.png +0 -0
- package/sources/assets/images/brutalist/Abstract-192.png +0 -0
- package/sources/assets/images/brutalist/Abstract-193.png +0 -0
- package/sources/assets/images/brutalist/Abstract-194.png +0 -0
- package/sources/assets/images/brutalist/Abstract-195.png +0 -0
- package/sources/assets/images/brutalist/Abstract-196.png +0 -0
- package/sources/assets/images/brutalist/Abstract-197.png +0 -0
- package/sources/assets/images/brutalist/Abstract-198.png +0 -0
- package/sources/assets/images/brutalist/Abstract-199.png +0 -0
- package/sources/assets/images/brutalist/Abstract-2.png +0 -0
- package/sources/assets/images/brutalist/Abstract-20.png +0 -0
- package/sources/assets/images/brutalist/Abstract-200.png +0 -0
- package/sources/assets/images/brutalist/Abstract-201.png +0 -0
- package/sources/assets/images/brutalist/Abstract-202.png +0 -0
- package/sources/assets/images/brutalist/Abstract-203.png +0 -0
- package/sources/assets/images/brutalist/Abstract-204.png +0 -0
- package/sources/assets/images/brutalist/Abstract-205.png +0 -0
- package/sources/assets/images/brutalist/Abstract-206.png +0 -0
- package/sources/assets/images/brutalist/Abstract-207.png +0 -0
- package/sources/assets/images/brutalist/Abstract-208.png +0 -0
- package/sources/assets/images/brutalist/Abstract-209.png +0 -0
- package/sources/assets/images/brutalist/Abstract-21.png +0 -0
- package/sources/assets/images/brutalist/Abstract-210.png +0 -0
- package/sources/assets/images/brutalist/Abstract-211.png +0 -0
- package/sources/assets/images/brutalist/Abstract-212.png +0 -0
- package/sources/assets/images/brutalist/Abstract-213.png +0 -0
- package/sources/assets/images/brutalist/Abstract-214.png +0 -0
- package/sources/assets/images/brutalist/Abstract-215.png +0 -0
- package/sources/assets/images/brutalist/Abstract-216.png +0 -0
- package/sources/assets/images/brutalist/Abstract-217.png +0 -0
- package/sources/assets/images/brutalist/Abstract-218.png +0 -0
- package/sources/assets/images/brutalist/Abstract-219.png +0 -0
- package/sources/assets/images/brutalist/Abstract-22.png +0 -0
- package/sources/assets/images/brutalist/Abstract-220.png +0 -0
- package/sources/assets/images/brutalist/Abstract-221.png +0 -0
- package/sources/assets/images/brutalist/Abstract-222.png +0 -0
- package/sources/assets/images/brutalist/Abstract-223.png +0 -0
- package/sources/assets/images/brutalist/Abstract-224.png +0 -0
- package/sources/assets/images/brutalist/Abstract-225.png +0 -0
- package/sources/assets/images/brutalist/Abstract-226.png +0 -0
- package/sources/assets/images/brutalist/Abstract-227.png +0 -0
- package/sources/assets/images/brutalist/Abstract-228.png +0 -0
- package/sources/assets/images/brutalist/Abstract-229.png +0 -0
- package/sources/assets/images/brutalist/Abstract-23.png +0 -0
- package/sources/assets/images/brutalist/Abstract-230.png +0 -0
- package/sources/assets/images/brutalist/Abstract-231.png +0 -0
- package/sources/assets/images/brutalist/Abstract-232.png +0 -0
- package/sources/assets/images/brutalist/Abstract-233.png +0 -0
- package/sources/assets/images/brutalist/Abstract-234.png +0 -0
- package/sources/assets/images/brutalist/Abstract-235.png +0 -0
- package/sources/assets/images/brutalist/Abstract-236.png +0 -0
- package/sources/assets/images/brutalist/Abstract-237.png +0 -0
- package/sources/assets/images/brutalist/Abstract-238.png +0 -0
- package/sources/assets/images/brutalist/Abstract-239.png +0 -0
- package/sources/assets/images/brutalist/Abstract-24.png +0 -0
- package/sources/assets/images/brutalist/Abstract-240.png +0 -0
- package/sources/assets/images/brutalist/Abstract-241.png +0 -0
- package/sources/assets/images/brutalist/Abstract-242.png +0 -0
- package/sources/assets/images/brutalist/Abstract-243.png +0 -0
- package/sources/assets/images/brutalist/Abstract-244.png +0 -0
- package/sources/assets/images/brutalist/Abstract-245.png +0 -0
- package/sources/assets/images/brutalist/Abstract-246.png +0 -0
- package/sources/assets/images/brutalist/Abstract-247.png +0 -0
- package/sources/assets/images/brutalist/Abstract-248.png +0 -0
- package/sources/assets/images/brutalist/Abstract-249.png +0 -0
- package/sources/assets/images/brutalist/Abstract-25.png +0 -0
- package/sources/assets/images/brutalist/Abstract-250.png +0 -0
- package/sources/assets/images/brutalist/Abstract-251.png +0 -0
- package/sources/assets/images/brutalist/Abstract-252.png +0 -0
- package/sources/assets/images/brutalist/Abstract-253.png +0 -0
- package/sources/assets/images/brutalist/Abstract-254.png +0 -0
- package/sources/assets/images/brutalist/Abstract-255.png +0 -0
- package/sources/assets/images/brutalist/Abstract-256.png +0 -0
- package/sources/assets/images/brutalist/Abstract-257.png +0 -0
- package/sources/assets/images/brutalist/Abstract-258.png +0 -0
- package/sources/assets/images/brutalist/Abstract-259.png +0 -0
- package/sources/assets/images/brutalist/Abstract-26.png +0 -0
- package/sources/assets/images/brutalist/Abstract-260.png +0 -0
- package/sources/assets/images/brutalist/Abstract-261.png +0 -0
- package/sources/assets/images/brutalist/Abstract-262.png +0 -0
- package/sources/assets/images/brutalist/Abstract-27.png +0 -0
- package/sources/assets/images/brutalist/Abstract-28.png +0 -0
- package/sources/assets/images/brutalist/Abstract-29.png +0 -0
- package/sources/assets/images/brutalist/Abstract-3.png +0 -0
- package/sources/assets/images/brutalist/Abstract-30.png +0 -0
- package/sources/assets/images/brutalist/Abstract-31.png +0 -0
- package/sources/assets/images/brutalist/Abstract-32.png +0 -0
- package/sources/assets/images/brutalist/Abstract-33.png +0 -0
- package/sources/assets/images/brutalist/Abstract-34.png +0 -0
- package/sources/assets/images/brutalist/Abstract-35.png +0 -0
- package/sources/assets/images/brutalist/Abstract-36.png +0 -0
- package/sources/assets/images/brutalist/Abstract-37.png +0 -0
- package/sources/assets/images/brutalist/Abstract-38.png +0 -0
- package/sources/assets/images/brutalist/Abstract-39.png +0 -0
- package/sources/assets/images/brutalist/Abstract-4.png +0 -0
- package/sources/assets/images/brutalist/Abstract-40.png +0 -0
- package/sources/assets/images/brutalist/Abstract-41.png +0 -0
- package/sources/assets/images/brutalist/Abstract-42.png +0 -0
- package/sources/assets/images/brutalist/Abstract-43.png +0 -0
- package/sources/assets/images/brutalist/Abstract-44.png +0 -0
- package/sources/assets/images/brutalist/Abstract-45.png +0 -0
- package/sources/assets/images/brutalist/Abstract-46.png +0 -0
- package/sources/assets/images/brutalist/Abstract-47.png +0 -0
- package/sources/assets/images/brutalist/Abstract-48.png +0 -0
- package/sources/assets/images/brutalist/Abstract-49.png +0 -0
- package/sources/assets/images/brutalist/Abstract-5.png +0 -0
- package/sources/assets/images/brutalist/Abstract-50.png +0 -0
- package/sources/assets/images/brutalist/Abstract-51.png +0 -0
- package/sources/assets/images/brutalist/Abstract-52.png +0 -0
- package/sources/assets/images/brutalist/Abstract-53.png +0 -0
- package/sources/assets/images/brutalist/Abstract-54.png +0 -0
- package/sources/assets/images/brutalist/Abstract-55.png +0 -0
- package/sources/assets/images/brutalist/Abstract-56.png +0 -0
- package/sources/assets/images/brutalist/Abstract-57.png +0 -0
- package/sources/assets/images/brutalist/Abstract-58.png +0 -0
- package/sources/assets/images/brutalist/Abstract-59.png +0 -0
- package/sources/assets/images/brutalist/Abstract-6.png +0 -0
- package/sources/assets/images/brutalist/Abstract-60.png +0 -0
- package/sources/assets/images/brutalist/Abstract-61.png +0 -0
- package/sources/assets/images/brutalist/Abstract-62.png +0 -0
- package/sources/assets/images/brutalist/Abstract-63.png +0 -0
- package/sources/assets/images/brutalist/Abstract-64.png +0 -0
- package/sources/assets/images/brutalist/Abstract-65.png +0 -0
- package/sources/assets/images/brutalist/Abstract-66.png +0 -0
- package/sources/assets/images/brutalist/Abstract-67.png +0 -0
- package/sources/assets/images/brutalist/Abstract-68.png +0 -0
- package/sources/assets/images/brutalist/Abstract-69.png +0 -0
- package/sources/assets/images/brutalist/Abstract-7.png +0 -0
- package/sources/assets/images/brutalist/Abstract-70.png +0 -0
- package/sources/assets/images/brutalist/Abstract-71.png +0 -0
- package/sources/assets/images/brutalist/Abstract-72.png +0 -0
- package/sources/assets/images/brutalist/Abstract-73.png +0 -0
- package/sources/assets/images/brutalist/Abstract-74.png +0 -0
- package/sources/assets/images/brutalist/Abstract-75.png +0 -0
- package/sources/assets/images/brutalist/Abstract-76.png +0 -0
- package/sources/assets/images/brutalist/Abstract-77.png +0 -0
- package/sources/assets/images/brutalist/Abstract-78.png +0 -0
- package/sources/assets/images/brutalist/Abstract-79.png +0 -0
- package/sources/assets/images/brutalist/Abstract-8.png +0 -0
- package/sources/assets/images/brutalist/Abstract-80.png +0 -0
- package/sources/assets/images/brutalist/Abstract-81.png +0 -0
- package/sources/assets/images/brutalist/Abstract-82.png +0 -0
- package/sources/assets/images/brutalist/Abstract-83.png +0 -0
- package/sources/assets/images/brutalist/Abstract-84.png +0 -0
- package/sources/assets/images/brutalist/Abstract-85.png +0 -0
- package/sources/assets/images/brutalist/Abstract-86.png +0 -0
- package/sources/assets/images/brutalist/Abstract-87.png +0 -0
- package/sources/assets/images/brutalist/Abstract-88.png +0 -0
- package/sources/assets/images/brutalist/Abstract-89.png +0 -0
- package/sources/assets/images/brutalist/Abstract-9.png +0 -0
- package/sources/assets/images/brutalist/Abstract-90.png +0 -0
- package/sources/assets/images/brutalist/Abstract-91.png +0 -0
- package/sources/assets/images/brutalist/Abstract-92.png +0 -0
- package/sources/assets/images/brutalist/Abstract-93.png +0 -0
- package/sources/assets/images/brutalist/Abstract-94.png +0 -0
- package/sources/assets/images/brutalist/Abstract-95.png +0 -0
- package/sources/assets/images/brutalist/Abstract-96.png +0 -0
- package/sources/assets/images/brutalist/Abstract-97.png +0 -0
- package/sources/assets/images/brutalist/Abstract-98.png +0 -0
- package/sources/assets/images/brutalist/Abstract-99.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-1.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-10.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-11.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-12.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-13.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-14.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-15.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-16.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-17.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-18.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-19.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-2.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-20.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-21.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-22.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-23.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-24.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-25.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-26.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-27.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-28.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-29.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-3.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-30.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-31.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-32.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-33.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-34.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-35.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-36.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-37.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-38.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-39.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-4.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-40.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-5.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-6.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-7.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-8.png +0 -0
- package/sources/assets/images/brutalist/Bauhaus-9.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-1.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-10.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-100.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-101.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-102.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-103.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-104.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-105.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-106.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-107.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-108.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-109.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-11.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-110.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-111.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-112.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-113.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-114.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-115.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-116.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-117.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-118.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-12.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-13.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-14.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-15.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-16.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-17.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-18.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-19.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-2.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-20.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-21.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-22.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-23.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-24.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-25.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-26.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-27.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-28.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-29.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-3.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-30.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-31.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-32.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-33.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-34.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-35.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-36.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-37.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-38.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-39.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-4.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-40.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-41.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-42.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-43.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-44.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-45.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-46.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-47.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-48.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-49.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-5.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-50.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-51.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-52.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-53.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-54.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-55.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-56.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-57.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-58.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-59.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-6.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-60.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-61.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-62.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-63.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-64.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-65.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-66.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-67.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-68.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-69.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-7.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-70.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-71.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-72.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-73.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-74.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-75.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-76.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-77.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-78.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-79.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-8.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-80.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-81.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-82.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-83.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-84.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-85.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-86.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-87.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-88.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-89.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-9.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-90.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-91.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-92.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-93.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-94.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-95.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-96.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-97.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-98.png +0 -0
- package/sources/assets/images/brutalist/Brutalism-99.png +0 -0
- package/sources/assets/images/favicon-active.png +0 -0
- package/sources/assets/images/favicon.png +0 -0
- package/sources/assets/images/gradients/01.png +0 -0
- package/sources/assets/images/gradients/02.png +0 -0
- package/sources/assets/images/gradients/03.png +0 -0
- package/sources/assets/images/gradients/04.png +0 -0
- package/sources/assets/images/gradients/05.png +0 -0
- package/sources/assets/images/gradients/06.png +0 -0
- package/sources/assets/images/gradients/07.png +0 -0
- package/sources/assets/images/gradients/08.png +0 -0
- package/sources/assets/images/gradients/09.png +0 -0
- package/sources/assets/images/gradients/10.png +0 -0
- package/sources/assets/images/gradients/100.png +0 -0
- package/sources/assets/images/gradients/11.png +0 -0
- package/sources/assets/images/gradients/12.png +0 -0
- package/sources/assets/images/gradients/13.png +0 -0
- package/sources/assets/images/gradients/14.png +0 -0
- package/sources/assets/images/gradients/15.png +0 -0
- package/sources/assets/images/gradients/16.png +0 -0
- package/sources/assets/images/gradients/17.png +0 -0
- package/sources/assets/images/gradients/18.png +0 -0
- package/sources/assets/images/gradients/19.png +0 -0
- package/sources/assets/images/gradients/20.png +0 -0
- package/sources/assets/images/gradients/21.png +0 -0
- package/sources/assets/images/gradients/22.png +0 -0
- package/sources/assets/images/gradients/23.png +0 -0
- package/sources/assets/images/gradients/24.png +0 -0
- package/sources/assets/images/gradients/25.png +0 -0
- package/sources/assets/images/gradients/26.png +0 -0
- package/sources/assets/images/gradients/27.png +0 -0
- package/sources/assets/images/gradients/28.png +0 -0
- package/sources/assets/images/gradients/29.png +0 -0
- package/sources/assets/images/gradients/30.png +0 -0
- package/sources/assets/images/gradients/31.png +0 -0
- package/sources/assets/images/gradients/32.png +0 -0
- package/sources/assets/images/gradients/33.png +0 -0
- package/sources/assets/images/gradients/34.png +0 -0
- package/sources/assets/images/gradients/35.png +0 -0
- package/sources/assets/images/gradients/36.png +0 -0
- package/sources/assets/images/gradients/37.png +0 -0
- package/sources/assets/images/gradients/38.png +0 -0
- package/sources/assets/images/gradients/39.png +0 -0
- package/sources/assets/images/gradients/40.png +0 -0
- package/sources/assets/images/gradients/41.png +0 -0
- package/sources/assets/images/gradients/42.png +0 -0
- package/sources/assets/images/gradients/43.png +0 -0
- package/sources/assets/images/gradients/44.png +0 -0
- package/sources/assets/images/gradients/45.png +0 -0
- package/sources/assets/images/gradients/46.png +0 -0
- package/sources/assets/images/gradients/47.png +0 -0
- package/sources/assets/images/gradients/48.png +0 -0
- package/sources/assets/images/gradients/49.png +0 -0
- package/sources/assets/images/gradients/50.png +0 -0
- package/sources/assets/images/gradients/51.png +0 -0
- package/sources/assets/images/gradients/52.png +0 -0
- package/sources/assets/images/gradients/53.png +0 -0
- package/sources/assets/images/gradients/54.png +0 -0
- package/sources/assets/images/gradients/55.png +0 -0
- package/sources/assets/images/gradients/56.png +0 -0
- package/sources/assets/images/gradients/57.png +0 -0
- package/sources/assets/images/gradients/58.png +0 -0
- package/sources/assets/images/gradients/59.png +0 -0
- package/sources/assets/images/gradients/60.png +0 -0
- package/sources/assets/images/gradients/61.png +0 -0
- package/sources/assets/images/gradients/62.png +0 -0
- package/sources/assets/images/gradients/63.png +0 -0
- package/sources/assets/images/gradients/64.png +0 -0
- package/sources/assets/images/gradients/65.png +0 -0
- package/sources/assets/images/gradients/66.png +0 -0
- package/sources/assets/images/gradients/67.png +0 -0
- package/sources/assets/images/gradients/68.png +0 -0
- package/sources/assets/images/gradients/69.png +0 -0
- package/sources/assets/images/gradients/70.png +0 -0
- package/sources/assets/images/gradients/71.png +0 -0
- package/sources/assets/images/gradients/72.png +0 -0
- package/sources/assets/images/gradients/73.png +0 -0
- package/sources/assets/images/gradients/74.png +0 -0
- package/sources/assets/images/gradients/75.png +0 -0
- package/sources/assets/images/gradients/76.png +0 -0
- package/sources/assets/images/gradients/77.png +0 -0
- package/sources/assets/images/gradients/78.png +0 -0
- package/sources/assets/images/gradients/79.png +0 -0
- package/sources/assets/images/gradients/80.png +0 -0
- package/sources/assets/images/gradients/81.png +0 -0
- package/sources/assets/images/gradients/82.png +0 -0
- package/sources/assets/images/gradients/83.png +0 -0
- package/sources/assets/images/gradients/84.png +0 -0
- package/sources/assets/images/gradients/85.png +0 -0
- package/sources/assets/images/gradients/86.png +0 -0
- package/sources/assets/images/gradients/87.png +0 -0
- package/sources/assets/images/gradients/88.png +0 -0
- package/sources/assets/images/gradients/89.png +0 -0
- package/sources/assets/images/gradients/90.png +0 -0
- package/sources/assets/images/gradients/91.png +0 -0
- package/sources/assets/images/gradients/92.png +0 -0
- package/sources/assets/images/gradients/93.png +0 -0
- package/sources/assets/images/gradients/94.png +0 -0
- package/sources/assets/images/gradients/95.png +0 -0
- package/sources/assets/images/gradients/96.png +0 -0
- package/sources/assets/images/gradients/97.png +0 -0
- package/sources/assets/images/gradients/98.png +0 -0
- package/sources/assets/images/gradients/99.png +0 -0
- package/sources/assets/images/icon-adaptive.png +0 -0
- package/sources/assets/images/icon-claude.png +0 -0
- package/sources/assets/images/icon-claude@2x.png +0 -0
- package/sources/assets/images/icon-claude@3x.png +0 -0
- package/sources/assets/images/icon-gemini.png +0 -0
- package/sources/assets/images/icon-gemini@2x.png +0 -0
- package/sources/assets/images/icon-gemini@3x.png +0 -0
- package/sources/assets/images/icon-gpt.png +0 -0
- package/sources/assets/images/icon-gpt@2x.png +0 -0
- package/sources/assets/images/icon-gpt@3x.png +0 -0
- package/sources/assets/images/icon-monochrome.png +0 -0
- package/sources/assets/images/icon-notification.png +0 -0
- package/sources/assets/images/icon-openclaw.png +0 -0
- package/sources/assets/images/icon-openclaw@2x.png +0 -0
- package/sources/assets/images/icon-openclaw@3x.png +0 -0
- package/sources/assets/images/icon-tauri.png +0 -0
- package/sources/assets/images/icon-voice-white.png +0 -0
- package/sources/assets/images/icon-voice.png +0 -0
- package/sources/assets/images/icon-voice@2x.png +0 -0
- package/sources/assets/images/icon-voice@3x.png +0 -0
- package/sources/assets/images/icon.png +0 -0
- package/sources/assets/images/logo-black.png +0 -0
- package/sources/assets/images/logo-white.png +0 -0
- package/sources/assets/images/logotype-dark.png +0 -0
- package/sources/assets/images/logotype-dark@2x.png +0 -0
- package/sources/assets/images/logotype-dark@3x.png +0 -0
- package/sources/assets/images/logotype-light.png +0 -0
- package/sources/assets/images/logotype-light@2x.png +0 -0
- package/sources/assets/images/logotype-light@3x.png +0 -0
- package/sources/assets/images/logotype.png +0 -0
- package/sources/assets/images/logotype@2x.png +0 -0
- package/sources/assets/images/logotype@3x.png +0 -0
- package/sources/assets/images/splash-android-dark.png +0 -0
- package/sources/assets/images/splash-android-light.png +0 -0
- package/sources/assets/images/transparent.png +0 -0
- package/sources/assets/images/zen-icon.png +0 -0
- package/sources/auth/AuthContext.tsx +100 -0
- package/sources/auth/authAccountApprove.ts +2 -0
- package/sources/auth/authApprove.ts +2 -0
- package/sources/auth/authChallenge.ts +8 -0
- package/sources/auth/authGetToken.ts +4 -0
- package/sources/auth/authQRStart.ts +17 -0
- package/sources/auth/authQRWait.ts +13 -0
- package/sources/auth/secretKeyBackup.spec.ts +465 -0
- package/sources/auth/secretKeyBackup.ts +179 -0
- package/sources/auth/tokenStorage.ts +27 -0
- package/sources/changelog/changelog.json +60 -0
- package/sources/changelog/index.ts +3 -0
- package/sources/changelog/parser.ts +23 -0
- package/sources/changelog/storage.ts +17 -0
- package/sources/changelog/types.ts +10 -0
- package/sources/components/ActiveSessionsGroupCompact.tsx +567 -0
- package/sources/components/AgentContentView.ios.tsx +70 -0
- package/sources/components/AgentContentView.tsx +48 -0
- package/sources/components/AgentInput.tsx +1468 -0
- package/sources/components/AgentInputAttachmentStrip.tsx +122 -0
- package/sources/components/AgentInputAutocomplete.tsx +96 -0
- package/sources/components/AgentInputSuggestionView.tsx +106 -0
- package/sources/components/AllFilesDiffView.tsx +515 -0
- package/sources/components/Avatar.tsx +149 -0
- package/sources/components/AvatarBrutalist.tsx +501 -0
- package/sources/components/AvatarGradient.tsx +147 -0
- package/sources/components/AvatarSkia.tsx +111 -0
- package/sources/components/AvatarSkia.web.tsx +113 -0
- package/sources/components/ChatFooter.tsx +50 -0
- package/sources/components/ChatHeaderView.tsx +180 -0
- package/sources/components/ChatList.tsx +283 -0
- package/sources/components/CodeEditor.tsx +22 -0
- package/sources/components/CodeEditor.web.tsx +180 -0
- package/sources/components/CodeView.tsx +33 -0
- package/sources/components/CommandPalette/CommandPalette.tsx +72 -0
- package/sources/components/CommandPalette/CommandPaletteInput.tsx +65 -0
- package/sources/components/CommandPalette/CommandPaletteItem.tsx +141 -0
- package/sources/components/CommandPalette/CommandPaletteModal.tsx +148 -0
- package/sources/components/CommandPalette/CommandPaletteProvider.tsx +141 -0
- package/sources/components/CommandPalette/CommandPaletteResults.tsx +129 -0
- package/sources/components/CommandPalette/index.ts +3 -0
- package/sources/components/CommandPalette/types.ts +15 -0
- package/sources/components/CommandPalette/useCommandPalette.ts +107 -0
- package/sources/components/CommandView.tsx +135 -0
- package/sources/components/CompactGitStatus.tsx +88 -0
- package/sources/components/ConnectButton.tsx +117 -0
- package/sources/components/Deferred.tsx +18 -0
- package/sources/components/DuplicateSheet.tsx +295 -0
- package/sources/components/EmptyMainScreen.tsx +171 -0
- package/sources/components/EmptyMessages.tsx +123 -0
- package/sources/components/EmptySessionsTablet.tsx +111 -0
- package/sources/components/ExternalLink.tsx +22 -0
- package/sources/components/FAB.tsx +53 -0
- package/sources/components/FABWide.tsx +59 -0
- package/sources/components/FeedItemCard.tsx +98 -0
- package/sources/components/FileIcon.tsx +63 -0
- package/sources/components/FileViewPanel.tsx +673 -0
- package/sources/components/FilesSidebar.tsx +739 -0
- package/sources/components/FloatingOverlay.tsx +48 -0
- package/sources/components/GitStatusBadge.tsx +82 -0
- package/sources/components/HeaderLogo.tsx +28 -0
- package/sources/components/HomeHeader.tsx +243 -0
- package/sources/components/HorizontalScrollView.tsx +88 -0
- package/sources/components/InboxView.tsx +260 -0
- package/sources/components/InlineFileDiff.tsx +277 -0
- package/sources/components/Item.tsx +315 -0
- package/sources/components/ItemGroup.tsx +147 -0
- package/sources/components/ItemList.tsx +102 -0
- package/sources/components/MainView.tsx +324 -0
- package/sources/components/MessageView.tsx +299 -0
- package/sources/components/MultiTextInput.tsx +285 -0
- package/sources/components/MultiTextInput.web.tsx +220 -0
- package/sources/components/OAuthView.tsx +374 -0
- package/sources/components/PermissionModeSelector.tsx +68 -0
- package/sources/components/PlaceholderContainerView.tsx +47 -0
- package/sources/components/PlusPlus.tsx +34 -0
- package/sources/components/PlusPlus.web.tsx +34 -0
- package/sources/components/ProjectGitStatus.tsx +102 -0
- package/sources/components/RoundButton.tsx +130 -0
- package/sources/components/SearchableListSelector.tsx +675 -0
- package/sources/components/SessionActionsNativeMenu.android.tsx +58 -0
- package/sources/components/SessionActionsNativeMenu.ios.tsx +55 -0
- package/sources/components/SessionActionsNativeMenu.tsx +20 -0
- package/sources/components/SessionActionsNativeMenu.web.tsx +13 -0
- package/sources/components/SessionActionsPopover.tsx +240 -0
- package/sources/components/SessionsList.tsx +471 -0
- package/sources/components/SessionsListWrapper.tsx +72 -0
- package/sources/components/SettingsView.tsx +470 -0
- package/sources/components/SettingsViewWrapper.tsx +21 -0
- package/sources/components/Shaker.tsx +42 -0
- package/sources/components/Shaker.web.tsx +46 -0
- package/sources/components/ShimmerView.tsx +106 -0
- package/sources/components/SidebarNavigator.tsx +218 -0
- package/sources/components/SidebarView.tsx +104 -0
- package/sources/components/SimpleSyntaxHighlighter.tsx +322 -0
- package/sources/components/StatusBarProvider.tsx +12 -0
- package/sources/components/StatusDot.tsx +49 -0
- package/sources/components/StyledText.tsx +35 -0
- package/sources/components/Switch.tsx +20 -0
- package/sources/components/TabBar.tsx +140 -0
- package/sources/components/ToolGroupView.tsx +101 -0
- package/sources/components/TransitionStack.tsx +14 -0
- package/sources/components/UpdateBanner.tsx +74 -0
- package/sources/components/UserCard.tsx +41 -0
- package/sources/components/UserSearchResult.tsx +129 -0
- package/sources/components/VoiceAssistantStatusBar.tsx +260 -0
- package/sources/components/VoiceBars.tsx +95 -0
- package/sources/components/autocomplete/applySuggestion.test.ts +194 -0
- package/sources/components/autocomplete/applySuggestion.ts +61 -0
- package/sources/components/autocomplete/findActiveWord.test.ts +365 -0
- package/sources/components/autocomplete/findActiveWord.ts +207 -0
- package/sources/components/autocomplete/suggestions.ts +79 -0
- package/sources/components/autocomplete/useActiveSuggestions.ts +130 -0
- package/sources/components/autocomplete/useActiveWord.ts +19 -0
- package/sources/components/diff/DiffView.tsx +188 -0
- package/sources/components/diff/PierreDiffView.tsx +253 -0
- package/sources/components/diff/calculateDiff.ts +317 -0
- package/sources/components/entityColor.ts +51 -0
- package/sources/components/haptics.ts +9 -0
- package/sources/components/haptics.web.ts +7 -0
- package/sources/components/layout.ts +44 -0
- package/sources/components/markdown/MarkdownView.tsx +670 -0
- package/sources/components/markdown/MermaidRenderer.tsx +233 -0
- package/sources/components/markdown/linkUtils.test.ts +17 -0
- package/sources/components/markdown/linkUtils.ts +5 -0
- package/sources/components/markdown/parseMarkdown.test.ts +64 -0
- package/sources/components/markdown/parseMarkdown.ts +46 -0
- package/sources/components/markdown/parseMarkdownBlock.test.ts +108 -0
- package/sources/components/markdown/parseMarkdownBlock.ts +200 -0
- package/sources/components/markdown/parseMarkdownSpans.ts +88 -0
- package/sources/components/modelModeOptions.test.ts +114 -0
- package/sources/components/modelModeOptions.ts +257 -0
- package/sources/components/navigation/Header.tsx +252 -0
- package/sources/components/parseLocalCommandMessage.spec.ts +96 -0
- package/sources/components/parseLocalCommandMessage.ts +97 -0
- package/sources/components/qr/QRCode.tsx +178 -0
- package/sources/components/qr/QRCode.web.tsx +229 -0
- package/sources/components/qr/index.ts +2 -0
- package/sources/components/qr/qrMatrix.ts +48 -0
- package/sources/components/tools/PermissionFooter.tsx +527 -0
- package/sources/components/tools/ToolDiffView.tsx +60 -0
- package/sources/components/tools/ToolError.tsx +49 -0
- package/sources/components/tools/ToolFullView.tsx +193 -0
- package/sources/components/tools/ToolHeader.tsx +93 -0
- package/sources/components/tools/ToolSectionView.tsx +42 -0
- package/sources/components/tools/ToolStatusIndicator.tsx +36 -0
- package/sources/components/tools/ToolView.tsx +340 -0
- package/sources/components/tools/knownTools.tsx +957 -0
- package/sources/components/tools/views/AskUserQuestionView.tsx +357 -0
- package/sources/components/tools/views/BashView.tsx +47 -0
- package/sources/components/tools/views/BashViewFull.tsx +81 -0
- package/sources/components/tools/views/CodexBashView.tsx +126 -0
- package/sources/components/tools/views/CodexDiffView.tsx +79 -0
- package/sources/components/tools/views/CodexPatchView.tsx +186 -0
- package/sources/components/tools/views/EditView.tsx +33 -0
- package/sources/components/tools/views/EditViewFull.tsx +38 -0
- package/sources/components/tools/views/ExitPlanToolView.tsx +21 -0
- package/sources/components/tools/views/FileView.tsx +118 -0
- package/sources/components/tools/views/GeminiEditView.tsx +75 -0
- package/sources/components/tools/views/GeminiExecuteView.tsx +92 -0
- package/sources/components/tools/views/MCPToolView.tsx +31 -0
- package/sources/components/tools/views/MultiEditView.tsx +41 -0
- package/sources/components/tools/views/MultiEditViewFull.tsx +84 -0
- package/sources/components/tools/views/TaskView.tsx +129 -0
- package/sources/components/tools/views/TodoView.tsx +90 -0
- package/sources/components/tools/views/WriteView.tsx +29 -0
- package/sources/components/tools/views/_all.tsx +88 -0
- package/sources/components/usage/UsageBar.tsx +80 -0
- package/sources/components/usage/UsageChart.tsx +164 -0
- package/sources/components/usage/UsagePanel.tsx +283 -0
- package/sources/components/web/FaviconPermissionIndicator.tsx +44 -0
- package/sources/config.ts +3 -0
- package/sources/constants/Languages.ts +116 -0
- package/sources/constants/Typography.ts +116 -0
- package/sources/dev/testRunner.ts +277 -0
- package/sources/docs/autocomplete-text-manipulation.md +224 -0
- package/sources/encryption/aes.appspec.ts +25 -0
- package/sources/encryption/aes.ts +21 -0
- package/sources/encryption/aes.web.test.ts +73 -0
- package/sources/encryption/aes.web.ts +79 -0
- package/sources/encryption/base64.appspec.ts +240 -0
- package/sources/encryption/base64.native.ts +12 -0
- package/sources/encryption/base64.ts +46 -0
- package/sources/encryption/blob.test.ts +120 -0
- package/sources/encryption/blob.ts +58 -0
- package/sources/encryption/deriveKey.appspec.ts +72 -0
- package/sources/encryption/deriveKey.ts +46 -0
- package/sources/encryption/hex.ts +17 -0
- package/sources/encryption/hmac_sha512.appspec.ts +40 -0
- package/sources/encryption/hmac_sha512.ts +42 -0
- package/sources/encryption/libsodium.lib.ts +2 -0
- package/sources/encryption/libsodium.lib.web.ts +2 -0
- package/sources/encryption/libsodium.ts +58 -0
- package/sources/encryption/text.test.ts +61 -0
- package/sources/encryption/text.ts +11 -0
- package/sources/hooks/useAsyncCommand.ts +25 -0
- package/sources/hooks/useAttachmentImage.ts +134 -0
- package/sources/hooks/useAutocomplete.ts +69 -0
- package/sources/hooks/useAutocompleteSession.ts +53 -0
- package/sources/hooks/useChangelog.ts +45 -0
- package/sources/hooks/useCheckCameraPermissions.ts +25 -0
- package/sources/hooks/useConnectAccount.ts +107 -0
- package/sources/hooks/useConnectTerminal.ts +112 -0
- package/sources/hooks/useDemoMessages.ts +48 -0
- package/sources/hooks/useDraft.ts +120 -0
- package/sources/hooks/useElapsedTime.ts +36 -0
- package/sources/hooks/useGetPath.ts +13 -0
- package/sources/hooks/useGitStatusFiles.ts +45 -0
- package/sources/hooks/useGlobalKeyboard.ts +29 -0
- package/sources/hooks/useGroupedMessages.ts +149 -0
- package/sources/hooks/useImagePicker.ts +135 -0
- package/sources/hooks/useInboxHasContent.ts +19 -0
- package/sources/hooks/useMultiClick.ts +56 -0
- package/sources/hooks/useNasTechAction.ts +45 -0
- package/sources/hooks/useNativeUpdate.ts +10 -0
- package/sources/hooks/useNavigateToSession.ts +20 -0
- package/sources/hooks/useNewSessionDraft.ts +70 -0
- package/sources/hooks/usePrefetchFileContents.ts +162 -0
- package/sources/hooks/useSearch.ts +120 -0
- package/sources/hooks/useSessionQuickActions.ts +325 -0
- package/sources/hooks/useTauriDrag.ts +76 -0
- package/sources/hooks/useTauriZoom.ts +67 -0
- package/sources/hooks/useUpdates.ts +84 -0
- package/sources/hooks/useVisibleSessionListViewData.ts +65 -0
- package/sources/hooks/useWorktreeCleanup.ts +69 -0
- package/sources/log.ts +108 -0
- package/sources/modal/ModalManager.ts +203 -0
- package/sources/modal/ModalProvider.tsx +103 -0
- package/sources/modal/components/BaseModal.tsx +122 -0
- package/sources/modal/components/CustomModal.tsx +42 -0
- package/sources/modal/components/WebAlertModal.tsx +139 -0
- package/sources/modal/components/WebPromptModal.tsx +185 -0
- package/sources/modal/index.ts +3 -0
- package/sources/modal/types.ts +79 -0
- package/sources/nastech-wire/index.ts +10 -0
- package/sources/nastech-wire/legacyProtocol.ts +27 -0
- package/sources/nastech-wire/messageMeta.ts +14 -0
- package/sources/nastech-wire/messages.ts +113 -0
- package/sources/nastech-wire/sessionProtocol.ts +134 -0
- package/sources/nastech-wire/voice.ts +34 -0
- package/sources/polyfills/screenOrientation.ts +33 -0
- package/sources/realtime/RealtimeProvider.tsx +20 -0
- package/sources/realtime/RealtimeProvider.web.tsx +15 -0
- package/sources/realtime/RealtimeSession.ts +200 -0
- package/sources/realtime/RealtimeVoiceSession.tsx +211 -0
- package/sources/realtime/RealtimeVoiceSession.web.tsx +209 -0
- package/sources/realtime/hooks/contextFormatters.ts +127 -0
- package/sources/realtime/hooks/voiceHooks.ts +232 -0
- package/sources/realtime/realtimeClientTools.ts +94 -0
- package/sources/realtime/types.ts +19 -0
- package/sources/realtime/voiceConfig.ts +31 -0
- package/sources/realtime/voiceExperiment.ts +91 -0
- package/sources/realtime/voiceSystemPrompt.ts +75 -0
- package/sources/scripts/compareTranslations.ts +217 -0
- package/sources/scripts/parseChangelog.ts +87 -0
- package/sources/sync/__testdata__/trace_0.json +3986 -0
- package/sources/sync/__testdata__/trace_1.json +1391 -0
- package/sources/sync/__testdata__/trace_2.json +182 -0
- package/sources/sync/agentDefaults.ts +108 -0
- package/sources/sync/apiArtifacts.ts +143 -0
- package/sources/sync/apiAttachments.ts +217 -0
- package/sources/sync/apiFeed.ts +60 -0
- package/sources/sync/apiFriends.ts +217 -0
- package/sources/sync/apiGithub.spec.ts +97 -0
- package/sources/sync/apiGithub.ts +103 -0
- package/sources/sync/apiKv.ts +270 -0
- package/sources/sync/apiPush.ts +83 -0
- package/sources/sync/apiServices.ts +64 -0
- package/sources/sync/apiSocket.ts +290 -0
- package/sources/sync/apiTypes.spec.ts +23 -0
- package/sources/sync/apiTypes.ts +213 -0
- package/sources/sync/apiUsage.ts +130 -0
- package/sources/sync/apiVoice.ts +57 -0
- package/sources/sync/appConfig.ts +95 -0
- package/sources/sync/artifactTypes.ts +85 -0
- package/sources/sync/attachmentTypes.ts +28 -0
- package/sources/sync/encryption/artifactEncryption.ts +83 -0
- package/sources/sync/encryption/encryption.ts +220 -0
- package/sources/sync/encryption/encryptionCache.ts +248 -0
- package/sources/sync/encryption/encryptor.appspec.ts +409 -0
- package/sources/sync/encryption/encryptor.ts +126 -0
- package/sources/sync/encryption/machineEncryption.ts +122 -0
- package/sources/sync/encryption/sessionEncryption.ts +207 -0
- package/sources/sync/feedTypes.ts +43 -0
- package/sources/sync/friendTypes.ts +92 -0
- package/sources/sync/git-parsers/LineParser.ts +62 -0
- package/sources/sync/git-parsers/parseBranch.ts +97 -0
- package/sources/sync/git-parsers/parseDiff.ts +180 -0
- package/sources/sync/git-parsers/parseStatus.ts +162 -0
- package/sources/sync/git-parsers/parseStatusV2.ts +307 -0
- package/sources/sync/gitStatusFiles.ts +185 -0
- package/sources/sync/gitStatusSync.ts +282 -0
- package/sources/sync/localSettings.ts +67 -0
- package/sources/sync/messageMeta.test.ts +87 -0
- package/sources/sync/messageMeta.ts +36 -0
- package/sources/sync/modeHacks.test.ts +29 -0
- package/sources/sync/modeHacks.ts +22 -0
- package/sources/sync/nastechApi.ts +124 -0
- package/sources/sync/ops.ts +776 -0
- package/sources/sync/persistence.ts +322 -0
- package/sources/sync/profile.ts +95 -0
- package/sources/sync/projectFiles.ts +54 -0
- package/sources/sync/prompt/systemPrompt.ts +20 -0
- package/sources/sync/purchases.ts +67 -0
- package/sources/sync/pushRegistration.ts +229 -0
- package/sources/sync/reducer/activityUpdateAccumulator.test.ts +492 -0
- package/sources/sync/reducer/activityUpdateAccumulator.ts +96 -0
- package/sources/sync/reducer/messageToEvent.ts +85 -0
- package/sources/sync/reducer/phase0-skipping.spec.ts +206 -0
- package/sources/sync/reducer/reducer.spec.ts +3169 -0
- package/sources/sync/reducer/reducer.ts +1214 -0
- package/sources/sync/reducer/reducerTracer.spec.ts +502 -0
- package/sources/sync/reducer/reducerTracer.ts +310 -0
- package/sources/sync/revenueCat/index.ts +21 -0
- package/sources/sync/revenueCat/revenueCat.ts +215 -0
- package/sources/sync/revenueCat/revenueCat.web.ts +238 -0
- package/sources/sync/revenueCat/types.ts +82 -0
- package/sources/sync/serverConfig.ts +72 -0
- package/sources/sync/settings.spec.ts +456 -0
- package/sources/sync/settings.ts +186 -0
- package/sources/sync/storage.ts +1653 -0
- package/sources/sync/storageTypes.spec.ts +24 -0
- package/sources/sync/storageTypes.ts +215 -0
- package/sources/sync/suggestionCommands.ts +149 -0
- package/sources/sync/suggestionFile.ts +206 -0
- package/sources/sync/sync.ts +2555 -0
- package/sources/sync/typesMessage.ts +69 -0
- package/sources/sync/typesMessageMeta.test.ts +14 -0
- package/sources/sync/typesMessageMeta.ts +17 -0
- package/sources/sync/typesRaw.spec.ts +2010 -0
- package/sources/sync/typesRaw.ts +1183 -0
- package/sources/sync/uploadFormFile.ts +29 -0
- package/sources/sync/uploadFormFile.web.ts +14 -0
- package/sources/sync/webTabTitle.ts +58 -0
- package/sources/text/README.md +223 -0
- package/sources/text/_all.ts +104 -0
- package/sources/text/_default.ts +1015 -0
- package/sources/text/index.ts +215 -0
- package/sources/text/translations/ca.ts +993 -0
- package/sources/text/translations/en.ts +1009 -0
- package/sources/text/translations/es.ts +995 -0
- package/sources/text/translations/it.ts +992 -0
- package/sources/text/translations/ja.ts +993 -0
- package/sources/text/translations/pl.ts +1024 -0
- package/sources/text/translations/pt.ts +992 -0
- package/sources/text/translations/ru.ts +1023 -0
- package/sources/text/translations/zh-Hans.ts +992 -0
- package/sources/text/translations/zh-Hant.ts +991 -0
- package/sources/theme.css +72 -0
- package/sources/theme.dark.json +31 -0
- package/sources/theme.figma.json +457 -0
- package/sources/theme.gen.ts +10 -0
- package/sources/theme.light.json +31 -0
- package/sources/theme.ts +452 -0
- package/sources/track/index.ts +171 -0
- package/sources/track/tracking.ts +12 -0
- package/sources/track/useTrackScreens.ts +10 -0
- package/sources/types/react-native-webrtc-web-shim.d.ts +6 -0
- package/sources/unistyles.ts +97 -0
- package/sources/utils/codexUnifiedDiff.spec.ts +43 -0
- package/sources/utils/codexUnifiedDiff.ts +70 -0
- package/sources/utils/consoleLogging.ts +145 -0
- package/sources/utils/copySessionMetadataToClipboard.ts +53 -0
- package/sources/utils/debounce.test.ts +646 -0
- package/sources/utils/debounce.ts +122 -0
- package/sources/utils/deviceCalculations.test.ts +318 -0
- package/sources/utils/deviceCalculations.ts +87 -0
- package/sources/utils/errors.ts +10 -0
- package/sources/utils/formatPermissionParams.ts +23 -0
- package/sources/utils/isTauri.ts +7 -0
- package/sources/utils/loadSkia.ts +3 -0
- package/sources/utils/loadSkia.web.ts +5 -0
- package/sources/utils/lock.ts +40 -0
- package/sources/utils/machineUtils.ts +6 -0
- package/sources/utils/messageUtils.ts +254 -0
- package/sources/utils/microphonePermissions.ts +109 -0
- package/sources/utils/notificationRouting.test.ts +51 -0
- package/sources/utils/notificationRouting.ts +81 -0
- package/sources/utils/oauth.ts +143 -0
- package/sources/utils/openExternalUrl.ts +19 -0
- package/sources/utils/parseToken.ts +23 -0
- package/sources/utils/pasteImages.web.ts +81 -0
- package/sources/utils/pathUtils.spec.ts +226 -0
- package/sources/utils/pathUtils.ts +75 -0
- package/sources/utils/platform.ts +19 -0
- package/sources/utils/readFileBytes.ts +11 -0
- package/sources/utils/readFileBytes.web.ts +12 -0
- package/sources/utils/requestReview.ts +135 -0
- package/sources/utils/responsive.ts +87 -0
- package/sources/utils/resumeCommand.test.ts +78 -0
- package/sources/utils/resumeCommand.ts +70 -0
- package/sources/utils/sessionFileLinks.test.ts +112 -0
- package/sources/utils/sessionFileLinks.ts +388 -0
- package/sources/utils/sessionUtils.ts +226 -0
- package/sources/utils/stringUtils.ts +41 -0
- package/sources/utils/sync.ts +164 -0
- package/sources/utils/thumbhash.ts +17 -0
- package/sources/utils/thumbhash.web.ts +85 -0
- package/sources/utils/time.ts +41 -0
- package/sources/utils/toSnakeCase.test.ts +182 -0
- package/sources/utils/toSnakeCase.ts +40 -0
- package/sources/utils/toolCommand.test.ts +23 -0
- package/sources/utils/toolCommand.ts +35 -0
- package/sources/utils/toolComparison.test.ts +101 -0
- package/sources/utils/toolComparison.ts +73 -0
- package/sources/utils/toolErrorParser.test.ts +126 -0
- package/sources/utils/toolErrorParser.ts +102 -0
- package/sources/utils/trimIdent.ts +27 -0
- package/sources/utils/truncateForLogs.ts +37 -0
- package/sources/utils/versionUtils.test.ts +58 -0
- package/sources/utils/versionUtils.ts +69 -0
- package/sources/utils/web/faviconGenerator.ts +39 -0
- package/sources/utils/worktree.ts +192 -0
- package/sources/wire/index.ts +97 -0
- package/src-tauri/Cargo.lock +5978 -0
- package/src-tauri/Cargo.toml +27 -0
- package/src-tauri/build.rs +3 -0
- package/src-tauri/capabilities/default.json +27 -0
- package/src-tauri/deny.toml +53 -0
- package/src-tauri/entitlements.plist +24 -0
- package/src-tauri/icons/128x128.png +0 -0
- package/src-tauri/icons/128x128@2x.png +0 -0
- package/src-tauri/icons/32x32.png +0 -0
- package/src-tauri/icons/64x64.png +0 -0
- package/src-tauri/icons/Square107x107Logo.png +0 -0
- package/src-tauri/icons/Square142x142Logo.png +0 -0
- package/src-tauri/icons/Square150x150Logo.png +0 -0
- package/src-tauri/icons/Square284x284Logo.png +0 -0
- package/src-tauri/icons/Square30x30Logo.png +0 -0
- package/src-tauri/icons/Square310x310Logo.png +0 -0
- package/src-tauri/icons/Square44x44Logo.png +0 -0
- package/src-tauri/icons/Square71x71Logo.png +0 -0
- package/src-tauri/icons/Square89x89Logo.png +0 -0
- package/src-tauri/icons/StoreLogo.png +0 -0
- package/src-tauri/icons/icon.icns +0 -0
- package/src-tauri/icons/icon.ico +0 -0
- package/src-tauri/icons/icon.png +0 -0
- package/src-tauri/src/lib.rs +18 -0
- package/src-tauri/src/main.rs +6 -0
- package/src-tauri/tauri.conf.json +51 -0
- package/src-tauri/tauri.dev.conf.json +20 -0
- package/src-tauri/tauri.preview.conf.json +20 -0
- package/tsconfig.json +45 -0
- package/vitest.config.ts +26 -0
|
@@ -0,0 +1,1468 @@
|
|
|
1
|
+
import { Ionicons, Octicons } from '@expo/vector-icons';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { View, Platform, useWindowDimensions, ViewStyle, Text, ActivityIndicator, TouchableWithoutFeedback, Image as RNImage, Pressable } from 'react-native';
|
|
4
|
+
import { Image } from 'expo-image';
|
|
5
|
+
import { AgentInputAttachmentStrip } from './AgentInputAttachmentStrip';
|
|
6
|
+
import type { AttachmentPreview } from '@/sync/attachmentTypes';
|
|
7
|
+
import { generateThumbhash } from '@/utils/thumbhash';
|
|
8
|
+
import { layout } from './layout';
|
|
9
|
+
import { MultiTextInput, KeyPressEvent } from './MultiTextInput';
|
|
10
|
+
import { Typography } from '@/constants/Typography';
|
|
11
|
+
import { PermissionMode, ModelMode } from './PermissionModeSelector';
|
|
12
|
+
import { EffortLevel } from './modelModeOptions';
|
|
13
|
+
import { hapticsLight, hapticsError } from './haptics';
|
|
14
|
+
import { Shaker, ShakeInstance } from './Shaker';
|
|
15
|
+
import { StatusDot } from './StatusDot';
|
|
16
|
+
import { useActiveWord } from './autocomplete/useActiveWord';
|
|
17
|
+
import { useActiveSuggestions } from './autocomplete/useActiveSuggestions';
|
|
18
|
+
import { AgentInputAutocomplete } from './AgentInputAutocomplete';
|
|
19
|
+
import { FloatingOverlay } from './FloatingOverlay';
|
|
20
|
+
import { TextInputState, MultiTextInputHandle } from './MultiTextInput';
|
|
21
|
+
import { applySuggestion } from './autocomplete/applySuggestion';
|
|
22
|
+
import { GitStatusBadge, useHasMeaningfulGitStatus } from './GitStatusBadge';
|
|
23
|
+
import { StyleSheet, useUnistyles } from 'react-native-unistyles';
|
|
24
|
+
import { useSetting } from '@/sync/storage';
|
|
25
|
+
import { hackMode, hackModes } from '@/sync/modeHacks';
|
|
26
|
+
import { Theme } from '@/theme';
|
|
27
|
+
import { t } from '@/text';
|
|
28
|
+
import { Metadata } from '@/sync/storageTypes';
|
|
29
|
+
|
|
30
|
+
interface AgentInputProps {
|
|
31
|
+
// `initialValue` seeds the uncontrolled textarea once; keystrokes never
|
|
32
|
+
// round-trip back into it via React, which is what keeps fast typing/
|
|
33
|
+
// deletion crisp. The parent reads the live text via the imperative ref.
|
|
34
|
+
initialValue: string;
|
|
35
|
+
placeholder: string;
|
|
36
|
+
// Fires on every keystroke so the parent can sync derived state (drafts,
|
|
37
|
+
// hasText) — typically wrapped in startTransition / debounce by the caller.
|
|
38
|
+
onChangeText?: (text: string) => void;
|
|
39
|
+
sessionId?: string;
|
|
40
|
+
onSend: () => void;
|
|
41
|
+
sendIcon?: React.ReactNode;
|
|
42
|
+
onMicPress?: () => void;
|
|
43
|
+
isMicActive?: boolean;
|
|
44
|
+
permissionMode?: PermissionMode | null;
|
|
45
|
+
availableModes?: PermissionMode[];
|
|
46
|
+
onPermissionModeChange?: (mode: PermissionMode) => void;
|
|
47
|
+
modelMode?: ModelMode | null;
|
|
48
|
+
availableModels?: ModelMode[];
|
|
49
|
+
onModelModeChange?: (mode: ModelMode) => void;
|
|
50
|
+
effortLevel?: EffortLevel | null;
|
|
51
|
+
availableEffortLevels?: EffortLevel[];
|
|
52
|
+
onEffortLevelChange?: (level: EffortLevel) => void;
|
|
53
|
+
metadata?: Metadata | null;
|
|
54
|
+
onAbort?: () => void | Promise<void>;
|
|
55
|
+
showAbortButton?: boolean;
|
|
56
|
+
connectionStatus?: {
|
|
57
|
+
text: string;
|
|
58
|
+
color: string;
|
|
59
|
+
dotColor: string;
|
|
60
|
+
isPulsing?: boolean;
|
|
61
|
+
cliStatus?: {
|
|
62
|
+
claude: boolean | null;
|
|
63
|
+
codex: boolean | null;
|
|
64
|
+
gemini?: boolean | null;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
autocompletePrefixes: string[];
|
|
68
|
+
autocompleteSuggestions: (query: string) => Promise<{ key: string, text: string, component: React.ElementType }[]>;
|
|
69
|
+
usageData?: {
|
|
70
|
+
inputTokens: number;
|
|
71
|
+
outputTokens: number;
|
|
72
|
+
cacheCreation: number;
|
|
73
|
+
cacheRead: number;
|
|
74
|
+
contextSize: number;
|
|
75
|
+
};
|
|
76
|
+
alwaysShowContextSize?: boolean;
|
|
77
|
+
onFileViewerPress?: () => void;
|
|
78
|
+
agentType?: 'claude' | 'codex' | 'gemini' | 'openclaw';
|
|
79
|
+
onAgentClick?: () => void;
|
|
80
|
+
machineName?: string | null;
|
|
81
|
+
onMachineClick?: () => void;
|
|
82
|
+
currentPath?: string | null;
|
|
83
|
+
onPathClick?: () => void;
|
|
84
|
+
blockSend?: boolean;
|
|
85
|
+
isSendDisabled?: boolean;
|
|
86
|
+
isSending?: boolean;
|
|
87
|
+
minHeight?: number;
|
|
88
|
+
zenMode?: boolean;
|
|
89
|
+
/** Image attachments waiting to be sent (expImageUpload feature). */
|
|
90
|
+
selectedImages?: AttachmentPreview[];
|
|
91
|
+
onPickImages?: () => void;
|
|
92
|
+
onRemoveImage?: (id: string) => void;
|
|
93
|
+
onAddImages?: (images: AttachmentPreview[]) => void;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const MAX_CONTEXT_SIZE = 190000;
|
|
97
|
+
|
|
98
|
+
const stylesheet = StyleSheet.create((theme, runtime) => ({
|
|
99
|
+
container: {
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
paddingBottom: 8,
|
|
102
|
+
paddingTop: 8,
|
|
103
|
+
},
|
|
104
|
+
innerContainer: {
|
|
105
|
+
width: '100%',
|
|
106
|
+
position: 'relative',
|
|
107
|
+
},
|
|
108
|
+
unifiedPanel: {
|
|
109
|
+
backgroundColor: theme.colors.input.background,
|
|
110
|
+
borderRadius: Platform.select({ default: 16, android: 20 }),
|
|
111
|
+
overflow: 'hidden',
|
|
112
|
+
paddingVertical: 2,
|
|
113
|
+
paddingBottom: 8,
|
|
114
|
+
paddingHorizontal: 8,
|
|
115
|
+
},
|
|
116
|
+
inputContainer: {
|
|
117
|
+
flexDirection: 'row',
|
|
118
|
+
alignItems: 'center',
|
|
119
|
+
borderWidth: 0,
|
|
120
|
+
paddingLeft: 8,
|
|
121
|
+
paddingRight: 8,
|
|
122
|
+
paddingVertical: 4,
|
|
123
|
+
minHeight: 40,
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
// Overlay styles
|
|
127
|
+
autocompleteOverlay: {
|
|
128
|
+
position: 'absolute',
|
|
129
|
+
bottom: '100%',
|
|
130
|
+
left: 0,
|
|
131
|
+
right: 0,
|
|
132
|
+
marginBottom: 8,
|
|
133
|
+
zIndex: 1000,
|
|
134
|
+
},
|
|
135
|
+
settingsOverlay: {
|
|
136
|
+
position: 'absolute',
|
|
137
|
+
bottom: '100%',
|
|
138
|
+
left: 0,
|
|
139
|
+
right: 0,
|
|
140
|
+
marginBottom: 8,
|
|
141
|
+
zIndex: 1000,
|
|
142
|
+
},
|
|
143
|
+
overlayBackdrop: {
|
|
144
|
+
position: 'absolute',
|
|
145
|
+
top: -1000,
|
|
146
|
+
left: -1000,
|
|
147
|
+
right: -1000,
|
|
148
|
+
bottom: -1000,
|
|
149
|
+
zIndex: 999,
|
|
150
|
+
},
|
|
151
|
+
overlaySection: {
|
|
152
|
+
paddingVertical: 8,
|
|
153
|
+
},
|
|
154
|
+
overlaySectionTitle: {
|
|
155
|
+
fontSize: 12,
|
|
156
|
+
fontWeight: '600',
|
|
157
|
+
color: theme.colors.textSecondary,
|
|
158
|
+
paddingHorizontal: 16,
|
|
159
|
+
paddingBottom: 4,
|
|
160
|
+
...Typography.default('semiBold'),
|
|
161
|
+
},
|
|
162
|
+
overlayDivider: {
|
|
163
|
+
height: 1,
|
|
164
|
+
backgroundColor: theme.colors.divider,
|
|
165
|
+
marginHorizontal: 16,
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
// Selection styles
|
|
169
|
+
selectionItem: {
|
|
170
|
+
flexDirection: 'row',
|
|
171
|
+
alignItems: 'center',
|
|
172
|
+
paddingHorizontal: 16,
|
|
173
|
+
paddingVertical: 8,
|
|
174
|
+
backgroundColor: 'transparent',
|
|
175
|
+
},
|
|
176
|
+
selectionItemPressed: {
|
|
177
|
+
backgroundColor: theme.colors.surfacePressed,
|
|
178
|
+
},
|
|
179
|
+
radioButton: {
|
|
180
|
+
width: 16,
|
|
181
|
+
height: 16,
|
|
182
|
+
borderRadius: 8,
|
|
183
|
+
borderWidth: 2,
|
|
184
|
+
alignItems: 'center',
|
|
185
|
+
justifyContent: 'center',
|
|
186
|
+
marginRight: 12,
|
|
187
|
+
},
|
|
188
|
+
radioButtonActive: {
|
|
189
|
+
borderColor: theme.colors.radio.active,
|
|
190
|
+
},
|
|
191
|
+
radioButtonInactive: {
|
|
192
|
+
borderColor: theme.colors.radio.inactive,
|
|
193
|
+
},
|
|
194
|
+
radioButtonDot: {
|
|
195
|
+
width: 6,
|
|
196
|
+
height: 6,
|
|
197
|
+
borderRadius: 3,
|
|
198
|
+
backgroundColor: theme.colors.radio.dot,
|
|
199
|
+
},
|
|
200
|
+
selectionLabel: {
|
|
201
|
+
fontSize: 14,
|
|
202
|
+
...Typography.default(),
|
|
203
|
+
},
|
|
204
|
+
selectionLabelActive: {
|
|
205
|
+
color: theme.colors.radio.active,
|
|
206
|
+
},
|
|
207
|
+
selectionLabelInactive: {
|
|
208
|
+
color: theme.colors.text,
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
// Status styles
|
|
212
|
+
statusContainer: {
|
|
213
|
+
flexDirection: 'row',
|
|
214
|
+
alignItems: 'center',
|
|
215
|
+
justifyContent: 'space-between',
|
|
216
|
+
paddingHorizontal: 16,
|
|
217
|
+
paddingBottom: 4,
|
|
218
|
+
},
|
|
219
|
+
statusRow: {
|
|
220
|
+
flexDirection: 'row',
|
|
221
|
+
alignItems: 'center',
|
|
222
|
+
},
|
|
223
|
+
statusText: {
|
|
224
|
+
fontSize: 11,
|
|
225
|
+
...Typography.default(),
|
|
226
|
+
},
|
|
227
|
+
permissionModeContainer: {
|
|
228
|
+
flexDirection: 'column',
|
|
229
|
+
alignItems: 'flex-end',
|
|
230
|
+
},
|
|
231
|
+
permissionModeText: {
|
|
232
|
+
fontSize: 11,
|
|
233
|
+
...Typography.default(),
|
|
234
|
+
},
|
|
235
|
+
contextWarningText: {
|
|
236
|
+
fontSize: 11,
|
|
237
|
+
marginLeft: 8,
|
|
238
|
+
...Typography.default(),
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
// Button styles
|
|
242
|
+
actionButtonsContainer: {
|
|
243
|
+
flexDirection: 'row',
|
|
244
|
+
alignItems: 'center',
|
|
245
|
+
justifyContent: 'space-between',
|
|
246
|
+
paddingHorizontal: 0,
|
|
247
|
+
},
|
|
248
|
+
actionButtonsLeft: {
|
|
249
|
+
flexDirection: 'row',
|
|
250
|
+
gap: 8,
|
|
251
|
+
flex: 1,
|
|
252
|
+
overflow: 'hidden',
|
|
253
|
+
},
|
|
254
|
+
actionButton: {
|
|
255
|
+
flexDirection: 'row',
|
|
256
|
+
alignItems: 'center',
|
|
257
|
+
borderRadius: Platform.select({ default: 16, android: 20 }),
|
|
258
|
+
paddingHorizontal: 8,
|
|
259
|
+
paddingVertical: 6,
|
|
260
|
+
justifyContent: 'center',
|
|
261
|
+
height: 32,
|
|
262
|
+
},
|
|
263
|
+
actionButtonPressed: {
|
|
264
|
+
opacity: 0.7,
|
|
265
|
+
},
|
|
266
|
+
actionButtonIcon: {
|
|
267
|
+
color: theme.colors.button.secondary.tint,
|
|
268
|
+
},
|
|
269
|
+
sendButton: {
|
|
270
|
+
width: 32,
|
|
271
|
+
height: 32,
|
|
272
|
+
borderRadius: 16,
|
|
273
|
+
justifyContent: 'center',
|
|
274
|
+
alignItems: 'center',
|
|
275
|
+
flexShrink: 0,
|
|
276
|
+
marginLeft: 8,
|
|
277
|
+
},
|
|
278
|
+
sendButtonActive: {
|
|
279
|
+
backgroundColor: theme.colors.button.primary.background,
|
|
280
|
+
},
|
|
281
|
+
sendButtonInactive: {
|
|
282
|
+
backgroundColor: theme.colors.button.primary.disabled,
|
|
283
|
+
},
|
|
284
|
+
sendButtonLocked: {
|
|
285
|
+
backgroundColor: theme.colors.surfaceHigh,
|
|
286
|
+
borderWidth: 1,
|
|
287
|
+
borderColor: theme.colors.divider,
|
|
288
|
+
},
|
|
289
|
+
sendButtonInner: {
|
|
290
|
+
width: '100%',
|
|
291
|
+
height: '100%',
|
|
292
|
+
alignItems: 'center',
|
|
293
|
+
justifyContent: 'center',
|
|
294
|
+
},
|
|
295
|
+
sendButtonInnerPressed: {
|
|
296
|
+
opacity: 0.7,
|
|
297
|
+
},
|
|
298
|
+
sendButtonIcon: {
|
|
299
|
+
color: theme.colors.button.primary.tint,
|
|
300
|
+
},
|
|
301
|
+
}));
|
|
302
|
+
|
|
303
|
+
const getContextWarning = (contextSize: number, alwaysShow: boolean = false, theme: Theme) => {
|
|
304
|
+
const percentageUsed = (contextSize / MAX_CONTEXT_SIZE) * 100;
|
|
305
|
+
const percentageRemaining = Math.max(0, Math.min(100, 100 - percentageUsed));
|
|
306
|
+
|
|
307
|
+
if (percentageRemaining <= 5) {
|
|
308
|
+
return { text: t('agentInput.context.remaining', { percent: Math.round(percentageRemaining) }), color: theme.colors.warningCritical };
|
|
309
|
+
} else if (percentageRemaining <= 10) {
|
|
310
|
+
return { text: t('agentInput.context.remaining', { percent: Math.round(percentageRemaining) }), color: theme.colors.warning };
|
|
311
|
+
} else if (alwaysShow) {
|
|
312
|
+
// Show context remaining in neutral color when not near limit
|
|
313
|
+
return { text: t('agentInput.context.remaining', { percent: Math.round(percentageRemaining) }), color: theme.colors.warning };
|
|
314
|
+
}
|
|
315
|
+
return null; // No display needed
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
// Stable sub-trees extracted from AgentInput so they don't reconcile when
|
|
319
|
+
// the input's keystroke-derived state (hasText / inputState) flips. Their
|
|
320
|
+
// props are derived from session metadata, not from the textarea content,
|
|
321
|
+
// so memo skips re-render on typing entirely.
|
|
322
|
+
|
|
323
|
+
type StatusRowProps = {
|
|
324
|
+
connectionStatus?: AgentInputProps['connectionStatus'];
|
|
325
|
+
contextWarning: { text: string; color: string } | null;
|
|
326
|
+
displayPermissionMode: ReturnType<typeof hackMode> | null;
|
|
327
|
+
permissionModeKey: string;
|
|
328
|
+
isSandboxedYoloMode: boolean;
|
|
329
|
+
permissionLabel: string | null;
|
|
330
|
+
zenMode?: boolean;
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
const AgentInputStatusRow = React.memo(function AgentInputStatusRow(p: StatusRowProps) {
|
|
334
|
+
const { theme } = useUnistyles();
|
|
335
|
+
const showPermissionBadge = !!p.displayPermissionMode
|
|
336
|
+
&& p.permissionModeKey !== 'default'
|
|
337
|
+
&& !p.zenMode
|
|
338
|
+
&& !!p.permissionLabel;
|
|
339
|
+
if (!p.connectionStatus && !p.contextWarning && !showPermissionBadge) {
|
|
340
|
+
return null;
|
|
341
|
+
}
|
|
342
|
+
return (
|
|
343
|
+
<View style={{
|
|
344
|
+
flexDirection: 'row',
|
|
345
|
+
alignItems: 'center',
|
|
346
|
+
justifyContent: 'space-between',
|
|
347
|
+
paddingHorizontal: 16,
|
|
348
|
+
paddingBottom: 4,
|
|
349
|
+
minHeight: 20,
|
|
350
|
+
}}>
|
|
351
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', flex: 1, gap: 11 }}>
|
|
352
|
+
{p.connectionStatus && (
|
|
353
|
+
<>
|
|
354
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
355
|
+
<StatusDot
|
|
356
|
+
color={p.connectionStatus.dotColor}
|
|
357
|
+
isPulsing={p.connectionStatus.isPulsing}
|
|
358
|
+
size={6}
|
|
359
|
+
/>
|
|
360
|
+
<Text style={{
|
|
361
|
+
fontSize: 11,
|
|
362
|
+
color: p.connectionStatus.color,
|
|
363
|
+
...Typography.default()
|
|
364
|
+
}}>
|
|
365
|
+
{p.connectionStatus.text}
|
|
366
|
+
</Text>
|
|
367
|
+
</View>
|
|
368
|
+
{p.connectionStatus.cliStatus && (
|
|
369
|
+
<>
|
|
370
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
371
|
+
<Text style={{
|
|
372
|
+
fontSize: 11,
|
|
373
|
+
color: p.connectionStatus.cliStatus.claude ? theme.colors.success : theme.colors.textDestructive,
|
|
374
|
+
...Typography.default()
|
|
375
|
+
}}>
|
|
376
|
+
{p.connectionStatus.cliStatus.claude ? '✓' : '✗'}
|
|
377
|
+
</Text>
|
|
378
|
+
<Text style={{
|
|
379
|
+
fontSize: 11,
|
|
380
|
+
color: p.connectionStatus.cliStatus.claude ? theme.colors.success : theme.colors.textDestructive,
|
|
381
|
+
...Typography.default()
|
|
382
|
+
}}>
|
|
383
|
+
claude
|
|
384
|
+
</Text>
|
|
385
|
+
</View>
|
|
386
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
387
|
+
<Text style={{
|
|
388
|
+
fontSize: 11,
|
|
389
|
+
color: p.connectionStatus.cliStatus.codex ? theme.colors.success : theme.colors.textDestructive,
|
|
390
|
+
...Typography.default()
|
|
391
|
+
}}>
|
|
392
|
+
{p.connectionStatus.cliStatus.codex ? '✓' : '✗'}
|
|
393
|
+
</Text>
|
|
394
|
+
<Text style={{
|
|
395
|
+
fontSize: 11,
|
|
396
|
+
color: p.connectionStatus.cliStatus.codex ? theme.colors.success : theme.colors.textDestructive,
|
|
397
|
+
...Typography.default()
|
|
398
|
+
}}>
|
|
399
|
+
codex
|
|
400
|
+
</Text>
|
|
401
|
+
</View>
|
|
402
|
+
{p.connectionStatus.cliStatus.gemini !== undefined && (
|
|
403
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
404
|
+
<Text style={{
|
|
405
|
+
fontSize: 11,
|
|
406
|
+
color: p.connectionStatus.cliStatus.gemini ? theme.colors.success : theme.colors.textDestructive,
|
|
407
|
+
...Typography.default()
|
|
408
|
+
}}>
|
|
409
|
+
{p.connectionStatus.cliStatus.gemini ? '✓' : '✗'}
|
|
410
|
+
</Text>
|
|
411
|
+
<Text style={{
|
|
412
|
+
fontSize: 11,
|
|
413
|
+
color: p.connectionStatus.cliStatus.gemini ? theme.colors.success : theme.colors.textDestructive,
|
|
414
|
+
...Typography.default()
|
|
415
|
+
}}>
|
|
416
|
+
gemini
|
|
417
|
+
</Text>
|
|
418
|
+
</View>
|
|
419
|
+
)}
|
|
420
|
+
</>
|
|
421
|
+
)}
|
|
422
|
+
</>
|
|
423
|
+
)}
|
|
424
|
+
{p.contextWarning && (
|
|
425
|
+
<Text style={{
|
|
426
|
+
fontSize: 11,
|
|
427
|
+
color: p.contextWarning.color,
|
|
428
|
+
marginLeft: p.connectionStatus ? 8 : 0,
|
|
429
|
+
...Typography.default()
|
|
430
|
+
}}>
|
|
431
|
+
{p.connectionStatus ? '• ' : ''}{p.contextWarning.text}
|
|
432
|
+
</Text>
|
|
433
|
+
)}
|
|
434
|
+
</View>
|
|
435
|
+
{showPermissionBadge && (() => {
|
|
436
|
+
const permColor = p.isSandboxedYoloMode ? '#4169E1' :
|
|
437
|
+
p.permissionModeKey === 'acceptEdits' ? theme.colors.permission.acceptEdits :
|
|
438
|
+
p.permissionModeKey === 'bypassPermissions' ? theme.colors.permission.bypass :
|
|
439
|
+
p.permissionModeKey === 'plan' ? theme.colors.permission.plan :
|
|
440
|
+
p.permissionModeKey === 'read-only' ? theme.colors.permission.readOnly :
|
|
441
|
+
p.permissionModeKey === 'safe-yolo' ? theme.colors.permission.safeYolo :
|
|
442
|
+
p.permissionModeKey === 'yolo' ? theme.colors.permission.yolo :
|
|
443
|
+
theme.colors.textSecondary;
|
|
444
|
+
const permIcon: 'play-forward' | 'pause' =
|
|
445
|
+
p.permissionModeKey === 'plan' || p.permissionModeKey === 'read-only'
|
|
446
|
+
? 'pause' : 'play-forward';
|
|
447
|
+
return (
|
|
448
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
449
|
+
<Ionicons name={permIcon} size={11} color={permColor} />
|
|
450
|
+
<Text style={{
|
|
451
|
+
fontSize: 11,
|
|
452
|
+
color: permColor,
|
|
453
|
+
...Typography.default()
|
|
454
|
+
}}>
|
|
455
|
+
{p.permissionLabel}
|
|
456
|
+
</Text>
|
|
457
|
+
</View>
|
|
458
|
+
);
|
|
459
|
+
})()}
|
|
460
|
+
</View>
|
|
461
|
+
);
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
type ContextChipsProps = {
|
|
465
|
+
machineName?: string | null;
|
|
466
|
+
onMachineClick?: () => void;
|
|
467
|
+
currentPath?: string | null;
|
|
468
|
+
onPathClick?: () => void;
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
const AgentInputContextChips = React.memo(function AgentInputContextChips(p: ContextChipsProps) {
|
|
472
|
+
const { theme } = useUnistyles();
|
|
473
|
+
if (p.machineName === undefined && !p.currentPath) {
|
|
474
|
+
return null;
|
|
475
|
+
}
|
|
476
|
+
return (
|
|
477
|
+
<View style={{
|
|
478
|
+
backgroundColor: theme.colors.surfacePressed,
|
|
479
|
+
borderRadius: 12,
|
|
480
|
+
padding: 8,
|
|
481
|
+
marginBottom: 8,
|
|
482
|
+
gap: 4,
|
|
483
|
+
}}>
|
|
484
|
+
{p.machineName !== undefined && p.onMachineClick && (
|
|
485
|
+
<Pressable
|
|
486
|
+
onPress={() => {
|
|
487
|
+
hapticsLight();
|
|
488
|
+
p.onMachineClick?.();
|
|
489
|
+
}}
|
|
490
|
+
hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
|
|
491
|
+
style={(s) => ({
|
|
492
|
+
flexDirection: 'row',
|
|
493
|
+
alignItems: 'center',
|
|
494
|
+
borderRadius: Platform.select({ default: 16, android: 20 }),
|
|
495
|
+
paddingHorizontal: 10,
|
|
496
|
+
paddingVertical: 6,
|
|
497
|
+
height: 32,
|
|
498
|
+
opacity: s.pressed ? 0.7 : 1,
|
|
499
|
+
gap: 6,
|
|
500
|
+
})}
|
|
501
|
+
>
|
|
502
|
+
<Ionicons name="desktop-outline" size={14} color={theme.colors.textSecondary} />
|
|
503
|
+
<Text style={{
|
|
504
|
+
fontSize: 13,
|
|
505
|
+
color: theme.colors.text,
|
|
506
|
+
fontWeight: '600',
|
|
507
|
+
...Typography.default('semiBold'),
|
|
508
|
+
}}>
|
|
509
|
+
{p.machineName === null ? t('agentInput.noMachinesAvailable') : p.machineName}
|
|
510
|
+
</Text>
|
|
511
|
+
</Pressable>
|
|
512
|
+
)}
|
|
513
|
+
{p.currentPath && p.onPathClick && (
|
|
514
|
+
<Pressable
|
|
515
|
+
onPress={() => {
|
|
516
|
+
hapticsLight();
|
|
517
|
+
p.onPathClick?.();
|
|
518
|
+
}}
|
|
519
|
+
hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
|
|
520
|
+
style={(s) => ({
|
|
521
|
+
flexDirection: 'row',
|
|
522
|
+
alignItems: 'center',
|
|
523
|
+
borderRadius: Platform.select({ default: 16, android: 20 }),
|
|
524
|
+
paddingHorizontal: 10,
|
|
525
|
+
paddingVertical: 6,
|
|
526
|
+
height: 32,
|
|
527
|
+
opacity: s.pressed ? 0.7 : 1,
|
|
528
|
+
gap: 6,
|
|
529
|
+
})}
|
|
530
|
+
>
|
|
531
|
+
<Ionicons name="folder-outline" size={14} color={theme.colors.textSecondary} />
|
|
532
|
+
<Text style={{
|
|
533
|
+
fontSize: 13,
|
|
534
|
+
color: theme.colors.text,
|
|
535
|
+
fontWeight: '600',
|
|
536
|
+
...Typography.default('semiBold'),
|
|
537
|
+
}}>
|
|
538
|
+
{p.currentPath}
|
|
539
|
+
</Text>
|
|
540
|
+
</Pressable>
|
|
541
|
+
)}
|
|
542
|
+
</View>
|
|
543
|
+
);
|
|
544
|
+
});
|
|
545
|
+
|
|
546
|
+
export const AgentInput = React.memo(React.forwardRef<MultiTextInputHandle, AgentInputProps>((props, ref) => {
|
|
547
|
+
const styles = stylesheet;
|
|
548
|
+
const { theme } = useUnistyles();
|
|
549
|
+
const screenWidth = useWindowDimensions().width;
|
|
550
|
+
const isSendBlocked = props.blockSend ?? false;
|
|
551
|
+
|
|
552
|
+
// `hasText` drives only the send-button appearance/enabled state. It's
|
|
553
|
+
// updated via startTransition from the keystroke handler so a busy reducer
|
|
554
|
+
// never blocks the next character from landing in the textarea.
|
|
555
|
+
const [hasText, setHasText] = React.useState(() => props.initialValue.trim().length > 0);
|
|
556
|
+
const hasImages = (props.selectedImages?.length ?? 0) > 0;
|
|
557
|
+
const canPressSendButton = !props.isSending
|
|
558
|
+
&& !props.isSendDisabled
|
|
559
|
+
&& (isSendBlocked ? (hasText || hasImages) : (hasText || hasImages || !!props.onMicPress));
|
|
560
|
+
|
|
561
|
+
// Check if this is a Codex, Gemini, or OpenClaw session
|
|
562
|
+
// Use metadata.flavor for existing sessions, agentType prop for new sessions
|
|
563
|
+
const isCodex = props.metadata?.flavor === 'codex' || props.agentType === 'codex';
|
|
564
|
+
const isGemini = props.metadata?.flavor === 'gemini' || props.agentType === 'gemini';
|
|
565
|
+
const isOpenClaw = props.metadata?.flavor === 'openclaw' || props.agentType === 'openclaw';
|
|
566
|
+
const displayPermissionMode = React.useMemo(() => (
|
|
567
|
+
props.permissionMode ? hackMode(props.permissionMode) : null
|
|
568
|
+
), [props.permissionMode]);
|
|
569
|
+
const permissionModeKey = displayPermissionMode?.key ?? 'default';
|
|
570
|
+
const availableModes = React.useMemo(() => (
|
|
571
|
+
hackModes(props.availableModes ?? [])
|
|
572
|
+
), [props.availableModes]);
|
|
573
|
+
const availableModels = props.availableModels ?? [];
|
|
574
|
+
const availableEffortLevels = props.availableEffortLevels ?? [];
|
|
575
|
+
const isSandboxEnabled = React.useMemo(() => {
|
|
576
|
+
const sandbox = props.metadata?.sandbox as unknown;
|
|
577
|
+
if (!sandbox) {
|
|
578
|
+
return false;
|
|
579
|
+
}
|
|
580
|
+
if (typeof sandbox === 'object' && sandbox !== null && 'enabled' in sandbox) {
|
|
581
|
+
return Boolean((sandbox as { enabled?: unknown }).enabled);
|
|
582
|
+
}
|
|
583
|
+
return true;
|
|
584
|
+
}, [props.metadata?.sandbox]);
|
|
585
|
+
const isSandboxedYoloMode = isSandboxEnabled && (
|
|
586
|
+
permissionModeKey === 'bypassPermissions' || permissionModeKey === 'yolo'
|
|
587
|
+
);
|
|
588
|
+
|
|
589
|
+
const withSandboxSuffix = React.useCallback((label: string, modeKey?: string) => {
|
|
590
|
+
if (!isSandboxEnabled) {
|
|
591
|
+
return label;
|
|
592
|
+
}
|
|
593
|
+
if (modeKey === 'bypassPermissions' || modeKey === 'yolo') {
|
|
594
|
+
return `${label} (sandboxed)`;
|
|
595
|
+
}
|
|
596
|
+
return label;
|
|
597
|
+
}, [isSandboxEnabled]);
|
|
598
|
+
|
|
599
|
+
// Calculate context warning
|
|
600
|
+
const contextWarning = props.usageData?.contextSize
|
|
601
|
+
? getContextWarning(props.usageData.contextSize, props.alwaysShowContextSize ?? false, theme)
|
|
602
|
+
: null;
|
|
603
|
+
|
|
604
|
+
const agentInputEnterToSend = useSetting('agentInputEnterToSend');
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
// Abort button state
|
|
608
|
+
const [isAborting, setIsAborting] = React.useState(false);
|
|
609
|
+
const shakerRef = React.useRef<ShakeInstance>(null);
|
|
610
|
+
const sendBlockShakerRef = React.useRef<ShakeInstance>(null);
|
|
611
|
+
const inputRef = React.useRef<MultiTextInputHandle>(null);
|
|
612
|
+
|
|
613
|
+
// Forward ref to the MultiTextInput
|
|
614
|
+
React.useImperativeHandle(ref, () => inputRef.current!, []);
|
|
615
|
+
|
|
616
|
+
// Web paste/drag — intercept image pastes and file drops for the
|
|
617
|
+
// attachment feature. Both handlers funnel through props.onAddImages.
|
|
618
|
+
React.useEffect(() => {
|
|
619
|
+
if (Platform.OS !== 'web' || !props.onAddImages) return;
|
|
620
|
+
|
|
621
|
+
const handlePaste = async (e: ClipboardEvent) => {
|
|
622
|
+
// Only handle pastes targeted at a focused text-editable element.
|
|
623
|
+
// The listener is attached to document, so without this guard a
|
|
624
|
+
// paste in the URL bar, another modal, or any focused-elsewhere
|
|
625
|
+
// input would steal images intended for somewhere else.
|
|
626
|
+
const active = document.activeElement;
|
|
627
|
+
const isEditableTarget = active instanceof HTMLInputElement
|
|
628
|
+
|| active instanceof HTMLTextAreaElement
|
|
629
|
+
|| (active instanceof HTMLElement && active.isContentEditable);
|
|
630
|
+
if (!isEditableTarget) return;
|
|
631
|
+
|
|
632
|
+
const { getImagesFromClipboard, fileToAttachmentPreview } = await import('@/utils/pasteImages.web');
|
|
633
|
+
const files = getImagesFromClipboard(e);
|
|
634
|
+
if (!files.length) return;
|
|
635
|
+
e.preventDefault();
|
|
636
|
+
const previews = (await Promise.all(
|
|
637
|
+
files.map((f) => fileToAttachmentPreview(f, generateThumbhash))
|
|
638
|
+
)).filter(Boolean) as Omit<AttachmentPreview, 'id'>[];
|
|
639
|
+
if (previews.length) {
|
|
640
|
+
props.onAddImages!(previews.map((p) => ({
|
|
641
|
+
...p,
|
|
642
|
+
id: `paste_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
643
|
+
})));
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
|
|
647
|
+
// dragover must call preventDefault for drop to fire; we gate on
|
|
648
|
+
// `types.includes('Files')` so we don't hijack drag-text/HTML in the
|
|
649
|
+
// rest of the app.
|
|
650
|
+
const isFileDrag = (e: DragEvent) => {
|
|
651
|
+
const types = e.dataTransfer?.types;
|
|
652
|
+
if (!types) return false;
|
|
653
|
+
// DataTransferItemList vs DOMStringList — both expose .includes-ish.
|
|
654
|
+
for (let i = 0; i < types.length; i++) {
|
|
655
|
+
if (types[i] === 'Files') return true;
|
|
656
|
+
}
|
|
657
|
+
return false;
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
const handleDragOver = (e: DragEvent) => {
|
|
661
|
+
if (!isFileDrag(e)) return;
|
|
662
|
+
e.preventDefault();
|
|
663
|
+
if (e.dataTransfer) e.dataTransfer.dropEffect = 'copy';
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
const handleDrop = async (e: DragEvent) => {
|
|
667
|
+
if (!isFileDrag(e)) return;
|
|
668
|
+
e.preventDefault();
|
|
669
|
+
const { getImagesFromDrop, fileToAttachmentPreview } = await import('@/utils/pasteImages.web');
|
|
670
|
+
const files = getImagesFromDrop(e);
|
|
671
|
+
if (!files.length) return;
|
|
672
|
+
const previews = (await Promise.all(
|
|
673
|
+
files.map((f) => fileToAttachmentPreview(f, generateThumbhash))
|
|
674
|
+
)).filter(Boolean) as Omit<AttachmentPreview, 'id'>[];
|
|
675
|
+
if (previews.length) {
|
|
676
|
+
props.onAddImages!(previews.map((p) => ({
|
|
677
|
+
...p,
|
|
678
|
+
id: `drop_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
679
|
+
})));
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
document.addEventListener('paste', handlePaste as any);
|
|
684
|
+
document.addEventListener('dragover', handleDragOver);
|
|
685
|
+
document.addEventListener('drop', handleDrop);
|
|
686
|
+
return () => {
|
|
687
|
+
document.removeEventListener('paste', handlePaste as any);
|
|
688
|
+
document.removeEventListener('dragover', handleDragOver);
|
|
689
|
+
document.removeEventListener('drop', handleDrop);
|
|
690
|
+
};
|
|
691
|
+
}, [props.onAddImages]);
|
|
692
|
+
|
|
693
|
+
// Autocomplete state — text + selection. Updated via startTransition so
|
|
694
|
+
// typing renders the character immediately and the autocomplete pipeline
|
|
695
|
+
// catches up on the next idle frame instead of blocking input.
|
|
696
|
+
const [inputState, setInputState] = React.useState<TextInputState>(() => ({
|
|
697
|
+
text: props.initialValue,
|
|
698
|
+
selection: { start: props.initialValue.length, end: props.initialValue.length }
|
|
699
|
+
}));
|
|
700
|
+
|
|
701
|
+
const onChangeTextProp = props.onChangeText;
|
|
702
|
+
const handleTextChange = React.useCallback((text: string) => {
|
|
703
|
+
React.startTransition(() => {
|
|
704
|
+
setHasText(text.trim().length > 0);
|
|
705
|
+
});
|
|
706
|
+
onChangeTextProp?.(text);
|
|
707
|
+
}, [onChangeTextProp]);
|
|
708
|
+
|
|
709
|
+
const handleInputStateChange = React.useCallback((newState: TextInputState) => {
|
|
710
|
+
React.startTransition(() => {
|
|
711
|
+
setInputState(newState);
|
|
712
|
+
});
|
|
713
|
+
}, []);
|
|
714
|
+
|
|
715
|
+
// Use the tracked selection from inputState
|
|
716
|
+
const activeWord = useActiveWord(inputState.text, inputState.selection, props.autocompletePrefixes);
|
|
717
|
+
// Using default options: clampSelection=true, autoSelectFirst=true, wrapAround=true
|
|
718
|
+
// To customize: useActiveSuggestions(activeWord, props.autocompleteSuggestions, { clampSelection: false, wrapAround: false })
|
|
719
|
+
const [suggestions, selected, moveUp, moveDown] = useActiveSuggestions(activeWord, props.autocompleteSuggestions, { clampSelection: true, wrapAround: true });
|
|
720
|
+
|
|
721
|
+
// Debug logging
|
|
722
|
+
// React.useEffect(() => {
|
|
723
|
+
// console.log('🔍 Autocomplete Debug:', JSON.stringify({
|
|
724
|
+
// value: props.value,
|
|
725
|
+
// inputState,
|
|
726
|
+
// activeWord,
|
|
727
|
+
// suggestionsCount: suggestions.length,
|
|
728
|
+
// selected,
|
|
729
|
+
// prefixes: props.autocompletePrefixes
|
|
730
|
+
// }, null, 2));
|
|
731
|
+
// }, [props.value, inputState, activeWord, suggestions.length, selected]);
|
|
732
|
+
|
|
733
|
+
// Handle suggestion selection
|
|
734
|
+
const handleSuggestionSelect = React.useCallback((index: number) => {
|
|
735
|
+
if (!suggestions[index] || !inputRef.current) return;
|
|
736
|
+
|
|
737
|
+
const suggestion = suggestions[index];
|
|
738
|
+
|
|
739
|
+
// Apply the suggestion
|
|
740
|
+
const result = applySuggestion(
|
|
741
|
+
inputState.text,
|
|
742
|
+
inputState.selection,
|
|
743
|
+
suggestion.text,
|
|
744
|
+
props.autocompletePrefixes,
|
|
745
|
+
true // add space after
|
|
746
|
+
);
|
|
747
|
+
|
|
748
|
+
// Use imperative API to set text and selection
|
|
749
|
+
inputRef.current.setTextAndSelection(result.text, {
|
|
750
|
+
start: result.cursorPosition,
|
|
751
|
+
end: result.cursorPosition
|
|
752
|
+
});
|
|
753
|
+
|
|
754
|
+
// console.log('Selected suggestion:', suggestion.text);
|
|
755
|
+
|
|
756
|
+
// Small haptic feedback
|
|
757
|
+
hapticsLight();
|
|
758
|
+
}, [suggestions, inputState, props.autocompletePrefixes]);
|
|
759
|
+
|
|
760
|
+
// Settings modal state
|
|
761
|
+
const [showSettings, setShowSettings] = React.useState(false);
|
|
762
|
+
|
|
763
|
+
// Handle settings button press
|
|
764
|
+
const handleSettingsPress = React.useCallback(() => {
|
|
765
|
+
hapticsLight();
|
|
766
|
+
setShowSettings(prev => !prev);
|
|
767
|
+
}, []);
|
|
768
|
+
|
|
769
|
+
// Handle settings selection
|
|
770
|
+
const handleSettingsSelect = React.useCallback((mode: PermissionMode) => {
|
|
771
|
+
hapticsLight();
|
|
772
|
+
props.onPermissionModeChange?.(mode);
|
|
773
|
+
setShowSettings(false);
|
|
774
|
+
}, [props.onPermissionModeChange]);
|
|
775
|
+
|
|
776
|
+
// Handle abort button press
|
|
777
|
+
const handleAbortPress = React.useCallback(async () => {
|
|
778
|
+
if (!props.onAbort) return;
|
|
779
|
+
|
|
780
|
+
hapticsError();
|
|
781
|
+
setIsAborting(true);
|
|
782
|
+
const startTime = Date.now();
|
|
783
|
+
|
|
784
|
+
try {
|
|
785
|
+
await props.onAbort?.();
|
|
786
|
+
|
|
787
|
+
// Ensure minimum 300ms loading time
|
|
788
|
+
const elapsed = Date.now() - startTime;
|
|
789
|
+
if (elapsed < 300) {
|
|
790
|
+
await new Promise(resolve => setTimeout(resolve, 300 - elapsed));
|
|
791
|
+
}
|
|
792
|
+
} catch (error) {
|
|
793
|
+
// Shake on error
|
|
794
|
+
shakerRef.current?.shake();
|
|
795
|
+
console.error('Abort RPC call failed:', error);
|
|
796
|
+
} finally {
|
|
797
|
+
setIsAborting(false);
|
|
798
|
+
}
|
|
799
|
+
}, [props.onAbort]);
|
|
800
|
+
|
|
801
|
+
const handleBlockedSendAttempt = React.useCallback(() => {
|
|
802
|
+
if (!isSendBlocked || !hasText || props.isSending) return;
|
|
803
|
+
hapticsError();
|
|
804
|
+
sendBlockShakerRef.current?.shake();
|
|
805
|
+
}, [hasText, isSendBlocked, props.isSending]);
|
|
806
|
+
|
|
807
|
+
const handleSendPress = React.useCallback(() => {
|
|
808
|
+
if (isSendBlocked) {
|
|
809
|
+
handleBlockedSendAttempt();
|
|
810
|
+
return;
|
|
811
|
+
}
|
|
812
|
+
if (props.isSendDisabled || props.isSending) return;
|
|
813
|
+
|
|
814
|
+
hapticsLight();
|
|
815
|
+
// Live read avoids stalling behind the transitioned `hasText`.
|
|
816
|
+
const liveHasText = (inputRef.current?.getText() ?? '').trim().length > 0;
|
|
817
|
+
if (liveHasText || hasImages) {
|
|
818
|
+
props.onSend();
|
|
819
|
+
} else {
|
|
820
|
+
props.onMicPress?.();
|
|
821
|
+
}
|
|
822
|
+
}, [handleBlockedSendAttempt, hasImages, isSendBlocked, props.isSendDisabled, props.isSending, props.onSend, props.onMicPress]);
|
|
823
|
+
|
|
824
|
+
// Handle keyboard navigation
|
|
825
|
+
const handleKeyPress = React.useCallback((event: KeyPressEvent): boolean => {
|
|
826
|
+
// Handle autocomplete navigation first
|
|
827
|
+
if (suggestions.length > 0) {
|
|
828
|
+
if (event.key === 'ArrowUp') {
|
|
829
|
+
moveUp();
|
|
830
|
+
return true;
|
|
831
|
+
} else if (event.key === 'ArrowDown') {
|
|
832
|
+
moveDown();
|
|
833
|
+
return true;
|
|
834
|
+
} else if ((event.key === 'Enter' || (event.key === 'Tab' && !event.shiftKey))) {
|
|
835
|
+
// Both Enter and Tab select the current suggestion
|
|
836
|
+
// If none selected (selected === -1), select the first one
|
|
837
|
+
const indexToSelect = selected >= 0 ? selected : 0;
|
|
838
|
+
handleSuggestionSelect(indexToSelect);
|
|
839
|
+
return true;
|
|
840
|
+
} else if (event.key === 'Escape') {
|
|
841
|
+
// Clear suggestions by collapsing selection (triggers activeWord to clear)
|
|
842
|
+
if (inputRef.current) {
|
|
843
|
+
const cursorPos = inputState.selection.start;
|
|
844
|
+
inputRef.current.setTextAndSelection(inputState.text, {
|
|
845
|
+
start: cursorPos,
|
|
846
|
+
end: cursorPos
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
return true;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
// Handle Escape for abort when no suggestions are visible
|
|
854
|
+
if (event.key === 'Escape' && props.showAbortButton && props.onAbort && !isAborting) {
|
|
855
|
+
handleAbortPress();
|
|
856
|
+
return true;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
// Original key handling
|
|
860
|
+
if (Platform.OS === 'web') {
|
|
861
|
+
// On mobile web (touch devices), Enter should insert a newline since
|
|
862
|
+
// there's no Shift key available. Users send via the send button instead.
|
|
863
|
+
// Use pointer:coarse media query instead of ontouchstart/maxTouchPoints
|
|
864
|
+
// to avoid false positives on Windows touch-screen laptops with keyboards.
|
|
865
|
+
const isTouchDevice = typeof window !== 'undefined' && window.matchMedia('(pointer: coarse)').matches;
|
|
866
|
+
if (agentInputEnterToSend && event.key === 'Enter' && !event.shiftKey && !isTouchDevice) {
|
|
867
|
+
// Read live text from the textarea — `hasText` is debounced via
|
|
868
|
+
// startTransition and would lag behind a quick type-then-Enter.
|
|
869
|
+
const liveText = inputRef.current?.getText() ?? '';
|
|
870
|
+
if (liveText.trim()) {
|
|
871
|
+
if (isSendBlocked) {
|
|
872
|
+
handleBlockedSendAttempt();
|
|
873
|
+
} else if (!props.isSendDisabled) {
|
|
874
|
+
props.onSend();
|
|
875
|
+
}
|
|
876
|
+
return true; // Key was handled
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
// Handle Shift+Tab for permission mode switching
|
|
880
|
+
if (event.key === 'Tab' && event.shiftKey && props.onPermissionModeChange && availableModes.length > 0) {
|
|
881
|
+
const currentIndex = availableModes.findIndex((mode) => mode.key === permissionModeKey);
|
|
882
|
+
const nextIndex = ((currentIndex >= 0 ? currentIndex : 0) + 1) % availableModes.length;
|
|
883
|
+
props.onPermissionModeChange(availableModes[nextIndex]);
|
|
884
|
+
hapticsLight();
|
|
885
|
+
return true; // Key was handled, prevent default tab behavior
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
}
|
|
889
|
+
return false; // Key was not handled
|
|
890
|
+
}, [suggestions, moveUp, moveDown, selected, handleSuggestionSelect, props.showAbortButton, props.onAbort, isAborting, handleAbortPress, agentInputEnterToSend, props.onSend, props.onPermissionModeChange, availableModes, permissionModeKey, isSendBlocked, handleBlockedSendAttempt, props.isSendDisabled]);
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
return (
|
|
896
|
+
<View style={[
|
|
897
|
+
styles.container,
|
|
898
|
+
{ paddingHorizontal: screenWidth > 700 ? 12 : 8 }
|
|
899
|
+
]}>
|
|
900
|
+
<View style={[
|
|
901
|
+
styles.innerContainer,
|
|
902
|
+
{ maxWidth: layout.maxWidth }
|
|
903
|
+
]}>
|
|
904
|
+
{/* Autocomplete suggestions overlay */}
|
|
905
|
+
{suggestions.length > 0 && (
|
|
906
|
+
<View style={[
|
|
907
|
+
styles.autocompleteOverlay,
|
|
908
|
+
{ paddingHorizontal: screenWidth > 700 ? 0 : 8 }
|
|
909
|
+
]}>
|
|
910
|
+
<AgentInputAutocomplete
|
|
911
|
+
suggestions={suggestions.map(s => {
|
|
912
|
+
const Component = s.component;
|
|
913
|
+
return <Component key={s.key} />;
|
|
914
|
+
})}
|
|
915
|
+
selectedIndex={selected}
|
|
916
|
+
onSelect={handleSuggestionSelect}
|
|
917
|
+
itemHeight={48}
|
|
918
|
+
/>
|
|
919
|
+
</View>
|
|
920
|
+
)}
|
|
921
|
+
|
|
922
|
+
{/* Settings overlay */}
|
|
923
|
+
{showSettings && (
|
|
924
|
+
<>
|
|
925
|
+
<TouchableWithoutFeedback onPress={() => setShowSettings(false)}>
|
|
926
|
+
<View style={styles.overlayBackdrop} />
|
|
927
|
+
</TouchableWithoutFeedback>
|
|
928
|
+
<View style={[
|
|
929
|
+
styles.settingsOverlay,
|
|
930
|
+
{ paddingHorizontal: screenWidth > 700 ? 0 : 8 }
|
|
931
|
+
]}>
|
|
932
|
+
<FloatingOverlay maxHeight={400} keyboardShouldPersistTaps="always">
|
|
933
|
+
{/* Permission Mode Section */}
|
|
934
|
+
<View style={styles.overlaySection}>
|
|
935
|
+
<Text style={styles.overlaySectionTitle}>
|
|
936
|
+
{isCodex ? t('agentInput.codexPermissionMode.title') : isGemini ? t('agentInput.geminiPermissionMode.title') : t('agentInput.permissionMode.title')}
|
|
937
|
+
</Text>
|
|
938
|
+
{availableModes.map((mode) => {
|
|
939
|
+
const isSelected = permissionModeKey === mode.key;
|
|
940
|
+
|
|
941
|
+
return (
|
|
942
|
+
<Pressable
|
|
943
|
+
key={mode.key}
|
|
944
|
+
onPress={() => handleSettingsSelect(mode)}
|
|
945
|
+
style={({ pressed }) => ({
|
|
946
|
+
flexDirection: 'row',
|
|
947
|
+
alignItems: 'flex-start',
|
|
948
|
+
paddingHorizontal: 16,
|
|
949
|
+
paddingVertical: 8,
|
|
950
|
+
backgroundColor: pressed ? theme.colors.surfacePressed : 'transparent'
|
|
951
|
+
})}
|
|
952
|
+
>
|
|
953
|
+
<View style={{
|
|
954
|
+
width: 16,
|
|
955
|
+
height: 16,
|
|
956
|
+
borderRadius: 8,
|
|
957
|
+
borderWidth: 2,
|
|
958
|
+
borderColor: isSelected ? theme.colors.radio.active : theme.colors.radio.inactive,
|
|
959
|
+
alignItems: 'center',
|
|
960
|
+
justifyContent: 'center',
|
|
961
|
+
marginRight: 12,
|
|
962
|
+
marginTop: 2,
|
|
963
|
+
}}>
|
|
964
|
+
{isSelected && (
|
|
965
|
+
<View style={{
|
|
966
|
+
width: 6,
|
|
967
|
+
height: 6,
|
|
968
|
+
borderRadius: 3,
|
|
969
|
+
backgroundColor: theme.colors.radio.dot
|
|
970
|
+
}} />
|
|
971
|
+
)}
|
|
972
|
+
</View>
|
|
973
|
+
<View style={{ flex: 1 }}>
|
|
974
|
+
<Text style={{
|
|
975
|
+
fontSize: 14,
|
|
976
|
+
color: isSelected ? theme.colors.radio.active : theme.colors.text,
|
|
977
|
+
...Typography.default()
|
|
978
|
+
}}>
|
|
979
|
+
{withSandboxSuffix(mode.name, mode.key)}
|
|
980
|
+
</Text>
|
|
981
|
+
{!!mode.description && (
|
|
982
|
+
<Text style={{
|
|
983
|
+
fontSize: 11,
|
|
984
|
+
color: theme.colors.textSecondary,
|
|
985
|
+
...Typography.default()
|
|
986
|
+
}}>
|
|
987
|
+
{mode.description}
|
|
988
|
+
</Text>
|
|
989
|
+
)}
|
|
990
|
+
</View>
|
|
991
|
+
</Pressable>
|
|
992
|
+
);
|
|
993
|
+
})}
|
|
994
|
+
</View>
|
|
995
|
+
|
|
996
|
+
{/* Divider */}
|
|
997
|
+
<View style={{
|
|
998
|
+
height: 1,
|
|
999
|
+
backgroundColor: theme.colors.divider,
|
|
1000
|
+
marginHorizontal: 16
|
|
1001
|
+
}} />
|
|
1002
|
+
|
|
1003
|
+
{/* Model + Effort side by side */}
|
|
1004
|
+
<View style={{ flexDirection: 'row' }}>
|
|
1005
|
+
{/* Model Section */}
|
|
1006
|
+
<View style={{ paddingVertical: 8, flex: 1 }}>
|
|
1007
|
+
<Text style={{
|
|
1008
|
+
fontSize: 12,
|
|
1009
|
+
fontWeight: '600',
|
|
1010
|
+
color: theme.colors.textSecondary,
|
|
1011
|
+
paddingHorizontal: 16,
|
|
1012
|
+
paddingBottom: 4,
|
|
1013
|
+
...Typography.default('semiBold')
|
|
1014
|
+
}}>
|
|
1015
|
+
{t('agentInput.model.title')}
|
|
1016
|
+
</Text>
|
|
1017
|
+
{availableModels.length > 0 ? (
|
|
1018
|
+
availableModels.map((model) => {
|
|
1019
|
+
const isSelected = props.modelMode?.key === model.key;
|
|
1020
|
+
|
|
1021
|
+
return (
|
|
1022
|
+
<Pressable
|
|
1023
|
+
key={model.key}
|
|
1024
|
+
onPress={() => {
|
|
1025
|
+
hapticsLight();
|
|
1026
|
+
props.onModelModeChange?.(model);
|
|
1027
|
+
setShowSettings(false);
|
|
1028
|
+
}}
|
|
1029
|
+
style={({ pressed }) => ({
|
|
1030
|
+
flexDirection: 'row',
|
|
1031
|
+
alignItems: 'flex-start',
|
|
1032
|
+
paddingHorizontal: 16,
|
|
1033
|
+
paddingVertical: 8,
|
|
1034
|
+
backgroundColor: pressed ? theme.colors.surfacePressed : 'transparent'
|
|
1035
|
+
})}
|
|
1036
|
+
>
|
|
1037
|
+
<View style={{
|
|
1038
|
+
width: 16,
|
|
1039
|
+
height: 16,
|
|
1040
|
+
borderRadius: 8,
|
|
1041
|
+
borderWidth: 2,
|
|
1042
|
+
borderColor: isSelected ? theme.colors.radio.active : theme.colors.radio.inactive,
|
|
1043
|
+
alignItems: 'center',
|
|
1044
|
+
justifyContent: 'center',
|
|
1045
|
+
marginRight: 12,
|
|
1046
|
+
marginTop: 2,
|
|
1047
|
+
}}>
|
|
1048
|
+
{isSelected && (
|
|
1049
|
+
<View style={{
|
|
1050
|
+
width: 6,
|
|
1051
|
+
height: 6,
|
|
1052
|
+
borderRadius: 3,
|
|
1053
|
+
backgroundColor: theme.colors.radio.dot
|
|
1054
|
+
}} />
|
|
1055
|
+
)}
|
|
1056
|
+
</View>
|
|
1057
|
+
<View>
|
|
1058
|
+
<Text style={{
|
|
1059
|
+
fontSize: 14,
|
|
1060
|
+
color: isSelected ? theme.colors.radio.active : theme.colors.text,
|
|
1061
|
+
...Typography.default()
|
|
1062
|
+
}}>
|
|
1063
|
+
{model.name}
|
|
1064
|
+
</Text>
|
|
1065
|
+
{!!model.description && (
|
|
1066
|
+
<Text style={{
|
|
1067
|
+
fontSize: 11,
|
|
1068
|
+
color: theme.colors.textSecondary,
|
|
1069
|
+
...Typography.default()
|
|
1070
|
+
}}>
|
|
1071
|
+
{model.description}
|
|
1072
|
+
</Text>
|
|
1073
|
+
)}
|
|
1074
|
+
</View>
|
|
1075
|
+
</Pressable>
|
|
1076
|
+
);
|
|
1077
|
+
})
|
|
1078
|
+
) : (
|
|
1079
|
+
<Text style={{
|
|
1080
|
+
fontSize: 13,
|
|
1081
|
+
color: theme.colors.textSecondary,
|
|
1082
|
+
paddingHorizontal: 16,
|
|
1083
|
+
paddingVertical: 8,
|
|
1084
|
+
...Typography.default()
|
|
1085
|
+
}}>
|
|
1086
|
+
{t('agentInput.model.configureInCli')}
|
|
1087
|
+
</Text>
|
|
1088
|
+
)}
|
|
1089
|
+
</View>
|
|
1090
|
+
|
|
1091
|
+
{/* Effort Level Section — second column */}
|
|
1092
|
+
{availableEffortLevels.length > 0 && props.onEffortLevelChange && (
|
|
1093
|
+
<>
|
|
1094
|
+
<View style={{
|
|
1095
|
+
width: 1,
|
|
1096
|
+
backgroundColor: theme.colors.divider,
|
|
1097
|
+
marginVertical: 8,
|
|
1098
|
+
}} />
|
|
1099
|
+
<View style={{ paddingVertical: 8, flex: 1 }}>
|
|
1100
|
+
<Text style={{
|
|
1101
|
+
fontSize: 12,
|
|
1102
|
+
fontWeight: '600',
|
|
1103
|
+
color: theme.colors.textSecondary,
|
|
1104
|
+
paddingHorizontal: 16,
|
|
1105
|
+
paddingBottom: 4,
|
|
1106
|
+
...Typography.default('semiBold')
|
|
1107
|
+
}}>
|
|
1108
|
+
{t('agentInput.effort.title')}
|
|
1109
|
+
</Text>
|
|
1110
|
+
{availableEffortLevels.map((level) => {
|
|
1111
|
+
const isSelected = props.effortLevel?.key === level.key;
|
|
1112
|
+
|
|
1113
|
+
return (
|
|
1114
|
+
<Pressable
|
|
1115
|
+
key={level.key}
|
|
1116
|
+
onPress={() => {
|
|
1117
|
+
hapticsLight();
|
|
1118
|
+
props.onEffortLevelChange?.(level);
|
|
1119
|
+
setShowSettings(false);
|
|
1120
|
+
}}
|
|
1121
|
+
style={({ pressed }) => ({
|
|
1122
|
+
flexDirection: 'row',
|
|
1123
|
+
alignItems: 'flex-start',
|
|
1124
|
+
paddingHorizontal: 16,
|
|
1125
|
+
paddingVertical: 8,
|
|
1126
|
+
backgroundColor: pressed ? theme.colors.surfacePressed : 'transparent'
|
|
1127
|
+
})}
|
|
1128
|
+
>
|
|
1129
|
+
<View style={{
|
|
1130
|
+
width: 16,
|
|
1131
|
+
height: 16,
|
|
1132
|
+
borderRadius: 8,
|
|
1133
|
+
borderWidth: 2,
|
|
1134
|
+
borderColor: isSelected ? theme.colors.radio.active : theme.colors.radio.inactive,
|
|
1135
|
+
alignItems: 'center',
|
|
1136
|
+
justifyContent: 'center',
|
|
1137
|
+
marginRight: 12,
|
|
1138
|
+
marginTop: 2,
|
|
1139
|
+
}}>
|
|
1140
|
+
{isSelected && (
|
|
1141
|
+
<View style={{
|
|
1142
|
+
width: 6,
|
|
1143
|
+
height: 6,
|
|
1144
|
+
borderRadius: 3,
|
|
1145
|
+
backgroundColor: theme.colors.radio.dot
|
|
1146
|
+
}} />
|
|
1147
|
+
)}
|
|
1148
|
+
</View>
|
|
1149
|
+
<View>
|
|
1150
|
+
<Text style={{
|
|
1151
|
+
fontSize: 14,
|
|
1152
|
+
color: isSelected ? theme.colors.radio.active : theme.colors.text,
|
|
1153
|
+
...Typography.default()
|
|
1154
|
+
}}>
|
|
1155
|
+
{level.name}
|
|
1156
|
+
</Text>
|
|
1157
|
+
{!!level.description && (
|
|
1158
|
+
<Text style={{
|
|
1159
|
+
fontSize: 11,
|
|
1160
|
+
color: theme.colors.textSecondary,
|
|
1161
|
+
...Typography.default()
|
|
1162
|
+
}}>
|
|
1163
|
+
{level.description}
|
|
1164
|
+
</Text>
|
|
1165
|
+
)}
|
|
1166
|
+
</View>
|
|
1167
|
+
</Pressable>
|
|
1168
|
+
);
|
|
1169
|
+
})}
|
|
1170
|
+
</View>
|
|
1171
|
+
</>
|
|
1172
|
+
)}
|
|
1173
|
+
</View>
|
|
1174
|
+
</FloatingOverlay>
|
|
1175
|
+
</View>
|
|
1176
|
+
</>
|
|
1177
|
+
)}
|
|
1178
|
+
|
|
1179
|
+
<AgentInputStatusRow
|
|
1180
|
+
connectionStatus={props.connectionStatus}
|
|
1181
|
+
contextWarning={contextWarning}
|
|
1182
|
+
displayPermissionMode={displayPermissionMode}
|
|
1183
|
+
permissionModeKey={permissionModeKey}
|
|
1184
|
+
isSandboxedYoloMode={isSandboxedYoloMode}
|
|
1185
|
+
permissionLabel={displayPermissionMode ? withSandboxSuffix(displayPermissionMode.name, permissionModeKey) : null}
|
|
1186
|
+
zenMode={props.zenMode}
|
|
1187
|
+
/>
|
|
1188
|
+
|
|
1189
|
+
<AgentInputContextChips
|
|
1190
|
+
machineName={props.machineName}
|
|
1191
|
+
onMachineClick={props.onMachineClick}
|
|
1192
|
+
currentPath={props.currentPath}
|
|
1193
|
+
onPathClick={props.onPathClick}
|
|
1194
|
+
/>
|
|
1195
|
+
|
|
1196
|
+
{/* Box 2: Action Area (Input + Send) */}
|
|
1197
|
+
<Shaker ref={sendBlockShakerRef}>
|
|
1198
|
+
<View style={styles.unifiedPanel}>
|
|
1199
|
+
{/* Attachment preview strip */}
|
|
1200
|
+
{props.selectedImages && props.selectedImages.length > 0 && (
|
|
1201
|
+
<AgentInputAttachmentStrip
|
|
1202
|
+
images={props.selectedImages}
|
|
1203
|
+
onRemove={props.onRemoveImage ?? (() => {})}
|
|
1204
|
+
/>
|
|
1205
|
+
)}
|
|
1206
|
+
{/* Input field */}
|
|
1207
|
+
<View style={[styles.inputContainer, props.minHeight ? { minHeight: props.minHeight } : undefined]}>
|
|
1208
|
+
<MultiTextInput
|
|
1209
|
+
ref={inputRef}
|
|
1210
|
+
defaultValue={props.initialValue}
|
|
1211
|
+
paddingTop={Platform.OS === 'web' ? 10 : 8}
|
|
1212
|
+
paddingBottom={Platform.OS === 'web' ? 10 : 8}
|
|
1213
|
+
onChangeText={handleTextChange}
|
|
1214
|
+
placeholder={props.placeholder}
|
|
1215
|
+
onKeyPress={handleKeyPress}
|
|
1216
|
+
onStateChange={handleInputStateChange}
|
|
1217
|
+
maxHeight={Platform.OS === 'web' ? 480 : 120}
|
|
1218
|
+
/>
|
|
1219
|
+
</View>
|
|
1220
|
+
|
|
1221
|
+
{/* Action buttons below input */}
|
|
1222
|
+
<View style={styles.actionButtonsContainer}>
|
|
1223
|
+
<View style={{ flexDirection: 'column', flex: 1, gap: 2 }}>
|
|
1224
|
+
{/* Row 1: Settings, Profile (FIRST), Agent, Abort, Git Status */}
|
|
1225
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
1226
|
+
{props.zenMode && <View style={{ flex: 1 }} />}
|
|
1227
|
+
{!props.zenMode && <View style={styles.actionButtonsLeft}>
|
|
1228
|
+
|
|
1229
|
+
{/* Settings button */}
|
|
1230
|
+
{props.onPermissionModeChange && (
|
|
1231
|
+
<Pressable
|
|
1232
|
+
onPress={handleSettingsPress}
|
|
1233
|
+
hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
|
|
1234
|
+
style={(p) => ({
|
|
1235
|
+
flexDirection: 'row',
|
|
1236
|
+
alignItems: 'center',
|
|
1237
|
+
borderRadius: Platform.select({ default: 16, android: 20 }),
|
|
1238
|
+
paddingHorizontal: 8,
|
|
1239
|
+
paddingVertical: 6,
|
|
1240
|
+
justifyContent: 'center',
|
|
1241
|
+
height: 32,
|
|
1242
|
+
opacity: p.pressed ? 0.7 : 1,
|
|
1243
|
+
})}
|
|
1244
|
+
>
|
|
1245
|
+
<Octicons
|
|
1246
|
+
name={'gear'}
|
|
1247
|
+
size={16}
|
|
1248
|
+
color={theme.colors.button.secondary.tint}
|
|
1249
|
+
/>
|
|
1250
|
+
</Pressable>
|
|
1251
|
+
)}
|
|
1252
|
+
|
|
1253
|
+
{/* Agent selector button */}
|
|
1254
|
+
{props.agentType && props.onAgentClick && (
|
|
1255
|
+
<Pressable
|
|
1256
|
+
onPress={() => {
|
|
1257
|
+
hapticsLight();
|
|
1258
|
+
props.onAgentClick?.();
|
|
1259
|
+
}}
|
|
1260
|
+
hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
|
|
1261
|
+
style={(p) => ({
|
|
1262
|
+
flexDirection: 'row',
|
|
1263
|
+
alignItems: 'center',
|
|
1264
|
+
borderRadius: Platform.select({ default: 16, android: 20 }),
|
|
1265
|
+
paddingHorizontal: 10,
|
|
1266
|
+
paddingVertical: 6,
|
|
1267
|
+
justifyContent: 'center',
|
|
1268
|
+
height: 32,
|
|
1269
|
+
opacity: p.pressed ? 0.7 : 1,
|
|
1270
|
+
gap: 6,
|
|
1271
|
+
})}
|
|
1272
|
+
>
|
|
1273
|
+
<Octicons
|
|
1274
|
+
name="cpu"
|
|
1275
|
+
size={14}
|
|
1276
|
+
color={theme.colors.button.secondary.tint}
|
|
1277
|
+
/>
|
|
1278
|
+
<Text style={{
|
|
1279
|
+
fontSize: 13,
|
|
1280
|
+
color: theme.colors.button.secondary.tint,
|
|
1281
|
+
fontWeight: '600',
|
|
1282
|
+
...Typography.default('semiBold'),
|
|
1283
|
+
}}>
|
|
1284
|
+
{props.agentType === 'claude' ? t('agentInput.agent.claude') : props.agentType === 'codex' ? t('agentInput.agent.codex') : props.agentType === 'openclaw' ? t('agentInput.agent.openclaw') : t('agentInput.agent.gemini')}
|
|
1285
|
+
</Text>
|
|
1286
|
+
</Pressable>
|
|
1287
|
+
)}
|
|
1288
|
+
|
|
1289
|
+
{/* Abort button */}
|
|
1290
|
+
{props.onAbort && (
|
|
1291
|
+
<Shaker ref={shakerRef}>
|
|
1292
|
+
<Pressable
|
|
1293
|
+
style={(p) => ({
|
|
1294
|
+
flexDirection: 'row',
|
|
1295
|
+
alignItems: 'center',
|
|
1296
|
+
borderRadius: Platform.select({ default: 16, android: 20 }),
|
|
1297
|
+
paddingHorizontal: 8,
|
|
1298
|
+
paddingVertical: 6,
|
|
1299
|
+
justifyContent: 'center',
|
|
1300
|
+
height: 32,
|
|
1301
|
+
opacity: p.pressed ? 0.7 : 1,
|
|
1302
|
+
})}
|
|
1303
|
+
hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
|
|
1304
|
+
onPress={handleAbortPress}
|
|
1305
|
+
disabled={isAborting}
|
|
1306
|
+
>
|
|
1307
|
+
{isAborting ? (
|
|
1308
|
+
<ActivityIndicator
|
|
1309
|
+
size="small"
|
|
1310
|
+
color={theme.colors.button.secondary.tint}
|
|
1311
|
+
/>
|
|
1312
|
+
) : (
|
|
1313
|
+
<Octicons
|
|
1314
|
+
name={"stop"}
|
|
1315
|
+
size={16}
|
|
1316
|
+
color={theme.colors.button.secondary.tint}
|
|
1317
|
+
/>
|
|
1318
|
+
)}
|
|
1319
|
+
</Pressable>
|
|
1320
|
+
</Shaker>
|
|
1321
|
+
)}
|
|
1322
|
+
|
|
1323
|
+
{/* Git Status Badge */}
|
|
1324
|
+
<GitStatusButton sessionId={props.sessionId} onPress={props.onFileViewerPress} />
|
|
1325
|
+
|
|
1326
|
+
{/* Image picker button (expImageUpload) */}
|
|
1327
|
+
{props.onPickImages && (
|
|
1328
|
+
<Pressable
|
|
1329
|
+
onPress={props.onPickImages}
|
|
1330
|
+
hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
|
|
1331
|
+
style={(p) => ({
|
|
1332
|
+
flexDirection: 'row',
|
|
1333
|
+
alignItems: 'center',
|
|
1334
|
+
borderRadius: Platform.select({ default: 16, android: 20 }),
|
|
1335
|
+
paddingHorizontal: 8,
|
|
1336
|
+
paddingVertical: 6,
|
|
1337
|
+
justifyContent: 'center',
|
|
1338
|
+
height: 32,
|
|
1339
|
+
opacity: p.pressed ? 0.7 : 1,
|
|
1340
|
+
})}
|
|
1341
|
+
>
|
|
1342
|
+
<Ionicons
|
|
1343
|
+
name="image-outline"
|
|
1344
|
+
size={16}
|
|
1345
|
+
color={(props.selectedImages?.length ?? 0) > 0
|
|
1346
|
+
? theme.colors.radio.active
|
|
1347
|
+
: theme.colors.button.secondary.tint}
|
|
1348
|
+
/>
|
|
1349
|
+
</Pressable>
|
|
1350
|
+
)}
|
|
1351
|
+
</View>}
|
|
1352
|
+
|
|
1353
|
+
{/* Send/Voice button - aligned with first row */}
|
|
1354
|
+
<View
|
|
1355
|
+
style={[
|
|
1356
|
+
styles.sendButton,
|
|
1357
|
+
isSendBlocked ? styles.sendButtonLocked :
|
|
1358
|
+
(hasText || props.isSending || (props.onMicPress && !props.isMicActive))
|
|
1359
|
+
? styles.sendButtonActive
|
|
1360
|
+
: styles.sendButtonInactive
|
|
1361
|
+
]}
|
|
1362
|
+
>
|
|
1363
|
+
<Pressable
|
|
1364
|
+
style={(p) => ({
|
|
1365
|
+
width: '100%',
|
|
1366
|
+
height: '100%',
|
|
1367
|
+
alignItems: 'center',
|
|
1368
|
+
justifyContent: 'center',
|
|
1369
|
+
opacity: p.pressed ? 0.7 : 1,
|
|
1370
|
+
})}
|
|
1371
|
+
hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
|
|
1372
|
+
onPress={handleSendPress}
|
|
1373
|
+
disabled={!canPressSendButton}
|
|
1374
|
+
>
|
|
1375
|
+
{props.isSending ? (
|
|
1376
|
+
<ActivityIndicator
|
|
1377
|
+
size="small"
|
|
1378
|
+
color={theme.colors.button.primary.tint}
|
|
1379
|
+
/>
|
|
1380
|
+
) : isSendBlocked ? (
|
|
1381
|
+
<Ionicons
|
|
1382
|
+
name="lock-closed"
|
|
1383
|
+
size={15}
|
|
1384
|
+
color={theme.colors.textSecondary}
|
|
1385
|
+
/>
|
|
1386
|
+
) : hasText ? (
|
|
1387
|
+
<Octicons
|
|
1388
|
+
name="arrow-up"
|
|
1389
|
+
size={16}
|
|
1390
|
+
color={theme.colors.button.primary.tint}
|
|
1391
|
+
style={[
|
|
1392
|
+
styles.sendButtonIcon,
|
|
1393
|
+
{ marginTop: Platform.OS === 'web' ? 2 : 0 }
|
|
1394
|
+
]}
|
|
1395
|
+
/>
|
|
1396
|
+
) : props.onMicPress && !props.isMicActive ? (
|
|
1397
|
+
<Image
|
|
1398
|
+
source={require('@/assets/images/icon-voice-white.png')}
|
|
1399
|
+
style={{
|
|
1400
|
+
width: 24,
|
|
1401
|
+
height: 24,
|
|
1402
|
+
}}
|
|
1403
|
+
tintColor={theme.colors.button.primary.tint}
|
|
1404
|
+
/>
|
|
1405
|
+
) : (
|
|
1406
|
+
<Octicons
|
|
1407
|
+
name="arrow-up"
|
|
1408
|
+
size={16}
|
|
1409
|
+
color={theme.colors.button.primary.tint}
|
|
1410
|
+
style={[
|
|
1411
|
+
styles.sendButtonIcon,
|
|
1412
|
+
{ marginTop: Platform.OS === 'web' ? 2 : 0 }
|
|
1413
|
+
]}
|
|
1414
|
+
/>
|
|
1415
|
+
)}
|
|
1416
|
+
</Pressable>
|
|
1417
|
+
</View>
|
|
1418
|
+
</View>
|
|
1419
|
+
</View>
|
|
1420
|
+
</View>
|
|
1421
|
+
</View>
|
|
1422
|
+
</Shaker>
|
|
1423
|
+
</View>
|
|
1424
|
+
</View>
|
|
1425
|
+
);
|
|
1426
|
+
}));
|
|
1427
|
+
|
|
1428
|
+
// Git Status Button Component
|
|
1429
|
+
function GitStatusButton({ sessionId, onPress }: { sessionId?: string, onPress?: () => void }) {
|
|
1430
|
+
const hasMeaningfulGitStatus = useHasMeaningfulGitStatus(sessionId || '');
|
|
1431
|
+
const styles = stylesheet;
|
|
1432
|
+
const { theme } = useUnistyles();
|
|
1433
|
+
|
|
1434
|
+
if (!sessionId || !onPress) {
|
|
1435
|
+
return null;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
return (
|
|
1439
|
+
<Pressable
|
|
1440
|
+
style={(p) => ({
|
|
1441
|
+
flexDirection: 'row',
|
|
1442
|
+
alignItems: 'center',
|
|
1443
|
+
borderRadius: Platform.select({ default: 16, android: 20 }),
|
|
1444
|
+
paddingHorizontal: 8,
|
|
1445
|
+
paddingVertical: 6,
|
|
1446
|
+
height: 32,
|
|
1447
|
+
opacity: p.pressed ? 0.7 : 1,
|
|
1448
|
+
flex: 1,
|
|
1449
|
+
overflow: 'hidden',
|
|
1450
|
+
})}
|
|
1451
|
+
hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
|
|
1452
|
+
onPress={() => {
|
|
1453
|
+
hapticsLight();
|
|
1454
|
+
onPress?.();
|
|
1455
|
+
}}
|
|
1456
|
+
>
|
|
1457
|
+
{hasMeaningfulGitStatus ? (
|
|
1458
|
+
<GitStatusBadge sessionId={sessionId} />
|
|
1459
|
+
) : (
|
|
1460
|
+
<Octicons
|
|
1461
|
+
name="git-branch"
|
|
1462
|
+
size={16}
|
|
1463
|
+
color={theme.colors.button.secondary.tint}
|
|
1464
|
+
/>
|
|
1465
|
+
)}
|
|
1466
|
+
</Pressable>
|
|
1467
|
+
);
|
|
1468
|
+
}
|