-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Clipboard Interactions and User Input Suggestions #5
base: main
Are you sure you want to change the base?
Commits on Feb 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a440ab8 - Browse repository at this point
Copy the full SHA a440ab8View commit details -
refactor: Add ChatHistory class and use it to manage chat history data
- Create a new ChatHistory class that encapsulates the chat history data and provides methods for loading and saving the data - Use an instance of the ChatHistory class to manage the chat history data in the ConChat class. - Add a new chat_history argument to the argparse options, which allows you to specify the file path to the chat history data. If this argument is specified, the ChatHistory instance will be initialized with the data from the file. - Remove the session attribute and replace it with the chat_history attribute in the ConChat class. This commit refactors the code to make it more modular and easier to use. The new ChatHistory class encapsulates the chat history data and provides methods for loading and saving the data, which makes the code more organized and maintainable.
Configuration menu - View commit details
-
Copy full SHA for 00c3810 - Browse repository at this point
Copy the full SHA 00c3810View commit details -
refactor: Improve chathistory class and error handling
- Update constructor to accept Path and str instances for file_path and system_message. - Add error checking for the file_path parameter in the chathistory class constructor, setting a default file history path based on the chat session file path if no path is given by the user. - Rename method read() to load() for better clarity. - Add error handling for specific exceptions (FileNotFoundError, json.JSONDecodeError, and TypeError) in both load() and save() methods. - Replace a hard-coded path with a dynamic default path if no path is given by the user in the PromptSession constructor within the chathistory class. These changes improve your code's readability, maintainability, and robustness
Configuration menu - View commit details
-
Copy full SHA for f5c44d2 - Browse repository at this point
Copy the full SHA f5c44d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3d21c5 - Browse repository at this point
Copy the full SHA e3d21c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d6a184 - Browse repository at this point
Copy the full SHA 1d6a184View commit details -
refactor: Add formatted chat history on load
- Update `chathistory` class to store messages as a list of dictionaries instead of a simple list. - Each dictionary represents a message with its associated role and content. - Add new method `replace(index: int, content: str)` in `chathistory` for updating the content of a message at a given index. - Add new method `_render_messages_once_on_start()` method in `conchat` to load and render chat history messages upon
Configuration menu - View commit details
-
Copy full SHA for 8990949 - Browse repository at this point
Copy the full SHA 8990949View commit details -
refactor: Simplify Chat History Management
- Replaced direct file path handling with session name-based management for chat history - Renamed `chathistory` class to `ChatHistory` for consistency with Python naming conventions - Updated argument parsing to use session names instead of file paths, including changing flags and defaults - Enhanced error handling in `ChatHistory.load()` to automatically create a new file if missing - Adjusted `conchat` class constructor to accept `ChatHistory` instance, reflecting class name change - Streamlined command-line interface and improved user feedback with clearer messages and defaults These changes make the chat history management more intuitive and robust, reducing user effort and potential errors.
Configuration menu - View commit details
-
Copy full SHA for b2a4608 - Browse repository at this point
Copy the full SHA b2a4608View commit details -
Configuration menu - View commit details
-
Copy full SHA for 735957f - Browse repository at this point
Copy the full SHA 735957fView commit details
Commits on Feb 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 17331a9 - Browse repository at this point
Copy the full SHA 17331a9View commit details -
feat: Add Clipboard Interactions and User Input Suggestions
- Implemented custom key bindings for copying the last message or code snippets to the clipboard. - Integrated PyperclipClipboard for system-wide clipboard access. - Utilized regular expressions to extract and copy only code snippets from messages. - Added AutoSuggestFromHistory to provide input suggestions based on past entries. - Updated the prompt method to include new key bindings in the instructions for improved user guidance. - Maintained separation of concerns by isolating key bindings functionality, with notes on future extensibility. This update introduces intuitive clipboard interactions and auto-suggestions, significantly improving the user experience by streamlining message copying and offering suggestions based on chat history.
Configuration menu - View commit details
-
Copy full SHA for 90c174c - Browse repository at this point
Copy the full SHA 90c174cView commit details -
fix: Prevent shawdowing prompt references and strip whitespace from m…
…essage content injected into clipboard
Configuration menu - View commit details
-
Copy full SHA for 2900cab - Browse repository at this point
Copy the full SHA 2900cabView commit details
Commits on Feb 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 15bb341 - Browse repository at this point
Copy the full SHA 15bb341View commit details
Commits on Feb 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a3abfd9 - Browse repository at this point
Copy the full SHA a3abfd9View commit details -
rename: Move package directory from 'source' to 'rich_chat'
- Rename package directory from 'source' to 'rich_chat' for proper naming conventions - Improve organization and separation of concerns in the codebase - Create a separate 'chat_history.py' module for the `ChatHistory` class - Move helper function 'keybinding' from 'rich-chat.py' to 'chat_history.py' - Move `ChatHistory` class from 'rich-chat.py' to 'chat_history.py' and remove unused imports in 'rich-chat.py' - Add import statement for 'ChatHistory' in 'rich-chat.py' - Rename package directory for proper naming conventions - Improve organization and separation of concerns - Consolidate related functionality into separate modules
Configuration menu - View commit details
-
Copy full SHA for dd5f7a9 - Browse repository at this point
Copy the full SHA dd5f7a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 07f5fcf - Browse repository at this point
Copy the full SHA 07f5fcfView commit details -
Rename module for better organization and consistency
- Rename 'rich_chat.py' to 'rich_chat_cli.py' following Python library naming conventions - Add shebang line to rich_chat_cli.py for easier execution as a script This commit refactors the codebase by renaming the main 'rich_chat.py' file to 'rich_chat_cli.py' following Python library naming conventions.
Configuration menu - View commit details
-
Copy full SHA for 603ad9c - Browse repository at this point
Copy the full SHA 603ad9cView commit details
Commits on Feb 27, 2024
-
refactor: Integrate key_bindings function into
ChatHistory
class as…… a `@property` - Replace `key_bindings()` function with a new `@property` named `key_bindings`. - Update the `key_bindings` property to include new arguments for the index of the message to be copied. - Update the custom `prompt` message to reflect these changes and include minor formatting improvements.
Configuration menu - View commit details
-
Copy full SHA for e590c09 - Browse repository at this point
Copy the full SHA e590c09View commit details