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
↓ 3 callers
Function
format_remember_summary
Format a remember tool result summary.
crates/g3-core/src/streaming.rs:461
↓ 3 callers
Function
format_screenshot_summary
Format a take_screenshot result summary.
crates/g3-core/src/streaming.rs:473
↓ 3 callers
Function
format_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 callers
Function
format_workspace_path
Format a workspace path for display, replacing home directory with ~.
crates/g3-cli/src/display.rs:9
↓ 3 callers
Function
generate_fragment_id
Generate a unique fragment ID.
crates/g3-core/src/acd.rs:183
↓ 3 callers
Function
generate_turn_histogram
Generate a histogram showing tokens used and wall clock time per turn.
crates/g3-cli/src/metrics.rs:29
↓ 3 callers
Function
get_agent_language_prompt
Get agent-specific language prompt for a specific agent and language.
crates/g3-cli/src/language_prompts.rs:137
↓ 3 callers
Function
get_embedded_agent
Get an embedded agent prompt by name.
crates/g3-cli/src/embedded_agents.rs:29
↓ 3 callers
Function
get_envelope_path
Get the path to the envelope.yaml file for a session.
crates/g3-core/src/tools/invariants.rs:740
↓ 3 callers
Function
get_g3_dir
Get the path to the .g3 directory
crates/g3-core/src/session_continuation.rs:93
↓ 3 callers
Function
get_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 callers
Method
get_provider_info
(&self)
crates/g3-core/src/lib.rs:780
↓ 3 callers
Function
get_stop_sequences_for_model
Get stop sequences for a model type.
crates/g3-providers/src/embedded/provider.rs:293
↓ 3 callers
Function
get_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 callers
Method
get_tool_definitions_with_loaded_toolsets
Get tool definitions including any dynamically loaded toolsets.
crates/g3-core/src/lib.rs:629
↓ 3 callers
Method
has_unexecuted_tool_call
(&self)
crates/g3-core/src/streaming_parser.rs:503
↓ 3 callers
Method
is_complete
Check if all items are terminal (done or blocked).
crates/g3-core/src/tools/plan.rs:243
↓ 3 callers
Function
is_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 callers
Function
is_position_in_fence_ranges
(pos: usize, ranges: &[(usize, usize)])
crates/g3-core/src/streaming_parser.rs:111
↓ 3 callers
Function
is_process_running
Check if a process is running by PID
crates/studio/src/main.rs:857
↓ 3 callers
Method
list_pending
List all pending (not yet injected) research tasks
crates/g3-core/src/pending_research.rs:226
↓ 3 callers
Method
load
Load a fragment from disk.
crates/g3-core/src/acd.rs:164
↓ 3 callers
Function
load_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 callers
Method
log_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 callers
Method
mark_paused
Mark session as paused (for interactive sessions)
crates/studio/src/session.rs:142
↓ 3 callers
Function
merge_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 callers
Method
model
(&self)
crates/g3-core/tests/streaming_completion_test.rs:225
↓ 3 callers
Method
parse
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 callers
Function
parse_commit_message
Parse commit message from LLM response
crates/g3-planner/src/planner.rs:503
↓ 3 callers
Function
parse_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 callers
Function
parse_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 callers
Method
print_agent_prompt
(&self)
crates/g3-core/src/ui_writer.rs:185
↓ 3 callers
Function
print_final_report
( output: &SimpleOutput, agent: &Agent<ConsoleUiWriter>, turn_metrics: &[TurnMetrics], start_t
crates/g3-cli/src/autonomous.rs:699
↓ 3 callers
Method
print_g3_progress
(&self, _message: &str)
crates/g3-core/src/ui_writer.rs:175
↓ 3 callers
Method
print_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 callers
Method
print_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 callers
Method
print_smart
(&self, message: &str)
crates/g3-cli/src/simple_output.rs:22
↓ 3 callers
Method
remove
Remove a worktree and its branch
crates/studio/src/git.rs:67
↓ 3 callers
Function
remove_header
Remove the header line (# Workspace Memory and > Updated: ...) from content.
crates/g3-core/src/tools/memory.rs:95
↓ 3 callers
Method
reset_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 callers
Function
resolve_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 callers
Method
restore_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 callers
Function
retry_with_backoff
Retry logic for async operations
crates/g3-core/src/error_handling.rs:310
↓ 3 callers
Function
run_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 callers
Method
save
Save session metadata
crates/studio/src/session.rs:96
↓ 3 callers
Method
save_context_window
Save the entire context window to a per-session file
crates/g3-core/src/lib.rs:1145
↓ 3 callers
Method
save_token
(&self, token_data: &TokenData)
crates/g3-providers/src/oauth.rs:83
↓ 3 callers
Method
set_project_path
(&self, path: std::path::PathBuf, name: String)
crates/g3-cli/src/ui_writer_impl.rs:1115
↓ 3 callers
Function
setup_test_dir
Create a temporary directory with a test file
crates/g3-core/tests/tool_execution_test.rs:37
↓ 3 callers
Function
should_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 callers
Function
stream_variable_chunks
Feed content in random-ish chunk sizes
crates/g3-cli/tests/streaming_markdown_test.rs:37
↓ 3 callers
Method
supports_cache_control
(&self)
crates/g3-core/tests/streaming_completion_test.rs:233
↓ 3 callers
Method
text
Get the element's text content
crates/g3-computer-control/src/webdriver/mod.rs:68
↓ 3 callers
Function
truncate_at_stop_sequence
Truncate text at the first stop sequence, if any.
crates/g3-providers/src/embedded/provider.rs:433
↓ 3 callers
Function
truncate_for_display
Truncate a string for display, adding ellipsis if needed.
crates/g3-cli/src/project_files.rs:168
↓ 3 callers
Function
try_extract_json_tool_call
Extract JSON tool call pattern
crates/g3-core/src/feedback_extraction.rs:251
↓ 3 callers
Function
try_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 callers
Method
validate
Validate the claim structure.
crates/g3-core/src/tools/invariants.rs:71
↓ 3 callers
Method
validate_provider_reference
Validate a provider reference (format: "<provider_type>.<config_name>")
crates/g3-config/src/lib.rs:436
↓ 3 callers
Method
validate_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 callers
Method
with_provider_override
Create a copy of the config with a different default provider
crates/g3-config/src/lib.rs:651
↓ 3 callers
Function
write_plan
Write a plan to the session's plan.g3.md file.
crates/g3-core/src/tools/plan.rs:597
↓ 2 callers
Function
accept_session
Internal function to accept a session with a custom prefix
crates/studio/src/main.rs:476
↓ 2 callers
Method
all_ok
Check if all diagnostics passed
crates/g3-computer-control/src/webdriver/diagnostics.rs:37
↓ 2 callers
Function
apply_quote_highlighting
Apply cyan highlighting to quoted text markers (runs after markdown formatting).
crates/g3-cli/src/input_formatter.rs:57
↓ 2 callers
Method
back
(&mut self)
crates/g3-core/src/webdriver_session.rs:99
↓ 2 callers
Function
build_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 callers
Method
build_request
Build a GeminiRequest from a CompletionRequest.
crates/g3-providers/src/gemini.rs:521
↓ 2 callers
Method
calculate_summary_max_tokens
Calculate max_tokens for a summary request.
crates/g3-core/src/lib.rs:528
↓ 2 callers
Function
check_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 callers
Function
check_startup_state
Check startup state and determine if recovery is needed
crates/g3-planner/src/planner.rs:198
↓ 2 callers
Function
check_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 callers
Method
clear_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 callers
Function
clear_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 callers
Method
clear_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 callers
Method
collect_output
Collect all pending output into a single string.
crates/g3-cli/src/streaming_markdown.rs:783
↓ 2 callers
Function
completed_requirements_filename
Generate the completed requirements filename
crates/g3-planner/src/history.rs:153
↓ 2 callers
Function
completed_todo_filename
Generate the completed todo filename
crates/g3-planner/src/history.rs:158
↓ 2 callers
Function
compress_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 callers
Method
context_window_size
(&self)
crates/g3-providers/src/gemini.rs:628
↓ 2 callers
Function
convert_tools
Convert g3 tools to Gemini format
crates/g3-providers/src/gemini.rs:249
↓ 2 callers
Method
convert_tools
(&self, tools: &[Tool])
crates/g3-providers/src/anthropic.rs:349
↓ 2 callers
Method
convert_tools
(&self, tools: &[Tool])
crates/g3-providers/src/databricks.rs:334
↓ 2 callers
Function
convert_usage
Convert Gemini usage metadata to g3 Usage
crates/g3-providers/src/gemini.rs:302
↓ 2 callers
Method
count_cache_controls_in_history
Count how many cache_control annotations exist in the conversation history
crates/g3-core/src/lib.rs:482
↓ 2 callers
Method
create_request_body
( &self, messages: &[Message], tools: Option<&[Tool]>, stream: bool, m
crates/g3-providers/src/openai.rs:66
↓ 2 callers
Method
create_request_builder
(&self, streaming: bool)
crates/g3-providers/src/anthropic.rs:328
↓ 2 callers
Function
decode_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 callers
Function
determine_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 callers
Function
discover_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 callers
Method
do_thin_context_all
Internal helper: thin all context and track the event
crates/g3-core/src/lib.rs:1286
↓ 2 callers
Method
effective_max_tokens
(&self)
crates/g3-providers/src/embedded/provider.rs:174
↓ 2 callers
Method
emit_blockquote
Emit a complete blockquote.
crates/g3-cli/src/streaming_markdown.rs:713
↓ 2 callers
Method
emit_code_block
(&mut self)
crates/g3-cli/src/streaming_markdown.rs:690
↓ 2 callers
Method
emit_formatted_inline
Emit formatted inline content.
crates/g3-cli/src/streaming_markdown.rs:534
↓ 2 callers
Method
emit_table
Emit a complete table.
crates/g3-cli/src/streaming_markdown.rs:721
↓ 2 callers
Function
ensure_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 callers
Function
escape_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 callers
Function
estimate_fragment_tokens
Estimate token count for messages.
crates/g3-core/src/acd.rs:253
↓ 2 callers
Method
estimate_tokens
Estimate token count from text (~4 chars per token)
crates/g3-providers/src/embedded/provider.rs:180
← previous
next →
301–400 of 3,053, ranked by callers