You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: refactor chat history storage and enhance conversation handling
- Added a new dependency `github.com/charmbracelet/x/exp/ordered v0.1.0` to `go.mod`.
- Removed unused imports (`context` and `convo`) from `cli.go`.
- Simplified the `postRunHook` function by removing unnecessary conversation storage logic.
- Renamed methods in `chat_history_store.go` from `Persistent` and `Invalidate` to `PersistentMessages` and `InvalidateMessages` respectively.
- Added directory creation logic before saving messages in `chat_history_store.go`.
- Updated test cases in `chat_history_store_test.go` to use the renamed methods.
- Added a new test case for reading messages in `chat_history_store_test.go`.
- Updated the `ChatMessageHistory` interface in `conversation.go` to reflect method name changes.
- Exported the `Sha1reg` variable and added a `MatchSha1` function in `sha.go`.
- Updated the SQLite store path to include a `conversations` subdirectory in `convo_store.go`.
- Added a `GetConvoStore` method to the `Engine` struct in `engine.go`.
- Modified `CreateStreamCompletion` to accept a `context.Context` parameter and added chat context setup logic.
- Added new flags (`show`, `show-last`, `continue`, `continue-last`, `title`) in `basic_flags.go`.
- Added new configuration fields (`ContinueLast`, `Continue`, `Title`, `Show`, `ShowLast`, `CacheReadFromID`, `CacheWriteToID`, `CacheWriteToTitle`) in `config.go`.
- Added logic to handle conversation saving and retrieval in `chat.go`.
- Added a `saveConversation` function to persist conversations in `chat.go`.
- Added utility functions (`lastPrompt`, `firstLine`) to extract the first line of the last human message in `chat.go`.
Signed-off-by: codiing-hui <wecoding@yeah.net>
0 commit comments