This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
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>
2026-06-23 14:14:09 +03:00

68 lines
2.2 KiB
TypeScript

'use client'
import { forwardRef } from 'react'
import { motion } from 'framer-motion'
import { cn } from '@/lib/utils'
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
variant?: 'primary' | 'secondary' | 'ghost' | 'github'
size?: 'sm' | 'md' | 'lg'
loading?: boolean
icon?: React.ReactNode
}
const Button = forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant = 'primary', size = 'md', loading, icon, children, disabled, ...props }, ref) => {
const variants = {
primary: 'bg-gradient-to-r from-accent to-accent-hover text-white hover:shadow-lg hover:shadow-accent/20',
secondary: 'bg-surface border border-border text-foreground hover:bg-surface-secondary',
ghost: 'bg-transparent text-foreground hover:bg-surface/50',
github: 'bg-foreground text-background hover:bg-foreground/90 shadow-lg'
}
const sizes = {
sm: 'h-9 px-4 text-sm',
md: 'h-12 px-6 text-base',
lg: 'h-14 px-8 text-lg'
}
return (
<motion.button
whileHover={{ scale: disabled || loading ? 1 : 1.01 }}
whileTap={{ scale: disabled || loading ? 1 : 0.99 }}
ref={ref}
disabled={disabled || loading}
className={cn(
'inline-flex items-center justify-center gap-2 rounded-xl font-semibold',
'transition-all duration-200',
'disabled:opacity-50 disabled:cursor-not-allowed',
'focus:outline-none focus:ring-2 focus:ring-primary/20',
variants[variant],
sizes[size],
className
)}
{...(props as any)}
>
{loading ? (
<>
<svg className="animate-spin h-5 w-5" fill="none" viewBox="0 0 24 24">
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" />
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" />
</svg>
<span>Loading...</span>
</>
) : (
<>
{icon}
{children}
</>
)}
</motion.button>
)
}
)
Button.displayName = 'Button'
export { Button }