feat: refactor structure and update deployment#87
Merged
zhu-xiaowei merged 11 commits intomainfrom Apr 21, 2026
Merged
Conversation
- Move markdown/ to core/markdown/ for cross-module reuse - Move app generation files to appgen/ (screens, components, service, util) - Move image generation files to imagegen/ - Move citation components to websearch/components/citation/ - Split chat/component/ into input/, message/, toolbar/ sub-groups - Move HapticUtils, ToastUtils to core/ (used across all modules) - Move FaviconUtils, SearchIconUtils to websearch/ - Move BedrockMessageConvertor to api/ (used by 14 files across 4 modules) - Merge chat/utils/ into chat/util/ - Remove unused CustomScrollToBottomComponent - Extract ChatScreen hooks: useChatSession, useChatStreaming, useChatScroll, useChatVoice - Add ChatProvider interface and ChatProviderRouter for pluggable API layer - Split StorageUtils into domain modules (Chat, Model, Prompt, Preference, Search, App) - Add README.md with tech stack and project structure All import paths updated. No logic or UI changes - pure structural refactoring. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the two-step build/deploy flow with a single `./install.sh` that packages source, builds the image remotely via AWS CodeBuild (no local Docker needed), deploys the CloudFormation stack, and prints the API URL, API Key, and a scannable QR code for mobile auto-configuration. Also drop hardcoded `maxTokens` on the Bedrock Converse calls so each model gets its own maximum output automatically — no regex rules needed for future Claude/Kimi/DeepSeek/GLM releases. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…okens App now has a scan icon next to the API URL field that opens a 90% bottom sheet with a full-bleed camera preview. Scanning the QR from install.sh auto-fills API URL and API Key with a haptic success tap. iOS + Android (vision-camera v4 + MLKit), macOS gracefully skips the entry. install.sh no longer prints the raw API Key to the terminal — it points to the region-specific API Gateway console instead. The QR still embeds the key for the trusted "your-terminal-to-your-phone" flow. Server sets maxTokens per Claude model family (Opus 4.7/4.6 → 128K, Sonnet/Haiku 4 → 64K, etc) so Converse doesn't truncate at Bedrock's 4096 default. Other providers keep their server-side max. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Auto-attach `context-1m-2025-08-07` anthropic_beta header for Sonnet >= 4 and Opus >= 4.5 on both API-key (app) and server paths. Also add Opus 4.7 / Haiku 4.5 to thinking models list. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New accounts may need longer for IAM role to propagate globally before CodeBuild can assume it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract inline styles to StyleSheet in App.tsx and ScanQRSheet.tsx - Update README docs to clarify API Key obtain link - Remove obsolete UPGRADE_RN_0.83.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add self-bootstrap logic to install.sh so it can be run directly via curl without manually cloning the repo first. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Redirect stdin to /dev/null for git clone to prevent pipe consumption. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bash reads piped scripts line-by-line from stdin; child processes (git clone) can consume bytes from the same pipe, corrupting execution. Wrapping in main() forces bash to read the entire script before running. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace simulate-principal-policy (which tests IAM internal consistency but not CodeBuild's view of the role) with direct retry of the real create-project/update-project calls. Covers both new and existing projects, so re-runs after role deletion also work. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
General Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT-0 license.