klaude-code 1.2.21__py3-none-any.whl → 1.2.23__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/cli/debug.py +8 -10
- klaude_code/command/__init__.py +0 -3
- klaude_code/command/status_cmd.py +1 -1
- klaude_code/const/__init__.py +10 -7
- klaude_code/core/manager/sub_agent_manager.py +1 -1
- klaude_code/core/prompt.py +5 -2
- klaude_code/core/prompts/prompt-codex-gpt-5-2-codex.md +117 -0
- klaude_code/core/prompts/{prompt-codex-gpt-5-1.md → prompt-codex.md} +9 -42
- klaude_code/core/reminders.py +87 -2
- klaude_code/core/task.py +37 -18
- klaude_code/core/tool/__init__.py +1 -9
- klaude_code/core/tool/file/_utils.py +6 -0
- klaude_code/core/tool/file/apply_patch_tool.py +30 -72
- klaude_code/core/tool/file/diff_builder.py +151 -0
- klaude_code/core/tool/file/edit_tool.py +35 -18
- klaude_code/core/tool/file/read_tool.py +45 -86
- klaude_code/core/tool/file/write_tool.py +40 -30
- klaude_code/core/tool/shell/bash_tool.py +147 -0
- klaude_code/core/tool/skill/__init__.py +0 -0
- klaude_code/core/tool/{memory → skill}/skill_tool.py +16 -39
- klaude_code/protocol/commands.py +0 -1
- klaude_code/protocol/model.py +31 -11
- klaude_code/protocol/tools.py +1 -2
- klaude_code/session/export.py +76 -21
- klaude_code/session/store.py +4 -2
- klaude_code/session/templates/export_session.html +28 -0
- klaude_code/skill/__init__.py +27 -0
- klaude_code/skill/assets/deslop/SKILL.md +17 -0
- klaude_code/skill/assets/dev-docs/SKILL.md +108 -0
- klaude_code/skill/assets/handoff/SKILL.md +39 -0
- klaude_code/skill/assets/jj-workspace/SKILL.md +20 -0
- klaude_code/skill/assets/skill-creator/SKILL.md +139 -0
- klaude_code/{core/tool/memory/skill_loader.py → skill/loader.py} +60 -24
- klaude_code/skill/manager.py +70 -0
- klaude_code/skill/system_skills.py +192 -0
- klaude_code/ui/modes/repl/completers.py +103 -3
- klaude_code/ui/modes/repl/event_handler.py +7 -3
- klaude_code/ui/modes/repl/input_prompt_toolkit.py +42 -3
- klaude_code/ui/renderers/assistant.py +7 -2
- klaude_code/ui/renderers/common.py +26 -11
- klaude_code/ui/renderers/developer.py +12 -5
- klaude_code/ui/renderers/diffs.py +85 -1
- klaude_code/ui/renderers/metadata.py +4 -2
- klaude_code/ui/renderers/thinking.py +1 -1
- klaude_code/ui/renderers/tools.py +75 -129
- klaude_code/ui/renderers/user_input.py +32 -2
- klaude_code/ui/rich/markdown.py +27 -12
- klaude_code/ui/rich/status.py +9 -24
- klaude_code/ui/rich/theme.py +17 -5
- {klaude_code-1.2.21.dist-info → klaude_code-1.2.23.dist-info}/METADATA +19 -13
- {klaude_code-1.2.21.dist-info → klaude_code-1.2.23.dist-info}/RECORD +54 -54
- klaude_code/command/diff_cmd.py +0 -136
- klaude_code/command/prompt-deslop.md +0 -14
- klaude_code/command/prompt-dev-docs-update.md +0 -56
- klaude_code/command/prompt-dev-docs.md +0 -46
- klaude_code/command/prompt-handoff.md +0 -33
- klaude_code/command/prompt-jj-workspace.md +0 -18
- klaude_code/core/tool/file/multi_edit_tool.md +0 -42
- klaude_code/core/tool/file/multi_edit_tool.py +0 -175
- klaude_code/core/tool/memory/__init__.py +0 -5
- klaude_code/core/tool/memory/memory_tool.md +0 -20
- klaude_code/core/tool/memory/memory_tool.py +0 -456
- /klaude_code/core/tool/{memory → skill}/skill_tool.md +0 -0
- {klaude_code-1.2.21.dist-info → klaude_code-1.2.23.dist-info}/WHEEL +0 -0
- {klaude_code-1.2.21.dist-info → klaude_code-1.2.23.dist-info}/entry_points.txt +0 -0
klaude_code/ui/rich/theme.py
CHANGED
|
@@ -21,7 +21,9 @@ class Palette:
|
|
|
21
21
|
purple: str
|
|
22
22
|
lavender: str
|
|
23
23
|
diff_add: str
|
|
24
|
+
diff_add_char: str
|
|
24
25
|
diff_remove: str
|
|
26
|
+
diff_remove_char: str
|
|
25
27
|
code_theme: str
|
|
26
28
|
text_background: str
|
|
27
29
|
|
|
@@ -40,8 +42,10 @@ LIGHT_PALETTE = Palette(
|
|
|
40
42
|
grey_green="#96a096",
|
|
41
43
|
purple="#5f5fd7",
|
|
42
44
|
lavender="#5f87af",
|
|
43
|
-
diff_add="#2e5a32 on #
|
|
44
|
-
|
|
45
|
+
diff_add="#2e5a32 on #dafbe1",
|
|
46
|
+
diff_add_char="#2e5a32 on #aceebb",
|
|
47
|
+
diff_remove="#82071e on #ffecec",
|
|
48
|
+
diff_remove_char="#82071e on #ffcfcf",
|
|
45
49
|
code_theme="ansi_light",
|
|
46
50
|
text_background="#e0e0e0",
|
|
47
51
|
)
|
|
@@ -60,8 +64,10 @@ DARK_PALETTE = Palette(
|
|
|
60
64
|
grey_green="#6d8672",
|
|
61
65
|
purple="#afbafe",
|
|
62
66
|
lavender="#9898b8",
|
|
63
|
-
diff_add="#c8e6c9 on #
|
|
64
|
-
|
|
67
|
+
diff_add="#c8e6c9 on #1b3928",
|
|
68
|
+
diff_add_char="#c8e6c9 on #2d6b42",
|
|
69
|
+
diff_remove="#ffcdd2 on #3d1f23",
|
|
70
|
+
diff_remove_char="#ffcdd2 on #7a3a42",
|
|
65
71
|
code_theme="ansi_dark",
|
|
66
72
|
text_background="#2f3440",
|
|
67
73
|
)
|
|
@@ -73,6 +79,8 @@ class ThemeKey(str, Enum):
|
|
|
73
79
|
DIFF_FILE_NAME = "diff.file_name"
|
|
74
80
|
DIFF_REMOVE = "diff.remove"
|
|
75
81
|
DIFF_ADD = "diff.add"
|
|
82
|
+
DIFF_ADD_CHAR = "diff.add.char"
|
|
83
|
+
DIFF_REMOVE_CHAR = "diff.remove.char"
|
|
76
84
|
DIFF_STATS_ADD = "diff.stats.add"
|
|
77
85
|
DIFF_STATS_REMOVE = "diff.stats.remove"
|
|
78
86
|
# ERROR
|
|
@@ -94,6 +102,7 @@ class ThemeKey(str, Enum):
|
|
|
94
102
|
USER_INPUT_PROMPT = "user.input.prompt"
|
|
95
103
|
USER_INPUT_AT_PATTERN = "user.at_pattern"
|
|
96
104
|
USER_INPUT_SLASH_COMMAND = "user.slash_command"
|
|
105
|
+
USER_INPUT_SKILL = "user.skill"
|
|
97
106
|
# REMINDER
|
|
98
107
|
REMINDER = "reminder"
|
|
99
108
|
REMINDER_BOLD = "reminder.bold"
|
|
@@ -165,6 +174,8 @@ def get_theme(theme: str | None = None) -> Themes:
|
|
|
165
174
|
ThemeKey.DIFF_FILE_NAME.value: palette.blue,
|
|
166
175
|
ThemeKey.DIFF_REMOVE.value: palette.diff_remove,
|
|
167
176
|
ThemeKey.DIFF_ADD.value: palette.diff_add,
|
|
177
|
+
ThemeKey.DIFF_ADD_CHAR.value: palette.diff_add_char,
|
|
178
|
+
ThemeKey.DIFF_REMOVE_CHAR.value: palette.diff_remove_char,
|
|
168
179
|
ThemeKey.DIFF_STATS_ADD.value: palette.green,
|
|
169
180
|
ThemeKey.DIFF_STATS_REMOVE.value: palette.red,
|
|
170
181
|
# ERROR
|
|
@@ -173,9 +184,10 @@ def get_theme(theme: str | None = None) -> Themes:
|
|
|
173
184
|
ThemeKey.INTERRUPT.value: "reverse bold " + palette.red,
|
|
174
185
|
# USER_INPUT
|
|
175
186
|
ThemeKey.USER_INPUT.value: palette.magenta,
|
|
176
|
-
ThemeKey.USER_INPUT_PROMPT.value: palette.magenta,
|
|
187
|
+
ThemeKey.USER_INPUT_PROMPT.value: "bold " + palette.magenta,
|
|
177
188
|
ThemeKey.USER_INPUT_AT_PATTERN.value: palette.purple,
|
|
178
189
|
ThemeKey.USER_INPUT_SLASH_COMMAND.value: "bold reverse " + palette.blue,
|
|
190
|
+
ThemeKey.USER_INPUT_SKILL.value: "bold reverse " + palette.green,
|
|
179
191
|
# METADATA
|
|
180
192
|
ThemeKey.METADATA.value: palette.lavender,
|
|
181
193
|
ThemeKey.METADATA_DIM.value: "dim " + palette.lavender,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: klaude-code
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.23
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Dist: anthropic>=0.66.0
|
|
6
6
|
Requires-Dist: chardet>=5.2.0
|
|
7
7
|
Requires-Dist: ddgs>=9.9.3
|
|
8
|
+
Requires-Dist: diff-match-patch>=20241021
|
|
8
9
|
Requires-Dist: openai>=1.102.0
|
|
9
10
|
Requires-Dist: pillow>=12.0.0
|
|
10
11
|
Requires-Dist: prompt-toolkit>=3.0.52
|
|
@@ -17,18 +18,23 @@ Requires-Dist: typer>=0.17.3
|
|
|
17
18
|
Requires-Python: >=3.13
|
|
18
19
|
Description-Content-Type: text/markdown
|
|
19
20
|
|
|
20
|
-
#
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
##
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
21
|
+
# Klaude Code
|
|
22
|
+
|
|
23
|
+
Multi-model code agent CLI.
|
|
24
|
+
|
|
25
|
+
## Features
|
|
26
|
+
- **Multi-provider**: Anthropic, OpenAI Responses API, OpenRouter
|
|
27
|
+
- **Keep reasoning item in context**: Interleaved thinking support
|
|
28
|
+
- **Model-aware tools**: Claude Code tools for Sonnet, `apply_patch` for GPT-5/Codex
|
|
29
|
+
- **Structured sub-agent output**: Define JSON schema, get schema-compliant responses via constrained decoding
|
|
30
|
+
- **Recursive `@file` mentions**: Circular dependency protection, relative path resolution
|
|
31
|
+
- **Reminders**: Cooldown-based todo tracking and instruction reinforcement
|
|
32
|
+
- **External file sync**: Monitoring for external edits (linter, manual)
|
|
33
|
+
- **Interrupt handling**: Ctrl+C preserves partial responses and synthesizes tool cancellation results
|
|
34
|
+
- **Output truncation**: Large outputs saved to file system with snapshot links
|
|
35
|
+
- **Skills**: Built-in + user + project Agent Skills (with implicit invocation by Skill tool or explicit invocation by typing `$`)
|
|
36
|
+
- **Sessions**: Resumable with `--continue`
|
|
37
|
+
- **Extras**: Slash commands, sub-agents, image paste, terminal notifications, auto-theming
|
|
32
38
|
|
|
33
39
|
## Installation
|
|
34
40
|
|
|
@@ -8,82 +8,73 @@ klaude_code/auth/codex/token_manager.py,sha256=F4xH5PhE9cksqTiWsU_YAboNe284VgUFW
|
|
|
8
8
|
klaude_code/cli/__init__.py,sha256=YzlAoWAr5rx5oe6B_4zPxRFS4QaZauuy1AFwampP5fg,45
|
|
9
9
|
klaude_code/cli/auth_cmd.py,sha256=UWMHjn9xZp2o8OZc-x8y9MnkZgRWOkFXk05iKJYcySE,2561
|
|
10
10
|
klaude_code/cli/config_cmd.py,sha256=SBFmBnHvkf5IJtpsDDuHsHWQCmYd2i4PtIMBOKpxmOM,2894
|
|
11
|
-
klaude_code/cli/debug.py,sha256=
|
|
11
|
+
klaude_code/cli/debug.py,sha256=vizBXc3648vBZQonreMqvv_b5UdRgcQoOIT-iEIx1G4,2318
|
|
12
12
|
klaude_code/cli/list_model.py,sha256=9YOxhWE0J59NaY-SrgPA9_jA1A8rlOGwWmzK0TRuos4,8011
|
|
13
13
|
klaude_code/cli/main.py,sha256=pyU2W2X3lg7Z-4adiOzA9_2l-5QSejYm68HrhAiu470,10469
|
|
14
14
|
klaude_code/cli/runtime.py,sha256=0qYbtTP41m0K8eA2de_VFuERTV1NHn265O1-BMcdrw0,14238
|
|
15
15
|
klaude_code/cli/self_update.py,sha256=fekLNRm3ivZ-Xbc-79rcgDBXbq-Zb-BkSQOGMRLeTAs,7986
|
|
16
16
|
klaude_code/cli/session_cmd.py,sha256=jAopkqq_DGgoDIcGxT-RSzn9R4yqBC8NCaNgK1GLqnQ,2634
|
|
17
|
-
klaude_code/command/__init__.py,sha256=
|
|
17
|
+
klaude_code/command/__init__.py,sha256=B39fxrrvxb51B6qeQJoh3lXWCsPoI81BJvdSLb-8CYg,3117
|
|
18
18
|
klaude_code/command/clear_cmd.py,sha256=DzCg6vQ5Eve7Rx4HdL-uta1pBDRQinOW6nwx5YlOA24,658
|
|
19
19
|
klaude_code/command/command_abc.py,sha256=wUGE8NkCWWKy8lZXcW-UcQyMGnVikxTrCIycLlPU5dY,2350
|
|
20
20
|
klaude_code/command/debug_cmd.py,sha256=9sBIAwHz28QoI-tHsU3ksQlDObF1ilIbtAAEAVMR0v0,2734
|
|
21
|
-
klaude_code/command/diff_cmd.py,sha256=T_Oyo7rHZM5_qKGA0DjSHNZlzAHOhUwJS3Oqvur3Hho,5218
|
|
22
21
|
klaude_code/command/export_cmd.py,sha256=Cs7YXWtos-ZfN9OEppIl8Xrb017kDG7R6hGiilqt2bM,1623
|
|
23
22
|
klaude_code/command/export_online_cmd.py,sha256=kOVmFEW7gEEFvaKnXL8suNenktLyTW-13bT64NBGwUQ,5861
|
|
24
23
|
klaude_code/command/help_cmd.py,sha256=yQJnVtj6sgXQdGsi4u9aS7EcjJLSrXccUA-v_bqmsRw,1633
|
|
25
24
|
klaude_code/command/model_cmd.py,sha256=GmDln1N6u7eWLK15tm_lcdDJBY8qI0ih48h6AhijafI,1665
|
|
26
|
-
klaude_code/command/prompt-deslop.md,sha256=YGaAXqem39zd0UWCFjWUj83Cf7cvUJq1768aJExFqeg,1346
|
|
27
|
-
klaude_code/command/prompt-dev-docs-update.md,sha256=g1IWIWIa-3qlNOw5mBA4N9H1_nvYcw8AKo7XoQw_AZQ,1855
|
|
28
|
-
klaude_code/command/prompt-dev-docs.md,sha256=PU9iT6XdUEH6grfSjHVma7xKOQcA__ZTKlEDkbbO0hA,1783
|
|
29
|
-
klaude_code/command/prompt-handoff.md,sha256=RXIeXNwOpSpkwAyNFSvQFoo077TVkbj11fqQ2r8aCh4,1638
|
|
30
25
|
klaude_code/command/prompt-init.md,sha256=a4_FQ3gKizqs2vl9oEY5jtG6HNhv3f-1b5RSCFq0A18,1873
|
|
31
|
-
klaude_code/command/prompt-jj-workspace.md,sha256=BtSH3atgvE0j7n3j2EnSS6vuPUJDhEnUHDFZ5qq93QE,919
|
|
32
26
|
klaude_code/command/prompt_command.py,sha256=rMi-ZRLpUSt1t0IQVtwnzIYqcrXK-MwZrabbZ8dc8U4,2774
|
|
33
27
|
klaude_code/command/refresh_cmd.py,sha256=575eJ5IsOc1e_7CulMxvTu5GQ6BaXTG1k8IsAqzrwdQ,1244
|
|
34
28
|
klaude_code/command/registry.py,sha256=avTjsoyLv11SsLsY_qb3OpsRjsSyxIlu7uwJI0Nq6HE,6176
|
|
35
29
|
klaude_code/command/release_notes_cmd.py,sha256=FIrBRfKTlXEp8mBh15buNjgOrl_GMX7FeeMWxYYBn1o,2674
|
|
36
|
-
klaude_code/command/status_cmd.py,sha256=
|
|
30
|
+
klaude_code/command/status_cmd.py,sha256=sYmzfex7RVhgrBCjRyD8fsZ6ioZvjVzQ_-FvmcsA7fo,5365
|
|
37
31
|
klaude_code/command/terminal_setup_cmd.py,sha256=SivM1gX_anGY_8DCQNFZ5VblFqt4sVgCMEWPRlo6K5w,10911
|
|
38
32
|
klaude_code/command/thinking_cmd.py,sha256=XDyq0q8eb3Os4FyWjr-moiKjmzGIaNhOC9h89y1AZ84,8854
|
|
39
33
|
klaude_code/config/__init__.py,sha256=Qrqvi8nizkj6N77h2vDj0r4rbgCiqxvz2HLBPFuWulA,120
|
|
40
34
|
klaude_code/config/config.py,sha256=2jvM6a8zoC-TdRFaLIw3OW5paxxeXC6l-o05ds4RysA,7263
|
|
41
35
|
klaude_code/config/select_model.py,sha256=KCdFjaoHXyO9QidNna_OGdDrvlEXtRUXKfG-F8kdNLk,5188
|
|
42
|
-
klaude_code/const/__init__.py,sha256=
|
|
36
|
+
klaude_code/const/__init__.py,sha256=yZCljtZYt0FPIczkU8i9v26Nvipn5x6OPeBE8L8A8wI,4396
|
|
43
37
|
klaude_code/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
38
|
klaude_code/core/agent.py,sha256=bWm-UFX_0-KAy5j_YHH8X8o3MJT4-40Ni2EaDP2SL5k,5819
|
|
45
39
|
klaude_code/core/executor.py,sha256=HmKtj0ZremRcLCGHkPckR_k0FSZh6FZ52-LMRSMZK9c,24882
|
|
46
40
|
klaude_code/core/manager/__init__.py,sha256=hdIbpnYj6i18byiWjtJIm5l7NYYDQMvafw8fePVPydc,562
|
|
47
41
|
klaude_code/core/manager/llm_clients.py,sha256=X2oMFWgJcP0tK8GEtMMDYR3HyR6_H8FuyCqpzWF5x2k,871
|
|
48
42
|
klaude_code/core/manager/llm_clients_builder.py,sha256=pPZ_xBh-_ipV66L-9a1fnwNos4iik82Zkq0E0y3WrfI,1521
|
|
49
|
-
klaude_code/core/manager/sub_agent_manager.py,sha256=
|
|
50
|
-
klaude_code/core/prompt.py,sha256=
|
|
43
|
+
klaude_code/core/manager/sub_agent_manager.py,sha256=DCRlPimgmW_wykkjqAK_dUeeKxNavS8fJ4mhhT7As-E,4872
|
|
44
|
+
klaude_code/core/prompt.py,sha256=piHP0Cu_u583_RHPjhVvTkdp5GgHQ29y3IM2QFVHITY,3869
|
|
51
45
|
klaude_code/core/prompts/prompt-claude-code.md,sha256=uuWBv6GrG63mdmBedAHT5U9yOpbHSKFYbbS2xBnUzOE,8290
|
|
52
46
|
klaude_code/core/prompts/prompt-codex-gpt-5-1-codex-max.md,sha256=SW-y8AmR99JL_9j26k9YVAOQuZ18vR12aT5CWHkZDc4,11741
|
|
53
|
-
klaude_code/core/prompts/prompt-codex-gpt-5-
|
|
47
|
+
klaude_code/core/prompts/prompt-codex-gpt-5-2-codex.md,sha256=GA1pIIF6JuAl4P3FIW4tVJ6zL_5iZ8MY_PF0DW9hBuU,11719
|
|
48
|
+
klaude_code/core/prompts/prompt-codex.md,sha256=ybL6CXrGnK6Cw9KuEicQg4kKllIcVa2NwUyuUWitPzk,21672
|
|
54
49
|
klaude_code/core/prompts/prompt-gemini.md,sha256=JjE1tHSByGKJzjn4Gpj1zekT7ry1Yqbwx5qx3fZy2gE,3901
|
|
55
50
|
klaude_code/core/prompts/prompt-minimal.md,sha256=6-ZmQQkE3f92W_3V2wS7ocB13wLog1_UojCjZG0K4v8,1559
|
|
56
51
|
klaude_code/core/prompts/prompt-sub-agent-explore.md,sha256=21kFodjhvN0L-c_ZFo4yVhJOyzfgES-Dty9Vz_Ew9q8,2629
|
|
57
52
|
klaude_code/core/prompts/prompt-sub-agent-oracle.md,sha256=1PLI3snvxnenCOPVrL0IxZnBl5b2xxGhlufHAyLyf60,1376
|
|
58
53
|
klaude_code/core/prompts/prompt-sub-agent-web.md,sha256=ewS7-h8_u4QZftFpqrZWpht9Ap08s7zF9D4k4md8oD8,2360
|
|
59
54
|
klaude_code/core/prompts/prompt-sub-agent.md,sha256=dmmdsOenbAOfqG6FmdR88spOLZkXmntDBs-cmZ9DN_g,897
|
|
60
|
-
klaude_code/core/reminders.py,sha256=
|
|
61
|
-
klaude_code/core/task.py,sha256=
|
|
62
|
-
klaude_code/core/tool/__init__.py,sha256=
|
|
55
|
+
klaude_code/core/reminders.py,sha256=ivY7k2Iw9XVgsWfMDckSGsbonFRgGjCJM8MeI0dzuEs,23448
|
|
56
|
+
klaude_code/core/task.py,sha256=yJAcs_hFm1NYaLbjj-qbGiJr65Nu76uLD2lGGfseYYg,11773
|
|
57
|
+
klaude_code/core/tool/__init__.py,sha256=fOEwgJMGHT8NkYYE6l1FZ0fDRUmHzC6laA8wESo9j60,1939
|
|
63
58
|
klaude_code/core/tool/file/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
|
-
klaude_code/core/tool/file/_utils.py,sha256=
|
|
59
|
+
klaude_code/core/tool/file/_utils.py,sha256=OG4BE9WyJqzH8ilVCL3D9yvAcHk-r-L9snd-E8gO_io,967
|
|
65
60
|
klaude_code/core/tool/file/apply_patch.py,sha256=LZd3pYQ9ow_TxiFnqYuzD216HmvkLX6lW6BoMd9iQRs,17080
|
|
66
61
|
klaude_code/core/tool/file/apply_patch_tool.md,sha256=KVDsjUiLDa97gym0NrZNVG4jA1_zN-2i-B3upVQyOhU,59
|
|
67
|
-
klaude_code/core/tool/file/apply_patch_tool.py,sha256=
|
|
62
|
+
klaude_code/core/tool/file/apply_patch_tool.py,sha256=Wp5x3auJZx99am4NiR4daRj1XJJtDpfBcsRlNXgucCE,6974
|
|
63
|
+
klaude_code/core/tool/file/diff_builder.py,sha256=b53S4Ebw7aPmd9AZ97Pxu6MRcnUIdVD36MJ2yTDrAjI,5872
|
|
68
64
|
klaude_code/core/tool/file/edit_tool.md,sha256=rEcUjJuPC46t1nXWjTDxplDcxWDbzTWsr6_bYt5_aRI,1110
|
|
69
|
-
klaude_code/core/tool/file/edit_tool.py,sha256=
|
|
70
|
-
klaude_code/core/tool/file/multi_edit_tool.md,sha256=4G39b-jGdJdGGbBTj7R6tcUfcui9tXn6CLQ5uaX5y1M,2485
|
|
71
|
-
klaude_code/core/tool/file/multi_edit_tool.py,sha256=OHLBzsPGj-7Kd0BWscbWmbCKpjkOeOAZ0iENieWT6L8,7090
|
|
65
|
+
klaude_code/core/tool/file/edit_tool.py,sha256=wuXISJRTWobNCKjkQ01UpoA13I0Zxcg1r7hXErAQxnQ,10897
|
|
72
66
|
klaude_code/core/tool/file/read_tool.md,sha256=74SLSl1tq3L0por73M0QV_ws41MRIvGXQpfLb8dmtp0,1351
|
|
73
|
-
klaude_code/core/tool/file/read_tool.py,sha256=
|
|
67
|
+
klaude_code/core/tool/file/read_tool.py,sha256=d51eVmDWNVnrhoHyL5_crB8cvCpBNH6S00VAzJfyLgg,12076
|
|
74
68
|
klaude_code/core/tool/file/write_tool.md,sha256=CNnYgtieUasuHdpXLDpTEsqe492Pf7v75M4RQ3oIer8,613
|
|
75
|
-
klaude_code/core/tool/file/write_tool.py,sha256=
|
|
76
|
-
klaude_code/core/tool/memory/__init__.py,sha256=oeBpjUXcAilCtYXhiXDzavw5-BE_pbB2ZxsFJKTTcdc,143
|
|
77
|
-
klaude_code/core/tool/memory/memory_tool.md,sha256=qWytU7k0kQQbne_8n4cei2-dDTNpHesmbI2PYza3XR0,1299
|
|
78
|
-
klaude_code/core/tool/memory/memory_tool.py,sha256=xasFf1IQp1LFaL4ctDIQt5jfrd_z62ZsBeE42QIKAKs,18949
|
|
79
|
-
klaude_code/core/tool/memory/skill_loader.py,sha256=WGC3svsasEIM8yDAjFmFId1HQuEhuD3KFEvgoXcHmD4,8870
|
|
80
|
-
klaude_code/core/tool/memory/skill_tool.md,sha256=UfjJK5EGAd3mf7ym5rIrRdPyV3kBTxNnwzOjNnHOBrE,973
|
|
81
|
-
klaude_code/core/tool/memory/skill_tool.py,sha256=8SC4asNZSKfExuhzbyGz4f2cr78PgCpNkut_31IHePw,3602
|
|
69
|
+
klaude_code/core/tool/file/write_tool.py,sha256=YLQca640fUNA1P95qX52A7I-PaJuReEOLlxRnDcSe44,5414
|
|
82
70
|
klaude_code/core/tool/report_back_tool.py,sha256=KRZzQAIxniwXe58SDJcfK_DCf9TFFAx8XC75wPEjmpY,3246
|
|
83
71
|
klaude_code/core/tool/shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
72
|
klaude_code/core/tool/shell/bash_tool.md,sha256=ILKpnRCBTkU2uSDEdZQjNYo1l6hsM4TO-3RD5zWC61c,3935
|
|
85
|
-
klaude_code/core/tool/shell/bash_tool.py,sha256=
|
|
73
|
+
klaude_code/core/tool/shell/bash_tool.py,sha256=NSWXU_MzKqJBtkljOPNWGTwtAZwxMrCF-y8GC5MysFI,14465
|
|
86
74
|
klaude_code/core/tool/shell/command_safety.py,sha256=bGsooLovuzq8WmLcZ2v24AVBDj3bZv2p4GSL0IlixvM,13192
|
|
75
|
+
klaude_code/core/tool/skill/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
76
|
+
klaude_code/core/tool/skill/skill_tool.md,sha256=UfjJK5EGAd3mf7ym5rIrRdPyV3kBTxNnwzOjNnHOBrE,973
|
|
77
|
+
klaude_code/core/tool/skill/skill_tool.py,sha256=QLcweYEfO-ncv2tdPSqANZrq2U651AG4RjGpFKeAweY,2880
|
|
87
78
|
klaude_code/core/tool/sub_agent_tool.py,sha256=5n0HDxv4cUzuwBhYiAe3gIJ0s3QgV4GSV12CIIkD_g0,3190
|
|
88
79
|
klaude_code/core/tool/todo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
89
80
|
klaude_code/core/tool/todo/todo_write_tool.md,sha256=BFP9qIkzkakzskHwIOPVtDhehkh0F90A5oosyDuC_BE,1682
|
|
@@ -127,10 +118,10 @@ klaude_code/llm/responses/client.py,sha256=XEsVehevQJ0WFbEVxIkI-su7VwIcaeq0P9eSr
|
|
|
127
118
|
klaude_code/llm/responses/input.py,sha256=qr61LmQJdcb_f-ofrAz06WpK_k4PEcI36XsyuZAXbKk,6805
|
|
128
119
|
klaude_code/llm/usage.py,sha256=cq6yZNSKBhRVVjFqBYJQrK3mw9ZSLXaTpbDeal-BjBQ,4205
|
|
129
120
|
klaude_code/protocol/__init__.py,sha256=aGUgzhYqvhuT3Mk2vj7lrHGriH4h9TSbqV1RsRFAZjQ,194
|
|
130
|
-
klaude_code/protocol/commands.py,sha256=
|
|
121
|
+
klaude_code/protocol/commands.py,sha256=GN6GX9fo7YYtfumrBTpOmOvZofsnzZN2SAxP2X0BjTk,644
|
|
131
122
|
klaude_code/protocol/events.py,sha256=KUMf1rLNdHQO9cZiQ9Pa1VsKkP1PTMbUkp18bu_jGy8,3935
|
|
132
123
|
klaude_code/protocol/llm_param.py,sha256=cb4ubLq21PIsMOC8WJb0aid12z_sT1b7FsbNJMr-jLg,4255
|
|
133
|
-
klaude_code/protocol/model.py,sha256=
|
|
124
|
+
klaude_code/protocol/model.py,sha256=4ZJhB5PRXSZiMv6tFt8YoB4bBMNDQ0s9BcT3WqDu980,13435
|
|
134
125
|
klaude_code/protocol/op.py,sha256=X3UeXxBOLf_jkEaYXhQSTpjtUV2u1Ot5f4bbPWNdQp4,4241
|
|
135
126
|
klaude_code/protocol/op_handler.py,sha256=qaWrm2rlskSyF7ukPtxFAKf8brgLsUaVzg6035N-7w0,1565
|
|
136
127
|
klaude_code/protocol/sub_agent/__init__.py,sha256=Abap5lPLgnSCQsVD3axfeqnj2UtxOcDLGX8e9HugfSU,3964
|
|
@@ -138,14 +129,23 @@ klaude_code/protocol/sub_agent/explore.py,sha256=Z4M7i98XBLew38ClXiW-hJteSYjMUu2
|
|
|
138
129
|
klaude_code/protocol/sub_agent/oracle.py,sha256=0cbuutKQcvwaM--Q15mbkCdbpZMF4YjxDN1jkuGVKp4,3344
|
|
139
130
|
klaude_code/protocol/sub_agent/task.py,sha256=fvj4i1vfWXivStQ-9urDS40wTWkmNRvl6D-A0exExJg,3608
|
|
140
131
|
klaude_code/protocol/sub_agent/web.py,sha256=Z5vUM367kz8CIexN6UVPG4XxzVOaaRek-Ga64NvcZdk,3043
|
|
141
|
-
klaude_code/protocol/tools.py,sha256=
|
|
132
|
+
klaude_code/protocol/tools.py,sha256=OpGCr47ARKaCHcIlljhEN-p-2h4djgbP5jtfTIoKB-A,359
|
|
142
133
|
klaude_code/session/__init__.py,sha256=oXcDA5w-gJCbzmlF8yuWy3ezIW9DgFBNUs-gJHUJ-Rc,121
|
|
143
134
|
klaude_code/session/codec.py,sha256=ummbqT7t6uHHXtaS9lOkyhi1h0YpMk7SNSms8DyGAHU,2015
|
|
144
|
-
klaude_code/session/export.py,sha256=
|
|
135
|
+
klaude_code/session/export.py,sha256=_xJGVHSjaVbDOLR5yrYUoVFuY4oIKyq5gNq_jupuVkc,29303
|
|
145
136
|
klaude_code/session/selector.py,sha256=gijwWQkSV20XYP3Fxr27mFXuqP4ChY2DQm_YuBOTQKw,2888
|
|
146
137
|
klaude_code/session/session.py,sha256=LDrRlxv35_jJGwxv6Lv_WdBYNY2UZZAZ4vippq8pN_o,16016
|
|
147
|
-
klaude_code/session/store.py,sha256
|
|
148
|
-
klaude_code/session/templates/export_session.html,sha256=
|
|
138
|
+
klaude_code/session/store.py,sha256=-e-lInCB3N1nFLlet7bipkmPk1PXmGthuMxv5z3hg5o,6953
|
|
139
|
+
klaude_code/session/templates/export_session.html,sha256=bA27AkcC7DQRoWmcMBeaR8WOx1z76hezEDf0aYH-0HQ,119780
|
|
140
|
+
klaude_code/skill/__init__.py,sha256=yeWeCfRGPOhT4mx_pjdo4fLondQ_Vx0edBtnFusLhls,839
|
|
141
|
+
klaude_code/skill/assets/deslop/SKILL.md,sha256=XMBER6gOyYnZof_u7l30CZSzmDcINe8XP-n_loah0EQ,873
|
|
142
|
+
klaude_code/skill/assets/dev-docs/SKILL.md,sha256=eHI9v44KZAOcptlnAVp2aq2Ms7WGhncm-zmGUPGmhU8,3810
|
|
143
|
+
klaude_code/skill/assets/handoff/SKILL.md,sha256=GDHrEqWUeAQy7gGhha_y5jzjpv8C-xhk0hqMH5h59v8,1712
|
|
144
|
+
klaude_code/skill/assets/jj-workspace/SKILL.md,sha256=toxoyrBBoGl9Yv4PYrw_gD071LLZ2RoepUR8qTDRn1M,977
|
|
145
|
+
klaude_code/skill/assets/skill-creator/SKILL.md,sha256=0ByoWb9ao0UKSoM5Tmz-Qe5CAPliTrVpUK0gPd9TFqo,5520
|
|
146
|
+
klaude_code/skill/loader.py,sha256=3xGh4udco7tXlrnGFh4Kr5yljtadJ391jKYjaQ2Z3js,10534
|
|
147
|
+
klaude_code/skill/manager.py,sha256=XRSGgGpNJo2Q9pHKpWo-VyMqf_y-dEt9JGtDoC3Eq-U,2088
|
|
148
|
+
klaude_code/skill/system_skills.py,sha256=cfhxk5Jc1OFip-Lamr6RwlAEPq-UA60M3NdwSneKGco,6124
|
|
149
149
|
klaude_code/trace/__init__.py,sha256=q8uOYhWr2_Mia1aEK_vkqx91YAfFM25ItIB6J8n3_pM,352
|
|
150
150
|
klaude_code/trace/log.py,sha256=0H_RqkytSpt6AAIFDg-MV_8vA9zsR9BB1UqT6moTTTg,9134
|
|
151
151
|
klaude_code/ui/__init__.py,sha256=XuEQsFUkJet8HI04cRmNLwnHOUqaPCRy4hF7PJnIfCY,2737
|
|
@@ -160,32 +160,32 @@ klaude_code/ui/modes/exec/__init__.py,sha256=RsYa-DmDJj6g7iXb4H9mm2_Cu-KDQOD10RJ
|
|
|
160
160
|
klaude_code/ui/modes/exec/display.py,sha256=m2kkgaUoGD9rEVUmcm7Vs_PyAI2iruKCJYRhANjSsKo,1965
|
|
161
161
|
klaude_code/ui/modes/repl/__init__.py,sha256=35a6SUiL1SDi2i43X2VjHQw97rR7yhbLBzkGI5aC6Bc,1526
|
|
162
162
|
klaude_code/ui/modes/repl/clipboard.py,sha256=ZCpk7kRSXGhh0Q_BWtUUuSYT7ZOqRjAoRcg9T9n48Wo,5137
|
|
163
|
-
klaude_code/ui/modes/repl/completers.py,sha256=
|
|
163
|
+
klaude_code/ui/modes/repl/completers.py,sha256=GIvUS9TAFMMPDpoXLuIupEccoqIMEpSEw4IZmKjVo4c,28560
|
|
164
164
|
klaude_code/ui/modes/repl/display.py,sha256=0u4ISeOoYjynF7InYyV-PMOZqP44QBbjYOLOL18V0c0,2245
|
|
165
|
-
klaude_code/ui/modes/repl/event_handler.py,sha256=
|
|
166
|
-
klaude_code/ui/modes/repl/input_prompt_toolkit.py,sha256=
|
|
165
|
+
klaude_code/ui/modes/repl/event_handler.py,sha256=RRcufuJU8zD7hJes0HDq85lpLn1Q85XetN6x3iLO8fM,23357
|
|
166
|
+
klaude_code/ui/modes/repl/input_prompt_toolkit.py,sha256=pSephISw0nT4cMcGrVMIks0NJevORxPrHOikbdhmgMY,8082
|
|
167
167
|
klaude_code/ui/modes/repl/key_bindings.py,sha256=Fxz9Ey2SnOHvfleMeSYVduxuofY0Yo-97hMRs-OMe-o,7800
|
|
168
168
|
klaude_code/ui/modes/repl/renderer.py,sha256=YJAF3Cx2fmyrmGOHLVRvUlXvlRR8ptYZtngR50Vg7uY,11639
|
|
169
169
|
klaude_code/ui/renderers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
170
|
-
klaude_code/ui/renderers/assistant.py,sha256=
|
|
171
|
-
klaude_code/ui/renderers/common.py,sha256=
|
|
172
|
-
klaude_code/ui/renderers/developer.py,sha256=
|
|
173
|
-
klaude_code/ui/renderers/diffs.py,sha256=
|
|
170
|
+
klaude_code/ui/renderers/assistant.py,sha256=aYBE0l07G28ij0Nq6Ey8q2d4cvubcdIDKORaPbOa9fI,743
|
|
171
|
+
klaude_code/ui/renderers/common.py,sha256=5RdXC3ngtlhfmxRlbwOPtHtbXhAoWwbHoGX78tZcaTc,2284
|
|
172
|
+
klaude_code/ui/renderers/developer.py,sha256=CawltuPSt_8s5lLoYKWYD9htwORbjgHeb4Ap0L2q7R4,6881
|
|
173
|
+
klaude_code/ui/renderers/diffs.py,sha256=A37Wuz1_UIg0-st5le68-DRGz4-kot6N-wy9xEMKdz0,10403
|
|
174
174
|
klaude_code/ui/renderers/errors.py,sha256=o9pOHRqZ0nxMPwkmV4CG81X7taW1-izvga6RY3fFRMI,516
|
|
175
|
-
klaude_code/ui/renderers/metadata.py,sha256=
|
|
175
|
+
klaude_code/ui/renderers/metadata.py,sha256=pIMdc1BItuGnORlMMmpjAYZy3g_vTKKjQAckHx53lr8,8305
|
|
176
176
|
klaude_code/ui/renderers/sub_agent.py,sha256=grQ_9G_7iYHdCpxrM0qDAKEMQfXcxBv0bI0GPe3s0lE,4961
|
|
177
|
-
klaude_code/ui/renderers/thinking.py,sha256=
|
|
178
|
-
klaude_code/ui/renderers/tools.py,sha256=
|
|
179
|
-
klaude_code/ui/renderers/user_input.py,sha256=
|
|
177
|
+
klaude_code/ui/renderers/thinking.py,sha256=XFq-J4cXlZQFqJFUohM8Xv0fOauJqQgiQ3KDiwSIUiw,1769
|
|
178
|
+
klaude_code/ui/renderers/tools.py,sha256=ZNopwuvF_4DNCuqFegtHqv0K7RzAoh6LhtK3Sg1LXkI,21291
|
|
179
|
+
klaude_code/ui/renderers/user_input.py,sha256=e2hZS7UUnzQuQ6UqzSKRDkFJMkKTLUoub1JclHMX40g,3941
|
|
180
180
|
klaude_code/ui/rich/__init__.py,sha256=zEZjnHR3Fnv_sFMxwIMjoJfwDoC4GRGv3lHJzAGRq_o,236
|
|
181
181
|
klaude_code/ui/rich/cjk_wrap.py,sha256=ncmifgTwF6q95iayHQyazGbntt7BRQb_Ed7aXc8JU6Y,7551
|
|
182
182
|
klaude_code/ui/rich/code_panel.py,sha256=MdUP4QSaQJQxX0MQJT0pvrkhpGYZx3gWdIRbZT_Uj_I,3938
|
|
183
183
|
klaude_code/ui/rich/live.py,sha256=Uid0QAZG7mHb4KrCF8p9c9n1nHLHzW75xSqcLZ4bLWY,2098
|
|
184
|
-
klaude_code/ui/rich/markdown.py,sha256=
|
|
184
|
+
klaude_code/ui/rich/markdown.py,sha256=fdfJcXPa0tc0Cafo4xqt6rGo8SKCL2CyPA5--AcsntU,11410
|
|
185
185
|
klaude_code/ui/rich/quote.py,sha256=tZcxN73SfDBHF_qk0Jkh9gWBqPBn8VLp9RF36YRdKEM,1123
|
|
186
186
|
klaude_code/ui/rich/searchable_text.py,sha256=DCVZgEFv7_ergAvT2v7XrfQAUXUzhmAwuVAchlIx8RY,2448
|
|
187
|
-
klaude_code/ui/rich/status.py,sha256=
|
|
188
|
-
klaude_code/ui/rich/theme.py,sha256=
|
|
187
|
+
klaude_code/ui/rich/status.py,sha256=SNJVLHTYn3IScm5jkQc6LW3fO-HxXaj_FmGYUvkem9Q,9500
|
|
188
|
+
klaude_code/ui/rich/theme.py,sha256=ru40YDV79RxeskZzIpgHPf3J4Ol70HMqbLPHU-s7iG8,11288
|
|
189
189
|
klaude_code/ui/terminal/__init__.py,sha256=GIMnsEcIAGT_vBHvTlWEdyNmAEpruyscUA6M_j3GQZU,1412
|
|
190
190
|
klaude_code/ui/terminal/color.py,sha256=M-i09DVlLAhAyhQjfeAi7OipoGi1p_OVkaZxeRfykY0,7135
|
|
191
191
|
klaude_code/ui/terminal/control.py,sha256=6SGNwxorP3jMW9xqnZy2BC0OsJd4DSrS13O3t6YlZzs,4916
|
|
@@ -193,7 +193,7 @@ klaude_code/ui/terminal/notifier.py,sha256=wkRM66d98Oh6PujnN4bB7NiQxIYEHqQXverMK
|
|
|
193
193
|
klaude_code/ui/terminal/progress_bar.py,sha256=MDnhPbqCnN4GDgLOlxxOEVZPDwVC_XL2NM5sl1MFNcQ,2133
|
|
194
194
|
klaude_code/ui/utils/__init__.py,sha256=YEsCLjbCPaPza-UXTPUMTJTrc9BmNBUP5CbFWlshyOQ,15
|
|
195
195
|
klaude_code/ui/utils/common.py,sha256=tqHqwgLtAyP805kwRFyoAL4EgMutcNb3Y-GAXJ4IeuM,2263
|
|
196
|
-
klaude_code-1.2.
|
|
197
|
-
klaude_code-1.2.
|
|
198
|
-
klaude_code-1.2.
|
|
199
|
-
klaude_code-1.2.
|
|
196
|
+
klaude_code-1.2.23.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
197
|
+
klaude_code-1.2.23.dist-info/entry_points.txt,sha256=7CWKjolvs6dZiYHpelhA_FRJ-sVDh43eu3iWuOhKc_w,53
|
|
198
|
+
klaude_code-1.2.23.dist-info/METADATA,sha256=3CSrp2lOoq2vot5oktv0RZZnlGPoSSX5qaahIdDyY8M,7725
|
|
199
|
+
klaude_code-1.2.23.dist-info/RECORD,,
|
klaude_code/command/diff_cmd.py
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import subprocess
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
|
|
4
|
-
from klaude_code.command.command_abc import Agent, CommandABC, CommandResult
|
|
5
|
-
from klaude_code.protocol import commands, events, model
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class DiffCommand(CommandABC):
|
|
9
|
-
"""Show git diff for the current repository."""
|
|
10
|
-
|
|
11
|
-
@property
|
|
12
|
-
def name(self) -> commands.CommandName:
|
|
13
|
-
return commands.CommandName.DIFF
|
|
14
|
-
|
|
15
|
-
@property
|
|
16
|
-
def summary(self) -> str:
|
|
17
|
-
return "Show git diff"
|
|
18
|
-
|
|
19
|
-
async def run(self, agent: Agent, user_input: model.UserInputPayload) -> CommandResult:
|
|
20
|
-
del user_input # unused
|
|
21
|
-
try:
|
|
22
|
-
# Check if current directory is in a git repository
|
|
23
|
-
git_check = subprocess.run(
|
|
24
|
-
["git", "rev-parse", "--is-inside-work-tree"],
|
|
25
|
-
cwd=Path.cwd(),
|
|
26
|
-
capture_output=True,
|
|
27
|
-
text=True,
|
|
28
|
-
timeout=5.0,
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
if git_check.returncode != 0:
|
|
32
|
-
# Not in a git repository
|
|
33
|
-
event = events.DeveloperMessageEvent(
|
|
34
|
-
session_id=agent.session.id,
|
|
35
|
-
item=model.DeveloperMessageItem(
|
|
36
|
-
content="No in a git repo",
|
|
37
|
-
command_output=model.CommandOutput(command_name=self.name, is_error=True),
|
|
38
|
-
),
|
|
39
|
-
)
|
|
40
|
-
return CommandResult(events=[event])
|
|
41
|
-
|
|
42
|
-
# Run git diff in current directory
|
|
43
|
-
result = subprocess.run(
|
|
44
|
-
["git", "diff", "HEAD"],
|
|
45
|
-
cwd=Path.cwd(),
|
|
46
|
-
capture_output=True,
|
|
47
|
-
text=True,
|
|
48
|
-
timeout=10.0,
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
if result.returncode != 0:
|
|
52
|
-
# Git command failed
|
|
53
|
-
error_msg = result.stderr.strip() or "git diff command failed"
|
|
54
|
-
event = events.DeveloperMessageEvent(
|
|
55
|
-
session_id=agent.session.id,
|
|
56
|
-
item=model.DeveloperMessageItem(
|
|
57
|
-
content=f"Error: {error_msg}",
|
|
58
|
-
command_output=model.CommandOutput(command_name=self.name, is_error=True),
|
|
59
|
-
),
|
|
60
|
-
)
|
|
61
|
-
return CommandResult(events=[event])
|
|
62
|
-
|
|
63
|
-
diff_output = result.stdout.strip()
|
|
64
|
-
|
|
65
|
-
# Get untracked files
|
|
66
|
-
untracked_result = subprocess.run(
|
|
67
|
-
["git", "ls-files", "--others", "--exclude-standard"],
|
|
68
|
-
cwd=Path.cwd(),
|
|
69
|
-
capture_output=True,
|
|
70
|
-
text=True,
|
|
71
|
-
timeout=10.0,
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
untracked_files = untracked_result.stdout.strip()
|
|
75
|
-
|
|
76
|
-
# Combine diff output and untracked files
|
|
77
|
-
output_parts: list[str] = []
|
|
78
|
-
|
|
79
|
-
if diff_output:
|
|
80
|
-
output_parts.append(diff_output)
|
|
81
|
-
|
|
82
|
-
if untracked_files:
|
|
83
|
-
untracked_lines = untracked_files.split("\n")
|
|
84
|
-
untracked_section = "git ls-files --others --exclude-standard\n" + "\n".join(
|
|
85
|
-
f"{file}" for file in untracked_lines
|
|
86
|
-
)
|
|
87
|
-
output_parts.append(untracked_section)
|
|
88
|
-
|
|
89
|
-
if not output_parts:
|
|
90
|
-
# No changes and no untracked files
|
|
91
|
-
event = events.DeveloperMessageEvent(
|
|
92
|
-
session_id=agent.session.id,
|
|
93
|
-
item=model.DeveloperMessageItem(
|
|
94
|
-
content="", command_output=model.CommandOutput(command_name=self.name)
|
|
95
|
-
),
|
|
96
|
-
)
|
|
97
|
-
return CommandResult(events=[event])
|
|
98
|
-
|
|
99
|
-
# Has changes or untracked files
|
|
100
|
-
combined_output = "\n\n".join(output_parts)
|
|
101
|
-
event = events.DeveloperMessageEvent(
|
|
102
|
-
session_id=agent.session.id,
|
|
103
|
-
item=model.DeveloperMessageItem(
|
|
104
|
-
content=combined_output,
|
|
105
|
-
command_output=model.CommandOutput(command_name=self.name),
|
|
106
|
-
),
|
|
107
|
-
)
|
|
108
|
-
return CommandResult(events=[event])
|
|
109
|
-
|
|
110
|
-
except subprocess.TimeoutExpired:
|
|
111
|
-
event = events.DeveloperMessageEvent(
|
|
112
|
-
session_id=agent.session.id,
|
|
113
|
-
item=model.DeveloperMessageItem(
|
|
114
|
-
content="Error: git diff command timeout",
|
|
115
|
-
command_output=model.CommandOutput(command_name=self.name, is_error=True),
|
|
116
|
-
),
|
|
117
|
-
)
|
|
118
|
-
return CommandResult(events=[event])
|
|
119
|
-
except FileNotFoundError:
|
|
120
|
-
event = events.DeveloperMessageEvent(
|
|
121
|
-
session_id=agent.session.id,
|
|
122
|
-
item=model.DeveloperMessageItem(
|
|
123
|
-
content="Error: git command not found",
|
|
124
|
-
command_output=model.CommandOutput(command_name=self.name, is_error=True),
|
|
125
|
-
),
|
|
126
|
-
)
|
|
127
|
-
return CommandResult(events=[event])
|
|
128
|
-
except Exception as e:
|
|
129
|
-
event = events.DeveloperMessageEvent(
|
|
130
|
-
session_id=agent.session.id,
|
|
131
|
-
item=model.DeveloperMessageItem(
|
|
132
|
-
content=f"Error:{e}",
|
|
133
|
-
command_output=model.CommandOutput(command_name=self.name, is_error=True),
|
|
134
|
-
),
|
|
135
|
-
)
|
|
136
|
-
return CommandResult(events=[event])
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Remove AI code slop
|
|
3
|
-
from: https://cursor.com/cn/link/command?name=deslop&text=%23%20Remove%20AI%20code%20slop%0A%0ACheck%20the%20diff%20against%20main%2C%20and%20remove%20all%20AI%20generated%20slop%20introduced%20in%20this%20branch.%0A%0AThis%20includes%3A%0A-%20Extra%20comments%20that%20a%20human%20wouldn%27t%20add%20or%20is%20inconsistent%20with%20the%20rest%20of%20the%20file%0A-%20Extra%20defensive%20checks%20or%20try%2Fcatch%20blocks%20that%20are%20abnormal%20for%20that%20area%20of%20the%20codebase%20(especially%20if%20called%20by%20trusted%20%2F%20validated%20codepaths)%0A-%20Casts%20to%20any%20to%20get%20around%20type%20issues%0A-%20Any%20other%20style%20that%20is%20inconsistent%20with%20the%20file%0A%0AReport%20at%20the%20end%20with%20only%20a%201-3%20sentence%20summary%20of%20what%20you%20changed
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Check the diff against main, and remove all AI generated slop introduced in this branch.
|
|
7
|
-
|
|
8
|
-
This includes:
|
|
9
|
-
- Extra comments that a human wouldn't add or is inconsistent with the rest of the file
|
|
10
|
-
- Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted / validated codepaths)
|
|
11
|
-
- Casts to any to get around type issues
|
|
12
|
-
- Any other style that is inconsistent with the file
|
|
13
|
-
|
|
14
|
-
Report at the end with only a 1-3 sentence summary of what you changed
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Update dev documentation before context compaction
|
|
3
|
-
from: https://github.com/diet103/claude-code-infrastructure-showcase/blob/main/.claude/commands/dev-docs-update.md
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
We're approaching context limits. Please update the development documentation to ensure seamless continuation after context reset.
|
|
7
|
-
|
|
8
|
-
## Required Updates
|
|
9
|
-
|
|
10
|
-
### 1. Update Active Task Documentation
|
|
11
|
-
For each task in `/dev/active/`:
|
|
12
|
-
- Update `[task-name]-context.md` with:
|
|
13
|
-
- Current implementation state
|
|
14
|
-
- Key decisions made this session
|
|
15
|
-
- Files modified and why
|
|
16
|
-
- Any blockers or issues discovered
|
|
17
|
-
- Next immediate steps
|
|
18
|
-
- Last Updated timestamp
|
|
19
|
-
|
|
20
|
-
- Update `[task-name]-tasks.md` with:
|
|
21
|
-
- Mark completed tasks as ✅
|
|
22
|
-
- Add any new tasks discovered
|
|
23
|
-
- Update in-progress tasks with current status
|
|
24
|
-
- Reorder priorities if needed
|
|
25
|
-
|
|
26
|
-
### 2. Capture Session Context
|
|
27
|
-
Include any relevant information about:
|
|
28
|
-
- Complex problems solved
|
|
29
|
-
- Architectural decisions made
|
|
30
|
-
- Tricky bugs found and fixed
|
|
31
|
-
- Integration points discovered
|
|
32
|
-
- Testing approaches used
|
|
33
|
-
- Performance optimizations made
|
|
34
|
-
|
|
35
|
-
### 3. Update Memory (if applicable)
|
|
36
|
-
- Store any new patterns or solutions in project memory/documentation
|
|
37
|
-
- Update entity relationships discovered
|
|
38
|
-
- Add observations about system behavior
|
|
39
|
-
|
|
40
|
-
### 4. Document Unfinished Work
|
|
41
|
-
- What was being worked on when context limit approached
|
|
42
|
-
- Exact state of any partially completed features
|
|
43
|
-
- Commands that need to be run on restart
|
|
44
|
-
- Any temporary workarounds that need permanent fixes
|
|
45
|
-
|
|
46
|
-
### 5. Create Handoff Notes
|
|
47
|
-
If switching to a new conversation:
|
|
48
|
-
- Exact file and line being edited
|
|
49
|
-
- The goal of current changes
|
|
50
|
-
- Any uncommitted changes that need attention
|
|
51
|
-
- Test commands to verify work
|
|
52
|
-
|
|
53
|
-
## Additional Context:
|
|
54
|
-
$ARGUMENTS
|
|
55
|
-
|
|
56
|
-
**Priority**: Focus on capturing information that would be hard to rediscover or reconstruct from code alone.
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Create a comprehensive strategic plan with structured task breakdown
|
|
3
|
-
from: https://github.com/diet103/claude-code-infrastructure-showcase/blob/main/.claude/commands/dev-docs.md
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Create a comprehensive, actionable plan for:
|
|
7
|
-
$ARGUMENTS
|
|
8
|
-
|
|
9
|
-
## Instructions
|
|
10
|
-
|
|
11
|
-
1. **Analyze the request** and determine the scope of planning needed
|
|
12
|
-
2. **Examine relevant files** in the codebase to understand current state
|
|
13
|
-
3. **Create a structured plan** with:
|
|
14
|
-
- Executive Summary
|
|
15
|
-
- Current State Analysis
|
|
16
|
-
- Proposed Future State
|
|
17
|
-
- Implementation Phases (broken into sections)
|
|
18
|
-
- Detailed Tasks (actionable items with clear acceptance criteria)
|
|
19
|
-
- Risk Assessment and Mitigation Strategies
|
|
20
|
-
- Success Metrics
|
|
21
|
-
- Required Resources and Dependencies
|
|
22
|
-
- Timeline Estimates
|
|
23
|
-
|
|
24
|
-
4. **Task Breakdown Structure**:
|
|
25
|
-
- Each major section represents a phase or component
|
|
26
|
-
- Number and prioritize tasks within sections
|
|
27
|
-
- Include clear acceptance criteria for each task
|
|
28
|
-
- Specify dependencies between tasks
|
|
29
|
-
- Estimate effort levels (S/M/L/XL)
|
|
30
|
-
|
|
31
|
-
5. **Create task management structure**:
|
|
32
|
-
- Create directory: `dev/active/[task-name]/` (relative to project root)
|
|
33
|
-
- Generate three files:
|
|
34
|
-
- `[task-name]-plan.md` - The comprehensive plan
|
|
35
|
-
- `[task-name]-context.md` - Key files, decisions, dependencies
|
|
36
|
-
- `[task-name]-tasks.md` - Checklist format for tracking progress
|
|
37
|
-
- Include "Last Updated: YYYY-MM-DD" in each file
|
|
38
|
-
|
|
39
|
-
6. **Stop and Consult**: Pause and negotiate the plan with the user.
|
|
40
|
-
|
|
41
|
-
## Quality Standards
|
|
42
|
-
- Plans must be self-contained with all necessary context
|
|
43
|
-
- Use clear, actionable language
|
|
44
|
-
- Include specific technical details where relevant
|
|
45
|
-
- Consider both technical and business perspectives
|
|
46
|
-
- Account for potential risks and edge cases
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Write a HANDOFF.md for another agent to continue the conversation
|
|
3
|
-
from: amp-cli https://ampcode.com/manual#handoff
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Write a HANDOFF.md file in the current working directory for another agent to continue this conversation.
|
|
7
|
-
|
|
8
|
-
Extract relevant context from the conversation above to facilitate continuing this work. Write from my perspective (first person: "I did...", "I told you...").
|
|
9
|
-
|
|
10
|
-
Consider what would be useful to know based on my request below. Relevant questions include:
|
|
11
|
-
- What did I just do or implement?
|
|
12
|
-
- What instructions did I give you that are still relevant (e.g., follow patterns in the codebase)?
|
|
13
|
-
- Did I provide a plan or spec that should be included?
|
|
14
|
-
- What important information did I share (certain libraries, patterns, constraints, preferences)?
|
|
15
|
-
- What key technical details did I discover (APIs, methods, patterns)?
|
|
16
|
-
- What caveats, limitations, or open questions remain?
|
|
17
|
-
|
|
18
|
-
Extract only what matters for the specific request below. Skip irrelevant questions. Choose an appropriate length based on the complexity of the request.
|
|
19
|
-
|
|
20
|
-
Focus on capabilities and behavior, not file-by-file changes. Avoid excessive implementation details (variable names, storage keys, constants) unless critical.
|
|
21
|
-
|
|
22
|
-
Format: Plain text with bullets. No markdown headers, no bold/italic, no code fences. Use workspace-relative paths for files.
|
|
23
|
-
|
|
24
|
-
List file or directory paths (workspace-relative) relevant to accomplishing the goal in the following format:
|
|
25
|
-
<example>
|
|
26
|
-
@src/project/main.py
|
|
27
|
-
@src/project/llm/
|
|
28
|
-
</example>
|
|
29
|
-
|
|
30
|
-
My request:
|
|
31
|
-
$ARGUMENTS
|
|
32
|
-
|
|
33
|
-
<system>If the request section is empty, ask for clarification about the goal</system>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Create a jj workspace before starting work to enable parallel Clauding
|
|
3
|
-
---
|
|
4
|
-
<task>
|
|
5
|
-
$ARGUMENTS
|
|
6
|
-
</task>
|
|
7
|
-
<system>
|
|
8
|
-
You are now in jj-workspace mode. Before working on any task, you MUST first create a dedicated jj workspace. This allows multiple Claude sessions to work in parallel without conflicts.
|
|
9
|
-
|
|
10
|
-
If the <task> above is empty, inform the user that you are ready to work in jj-workspace mode and waiting for a task description. Once provided, follow the steps below.
|
|
11
|
-
|
|
12
|
-
When a task is provided, follow these steps:
|
|
13
|
-
1. Generate a short, descriptive workspace name based on the task (e.g., `workspace-add-login` or `workspace-fix-typo`)
|
|
14
|
-
2. Run `jj workspace add <workspace-name>` to create the workspace
|
|
15
|
-
3. Change into the workspace directory: `cd <workspace-name>`
|
|
16
|
-
4. Describe the change: `jj describe -m '<brief task description>'`
|
|
17
|
-
5. Continue all subsequent work within this workspace directory
|
|
18
|
-
</system>
|