gemcode 0.3.47__tar.gz → 0.3.49__tar.gz
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.
- {gemcode-0.3.47/src/gemcode.egg-info → gemcode-0.3.49}/PKG-INFO +1 -1
- {gemcode-0.3.47 → gemcode-0.3.49}/pyproject.toml +1 -1
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/agent.py +15 -29
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/cli.py +0 -11
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/config.py +1 -1
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/pricing.py +4 -1
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tui/scrollback.py +0 -55
- {gemcode-0.3.47 → gemcode-0.3.49/src/gemcode.egg-info}/PKG-INFO +1 -1
- {gemcode-0.3.47 → gemcode-0.3.49}/LICENSE +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/MANIFEST.in +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/README.md +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/setup.cfg +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/__init__.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/__main__.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/audit.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/autocompact.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/callbacks.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/capability_routing.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/compaction.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/computer_use/__init__.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/computer_use/browser_computer.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/context_budget.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/context_warning.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/credentials.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/hitl_session.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/hooks.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/intent_classifier.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/interactions.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/invoke.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/kairos_daemon.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/limits.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/live_audio_engine.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/logging_config.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/mcp_loader.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/memory/__init__.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/memory/embedding_memory_service.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/memory/file_memory_service.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/modality_tools.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/model_errors.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/model_routing.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/openapi_loader.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/paths.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/permissions.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/plugins/__init__.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/plugins/terminal_hooks_plugin.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/plugins/tool_recovery_plugin.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/prompt_suggestions.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/query/__init__.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/query/config.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/query/deps.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/query/engine.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/query/stop_hooks.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/query/token_budget.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/query/transitions.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/refine.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/repl_commands.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/repl_slash.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/review_agent.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/session_runtime.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/session_store.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/slash_commands.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/thinking.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tool_prompt_manifest.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tool_registry.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/__init__.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/bash.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/browser.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/edit.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/filesystem.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/notes.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/search.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/shell.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/shell_gate.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/subtask.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/think.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/todo.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools/web.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tools_inspector.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/trust.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tui/input_handler.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tui/spinner.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tui/welcome_banner.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/tui/welcome_rich.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/version.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/vertex.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/web/__init__.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/web/claude_sse_adapter.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/web/terminal_repl.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode/workspace_hints.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode.egg-info/SOURCES.txt +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode.egg-info/dependency_links.txt +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode.egg-info/entry_points.txt +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode.egg-info/requires.txt +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/src/gemcode.egg-info/top_level.txt +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_agent_instruction.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_autocompact.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_capability_routing.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_claude_web_adapter_sse.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_cli_init.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_computer_use_permissions.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_context_budget.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_context_warning.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_credentials.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_interactive_permission_ask.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_kairos_scheduler.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_modality_tools.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_model_error_retry.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_model_errors.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_model_routing.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_paths.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_permissions.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_prompt_suggestions.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_repl_commands.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_repl_slash.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_slash_commands.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_thinking_config.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_token_budget.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_tool_context_circulation.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_tools.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_tools_inspector.py +0 -0
- {gemcode-0.3.47 → gemcode-0.3.49}/tests/test_workspace_hints.py +0 -0
|
@@ -398,33 +398,19 @@ You run locally via the GemCode CLI. You are the same agent the user launched
|
|
|
398
398
|
|
|
399
399
|
## Core identity and approach
|
|
400
400
|
|
|
401
|
-
|
|
401
|
+
Before you respond to anything, **think through what the person is actually trying to achieve**. Not what category their message fits into — what outcome they want, what they already know, and what the most useful response looks like.
|
|
402
402
|
|
|
403
|
-
|
|
404
|
-
and stored it in session state as `_gemcode_intent`. Read it and adapt your behaviour:
|
|
403
|
+
That thinking should drive everything: how much you use tools, how deep you go, how long you reply, what tone you take. A one-line social message deserves a one-line reply. A vague half-formed request might need a clarifying question before acting. A complex multi-file task needs systematic exploration first. A debugging session mid-error needs a hypothesis, not a search. There is no fixed list of intent types — the space of what people ask is open-ended, and your judgment should be too.
|
|
405
404
|
|
|
406
|
-
|
|
407
|
-
|---|---|---|
|
|
408
|
-
| `GREETING` | Social / chitchat | *(You will never see this — handled upstream before reaching you.)* |
|
|
409
|
-
| `CONCEPT` | General knowledge question | Answer from your training knowledge. No tools unless the answer truly requires this repo's files. |
|
|
410
|
-
| `PROJECT_QUESTION` | Question about this codebase | Use 1–2 focused read-only tools (`list_directory`, `read_file`, `grep_content`) to find the answer, then reply concisely. |
|
|
411
|
-
| `ENGINEERING_TASK` | Code modification / fix / build | Full workflow: **Orient → Plan → Execute → Verify**. |
|
|
412
|
-
| `ANALYSIS` | Systematic audit or summarisation | Thorough tool sweep: list → read → grep across the affected area, then synthesise findings. |
|
|
405
|
+
The one hard rule: **only reach for tools when they genuinely serve the response**. If the answer is in your knowledge, give it. If project context is needed, use the minimal set of read-only tools to get it. If you need to execute something, do it. But never open a tool call just to appear busy.
|
|
413
406
|
|
|
414
|
-
|
|
415
|
-
|
|
407
|
+
When you do need to act on the codebase:
|
|
408
|
+
1. **Understand first** — explore with `list_directory`, `glob_files`, `grep_content`, `read_file` before touching anything. These are instant and need no permission.
|
|
409
|
+
2. **Plan for anything complex** — use `todo_write` to structure multi-step work before starting.
|
|
410
|
+
3. **Execute completely** — don't stop at the first success. Finish the whole task.
|
|
411
|
+
4. **Verify before you call it done** — check your own work.
|
|
416
412
|
|
|
417
|
-
|
|
418
|
-
response to a greeting or a simple general question that requires no project context.**
|
|
419
|
-
|
|
420
|
-
### Engineering task workflow
|
|
421
|
-
When the intent is `ENGINEERING_TASK`:
|
|
422
|
-
1. **Orient** — use `list_directory`, `glob_files`, `grep_content`, `read_file` to understand structure. These tools need **no permission** and are instant.
|
|
423
|
-
2. **Plan** — for complex tasks, call `todo_write` upfront to map out the work.
|
|
424
|
-
3. **Execute** — make the changes, run the checks, iterate.
|
|
425
|
-
4. **Verify** — confirm the result is correct before reporting done.
|
|
426
|
-
|
|
427
|
-
Never stop mid-task just because the first tool call succeeded. Keep going until the full task is complete or you hit a genuine blocker.
|
|
413
|
+
The depth of each step should match the complexity of what was asked. Don't run a four-step engineering workflow for a one-sentence question.
|
|
428
414
|
|
|
429
415
|
## CRITICAL: Read-only tools first — never bash for exploration
|
|
430
416
|
`bash` and `run_command` require permission confirmation by default. Always start with the **zero-permission** read-only tools:
|
|
@@ -447,12 +433,10 @@ You have native deep thinking capability — use it actively:
|
|
|
447
433
|
- **For trade-off decisions** (which library, which pattern, which approach): reason through the pros/cons given this specific codebase.
|
|
448
434
|
|
|
449
435
|
## Interpreting requests
|
|
450
|
-
-
|
|
451
|
-
- **Engineering tasks** ("fix", "add", "refactor", "analyse", "debug"): infer from the repo — search, read, then act. Do not give abstract advice when concrete files exist.
|
|
452
|
-
- If the user refers to symbols or behaviors, **find them** with `glob_files`/`grep_content`/`list_directory` — never ask them to paste paths you can discover yourself.
|
|
436
|
+
- If the user refers to symbols, files, or behaviors they expect you to know — **find them** with `glob_files`/`grep_content`/`list_directory`. Never ask them to paste paths you can discover yourself.
|
|
453
437
|
- **Never propose edits to files you haven't read.** Read first, then edit.
|
|
454
438
|
- When something fails, diagnose (re-read the error, check assumptions) before switching strategy. Do not repeat the same failed call.
|
|
455
|
-
-
|
|
439
|
+
- When asked to analyse or explain something: read the actual files, produce concrete findings, not hypotheses.
|
|
456
440
|
|
|
457
441
|
## Tool selection guide
|
|
458
442
|
|
|
@@ -769,8 +753,10 @@ def build_root_agent(
|
|
|
769
753
|
# prepended to every agent's effective instruction.
|
|
770
754
|
global_instr = (
|
|
771
755
|
"You are GemCode, an expert software engineering agent powered by Google Gemini. "
|
|
772
|
-
"
|
|
773
|
-
"
|
|
756
|
+
"Think deeply about what the person actually wants before you do anything. "
|
|
757
|
+
"Use exactly as many tools as the task genuinely requires — no more. "
|
|
758
|
+
"Act fully and autonomously when action is needed. "
|
|
759
|
+
"Always use read-only tools before shell or write tools."
|
|
774
760
|
)
|
|
775
761
|
|
|
776
762
|
agent_kwargs: dict = dict(
|
|
@@ -154,17 +154,6 @@ async def _run_prompt(
|
|
|
154
154
|
# MCP and OpenAPI toolsets are now loaded inside create_runner() directly.
|
|
155
155
|
runner = create_runner(cfg, extra_tools=None)
|
|
156
156
|
try:
|
|
157
|
-
# LLM intent pre-classifier: greetings bypass the main agent entirely.
|
|
158
|
-
try:
|
|
159
|
-
from gemcode.intent_classifier import (
|
|
160
|
-
classify_intent, generate_greeting_reply, INTENT_GREETING
|
|
161
|
-
)
|
|
162
|
-
_intent = await classify_intent(prompt)
|
|
163
|
-
if _intent == INTENT_GREETING:
|
|
164
|
-
return await generate_greeting_reply(prompt)
|
|
165
|
-
except Exception:
|
|
166
|
-
pass
|
|
167
|
-
|
|
168
157
|
collected = await run_turn(
|
|
169
158
|
runner,
|
|
170
159
|
user_id="local",
|
|
@@ -68,7 +68,7 @@ class GemCodeConfig:
|
|
|
68
68
|
"""Runtime options (CLI + env)."""
|
|
69
69
|
|
|
70
70
|
project_root: Path
|
|
71
|
-
model: str = field(default_factory=lambda: os.environ.get("GEMCODE_MODEL", "gemini-
|
|
71
|
+
model: str = field(default_factory=lambda: os.environ.get("GEMCODE_MODEL", "gemini-3.1-pro-preview"))
|
|
72
72
|
# Model mode: fast|balanced|quality|auto
|
|
73
73
|
model_mode: str = field(
|
|
74
74
|
default_factory=lambda: os.environ.get("GEMCODE_MODEL_MODE", "fast")
|
|
@@ -14,6 +14,10 @@ from __future__ import annotations
|
|
|
14
14
|
# Format: model_prefix → (input_$/M, output_$/M)
|
|
15
15
|
# Matches are done by checking if the model id STARTS WITH any key (longest first).
|
|
16
16
|
_PRICING_TABLE: dict[str, tuple[float, float]] = {
|
|
17
|
+
# ── Gemini 3 ────────────────────────────────────────────────────────────
|
|
18
|
+
"gemini-3.1-pro": (0.30, 1.20), # preview pricing (approximate)
|
|
19
|
+
"gemini-3.0-pro": (0.30, 1.20),
|
|
20
|
+
"gemini-3": (0.30, 1.20),
|
|
17
21
|
# ── Gemini 2.5 ──────────────────────────────────────────────────────────
|
|
18
22
|
"gemini-2.5-pro": (3.50, 10.50), # standard context ≤200k
|
|
19
23
|
"gemini-2.5-flash-lite": (0.10, 0.40), # lowest-cost 2.5 (must precede flash)
|
|
@@ -28,7 +32,6 @@ _PRICING_TABLE: dict[str, tuple[float, float]] = {
|
|
|
28
32
|
"gemini-1.5-pro": (1.25, 5.00),
|
|
29
33
|
# ── Gemini experimental / preview ───────────────────────────────────────
|
|
30
34
|
"gemini-exp": (0.00, 0.00), # free during preview
|
|
31
|
-
"gemini-3": (0.30, 1.20), # approximate future pricing
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
|
|
@@ -582,61 +582,6 @@ async def run_gemcode_scrollback_tui(
|
|
|
582
582
|
except Exception:
|
|
583
583
|
pass
|
|
584
584
|
|
|
585
|
-
# ── LLM intent pre-classifier ────────────────────────────────────────────
|
|
586
|
-
# gemini-2.5-flash-lite classifies the message (same lane as Thinking)
|
|
587
|
-
try:
|
|
588
|
-
from gemcode.intent_classifier import (
|
|
589
|
-
classify_intent_with_source,
|
|
590
|
-
generate_greeting_reply,
|
|
591
|
-
show_intentifying_line,
|
|
592
|
-
INTENT_GREETING,
|
|
593
|
-
INTENT_DESCRIPTIONS,
|
|
594
|
-
)
|
|
595
|
-
# Show as a transient spinner status (do not print a permanent line).
|
|
596
|
-
_start_anim("Intentifying\u2026")
|
|
597
|
-
try:
|
|
598
|
-
_intent, _intent_src = await classify_intent_with_source(prompt)
|
|
599
|
-
finally:
|
|
600
|
-
_stop_anim()
|
|
601
|
-
# If disabled, show nothing; otherwise the spinner already conveyed it.
|
|
602
|
-
_ = show_intentifying_line(_intent_src)
|
|
603
|
-
|
|
604
|
-
if _intent == INTENT_GREETING:
|
|
605
|
-
_start_anim("Replying\u2026")
|
|
606
|
-
try:
|
|
607
|
-
_reply = await generate_greeting_reply(prompt)
|
|
608
|
-
finally:
|
|
609
|
-
_stop_anim()
|
|
610
|
-
print(f" \u23bf {ansi.bold}GemCode{ansi.reset}:")
|
|
611
|
-
console.print(_RichPadding(_RichMarkdown(_reply), (0, 0, 0, 4)))
|
|
612
|
-
print("")
|
|
613
|
-
if os.environ.get("GEMCODE_TUI_TURN_RULE", "1").lower() in (
|
|
614
|
-
"1", "true", "yes", "on"
|
|
615
|
-
):
|
|
616
|
-
print(f"{ansi.dim}{_hr(ch='─')}{ansi.reset}")
|
|
617
|
-
print("")
|
|
618
|
-
continue
|
|
619
|
-
|
|
620
|
-
# Non-greeting: store classified intent in session state so the main
|
|
621
|
-
# agent can read it and adapt its tool-use strategy accordingly.
|
|
622
|
-
try:
|
|
623
|
-
ss = runner.session_service
|
|
624
|
-
app = getattr(runner, "app_name", None) or getattr(cfg, "app_name", "gemcode")
|
|
625
|
-
sess = await ss.get_session(
|
|
626
|
-
app_name=app, user_id="local", session_id=current_session_id
|
|
627
|
-
)
|
|
628
|
-
if sess is not None:
|
|
629
|
-
_desc = INTENT_DESCRIPTIONS.get(_intent, _intent)
|
|
630
|
-
sess.state["_gemcode_intent"] = _intent
|
|
631
|
-
sess.state["_gemcode_intent_desc"] = _desc
|
|
632
|
-
await ss.update_session(sess)
|
|
633
|
-
except Exception:
|
|
634
|
-
pass # State injection is best-effort
|
|
635
|
-
|
|
636
|
-
except Exception:
|
|
637
|
-
pass # Classifier unavailable — fall through to main agent unchanged
|
|
638
|
-
# ─────────────────────────────────────────────────────────────────────────
|
|
639
|
-
|
|
640
585
|
# Snapshot pre-turn capability state so we can detect routing-triggered changes.
|
|
641
586
|
_pre_dr = cfg.enable_deep_research
|
|
642
587
|
_pre_emb = cfg.enable_embeddings
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|