Private
Public Access
cruft cleanup part 3
This commit is contained in:
@@ -776,9 +776,6 @@ def _build_anthropic_tools() -> list[ToolDefinition]:
|
||||
_CACHED_ANTHROPIC_TOOLS: Optional[FileItems] = None
|
||||
|
||||
def _get_anthropic_tools() -> list[Metadata]:
|
||||
"""
|
||||
[C: tests/test_bias_efficacy.py:test_bias_efficacy_prompt_generation, tests/test_bias_efficacy.py:test_bias_parameter_nudging, tests/test_bias_integration.py:test_tool_declaration_biasing_anthropic]
|
||||
"""
|
||||
global _CACHED_ANTHROPIC_TOOLS
|
||||
if _CACHED_ANTHROPIC_TOOLS is None:
|
||||
_CACHED_ANTHROPIC_TOOLS = _build_anthropic_tools()
|
||||
@@ -906,8 +903,6 @@ async def _execute_tool_calls_concurrently(
|
||||
|
||||
Thread Boundaries:
|
||||
Runs in the active asyncio event loop thread.
|
||||
|
||||
[C: tests/test_async_tools.py:test_execute_tool_calls_concurrently_exception_handling, tests/test_async_tools.py:test_execute_tool_calls_concurrently_timing]
|
||||
"""
|
||||
monitor = performance_monitor.get_monitor()
|
||||
if monitor.enabled: monitor.start_component("ai_client._execute_tool_calls_concurrently")
|
||||
@@ -2288,7 +2283,6 @@ def _send_deepseek(md_content: str, user_message: str, base_dir: str,
|
||||
stream_callback: Optional[Callable[[str], None]] = None,
|
||||
patch_callback: Optional[Callable[[str, str], Result[str]]] = None) -> Result[str]:
|
||||
"""
|
||||
[C: src/ai_server.py:_handle_send]
|
||||
Functional Purpose: Sends requests to DeepSeek via requests.post API call, managing history repairs and tools.
|
||||
Parameters & Inputs: md_content, user_message, base_dir, file_items, discussion_history, stream, callbacks.
|
||||
Immediate-Mode DAG / Thread Context: Called by: send; Calls: _ensure_deepseek_client, _repair_deepseek_history, requests.post
|
||||
@@ -3277,9 +3271,6 @@ def _run_tier4_patch_generation_result(error: str, file_context: str) -> Result[
|
||||
|
||||
|
||||
def run_tier4_patch_generation(error: str, file_context: str) -> str:
|
||||
"""
|
||||
[C: src/gui_2.py:App.request_patch_from_tier4, tests/test_tier4_patch_generation.py:test_run_tier4_patch_generation_calls_ai, tests/test_tier4_patch_generation.py:test_run_tier4_patch_generation_empty_error, tests/test_tier4_patch_generation.py:test_run_tier4_patch_generation_returns_diff]
|
||||
"""
|
||||
return _run_tier4_patch_generation_result(error, file_context).data
|
||||
|
||||
def _count_gemini_tokens_for_stats_result(md_content: str) -> Result[int]:
|
||||
@@ -3305,9 +3296,6 @@ def _count_gemini_tokens_for_stats_result(md_content: str) -> Result[int]:
|
||||
|
||||
|
||||
def get_token_stats(md_content: str) -> Metadata:
|
||||
"""
|
||||
[C: src/app_controller.py:AppController._refresh_api_metrics]
|
||||
"""
|
||||
global _provider, _gemini_client, _model, _CHARS_PER_TOKEN
|
||||
total_tokens = 0
|
||||
p = str(_provider).lower().strip()
|
||||
@@ -3380,8 +3368,6 @@ def send(
|
||||
Thread Boundaries:
|
||||
Acquires the global _send_lock to synchronize provider calls. Safely called from any worker
|
||||
thread executing background tasks, preventing concurrent thread collisions on shared provider SDK states.
|
||||
|
||||
[C: tests/test_ai_client_result.py:test_send_public_api_returns_result, tests/test_ai_client_result.py:test_send_preserves_errors, tests/test_deprecation_warnings.py:test_send_does_not_emit_deprecation]
|
||||
"""
|
||||
monitor = performance_monitor.get_monitor()
|
||||
if monitor.enabled: monitor.start_component("ai_client.send")
|
||||
@@ -3453,9 +3439,6 @@ def send(
|
||||
return res
|
||||
|
||||
def _add_bleed_derived(d: Metadata, sys_tok: int = 0, tool_tok: int = 0) -> Metadata:
|
||||
"""
|
||||
[C: tests/test_token_viz.py:test_add_bleed_derived_aliases, tests/test_token_viz.py:test_add_bleed_derived_breakdown, tests/test_token_viz.py:test_add_bleed_derived_headroom, tests/test_token_viz.py:test_add_bleed_derived_headroom_clamped_to_zero, tests/test_token_viz.py:test_add_bleed_derived_history_clamped_to_zero, tests/test_token_viz.py:test_add_bleed_derived_would_trim_false, tests/test_token_viz.py:test_add_bleed_derived_would_trim_true, tests/test_token_viz.py:test_would_trim_boundary_exact, tests/test_token_viz.py:test_would_trim_just_above_threshold, tests/test_token_viz.py:test_would_trim_just_below_threshold]
|
||||
"""
|
||||
cur = d.get("current", 0)
|
||||
lim = d.get("limit", 0)
|
||||
d["estimated_prompt_tokens"] = cur
|
||||
@@ -3477,9 +3460,6 @@ if os.environ.get("SLOP_TOOL_PRESET"):
|
||||
#region: Subagent Summarization
|
||||
|
||||
def run_subagent_summarization(file_path: str, content: str, is_code: bool, outline: str) -> str:
|
||||
"""
|
||||
[C: src/summarize.py:summarise_file, tests/test_subagent_summarization.py:test_run_subagent_summarization_anthropic, tests/test_subagent_summarization.py:test_run_subagent_summarization_gemini]
|
||||
"""
|
||||
requests = _require_warmed("requests")
|
||||
genai = _require_warmed("google.genai")
|
||||
types = genai.types
|
||||
|
||||
Reference in New Issue
Block a user