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
3 changes: 2 additions & 1 deletion askcc/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ class VALID_EFFORT_LEVELS(enum.StrEnum): # noqa: N801
LOW = "low"
MEDIUM = "medium"
HIGH = "high"
XHIGH = "xhigh"
MAX = "max"


DEFAULT_EFFORT_LEVEL = VALID_EFFORT_LEVELS.MAX
DEFAULT_EFFORT_LEVEL = VALID_EFFORT_LEVELS.XHIGH


def _resolve_effort_level() -> VALID_EFFORT_LEVELS:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "askcc"
version = "0.2.4"
version = "0.2.5"
description = "A one-shot cc cli executor"
authors = [{ name = "mknt", email = "shane.cousins@gmail.com" }]
readme = "README.md"
Expand Down
13 changes: 13 additions & 0 deletions tests/test_askcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
CLAUDE_ENV_MAX_THINKING_TOKENS,
DEFAULT_EFFORT_LEVEL,
DEFAULT_MAX_THINKING_TOKENS,
VALID_EFFORT_LEVELS,
_resolve_effort_level,
)

Expand Down Expand Up @@ -1582,6 +1583,18 @@ def test_invalid_effort_level_logged_and_ignored(
assert result == DEFAULT_EFFORT_LEVEL
assert "Invalid ASKCC_CLAUDE_EFFORT_LEVEL" in caplog.text

def test_xhigh_effort_level_resolves_without_warning(
self, monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture
):
monkeypatch.setenv("ASKCC_CLAUDE_EFFORT_LEVEL", "xhigh")
with caplog.at_level("WARNING", logger="askcc.settings"):
result = _resolve_effort_level()
assert result == VALID_EFFORT_LEVELS.XHIGH
assert "Invalid ASKCC_CLAUDE_EFFORT_LEVEL" not in caplog.text

def test_default_effort_level_is_xhigh(self):
assert DEFAULT_EFFORT_LEVEL == VALID_EFFORT_LEVELS.XHIGH

def test_max_thinking_tokens_from_env(self, monkeypatch: pytest.MonkeyPatch):
monkeypatch.setenv("ASKCC_CLAUDE_MAX_THINKING_TOKENS", "50000")
raw = os.getenv("ASKCC_CLAUDE_MAX_THINKING_TOKENS", "")
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading