feat: simplify DB further (#13771)

This commit is contained in:
jif-oai
2026-03-07 12:48:36 +01:00
committed by GitHub
Unverified
parent 5ceff6588e
commit cf143bf71e
28 changed files with 147 additions and 297 deletions
+3 -6
View File
@@ -904,12 +904,9 @@ async fn run_debug_clear_memories_command(
let state_path = state_db_path(config.sqlite_home.as_path());
let mut cleared_state_db = false;
if tokio::fs::try_exists(&state_path).await? {
let state_db = StateRuntime::init(
config.sqlite_home.clone(),
config.model_provider_id.clone(),
None,
)
.await?;
let state_db =
StateRuntime::init(config.sqlite_home.clone(), config.model_provider_id.clone())
.await?;
state_db.reset_memory_data_for_fresh_start().await?;
cleared_state_db = true;
}
+2 -6
View File
@@ -16,12 +16,8 @@ fn codex_command(codex_home: &Path) -> Result<assert_cmd::Command> {
#[tokio::test]
async fn debug_clear_memories_resets_state_and_removes_memory_dir() -> Result<()> {
let codex_home = TempDir::new()?;
let runtime = StateRuntime::init(
codex_home.path().to_path_buf(),
"test-provider".to_string(),
None,
)
.await?;
let runtime =
StateRuntime::init(codex_home.path().to_path_buf(), "test-provider".to_string()).await?;
drop(runtime);
let thread_id = "00000000-0000-0000-0000-000000000123";