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

88 lines
2.6 KiB
TypeScript

'use client'
import { useState } from 'react'
import { useRouter } from 'next/navigation'
import Link from 'next/link'
import { authService } from '@/services/authService'
import { getErrorMessage } from '@/utils/error'
export default function ForgotPasswordPage() {
const router = useRouter()
const [email, setEmail] = useState('')
const [loading, setLoading] = useState(false)
const [error, setError] = useState('')
const [success, setSuccess] = useState(false)
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault()
setError('')
setLoading(true)
try {
await authService.forgotPassword(email)
setSuccess(true)
} catch (err: unknown) {
setError(getErrorMessage(err))
} finally {
setLoading(false)
}
}
if (success) {
return (
<div className="w-full max-w-md mx-auto px-4 py-8 text-center">
<h1 className="text-2xl font-bold text-foreground mb-4">Check your email</h1>
<p className="text-foreground/70 mb-6">
We've sent a password reset link to {email}
</p>
<Link href="/login" className="text-accent hover:underline">
Back to login
</Link>
</div>
)
}
return (
<div className="w-full max-w-md mx-auto px-4 py-8">
<h1 className="text-3xl font-bold text-foreground mb-2">Reset Password</h1>
<p className="text-foreground/70 mb-8">Enter your email to receive a reset link</p>
<form onSubmit={handleSubmit} className="space-y-4">
{error && (
<div className="bg-red-500/10 border border-red-500 text-red-500 px-4 py-3 rounded">
{error}
</div>
)}
<div>
<label htmlFor="email" className="block text-sm font-medium text-foreground mb-2">
Email
</label>
<input
id="email"
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
required
className="w-full px-4 py-2 bg-surface border border-border rounded-lg text-foreground focus:outline-none focus:ring-2 focus:ring-accent"
/>
</div>
<button
type="submit"
disabled={loading}
className="w-full bg-accent text-white py-2 px-4 rounded-lg font-semibold hover:opacity-90 disabled:opacity-50"
>
{loading ? 'Sending...' : 'Send Reset Link'}
</button>
</form>
<div className="mt-6 text-center">
<Link href="/login" className="text-accent hover:underline">
Back to login
</Link>
</div>
</div>
)
}