4 Commits

Author SHA1 Message Date
a9a8b14c73 Updated README and added some ASCII art :) 2025-11-01 23:48:34 -05:00
a5c684aa72 feat: implement terminal messenger with conversation management
feat: implement terminal messenger with conversation management

- Add terminal-based messenger client connecting to Verint API endpoint
- Implement colorized output (blue for user input, green for assistant
responses)
- Add readline integration for arrow key navigation through input
history
- Implement conversation persistence with unique history files per
conversation ID
- Add conversation resume feature listing 5 most recent conversations
- Store and auto-load model names per conversation
- Display last 10 message exchanges when resuming conversations
- Log full conversation history (user + assistant messages) with
timestamps
- Simplify codebase by consolidating file operations into reusable
functions
- Fix Sscanf error handling for conversation selection

Features:
- Request/response handling with conversation context via
previous_response_id
- Three file types per conversation: .tmp (readline history), _log.txt
(full conversation), _meta.txt (model name)
- Automatic conversation ID assignment after first message
- Clean exit handling and proper resource cleanup
2025-11-01 23:33:57 -05:00
c198babc75 simplified code
Reductions:

~170 lines → ~110 lines (35% fewer lines)
Removed unnecessary functions and constructors
Combined structs and simplified JSON parsing
Streamlined error handling
Merged sendRequest and SendMessage into single Send method

Key simplifications:

Used inline struct definitions for Response parsing
Replaced Metadata struct with simple map[string]string
Removed NewMessenger constructor - use struct literal directly
Inlined the header printing
Simplified constant names (colorBlue → blue)
Reduced verbose error messages

The app works exactly the same but with much cleaner, more maintainable
code! All features are preserved:

 Colorized input/output
 Arrow key history navigation
â Conversation context tracking
 Same API communication
2025-11-01 22:56:53 -05:00
fc9b17bcec Adding terminal messenger
This is a golang based application that connects to the basic messenger
2025-11-01 22:46:34 -05:00