A messenger-style interface for stream-of-thought note-taking, conversation management, and AI interaction. The system grows in intelligence naturally through use.
PersonalLog/
├── src/
│ ├── app/
│ │ ├── page.tsx # Landing page (redirects to /messenger)
│ │ ├── layout.tsx # Root layout
│ │ ├── globals.css # Global styles
│ │ ├── (messenger)/ # Messenger route group
│ │ │ ├── layout.tsx # Messenger layout
│ │ │ ├── page.tsx # Main messenger page
│ │ │ └── conversation/[id]/page.tsx # Individual conversation
│ │ └── (longform)/ # Long-form route group
│ │ ├── layout.tsx # Long-form layout
│ │ └── conversation/[id]/page.tsx # Long-form conversation view
│ │
│ ├── components/
│ │ ├── messenger/
│ │ │ ├── ConversationList.tsx # Sidebar conversation list
│ │ │ ├── ChatArea.tsx # Main chat interface
│ │ │ ├── MessageBubble.tsx # Individual message display
│ │ │ ├── MessageSelectionBar.tsx # Selection toolbar
│ │ │ └── NewChatDialog.tsx # New chat from selection
│ │ ├── ai-contacts/
│ │ │ ├── AIContactsPanel.tsx # AI contacts sidebar
│ │ │ └── AdvancedOptions.tsx # AI settings modal
│ │ ├── media/
│ │ │ ├── AudioRecorder.tsx # Audio recording with STT
│ │ │ └── FileUploader.tsx # File/image upload
│ │ └── compaction/
│ │ └── CompactionDialog.tsx # Conversation compaction UI
│ │
│ ├── lib/
│ │ ├── storage/
│ │ │ ├── conversation-store.ts # IndexedDB conversation storage
│ │ │ └── ai-contact-store.ts # AI contact/persona storage
│ │ ├── ai/
│ │ │ ├── provider.ts # Model-agnostic AI providers
│ │ │ └── multibot.ts # Multi-bot chat handler
│ │ └── utils.ts # Utility functions
│ │
│ └── types/
│ └── conversation.ts # All TypeScript types
│
└── PERSONALLOG_MESSENGER_SPEC.md # Full specification
- WhatsApp/Telegram-like UI
- Stream-of-thought messaging to self
- Conversation list with search and pinning
- Collapsible sidebar
- Message selection (multi-select)
- Read receipts (checkmarks)
- Tap to select messages
- Selection toolbar appears with actions:
- Send to AI in this chat
- Start new chat with selected messages
- Copy selection
- Non-selected messages provide context
- Default AI personas: Alex, Researcher, Creative
- Create custom AI contacts
- Per-conversation AI settings
- Save and reuse AI personalities
- Adjust AI personality through natural language
- "Be more enthusiastic" → updates personality attributes
- Visual feedback showing what changed
- Personality sliders (creativity, friendliness, etc.)
- System prompt editing
- Default in messenger view
- Configurable response length (100/300/500 tokens)
- Temperature control (precise → creative)
- AI instructed to be concise
- Separate tab for detailed responses
- Document-style message display
- Markdown formatting support
- Token usage display
- Toggle between messenger and long-form
- Images: Upload and display in messages
- Files: PDF, docs, text files
- Audio Recording: Web Speech API for STT
- Real-time transcript preview
- Option to keep or discard audio
- Recording indicator
- Drag-and-drop file upload
- Triggered at token limit (default 80%)
- Three strategies: Summarize, Extract Key, Custom
- Select messages to preserve
- Option to start new conversation with summary
- Original conversation archived
- Local Provider: Ollama, WebLLM
- OpenAI Provider: GPT-4o-mini, etc.
- Anthropic Provider: Claude 3 Haiku
- Escalation: Local → Cloud with patience setting
- Streaming support for all providers
- Parallel Mode: All bots respond simultaneously
- Series Mode: Each bot sees previous responses
- Combine multiple perspectives
- Configurable collaborator list
{
id: string
title: string
type: 'personal' | 'ai-assisted' | 'transcript'
messages: Message[]
aiContacts: AIAgent[]
settings: {
responseMode: 'messenger' | 'long-form'
compactOnLimit: boolean
compactStrategy: 'summarize' | 'extract-key' | 'user-directed'
}
metadata: {
messageCount: number
totalTokens: number
hasMedia: boolean
pinned: boolean
archived: boolean
}
}{
id: string
conversationId: string
type: 'text' | 'image' | 'file' | 'audio' | 'transcript' | 'system'
author: 'user' | { type: 'ai-contact', contactId: string, contactName: string }
content: {
text?: string
media?: MediaAttachment
audioTranscript?: AudioTranscript
compaction?: CompactionInfo
}
timestamp: string
selected?: boolean
replyTo?: string
metadata: {
tokens?: number
model?: string
editHistory?: MessageEdit[]
}
}{
id: string
name: string
color: string // Tailwind color class
config: {
provider: 'local' | 'openai' | 'anthropic'
model: string
temperature: number
maxTokens: number
responseStyle: 'brief' | 'balanced' | 'detailed'
escalateToCloud?: boolean
escalationPatience?: number
arrangement?: 'parallel' | 'series'
collaboratorIds?: string[]
}
personality: {
systemPrompt: string
vibeAttributes: VibeAttribute[]
contextConversationIds: string[]
}
}- User taps messages (multi-select)
- Toolbar appears: [AI Reply] [New Chat] [Copy]
- Choose action and optionally select AI contact
- AI receives selected messages as prompt context
- Full conversation visible as additional context
- User: "Be more enthusiastic"
- System detects personality request
- Shows "Vibe Update" panel with changes:
- enthusiasm: 0.3 → 0.7
- useEmojis: false → true
- User confirms or adjusts
- AI contact updated with new vibe
- At 80% token limit, system shows warning
- User clicks "Review & Compact"
- Select compaction strategy
- Choose messages to preserve
- System generates summary
- Original messages archived, summary added
- User sends message
- Local model attempts response (30s timeout)
- If timeout/error, escalate to cloud
- Response marked as "escalated"
- User can adjust patience setting
- Frontend: Next.js 15, React 19, TypeScript 5
- Styling: Tailwind CSS 4
- Storage: IndexedDB (local-first)
- AI: Model-agnostic (Ollama, OpenAI, Anthropic)
- STT: Web Speech API
- Icons: Lucide React
cd /mnt/c/users/casey/PersonalLog
pnpm install
pnpm devApp runs on port 3002:
- Main page: http://localhost:3002
- Messenger: http://localhost:3002/messenger
- Long-form: http://localhost:3002/longform/[conversation-id]
- Alex (Purple) - Friendly general assistant
- Researcher (Blue) - Thorough, well-reasoned responses
- Creative (Pink) - Innovative, outside-the-box ideas
- All data stored locally in IndexedDB
- No external calls unless cloud AI configured
- User controls escalation settings
- Audio deleted after STT unless "keep audio" enabled
- Full transcript support for long recordings
- Image analysis (vision capabilities)
- Voice mode for AI responses (TTS)
- Conversation folders/tags
- Export conversations (markdown, PDF)
- Cloud sync (optional)
- Mobile app (React Native)
- End-to-end encryption for cloud sync