feat: --dangerously-skip-permissions flag, default max_tokens 64k (opus 32k)
This commit is contained in:
1
rust/.claude/sessions/session-1775009769569.json
Normal file
1
rust/.claude/sessions/session-1775009769569.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"messages":[{"blocks":[{"text":"hello","type":"text"}],"role":"user"},{"blocks":[{"text":"\n\nHello! 👋 How can I help you today? I see you're working in a Rust project (`rusty-claude-cli`) with some changes to the argument parsing in `main.rs` — specifically loading the model from config with a fallback to a default. \n\nWhat would you like to work on?","type":"text"}],"role":"assistant","usage":{"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":324,"output_tokens":73}}],"version":1}
|
||||||
1
rust/.claude/sessions/session-1775009841982.json
Normal file
1
rust/.claude/sessions/session-1775009841982.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"messages":[{"blocks":[{"text":"--dangerously-skip-permissions","type":"text"}],"role":"user"},{"blocks":[{"text":"\n\nI see you're working in the `rusty-claude-cli` project. The git diff shows a simplification of the `max_tokens_for_model` function - collapsing sonnet/haiku/default cases into a single `else` branch returning 64,000.\n\nHow can I help you today? What would you like to work on?","type":"text"}],"role":"assistant","usage":{"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":2126,"output_tokens":81}}],"version":1}
|
||||||
1
rust/.claude/sessions/session-1775009869734.json
Normal file
1
rust/.claude/sessions/session-1775009869734.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"messages":[],"version":1}
|
||||||
@@ -38,12 +38,8 @@ const DEFAULT_MODEL: &str = "claude-opus-4-6";
|
|||||||
fn max_tokens_for_model(model: &str) -> u32 {
|
fn max_tokens_for_model(model: &str) -> u32 {
|
||||||
if model.contains("opus") {
|
if model.contains("opus") {
|
||||||
32_000
|
32_000
|
||||||
} else if model.contains("sonnet") {
|
|
||||||
64_000
|
|
||||||
} else if model.contains("haiku") {
|
|
||||||
64_000
|
|
||||||
} else {
|
} else {
|
||||||
16_384
|
64_000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const DEFAULT_DATE: &str = "2026-03-31";
|
const DEFAULT_DATE: &str = "2026-03-31";
|
||||||
@@ -196,6 +192,10 @@ fn parse_args(args: &[String]) -> Result<CliAction, String> {
|
|||||||
permission_mode = parse_permission_mode_arg(&flag[18..])?;
|
permission_mode = parse_permission_mode_arg(&flag[18..])?;
|
||||||
index += 1;
|
index += 1;
|
||||||
}
|
}
|
||||||
|
"--dangerously-skip-permissions" => {
|
||||||
|
permission_mode = PermissionMode::DangerFullAccess;
|
||||||
|
index += 1;
|
||||||
|
}
|
||||||
"--allowedTools" | "--allowed-tools" => {
|
"--allowedTools" | "--allowed-tools" => {
|
||||||
let value = args
|
let value = args
|
||||||
.get(index + 1)
|
.get(index + 1)
|
||||||
@@ -2348,6 +2348,7 @@ fn print_help_to(out: &mut impl Write) -> io::Result<()> {
|
|||||||
out,
|
out,
|
||||||
" --permission-mode MODE Set read-only, workspace-write, or danger-full-access"
|
" --permission-mode MODE Set read-only, workspace-write, or danger-full-access"
|
||||||
)?;
|
)?;
|
||||||
|
writeln!(out, " --dangerously-skip-permissions Skip all permission checks")?;
|
||||||
writeln!(out, " --allowedTools TOOLS Restrict enabled tools (repeatable; comma-separated aliases supported)")?;
|
writeln!(out, " --allowedTools TOOLS Restrict enabled tools (repeatable; comma-separated aliases supported)")?;
|
||||||
writeln!(
|
writeln!(
|
||||||
out,
|
out,
|
||||||
|
|||||||
Reference in New Issue
Block a user