gemcode 0.3.7__tar.gz → 0.3.9__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.7/src/gemcode.egg-info → gemcode-0.3.9}/PKG-INFO +1 -1
- {gemcode-0.3.7 → gemcode-0.3.9}/pyproject.toml +1 -1
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/agent.py +1 -1
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/repl_commands.py +1 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/repl_slash.py +33 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tui/app.py +23 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tui/scrollback.py +19 -0
- {gemcode-0.3.7 → gemcode-0.3.9/src/gemcode.egg-info}/PKG-INFO +1 -1
- {gemcode-0.3.7 → gemcode-0.3.9}/LICENSE +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/MANIFEST.in +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/README.md +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/setup.cfg +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/__init__.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/__main__.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/audit.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/autocompact.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/callbacks.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/capability_routing.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/cli.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/compaction.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/computer_use/__init__.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/computer_use/browser_computer.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/config.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/context_budget.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/context_warning.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/credentials.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/hitl_session.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/interactions.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/invoke.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/kairos_daemon.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/limits.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/live_audio_engine.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/logging_config.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/mcp_loader.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/memory/__init__.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/memory/embedding_memory_service.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/memory/file_memory_service.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/modality_tools.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/model_errors.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/model_routing.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/paths.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/permissions.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/plugins/__init__.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/plugins/terminal_hooks_plugin.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/plugins/tool_recovery_plugin.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/prompt_suggestions.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/query/__init__.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/query/config.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/query/deps.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/query/engine.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/query/stop_hooks.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/query/token_budget.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/query/transitions.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/session_runtime.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/slash_commands.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/thinking.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tool_prompt_manifest.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tool_registry.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tools/__init__.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tools/edit.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tools/filesystem.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tools/search.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tools/shell.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tools/shell_gate.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tools/todo.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/tools_inspector.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/trust.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/version.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/vertex.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/web/__init__.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/web/claude_sse_adapter.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/web/terminal_repl.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode/workspace_hints.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode.egg-info/SOURCES.txt +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode.egg-info/dependency_links.txt +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode.egg-info/entry_points.txt +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode.egg-info/requires.txt +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/src/gemcode.egg-info/top_level.txt +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_agent_instruction.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_autocompact.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_capability_routing.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_claude_web_adapter_sse.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_cli_init.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_computer_use_permissions.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_context_budget.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_context_warning.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_credentials.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_interactive_permission_ask.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_kairos_scheduler.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_modality_tools.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_model_error_retry.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_model_errors.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_model_routing.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_paths.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_permissions.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_prompt_suggestions.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_repl_commands.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_repl_slash.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_slash_commands.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_thinking_config.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_token_budget.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_tool_context_circulation.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_tools.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_tools_inspector.py +0 -0
- {gemcode-0.3.7 → gemcode-0.3.9}/tests/test_workspace_hints.py +0 -0
|
@@ -65,7 +65,7 @@ def _build_runtime_facts(cfg: GemCodeConfig) -> str:
|
|
|
65
65
|
model = (getattr(cfg, "model", None) or "").strip() or "(default)"
|
|
66
66
|
return f"""## Runtime facts (authoritative for this session)
|
|
67
67
|
- **Project root** — every filesystem tool path is relative to: `{root}`
|
|
68
|
-
- **Model id in use:** `{model}`.
|
|
68
|
+
- **Model id in use:** `{model}`. In this TUI/REPL you can override it for subsequent turns with `/model use <id>` (use `/model list` to browse IDs). For a full restart you can still use `--model <id>` or env `GEMCODE_MODEL`.
|
|
69
69
|
- **UI banner** phrases such as "GemCode Pro" are **terminal marketing**, not a separate API tier or model you enable from chat.
|
|
70
70
|
- **Env toggles** (`GEMCODE_ENABLE_COMPUTER_USE`, `GEMCODE_MODEL`, etc.) affect only the **OS process** that launched `gemcode`. Pasting `VAR=1` in chat does **not** reconfigure a running session—tell the user to export in their shell, use project `.env`, or restart the CLI.
|
|
71
71
|
- **Working in subfolders** — use tools: e.g. `list_directory("Desktop")`, `glob_files("**/query.ts")`, `read_file("testing/ai-edtech-app/src/app/page.tsx")`, or `run_command` with `cwd_subdir`. Never claim the sandbox cannot reach a subpath unless a tool returned an explicit error."""
|
|
@@ -175,6 +175,7 @@ def slash_help_lines() -> list[str]:
|
|
|
175
175
|
" /doctor Environment sanity check",
|
|
176
176
|
" /model Show model routing info",
|
|
177
177
|
" /model use <id> Override model for this REPL session",
|
|
178
|
+
" /model list List available Gemini model IDs",
|
|
178
179
|
" /permissions Show permission / HITL settings",
|
|
179
180
|
" /memory Show persistent memory settings",
|
|
180
181
|
" /hooks Show post-turn hook configuration",
|
|
@@ -104,6 +104,39 @@ async def process_repl_slash(
|
|
|
104
104
|
out()
|
|
105
105
|
return ReplSlashResult(skip_model_turn=True)
|
|
106
106
|
|
|
107
|
+
if sub in ("list", "ls", "show"):
|
|
108
|
+
# Best-effort list: query Gemini via the same API used by GemCode.
|
|
109
|
+
show_all = "--show-all" in parts or "--show-all" in args
|
|
110
|
+
try:
|
|
111
|
+
from gemcode.config import load_cli_environment
|
|
112
|
+
|
|
113
|
+
load_cli_environment()
|
|
114
|
+
except Exception:
|
|
115
|
+
pass
|
|
116
|
+
from gemcode.cli import require_google_api_key
|
|
117
|
+
|
|
118
|
+
require_google_api_key()
|
|
119
|
+
from google.genai import Client
|
|
120
|
+
|
|
121
|
+
client = Client(api_key=os.environ["GOOGLE_API_KEY"])
|
|
122
|
+
models = client.models.list()
|
|
123
|
+
out("Available models:")
|
|
124
|
+
for m in models:
|
|
125
|
+
name = getattr(m, "name", None)
|
|
126
|
+
actions = getattr(m, "supported_actions", None)
|
|
127
|
+
if not name:
|
|
128
|
+
continue
|
|
129
|
+
if not show_all and actions and isinstance(actions, list):
|
|
130
|
+
# Keep only models that support generateContent-style generation.
|
|
131
|
+
if "generateContent" not in actions:
|
|
132
|
+
continue
|
|
133
|
+
if actions and isinstance(actions, list):
|
|
134
|
+
out(f" {name}\t{','.join(actions)}")
|
|
135
|
+
else:
|
|
136
|
+
out(f" {name}")
|
|
137
|
+
out()
|
|
138
|
+
return ReplSlashResult(skip_model_turn=True)
|
|
139
|
+
|
|
107
140
|
# Fallback: show current routing info.
|
|
108
141
|
out("\n".join(format_model_lines(cfg)))
|
|
109
142
|
out("Tip: /model use <model-id> to override for this session.")
|
|
@@ -475,6 +475,9 @@ async def run_gemcode_tui(
|
|
|
475
475
|
_scroll_output(10)
|
|
476
476
|
|
|
477
477
|
async def _send_current() -> None:
|
|
478
|
+
nonlocal runner
|
|
479
|
+
old_model = getattr(cfg, "model", "")
|
|
480
|
+
old_model_overridden = bool(getattr(cfg, "model_overridden", False))
|
|
478
481
|
prompt = (input_box.text or "").strip()
|
|
479
482
|
input_box.text = ""
|
|
480
483
|
input_box.buffer.cursor_position = 0
|
|
@@ -540,6 +543,26 @@ async def run_gemcode_tui(
|
|
|
540
543
|
if slash.new_session_id is not None:
|
|
541
544
|
session_state["id"] = slash.new_session_id
|
|
542
545
|
if slash.skip_model_turn:
|
|
546
|
+
# Runner binds the model at creation time (LlmAgent(model=...)),
|
|
547
|
+
# so rebuild it when the user overrides the model mid-session.
|
|
548
|
+
new_model = getattr(cfg, "model", "")
|
|
549
|
+
new_model_overridden = bool(getattr(cfg, "model_overridden", False))
|
|
550
|
+
if new_model != old_model or new_model_overridden != old_model_overridden:
|
|
551
|
+
try:
|
|
552
|
+
close_fn = getattr(runner, "close", None)
|
|
553
|
+
if close_fn:
|
|
554
|
+
maybe = close_fn()
|
|
555
|
+
if asyncio.iscoroutine(maybe):
|
|
556
|
+
await maybe
|
|
557
|
+
except Exception:
|
|
558
|
+
pass
|
|
559
|
+
from gemcode.session_runtime import create_runner
|
|
560
|
+
|
|
561
|
+
runner = create_runner(cfg, extra_tools=extra_tools)
|
|
562
|
+
try:
|
|
563
|
+
app.invalidate()
|
|
564
|
+
except Exception:
|
|
565
|
+
pass
|
|
543
566
|
return
|
|
544
567
|
prompt = slash.model_prompt or prompt
|
|
545
568
|
|
|
@@ -327,6 +327,9 @@ async def run_gemcode_scrollback_tui(
|
|
|
327
327
|
if prompt in (":q", "quit", "exit", "/exit"):
|
|
328
328
|
return
|
|
329
329
|
|
|
330
|
+
old_model = getattr(cfg, "model", "")
|
|
331
|
+
old_model_overridden = bool(getattr(cfg, "model_overridden", False))
|
|
332
|
+
|
|
330
333
|
slash = await process_repl_slash(
|
|
331
334
|
cfg=cfg,
|
|
332
335
|
runner=runner,
|
|
@@ -340,6 +343,22 @@ async def run_gemcode_scrollback_tui(
|
|
|
340
343
|
if slash.new_session_id is not None:
|
|
341
344
|
current_session_id = slash.new_session_id
|
|
342
345
|
if slash.skip_model_turn:
|
|
346
|
+
# Runner binds the model at creation time (LlmAgent(model=...)),
|
|
347
|
+
# so rebuild it when the user overrides the model mid-session.
|
|
348
|
+
new_model = getattr(cfg, "model", "")
|
|
349
|
+
new_model_overridden = bool(getattr(cfg, "model_overridden", False))
|
|
350
|
+
if new_model != old_model or new_model_overridden != old_model_overridden:
|
|
351
|
+
try:
|
|
352
|
+
close_fn = getattr(runner, "close", None)
|
|
353
|
+
if close_fn:
|
|
354
|
+
maybe = close_fn()
|
|
355
|
+
if asyncio.iscoroutine(maybe):
|
|
356
|
+
await maybe
|
|
357
|
+
except Exception:
|
|
358
|
+
pass
|
|
359
|
+
from gemcode.session_runtime import create_runner
|
|
360
|
+
|
|
361
|
+
runner = create_runner(cfg, extra_tools=extra_tools)
|
|
343
362
|
continue
|
|
344
363
|
prompt = slash.model_prompt or prompt
|
|
345
364
|
|
|
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
|