tunacode-cli 0.0.44__py3-none-any.whl → 0.0.46__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/repl.py +14 -7
- tunacode/configuration/defaults.py +0 -1
- tunacode/constants.py +1 -1
- tunacode/core/agents/main.py +288 -342
- tunacode/core/recursive/aggregator.py +2 -2
- tunacode/core/recursive/decomposer.py +1 -1
- tunacode/core/recursive/executor.py +11 -8
- tunacode/ui/input.py +2 -1
- tunacode/ui/keybindings.py +17 -1
- tunacode/ui/panels.py +9 -2
- {tunacode_cli-0.0.44.dist-info → tunacode_cli-0.0.46.dist-info}/METADATA +32 -8
- {tunacode_cli-0.0.44.dist-info → tunacode_cli-0.0.46.dist-info}/RECORD +16 -20
- tunacode/core/agents/dspy_integration.py +0 -223
- tunacode/core/agents/dspy_tunacode.py +0 -458
- tunacode/prompts/dspy_task_planning.md +0 -45
- tunacode/prompts/dspy_tool_selection.md +0 -58
- {tunacode_cli-0.0.44.dist-info → tunacode_cli-0.0.46.dist-info}/WHEEL +0 -0
- {tunacode_cli-0.0.44.dist-info → tunacode_cli-0.0.46.dist-info}/entry_points.txt +0 -0
- {tunacode_cli-0.0.44.dist-info → tunacode_cli-0.0.46.dist-info}/licenses/LICENSE +0 -0
- {tunacode_cli-0.0.44.dist-info → tunacode_cli-0.0.46.dist-info}/top_level.txt +0 -0
tunacode/cli/repl.py
CHANGED
|
@@ -344,7 +344,7 @@ async def process_request(text: str, state_manager: StateManager, output: bool =
|
|
|
344
344
|
except CancelledError:
|
|
345
345
|
await ui.muted(MSG_REQUEST_CANCELLED)
|
|
346
346
|
except UserAbortError:
|
|
347
|
-
await ui.muted(
|
|
347
|
+
await ui.muted(MSG_OPERATION_ABORTED_BY_USER)
|
|
348
348
|
except UnexpectedModelBehavior as e:
|
|
349
349
|
error_message = str(e)
|
|
350
350
|
await ui.muted(error_message)
|
|
@@ -385,9 +385,13 @@ async def repl(state_manager: StateManager):
|
|
|
385
385
|
|
|
386
386
|
state_manager.session.update_token_count()
|
|
387
387
|
context_display = get_context_window_display(state_manager.session.total_tokens, max_tokens)
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
388
|
+
|
|
389
|
+
# Only show startup info if thoughts are enabled or on first run
|
|
390
|
+
if state_manager.session.show_thoughts or not hasattr(state_manager.session, "_startup_shown"):
|
|
391
|
+
await ui.muted(f"• Model: {model_name} • {context_display}")
|
|
392
|
+
await ui.success("Ready to assist")
|
|
393
|
+
await ui.line()
|
|
394
|
+
state_manager.session._startup_shown = True
|
|
391
395
|
|
|
392
396
|
instance = agent.get_or_create_agent(state_manager.session.current_model, state_manager)
|
|
393
397
|
|
|
@@ -459,13 +463,16 @@ async def repl(state_manager: StateManager):
|
|
|
459
463
|
state_manager.session.current_task = get_app().create_background_task(
|
|
460
464
|
process_request(line, state_manager)
|
|
461
465
|
)
|
|
462
|
-
await state_manager.session.current_task
|
|
463
466
|
|
|
464
467
|
state_manager.session.update_token_count()
|
|
465
468
|
context_display = get_context_window_display(
|
|
466
469
|
state_manager.session.total_tokens, state_manager.session.max_tokens
|
|
467
470
|
)
|
|
468
|
-
|
|
471
|
+
# Only show model/context info if thoughts are enabled
|
|
472
|
+
if state_manager.session.show_thoughts:
|
|
473
|
+
await ui.muted(
|
|
474
|
+
f"• Model: {state_manager.session.current_model} • {context_display}"
|
|
475
|
+
)
|
|
469
476
|
|
|
470
477
|
if action == "restart":
|
|
471
478
|
await repl(state_manager)
|
|
@@ -480,7 +487,7 @@ async def repl(state_manager: StateManager):
|
|
|
480
487
|
total_cost = float(session_total.get("cost", 0) or 0)
|
|
481
488
|
|
|
482
489
|
# Only show summary if we have actual token usage
|
|
483
|
-
if total_tokens > 0 or total_cost > 0:
|
|
490
|
+
if state_manager.session.show_thoughts and (total_tokens > 0 or total_cost > 0):
|
|
484
491
|
summary = (
|
|
485
492
|
f"\n[bold cyan]TunaCode Session Summary[/bold cyan]\n"
|
|
486
493
|
f" - Total Tokens: {total_tokens:,}\n"
|
|
@@ -24,7 +24,6 @@ DEFAULT_USER_CONFIG: UserConfig = {
|
|
|
24
24
|
"fallback_response": True,
|
|
25
25
|
"fallback_verbosity": "normal", # Options: minimal, normal, detailed
|
|
26
26
|
"context_window_size": 200000,
|
|
27
|
-
"use_dspy_optimization": True, # Enable DSPy tool selection optimization
|
|
28
27
|
},
|
|
29
28
|
"mcpServers": {},
|
|
30
29
|
}
|
tunacode/constants.py
CHANGED