Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/config/load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ fn rich_default_config() -> Config {
provider: Some(CompactString::new("openrouter")),
model: Some(CompactString::new("deepseek/deepseek-v4-pro")),
max_tokens: Some(16384),
compact_enabled: Some(true),
compact_enabled: Some(false),
max_text_file_size: Some(1_048_576),
edit_system: Some(EditSystem::Similarity),
default_permission_mode: Some("standard".to_string()),
Expand Down
2 changes: 1 addition & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ impl Config {
}

pub fn resolve_compact_enabled(&self) -> bool {
self.compact_enabled.unwrap_or(true)
self.compact_enabled.unwrap_or(false)
}

/// Mid-turn compaction pressure threshold as a fraction of the context
Expand Down
10 changes: 5 additions & 5 deletions src/context/prompts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::path::PathBuf;

use include_dir::{Dir, include_dir};

static EMBEDDED: Dir = include_dir!("$CARGO_MANIFEST_DIR/prompts");
static EMBEDDED: Dir = include_dir!("$CARGO_MANIFEST_DIR/data/prompts");

pub fn global_dir() -> PathBuf {
crate::session::storage::data_dir().join("prompts")
Expand All @@ -22,7 +22,7 @@ pub fn load() -> HashMap<String, String> {
for (name, content) in crate::context::load_dir_files(&global_dir(), "md") {
prompts.insert(name, content);
}
for (name, content) in crate::context::load_dir_files(&PathBuf::from("prompts"), "md") {
for (name, content) in crate::context::load_dir_files(&PathBuf::from("data/prompts"), "md") {
prompts.insert(name, content);
}
for (name, content) in crate::context::load_dir_files(&zerostack_dir(), "md") {
Expand Down Expand Up @@ -104,7 +104,7 @@ mod tests {
#[test]
fn test_zerostack_overrides_prompts_dir() {
let _td = TestDir::new();
let prompts_dir = PathBuf::from("prompts");
let prompts_dir = PathBuf::from("data/prompts");
let zs_dir = zerostack_dir();
write_prompt(&prompts_dir, "code", "from prompts/");
write_prompt(&zs_dir, "code", "from .zerostack/prompts/");
Expand Down Expand Up @@ -139,7 +139,7 @@ mod tests {
fn test_prompts_dir_overrides_global() {
let _td = TestDir::new();
let global = global_dir();
let prompts_dir = PathBuf::from("prompts");
let prompts_dir = PathBuf::from("data/prompts");
write_prompt(&global, "custom", "from global/");
write_prompt(&prompts_dir, "custom", "from prompts/");

Expand All @@ -151,7 +151,7 @@ mod tests {
fn test_full_priority_chain() {
let _td = TestDir::new();
let global = global_dir();
let prompts_dir = PathBuf::from("prompts");
let prompts_dir = PathBuf::from("data/prompts");
let zs_dir = zerostack_dir();

write_prompt(&global, "code", "from global/");
Expand Down
4 changes: 2 additions & 2 deletions src/context/themes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::config::ColorsConfig;
use crate::ui::renderer::Renderer;
use crate::ui::utils::parse_color;

static EMBEDDED: Dir = include_dir!("$CARGO_MANIFEST_DIR/themes");
static EMBEDDED: Dir = include_dir!("$CARGO_MANIFEST_DIR/data/themes");

pub fn global_dir() -> PathBuf {
crate::session::storage::data_dir().join("themes")
Expand All @@ -22,7 +22,7 @@ pub fn load() -> HashMap<String, String> {
for (name, content) in crate::context::load_dir_files(&global_dir(), "json") {
themes.insert(name, content);
}
for (name, content) in crate::context::load_dir_files(&PathBuf::from("themes"), "json") {
for (name, content) in crate::context::load_dir_files(&PathBuf::from("data/themes"), "json") {
themes.insert(name, content);
}

Expand Down
5 changes: 2 additions & 3 deletions src/tests/config_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ fn mid_turn_threshold_out_of_range_treated_as_unset() {
}

#[test]
fn compact_enabled_default_true() {
// Master switch defaults on; mid-turn compaction layers on top of it.
assert!(Config::default().resolve_compact_enabled());
fn compact_enabled_default_false() {
assert!(!Config::default().resolve_compact_enabled());
}

#[test]
Expand Down
Loading