Skip to content

Commit f15d287

Browse files
authored
feat: Skip changelog display on first chat usage (#3378)
* add a value in statue db * Revert "add a value in statue db" This reverts commit 5c3ef7b. * delete extra data value * only need to set show count
1 parent 6a004da commit f15d287

File tree

1 file changed

+6
-1
lines changed
  • crates/chat-cli/src/cli/chat

1 file changed

+6
-1
lines changed

crates/chat-cli/src/cli/chat/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,12 @@ impl ChatSession {
11931193
// Check if version changed or if we haven't shown it max times yet
11941194
let should_show = match &last_version {
11951195
Some(last) if last == current_version => show_count < CHANGELOG_MAX_SHOW_COUNT,
1196-
_ => true, // New version or no previous version
1196+
Some(_) => true, // New version only
1197+
None => {
1198+
// Don't show on first time but record the version
1199+
os.database.set_changelog_last_version(current_version)?;
1200+
false
1201+
},
11971202
};
11981203

11991204
if should_show {

0 commit comments

Comments
 (0)