Files
MonkeyCode/mobile/app.json
xiaomakuaiz 301a75fb16 feat(mobile): 任务对话支持选图作为附件发送 + 对话图片保存到相册
对齐 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 加图库读/写权限)
2026-06-09 22:06:33 +08:00

97 lines
2.3 KiB
JSON

{
"expo": {
"name": "MonkeyCode",
"slug": "monkeycode",
"version": "260608",
"orientation": "portrait",
"icon": "./assets/icon.png",
"scheme": "monkeycode",
"userInterfaceStyle": "automatic",
"runtimeVersion": {
"policy": "fingerprint"
},
"updates": {
"url": "https://monkeycode-ai.com/mobile/app/manifest",
"enabled": true,
"checkAutomatically": "ON_LOAD",
"fallbackToCacheTimeout": 0
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.chaitin.baizhi.monkeycode",
"buildNumber": "1",
"icon": {
"light": "./assets/icon.png",
"dark": "./assets/icon-dark.png"
},
"infoPlist": {
"NSMicrophoneUsageDescription": "用于语音输入,将你的语音实时转写为文字",
"NSAppTransportSecurity": {
"NSAllowsArbitraryLoads": true,
"NSAllowsLocalNetworking": true
}
}
},
"android": {
"package": "com.chaitin.baizhi.monkeycode",
"versionCode": 1,
"permissions": [
"RECORD_AUDIO"
],
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"bundler": "metro",
"output": "single"
},
"plugins": [
"expo-router",
"expo-font",
"expo-asset",
[
"expo-splash-screen",
{
"image": "./assets/splash.png",
"imageWidth": 200,
"resizeMode": "contain",
"backgroundColor": "#ffffff",
"dark": {
"image": "./assets/splash-dark.png",
"backgroundColor": "#0b0b0e"
}
}
],
"expo-sharing",
[
"expo-image-picker",
{
"photosPermission": "用于选择图片作为对话附件发送给 AI"
}
],
[
"expo-media-library",
{
"savePhotosPermission": "用于把对话中的图片保存到相册",
"photosPermission": false,
"isAccessMediaLocationEnabled": false
}
],
[
"expo-build-properties",
{
"ios": { "buildReactNativeFromSource": true }
}
]
],
"experiments": {
"typedRoutes": true
},
"extra": {
"updatesServer": "https://release.monkeycode-ai.com"
}
}
}