fix: resolve v0.8.34 integration compile issues
This commit is contained in:
@@ -1101,6 +1101,7 @@ mod tests {
|
||||
goal_objective: None,
|
||||
project_context_pack_enabled: false,
|
||||
locale_tag: "en",
|
||||
translation_enabled: false,
|
||||
},
|
||||
) {
|
||||
SystemPrompt::Text(text) => text,
|
||||
@@ -1127,6 +1128,7 @@ mod tests {
|
||||
goal_objective: None,
|
||||
project_context_pack_enabled: false,
|
||||
locale_tag: "en",
|
||||
translation_enabled: false,
|
||||
},
|
||||
) {
|
||||
SystemPrompt::Text(text) => text,
|
||||
|
||||
@@ -559,12 +559,12 @@ mod tests {
|
||||
/// sandbox-exec refuse to load the profile.
|
||||
#[test]
|
||||
fn test_npm_cache_paths_emitted_in_policy_and_params_when_home_set() {
|
||||
let _guard = ENV_LOCK.lock().unwrap_or_else(|p| p.into_inner());
|
||||
let _guard = crate::test_support::lock_test_env();
|
||||
|
||||
let saved_home = std::env::var_os("HOME");
|
||||
let saved_npm = std::env::var_os("NPM_CONFIG_CACHE");
|
||||
// SAFETY: HOME/NPM_CONFIG_CACHE are process-global; ENV_LOCK serializes
|
||||
// all mutations in this module, and we always restore the prior value.
|
||||
// SAFETY: HOME/NPM_CONFIG_CACHE are process-global; lock_test_env
|
||||
// serializes mutations here, and we always restore the prior value.
|
||||
unsafe {
|
||||
std::env::set_var("HOME", "/tmp/seatbelt-npm-test");
|
||||
std::env::remove_var("NPM_CONFIG_CACHE");
|
||||
@@ -618,12 +618,12 @@ mod tests {
|
||||
/// and their param must both be omitted.
|
||||
#[test]
|
||||
fn test_npm_cache_skipped_when_no_env() {
|
||||
let _guard = ENV_LOCK.lock().unwrap_or_else(|p| p.into_inner());
|
||||
let _guard = crate::test_support::lock_test_env();
|
||||
|
||||
let saved_home = std::env::var_os("HOME");
|
||||
let saved_npm = std::env::var_os("NPM_CONFIG_CACHE");
|
||||
// SAFETY: HOME/NPM_CONFIG_CACHE are process-global; ENV_LOCK serializes
|
||||
// mutations here and we restore the prior values before returning.
|
||||
// SAFETY: HOME/NPM_CONFIG_CACHE are process-global; lock_test_env
|
||||
// serializes mutations here and we restore the prior values before returning.
|
||||
unsafe {
|
||||
std::env::remove_var("HOME");
|
||||
std::env::remove_var("NPM_CONFIG_CACHE");
|
||||
|
||||
@@ -17,8 +17,8 @@ use unicode_width::{UnicodeWidthChar, UnicodeWidthStr};
|
||||
|
||||
use crate::palette;
|
||||
use crate::session_manager::{
|
||||
SavedSession, SessionCostSnapshot, SessionManager, SessionMetadata, extract_title,
|
||||
extract_user_prompt, strip_thinking_tags,
|
||||
SavedSession, SessionManager, SessionMetadata, extract_title, extract_user_prompt,
|
||||
strip_thinking_tags,
|
||||
};
|
||||
use crate::tui::views::{ModalKind, ModalView, ViewAction, ViewEvent};
|
||||
|
||||
@@ -801,7 +801,7 @@ mod tests {
|
||||
model: "deepseek-v4-pro".to_string(),
|
||||
workspace: std::path::PathBuf::from("/tmp"),
|
||||
mode: Some("agent".to_string()),
|
||||
cost: SessionCostSnapshot::default(),
|
||||
cost: crate::session_manager::SessionCostSnapshot::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7891,17 +7891,6 @@ fn footer_context_percent_spans(app: &App) -> Vec<Span<'static>> {
|
||||
)]
|
||||
}
|
||||
|
||||
fn footer_git_branch_spans(app: &App) -> Vec<Span<'static>> {
|
||||
let workspace = app.workspace.as_path();
|
||||
let Some(branch) = workspace_git_branch(workspace) else {
|
||||
return Vec::new();
|
||||
};
|
||||
vec![Span::styled(
|
||||
format!("git:{branch}"),
|
||||
Style::default().fg(app.ui_theme.text_muted),
|
||||
)]
|
||||
}
|
||||
|
||||
fn footer_cost_spans(app: &App) -> Vec<Span<'static>> {
|
||||
let displayed_cost = app.displayed_session_cost_for_currency(app.cost_currency);
|
||||
if !should_show_footer_cost(displayed_cost) {
|
||||
|
||||
@@ -2542,6 +2542,7 @@ fn apply_slash_menu_selection_keeps_change_executable_without_version() {
|
||||
name: "/change".to_string(),
|
||||
description: String::new(),
|
||||
is_skill: false,
|
||||
alias_hint: None,
|
||||
}];
|
||||
|
||||
assert!(apply_slash_menu_selection(&mut app, &entries, true));
|
||||
|
||||
Reference in New Issue
Block a user