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
↓ 5 callers
Function
make_text_chunk
Create a text content chunk (not finished).
crates/g3-providers/src/streaming.rs:86
↓ 5 callers
Method
mark_tool_calls_consumed
(&mut self)
crates/g3-core/src/streaming_parser.rs:518
↓ 5 callers
Method
metadata_path
Get the path to this session's metadata file
crates/studio/src/session.rs:91
↓ 5 callers
Method
println
(&self, _message: &str)
crates/g3-core/src/ui_writer.rs:171
↓ 5 callers
Function
read_plan
Read a plan from the session's plan.g3.md file.
crates/g3-core/src/tools/plan.rs:581
↓ 5 callers
Method
remove
Remove a research task (e.g., after it's been fully processed)
crates/g3-core/src/pending_research.rs:278
↓ 5 callers
Function
retry_operation
Execute a simple async operation with retry (for non-agent tasks) This is a simpler retry wrapper for operations like LLM API calls that don't involv
crates/g3-core/src/retry.rs:241
↓ 5 callers
Method
save_session_continuation
Save a session continuation artifact Save session continuation for potential resumption
crates/g3-core/src/lib.rs:1577
↓ 5 callers
Method
set_plan_mode
Enable or disable plan mode (blocks file changes without approved plan)
crates/g3-core/src/lib.rs:1663
↓ 5 callers
Method
set_workspace_path
(&self, path: std::path::PathBuf)
crates/g3-cli/src/ui_writer_impl.rs:1111
↓ 5 callers
Function
shorten_paths_in_command
Shorten any paths found within a shell command string. This replaces project paths with `<project_name>/`, workspace paths with `./`, and home paths w
crates/g3-cli/src/display.rs:67
↓ 5 callers
Method
take_completed
Take all completed research tasks that haven't been injected yet Marks them as injected so they won't be returned again
crates/g3-core/src/pending_research.rs:262
↓ 5 callers
Function
truncate_for_display
Truncate a string value for display, respecting UTF-8 boundaries. Takes only the first line to avoid multi-line output in compact display.
crates/g3-core/src/streaming.rs:353
↓ 4 callers
Method
approve
Approve the current revision.
crates/g3-core/src/tools/plan.rs:238
↓ 4 callers
Function
are_tool_calls_duplicate
Check if two tool calls are duplicates (same tool and args)
crates/g3-core/src/streaming.rs:374
↓ 4 callers
Function
build_summary_messages
Build the summary request messages from conversation history.
crates/g3-core/src/compaction.rs:105
↓ 4 callers
Function
calculate_summary_max_tokens
Calculate max_tokens for a summary request, ensuring it satisfies the thinking constraint. Returns (max_tokens, whether_fallback_is_needed) IMPORTANT
crates/g3-core/src/provider_config.rs:147
↓ 4 callers
Function
canonical_facts_yaml
Compute a canonical YAML representation of the envelope facts. This produces a deterministic string by sorting keys, ensuring the same facts always p
crates/g3-core/src/tools/envelope.rs:119
↓ 4 callers
Method
convert_messages
(&self, messages: &[Message])
crates/g3-providers/src/databricks.rs:348
↓ 4 callers
Method
create_request_builder
(&mut self, streaming: bool)
crates/g3-providers/src/databricks.rs:315
↓ 4 callers
Function
create_test_agent
Create a test agent in a temporary directory
crates/g3-core/tests/stream_completion_characterization_test.rs:509
↓ 4 callers
Function
create_test_agent
(temp_dir: &TempDir)
crates/g3-core/tests/plan_new_after_complete_test.rs:19
↓ 4 callers
Method
do_thin_context
Internal helper: thin context and track the event
crates/g3-core/src/lib.rs:1279
↓ 4 callers
Method
ensure_workspace_exists
Create the workspace directory if it doesn't exist
crates/g3-core/src/project.rs:118
↓ 4 callers
Function
execute_rehydrate
Execute the rehydrate tool. Loads a fragment from disk and returns its contents for the LLM to review.
crates/g3-core/src/tools/acd.rs:17
↓ 4 callers
Function
expand_tilde
Expand tilde in path to home directory.
crates/g3-core/src/skills/discovery.rs:159
↓ 4 callers
Method
extract_last_block
Extract the last block from the response (for coach feedback in autonomous mode) This looks for the final_output content which is the last substantial
crates/g3-core/src/task_result.rs:58
↓ 4 callers
Method
extract_word
Find the start of the current "word" being typed, respecting quotes. Returns (word_start, word) where word_start is the byte index.
crates/g3-cli/src/completion.rs:51
↓ 4 callers
Function
find_last_tool_call_start
(text: &str)
crates/g3-core/src/streaming_parser.rs:210
↓ 4 callers
Function
format_duration
Format a duration for display
crates/g3-core/src/streaming.rs:235
↓ 4 callers
Method
format_inline_content
Format inline content with bold, italic, code, strikethrough, and links.
crates/g3-cli/src/streaming_markdown.rs:612
↓ 4 callers
Function
format_str_replace_summary
Format a str_replace result summary.
crates/g3-core/src/streaming.rs:450
↓ 4 callers
Function
format_write_file_result
Format a write_file result for compact display. Parses the tool result which is in format: "wrote N lines | M chars" Returns a compact summary like "w
crates/g3-core/src/streaming.rs:435
↓ 4 callers
Function
get_dirty_files
Get the set of dirty file paths from `git status --porcelain`. Returns an empty set if not a git repo or if the command fails. Each entry is the file
crates/g3-core/src/tools/plan.rs:996
↓ 4 callers
Function
get_g3_binary_path
Get the path to the g3 binary (same directory as studio)
crates/studio/src/main.rs:225
↓ 4 callers
Function
get_language_prompts_for_workspace
Get all language prompts for detected languages in the workspace. Returns formatted content ready for injection into the system prompt.
crates/g3-cli/src/language_prompts.rs:105
↓ 4 callers
Function
get_max_tokens
Get the configured max_tokens for a provider from config.
crates/g3-core/src/provider_config.rs:26
↓ 4 callers
Function
get_plan_path
Get the path to the plan.g3.md file for a session.
crates/g3-core/src/tools/plan.rs:576
↓ 4 callers
Function
get_session_todo_path
Get the path to the todo.g3.md file for a specific session. Returns .g3/sessions/<session_id>/todo.g3.md
crates/g3-core/src/paths.rs:32
↓ 4 callers
Function
get_sessions_dir
Get the path to the .g3/sessions directory (where all sessions are stored)
crates/g3-core/src/session_continuation.rs:103
↓ 4 callers
Method
get_status
Get the status of a specific research task
crates/g3-core/src/pending_research.rs:214
↓ 4 callers
Method
get_token
(&mut self)
crates/g3-providers/src/databricks.rs:165
↓ 4 callers
Method
get_tools
Get the tool definitions for this toolset.
crates/g3-core/src/toolsets.rs:27
↓ 4 callers
Method
is_complete
Check if the pipeline is complete
crates/studio/src/sdlc.rs:217
↓ 4 callers
Function
list_fragments
List all fragments for a session, ordered by creation time.
crates/g3-core/src/acd.rs:342
↓ 4 callers
Function
load_skills_from_dir
Load skills from a directory into the map. Each subdirectory should contain a SKILL.md file.
crates/g3-core/src/skills/discovery.rs:110
↓ 4 callers
Function
make_test_check
()
crates/g3-core/src/tools/plan.rs:1109
↓ 4 callers
Function
make_tool_call_with_id
(tool: &str, args: serde_json::Value, id: &str)
crates/g3-core/tests/end_of_turn_behavior_test.rs:121
↓ 4 callers
Method
new_requirements_path
Get the path to new_requirements.md
crates/g3-planner/src/planner.rs:41
↓ 4 callers
Function
normalize_path_unicode_spaces
Normalize Unicode space characters in a file path to regular ASCII spaces. macOS uses special Unicode space characters in certain filenames: - U+202F
crates/g3-core/src/utils.rs:62
↓ 4 callers
Function
read_envelope
Read an action envelope from the session's envelope.yaml file.
crates/g3-core/src/tools/invariants.rs:757
↓ 4 callers
Method
recalculate_tokens
Recalculate token usage based on current conversation history.
crates/g3-core/src/context_window.rs:205
↓ 4 callers
Method
reset_with_summary_and_stub
Reset context window with a summary and optional ACD stub. Preserves the original system prompt as the first message. If stub is provided, it's added
crates/g3-core/src/context_window.rs:315
↓ 4 callers
Method
resolve_max_tokens
Resolve the max_tokens to use for a given provider, applying fallbacks.
crates/g3-core/src/lib.rs:509
↓ 4 callers
Function
response_with_cache_stats
Create a MockResponse with specific cache statistics
crates/g3-core/tests/cache_stats_integration_test.rs:42
↓ 4 callers
Method
send_auto_memory_reminder
Send an auto-memory reminder to the LLM if tools were called during the turn. This prompts the LLM to call the `remember` tool if it discovered any ke
crates/g3-core/src/lib.rs:1862
↓ 4 callers
Function
stream_char_by_char
Feed content character by character (worst case for streaming)
crates/g3-cli/tests/streaming_markdown_test.rs:32
↓ 4 callers
Method
to_yaml_value
Convert the envelope to a YamlValue for selector evaluation.
crates/g3-core/src/tools/invariants.rs:367
↓ 4 callers
Method
todo_path
Get the path to todo.g3.md
crates/g3-planner/src/planner.rs:51
↓ 4 callers
Function
truncate_line
Truncate a line for tool output display
crates/g3-core/src/streaming.rs:364
↓ 4 callers
Function
truncate_to_word_boundary
Truncate a string to approximately max_len characters, ending at a word boundary. This function attempts to break at a space character for cleaner di
crates/g3-core/src/utils.rs:24
↓ 4 callers
Method
ui_writer
Get a reference to the UI writer.
crates/g3-core/src/lib.rs:1168
↓ 4 callers
Method
validate
Validate that the check has required fields.
crates/g3-core/src/tools/plan.rs:85
↓ 4 callers
Function
verify_code_location
Verify a code location evidence (file exists, line numbers valid). # Arguments `file_path` - Path to the file (relative to working_dir or absolute) `
crates/g3-core/src/tools/plan.rs:465
↓ 4 callers
Method
with_notes
(mut self, notes: impl Into<String>)
crates/g3-core/src/tools/invariants.rs:203
↓ 3 callers
Method
add_streaming_tokens
Update cumulative token usage (for streaming) when no provider usage data is available. NOTE: This only updates cumulative_tokens, not used_tokens.
crates/g3-core/src/context_window.rs:196
↓ 3 callers
Method
cleanup
Clean up all processes on shutdown
crates/g3-core/src/background_process.rs:203
↓ 3 callers
Method
clear_project_content
Clear project content from the system message. This is equivalent to calling `set_project_content(None)`.
crates/g3-core/src/lib.rs:1535
↓ 3 callers
Function
convert_messages
Convert g3 messages to Gemini format Key differences: - Gemini uses "model" instead of "assistant" - System messages go in system_instruction, not co
crates/g3-providers/src/gemini.rs:216
↓ 3 callers
Function
create_core_tools
Create the core tools that are always available
crates/g3-core/src/tool_definitions.rs:34
↓ 3 callers
Method
create_request_body
( &self, messages: &[Message], tools: Option<&[Tool]>, streaming: bool,
crates/g3-providers/src/databricks.rs:375
↓ 3 callers
Function
create_test_config_with_thinking
Helper function to create a minimal config for testing
crates/g3-core/tests/test_preflight_max_tokens.rs:11
↓ 3 callers
Function
create_tool_definitions
Create tool definitions for native tool calling providers. Returns a vector of Tool definitions that describe the available tools and their input sch
crates/g3-core/src/tool_definitions.rs:28
↓ 3 callers
Function
create_tool_message
Creates an Assistant message with a tool call in g3's JSON format.
crates/g3-planner/src/lib.rs:128
↓ 3 callers
Method
current_requirements_path
Get the path to current_requirements.md
crates/g3-planner/src/planner.rs:46
↓ 3 callers
Method
delete
Delete pipeline state from disk
crates/studio/src/sdlc.rs:207
↓ 3 callers
Function
display_pipeline
Display the pipeline with current stage highlighted
crates/studio/src/sdlc.rs:358
↓ 3 callers
Function
ensure_history_file
Ensure the planner_history.txt file exists, creating it if necessary
crates/g3-planner/src/history.rs:27
↓ 3 callers
Function
ensure_original_requirements_tag
Ensure the new_requirements.md file has the ORIGINAL_REQUIREMENTS tag
crates/g3-planner/src/planner.rs:298
↓ 3 callers
Function
estimate_tokens_from_bytes
Estimate token count from byte size (must match file_ops.rs)
crates/g3-core/tests/read_file_token_limit_test.rs:25
↓ 3 callers
Function
evaluate_predicate_datalog
Evaluate a single predicate against the fact lookup table.
crates/g3-core/src/tools/datalog.rs:583
↓ 3 callers
Function
execute_task_with_retry
Execute a task with retry logic for recoverable errors.
crates/g3-cli/src/task_execution.rs:29
↓ 3 callers
Method
execute_tool_in_dir
Execute a tool with an optional working directory (for discovery commands)
crates/g3-core/src/lib.rs:3003
↓ 3 callers
Function
expand_codepath
Expand tilde in path to home directory
crates/g3-planner/src/planner.rs:73
↓ 3 callers
Function
explore_codebase
Main entry point for exploring a codebase at the given path. Detects which languages are present and generates a comprehensive report.
crates/g3-planner/src/code_explore.rs:12
↓ 3 callers
Method
extract_final_output
Legacy method - extract the final_output content from the response Now just delegates to extract_last_block() for backwards compatibility
crates/g3-core/src/task_result.rs:29
↓ 3 callers
Function
extract_text_from_parts
Extract text content from Gemini response parts
crates/g3-providers/src/gemini.rs:269
↓ 3 callers
Function
extract_tool_name_from_content
Extract tool name from assistant message content.
crates/g3-core/src/acd.rs:212
↓ 3 callers
Method
fail
Mark a research task as failed
crates/g3-core/src/pending_research.rs:191
↓ 3 callers
Method
filter_json_tool_calls
Filter JSON tool calls from streaming content for display. This is a UI concern - the raw content should be preserved for logging. Default implementat
crates/g3-core/src/ui_writer.rs:131
↓ 3 callers
Method
finalize_streaming_turn
Build the final response and prepare for return. This is the single canonical path for completing a streaming turn: 1. Finish streaming markdown 2. S
crates/g3-core/src/lib.rs:1707
↓ 3 callers
Function
finalize_tool_calls
Convert accumulated tool calls map to final Vec<ToolCall>.
crates/g3-providers/src/databricks.rs:117
↓ 3 callers
Method
find_element
( &mut self, selector: &str, )
crates/g3-core/src/webdriver_session.rs:37
↓ 3 callers
Function
find_stop_sequence
Check if text contains any stop sequence. Returns the truncation position if found.
crates/g3-providers/src/embedded/provider.rs:423
↓ 3 callers
Method
for_player
Create a copy of the config for player mode in autonomous execution
crates/g3-config/src/lib.rs:671
↓ 3 callers
Function
format_coverage_summary
Format a code_coverage result summary.
crates/g3-core/src/streaming.rs:486
↓ 3 callers
Function
format_glm4
GLM-4 ChatGLM4 format: [gMASK]<sop><|role|>\ncontent
crates/g3-providers/src/embedded/provider.rs:207
↓ 3 callers
Function
format_input
Format user input with markdown and special highlighting (ALL CAPS, quotes).
crates/g3-cli/src/input_formatter.rs:77
↓ 3 callers
Function
format_read_file_summary
Format a read_file result summary (e.g., "✅ read 42 lines | 1.2k chars").
crates/g3-core/src/streaming.rs:413
↓ 3 callers
Function
format_rehydrate_summary
Format a rehydrate result summary.
crates/g3-core/src/streaming.rs:496
← previous
next →
201–300 of 3,053, ranked by callers