Commit 548cce3
feat(tui): Add AI Chat interface as default tab and Meshtastic BBS integration
## AI Chat Interface (Tenere-inspired)
**Primary Feature: Chat Tab (Tab 0)**
- New default view when launching research dashboard
- Full conversation history with user/assistant message styling
- Vim-inspired input system (i to activate, Enter to send, Esc to cancel)
- Smart scrolling with j/k navigation and auto-scroll to new messages
- Visual status indicators (⏳ Sending, ✓ Delivered, ⋯ Streaming, ✗ Error)
- Welcome message with example blockchain investigation queries
**Data Structures:**
- `ChatMessage` struct with role, content, timestamp, and MessageStatus
- `MessageStatus` enum for state management
- Thread-safe `Arc<Mutex<Vec<ChatMessage>>>` for message storage
**UI Components:**
- `render_chat()` - Main chat layout with header, messages, input, and status bar
- `render_chat_messages()` - Scrollable message display with proper styling
- `render_chat_input()` - Input box with active/inactive states and cursor
**Keybindings:**
- `0` - Switch to Chat tab (new)
- `i` - Activate chat input mode
- `Enter` - Send message (when in input mode)
- `Esc` - Cancel input
- `j/k` - Scroll chat history (when not typing)
- `Backspace` - Delete characters
**Tab Navigation Updates:**
- Chat is Tab 0 (default), Dashboard is Tab 1, Graph is Tab 2, Logs is Tab 3, Search is Tab 4, BBS is Tab 5
- Updated `next_tab()` and `previous_tab()` to include Chat in cycle
- Updated header tab indicators with Chat tab icon
- Updated help documentation with new tab numbers and Chat keybindings
## Meshtastic BBS Integration (Tab 5)
**New BBS Tab for Agent-Human Communication:**
- Meshtastic-based bulletin board system for off-grid communication
- `BBSTuiState` for managing BBS UI state
- Integration with existing BBS infrastructure (boards, posts, moderators)
**New Files:**
- `src/clparse/bbs.rs` - BBS command-line parsing
- `src/commands/bbs_handler.rs` - BBS command handling
- `src/utils/bbs/db/moderators.rs` - Moderator database operations
- `src/utils/bbs/meshtastic.rs` - Meshtastic protocol integration
**Modified Files:**
- `src/utils/tui/app.rs` - Main TUI updates for both Chat and BBS
- `src/utils/bbs/*` - BBS module enhancements
- `src/clparse.rs` - Command parsing for BBS
- `src/commands/mod.rs` - BBS command routing
- `src/main.rs` - BBS initialization
- `crates/ovsm/src/compiler/ir.rs` - Compiler improvements
**Architecture:**
- Modular BBS system with separate database, models, schema, and TUI widgets
- Ready for research agent integration via `send_chat_message()` method
- Clean separation between Chat (AI research) and BBS (human messaging)
**Build Status:** ✅ Compiled successfully with no errors or warnings
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent c851c25 commit 548cce3
File tree
16 files changed
+2214
-26
lines changed- crates/ovsm/src/compiler
- src
- clparse
- commands
- utils
- bbs
- db
- tui
16 files changed
+2214
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
189 | | - | |
| 191 | + | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
| |||
562 | 565 | | |
563 | 566 | | |
564 | 567 | | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
565 | 673 | | |
566 | 674 | | |
567 | 675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
| 267 | + | |
266 | 268 | | |
267 | 269 | | |
268 | 270 | | |
| |||
0 commit comments