MCPcopy Create free account

hub / github.com/dhanji/g3 / functions

Functions3,053 in github.com/dhanji/g3

↓ 3 callersFunctionformat_remember_summary
Format a remember tool result summary.
crates/g3-core/src/streaming.rs:461
↓ 3 callersFunctionformat_screenshot_summary
Format a take_screenshot result summary.
crates/g3-core/src/streaming.rs:473
↓ 3 callersFunctionformat_token_count
Format token count in compact form (e.g., 1K, 2M, 100b, 200K) Clamps to 4 chars right-aligned.
crates/g3-core/src/session.rs:18
↓ 3 callersFunctionformat_workspace_path
Format a workspace path for display, replacing home directory with ~.
crates/g3-cli/src/display.rs:9
↓ 3 callersFunctiongenerate_fragment_id
Generate a unique fragment ID.
crates/g3-core/src/acd.rs:183
↓ 3 callersFunctiongenerate_turn_histogram
Generate a histogram showing tokens used and wall clock time per turn.
crates/g3-cli/src/metrics.rs:29
↓ 3 callersFunctionget_agent_language_prompt
Get agent-specific language prompt for a specific agent and language.
crates/g3-cli/src/language_prompts.rs:137
↓ 3 callersFunctionget_embedded_agent
Get an embedded agent prompt by name.
crates/g3-cli/src/embedded_agents.rs:29
↓ 3 callersFunctionget_envelope_path
Get the path to the envelope.yaml file for a session.
crates/g3-core/src/tools/invariants.rs:740
↓ 3 callersFunctionget_g3_dir
Get the path to the .g3 directory
crates/g3-core/src/session_continuation.rs:93
↓ 3 callersFunctionget_latest_fragment_id
Get the most recent fragment ID for a session (the tail of the linked list).
crates/g3-core/src/acd.rs:373
↓ 3 callersMethodget_provider_info
(&self)
crates/g3-core/src/lib.rs:780
↓ 3 callersFunctionget_stop_sequences_for_model
Get stop sequences for a model type.
crates/g3-providers/src/embedded/provider.rs:293
↓ 3 callersFunctionget_todo_path
Get the path to the todo.g3.md file. Checks for G3_TODO_PATH environment variable first (used by planning mode), then falls back to todo.g3.md in the
crates/g3-core/src/paths.rs:22
↓ 3 callersMethodget_tool_definitions_with_loaded_toolsets
Get tool definitions including any dynamically loaded toolsets.
crates/g3-core/src/lib.rs:629
↓ 3 callersMethodhas_unexecuted_tool_call
(&self)
crates/g3-core/src/streaming_parser.rs:503
↓ 3 callersMethodis_complete
Check if all items are terminal (done or blocked).
crates/g3-core/src/tools/plan.rs:243
↓ 3 callersFunctionis_on_own_line
True if position is at start of text or preceded only by whitespace after newline.
crates/g3-core/src/streaming_parser.rs:198
↓ 3 callersFunctionis_position_in_fence_ranges
(pos: usize, ranges: &[(usize, usize)])
crates/g3-core/src/streaming_parser.rs:111
↓ 3 callersFunctionis_process_running
Check if a process is running by PID
crates/studio/src/main.rs:857
↓ 3 callersMethodlist_pending
List all pending (not yet injected) research tasks
crates/g3-core/src/pending_research.rs:226
↓ 3 callersMethodload
Load a fragment from disk.
crates/g3-core/src/acd.rs:164
↓ 3 callersFunctionload_config_with_cli_overrides
Load configuration with CLI argument overrides applied. This is the canonical function for loading config with CLI overrides. All CLI entry points sh
crates/g3-cli/src/utils.rs:102
↓ 3 callersMethodlog_error_to_session
Log an error message to the session JSON file as the last message This is used in autonomous mode to record context length exceeded errors
crates/g3-core/src/lib.rs:1196
↓ 3 callersMethodmark_paused
Mark session as paused (for interactive sessions)
crates/studio/src/session.rs:142
↓ 3 callersFunctionmerge_memory
Merge new notes into existing memory. Appends new notes to the appropriate sections or creates new sections.
crates/g3-core/src/tools/memory.rs:76
↓ 3 callersMethodmodel
(&self)
crates/g3-core/tests/streaming_completion_test.rs:225
↓ 3 callersMethodparse
Parse a selector string into a Selector. Examples: - `csv_importer.capabilities` -> [Field("csv_importer"), Field("capabilities")] - `tests[0].name`
crates/g3-core/src/tools/invariants.rs:409
↓ 3 callersFunctionparse_commit_message
Parse commit message from LLM response
crates/g3-planner/src/planner.rs:503
↓ 3 callersFunctionparse_streaming_chunk
Parse a streaming chunk from Gemini's SSE response Gemini streams JSON objects, one per line (not SSE format with "data:" prefix)
crates/g3-providers/src/gemini.rs:339
↓ 3 callersFunctionparse_unified_diff_hunks
Parse a unified diff into a list of hunks as (old_block, new_block). Each hunk contains the exact text to search for and the replacement text includin
crates/g3-core/src/utils.rs:295
↓ 3 callersMethodprint_agent_prompt
(&self)
crates/g3-core/src/ui_writer.rs:185
↓ 3 callersFunctionprint_final_report
( output: &SimpleOutput, agent: &Agent<ConsoleUiWriter>, turn_metrics: &[TurnMetrics], start_t
crates/g3-cli/src/autonomous.rs:699
↓ 3 callersMethodprint_g3_progress
(&self, _message: &str)
crates/g3-core/src/ui_writer.rs:175
↓ 3 callersMethodprint_g3_status
Print a g3 status message with colored tag and status Format: "g3: <message> ... [status]" Uses centralized G3Status formatting.
crates/g3-cli/src/simple_output.rs:29
↓ 3 callersMethodprint_plan_compact
Print a compact Plan tool output with styled content Format: " ● plan_read" or " ● plan_write" header, then styled plan items plan_yaml: None for no p
crates/g3-core/src/ui_writer.rs:77
↓ 3 callersMethodprint_smart
(&self, message: &str)
crates/g3-cli/src/simple_output.rs:22
↓ 3 callersMethodremove
Remove a worktree and its branch
crates/studio/src/git.rs:67
↓ 3 callersFunctionremove_header
Remove the header line (# Workspace Memory and > Updated: ...) from content.
crates/g3-core/src/tools/memory.rs:95
↓ 3 callersMethodreset_json_filter
Reset the JSON tool call filter state. Called at the start of a new response to clear any partial state. Default implementation does nothing.
crates/g3-core/src/ui_writer.rs:138
↓ 3 callersFunctionresolve_path_with_unicode_fallback
Try to resolve a file path, handling Unicode space normalization. This function attempts to find a file in the following order: 1. Try the path as-is
crates/g3-core/src/utils.rs:90
↓ 3 callersMethodrestore_from_continuation
Restore session from a continuation artifact Returns true if full context was restored, false if only summary was used
crates/g3-core/src/lib.rs:1999
↓ 3 callersFunctionretry_with_backoff
Retry logic for async operations
crates/g3-core/src/error_handling.rs:310
↓ 3 callersFunctionrun_interactive
Run interactive mode with console output. If `agent_name` is Some, we're in agent+chat mode: skip session resume/verbose welcome, and use the agent na
crates/g3-cli/src/interactive.rs:108
↓ 3 callersMethodsave
Save session metadata
crates/studio/src/session.rs:96
↓ 3 callersMethodsave_context_window
Save the entire context window to a per-session file
crates/g3-core/src/lib.rs:1145
↓ 3 callersMethodsave_token
(&self, token_data: &TokenData)
crates/g3-providers/src/oauth.rs:83
↓ 3 callersMethodset_project_path
(&self, path: std::path::PathBuf, name: String)
crates/g3-cli/src/ui_writer_impl.rs:1115
↓ 3 callersFunctionsetup_test_dir
Create a temporary directory with a test file
crates/g3-core/tests/tool_execution_test.rs:37
↓ 3 callersFunctionshould_disable_thinking
Check if thinking mode should be disabled for a summary request. Anthropic requires: max_tokens > thinking.budget_tokens + 1024
crates/g3-core/src/compaction.rs:86
↓ 3 callersFunctionstream_variable_chunks
Feed content in random-ish chunk sizes
crates/g3-cli/tests/streaming_markdown_test.rs:37
↓ 3 callersMethodsupports_cache_control
(&self)
crates/g3-core/tests/streaming_completion_test.rs:233
↓ 3 callersMethodtext
Get the element's text content
crates/g3-computer-control/src/webdriver/mod.rs:68
↓ 3 callersFunctiontruncate_at_stop_sequence
Truncate text at the first stop sequence, if any.
crates/g3-providers/src/embedded/provider.rs:433
↓ 3 callersFunctiontruncate_for_display
Truncate a string for display, adding ellipsis if needed.
crates/g3-cli/src/project_files.rs:168
↓ 3 callersFunctiontry_extract_json_tool_call
Extract JSON tool call pattern
crates/g3-core/src/feedback_extraction.rs:251
↓ 3 callersFunctiontry_parse_json_from_buffer
Try to extract a complete JSON object from the buffer Gemini streams responses as a JSON array: [{...}, {...}, ...] We need to handle the array brack
crates/g3-providers/src/gemini.rs:462
↓ 3 callersMethodvalidate
Validate the claim structure.
crates/g3-core/src/tools/invariants.rs:71
↓ 3 callersMethodvalidate_provider_reference
Validate a provider reference (format: "<provider_type>.<config_name>")
crates/g3-config/src/lib.rs:436
↓ 3 callersMethodvalidate_system_prompt_is_first
Validate that the system prompt is the first message in the conversation history. This is a critical invariant that must be maintained for proper agen
crates/g3-core/src/lib.rs:438
↓ 3 callersMethodwith_provider_override
Create a copy of the config with a different default provider
crates/g3-config/src/lib.rs:651
↓ 3 callersFunctionwrite_plan
Write a plan to the session's plan.g3.md file.
crates/g3-core/src/tools/plan.rs:597
↓ 2 callersFunctionaccept_session
Internal function to accept a session with a custom prefix
crates/studio/src/main.rs:476
↓ 2 callersMethodall_ok
Check if all diagnostics passed
crates/g3-computer-control/src/webdriver/diagnostics.rs:37
↓ 2 callersFunctionapply_quote_highlighting
Apply cyan highlighting to quoted text markers (runs after markdown formatting).
crates/g3-cli/src/input_formatter.rs:57
↓ 2 callersMethodback
(&mut self)
crates/g3-core/src/webdriver_session.rs:99
↓ 2 callersFunctionbuild_refinement_user_message
Build the user message for requirements refinement This message instructs the LLM to read the codebase and refine requirements.
crates/g3-planner/src/llm.rs:404
↓ 2 callersMethodbuild_request
Build a GeminiRequest from a CompletionRequest.
crates/g3-providers/src/gemini.rs:521
↓ 2 callersMethodcalculate_summary_max_tokens
Calculate max_tokens for a summary request.
crates/g3-core/src/lib.rs:528
↓ 2 callersFunctioncheck_and_exit_plan_mode_if_terminal
Check if plan is terminal and exit plan mode if so. Returns true if plan mode was exited (plan is complete or all blocked).
crates/g3-cli/src/interactive.rs:90
↓ 2 callersFunctioncheck_startup_state
Check startup state and determine if recovery is needed
crates/g3-planner/src/planner.rs:198
↓ 2 callersFunctioncheck_tool_pattern
Check if buffer matches the tool call pattern. Pattern: `{` followed by optional whitespace, `"tool"`, optional whitespace, `:`, optional whitespace,
crates/g3-cli/src/filter_json.rs:112
↓ 2 callersMethodclear_cached_token
Force a token refresh by clearing any cached token This is useful when we get a 403 Invalid Token error
crates/g3-providers/src/databricks.rs:188
↓ 2 callersFunctionclear_continuation
Clear the session continuation symlink (for /clear command) This only removes the symlink, not the actual session data
crates/g3-core/src/session_continuation.rs:333
↓ 2 callersMethodclear_conversation
Clear the conversation history while preserving system messages. Used by /clear command to start fresh.
crates/g3-core/src/context_window.rs:131
↓ 2 callersMethodcollect_output
Collect all pending output into a single string.
crates/g3-cli/src/streaming_markdown.rs:783
↓ 2 callersFunctioncompleted_requirements_filename
Generate the completed requirements filename
crates/g3-planner/src/history.rs:153
↓ 2 callersFunctioncompleted_todo_filename
Generate the completed todo filename
crates/g3-planner/src/history.rs:158
↓ 2 callersFunctioncompress_command
Compress a shell command to fit within the given width. Preserves the command name and as much of the arguments as possible. Truncates from the right
crates/g3-cli/src/terminal_width.rs:107
↓ 2 callersMethodcontext_window_size
(&self)
crates/g3-providers/src/gemini.rs:628
↓ 2 callersFunctionconvert_tools
Convert g3 tools to Gemini format
crates/g3-providers/src/gemini.rs:249
↓ 2 callersMethodconvert_tools
(&self, tools: &[Tool])
crates/g3-providers/src/anthropic.rs:349
↓ 2 callersMethodconvert_tools
(&self, tools: &[Tool])
crates/g3-providers/src/databricks.rs:334
↓ 2 callersFunctionconvert_usage
Convert Gemini usage metadata to g3 Usage
crates/g3-providers/src/gemini.rs:302
↓ 2 callersMethodcount_cache_controls_in_history
Count how many cache_control annotations exist in the conversation history
crates/g3-core/src/lib.rs:482
↓ 2 callersMethodcreate_request_body
( &self, messages: &[Message], tools: Option<&[Tool]>, stream: bool, m
crates/g3-providers/src/openai.rs:66
↓ 2 callersMethodcreate_request_builder
(&self, streaming: bool)
crates/g3-providers/src/anthropic.rs:328
↓ 2 callersFunctiondecode_utf8_streaming
Try to decode bytes as UTF-8, handling incomplete sequences at the end. Returns the decoded string and leaves any incomplete bytes in the buffer.
crates/g3-providers/src/streaming.rs:14
↓ 2 callersFunctiondetermine_providers_to_register
Determines which providers should be registered based on mode and configuration. In autonomous mode, registers coach and player providers in addition
crates/g3-core/src/provider_registration.rs:16
↓ 2 callersFunctiondiscover_and_format_skills
Discover skills from configured paths and generate the skills prompt. Returns the skills prompt section if any skills are found, None otherwise. Skil
crates/g3-cli/src/project_files.rs:185
↓ 2 callersMethoddo_thin_context_all
Internal helper: thin all context and track the event
crates/g3-core/src/lib.rs:1286
↓ 2 callersMethodeffective_max_tokens
(&self)
crates/g3-providers/src/embedded/provider.rs:174
↓ 2 callersMethodemit_blockquote
Emit a complete blockquote.
crates/g3-cli/src/streaming_markdown.rs:713
↓ 2 callersMethodemit_code_block
(&mut self)
crates/g3-cli/src/streaming_markdown.rs:690
↓ 2 callersMethodemit_formatted_inline
Emit formatted inline content.
crates/g3-cli/src/streaming_markdown.rs:534
↓ 2 callersMethodemit_table
Emit a complete table.
crates/g3-cli/src/streaming_markdown.rs:721
↓ 2 callersFunctionensure_coverage_tools_installed
Ensure both llvm-tools-preview and cargo-llvm-cov are installed Returns Ok(true) if tools were already installed, Ok(false) if they were installed by
crates/g3-execution/src/lib.rs:494
↓ 2 callersFunctionescape_datalog_string
Escape a string value for use in a datalog literal. Replaces backslashes, double quotes, and newlines with escape sequences.
crates/g3-core/src/tools/datalog.rs:623
↓ 2 callersFunctionestimate_fragment_tokens
Estimate token count for messages.
crates/g3-core/src/acd.rs:253
↓ 2 callersMethodestimate_tokens
Estimate token count from text (~4 chars per token)
crates/g3-providers/src/embedded/provider.rs:180
← previousnext →301–400 of 3,053, ranked by callers