Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Louisym/MiniCC
/ functions
Functions
1,659 in github.com/Louisym/MiniCC
⨍
Functions
1,659
◇
Types & classes
498
↓ 4 callers
Method
assign_task
给 Worker 分配任务。 关键:任务描述必须是自包含的! 不能说"根据之前的讨论去做",因为 Worker 不知道之前讨论了什么。 对应 Reference: EP03 §2 "协调者必须编写自包含的
tutorials/13_multi_agent_coordination.py:367
↓ 4 callers
Function
backoff_for_attempt
计算第 N 次重试应该等多久(毫秒)。 对应源码: api/client.rs:325-336 fn backoff_for_attempt(&self, attempt: u32) -> Result<Duration, ApiError> {
tutorials/11_error_recovery_and_retry.py:187
↓ 4 callers
Method
base_url
(&self)
rust/crates/api/tests/client_integration.rs:287
↓ 4 callers
Function
build_port_manifest
(src_root: Path | None = None)
src/port_manifest.py:30
↓ 4 callers
Method
commands_path
(&self)
rust/crates/compat-harness/src/lib.rs:35
↓ 4 callers
Function
cost_for_tokens
(tokens: u32, usd_per_million_tokens: f64)
rust/crates/runtime/src/usage.rs:153
↓ 4 callers
Function
credentials_path
()
rust/crates/runtime/src/oauth.rs:258
↓ 4 callers
Method
discover_tools
(&mut self)
rust/crates/runtime/src/mcp_stdio.rs:359
↓ 4 callers
Method
estimate_cost_usd_with_pricing
(self, pricing: ModelPricing)
rust/crates/runtime/src/usage.rs:94
↓ 4 callers
Function
estimate_session_tokens
估算整个对话的 token 数
tutorials/07_auto_compaction.py:123
↓ 4 callers
Method
execute
(self, tool_name: str, tool_input: str)
tutorials/18_design_patterns_for_agents.py:81
↓ 4 callers
Method
finish
( &mut self, label: &str, theme: &ColorTheme, out: &mut impl Write, )
rust/crates/rusty-claude-cli/src/render.rs:81
↓ 4 callers
Method
from_workspace
(cls)
src/query_engine.py:46
↓ 4 callers
Function
initialize_repo
(cwd: &Path)
rust/crates/rusty-claude-cli/src/init.rs:80
↓ 4 callers
Method
is_denied
(self)
tutorials/15_permission_and_hook_pipeline.py:239
↓ 4 callers
Method
is_denied
(self)
tutorials/19_process_and_pipe_communication.py:612
↓ 4 callers
Function
load_oauth_credentials
()
rust/crates/runtime/src/oauth.rs:262
↓ 4 callers
Function
load_system_prompt
( cwd: impl Into<PathBuf>, current_date: impl Into<String>, os_name: impl Into<String>, os_ver
rust/crates/runtime/src/prompt.rs:404
↓ 4 callers
Method
loaded_entries
(&self)
rust/crates/runtime/src/config.rs:265
↓ 4 callers
Method
messages
(&self)
rust/crates/runtime/src/hooks.rs:44
↓ 4 callers
Method
next_event
(&mut self)
rust/crates/api/src/client.rs:538
↓ 4 callers
Function
optional_bool
( object: &BTreeMap<String, JsonValue>, key: &str, context: &str, )
rust/crates/runtime/src/config.rs:684
↓ 4 callers
Method
push_chunk
推入一块新收到的数据,返回解析出的完整事件列表。 可能返回 0 个事件(数据不够完整) 可能返回 1 个事件(刚好凑齐一个) 可能返回多个事件(一块数据里包含了好几个事件) 对应源码: runtime/sse.rs
tutorials/10_sse_streaming.py:147
↓ 4 callers
Method
read_line
(&mut self)
rust/crates/rusty-claude-cli/src/input.rs:129
↓ 4 callers
Method
record
(&mut self, usage: TokenUsage)
rust/crates/runtime/src/usage.rs:186
↓ 4 callers
Method
register
注册一个工具。 参数: spec: 工具说明书 handler: 工具的执行函数 返回: self(返回自身是为了支持链式调用,后面演示)
tutorials/03_tool_system.py:270
↓ 4 callers
Function
render_slash_command_help
()
rust/crates/commands/src/lib.rs:314
↓ 4 callers
Function
required_u32
(object: &BTreeMap<String, JsonValue>, key: &str)
rust/crates/runtime/src/session.rs:371
↓ 4 callers
Function
resolve_model_alias
(model: &str)
rust/crates/rusty-claude-cli/src/main.rs:291
↓ 4 callers
Method
resolve_request
( &self, enabled_override: Option<bool>, namespace_override: Option<bool>, net
rust/crates/runtime/src/sandbox.rs:87
↓ 4 callers
Method
route_prompt
(self, prompt: str, limit: int = 5)
src/runtime.py:90
↓ 4 callers
Function
run_agent
这个函数不知道也不关心 client 是真的还是假的
tutorials/18_design_patterns_for_agents.py:124
↓ 4 callers
Method
run_pre_tool_use
(&self, tool_name: &str, tool_input: &str)
rust/crates/runtime/src/hooks.rs:66
↓ 4 callers
Function
sample_request
(stream: bool)
rust/crates/api/tests/client_integration.rs:411
↓ 4 callers
Function
sanitize_generated_message
(value: &str)
rust/crates/rusty-claude-cli/src/main.rs:2191
↓ 4 callers
Method
save_to_path
(&self, path: impl AsRef<Path>)
rust/crates/runtime/src/session.rs:88
↓ 4 callers
Function
script_transport
(script_path: &Path)
rust/crates/runtime/src/mcp_stdio.rs:1138
↓ 4 callers
Function
spawn_server
( state: Arc<Mutex<Vec<CapturedRequest>>>, responses: Vec<String>, )
rust/crates/api/tests/client_integration.rs:298
↓ 4 callers
Method
spawn_worker
生成一个新 Worker。 对应 Reference: EP08 §1 生成队友 spawnMultiAgent.ts (1,094 行) 1. 解析模型 2. 生成唯一名称 3. 检测后端
tutorials/13_multi_agent_coordination.py:350
↓ 4 callers
Method
stdin
(&mut self, cfg: std::process::Stdio)
rust/crates/runtime/src/hooks.rs:258
↓ 4 callers
Method
stream
(self, messages)
tutorials/18_design_patterns_for_agents.py:303
↓ 4 callers
Method
stream_message
( &self, request: &MessageRequest, )
rust/crates/api/src/client.rs:217
↓ 4 callers
Method
submit_message
( self, prompt: str, matched_commands: tuple[str, ...] = (), matched_tools: tu
src/query_engine.py:61
↓ 4 callers
Function
temp_dir
()
rust/crates/rusty-claude-cli/src/init.rs:341
↓ 4 callers
Function
temp_dir
()
rust/crates/runtime/src/mcp_stdio.rs:831
↓ 4 callers
Method
tools_path
(&self)
rust/crates/compat-harness/src/lib.rs:40
↓ 4 callers
Function
truncate_summary
(content: &str, max_chars: usize)
rust/crates/runtime/src/compact.rs:317
↓ 4 callers
Function
write_file
(path: &str, content: &str)
rust/crates/runtime/src/file_ops.rs:158
↓ 3 callers
Method
__init__
(self, status_code: int, message: str = "")
mini_claude_code/retry.py:52
↓ 3 callers
Method
__init__
(self, message: str = "missing API key")
tutorials/11_error_recovery_and_retry.py:125
↓ 3 callers
Function
_first_text
取消息第一个非空文本 block。源码: compact.rs:281-288
mini_claude_code/compact.py:162
↓ 3 callers
Function
_first_text
取第一个非空文本块 — 源码 compact.rs:281-288
tutorials/16_prompt_building_and_compaction.py:575
↓ 3 callers
Method
_inbox_path
(self, agent_name: str)
tutorials/13_multi_agent_coordination.py:194
↓ 3 callers
Method
_session_path
JSONL 文件路径。CC: ~/.claude/projects/{cwd}/{session_id}.jsonl
mini_claude_code/storage.py:68
↓ 3 callers
Method
allow
(messages: Optional[list[str]] = None)
mini_claude_code/hooks.py:47
↓ 3 callers
Method
api_key
(&self)
rust/crates/api/src/client.rs:49
↓ 3 callers
Method
append_message
追加一条消息到 JSONL 文件。 这是最核心的写入操作。每条消息一行,追加到文件末尾。 对应 Reference: EP09 §2 Project.appendEntry() → enqueueWrite(filePat
tutorials/12_session_persistence.py:307
↓ 3 callers
Function
async_task
(name, seconds)
tutorials/17_async_await_for_sse.py:59
↓ 3 callers
Method
authorize
( &self, tool_name: &str, input: &str, mut prompter: Option<&mut dyn Permissio
rust/crates/runtime/src/permissions.rs:89
↓ 3 callers
Method
bearer_token
(&self)
rust/crates/api/src/client.rs:57
↓ 3 callers
Method
bootstrap_session
(self, prompt: str, limit: int = 5)
src/runtime.py:109
↓ 3 callers
Method
build
构建最终的 system prompt sections — 源码 prompt.rs:134-156 返回的 sections 列表结构: [0] 介绍(你是什么) [1] 输出风格(可选) [2] 系统规则 [3
tutorials/16_prompt_building_and_compaction.py:254
↓ 3 callers
Function
build_linux_sandbox_command
( command: &str, cwd: &Path, status: &SandboxStatus, )
rust/crates/runtime/src/sandbox.rs:211
↓ 3 callers
Function
collapse_whitespace
(input: &str)
rust/crates/tools/src/lib.rs:1058
↓ 3 callers
Method
command
(self, name: str)
src/execution_registry.py:32
↓ 3 callers
Function
command_exists
(command: &str)
rust/crates/tools/src/lib.rs:2696
↓ 3 callers
Method
cumulative_usage
源码: usage.rs:201-203
mini_claude_code/runtime.py:105
↓ 3 callers
Function
decode_html_entities
(input: &str)
rust/crates/tools/src/lib.rs:1048
↓ 3 callers
Method
deny
(messages: Optional[list[str]] = None)
mini_claude_code/hooks.py:51
↓ 3 callers
Function
detect_first_command
(commands: &[&'static str])
rust/crates/tools/src/lib.rs:2424
↓ 3 callers
Function
detect_interruption
检测上次会话是否在中途被中断。 对应 Reference: EP09 §3 detectTurnInterruption(): | 最后消息类型 | 状态 | 动作 |
tutorials/12_session_persistence.py:480
↓ 3 callers
Method
discover
(&self)
rust/crates/runtime/src/config.rs:185
↓ 3 callers
Function
estimate_session_tokens
估算整个会话的 token 数 — 源码 compact.rs:27-29
tutorials/16_prompt_building_and_compaction.py:458
↓ 3 callers
Function
execute_bash
(input: BashCommandInput)
rust/crates/runtime/src/bash.rs:67
↓ 3 callers
Function
execute_tool_with_full_pipeline
完整的工具执行流水线 — 源码 conversation.rs:218-271 流程: 1. 权限检查 → deny? 返回拒绝消息 2. Pre-hook → deny? 返回拒绝消息(工具根本不执行) 3. 执行工具 4. 合并 pre-hook 反馈到
tutorials/15_permission_and_hook_pipeline.py:478
↓ 3 callers
Function
expect_success
(response: reqwest::Response)
rust/crates/api/src/client.rs:565
↓ 3 callers
Function
extract_file_candidates
启发式提取文件路径。源码: compact.rs:301-315 规则: token 包含 '/' 且有已知扩展名。
mini_claude_code/compact.py:108
↓ 3 callers
Function
fixture_paths
()
rust/crates/compat-harness/src/lib.rs:305
↓ 3 callers
Function
format_compact_report
(removed: usize, resulting_messages: usize, skipped: bool)
rust/crates/rusty-claude-cli/src/main.rs:760
↓ 3 callers
Function
format_tool_result
(name: &str, output: &str, is_error: bool)
rust/crates/rusty-claude-cli/src/main.rs:2679
↓ 3 callers
Method
from_dict
从字典反序列化
tutorials/12_session_persistence.py:115
↓ 3 callers
Function
generate_pkce_pair
()
rust/crates/runtime/src/oauth.rs:234
↓ 3 callers
Function
get_commands
(cwd: str | None = None, include_plugin_commands: bool = True, include_skill_commands: bool = True)
src/commands.py:60
↓ 3 callers
Function
get_tools
( simple_mode: bool = False, include_mcp: bool = True, permission_context: ToolPermissionContext |
src/tools.py:62
↓ 3 callers
Function
git_output
(args: &[&str])
rust/crates/rusty-claude-cli/src/main.rs:2113
↓ 3 callers
Function
html_to_text
(html: &str)
rust/crates/tools/src/lib.rs:1018
↓ 3 callers
Method
is_allowed
(self, tool_name: str)
tutorials/18_design_patterns_for_agents.py:550
↓ 3 callers
Method
is_denied
(&self)
rust/crates/runtime/src/hooks.rs:39
↓ 3 callers
Method
is_retryable
(self)
tutorials/11_error_recovery_and_retry.py:128
↓ 3 callers
Function
iso8601_now
()
rust/crates/tools/src/lib.rs:2096
↓ 3 callers
Function
load_saved_oauth_token
()
rust/crates/api/src/client.rs:470
↓ 3 callers
Function
loopback_redirect_uri
(port: u16)
rust/crates/runtime/src/oauth.rs:254
↓ 3 callers
Method
mcp
(&self)
rust/crates/runtime/src/config.rs:285
↓ 3 callers
Function
merge_hook_feedback
合并 Hook 反馈到工具输出 — 源码 conversation.rs:408-424 例如: 工具输出: "4" Pre-hook 消息: "pre hook ran" Post-hook 消息: "post hook ran" 合并后: "4\n\n
tutorials/15_permission_and_hook_pipeline.py:440
↓ 3 callers
Function
now_unix_timestamp
()
rust/crates/api/src/client.rs:480
↓ 3 callers
Method
oauth
(&self)
rust/crates/runtime/src/config.rs:295
↓ 3 callers
Function
oauth_token_is_expired
(token_set: &OAuthTokenSet)
rust/crates/api/src/client.rs:372
↓ 3 callers
Function
optional_string_map
( object: &BTreeMap<String, JsonValue>, key: &str, context: &str, )
rust/crates/runtime/src/config.rs:747
↓ 3 callers
Method
parse
(input: &str)
rust/crates/commands/src/lib.rs:230
↓ 3 callers
Method
parse_literal
(&mut self, expected: &str, value: JsonValue)
rust/crates/runtime/src/json.rs:176
← previous
next →
101–200 of 1,659, ranked by callers