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>
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
'use client';
|
||
|
||
import { useState } from 'react';
|
||
|
||
export default function ImageCarousel({ images }: { images: string[] }) {
|
||
const [current, setCurrent] = useState(0);
|
||
|
||
if (!images || images.length === 0) return null;
|
||
if (images.length === 1) {
|
||
return <img src={images[0]} alt="" className="w-full" />;
|
||
}
|
||
|
||
const next = () => setCurrent((i) => (i + 1) % images.length);
|
||
const prev = () => setCurrent((i) => (i - 1 + images.length) % images.length);
|
||
|
||
return (
|
||
<div className="relative">
|
||
<img src={images[current]} alt="" className="w-full" />
|
||
|
||
{current > 0 && (
|
||
<button
|
||
onClick={prev}
|
||
className="absolute left-2 top-1/2 -translate-y-1/2 bg-black/50 text-white rounded-full w-8 h-8 flex items-center justify-center hover:bg-black/70"
|
||
>
|
||
‹
|
||
</button>
|
||
)}
|
||
|
||
{current < images.length - 1 && (
|
||
<button
|
||
onClick={next}
|
||
className="absolute right-2 top-1/2 -translate-y-1/2 bg-black/50 text-white rounded-full w-8 h-8 flex items-center justify-center hover:bg-black/70"
|
||
>
|
||
›
|
||
</button>
|
||
)}
|
||
|
||
<div className="absolute bottom-2 left-1/2 -translate-x-1/2 flex gap-1">
|
||
{images.map((_, i) => (
|
||
<div
|
||
key={i}
|
||
className={`w-1.5 h-1.5 rounded-full ${
|
||
i === current ? 'bg-white' : 'bg-white/50'
|
||
}`}
|
||
/>
|
||
))}
|
||
</div>
|
||
</div>
|
||
);
|
||
}
|