This is the persistent context file for Claude Code. Keep it concise and useful.
https://github.com/ayn2op/discordo.githttps://gogs.altsol.dev/claude/discordo-plus.git (branch: master)discordo-plus (installed to /usr/local/bin/)github.com/ayn2op/discordo)github.com/ayn2op/tview (custom tview fork) + tcell/v3arikawa/v3 + ningen/v3 (state management + Discord markdown)goldmark parser + chroma/v2 syntax highlightingBurntSushi/toml, file at ~/.config/discordo/config.toml~/.cache/discordo/ (attachments, logs, state)main.go → cmd/root.go (app init) → internal/ui/ (TUI layers)internal/ui/chat/ — core chat UI: messages_list.go (1500+ lines, message rendering/keybinds), message_input.go, guilds_tree.go, attachments_picker.gointernal/markdown/renderer.go — AST→styled lines, handles Discord markdown flavorsinternal/config/ — config.go (struct + loader), config.toml (defaults, embedded), keybinds.go, theme.gointernal/consts/ — app name, cache dirinternal/ui/chat/guildstate.go — persists guild expand/collapse state to ~/.cache/discordo/state.jsontview.LineBuilder → []tview.Line (segments with tcell.Style)style.Url(rawURL) metadata for OSC 8 terminal hyperlinksapp.Suspend() pattern — suspends TUI, runs command, resumesconfig/keybinds.go structs, matched in HandleEvent() via keybind.Matches()ShortHelp() (bottom bar, contextual) and FullHelp() (full overlay via ?)~/.cache/discordo/attachments/, opened via configured viewer or open.Start()▎ bar prefix, wrapped to viewport width, markdown in descriptions//go:embed config.tomlimage_viewer config (default: mpv) — opens image attachments in configured viewer with TUI suspend/resume instead of browserviewerArgs() auto-detects terminal geometry via xdotool on X11, passes --geometry, --force-window, --loop-file=inf to mpvsave_image keybind (S) — saves image attachment to image_save_dirbuilder.Write(filename+"\n"+url) into proper NewLine() + .Url() stylesupportedImageTypes map)o (open) now shows in bottom tooltip bar when message has attachments/URLsctrl+. to ? — ctrl+. not reliably handled by terminalsE keybind (only active in help overlay) opens config in $EDITOR/vim via app.Suspend()vim when editor = "default" and $EDITOR is unset~/.cache/discordo/state.json, restored on launch via guildstate.gofilepath.Base), HTTPS-only downloads, bounded downloads (100MB), exec.LookPath viewer validation, atomic guild state writes, restrictive file permissions (0700/0600), env token warningcache.Get() uses comma-ok assertion instead of bare type assertimage_viewer — external image viewer command (default: "mpv", "default" = system opener)image_viewer_args — explicit viewer args list, overrides auto-detection (default: [], Wayland-friendly)image_save_dir — directory for saved images (supports ~/, default: current dir)keybinds.messages_list.save_image — save image keybind (default: S)keybinds.edit_config — open config in editor from help overlay (default: E)keybinds.toggle_help — changed default from ctrl+. to ?go build -o discordo-plus .sudo mv discordo-plus /usr/local/bin/discordo-plusgo test ./... (only config + keyring packages have tests)mpv (or configured image viewer), xdotool (optional, X11 geometry detection)claude <claude@altsol.dev>type(scope): description (e.g., feat(ui/chat): add image viewer)masterimage_viewer_args config field — explicit viewer args, bypasses xdotool auto-detection (Wayland-friendly)url_extractor.go, embed_renderer.go, attachment_handler.go from messages_list.gosh -c with direct exec.Command + strings.Fields (merged editor files, no build tags)./research/: SECFILE.md, COMPLIANCE.md, TECHFILE.mdxdotool geometry detection only works on X11; on Wayland use image_viewer_args or compositor window rules for mpv positioningviewerArgs() only adds special flags for mpv; other viewers get plain viewer path invocation (use image_viewer_args to customize)