klaude-code 2.8.1__py3-none-any.whl → 2.9.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- klaude_code/app/runtime.py +2 -1
- klaude_code/auth/antigravity/oauth.py +33 -38
- klaude_code/auth/antigravity/token_manager.py +0 -18
- klaude_code/auth/base.py +53 -0
- klaude_code/auth/claude/oauth.py +34 -49
- klaude_code/auth/codex/exceptions.py +0 -4
- klaude_code/auth/codex/oauth.py +32 -28
- klaude_code/auth/codex/token_manager.py +0 -18
- klaude_code/cli/cost_cmd.py +128 -39
- klaude_code/cli/list_model.py +27 -10
- klaude_code/cli/main.py +14 -3
- klaude_code/config/assets/builtin_config.yaml +25 -24
- klaude_code/config/config.py +47 -25
- klaude_code/config/sub_agent_model_helper.py +18 -13
- klaude_code/config/thinking.py +0 -8
- klaude_code/const.py +1 -1
- klaude_code/core/agent_profile.py +11 -56
- klaude_code/core/compaction/overflow.py +0 -4
- klaude_code/core/executor.py +33 -5
- klaude_code/core/manager/llm_clients.py +9 -1
- klaude_code/core/prompts/prompt-claude-code.md +4 -4
- klaude_code/core/reminders.py +21 -23
- klaude_code/core/task.py +1 -5
- klaude_code/core/tool/__init__.py +3 -2
- klaude_code/core/tool/file/apply_patch.py +0 -27
- klaude_code/core/tool/file/read_tool.md +3 -2
- klaude_code/core/tool/file/read_tool.py +27 -3
- klaude_code/core/tool/offload.py +0 -35
- klaude_code/core/tool/shell/bash_tool.py +1 -1
- klaude_code/core/tool/sub_agent/__init__.py +6 -0
- klaude_code/core/tool/sub_agent/image_gen.md +16 -0
- klaude_code/core/tool/sub_agent/image_gen.py +146 -0
- klaude_code/core/tool/sub_agent/task.md +20 -0
- klaude_code/core/tool/sub_agent/task.py +205 -0
- klaude_code/core/tool/tool_registry.py +0 -16
- klaude_code/core/turn.py +1 -1
- klaude_code/llm/anthropic/input.py +6 -5
- klaude_code/llm/antigravity/input.py +14 -7
- klaude_code/llm/bedrock_anthropic/__init__.py +3 -0
- klaude_code/llm/google/client.py +8 -6
- klaude_code/llm/google/input.py +20 -12
- klaude_code/llm/image.py +18 -11
- klaude_code/llm/input_common.py +32 -6
- klaude_code/llm/json_stable.py +37 -0
- klaude_code/llm/{codex → openai_codex}/__init__.py +1 -1
- klaude_code/llm/{codex → openai_codex}/client.py +24 -2
- klaude_code/llm/openai_codex/prompt_sync.py +237 -0
- klaude_code/llm/openai_compatible/client.py +3 -1
- klaude_code/llm/openai_compatible/input.py +0 -10
- klaude_code/llm/openai_compatible/stream.py +35 -10
- klaude_code/llm/{responses → openai_responses}/client.py +1 -1
- klaude_code/llm/{responses → openai_responses}/input.py +15 -5
- klaude_code/llm/registry.py +3 -8
- klaude_code/llm/stream_parts.py +3 -1
- klaude_code/llm/usage.py +1 -9
- klaude_code/protocol/events.py +2 -2
- klaude_code/protocol/message.py +3 -2
- klaude_code/protocol/model.py +34 -2
- klaude_code/protocol/op.py +13 -0
- klaude_code/protocol/op_handler.py +5 -0
- klaude_code/protocol/sub_agent/AGENTS.md +5 -5
- klaude_code/protocol/sub_agent/__init__.py +13 -34
- klaude_code/protocol/sub_agent/explore.py +7 -34
- klaude_code/protocol/sub_agent/image_gen.py +3 -74
- klaude_code/protocol/sub_agent/task.py +3 -47
- klaude_code/protocol/sub_agent/web.py +8 -52
- klaude_code/protocol/tools.py +2 -0
- klaude_code/session/session.py +80 -22
- klaude_code/session/store.py +0 -4
- klaude_code/skill/assets/deslop/SKILL.md +9 -0
- klaude_code/skill/system_skills.py +0 -20
- klaude_code/tui/command/fork_session_cmd.py +5 -2
- klaude_code/tui/command/resume_cmd.py +9 -2
- klaude_code/tui/command/sub_agent_model_cmd.py +85 -18
- klaude_code/tui/components/assistant.py +0 -26
- klaude_code/tui/components/bash_syntax.py +4 -0
- klaude_code/tui/components/command_output.py +3 -1
- klaude_code/tui/components/developer.py +3 -0
- klaude_code/tui/components/diffs.py +4 -209
- klaude_code/tui/components/errors.py +4 -0
- klaude_code/tui/components/mermaid_viewer.py +2 -2
- klaude_code/tui/components/metadata.py +0 -3
- klaude_code/tui/components/rich/markdown.py +120 -87
- klaude_code/tui/components/rich/status.py +2 -2
- klaude_code/tui/components/rich/theme.py +11 -6
- klaude_code/tui/components/sub_agent.py +2 -46
- klaude_code/tui/components/thinking.py +0 -33
- klaude_code/tui/components/tools.py +65 -21
- klaude_code/tui/components/user_input.py +2 -0
- klaude_code/tui/input/images.py +21 -18
- klaude_code/tui/input/key_bindings.py +2 -2
- klaude_code/tui/input/prompt_toolkit.py +49 -49
- klaude_code/tui/machine.py +29 -47
- klaude_code/tui/renderer.py +48 -33
- klaude_code/tui/runner.py +2 -1
- klaude_code/tui/terminal/image.py +27 -34
- klaude_code/ui/common.py +0 -70
- {klaude_code-2.8.1.dist-info → klaude_code-2.9.1.dist-info}/METADATA +3 -6
- {klaude_code-2.8.1.dist-info → klaude_code-2.9.1.dist-info}/RECORD +103 -99
- klaude_code/core/tool/sub_agent_tool.py +0 -126
- klaude_code/llm/bedrock/__init__.py +0 -3
- klaude_code/llm/openai_compatible/tool_call_accumulator.py +0 -108
- klaude_code/tui/components/rich/searchable_text.py +0 -68
- /klaude_code/llm/{bedrock → bedrock_anthropic}/client.py +0 -0
- /klaude_code/llm/{responses → openai_responses}/__init__.py +0 -0
- {klaude_code-2.8.1.dist-info → klaude_code-2.9.1.dist-info}/WHEEL +0 -0
- {klaude_code-2.8.1.dist-info → klaude_code-2.9.1.dist-info}/entry_points.txt +0 -0
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from collections.abc import Iterable, Sequence
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class SearchableFormattedText:
|
|
7
|
-
"""
|
|
8
|
-
Wrapper for prompt_toolkit formatted text that also supports string-like
|
|
9
|
-
methods commonly expected by search filters (e.g., ``.lower()``).
|
|
10
|
-
|
|
11
|
-
- ``fragments``: A sequence of (style, text) tuples accepted by
|
|
12
|
-
prompt_toolkit's ``to_formatted_text``.
|
|
13
|
-
- ``plain``: Optional plain text for searching. If omitted, it is derived by
|
|
14
|
-
concatenating the text parts of the fragments.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
def __init__(self, fragments: Sequence[tuple[str, str]], plain: str | None = None):
|
|
18
|
-
self._fragments: list[tuple[str, str]] = list(fragments)
|
|
19
|
-
if plain is None:
|
|
20
|
-
plain = "".join(text for _, text in self._fragments)
|
|
21
|
-
self._plain = plain
|
|
22
|
-
|
|
23
|
-
# Recognized by prompt_toolkit's to_formatted_text(value)
|
|
24
|
-
def __pt_formatted_text__(
|
|
25
|
-
self,
|
|
26
|
-
) -> Iterable[tuple[str, str]]: # pragma: no cover - passthrough
|
|
27
|
-
return self._fragments
|
|
28
|
-
|
|
29
|
-
# Provide a human-readable representation.
|
|
30
|
-
def __str__(self) -> str: # pragma: no cover - utility
|
|
31
|
-
return self._plain
|
|
32
|
-
|
|
33
|
-
# Minimal string API for search filtering.
|
|
34
|
-
def lower(self) -> str:
|
|
35
|
-
return self._plain.lower()
|
|
36
|
-
|
|
37
|
-
def upper(self) -> str: # pragma: no cover - convenience
|
|
38
|
-
return self._plain.upper()
|
|
39
|
-
|
|
40
|
-
# Expose the plain text if needed elsewhere.
|
|
41
|
-
@property
|
|
42
|
-
def plain(self) -> str:
|
|
43
|
-
return self._plain
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
class SearchableFormattedList(list[tuple[str, str]]):
|
|
47
|
-
"""
|
|
48
|
-
List variant compatible with prompt_toolkit formatted-text usage.
|
|
49
|
-
|
|
50
|
-
- Behaves like ``List[Tuple[str, str]]`` for rendering (so ``isinstance(..., list)`` works).
|
|
51
|
-
- Provides ``.lower()``/``.upper()`` returning the plain text for search filtering.
|
|
52
|
-
"""
|
|
53
|
-
|
|
54
|
-
def __init__(self, fragments: Sequence[tuple[str, str]], plain: str | None = None):
|
|
55
|
-
super().__init__(fragments)
|
|
56
|
-
if plain is None:
|
|
57
|
-
plain = "".join(text for _, text in fragments)
|
|
58
|
-
self._plain = plain
|
|
59
|
-
|
|
60
|
-
def lower(self) -> str:
|
|
61
|
-
return self._plain.lower()
|
|
62
|
-
|
|
63
|
-
def upper(self) -> str: # pragma: no cover - convenience
|
|
64
|
-
return self._plain.upper()
|
|
65
|
-
|
|
66
|
-
@property
|
|
67
|
-
def plain(self) -> str:
|
|
68
|
-
return self._plain
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|