Skip to content

Commit 4de95f0

Browse files
committed
v1.0.11
- Hide the Claude CLI token refresh window so it does not flash on screen
1 parent a68f801 commit 4de95f0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/poller.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ use std::path::PathBuf;
22
use std::process::Command;
33
use std::time::{Duration, SystemTime, UNIX_EPOCH};
44

5+
use std::os::windows::process::CommandExt;
56
use serde::Deserialize;
67

78
use crate::models::{UsageData, UsageSection};
89

910
const USAGE_URL: &str = "https://api.anthropic.com/api/oauth/usage";
1011
const MESSAGES_URL: &str = "https://api.anthropic.com/v1/messages";
12+
const CREATE_NO_WINDOW: u32 = 0x08000000;
1113

1214
const MODEL_FALLBACK_CHAIN: &[&str] = &[
1315
"claude-3-haiku-20240307",
@@ -74,6 +76,7 @@ fn cli_refresh_token() {
7476
};
7577
cmd.env_remove("CLAUDECODE")
7678
.env_remove("CLAUDE_CODE_ENTRYPOINT")
79+
.creation_flags(CREATE_NO_WINDOW)
7780
.stdout(std::process::Stdio::null())
7881
.stderr(std::process::Stdio::null());
7982

0 commit comments

Comments
 (0)