tunacode-cli 0.0.31__py3-none-any.whl → 0.0.33__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.
Potentially problematic release.
This version of tunacode-cli might be problematic. Click here for more details.
- tunacode/cli/commands.py +4 -4
- tunacode/cli/repl.py +7 -3
- tunacode/configuration/defaults.py +1 -1
- tunacode/constants.py +1 -1
- tunacode/core/agents/main.py +7 -2
- {tunacode_cli-0.0.31.dist-info → tunacode_cli-0.0.33.dist-info}/METADATA +1 -1
- {tunacode_cli-0.0.31.dist-info → tunacode_cli-0.0.33.dist-info}/RECORD +11 -13
- {tunacode_cli-0.0.31.dist-info → tunacode_cli-0.0.33.dist-info}/top_level.txt +0 -1
- api/auth.py +0 -13
- api/users.py +0 -8
- {tunacode_cli-0.0.31.dist-info → tunacode_cli-0.0.33.dist-info}/WHEEL +0 -0
- {tunacode_cli-0.0.31.dist-info → tunacode_cli-0.0.33.dist-info}/entry_points.txt +0 -0
- {tunacode_cli-0.0.31.dist-info → tunacode_cli-0.0.33.dist-info}/licenses/LICENSE +0 -0
tunacode/cli/commands.py
CHANGED
|
@@ -184,8 +184,8 @@ class IterationsCommand(SimpleCommand):
|
|
|
184
184
|
if args:
|
|
185
185
|
try:
|
|
186
186
|
new_limit = int(args[0])
|
|
187
|
-
if new_limit < 1 or new_limit >
|
|
188
|
-
await ui.error("Iterations must be between 1 and
|
|
187
|
+
if new_limit < 1 or new_limit > 100:
|
|
188
|
+
await ui.error("Iterations must be between 1 and 100")
|
|
189
189
|
return
|
|
190
190
|
|
|
191
191
|
# Update the user config
|
|
@@ -198,9 +198,9 @@ class IterationsCommand(SimpleCommand):
|
|
|
198
198
|
except ValueError:
|
|
199
199
|
await ui.error("Please provide a valid number")
|
|
200
200
|
else:
|
|
201
|
-
current = state.user_config.get("settings", {}).get("max_iterations",
|
|
201
|
+
current = state.user_config.get("settings", {}).get("max_iterations", 40)
|
|
202
202
|
await ui.info(f"Current maximum iterations: {current}")
|
|
203
|
-
await ui.muted("Usage: /iterations <number> (1-
|
|
203
|
+
await ui.muted("Usage: /iterations <number> (1-100)")
|
|
204
204
|
|
|
205
205
|
|
|
206
206
|
class ClearCommand(SimpleCommand):
|
tunacode/cli/repl.py
CHANGED
|
@@ -88,12 +88,16 @@ async def _tool_confirm(tool_call, node, state_manager: StateManager):
|
|
|
88
88
|
|
|
89
89
|
async def _tool_handler(part, node, state_manager: StateManager):
|
|
90
90
|
"""Handle tool execution with separated business logic and UI."""
|
|
91
|
-
|
|
91
|
+
# Create tool handler with state first to check if confirmation is needed
|
|
92
|
+
tool_handler = ToolHandler(state_manager)
|
|
93
|
+
|
|
94
|
+
# Only show tool info for tools that require confirmation
|
|
95
|
+
if tool_handler.should_confirm(part.tool_name):
|
|
96
|
+
await ui.info(f"Tool({part.tool_name})")
|
|
97
|
+
|
|
92
98
|
state_manager.session.spinner.stop()
|
|
93
99
|
|
|
94
100
|
try:
|
|
95
|
-
# Create tool handler with state
|
|
96
|
-
tool_handler = ToolHandler(state_manager)
|
|
97
101
|
args = _parse_args(part.args)
|
|
98
102
|
|
|
99
103
|
# Use a synchronous function in run_in_terminal to avoid async deadlocks
|
tunacode/constants.py
CHANGED
tunacode/core/agents/main.py
CHANGED
|
@@ -345,6 +345,11 @@ async def _process_node(
|
|
|
345
345
|
# Check if ALL tools in this node are read-only
|
|
346
346
|
all_read_only = all(part.tool_name in READ_ONLY_TOOLS for part in tool_parts)
|
|
347
347
|
|
|
348
|
+
# TODO: Currently only batches if ALL tools are read-only. Should be updated to use
|
|
349
|
+
# batch_read_only_tools() function to group consecutive read-only tools and execute
|
|
350
|
+
# them in parallel even when mixed with write/execute tools. For example:
|
|
351
|
+
# [read, read, write, read] should execute as: [read||read], [write], [read]
|
|
352
|
+
# instead of all sequential. The batch_read_only_tools() function exists but is unused.
|
|
348
353
|
if all_read_only and len(tool_parts) > 1 and buffering_callback:
|
|
349
354
|
# Execute read-only tools in parallel!
|
|
350
355
|
import time
|
|
@@ -651,8 +656,8 @@ async def process_request(
|
|
|
651
656
|
) -> AgentRun:
|
|
652
657
|
agent = get_or_create_agent(model, state_manager)
|
|
653
658
|
mh = state_manager.session.messages.copy()
|
|
654
|
-
# Get max iterations from config (default:
|
|
655
|
-
max_iterations = state_manager.session.user_config.get("settings", {}).get("max_iterations",
|
|
659
|
+
# Get max iterations from config (default: 40)
|
|
660
|
+
max_iterations = state_manager.session.user_config.get("settings", {}).get("max_iterations", 40)
|
|
656
661
|
fallback_enabled = state_manager.session.user_config.get("settings", {}).get(
|
|
657
662
|
"fallback_response", True
|
|
658
663
|
)
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
api/auth.py,sha256=_ysF1RCXvtJR1S35lbYQZexES1lif4J6VVzEyqNK74Q,303
|
|
2
|
-
api/users.py,sha256=WRcy1Vsr4cEC8CW2qeN3XrA9EMyIk47ufpMyvQ4nLuw,193
|
|
3
1
|
tunacode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
tunacode/constants.py,sha256=
|
|
2
|
+
tunacode/constants.py,sha256=8uIqAbJSTPl8AM_40T6vjrqGDJ2OuxpBcqrWpZCEUeg,4074
|
|
5
3
|
tunacode/context.py,sha256=6sterdRvPOyG3LU0nEAXpBsEPZbO3qtPyTlJBi-_VXE,2612
|
|
6
4
|
tunacode/exceptions.py,sha256=mTWXuWyr1k16CGLWN2tsthDGi7lbx1JK0ekIqogYDP8,3105
|
|
7
5
|
tunacode/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
6
|
tunacode/setup.py,sha256=dYn0NeAxtNIDSogWEmGSyjb9wsr8AonZ8vAo5sw9NIw,1909
|
|
9
7
|
tunacode/types.py,sha256=BciT-uxnQ44iC-4QiDY72OD23LOtqSyMOuK_N0ttlaA,7676
|
|
10
8
|
tunacode/cli/__init__.py,sha256=zgs0UbAck8hfvhYsWhWOfBe5oK09ug2De1r4RuQZREA,55
|
|
11
|
-
tunacode/cli/commands.py,sha256=
|
|
9
|
+
tunacode/cli/commands.py,sha256=U9dP8wbBnSb-J3nKItRCd9wpQz7wD4urBOjLtCvn9Dc,29887
|
|
12
10
|
tunacode/cli/main.py,sha256=PIcFnfmIoI_pmK2y-zB_ouJbzR5fbSI7zsKQNPB_J8o,2406
|
|
13
|
-
tunacode/cli/repl.py,sha256=
|
|
11
|
+
tunacode/cli/repl.py,sha256=o3bn9BYQsy3TFCWJq-fzeHKLrM2KInSrMF5E5_RqSOY,13736
|
|
14
12
|
tunacode/cli/textual_app.py,sha256=14-Nt0IIETmyHBrNn9uwSF3EwCcutwTp6gdoKgNm0sY,12593
|
|
15
13
|
tunacode/cli/textual_bridge.py,sha256=LvqiTtF0hu3gNujzpKaW9h-m6xzEP3OH2M8KL2pCwRc,6333
|
|
16
14
|
tunacode/configuration/__init__.py,sha256=MbVXy8bGu0yKehzgdgZ_mfWlYGvIdb1dY2Ly75nfuPE,17
|
|
17
|
-
tunacode/configuration/defaults.py,sha256=
|
|
15
|
+
tunacode/configuration/defaults.py,sha256=lNeJUW1S8zj4-XTCkMP9UaDc-tHWXLff9K8t0uPA_oE,801
|
|
18
16
|
tunacode/configuration/models.py,sha256=XPobkLM_TzKTuMIWhK-svJfGRGFT9r2LhKEM6rv6QHk,3756
|
|
19
17
|
tunacode/configuration/settings.py,sha256=lm2ov8rG1t4C5JIXMOhIKik5FAsjpuLVYtFmnE1ZQ3k,995
|
|
20
18
|
tunacode/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -22,7 +20,7 @@ tunacode/core/code_index.py,sha256=jgAx3lSWP_DwnyiP5Jkm1YvX4JJyI4teMzlNrJSpEOA,1
|
|
|
22
20
|
tunacode/core/state.py,sha256=PHGCGjx_X03I5jO-T1JkREQm4cwYEXQty59JJlnk24c,1608
|
|
23
21
|
tunacode/core/tool_handler.py,sha256=BPjR013OOO0cLXPdLeL2FDK0ixUwOYu59FfHdcdFhp4,2277
|
|
24
22
|
tunacode/core/agents/__init__.py,sha256=UUJiPYb91arwziSpjd7vIk7XNGA_4HQbsOIbskSqevA,149
|
|
25
|
-
tunacode/core/agents/main.py,sha256=
|
|
23
|
+
tunacode/core/agents/main.py,sha256=bzex6MTucOf95je1XHICSsMRDKew4TUzg9RApceebj4,38203
|
|
26
24
|
tunacode/core/background/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
25
|
tunacode/core/background/manager.py,sha256=rJdl3eDLTQwjbT7VhxXcJbZopCNR3M8ZGMbmeVnwwMc,1126
|
|
28
26
|
tunacode/core/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -70,9 +68,9 @@ tunacode/utils/system.py,sha256=FSoibTIH0eybs4oNzbYyufIiV6gb77QaeY2yGqW39AY,1138
|
|
|
70
68
|
tunacode/utils/text_utils.py,sha256=zRBaorvtyd7HBEWtIfCH1Wce1L6rhsQwpORUEGBFMjA,2981
|
|
71
69
|
tunacode/utils/token_counter.py,sha256=nGCWwrHHFbKywqeDCEuJnADCkfJuzysWiB6cCltJOKI,648
|
|
72
70
|
tunacode/utils/user_configuration.py,sha256=IGvUH37wWtZ4M5xpukZEWYhtuKKyKcl6DaeObGXdleU,2610
|
|
73
|
-
tunacode_cli-0.0.
|
|
74
|
-
tunacode_cli-0.0.
|
|
75
|
-
tunacode_cli-0.0.
|
|
76
|
-
tunacode_cli-0.0.
|
|
77
|
-
tunacode_cli-0.0.
|
|
78
|
-
tunacode_cli-0.0.
|
|
71
|
+
tunacode_cli-0.0.33.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
|
|
72
|
+
tunacode_cli-0.0.33.dist-info/METADATA,sha256=vf_6TFB9fo7MDRHtXDvLKPys_W4E6t_vzNp-cPpRocQ,4023
|
|
73
|
+
tunacode_cli-0.0.33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
74
|
+
tunacode_cli-0.0.33.dist-info/entry_points.txt,sha256=hbkytikj4dGu6rizPuAd_DGUPBGF191RTnhr9wdhORY,51
|
|
75
|
+
tunacode_cli-0.0.33.dist-info/top_level.txt,sha256=lKy2P6BWNi5XSA4DHFvyjQ14V26lDZctwdmhEJrxQbU,9
|
|
76
|
+
tunacode_cli-0.0.33.dist-info/RECORD,,
|
api/auth.py
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import jwt
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def authenticate(username, password):
|
|
5
|
-
# TODO: Add password hashing
|
|
6
|
-
if username == "admin" and password == "admin":
|
|
7
|
-
return generate_token(username)
|
|
8
|
-
return None
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def generate_token(username):
|
|
12
|
-
# TODO: Add expiration
|
|
13
|
-
return jwt.encode({"user": username}, "secret")
|
api/users.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|