Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
85 lines
2.1 KiB
TypeScript
85 lines
2.1 KiB
TypeScript
import React from 'react';
|
|
import { Image, StyleSheet, TouchableOpacity } from 'react-native';
|
|
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
import UploadSvg from '@app/assets/svg/upload.svg';
|
|
import { IconSizes, PostDimensions } from '@app/constants';
|
|
import { IconButton } from '@app/layout';
|
|
import SvgBanner from '@app/layout/misc/SvgBanner';
|
|
import { ThemeStatic } from '@app/theme';
|
|
import { getImageFromLibrary } from '@app/utils/shared';
|
|
|
|
interface UploadBannerProps {
|
|
pickedAsset: string,
|
|
onAsset: (path: string) => void
|
|
};
|
|
|
|
const UploadBanner: React.FC<UploadBannerProps> = ({ pickedAsset, onAsset }) => {
|
|
const discardImage = () => onAsset('');
|
|
|
|
const pickImage = async () => {
|
|
//@ts-ignore
|
|
const { path } = await getImageFromLibrary(340, 340);
|
|
onAsset(path);
|
|
};
|
|
|
|
let content = (
|
|
<SvgBanner
|
|
Svg={UploadSvg}
|
|
placeholder='Click to upload a new post'
|
|
textStyle={styles.placeholderText}
|
|
/>
|
|
);
|
|
|
|
if (pickedAsset) {
|
|
content = (
|
|
<>
|
|
<IconButton
|
|
onPress={discardImage}
|
|
style={styles.discardImageButton}
|
|
Icon={() =>
|
|
<AntDesign
|
|
name='closecircle'
|
|
color={ThemeStatic.white}
|
|
size={IconSizes.x6}
|
|
/>}
|
|
/>
|
|
<Image source={{ uri: pickedAsset }} style={styles.pickedImage} />
|
|
</>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<TouchableOpacity activeOpacity={0.95} onPress={pickImage} style={[styles.container, { borderWidth: pickedAsset ? 0 : StyleSheet.hairlineWidth }]}>
|
|
{content}
|
|
</TouchableOpacity>
|
|
);
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
...PostDimensions.Large,
|
|
alignSelf: 'center',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
borderStyle: 'dashed',
|
|
borderColor: ThemeStatic.accent,
|
|
marginVertical: 20,
|
|
borderRadius: 10
|
|
},
|
|
discardImageButton: {
|
|
position: 'absolute',
|
|
top: 10,
|
|
right: 10,
|
|
paddingBottom: 10,
|
|
zIndex: 100
|
|
},
|
|
pickedImage: {
|
|
...PostDimensions.Large,
|
|
borderRadius: 10
|
|
},
|
|
placeholderText: {
|
|
color: ThemeStatic.accent
|
|
}
|
|
});
|
|
|
|
export default UploadBanner; |