Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dhanji/g3
/ functions
Functions
3,053 in github.com/dhanji/g3
⨍
Functions
3,053
◇
Types & classes
258
↓ 2 callers
Function
eval_existence
Exists / NotExists: check whether the claim has any values. `expect_present = true` → Exists; `false` → NotExists.
crates/g3-core/src/tools/datalog.rs:433
↓ 2 callers
Function
eval_length
MinLength / MaxLength: compare the `__length` fact against a threshold.
crates/g3-core/src/tools/datalog.rs:493
↓ 2 callers
Function
eval_membership
Contains / NotContains: check whether a specific value is among the claim's facts. `expect_present = true` → Contains; `false` → NotContains.
crates/g3-core/src/tools/datalog.rs:450
↓ 2 callers
Function
eval_numeric_cmp
GreaterThan / LessThan: parse the first claim value as f64 and compare.
crates/g3-core/src/tools/datalog.rs:518
↓ 2 callers
Function
eval_set_membership
AnyOf / NoneOf: parse the expected value as a bracketed set and check membership. `expect_in_set = true` → AnyOf (pass if value in set); `false` → Non
crates/g3-core/src/tools/datalog.rs:556
↓ 2 callers
Function
eval_yaml_containment
Contains / NotContains: search selected values using `value_contains`.
crates/g3-core/src/tools/invariants.rs:591
↓ 2 callers
Function
eval_yaml_existence
Exists / NotExists: any non-null value counts as "present".
crates/g3-core/src/tools/invariants.rs:580
↓ 2 callers
Function
eval_yaml_length
MinLength / MaxLength: find the first Sequence and compare its length.
crates/g3-core/src/tools/invariants.rs:621
↓ 2 callers
Function
eval_yaml_numeric
GreaterThan / LessThan: find the first Number and compare.
crates/g3-core/src/tools/invariants.rs:639
↓ 2 callers
Function
eval_yaml_set
AnyOf / NoneOf: check if selected values are in (or not in) a set.
crates/g3-core/src/tools/invariants.rs:676
↓ 2 callers
Method
execute_bash
Execute Bash code
crates/g3-execution/src/lib.rs:196
↓ 2 callers
Method
execute_bash_streaming_in_dir
Execute bash command with streaming output in a specific directory
crates/g3-execution/src/lib.rs:273
↓ 2 callers
Function
execute_user_input
Execute user input with template processing and auto-memory reminder. This is the common path for both single-line and multiline input.
crates/g3-cli/src/interactive.rs:68
↓ 2 callers
Function
execute_with_retry
Execute an agent task with retry logic This function handles: - Error classification (timeout, rate limit, server error, etc.) - Exponential backoff
crates/g3-core/src/retry.rs:121
↓ 2 callers
Function
expand_tilde
Expand tilde (~) in a path to the user's home directory
crates/g3-execution/src/lib.rs:9
↓ 2 callers
Function
expand_tilde
Expand tilde to home directory
crates/g3-planner/src/code_explore.rs:85
↓ 2 callers
Function
extract_file_path
Extract file path from tool call content.
crates/g3-core/src/acd.rs:316
↓ 2 callers
Method
extract_params
Extract inference parameters from a completion request.
crates/g3-providers/src/embedded/provider.rs:357
↓ 2 callers
Function
extract_summary
Extract the summary section from the LLM response
crates/g3-planner/src/lib.rs:181
↓ 2 callers
Method
extract_token_data
Extracts token data from an OAuth 2.0 token response.
crates/g3-providers/src/oauth.rs:156
↓ 2 callers
Function
extract_tool_call_summary
Extract a summary of tool calls from messages.
crates/g3-core/src/acd.rs:196
↓ 2 callers
Function
extract_topic_from_text
Extract a brief topic from text.
crates/g3-core/src/acd.rs:296
↓ 2 callers
Function
extract_topics
Extract topic hints from messages using heuristics.
crates/g3-core/src/acd.rs:260
↓ 2 callers
Function
filter_substantial_text
Filter out empty or very short responses (likely just tool calls).
crates/g3-cli/src/coach_feedback.rs:117
↓ 2 callers
Function
find_chrome_path
(config_binary: Option<&str>)
crates/g3-computer-control/src/webdriver/diagnostics.rs:467
↓ 2 callers
Method
find_element
(&mut self, selector: &str)
crates/g3-computer-control/src/webdriver/chrome.rs:370
↓ 2 callers
Method
find_element
(&mut self, selector: &str)
crates/g3-computer-control/src/webdriver/safari.rs:174
↓ 2 callers
Function
find_json_end
Find the end of a JSON object (matching braces).
crates/g3-core/src/acd.rs:248
↓ 2 callers
Function
find_last_assistant_message
Helper to find the last assistant message in history
crates/g3-core/tests/compaction_test.rs:31
↓ 2 callers
Function
find_marker_position
Find the position of a marker in text that may contain ANSI codes. Searches by stripping ANSI codes character by character to find the true position.
crates/g3-core/src/tools/research.rs:329
↓ 2 callers
Function
find_tool_call_start
Find a tool call pattern on its own line. If `find_last`, search backwards.
crates/g3-core/src/streaming_parser.rs:215
↓ 2 callers
Method
finish_streaming_markdown
(&self)
crates/g3-core/src/ui_writer.rs:191
↓ 2 callers
Method
flush
(&self)
crates/g3-core/src/ui_writer.rs:190
↓ 2 callers
Method
for_planner
Create a copy of the config for planner mode
crates/g3-config/src/lib.rs:661
↓ 2 callers
Function
format_datalog_results
Format datalog execution results for display. This is used for shadow/dry-run output - printed to console but not injected into the context window.
crates/g3-core/src/tools/datalog.rs:763
↓ 2 callers
Function
format_llama
Llama/CodeLlama format: [INST] <<SYS>>\nsystem<</SYS>>\n\nuser [/INST]
crates/g3-providers/src/embedded/provider.rs:274
↓ 2 callers
Method
format_loaded_status
Format the loaded files status message (e.g., "✓ brief.md ✓ status.md")
crates/g3-cli/src/project.rs:91
↓ 2 callers
Function
format_mistral
Mistral Instruct format: <s>[INST] ... [/INST] response</s>
crates/g3-providers/src/embedded/provider.rs:237
↓ 2 callers
Function
format_qwen
Qwen ChatML format: <|im_start|>role\ncontent<|im_end|>
crates/g3-providers/src/embedded/provider.rs:222
↓ 2 callers
Method
format_status_summary
Format a summary of pending research for display
crates/g3-core/src/pending_research.rs:296
↓ 2 callers
Function
format_tool_arg_value
Format a tool argument value for display (truncated for readability). Special handling for shell commands (show first line only if multiline).
crates/g3-core/src/streaming.rs:380
↓ 2 callers
Method
generate_session_id
Generate a session ID based on the initial prompt
crates/g3-core/src/lib.rs:1140
↓ 2 callers
Function
generate_toolsets_prompt
Generate the prompt section describing available toolsets. This is injected into the system prompt so the agent knows what toolsets are available to
crates/g3-core/src/toolsets.rs:87
↓ 2 callers
Function
get_agent_language_prompts_for_workspace_with_langs
Get agent-specific language prompts for detected languages in the workspace. Returns both the formatted content and the list of languages that had mat
crates/g3-cli/src/language_prompts.rs:157
↓ 2 callers
Function
get_agent_system_prompt
Generate a system prompt for agent mode by combining the agent's custom prompt with the full G3 system prompt (including plan tools, code search, webd
crates/g3-core/src/prompts.rs:189
↓ 2 callers
Function
get_agent_system_prompt_with_skills
Generate a system prompt for agent mode with skills support. The agent_prompt replaces only the G3 identity line at the start of the prompt. Everythi
crates/g3-core/src/prompts.rs:197
↓ 2 callers
Function
get_base_path
()
crates/g3-providers/src/oauth.rs:36
↓ 2 callers
Function
get_chrome_search_paths
()
crates/g3-computer-control/src/webdriver/diagnostics.rs:483
↓ 2 callers
Function
get_context_summary_file
Get the path to the context summary file for a session. Returns .g3/sessions/<session_id>/context_summary.txt
crates/g3-core/src/paths.rs:109
↓ 2 callers
Function
get_embedded_skills
Get all embedded skills.
crates/g3-core/src/skills/embedded.rs:30
↓ 2 callers
Function
get_head_sha
Get the current HEAD SHA
crates/g3-planner/src/git.rs:105
↓ 2 callers
Function
get_image_dimensions
Get image dimensions from raw bytes.
crates/g3-core/src/tools/file_ops.rs:815
↓ 2 callers
Function
get_language_prompt
Get the prompt content for a specific language.
crates/g3-cli/src/language_prompts.rs:96
↓ 2 callers
Method
get_planner_provider
Get the provider reference for planner mode
crates/g3-config/src/lib.rs:627
↓ 2 callers
Method
get_project_info
(&self)
crates/g3-cli/src/ui_writer_impl.rs:218
↓ 2 callers
Method
get_provider_cache_control
Get the cache control config for the current provider (if Anthropic with cache enabled).
crates/g3-core/src/lib.rs:491
↓ 2 callers
Function
get_session_path
Get the path to a specific session's directory
crates/g3-core/src/session_continuation.rs:108
↓ 2 callers
Function
get_temperature
Get the configured temperature for a provider from config.
crates/g3-core/src/provider_config.rs:39
↓ 2 callers
Function
get_thinned_dir
Get the thinned content directory for a session. Returns .g3/sessions/<session_id>/thinned/
crates/g3-core/src/paths.rs:91
↓ 2 callers
Function
get_verification_key_path
Get the path to the global verification key: `~/.g3/verification.key`
crates/g3-core/src/tools/envelope.rs:46
↓ 2 callers
Function
get_workspace_endpoints
(host: &str)
crates/g3-providers/src/oauth.rs:93
↓ 2 callers
Method
get_workspace_path
(&self)
crates/g3-cli/src/ui_writer_impl.rs:214
↓ 2 callers
Function
has_commits_on_branch
Check if a branch has commits ahead of main
crates/studio/src/main.rs:370
↓ 2 callers
Function
has_consecutive_user_messages
Helper to check for consecutive user messages
crates/g3-core/tests/mock_provider_integration_test.rs:38
↓ 2 callers
Method
has_failures
Check if the pipeline has any failures
crates/studio/src/sdlc.rs:227
↓ 2 callers
Method
has_incomplete_todos
Check if this session has incomplete TODO items
crates/g3-core/src/session_continuation.rs:84
↓ 2 callers
Method
highlight_prompt
( &'s self, prompt: &'p str, _default: bool, )
crates/g3-cli/src/completion.rs:334
↓ 2 callers
Function
initialize_plan_dir
Initialize the planning directory structure
crates/g3-planner/src/planner.rs:127
↓ 2 callers
Method
into_result
Get the task result if successful
crates/g3-core/src/retry.rs:91
↓ 2 callers
Method
is_displayed
Check if element is displayed
crates/g3-computer-control/src/webdriver/mod.rs:88
↓ 2 callers
Function
is_self_handled_tool
(tool_name: &str)
crates/g3-core/src/streaming.rs:111
↓ 2 callers
Method
is_terminal
Check if this item is terminal (done or blocked).
crates/g3-core/src/tools/plan.rs:202
↓ 2 callers
Method
list
List all tracked background processes
crates/g3-core/src/background_process.rs:164
↓ 2 callers
Function
list_embedded_agents
Get all available embedded agent names.
crates/g3-cli/src/embedded_agents.rs:37
↓ 2 callers
Method
list_sessions
List session IDs from .g3/sessions/, sorted newest-first, with optional limit.
crates/g3-cli/src/completion.rs:125
↓ 2 callers
Function
list_toolset_names
List all available toolset names.
crates/g3-core/src/toolsets.rs:74
↓ 2 callers
Function
load_continuation_by_id
Load a session continuation by session ID (full or partial prefix match). This function searches for sessions matching the given ID: - First looks fo
crates/g3-core/src/session_continuation.rs:237
↓ 2 callers
Function
load_skill_file
Load a single skill file and add to the map.
crates/g3-core/src/skills/discovery.rs:143
↓ 2 callers
Method
load_token
(&self)
crates/g3-providers/src/oauth.rs:61
↓ 2 callers
Function
make_final_chunk_with_reason
Create a final completion chunk with stop reason.
crates/g3-providers/src/streaming.rs:70
↓ 2 callers
Function
make_test_checks
()
crates/g3-core/src/tools/plan.rs:1113
↓ 2 callers
Method
merge_to_main
Merge a branch to main
crates/studio/src/git.rs:128
↓ 2 callers
Method
next_response
Get the next response from the queue (or default)
crates/g3-providers/src/mock.rs:412
↓ 2 callers
Function
perform_compaction
Perform context compaction by summarizing conversation history. This is the unified implementation used by both: - `force_compact()` - manual compact
crates/g3-core/src/compaction.rs:145
↓ 2 callers
Function
preflight_validate_max_tokens
Pre-flight check to validate and adjust max_tokens for the thinking.budget_tokens constraint. Returns the adjusted max_tokens that satisfies: max_toke
crates/g3-core/src/provider_config.rs:107
↓ 2 callers
Method
preflight_validate_max_tokens
Get the thinking budget tokens for Anthropic provider, if configured. Pre-flight check to validate max_tokens for thinking.budget_tokens constraint.
crates/g3-core/src/lib.rs:515
↓ 2 callers
Function
prepare_context
Prepare the inference context: create context, tokenize prompt, decode initial batch.
crates/g3-providers/src/embedded/provider.rs:372
↓ 2 callers
Method
print_agent_response
(&self, _content: &str)
crates/g3-core/src/ui_writer.rs:186
↓ 2 callers
Function
print_loaded_status
Print a status line showing what project files were loaded. Format: " ✓ README ✓ AGENTS.md ✓ Memory"
crates/g3-cli/src/display.rs:172
↓ 2 callers
Function
print_panic_report
( output: &SimpleOutput, agent: &Agent<ConsoleUiWriter>, turn_metrics: &[TurnMetrics], start_t
crates/g3-cli/src/autonomous.rs:670
↓ 2 callers
Method
print_provider_banner
Print provider diagnostics through the UiWriter for visibility
crates/g3-core/src/lib.rs:649
↓ 2 callers
Function
print_workspace_path
Print the workspace path in a consistent format.
crates/g3-cli/src/display.rs:98
↓ 2 callers
Method
println
(&self, message: &str)
crates/g3-planner/src/llm.rs:223
↓ 2 callers
Function
read_agents_config
Read AGENTS.md configuration from the workspace directory. Returns formatted content with emoji prefix, or None if not found.
crates/g3-cli/src/project_files.rs:15
↓ 2 callers
Function
read_file_range
Read a specific byte range from a file using seek (O(1) seek + O(n) read where n = range size). Handles UTF-8 boundary issues by extending the read sl
crates/g3-core/src/tools/file_ops.rs:233
↓ 2 callers
Function
read_rulespec
Read a rulespec from `analysis/rulespec.yaml` relative to the working directory.
crates/g3-core/src/tools/invariants.rs:745
↓ 2 callers
Function
read_workspace_memory
Read workspace memory from analysis/memory.md in the workspace directory. Returns formatted content with emoji prefix and size info, or None if not fo
crates/g3-cli/src/project_files.rs:39
↓ 2 callers
Method
recalculate_max_tokens
Helper to recalculate max_tokens after context reduction.
crates/g3-core/src/lib.rs:614
↓ 2 callers
Function
record_turn_metrics
( turn_metrics: &mut Vec<TurnMetrics>, turn: usize, turn_start_time: Instant, turn_start_token
crates/g3-cli/src/autonomous.rs:623
↓ 2 callers
Function
recoverable_error_name
Get a human-readable name for a recoverable error type.
crates/g3-cli/src/task_execution.rs:16
← previous
next →
401–500 of 3,053, ranked by callers