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,944 @@
|
|
|
1
|
+
import { AgentContentView } from '@/components/AgentContentView';
|
|
2
|
+
import { AgentInput } from '@/components/AgentInput';
|
|
3
|
+
import type { MultiTextInputHandle } from '@/components/MultiTextInput';
|
|
4
|
+
import { layout } from '@/components/layout';
|
|
5
|
+
import {
|
|
6
|
+
getAvailableModels,
|
|
7
|
+
getAvailablePermissionModes,
|
|
8
|
+
getEffortLevelsForModel,
|
|
9
|
+
resolveCurrentOption,
|
|
10
|
+
EffortLevel,
|
|
11
|
+
} from '@/components/modelModeOptions';
|
|
12
|
+
import { getSuggestions } from '@/components/autocomplete/suggestions';
|
|
13
|
+
import { ChatHeaderView } from '@/components/ChatHeaderView';
|
|
14
|
+
import { ChatList } from '@/components/ChatList';
|
|
15
|
+
import { Deferred } from '@/components/Deferred';
|
|
16
|
+
import { EmptyMessages } from '@/components/EmptyMessages';
|
|
17
|
+
import { VoiceAssistantStatusBar } from '@/components/VoiceAssistantStatusBar';
|
|
18
|
+
import { useDraft } from '@/hooks/useDraft';
|
|
19
|
+
import { useImagePicker } from '@/hooks/useImagePicker';
|
|
20
|
+
import { Modal } from '@/modal';
|
|
21
|
+
import { voiceHooks } from '@/realtime/hooks/voiceHooks';
|
|
22
|
+
import { getCurrentVoiceConversationId, getCurrentVoiceSessionDurationSeconds, startRealtimeSession, stopRealtimeSession } from '@/realtime/RealtimeSession';
|
|
23
|
+
import { gitStatusSync } from '@/sync/gitStatusSync';
|
|
24
|
+
import { sessionAbort } from '@/sync/ops';
|
|
25
|
+
import { storage, useIsDataReady, useLocalSetting, useRealtimeStatus, useSessionMessages, useSessionUsage, useSetting } from '@/sync/storage';
|
|
26
|
+
import { useSession } from '@/sync/storage';
|
|
27
|
+
import { Session } from '@/sync/storageTypes';
|
|
28
|
+
import { sync } from '@/sync/sync';
|
|
29
|
+
import { t } from '@/text';
|
|
30
|
+
import { tracking } from '@/track';
|
|
31
|
+
import { getVoiceMessageCount, getVoiceOnboardingPromptLoadCount } from '@/sync/persistence';
|
|
32
|
+
import { isRunningOnMac } from '@/utils/platform';
|
|
33
|
+
import { useDeviceType, useHeaderHeight, useIsLandscape, useIsTablet } from '@/utils/responsive';
|
|
34
|
+
import { FilesSidebar, SidebarMode } from '@/components/FilesSidebar';
|
|
35
|
+
import { AllFilesDiffView } from '@/components/AllFilesDiffView';
|
|
36
|
+
import { FileViewPanel } from '@/components/FileViewPanel';
|
|
37
|
+
import { prefetchPierreDiff } from '@/components/diff/PierreDiffView';
|
|
38
|
+
import { GitFileStatus } from '@/sync/gitStatusFiles';
|
|
39
|
+
import { useOverlayNav } from '@/-session/sessionOverlayNav';
|
|
40
|
+
import { formatPathRelativeToHome, getResumeCommandBlock, getSessionName, useSessionStatus } from '@/utils/sessionUtils';
|
|
41
|
+
import { useSessionQuickActions } from '@/hooks/useSessionQuickActions';
|
|
42
|
+
import { isVersionSupported, MINIMUM_CLI_VERSION } from '@/utils/versionUtils';
|
|
43
|
+
import * as Clipboard from 'expo-clipboard';
|
|
44
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
45
|
+
import { useRouter } from 'expo-router';
|
|
46
|
+
import * as React from 'react';
|
|
47
|
+
import { useMemo } from 'react';
|
|
48
|
+
import { ActivityIndicator, Platform, Pressable, Text, View, useWindowDimensions } from 'react-native';
|
|
49
|
+
import Animated, { useSharedValue, useAnimatedStyle, withTiming, Easing } from 'react-native-reanimated';
|
|
50
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
51
|
+
import { useUnistyles } from 'react-native-unistyles';
|
|
52
|
+
import type { ModelMode, PermissionMode } from '@/components/PermissionModeSelector';
|
|
53
|
+
import { resolveAgentDefaultConfig } from '@/sync/agentDefaults';
|
|
54
|
+
|
|
55
|
+
export const SessionView = React.memo((props: { id: string }) => {
|
|
56
|
+
const sessionId = props.id;
|
|
57
|
+
const router = useRouter();
|
|
58
|
+
const session = useSession(sessionId);
|
|
59
|
+
const isDataReady = useIsDataReady();
|
|
60
|
+
const { theme } = useUnistyles();
|
|
61
|
+
const safeArea = useSafeAreaInsets();
|
|
62
|
+
const isLandscape = useIsLandscape();
|
|
63
|
+
const deviceType = useDeviceType();
|
|
64
|
+
const headerHeight = useHeaderHeight();
|
|
65
|
+
const realtimeStatus = useRealtimeStatus();
|
|
66
|
+
const isTablet = useIsTablet();
|
|
67
|
+
const { width: windowWidth } = useWindowDimensions();
|
|
68
|
+
const fileDiffsSidebarEnabled = useSetting('fileDiffsSidebar');
|
|
69
|
+
const zenMode = useLocalSetting('zenMode');
|
|
70
|
+
|
|
71
|
+
// Escape key exits zen mode (web only)
|
|
72
|
+
React.useEffect(() => {
|
|
73
|
+
if (Platform.OS !== 'web' || !zenMode) return;
|
|
74
|
+
const handleKeyDown = (e: KeyboardEvent) => {
|
|
75
|
+
if (e.key === 'Escape') {
|
|
76
|
+
e.preventDefault();
|
|
77
|
+
storage.getState().applyLocalSettings({ zenMode: false });
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
81
|
+
return () => window.removeEventListener('keydown', handleKeyDown);
|
|
82
|
+
}, [zenMode]);
|
|
83
|
+
|
|
84
|
+
// Base condition: can we show the diff sidebar at all?
|
|
85
|
+
const canShowSidebar = fileDiffsSidebarEnabled
|
|
86
|
+
&& (isRunningOnMac() || Platform.OS === 'web')
|
|
87
|
+
&& windowWidth >= SIDEBAR_MIN_WINDOW_WIDTH
|
|
88
|
+
&& isDataReady && !!session;
|
|
89
|
+
|
|
90
|
+
const showSidebar = canShowSidebar && !zenMode;
|
|
91
|
+
|
|
92
|
+
// Match left sidebar width: 30% of window, clamped to 250–360px
|
|
93
|
+
const sidebarWidth = Math.min(Math.max(Math.floor(windowWidth * 0.3), 250), 360);
|
|
94
|
+
|
|
95
|
+
// Animate diff sidebar width.
|
|
96
|
+
//
|
|
97
|
+
// On web we snap the value (duration: 0). The animated `width` change
|
|
98
|
+
// triggers a flex-row reflow on every frame, which in turn re-measures
|
|
99
|
+
// the entire chat tree (FlatList rows, message blocks). At ~60fps that
|
|
100
|
+
// grinds to ~15fps on dev builds. Snapping skips the layout thrash —
|
|
101
|
+
// the chat reflows once instead of 60 times. Native keeps the smooth
|
|
102
|
+
// animation because it runs on Reanimated's UI thread.
|
|
103
|
+
const sidebarAnim = useSharedValue(showSidebar ? 1 : 0);
|
|
104
|
+
React.useEffect(() => {
|
|
105
|
+
sidebarAnim.value = withTiming(showSidebar ? 1 : 0, {
|
|
106
|
+
duration: Platform.OS === 'web' ? 0 : 250,
|
|
107
|
+
easing: Easing.out(Easing.cubic),
|
|
108
|
+
});
|
|
109
|
+
}, [showSidebar]);
|
|
110
|
+
const animatedSidebarStyle = useAnimatedStyle(() => ({
|
|
111
|
+
width: sidebarAnim.value * sidebarWidth,
|
|
112
|
+
opacity: sidebarAnim.value,
|
|
113
|
+
overflow: 'hidden' as const,
|
|
114
|
+
}));
|
|
115
|
+
|
|
116
|
+
const [sidebarMode, setSidebarMode] = React.useState<SidebarMode>('changes');
|
|
117
|
+
|
|
118
|
+
// Overlay state is managed as a browser-style history stack so the
|
|
119
|
+
// sidebar's back / forward arrows can navigate between chat ↔ diff ↔ file
|
|
120
|
+
// without a per-overlay close button. Stack + cursor live in one piece
|
|
121
|
+
// of state so functional updates stay coordinated.
|
|
122
|
+
type OverlayEntry =
|
|
123
|
+
| { kind: 'none' }
|
|
124
|
+
| { kind: 'diff'; file: string }
|
|
125
|
+
| { kind: 'file'; path: string };
|
|
126
|
+
const [overlayHistory, setOverlayHistory] = React.useState<{ stack: OverlayEntry[]; cursor: number }>(
|
|
127
|
+
{ stack: [{ kind: 'none' }], cursor: 0 }
|
|
128
|
+
);
|
|
129
|
+
const overlayCurrent = overlayHistory.stack[overlayHistory.cursor] ?? { kind: 'none' };
|
|
130
|
+
const diffViewOpen = overlayCurrent.kind === 'diff';
|
|
131
|
+
const fileViewPath = overlayCurrent.kind === 'file' ? overlayCurrent.path : null;
|
|
132
|
+
const scrollToFile = overlayCurrent.kind === 'diff' ? overlayCurrent.file : null;
|
|
133
|
+
|
|
134
|
+
const pushOverlay = React.useCallback((entry: OverlayEntry) => {
|
|
135
|
+
setOverlayHistory((prev) => {
|
|
136
|
+
const truncated = prev.stack.slice(0, prev.cursor + 1);
|
|
137
|
+
truncated.push(entry);
|
|
138
|
+
return { stack: truncated, cursor: truncated.length - 1 };
|
|
139
|
+
});
|
|
140
|
+
}, []);
|
|
141
|
+
|
|
142
|
+
const handleSidebarFilePress = React.useCallback((file: GitFileStatus) => {
|
|
143
|
+
if (file.status === 'deleted') return;
|
|
144
|
+
pushOverlay({ kind: 'diff', file: file.fullPath });
|
|
145
|
+
}, [pushOverlay]);
|
|
146
|
+
const handleAllFilesFilePress = React.useCallback((filePath: string) => {
|
|
147
|
+
pushOverlay({ kind: 'file', path: filePath });
|
|
148
|
+
}, [pushOverlay]);
|
|
149
|
+
|
|
150
|
+
// When sidebar capability is lost (screen too narrow, disabled), close views.
|
|
151
|
+
// Don't close on zen mode toggle — keep the view visible.
|
|
152
|
+
React.useEffect(() => {
|
|
153
|
+
if (!canShowSidebar) {
|
|
154
|
+
setOverlayHistory({ stack: [{ kind: 'none' }], cursor: 0 });
|
|
155
|
+
}
|
|
156
|
+
}, [canShowSidebar]);
|
|
157
|
+
|
|
158
|
+
// Right-side header content published by the active overlay (diff toggle / save button).
|
|
159
|
+
const [headerRightSlot, setHeaderRightSlot] = React.useState<React.ReactNode>(null);
|
|
160
|
+
|
|
161
|
+
// Wire intra-session back / forward into the global SidebarNavigator arrows.
|
|
162
|
+
const canOverlayBack = overlayHistory.cursor > 0;
|
|
163
|
+
const canOverlayForward = overlayHistory.cursor < overlayHistory.stack.length - 1;
|
|
164
|
+
React.useEffect(() => {
|
|
165
|
+
useOverlayNav.getState().publish({
|
|
166
|
+
canBack: canOverlayBack,
|
|
167
|
+
canForward: canOverlayForward,
|
|
168
|
+
back: () => {
|
|
169
|
+
if (!canOverlayBack) return false;
|
|
170
|
+
setOverlayHistory((prev) => (
|
|
171
|
+
prev.cursor <= 0 ? prev : { ...prev, cursor: prev.cursor - 1 }
|
|
172
|
+
));
|
|
173
|
+
return true;
|
|
174
|
+
},
|
|
175
|
+
forward: () => {
|
|
176
|
+
if (!canOverlayForward) return false;
|
|
177
|
+
setOverlayHistory((prev) => (
|
|
178
|
+
prev.cursor >= prev.stack.length - 1 ? prev : { ...prev, cursor: prev.cursor + 1 }
|
|
179
|
+
));
|
|
180
|
+
return true;
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
return () => useOverlayNav.getState().reset();
|
|
184
|
+
}, [canOverlayBack, canOverlayForward]);
|
|
185
|
+
|
|
186
|
+
// Warm Pierre's lazy web chunks while the user is still reading chat.
|
|
187
|
+
React.useEffect(() => {
|
|
188
|
+
prefetchPierreDiff();
|
|
189
|
+
}, []);
|
|
190
|
+
|
|
191
|
+
// Compute header props based on session state
|
|
192
|
+
const headerProps = useMemo(() => {
|
|
193
|
+
if (!isDataReady) {
|
|
194
|
+
return { title: '', folderName: undefined, isConnected: false };
|
|
195
|
+
}
|
|
196
|
+
if (!session) {
|
|
197
|
+
return { title: t('errors.sessionDeleted'), folderName: undefined, isConnected: false };
|
|
198
|
+
}
|
|
199
|
+
const isConnected = session.presence === 'online';
|
|
200
|
+
const pathSegments = session.metadata?.path?.split(/[/\\]/).filter(Boolean);
|
|
201
|
+
const folderName = pathSegments?.[pathSegments.length - 1];
|
|
202
|
+
const sessionName = getSessionName(session);
|
|
203
|
+
return {
|
|
204
|
+
title: sessionName,
|
|
205
|
+
folderName,
|
|
206
|
+
isConnected,
|
|
207
|
+
};
|
|
208
|
+
}, [session, isDataReady]);
|
|
209
|
+
|
|
210
|
+
const mainContent = (
|
|
211
|
+
<>
|
|
212
|
+
{/* Status bar shadow for landscape mode */}
|
|
213
|
+
{isLandscape && deviceType === 'phone' && (
|
|
214
|
+
<View style={{
|
|
215
|
+
position: 'absolute',
|
|
216
|
+
top: 0,
|
|
217
|
+
left: 0,
|
|
218
|
+
right: 0,
|
|
219
|
+
height: safeArea.top,
|
|
220
|
+
backgroundColor: theme.colors.surface,
|
|
221
|
+
zIndex: 1000,
|
|
222
|
+
shadowColor: theme.colors.shadow.color,
|
|
223
|
+
shadowOffset: {
|
|
224
|
+
width: 0,
|
|
225
|
+
height: 2,
|
|
226
|
+
},
|
|
227
|
+
shadowOpacity: theme.colors.shadow.opacity,
|
|
228
|
+
shadowRadius: 3,
|
|
229
|
+
elevation: 5,
|
|
230
|
+
}} />
|
|
231
|
+
)}
|
|
232
|
+
|
|
233
|
+
{/* Header - always shown on desktop/Mac, hidden in landscape mode only on actual phones */}
|
|
234
|
+
{!(isLandscape && deviceType === 'phone' && Platform.OS !== 'web') && (
|
|
235
|
+
<View style={{
|
|
236
|
+
position: 'absolute',
|
|
237
|
+
top: 0,
|
|
238
|
+
left: 0,
|
|
239
|
+
right: 0,
|
|
240
|
+
zIndex: 1000
|
|
241
|
+
}}>
|
|
242
|
+
<ChatHeaderView
|
|
243
|
+
title={headerProps.title}
|
|
244
|
+
folderName={headerProps.folderName}
|
|
245
|
+
isConnected={headerProps.isConnected}
|
|
246
|
+
extraPathSegment={fileViewPath ?? undefined}
|
|
247
|
+
rightSlot={(diffViewOpen || !!fileViewPath) ? headerRightSlot : null}
|
|
248
|
+
onTitlePress={session ? () => router.push(`/session/${sessionId}/info`) : undefined}
|
|
249
|
+
onBackPress={() => router.back()}
|
|
250
|
+
/>
|
|
251
|
+
{/* Voice status bar below header - not on tablet (shown in sidebar) */}
|
|
252
|
+
{!isTablet && realtimeStatus !== 'disconnected' && (
|
|
253
|
+
<VoiceAssistantStatusBar variant="full" />
|
|
254
|
+
)}
|
|
255
|
+
</View>
|
|
256
|
+
)}
|
|
257
|
+
|
|
258
|
+
{/* Content based on state */}
|
|
259
|
+
<View style={{ flex: 1, paddingTop: !(isLandscape && deviceType === 'phone' && Platform.OS !== 'web') ? safeArea.top + headerHeight + (!isTablet && realtimeStatus !== 'disconnected' ? 32 : 0) : 0 }}>
|
|
260
|
+
{!isDataReady ? (
|
|
261
|
+
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
|
262
|
+
<ActivityIndicator size="small" color={theme.colors.textSecondary} />
|
|
263
|
+
</View>
|
|
264
|
+
) : !session ? (
|
|
265
|
+
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
|
266
|
+
<Ionicons name="trash-outline" size={48} color={theme.colors.textSecondary} />
|
|
267
|
+
<Text style={{ color: theme.colors.text, fontSize: 20, marginTop: 16, fontWeight: '600' }}>{t('errors.sessionDeleted')}</Text>
|
|
268
|
+
<Text style={{ color: theme.colors.textSecondary, fontSize: 15, marginTop: 8, textAlign: 'center', paddingHorizontal: 32 }}>{t('errors.sessionDeletedDescription')}</Text>
|
|
269
|
+
</View>
|
|
270
|
+
) : (
|
|
271
|
+
<SessionViewLoaded key={sessionId} sessionId={sessionId} session={session} />
|
|
272
|
+
)}
|
|
273
|
+
</View>
|
|
274
|
+
</>
|
|
275
|
+
);
|
|
276
|
+
|
|
277
|
+
if (!canShowSidebar) {
|
|
278
|
+
return mainContent;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Desktop layout: chat + animated sidebar at the same level (full height).
|
|
282
|
+
// When a sidebar file is selected, InlineFileDiff overlays the main content
|
|
283
|
+
// (chat stays mounted underneath so state is preserved).
|
|
284
|
+
return (
|
|
285
|
+
<View style={{ flex: 1, flexDirection: 'row' }}>
|
|
286
|
+
<View
|
|
287
|
+
style={{
|
|
288
|
+
flex: 1,
|
|
289
|
+
// Web-only: isolate the chat subtree's layout from the
|
|
290
|
+
// parent flex-row. If we ever bring back a width
|
|
291
|
+
// animation on the right sidebar, `contain` prevents
|
|
292
|
+
// layout work from leaking up to the chat tree on
|
|
293
|
+
// every frame.
|
|
294
|
+
...(Platform.OS === 'web' ? { contain: 'layout style paint' as any } : {}),
|
|
295
|
+
}}
|
|
296
|
+
>
|
|
297
|
+
{mainContent}
|
|
298
|
+
{diffViewOpen && canShowSidebar && (
|
|
299
|
+
<View
|
|
300
|
+
pointerEvents="box-none"
|
|
301
|
+
style={{
|
|
302
|
+
position: 'absolute',
|
|
303
|
+
top: safeArea.top + headerHeight,
|
|
304
|
+
left: 0,
|
|
305
|
+
right: 0,
|
|
306
|
+
bottom: 0,
|
|
307
|
+
backgroundColor: theme.colors.surface,
|
|
308
|
+
}}
|
|
309
|
+
>
|
|
310
|
+
<AllFilesDiffView
|
|
311
|
+
sessionId={sessionId}
|
|
312
|
+
scrollToFile={scrollToFile}
|
|
313
|
+
onHeaderRightSlotChange={setHeaderRightSlot}
|
|
314
|
+
/>
|
|
315
|
+
</View>
|
|
316
|
+
)}
|
|
317
|
+
{fileViewPath && canShowSidebar && (
|
|
318
|
+
<View
|
|
319
|
+
pointerEvents="box-none"
|
|
320
|
+
style={{
|
|
321
|
+
position: 'absolute',
|
|
322
|
+
top: safeArea.top + headerHeight,
|
|
323
|
+
left: 0,
|
|
324
|
+
right: 0,
|
|
325
|
+
bottom: 0,
|
|
326
|
+
backgroundColor: theme.colors.surface,
|
|
327
|
+
}}
|
|
328
|
+
>
|
|
329
|
+
<FileViewPanel
|
|
330
|
+
sessionId={sessionId}
|
|
331
|
+
filePath={fileViewPath}
|
|
332
|
+
onHeaderRightSlotChange={setHeaderRightSlot}
|
|
333
|
+
/>
|
|
334
|
+
</View>
|
|
335
|
+
)}
|
|
336
|
+
</View>
|
|
337
|
+
<Animated.View style={[{ minWidth: 0, alignSelf: 'stretch' }, animatedSidebarStyle]}>
|
|
338
|
+
<View style={{ width: sidebarWidth, flex: 1 }}>
|
|
339
|
+
<FilesSidebar
|
|
340
|
+
sessionId={sessionId}
|
|
341
|
+
selectedPath={sidebarMode === 'changes' ? scrollToFile : fileViewPath}
|
|
342
|
+
onFilePress={handleSidebarFilePress}
|
|
343
|
+
mode={sidebarMode}
|
|
344
|
+
onModeChange={setSidebarMode}
|
|
345
|
+
onAllFilesFilePress={handleAllFilesFilePress}
|
|
346
|
+
/>
|
|
347
|
+
</View>
|
|
348
|
+
</Animated.View>
|
|
349
|
+
</View>
|
|
350
|
+
);
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
const SIDEBAR_MIN_WINDOW_WIDTH = 1100;
|
|
354
|
+
|
|
355
|
+
// Hoisted so AgentInput's React.memo doesn't see a new array ref on every keystroke
|
|
356
|
+
const AGENT_INPUT_AUTOCOMPLETE_PREFIXES = ['@', '/'];
|
|
357
|
+
|
|
358
|
+
// Imperative handle exposed by ChatComposer so SessionViewLoaded can read /
|
|
359
|
+
// clear the message text without subscribing to it (which would re-render
|
|
360
|
+
// the whole loaded screen on every keystroke).
|
|
361
|
+
type ChatComposerHandle = {
|
|
362
|
+
getMessage: () => string;
|
|
363
|
+
clearMessage: () => void;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
type ChatComposerProps = Omit<
|
|
367
|
+
React.ComponentProps<typeof AgentInput>,
|
|
368
|
+
'initialValue' | 'onChangeText'
|
|
369
|
+
> & {
|
|
370
|
+
sessionId: string;
|
|
371
|
+
composerHandleRef: React.RefObject<ChatComposerHandle | null>;
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
// Owns the chat-message draft autosave. The textarea itself is uncontrolled:
|
|
375
|
+
// keystrokes never round-trip through React state, so the parent can stay
|
|
376
|
+
// stable on every keystroke and deletion doesn't batch on a busy main thread.
|
|
377
|
+
// `message` here is a low-priority mirror updated via startTransition; it's
|
|
378
|
+
// only used to feed useDraft's debounced autosave. Reads/clears on send go
|
|
379
|
+
// through the MultiTextInput handle imperatively.
|
|
380
|
+
const ChatComposer = React.memo(function ChatComposer(props: ChatComposerProps) {
|
|
381
|
+
const { sessionId, composerHandleRef, ...rest } = props;
|
|
382
|
+
// Synchronously hydrate the textarea with any saved draft so the user sees
|
|
383
|
+
// their work-in-progress on session open without an extra round-trip.
|
|
384
|
+
const initialDraft = React.useMemo(() => {
|
|
385
|
+
return storage.getState().sessions[sessionId]?.draft ?? '';
|
|
386
|
+
}, [sessionId]);
|
|
387
|
+
const inputHandleRef = React.useRef<MultiTextInputHandle>(null);
|
|
388
|
+
const [message, setMessage] = React.useState(initialDraft);
|
|
389
|
+
|
|
390
|
+
const applyDraft = React.useCallback((text: string) => {
|
|
391
|
+
inputHandleRef.current?.setTextAndSelection(text, { start: text.length, end: text.length });
|
|
392
|
+
setMessage(text);
|
|
393
|
+
}, []);
|
|
394
|
+
|
|
395
|
+
const { clearDraft } = useDraft(sessionId, message, applyDraft);
|
|
396
|
+
|
|
397
|
+
const handleChangeText = React.useCallback((text: string) => {
|
|
398
|
+
// Transition keeps the textarea responsive even when the draft
|
|
399
|
+
// autosave / re-render takes longer than a frame.
|
|
400
|
+
React.startTransition(() => setMessage(text));
|
|
401
|
+
}, []);
|
|
402
|
+
|
|
403
|
+
React.useImperativeHandle(composerHandleRef, () => ({
|
|
404
|
+
getMessage: () => inputHandleRef.current?.getText() ?? '',
|
|
405
|
+
clearMessage: () => {
|
|
406
|
+
inputHandleRef.current?.setTextAndSelection('', { start: 0, end: 0 });
|
|
407
|
+
setMessage('');
|
|
408
|
+
clearDraft();
|
|
409
|
+
},
|
|
410
|
+
}), [clearDraft]);
|
|
411
|
+
|
|
412
|
+
return (
|
|
413
|
+
<AgentInput
|
|
414
|
+
{...rest}
|
|
415
|
+
ref={inputHandleRef}
|
|
416
|
+
sessionId={sessionId}
|
|
417
|
+
initialValue={initialDraft}
|
|
418
|
+
onChangeText={handleChangeText}
|
|
419
|
+
/>
|
|
420
|
+
);
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
function SessionViewLoaded({ sessionId, session }: { sessionId: string, session: Session }) {
|
|
424
|
+
const { theme } = useUnistyles();
|
|
425
|
+
const router = useRouter();
|
|
426
|
+
const safeArea = useSafeAreaInsets();
|
|
427
|
+
const isLandscape = useIsLandscape();
|
|
428
|
+
const deviceType = useDeviceType();
|
|
429
|
+
const isTablet = useIsTablet();
|
|
430
|
+
const realtimeStatus = useRealtimeStatus();
|
|
431
|
+
const { messages, isLoaded } = useSessionMessages(sessionId);
|
|
432
|
+
const acknowledgedCliVersions = useLocalSetting('acknowledgedCliVersions');
|
|
433
|
+
const zenMode = useLocalSetting('zenMode');
|
|
434
|
+
const sessionInputHorizontalPadding = Platform.OS === 'web' || isRunningOnMac() || isTablet ? 12 : 8;
|
|
435
|
+
|
|
436
|
+
// Check if CLI version is outdated and not already acknowledged
|
|
437
|
+
const cliVersion = session.metadata?.version;
|
|
438
|
+
const machineId = session.metadata?.machineId;
|
|
439
|
+
const isCliOutdated = cliVersion && !isVersionSupported(cliVersion, MINIMUM_CLI_VERSION);
|
|
440
|
+
const isAcknowledged = machineId && acknowledgedCliVersions[machineId] === cliVersion;
|
|
441
|
+
const shouldShowCliWarning = isCliOutdated && !isAcknowledged;
|
|
442
|
+
const flavor = session.metadata?.flavor;
|
|
443
|
+
const availableModels = React.useMemo(() => (
|
|
444
|
+
getAvailableModels(flavor, session.metadata, t)
|
|
445
|
+
), [flavor, session.metadata]);
|
|
446
|
+
const availableModes = React.useMemo(() => (
|
|
447
|
+
getAvailablePermissionModes(flavor, session.metadata, t)
|
|
448
|
+
), [flavor, session.metadata]);
|
|
449
|
+
const agentDefaultOverrides = useSetting('agentDefaultOverrides');
|
|
450
|
+
const effectiveAgentDefaults = React.useMemo(() => (
|
|
451
|
+
resolveAgentDefaultConfig(agentDefaultOverrides, flavor)
|
|
452
|
+
), [agentDefaultOverrides, flavor]);
|
|
453
|
+
|
|
454
|
+
const permissionMode = React.useMemo<PermissionMode | null>(() => (
|
|
455
|
+
resolveCurrentOption(availableModes, [
|
|
456
|
+
session.permissionMode,
|
|
457
|
+
effectiveAgentDefaults.permissionMode,
|
|
458
|
+
session.metadata?.currentOperatingModeCode,
|
|
459
|
+
])
|
|
460
|
+
), [availableModes, session.permissionMode, effectiveAgentDefaults.permissionMode, session.metadata?.currentOperatingModeCode]);
|
|
461
|
+
|
|
462
|
+
const modelMode = React.useMemo<ModelMode | null>(() => (
|
|
463
|
+
resolveCurrentOption(availableModels, [
|
|
464
|
+
session.modelMode,
|
|
465
|
+
effectiveAgentDefaults.modelMode,
|
|
466
|
+
session.metadata?.currentModelCode,
|
|
467
|
+
])
|
|
468
|
+
), [availableModels, session.modelMode, effectiveAgentDefaults.modelMode, session.metadata?.currentModelCode]);
|
|
469
|
+
|
|
470
|
+
// Effort level state
|
|
471
|
+
const modelKey = modelMode?.key ?? 'default';
|
|
472
|
+
const availableEffortLevels = React.useMemo<EffortLevel[]>(() => (
|
|
473
|
+
getEffortLevelsForModel(flavor, modelKey)
|
|
474
|
+
), [flavor, modelKey]);
|
|
475
|
+
const effortLevel = React.useMemo<EffortLevel | null>(() => (
|
|
476
|
+
resolveCurrentOption(availableEffortLevels, [
|
|
477
|
+
session.effortLevel,
|
|
478
|
+
effectiveAgentDefaults.effortLevel,
|
|
479
|
+
])
|
|
480
|
+
), [availableEffortLevels, session.effortLevel, effectiveAgentDefaults.effortLevel]);
|
|
481
|
+
|
|
482
|
+
const sessionStatus = useSessionStatus(session);
|
|
483
|
+
const sessionUsage = useSessionUsage(sessionId);
|
|
484
|
+
const alwaysShowContextSize = useSetting('alwaysShowContextSize');
|
|
485
|
+
const experiments = useSetting('experiments');
|
|
486
|
+
const expResumeSession = useSetting('expResumeSession');
|
|
487
|
+
const { canResume, resumeSession, resumingSession } = useSessionQuickActions(session);
|
|
488
|
+
const isDisconnected = !sessionStatus.isConnected;
|
|
489
|
+
const resumeCommandBlock = getResumeCommandBlock(session);
|
|
490
|
+
|
|
491
|
+
// Image attachment state (expImageUpload feature flag)
|
|
492
|
+
const expImageUpload = useSetting('expImageUpload');
|
|
493
|
+
const { selectedImages, pickImages, removeImage, clearImages, addImages } = useImagePicker();
|
|
494
|
+
|
|
495
|
+
// ChatComposer owns the message state + useDraft subscription. We only
|
|
496
|
+
// hold an imperative handle so handleSend can read the live text and
|
|
497
|
+
// clear it without subscribing to it (which would re-render the whole
|
|
498
|
+
// SessionViewLoaded tree on every keystroke).
|
|
499
|
+
const composerHandleRef = React.useRef<ChatComposerHandle | null>(null);
|
|
500
|
+
|
|
501
|
+
// Handle dismissing CLI version warning
|
|
502
|
+
const handleDismissCliWarning = React.useCallback(() => {
|
|
503
|
+
if (machineId && cliVersion) {
|
|
504
|
+
storage.getState().applyLocalSettings({
|
|
505
|
+
acknowledgedCliVersions: {
|
|
506
|
+
...acknowledgedCliVersions,
|
|
507
|
+
[machineId]: cliVersion
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}, [machineId, cliVersion, acknowledgedCliVersions]);
|
|
512
|
+
|
|
513
|
+
// Function to update permission mode
|
|
514
|
+
const updatePermissionMode = React.useCallback((mode: PermissionMode) => {
|
|
515
|
+
storage.getState().updateSessionPermissionMode(sessionId, mode.key);
|
|
516
|
+
}, [sessionId]);
|
|
517
|
+
|
|
518
|
+
const updateModelMode = React.useCallback((mode: ModelMode) => {
|
|
519
|
+
storage.getState().updateSessionModelMode(sessionId, mode.key);
|
|
520
|
+
}, [sessionId]);
|
|
521
|
+
|
|
522
|
+
const updateEffortLevel = React.useCallback((level: EffortLevel) => {
|
|
523
|
+
storage.getState().updateSessionEffortLevel(sessionId, level.key);
|
|
524
|
+
}, [sessionId]);
|
|
525
|
+
|
|
526
|
+
// Memoize header-dependent styles to prevent re-renders
|
|
527
|
+
const headerDependentStyles = React.useMemo(() => ({
|
|
528
|
+
contentContainer: {
|
|
529
|
+
flex: 1
|
|
530
|
+
},
|
|
531
|
+
flatListStyle: {
|
|
532
|
+
marginTop: 0 // No marginTop needed since header is handled by parent
|
|
533
|
+
},
|
|
534
|
+
}), []);
|
|
535
|
+
|
|
536
|
+
// handleSend reads the live message via the composer ref, so it doesn't
|
|
537
|
+
// need to re-create on every keystroke.
|
|
538
|
+
const handleSend = React.useCallback(() => {
|
|
539
|
+
const liveMessage = composerHandleRef.current?.getMessage() ?? '';
|
|
540
|
+
if (liveMessage.trim() || (expImageUpload && selectedImages.length > 0)) {
|
|
541
|
+
const attachments = expImageUpload ? selectedImages : undefined;
|
|
542
|
+
composerHandleRef.current?.clearMessage();
|
|
543
|
+
if (expImageUpload) clearImages();
|
|
544
|
+
sync.sendMessage(sessionId, liveMessage, { source: 'chat', attachments });
|
|
545
|
+
}
|
|
546
|
+
}, [sessionId, expImageUpload, selectedImages, clearImages]);
|
|
547
|
+
|
|
548
|
+
const handleAbort = React.useCallback(() => {
|
|
549
|
+
storage.getState().resetSessionAgentOverrides(sessionId);
|
|
550
|
+
sessionAbort(sessionId);
|
|
551
|
+
}, [sessionId]);
|
|
552
|
+
|
|
553
|
+
const handleFileViewerPress = React.useCallback(() => {
|
|
554
|
+
router.push(`/session/${sessionId}/files`);
|
|
555
|
+
}, [router, sessionId]);
|
|
556
|
+
|
|
557
|
+
const handleAutocompleteSuggestions = React.useCallback((query: string) => (
|
|
558
|
+
getSuggestions(sessionId, query)
|
|
559
|
+
), [sessionId]);
|
|
560
|
+
|
|
561
|
+
const connectionStatus = React.useMemo(() => ({
|
|
562
|
+
text: sessionStatus.statusText,
|
|
563
|
+
color: sessionStatus.statusColor,
|
|
564
|
+
dotColor: sessionStatus.statusDotColor,
|
|
565
|
+
isPulsing: sessionStatus.isPulsing,
|
|
566
|
+
}), [sessionStatus.statusText, sessionStatus.statusColor, sessionStatus.statusDotColor, sessionStatus.isPulsing]);
|
|
567
|
+
|
|
568
|
+
const usageData = React.useMemo(() => {
|
|
569
|
+
const source = sessionUsage ?? session.latestUsage;
|
|
570
|
+
if (!source) return undefined;
|
|
571
|
+
return {
|
|
572
|
+
inputTokens: source.inputTokens,
|
|
573
|
+
outputTokens: source.outputTokens,
|
|
574
|
+
cacheCreation: source.cacheCreation,
|
|
575
|
+
cacheRead: source.cacheRead,
|
|
576
|
+
contextSize: source.contextSize,
|
|
577
|
+
};
|
|
578
|
+
}, [sessionUsage, session.latestUsage]);
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
// Handle microphone button press - memoized to prevent button flashing
|
|
582
|
+
const handleMicrophonePress = React.useCallback(async () => {
|
|
583
|
+
if (realtimeStatus === 'connecting') {
|
|
584
|
+
return; // Prevent actions during transitions
|
|
585
|
+
}
|
|
586
|
+
if (realtimeStatus === 'disconnected' || realtimeStatus === 'error') {
|
|
587
|
+
try {
|
|
588
|
+
const initialPrompt = voiceHooks.onVoiceStarted(sessionId);
|
|
589
|
+
const conversationId = await startRealtimeSession(sessionId, initialPrompt);
|
|
590
|
+
if (conversationId) {
|
|
591
|
+
const hasPro = storage.getState().purchases.entitlements['pro'] ?? false;
|
|
592
|
+
tracking?.capture('voice_session_started', {
|
|
593
|
+
session_id: sessionId,
|
|
594
|
+
elevenlabs_conversation_id: conversationId,
|
|
595
|
+
has_pro: hasPro,
|
|
596
|
+
onboarding_prompt_load_count: getVoiceOnboardingPromptLoadCount(),
|
|
597
|
+
voice_message_count: getVoiceMessageCount(),
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
} catch (error) {
|
|
601
|
+
console.error('Failed to start realtime session:', error);
|
|
602
|
+
Modal.alert(t('common.error'), t('errors.voiceSessionFailed'));
|
|
603
|
+
tracking?.capture('voice_session_error', {
|
|
604
|
+
session_id: sessionId,
|
|
605
|
+
elevenlabs_conversation_id: getCurrentVoiceConversationId(),
|
|
606
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
} else if (realtimeStatus === 'connected') {
|
|
610
|
+
const conversationId = getCurrentVoiceConversationId();
|
|
611
|
+
const durationSeconds = getCurrentVoiceSessionDurationSeconds();
|
|
612
|
+
await stopRealtimeSession();
|
|
613
|
+
tracking?.capture('voice_session_stopped', {
|
|
614
|
+
session_id: sessionId,
|
|
615
|
+
elevenlabs_conversation_id: conversationId,
|
|
616
|
+
...(durationSeconds !== undefined ? { duration_seconds: durationSeconds } : {}),
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
// Notify voice assistant about voice session stop
|
|
620
|
+
voiceHooks.onVoiceStopped();
|
|
621
|
+
}
|
|
622
|
+
}, [realtimeStatus, sessionId]);
|
|
623
|
+
|
|
624
|
+
// Memoize mic button state to prevent flashing during chat transitions
|
|
625
|
+
const micButtonState = useMemo(() => ({
|
|
626
|
+
onMicPress: handleMicrophonePress,
|
|
627
|
+
isMicActive: realtimeStatus === 'connected' || realtimeStatus === 'connecting'
|
|
628
|
+
}), [handleMicrophonePress, realtimeStatus]);
|
|
629
|
+
|
|
630
|
+
// Trigger session visibility and initialize git status sync
|
|
631
|
+
React.useLayoutEffect(() => {
|
|
632
|
+
|
|
633
|
+
// Trigger session sync
|
|
634
|
+
sync.onSessionVisible(sessionId);
|
|
635
|
+
|
|
636
|
+
// Mark session as currently being viewed (clears unread)
|
|
637
|
+
storage.getState().setCurrentViewingSession(sessionId);
|
|
638
|
+
|
|
639
|
+
// Initialize git status sync for this session
|
|
640
|
+
gitStatusSync.getSync(sessionId);
|
|
641
|
+
|
|
642
|
+
return () => {
|
|
643
|
+
// Clear viewing session on unmount
|
|
644
|
+
const current = storage.getState().currentViewingSessionId;
|
|
645
|
+
if (current === sessionId) {
|
|
646
|
+
storage.getState().setCurrentViewingSession(null);
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
}, [sessionId, realtimeStatus]);
|
|
650
|
+
|
|
651
|
+
let content = (
|
|
652
|
+
<>
|
|
653
|
+
<Deferred>
|
|
654
|
+
{messages.length > 0 && (
|
|
655
|
+
<ChatList session={session} />
|
|
656
|
+
)}
|
|
657
|
+
</Deferred>
|
|
658
|
+
</>
|
|
659
|
+
);
|
|
660
|
+
const placeholder = messages.length === 0 ? (
|
|
661
|
+
<>
|
|
662
|
+
{isLoaded ? (
|
|
663
|
+
<EmptyMessages session={session} />
|
|
664
|
+
) : (
|
|
665
|
+
<ActivityIndicator size="small" color={theme.colors.textSecondary} />
|
|
666
|
+
)}
|
|
667
|
+
</>
|
|
668
|
+
) : null;
|
|
669
|
+
|
|
670
|
+
const composer = (
|
|
671
|
+
<ChatComposer
|
|
672
|
+
composerHandleRef={composerHandleRef}
|
|
673
|
+
placeholder={t('session.inputPlaceholder')}
|
|
674
|
+
sessionId={sessionId}
|
|
675
|
+
permissionMode={permissionMode}
|
|
676
|
+
onPermissionModeChange={updatePermissionMode}
|
|
677
|
+
availableModes={availableModes}
|
|
678
|
+
modelMode={modelMode}
|
|
679
|
+
availableModels={availableModels}
|
|
680
|
+
onModelModeChange={updateModelMode}
|
|
681
|
+
effortLevel={effortLevel}
|
|
682
|
+
availableEffortLevels={availableEffortLevels}
|
|
683
|
+
onEffortLevelChange={updateEffortLevel}
|
|
684
|
+
metadata={session.metadata}
|
|
685
|
+
connectionStatus={connectionStatus}
|
|
686
|
+
blockSend={false}
|
|
687
|
+
onSend={handleSend}
|
|
688
|
+
onMicPress={isDisconnected ? undefined : micButtonState.onMicPress}
|
|
689
|
+
isMicActive={isDisconnected ? false : micButtonState.isMicActive}
|
|
690
|
+
onAbort={isDisconnected ? undefined : handleAbort}
|
|
691
|
+
showAbortButton={sessionStatus.state === 'thinking' || sessionStatus.state === 'waiting'}
|
|
692
|
+
onFileViewerPress={experiments && !isTablet ? handleFileViewerPress : undefined}
|
|
693
|
+
selectedImages={expImageUpload ? selectedImages : undefined}
|
|
694
|
+
onPickImages={expImageUpload ? pickImages : undefined}
|
|
695
|
+
onRemoveImage={expImageUpload ? removeImage : undefined}
|
|
696
|
+
onAddImages={expImageUpload ? addImages : undefined}
|
|
697
|
+
autocompletePrefixes={AGENT_INPUT_AUTOCOMPLETE_PREFIXES}
|
|
698
|
+
autocompleteSuggestions={handleAutocompleteSuggestions}
|
|
699
|
+
usageData={usageData}
|
|
700
|
+
alwaysShowContextSize={alwaysShowContextSize}
|
|
701
|
+
zenMode={zenMode}
|
|
702
|
+
/>
|
|
703
|
+
);
|
|
704
|
+
|
|
705
|
+
// Disconnected sessions get the full Resume affordance regardless of
|
|
706
|
+
// whether they were explicitly archived or just lost their CLI (e.g.
|
|
707
|
+
// Ctrl-C in terminal — lifecycleState stays 'running', server flips
|
|
708
|
+
// active=false). InactiveArchivedHint handles both cases: shows the
|
|
709
|
+
// Resume button when canResume is true, falls back to the
|
|
710
|
+
// copy-this-command hint when the experiments toggle is off or the
|
|
711
|
+
// machine isn't reachable.
|
|
712
|
+
const inactiveHint = isDisconnected ? (
|
|
713
|
+
<CenteredInputWidth horizontalPadding={sessionInputHorizontalPadding}>
|
|
714
|
+
<InactiveArchivedHint
|
|
715
|
+
resumeCommandBlock={expResumeSession ? resumeCommandBlock : null}
|
|
716
|
+
canResume={canResume}
|
|
717
|
+
resuming={resumingSession}
|
|
718
|
+
onResume={resumeSession}
|
|
719
|
+
/>
|
|
720
|
+
</CenteredInputWidth>
|
|
721
|
+
) : null;
|
|
722
|
+
|
|
723
|
+
const input = (
|
|
724
|
+
<>
|
|
725
|
+
{inactiveHint}
|
|
726
|
+
{composer}
|
|
727
|
+
</>
|
|
728
|
+
);
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
return (
|
|
732
|
+
<>
|
|
733
|
+
{/* CLI Version Warning Overlay - Subtle centered pill */}
|
|
734
|
+
{shouldShowCliWarning && !(isLandscape && deviceType === 'phone') && (
|
|
735
|
+
<Pressable
|
|
736
|
+
onPress={handleDismissCliWarning}
|
|
737
|
+
style={{
|
|
738
|
+
position: 'absolute',
|
|
739
|
+
top: 8, // Position at top of content area (padding handled by parent)
|
|
740
|
+
alignSelf: 'center',
|
|
741
|
+
backgroundColor: '#FFF3CD',
|
|
742
|
+
borderRadius: 100, // Fully rounded pill
|
|
743
|
+
paddingHorizontal: 14,
|
|
744
|
+
paddingVertical: 7,
|
|
745
|
+
flexDirection: 'row',
|
|
746
|
+
alignItems: 'center',
|
|
747
|
+
zIndex: 998, // Below voice bar but above content
|
|
748
|
+
shadowColor: '#000',
|
|
749
|
+
shadowOffset: { width: 0, height: 2 },
|
|
750
|
+
shadowOpacity: 0.15,
|
|
751
|
+
shadowRadius: 4,
|
|
752
|
+
elevation: 4,
|
|
753
|
+
}}
|
|
754
|
+
>
|
|
755
|
+
<Ionicons name="warning-outline" size={14} color="#FF9500" style={{ marginRight: 6 }} />
|
|
756
|
+
<Text style={{
|
|
757
|
+
fontSize: 12,
|
|
758
|
+
color: '#856404',
|
|
759
|
+
fontWeight: '600'
|
|
760
|
+
}}>
|
|
761
|
+
{t('sessionInfo.cliVersionOutdated')}
|
|
762
|
+
</Text>
|
|
763
|
+
<Ionicons name="close" size={14} color="#856404" style={{ marginLeft: 8 }} />
|
|
764
|
+
</Pressable>
|
|
765
|
+
)}
|
|
766
|
+
|
|
767
|
+
{/* Main content area - no padding since header is overlay */}
|
|
768
|
+
<View style={{ flexBasis: 0, flexGrow: 1, paddingBottom: safeArea.bottom + ((isRunningOnMac() || Platform.OS === 'web') ? 8 : 0) }}>
|
|
769
|
+
<AgentContentView
|
|
770
|
+
content={content}
|
|
771
|
+
input={input}
|
|
772
|
+
placeholder={placeholder}
|
|
773
|
+
/>
|
|
774
|
+
</View >
|
|
775
|
+
|
|
776
|
+
{/* Back button for landscape phone mode when header is hidden */}
|
|
777
|
+
{
|
|
778
|
+
isLandscape && deviceType === 'phone' && (
|
|
779
|
+
<Pressable
|
|
780
|
+
onPress={() => router.back()}
|
|
781
|
+
style={{
|
|
782
|
+
position: 'absolute',
|
|
783
|
+
top: safeArea.top + 8,
|
|
784
|
+
left: 16,
|
|
785
|
+
width: 44,
|
|
786
|
+
height: 44,
|
|
787
|
+
borderRadius: 22,
|
|
788
|
+
backgroundColor: `rgba(${theme.dark ? '28, 23, 28' : '255, 255, 255'}, 0.9)`,
|
|
789
|
+
alignItems: 'center',
|
|
790
|
+
justifyContent: 'center',
|
|
791
|
+
...Platform.select({
|
|
792
|
+
ios: {
|
|
793
|
+
shadowColor: '#000',
|
|
794
|
+
shadowOffset: { width: 0, height: 2 },
|
|
795
|
+
shadowOpacity: 0.1,
|
|
796
|
+
shadowRadius: 4,
|
|
797
|
+
},
|
|
798
|
+
android: {
|
|
799
|
+
elevation: 2,
|
|
800
|
+
}
|
|
801
|
+
}),
|
|
802
|
+
}}
|
|
803
|
+
hitSlop={15}
|
|
804
|
+
>
|
|
805
|
+
<Ionicons
|
|
806
|
+
name={Platform.OS === 'ios' ? 'chevron-back' : 'arrow-back'}
|
|
807
|
+
size={Platform.select({ ios: 28, default: 24 })}
|
|
808
|
+
color="#000"
|
|
809
|
+
/>
|
|
810
|
+
</Pressable>
|
|
811
|
+
)
|
|
812
|
+
}
|
|
813
|
+
</>
|
|
814
|
+
)
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
function InactiveArchivedHint(props: {
|
|
818
|
+
resumeCommandBlock: NonNullable<ReturnType<typeof getResumeCommandBlock>> | null;
|
|
819
|
+
canResume: boolean;
|
|
820
|
+
resuming: boolean;
|
|
821
|
+
onResume: () => void;
|
|
822
|
+
}) {
|
|
823
|
+
const { theme } = useUnistyles();
|
|
824
|
+
const hintTextStyle = {
|
|
825
|
+
color: theme.colors.agentEventText,
|
|
826
|
+
fontSize: 13,
|
|
827
|
+
lineHeight: 18,
|
|
828
|
+
textAlign: 'left' as const,
|
|
829
|
+
};
|
|
830
|
+
|
|
831
|
+
return (
|
|
832
|
+
<View style={{
|
|
833
|
+
paddingTop: 12,
|
|
834
|
+
paddingBottom: 10,
|
|
835
|
+
gap: 10,
|
|
836
|
+
alignItems: 'stretch',
|
|
837
|
+
}}>
|
|
838
|
+
<View style={{ paddingHorizontal: 8, gap: 4 }}>
|
|
839
|
+
<Text style={hintTextStyle}>
|
|
840
|
+
{t('session.inactiveArchived')}
|
|
841
|
+
</Text>
|
|
842
|
+
{props.canResume ? null : props.resumeCommandBlock && (
|
|
843
|
+
<Text style={hintTextStyle}>
|
|
844
|
+
{t('session.resumeFromTerminal')}
|
|
845
|
+
</Text>
|
|
846
|
+
)}
|
|
847
|
+
</View>
|
|
848
|
+
{props.canResume ? (
|
|
849
|
+
<Pressable
|
|
850
|
+
onPress={props.onResume}
|
|
851
|
+
disabled={props.resuming}
|
|
852
|
+
style={({ pressed }) => ({
|
|
853
|
+
height: 40,
|
|
854
|
+
borderRadius: 10,
|
|
855
|
+
backgroundColor: theme.colors.button.primary.background,
|
|
856
|
+
opacity: props.resuming ? 0.6 : pressed ? 0.8 : 1,
|
|
857
|
+
alignItems: 'center',
|
|
858
|
+
justifyContent: 'center',
|
|
859
|
+
marginHorizontal: 8,
|
|
860
|
+
})}
|
|
861
|
+
>
|
|
862
|
+
{props.resuming ? (
|
|
863
|
+
<ActivityIndicator size="small" color={theme.colors.button.primary.tint} />
|
|
864
|
+
) : (
|
|
865
|
+
<Text style={{ color: theme.colors.button.primary.tint, fontSize: 15, fontWeight: '600' }}>
|
|
866
|
+
{t('sessionInfo.resumeSession')}
|
|
867
|
+
</Text>
|
|
868
|
+
)}
|
|
869
|
+
</Pressable>
|
|
870
|
+
) : props.resumeCommandBlock && (
|
|
871
|
+
<ResumeCommandCopyBlock resumeCommandBlock={props.resumeCommandBlock} />
|
|
872
|
+
)}
|
|
873
|
+
</View>
|
|
874
|
+
);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
function ResumeCommandCopyBlock({ resumeCommandBlock }: {
|
|
878
|
+
resumeCommandBlock: NonNullable<ReturnType<typeof getResumeCommandBlock>>;
|
|
879
|
+
}) {
|
|
880
|
+
const { theme } = useUnistyles();
|
|
881
|
+
const [copied, setCopied] = React.useState(false);
|
|
882
|
+
|
|
883
|
+
return (
|
|
884
|
+
<Pressable
|
|
885
|
+
onPress={async () => {
|
|
886
|
+
await Clipboard.setStringAsync(resumeCommandBlock.copyText);
|
|
887
|
+
setCopied(true);
|
|
888
|
+
setTimeout(() => setCopied(false), 2000);
|
|
889
|
+
}}
|
|
890
|
+
style={{
|
|
891
|
+
minHeight: 48,
|
|
892
|
+
borderRadius: 14,
|
|
893
|
+
backgroundColor: theme.colors.surfaceHigh,
|
|
894
|
+
flexDirection: 'row',
|
|
895
|
+
gap: 8,
|
|
896
|
+
paddingHorizontal: 16,
|
|
897
|
+
paddingVertical: 12,
|
|
898
|
+
alignItems: 'flex-start',
|
|
899
|
+
}}
|
|
900
|
+
>
|
|
901
|
+
<View style={{ flex: 1 }}>
|
|
902
|
+
{resumeCommandBlock.lines.map((line, index) => (
|
|
903
|
+
<Text
|
|
904
|
+
key={`${line}-${index}`}
|
|
905
|
+
style={{
|
|
906
|
+
color: theme.colors.text,
|
|
907
|
+
fontSize: 13,
|
|
908
|
+
lineHeight: 18,
|
|
909
|
+
fontFamily: Platform.OS === 'ios' ? 'Menlo' : 'monospace',
|
|
910
|
+
}}
|
|
911
|
+
>
|
|
912
|
+
{line}
|
|
913
|
+
</Text>
|
|
914
|
+
))}
|
|
915
|
+
</View>
|
|
916
|
+
<Ionicons
|
|
917
|
+
name={copied ? 'checkmark' : 'copy-outline'}
|
|
918
|
+
size={16}
|
|
919
|
+
color={copied ? '#30D158' : theme.colors.textSecondary}
|
|
920
|
+
style={{ marginTop: 1 }}
|
|
921
|
+
/>
|
|
922
|
+
</Pressable>
|
|
923
|
+
);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
function CenteredInputWidth(props: {
|
|
927
|
+
children: React.ReactNode;
|
|
928
|
+
horizontalPadding: number;
|
|
929
|
+
}) {
|
|
930
|
+
return (
|
|
931
|
+
<View style={{
|
|
932
|
+
width: '100%',
|
|
933
|
+
paddingHorizontal: props.horizontalPadding,
|
|
934
|
+
alignItems: 'center',
|
|
935
|
+
}}>
|
|
936
|
+
<View style={{
|
|
937
|
+
width: '100%',
|
|
938
|
+
maxWidth: layout.maxWidth,
|
|
939
|
+
}}>
|
|
940
|
+
{props.children}
|
|
941
|
+
</View>
|
|
942
|
+
</View>
|
|
943
|
+
);
|
|
944
|
+
}
|