Skip to content

Commit

Permalink
emergency fix: correct session-saving logic and bump to version 0.2.11
Browse files Browse the repository at this point in the history
- Bumped version number to 0.2.11 in Cargo.toml, Cargo.lock, docs/cgip.1, and build_deb.sh to reflect the emergency update.
- Fixed a critical bug in src/chat.rs where the session-saving logic had an incorrect `if` condition. The `args.no_session` flag was not properly checked, causing sessions to be saved incorrectly.
  - The condition was updated from `if args.no_session` to `if !args.no_session` to ensure sessions are only saved when the `no_session` flag is not set.
  • Loading branch information
divanvisagie committed Jun 20, 2024
1 parent 3bb2900 commit bb9ae33
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cgip"
version = "0.2.10"
version = "0.2.11"
edition = "2021"
repository = "https://github.com/divanvisagie/chat-gipity"
authors = ["Divan Visagie <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion docs/cgip.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH CGIP 1 "2024-06-20" "version 0.2.10" "CGIP MAN PAGE"
.TH CGIP 1 "2024-06-20" "version 0.2.11" "CGIP MAN PAGE"
.SH NAME
cgip \- interact with ChatGPT based on contextual input from files or standard input.
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e

# Variables
PACKAGE_NAME=cgip
VERSION=0.2.10
VERSION=0.2.11
ARCHITECTURE=amd64
DEBIAN_FOLDER=debian_package
BUILD_FOLDER=$DEBIAN_FOLDER/$PACKAGE_NAME-$ARCHITECTURE-$VERSION
Expand Down
2 changes: 1 addition & 1 deletion src/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn run(args: &Args, client: &mut GptClient) {
};
let messages_to_save = vec![message];

if args.no_session {
if !args.no_session {
save_to_tty_context(&client.config_manager, messages_to_save);
}
}

0 comments on commit bb9ae33

Please sign in to comment.