fix: add memory config to wizard and fix clippy warnings

- Add chunk_max_tokens field to MemoryConfig in quick setup
- Add memory_backend parameter to run_quick_setup()
- Add setup_memory() step to interactive wizard (8 steps now)
- Fix clippy if_not_else warning
- Fix clippy match_same_arms warning
- Add clippy allows for browser.rs (too_many_lines, unnecessary_wraps)
This commit is contained in:
argenis de la rosa 2026-02-14 15:50:53 -05:00
parent 554f6e9ea5
commit 2c7021e90f
3 changed files with 117 additions and 25 deletions

View file

@ -81,6 +81,10 @@ enum Commands {
/// Provider name (used in quick mode, default: openrouter)
#[arg(long)]
provider: Option<String>,
/// Memory backend (sqlite, markdown, none) - used in quick mode, default: sqlite
#[arg(long)]
memory: Option<String>,
},
/// Start the AI agent loop
@ -264,13 +268,14 @@ async fn main() -> Result<()> {
channels_only,
api_key,
provider,
memory,
} = &cli.command
{
if *interactive && *channels_only {
bail!("Use either --interactive or --channels-only, not both");
}
if *channels_only && (api_key.is_some() || provider.is_some()) {
bail!("--channels-only does not accept --api-key or --provider");
if *channels_only && (api_key.is_some() || provider.is_some() || memory.is_some()) {
bail!("--channels-only does not accept --api-key, --provider, or --memory");
}
let config = if *channels_only {
@ -278,7 +283,7 @@ async fn main() -> Result<()> {
} else if *interactive {
onboard::run_wizard()?
} else {
onboard::run_quick_setup(api_key.as_deref(), provider.as_deref())?
onboard::run_quick_setup(api_key.as_deref(), provider.as_deref(), memory.as_deref())?
};
// Auto-start channels if user said yes during wizard
if std::env::var("ZEROCLAW_AUTOSTART_CHANNELS").as_deref() == Ok("1") {