mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-22 03:18:50 +08:00
对齐 Web chat-inputbox:
- 选图:expo-image-picker 相册多选(≤3 张、仅图片);超 2MB 自动用 expo-image-manipulator
缩边长 + JPEG 压缩到 2MB 内(≤2MB 原图直接用)
- 上传:预签名直传(POST /api/v1/uploader/presign → PUT 原始字节)。用 XHR(responseType blob)
取本地文件,blob.slice(...,'') 去掉 Content-Type,fetch credentials:'omit' 跨域直传——对齐 Web
的 new Blob([file]);否则 iOS 多发的 Content-Type 进入 SigV4 规范请求触发 SignatureDoesNotMatch
- 发送:user-input 负载带 attachments:[{url,filename}](原来恒为空);历史/实时用户消息渲染缩略图
- composer:暂存缩略图(上传中/失败态、可移除)、上传中禁发、并发上传;快捷指令不带走暂存图
- AI 的 markdown 图片:覆盖 markdown image 规则,用普通 <Image> + onLoad 自适应比例,修掉
react-native-fit-image 永久 loading 转圈 + React19 "key spread into JSX" 告警
- 保存到相册:点对话里的图片 → expo-media-library/legacy 存系统相册
- 新增原生依赖 expo-image-picker / expo-image-manipulator / expo-media-library
(需重新原生构建;app.json 加图库读/写权限)
86 lines
2.4 KiB
JSON
86 lines
2.4 KiB
JSON
{
|
|
"name": "monkeycode-mobile-expo",
|
|
"version": "1.0.0",
|
|
"description": "MonkeyCode 移动端(Expo / React Native 原生重构)",
|
|
"main": "expo-router/entry",
|
|
"scripts": {
|
|
"start": "expo start",
|
|
"android": "expo run:android",
|
|
"ios": "expo run:ios",
|
|
"web": "expo start --web",
|
|
"lint": "expo lint",
|
|
"test": "jest"
|
|
},
|
|
"dependencies": {
|
|
"@expo/vector-icons": "^15.0.2",
|
|
"@noble/hashes": "^1.6.1",
|
|
"@react-native-async-storage/async-storage": "2.2.0",
|
|
"@shopify/flash-list": "2.0.2",
|
|
"expo": "^56.0.8",
|
|
"expo-asset": "~56.0.15",
|
|
"expo-blur": "~56.0.3",
|
|
"expo-build-properties": "~56.0.17",
|
|
"expo-clipboard": "~56.0.3",
|
|
"expo-constants": "~56.0.16",
|
|
"expo-file-system": "~56.0.7",
|
|
"expo-font": "~56.0.5",
|
|
"expo-image-manipulator": "~56.0.17",
|
|
"expo-image-picker": "~56.0.16",
|
|
"expo-linking": "~56.0.13",
|
|
"expo-media-library": "~56.0.6",
|
|
"expo-router": "~56.2.8",
|
|
"expo-sharing": "~56.0.15",
|
|
"expo-splash-screen": "~56.0.10",
|
|
"expo-status-bar": "~56.0.4",
|
|
"expo-system-ui": "~56.0.5",
|
|
"expo-updates": "~56.0.18",
|
|
"jest": "~29.7.0",
|
|
"punycode": "^2.3.1",
|
|
"react": "19.2.3",
|
|
"react-dom": "19.2.3",
|
|
"react-native": "0.85.3",
|
|
"react-native-gesture-handler": "~2.31.1",
|
|
"react-native-keyboard-controller": "1.21.6",
|
|
"react-native-live-audio-stream": "^1.1.1",
|
|
"react-native-markdown-display": "^7.0.2",
|
|
"react-native-nitro-modules": "^0.35.9",
|
|
"react-native-quick-crypto": "^1.1.5",
|
|
"react-native-reanimated": "4.3.1",
|
|
"react-native-safe-area-context": "~5.7.0",
|
|
"react-native-screens": "4.25.2",
|
|
"react-native-svg": "15.15.4",
|
|
"react-native-web": "^0.21.2",
|
|
"react-native-webview": "13.16.1",
|
|
"react-native-worklets": "0.8.3",
|
|
"react-test-renderer": "^19.2.7"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.25.2",
|
|
"@types/jest": "^29.5.14",
|
|
"@types/node": "^25.9.1",
|
|
"@types/react": "~19.2.0",
|
|
"typescript": "~6.0.3"
|
|
},
|
|
"private": true,
|
|
"expo": {
|
|
"doctor": {
|
|
"reactNativeDirectoryCheck": {
|
|
"exclude": [
|
|
"react-native-markdown-display",
|
|
"@noble/hashes"
|
|
],
|
|
"listUnknownPackages": false
|
|
}
|
|
}
|
|
},
|
|
"jest": {
|
|
"testEnvironment": "node",
|
|
"transform": {
|
|
"^.+\\.[jt]sx?$": "babel-jest"
|
|
},
|
|
"moduleNameMapper": {
|
|
"^@/(.*)$": "<rootDir>/src/$1"
|
|
}
|
|
}
|
|
}
|