Skip to content

Commit a073a85

Browse files
authored
feat: new update box + reusable box component (#1403)
1 parent 0317315 commit a073a85

File tree

12 files changed

+321
-179
lines changed

12 files changed

+321
-179
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/fig_settings/src/keys.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub const UPDATE_AVAILABLE_KEY: &str = "update.new-version-available";

crates/fig_settings/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
pub mod error;
22
pub mod history;
33
pub mod keybindings;
4+
pub mod keys;
45
pub mod settings;
56
pub mod sqlite;
67
pub mod state;

crates/figterm/src/update.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use fig_os_shim::{
33
Context,
44
Os,
55
};
6+
use fig_settings::keys::UPDATE_AVAILABLE_KEY;
67
use fig_settings::settings::get_bool_or;
78
use fig_telemetry::{
89
InstallMethod,
@@ -16,8 +17,6 @@ use fig_util::manifest::{
1617
use semver::Version;
1718
use tracing::warn;
1819

19-
const UPDATE_AVAILABLE_KEY: &str = "update.new-version-available";
20-
2120
fn current_version() -> Version {
2221
Version::parse(env!("CARGO_PKG_VERSION")).unwrap()
2322
}

crates/q_chat/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ clap.workspace = true
1515
color-print.workspace = true
1616
convert_case.workspace = true
1717
crossterm.workspace = true
18+
semver.workspace = true
1819
eyre.workspace = true
1920
fig_api_client.workspace = true
2021
fig_auth.workspace = true
2122
fig_diagnostic.workspace = true
2223
fig_os_shim.workspace = true
24+
fig_install.workspace = true
2325
fig_settings.workspace = true
2426
fig_telemetry.workspace = true
2527
fig_util.workspace = true

crates/q_chat/src/conversation_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ use super::message::{
4242
UserMessageContent,
4343
build_env_state,
4444
};
45-
use super::shared_writer::SharedWriter;
4645
use super::token_counter::{
4746
CharCount,
4847
CharCounter,
@@ -58,6 +57,7 @@ use super::tools::{
5857
const CONTEXT_ENTRY_START_HEADER: &str = "--- CONTEXT ENTRY BEGIN ---\n";
5958
const CONTEXT_ENTRY_END_HEADER: &str = "--- CONTEXT ENTRY END ---\n\n";
6059

60+
use crate::util::shared_writer::SharedWriter;
6161
/// Tracks state related to an ongoing conversation.
6262
#[derive(Debug, Clone)]
6363
pub struct ConversationState {

0 commit comments

Comments
 (0)