gemcode 0.4.29__tar.gz → 0.4.31__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.4.29/src/gemcode.egg-info → gemcode-0.4.31}/PKG-INFO +1 -1
- {gemcode-0.4.29 → gemcode-0.4.31}/pyproject.toml +1 -1
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/thinking.py +9 -1
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/sse_adapter.py +19 -4
- {gemcode-0.4.29 → gemcode-0.4.31/src/gemcode.egg-info}/PKG-INFO +1 -1
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode.egg-info/SOURCES.txt +1 -0
- gemcode-0.4.31/tests/test_project_folder_scope.py +33 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_thinking_config.py +20 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/LICENSE +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/MANIFEST.in +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/README.md +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/setup.cfg +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/__init__.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/__main__.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/a2a_bridge.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/agent.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/agent_habits.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/agent_intelligence.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/agent_mesh.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/agent_triggers.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/audit.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/autocompact.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/automations.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/autotune.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/callbacks.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/capability_routing.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/checkpoints.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/cli.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/codebase_awareness.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/compaction.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/computer_use/__init__.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/computer_use/browser_computer.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/config.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/context_budget.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/context_warning.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/credentials.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/curated_memory.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/delegation_learning.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/dynamic_policy.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/evals/harness.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/event_bus.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/fleet_reports.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/habit_chains.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/habit_runs.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/hitl_session.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/hooks.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/ide_protocol.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/ide_stdio.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/intent_classifier.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/interactions.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/invoke.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/kaira_client.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/kaira_daemon.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/kaira_ipc.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/kaira_job_store.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/learning.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/limits.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/live_audio_engine.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/logging_config.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/mcp_loader.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/memory/__init__.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/memory/embedding_memory_service.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/memory/file_memory_service.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/modality_tools.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/model_errors.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/model_routing.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/multimodal_input.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/openapi_loader.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/org.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/output_styles.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/paths.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/permissions.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/plugins/__init__.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/plugins/terminal_hooks_plugin.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/plugins/tool_recovery_plugin.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/policy_profile.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/pricing.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/prompt_suggestions.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/query/__init__.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/query/config.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/query/deps.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/query/engine.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/query/stop_hooks.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/query/token_budget.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/query/transitions.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/query_sanitizer.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/refine.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/repl_commands.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/repl_slash.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/review_agent.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/rules.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/self_healing.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/session_runtime.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/session_store.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/session_summariser.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/skills.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/slash_commands.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tool_prompt_manifest.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tool_registry.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tool_result_store.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tool_synthesis.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/__init__.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/automations_tools.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/bash.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/browser.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/compress_memory.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/curated_memory.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/edit.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/filesystem.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/notebook.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/notes.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/org_tools.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/repo_map.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/search.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/shell.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/shell_gate.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/skills.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/subtask.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/tasks.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/think.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/todo.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/user_choice.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/veomem_tools.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/web.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools/web_search.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tools_inspector.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/trust.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tui/input_handler.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tui/scrollback.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tui/spinner.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tui/welcome_banner.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/tui/welcome_rich.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/veomem_bridge.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/version.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/vertex.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/wal.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/__init__.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/chat_skills.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/customize_api.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/files_api.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/fleet_api.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/hitl_bridge.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/preview_api.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/project_root.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/runtime_api.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/serve_bind.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/serve_state.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/server.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/sessions_api.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/terminal_api.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/terminal_repl.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/ui_chat_store.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/web_config_api.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/web_sse_compat.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/web/workspace_panel_api.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode/workspace_hints.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode.egg-info/dependency_links.txt +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode.egg-info/entry_points.txt +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode.egg-info/requires.txt +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/src/gemcode.egg-info/top_level.txt +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_add_dir.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_agent_habits.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_agent_instruction.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_agent_mesh.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_autocompact.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_automations.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_capability_routing.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_checkpoint_diff_command.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_cli_init.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_compress_memory_tool.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_computer_use_permissions.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_context_budget.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_context_warning.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_credentials.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_eval_harness_layout.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_event_bus.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_files_api.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_fleet_reports.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_habit_chains.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_habit_runs.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_hitl_bridge_cross_process.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_hosted_tenant.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_ide_stdio_attachments.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_interactive_permission_ask.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_kaira_ipc_paths.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_kaira_scheduler.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_modality_tools.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_model_error_retry.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_model_errors.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_model_routing.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_multimodal_input.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_output_styles_and_rules.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_paths.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_permissions.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_preview_proxy.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_prompt_suggestions.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_repl_commands.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_repl_slash.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_session_runtime_cache.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_skills.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_slash_commands.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_slash_completion_registry.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_sse_confirmation_batch.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_token_budget.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_tool_context_circulation.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_tools.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_tools_inspector.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_web_permissions_hitl.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_web_server.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_web_sse_adapter.py +0 -0
- {gemcode-0.4.29 → gemcode-0.4.31}/tests/test_workspace_hints.py +0 -0
|
@@ -96,8 +96,16 @@ def build_thinking_config(cfg: GemCodeConfig) -> Optional[types.ThinkingConfig]:
|
|
|
96
96
|
)
|
|
97
97
|
|
|
98
98
|
# If the user only wants thought summaries, we can set include_thoughts
|
|
99
|
-
# without forcing a budget/level.
|
|
99
|
+
# without forcing a budget/level (Gemini 2.5). Gemini 3.x also needs an
|
|
100
|
+
# explicit thinking_level or the model may consume thought tokens without
|
|
101
|
+
# streaming readable summaries to the client.
|
|
100
102
|
if include:
|
|
103
|
+
if not is_25:
|
|
104
|
+
show_full = bool(getattr(cfg, "show_full_thinking", False))
|
|
105
|
+
level = "high" if show_full else "medium"
|
|
106
|
+
if _is_gemini_3_pro(model_id) and level == "minimal":
|
|
107
|
+
level = "low"
|
|
108
|
+
return types.ThinkingConfig(include_thoughts=True, thinking_level=level)
|
|
101
109
|
return types.ThinkingConfig(include_thoughts=True)
|
|
102
110
|
|
|
103
111
|
# Otherwise: familiar auto mapping based on model_mode.
|
|
@@ -53,7 +53,7 @@ def extract_parts_from_event(event: Any) -> tuple[str, str]:
|
|
|
53
53
|
t = getattr(p, "text", None)
|
|
54
54
|
if not isinstance(t, str) or not t:
|
|
55
55
|
continue
|
|
56
|
-
if getattr(p, "thought", None):
|
|
56
|
+
if getattr(p, "thought", None) is True:
|
|
57
57
|
thought_parts.append(t)
|
|
58
58
|
else:
|
|
59
59
|
final_parts.append(t)
|
|
@@ -437,6 +437,8 @@ def _inject_web_code_context(cfg: GemCodeConfig, prompt: str, req: dict[str, Any
|
|
|
437
437
|
"Use them proactively; never tell the user you cannot access their files.",
|
|
438
438
|
f"Workspace root: `{root}`",
|
|
439
439
|
"Tool paths are relative to this workspace root.",
|
|
440
|
+
"When the user asks to analyze the codebase / project / repo, stay **inside this workspace root only** — "
|
|
441
|
+
"do not walk up to parent directories or sibling folders outside this root.",
|
|
440
442
|
]
|
|
441
443
|
|
|
442
444
|
active = req.get("active_file")
|
|
@@ -1033,9 +1035,16 @@ def _apply_web_request_options(cfg: GemCodeConfig, req: dict[str, Any], workspac
|
|
|
1033
1035
|
elif tm == "brief":
|
|
1034
1036
|
cfg.disable_thinking = False
|
|
1035
1037
|
cfg.show_full_thinking = False
|
|
1038
|
+
# Web UI "brief" should still request thought summaries so the UI can
|
|
1039
|
+
# render a streaming/collapsible "Thinking" block.
|
|
1040
|
+
cfg.include_thought_summaries = True
|
|
1036
1041
|
elif tm == "auto":
|
|
1037
1042
|
cfg.disable_thinking = False
|
|
1038
1043
|
cfg.show_full_thinking = False
|
|
1044
|
+
# Treat web "auto" as "show brief thinking when available".
|
|
1045
|
+
# Without this, Gemini can enter a thinking phase but the adapter
|
|
1046
|
+
# won't receive any thought content to stream via SSE.
|
|
1047
|
+
cfg.include_thought_summaries = True
|
|
1039
1048
|
|
|
1040
1049
|
caps = req.get("capabilities")
|
|
1041
1050
|
if isinstance(caps, dict):
|
|
@@ -1125,15 +1134,21 @@ async def run_adapter(req: dict[str, Any]) -> None:
|
|
|
1125
1134
|
raise ValueError(str(exc)) from exc
|
|
1126
1135
|
if not root_path.is_dir():
|
|
1127
1136
|
raise ValueError(f"project_root is not a directory: {root_path}")
|
|
1128
|
-
project_root = str(root_path)
|
|
1137
|
+
project_root = str(root_path.resolve())
|
|
1129
1138
|
from gemcode.org import resolve_fleet_root
|
|
1130
1139
|
|
|
1131
|
-
|
|
1132
|
-
|
|
1140
|
+
# Fleet/org lives at the nearest ancestor with .gemcode/org.json (often the
|
|
1141
|
+
# tenant PVC root). Tooling + "analyze codebase" must stay on the *selected*
|
|
1142
|
+
# project folder the UI sent — do not widen to fleet_root.
|
|
1143
|
+
project_path = root_path.resolve()
|
|
1144
|
+
fleet_root = resolve_fleet_root(project_path)
|
|
1145
|
+
cfg = GemCodeConfig(project_root=project_path)
|
|
1133
1146
|
|
|
1134
1147
|
from gemcode.trust import ensure_hosted_workspace_trust
|
|
1135
1148
|
|
|
1136
1149
|
ensure_hosted_workspace_trust(fleet_root)
|
|
1150
|
+
if project_path != fleet_root:
|
|
1151
|
+
ensure_hosted_workspace_trust(project_path)
|
|
1137
1152
|
|
|
1138
1153
|
if req.get("session_id"):
|
|
1139
1154
|
try:
|
|
@@ -189,6 +189,7 @@ tests/test_output_styles_and_rules.py
|
|
|
189
189
|
tests/test_paths.py
|
|
190
190
|
tests/test_permissions.py
|
|
191
191
|
tests/test_preview_proxy.py
|
|
192
|
+
tests/test_project_folder_scope.py
|
|
192
193
|
tests/test_prompt_suggestions.py
|
|
193
194
|
tests/test_repl_commands.py
|
|
194
195
|
tests/test_repl_slash.py
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""Selected project folder must remain cfg.project_root (not fleet_root)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
from gemcode.org import resolve_fleet_root
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_resolve_fleet_root_walks_up_to_tenant(tmp_path: Path) -> None:
|
|
12
|
+
tenant = tmp_path / "workspace"
|
|
13
|
+
project = tenant / "final todo"
|
|
14
|
+
project.mkdir(parents=True)
|
|
15
|
+
(tenant / ".gemcode").mkdir()
|
|
16
|
+
(tenant / ".gemcode" / "org.json").write_text("{}", encoding="utf-8")
|
|
17
|
+
|
|
18
|
+
assert resolve_fleet_root(project).resolve() == tenant.resolve()
|
|
19
|
+
assert resolve_fleet_root(tenant).resolve() == tenant.resolve()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def test_inject_context_scopes_to_project_folder(tmp_path: Path) -> None:
|
|
23
|
+
from gemcode.config import GemCodeConfig
|
|
24
|
+
from gemcode.web import sse_adapter
|
|
25
|
+
|
|
26
|
+
project = tmp_path / "my-app"
|
|
27
|
+
project.mkdir()
|
|
28
|
+
cfg = GemCodeConfig(project_root=project)
|
|
29
|
+
object.__setattr__(cfg, "_web_workspace_mode", "code")
|
|
30
|
+
object.__setattr__(cfg, "_web_interactive_hitl", True)
|
|
31
|
+
out = sse_adapter._inject_web_code_context(cfg, "analyze codebase", {})
|
|
32
|
+
assert str(project.resolve()) in out
|
|
33
|
+
assert "stay **inside this workspace root only**" in out
|
|
@@ -37,6 +37,26 @@ def test_include_thought_summaries_only_gemini25(tmp_path) -> None:
|
|
|
37
37
|
assert thinking_cfg == types.ThinkingConfig(include_thoughts=True)
|
|
38
38
|
|
|
39
39
|
|
|
40
|
+
def test_include_thought_summaries_gemini3_sets_level(tmp_path) -> None:
|
|
41
|
+
cfg = GemCodeConfig(project_root=tmp_path)
|
|
42
|
+
cfg.model = "gemini-3.1-pro-preview"
|
|
43
|
+
cfg.disable_thinking = False
|
|
44
|
+
cfg.include_thought_summaries = True
|
|
45
|
+
cfg.show_full_thinking = False
|
|
46
|
+
thinking_cfg = build_thinking_config(cfg)
|
|
47
|
+
assert thinking_cfg == types.ThinkingConfig(
|
|
48
|
+
include_thoughts=True,
|
|
49
|
+
thinking_level="medium",
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
cfg.show_full_thinking = True
|
|
53
|
+
thinking_cfg = build_thinking_config(cfg)
|
|
54
|
+
assert thinking_cfg == types.ThinkingConfig(
|
|
55
|
+
include_thoughts=True,
|
|
56
|
+
thinking_level="high",
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
40
60
|
def test_thinking_level_is_ignored_for_gemini25(tmp_path) -> None:
|
|
41
61
|
cfg = GemCodeConfig(project_root=tmp_path)
|
|
42
62
|
cfg.model = "gemini-2.5-flash"
|
|
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
|
|
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
|