Commit Graph

16 Commits

Author SHA1 Message Date
anders 6f1c8d1f5b Add arrow left/right, /w alias, auto /msg on Tab in window 1
- Arrow left/right to move cursor in input (UTF-8 aware)
- /w as alias for /msg
- Tab on window 1 with empty input auto-inserts /msg <nick>
- Tab after /msg completes from PM nick list
- Improved Swedish word filter (ASCII-only + UTF-8 variants)
2026-04-30 21:46:23 +02:00
anders 7ea04be9ee Add client-side language pre-filter to reduce false translations
- Common Swedish/English words checked before API call
- Word boundary matching (non-alpha boundaries)
- Lower threshold for short messages (1 hit vs 2)
- Only filters languages listed in ai_skip_langs
2026-04-30 21:20:05 +02:00
anders 9f5b85ea6f Request channel modes on join for status bar display 2026-04-30 19:43:04 +02:00
anders 4db1dfdece Improve translation prompt and add /trans off toggle
- Focus on grammar/sentence structure for language detection
- Ignore code, URLs, tech jargon in language classification
- /trans cycles: local → public → off
- Strip trailing whitespace from LLM responses
- Suppress empty translation results
2026-04-30 19:18:19 +02:00
anders f32d248d71 Improve AI translation: skip Swedish/English, /trans toggle, better prompt
- All messages sent to LLM (not just non-Latin)
- LLM detects language and returns SKIP for understood languages
- /trans toggles echoing translations publicly to channel
- PM nicks ordered most-recent-first for tab completion
- tool_choice:none to fix vLLM/litellm 400 error
- Updated README with /trans command
2026-04-30 13:37:27 +02:00
anders 2e7006a8d5 Fix translation detection for Cyrillic and ISO-8859-1
- Skip ISO-8859-1 Latin chars (0xC0-0xFF) to avoid Swedish false positives
- Require 3+ non-Latin chars to trigger translation
- Handle both UTF-8 and single-byte Cyrillic encodings
- Update README with ai_port option
2026-04-30 12:15:17 +02:00
anders 4a5ca98c13 Add AI translation, input history, line wrapping, /ctcp
- Auto-translate non-Latin messages via OpenAI-compatible API
- Config in ~/.hircrc (created on first run, disabled by default)
- Translation shown in italic below original message
- Arrow up/down for input history (50 entries)
- Long lines wrap properly on window redraw
- /ctcp command for sending CTCP requests
- Updated README with AI translation docs
2026-04-30 11:40:43 +02:00
anders a9e7f144bc Format WHOIS replies properly (311/312/317/319/320/318) 2026-04-30 08:54:45 +02:00
anders 58a058a783 Fix tab cycling, add /ctcp, PM tab completion, query in status bar
- Fix tab completion cycling (track tab_end properly)
- Tab on window 1 cycles through nicks who PM'd you
- /ctcp <nick> <command> sends CTCP requests
- Query target shown in status bar on window 1
- Channel errors (404 etc) routed to channel window
- Long lines wrap properly on window redraw
2026-04-30 08:26:05 +02:00
anders fe75236fad Add /me, /slap, /q, /topic, tab completion, bold events
- /me <action> sends CTCP ACTION
- /slap <nick> slaps with a large trout
- /q <nick> sets query target, /q clears it
- /topic to view/set channel topic
- Tab completion for nicks (cycling, : suffix at line start)
- Nick list tracking via NAMES/JOIN/PART/QUIT/NICK
- Bold formatting for joins, parts, quits, mode changes
- Incoming CTCP ACTION displayed as * nick action
- Updated README with all commands and features
2026-04-30 08:05:35 +02:00
anders 3e137863fe Add activity indicator, fix window redraw on switch
- Status bar shows (Act: 2,3) for windows with unread messages
- Activity clears when switching to that window
- Re-set scroll region on every window redraw to prevent display issues
2026-04-29 23:17:06 +02:00
anders 82d592d574 Fix input line wrapping pushing chat up
- Horizontal scroll for input when exceeding terminal width
- Never wraps to next line or disturbs scroll region
2026-04-29 12:48:58 +02:00
anders 354f0eb8e9 Display incoming UTF-8 natively, convert only outgoing to ISO-8859-1
- Stop converting incoming text to ISO-8859-1 for display
- Terminal is UTF-8, so pass through directly (åäö, Cyrillic, etc.)
- Keep ISO-8859-1 conversion only for outgoing messages
- Add irc.log to .gitignore
2026-04-29 12:34:55 +02:00
anders 12a9127af8 Add /names, Ctrl-P/N scrollback, charset logger, terminal fixes
- /names #channel to list users
- Ctrl-P/Ctrl-N for page up/down in scrollback
- Charset logger (irc.log) with hex dump and detection
- chartest.c utility for inspecting key codes
- Fix window redraw to align lines at bottom
- Fix terminal cleanup via atexit (no more broken terminal)
- Green prompt
2026-04-29 12:26:29 +02:00
anders 71f6699aa9 Add window levels, status bar, UTF-8 input, charset conversion
- Isolated window levels with 500-line scrollback per window
  - Window 1: status + private messages
  - Windows 2-9: channels
- Status bar showing window, channel, nick prefix, channel modes
- Automatic charset conversion (UTF-8/UTF-16 -> ISO-8859-1 on wire)
- UTF-8 aware input editing with Ctrl-A/E/U/K/Y
- CTCP VERSION reply with real OS info from uname()
- Real name from passwd GECOS field
- SIGWINCH handling for terminal resize
- Ctrl-C quit confirmation (y + Enter)
- /whois, /wii, /mode, /quit with default reason
- Green prompt, timestamps on all messages
2026-04-29 12:03:57 +02:00
anders e2a5ddf9a0 first commit 2026-04-29 11:44:36 +02:00