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
↓ 1 callers
Method
cumulative_usage
(self)
tutorials/05_agentic_loop_complete.py:208
↓ 1 callers
Method
current_line
(&self)
rust/crates/rusty-claude-cli/src/input.rs:39
↓ 1 callers
Method
decide
(&mut self, request: &PermissionRequest)
rust/crates/runtime/src/permissions.rs:150
↓ 1 callers
Method
decide
(self, request: PermissionRequest)
mini_claude_code/permissions.py:104
↓ 1 callers
Method
decide
(self, tool_name: str, tool_input: str)
tutorials/05_agentic_loop_complete.py:101
↓ 1 callers
Method
decide
(self, request: PermissionRequest)
tutorials/15_permission_and_hook_pipeline.py:735
↓ 1 callers
Function
dedupe_commands
(entries: Vec<CommandManifestEntry>)
rust/crates/compat-harness/src/lib.rs:275
↓ 1 callers
Function
dedupe_hits
(hits: &mut Vec<SearchHit>)
rust/crates/tools/src/lib.rs:1214
↓ 1 callers
Function
dedupe_instruction_files
(files: Vec<ContextFile>)
rust/crates/runtime/src/prompt.rs:326
↓ 1 callers
Function
dedupe_instruction_files
源码: prompt.rs:326-341
mini_claude_code/prompt.py:145
↓ 1 callers
Function
dedupe_tools
(entries: Vec<ToolManifestEntry>)
rust/crates/compat-harness/src/lib.rs:288
↓ 1 callers
Function
deep_merge
(target: dict, source: dict)
mini_claude_code/config.py:78
↓ 1 callers
Function
deep_merge_objects
( target: &mut BTreeMap<String, JsonValue>, source: &BTreeMap<String, JsonValue>, )
rust/crates/runtime/src/config.rs:777
↓ 1 callers
Function
default_export_filename
(session: &Session)
rust/crates/rusty-claude-cli/src/main.rs:2246
↓ 1 callers
Method
default_for
用默认路径创建 loader。源码: config.rs:175-182 CC 先查 CLAUDE_CONFIG_HOME 环境变量,没有就用 $HOME/.claude。
mini_claude_code/config.py:225
↓ 1 callers
Function
default_initialize_params
()
rust/crates/runtime/src/mcp_stdio.rs:794
↓ 1 callers
Function
default_oauth_config
()
rust/crates/rusty-claude-cli/src/main.rs:450
↓ 1 callers
Function
deferred_tool_specs
()
rust/crates/tools/src/lib.rs:1922
↓ 1 callers
Function
demo
()
tutorials/17_async_await_for_sse.py:447
↓ 1 callers
Function
demo_agentic_loop_recovery
演示:Agent 循环中的错误恢复
tutorials/11_error_recovery_and_retry.py:585
↓ 1 callers
Function
demo_auto_compaction
演示自动压缩
tutorials/16_prompt_building_and_compaction.py:948
↓ 1 callers
Function
demo_await
()
tutorials/17_async_await_for_sse.py:129
↓ 1 callers
Function
demo_container_detection
演示容器环境检测
tutorials/14_bash_engine_deep_dive.py:818
↓ 1 callers
Function
demo_denial_circuit_breaker
演示拒绝熔断器
tutorials/15_permission_and_hook_pipeline.py:826
↓ 1 callers
Function
demo_error_classification
演示错误分类
tutorials/11_error_recovery_and_retry.py:487
↓ 1 callers
Function
demo_exponential_backoff
演示指数退避
tutorials/11_error_recovery_and_retry.py:507
↓ 1 callers
Function
demo_four_phase_workflow
演示 Leader-Worker 四阶段工作流。 对应 Reference: EP03 §4 1. 研究 → 2. 综合 → 3. 实现 → 4. 验证
tutorials/13_multi_agent_coordination.py:416
↓ 1 callers
Function
demo_full_pipeline
演示完整的权限+Hook流水线
tutorials/15_permission_and_hook_pipeline.py:781
↓ 1 callers
Function
demo_full_workflow
完整的 Bash 执行流程
tutorials/14_bash_engine_deep_dive.py:729
↓ 1 callers
Function
demo_gather
()
tutorials/17_async_await_for_sse.py:163
↓ 1 callers
Function
demo_hook_protocol
演示 Hook 的 exit code 协议
tutorials/15_permission_and_hook_pipeline.py:760
↓ 1 callers
Function
demo_instruction_budget
演示指令文件预算
tutorials/16_prompt_building_and_compaction.py:919
↓ 1 callers
Function
demo_non_retryable
演示:不可重试的错误直接失败
tutorials/11_error_recovery_and_retry.py:569
↓ 1 callers
Function
demo_permission_escalation
演示权限升级提示
tutorials/15_permission_and_hook_pipeline.py:717
↓ 1 callers
Function
demo_permission_modes
演示权限模式层级
tutorials/15_permission_and_hook_pipeline.py:688
↓ 1 callers
Function
demo_prompt_building
演示提示词构建
tutorials/16_prompt_building_and_compaction.py:881
↓ 1 callers
Function
demo_retry_exhausted
演示:重试耗尽
tutorials/11_error_recovery_and_retry.py:553
↓ 1 callers
Function
demo_retry_success
演示:第一次失败,第二次成功
tutorials/11_error_recovery_and_retry.py:530
↓ 1 callers
Function
demo_sandbox_decision_tree
展示沙箱决策过程
tutorials/14_bash_engine_deep_dive.py:776
↓ 1 callers
Function
demo_timeout
()
tutorials/17_async_await_for_sse.py:257
↓ 1 callers
Function
demo_token_estimation
演示 token 估算
tutorials/16_prompt_building_and_compaction.py:1010
↓ 1 callers
Function
demo_yolo_classifier
演示 YOLO 分类器
tutorials/15_permission_and_hook_pipeline.py:850
↓ 1 callers
Function
demonstrate_auto_background
自动后台化 — reference/06-bash-engine.md 问题: 模型请求执行一个命令,但这个命令跑了 30 秒还没完。 如果一直等着,用户体验很差。 解决方案: 四条后台化路径: 1. 显式: 模型设置 run_in_background=true
tutorials/14_bash_engine_deep_dive.py:641
↓ 1 callers
Function
demonstrate_cwd_tracking
CWD 跟踪 — reference/06-bash-engine.md 问题: 命令里可能有 cd,但子进程的 cd 不会影响父进程。 如果用户执行 "cd src && ls",下一条命令应该在 src/ 目录下。 解决方案: 每条命令结尾追加 pwd -P,把当前目
tutorials/14_bash_engine_deep_dive.py:604
↓ 1 callers
Function
demonstrate_latch_pattern
Latch 模式 — reference/15 问题: Anthropic API 支持 prompt caching, 如果系统提示词的前缀不变,可以省大量 token 费用。 但系统提示词中有动态内容(日期、git status 等), 每次请求都可能变化,导致
tutorials/16_prompt_building_and_compaction.py:828
↓ 1 callers
Function
demonstrate_output_size_watchdog
输出大小看门狗 — reference/06-bash-engine.md 问题: 一个卡住的循环不断往 stdout 写数据, 曾经有个 bug 把 768GB 磁盘写满了。 解决方案: 每 5 秒轮询输出文件大小, 超过限制时 SIGKILL 终止整个进程树。
tutorials/14_bash_engine_deep_dive.py:682
↓ 1 callers
Function
demonstrate_shell_snapshot
Shell 快照 — reference/06-bash-engine.md 问题: 每次执行命令都用 sh -l 启动,会重新加载 .bashrc/.zshrc, 这很慢(可能 200ms+),而且可能导致副作用。 解决方案: 第一次命令前,捕获整个 shell 环境到
tutorials/14_bash_engine_deep_dive.py:565
↓ 1 callers
Function
detect_container_environment
()
rust/crates/runtime/src/sandbox.rs:109
↓ 1 callers
Function
detect_powershell_shell
()
rust/crates/tools/src/lib.rs:2683
↓ 1 callers
Function
detect_repo
(cwd: &Path)
rust/crates/rusty-claude-cli/src/init.rs:219
↓ 1 callers
Function
detected_frameworks
(detection: &RepoDetection)
rust/crates/rusty-claude-cli/src/init.rs:258
↓ 1 callers
Function
detected_languages
(detection: &RepoDetection)
rust/crates/rusty-claude-cli/src/init.rs:242
↓ 1 callers
Method
discover
发现指令文件。源码: prompt.rs:58-71
mini_claude_code/prompt.py:53
↓ 1 callers
Method
discover
自动发现项目上下文
tutorials/06_system_prompt_builder.py:252
↓ 1 callers
Function
discover_instruction_files
(cwd: &Path)
rust/crates/runtime/src/prompt.rs:192
↓ 1 callers
Function
discover_instruction_files
源码: prompt.rs:192-213
mini_claude_code/prompt.py:79
↓ 1 callers
Function
discover_instruction_files
从当前目录到根目录,逐级查找 CLAUDE.md 等指令文件。 对应源码: prompt.rs:192-213 (discover_instruction_files)
tutorials/06_system_prompt_builder.py:96
↓ 1 callers
Method
discover_with_git
自动发现项目上下文(包含 git 信息)
tutorials/06_system_prompt_builder.py:262
↓ 1 callers
Method
dispatch_slash_command
( &mut self, command: SlashCommand, out: &mut impl Write, )
rust/crates/rusty-claude-cli/src/app.rs:152
↓ 1 callers
Function
display_context_path
(path: &Path)
rust/crates/runtime/src/prompt.rs:382
↓ 1 callers
Function
dump_manifests
()
rust/crates/rusty-claude-cli/src/main.rs:428
↓ 1 callers
Function
encode_frame
(payload: &[u8])
rust/crates/runtime/src/mcp_stdio.rs:787
↓ 1 callers
Function
ensure_dir
(path: &Path)
rust/crates/rusty-claude-cli/src/init.rs:114
↓ 1 callers
Function
ensure_gitignore_entries
(path: &Path)
rust/crates/rusty-claude-cli/src/init.rs:130
↓ 1 callers
Method
enter_auto_mode
进入 auto 模式——剥离危险规则 返回: 清理后的安全规则列表
tutorials/15_permission_and_hook_pipeline.py:617
↓ 1 callers
Function
env_lock
()
rust/crates/runtime/src/oauth.rs:471
↓ 1 callers
Function
env_lock
()
rust/crates/runtime/src/prompt.rs:512
↓ 1 callers
Method
environment_section
(&self)
rust/crates/runtime/src/prompt.rs:163
↓ 1 callers
Function
estimate_message_tokens
源码: compact.rs:326-338
mini_claude_code/compact.py:63
↓ 1 callers
Function
estimate_message_tokens
估算单条消息的 token 数 — 源码 compact.rs:326-338 方法: 字符数 / 4 + 1 为什么这么简单?因为: 1. 不需要精确——只是用来判断"差不多该压缩了" 2. 精确的 tokenizer 需要依赖外部库,增加复杂度 3.
tutorials/16_prompt_building_and_compaction.py:436
↓ 1 callers
Function
estimate_message_tokens
粗略估算一条消息占多少 token。 对应源码: compact.rs:326-338 (estimate_message_tokens)
tutorials/07_auto_compaction.py:106
↓ 1 callers
Method
exchange_oauth_code
( &self, config: &OAuthConfig, request: &OAuthTokenExchangeRequest, )
rust/crates/api/src/client.rs:233
↓ 1 callers
Method
execute
(&mut self, tool_name: &str, input: &str)
rust/crates/runtime/src/conversation.rs:451
↓ 1 callers
Method
execute
(self, tool_name: str, input: str)
mini_claude_code/runtime.py:135
↓ 1 callers
Method
execute
(self, tool_name: str, tool_input: str)
tutorials/05_agentic_loop_complete.py:131
↓ 1 callers
Function
execute_agent
(input: AgentInput)
rust/crates/tools/src/lib.rs:1343
↓ 1 callers
Function
execute_bash
执行 Bash 命令 — 源码 bash.rs:67-100 这是入口函数。它处理三种情况: 1. 后台执行 → spawn 后立即返回 PID 2. 有超时 → 用 asyncio.wait_for 包装 3. 普通执行 → 同步等待完成 在 Rust
tutorials/14_bash_engine_deep_dive.py:454
↓ 1 callers
Function
execute_bash_async
( input: BashCommandInput, sandbox_status: SandboxStatus, cwd: std::path::PathBuf, )
rust/crates/runtime/src/bash.rs:102
↓ 1 callers
Function
execute_brief
(input: BriefInput)
rust/crates/tools/src/lib.rs:2275
↓ 1 callers
Function
execute_config
(input: ConfigInput)
rust/crates/tools/src/lib.rs:2322
↓ 1 callers
Function
execute_notebook_edit
(input: NotebookEditInput)
rust/crates/tools/src/lib.rs:2105
↓ 1 callers
Function
execute_powershell
(input: PowerShellInput)
rust/crates/tools/src/lib.rs:2672
↓ 1 callers
Function
execute_repl
(input: ReplInput)
rust/crates/tools/src/lib.rs:2376
↓ 1 callers
Function
execute_shell_command
( shell: &str, command: &str, timeout: Option<u64>, run_in_background: Option<bool>, )
rust/crates/tools/src/lib.rs:2706
↓ 1 callers
Function
execute_skill
(input: SkillInput)
rust/crates/tools/src/lib.rs:1265
↓ 1 callers
Function
execute_sleep
(input: SleepInput)
rust/crates/tools/src/lib.rs:2267
↓ 1 callers
Function
execute_structured_output
(input: StructuredOutputInput)
rust/crates/tools/src/lib.rs:2369
↓ 1 callers
Function
execute_todo_write
(input: TodoWriteInput)
rust/crates/tools/src/lib.rs:1219
↓ 1 callers
Function
execute_tool_search
(input: ToolSearchInput)
rust/crates/tools/src/lib.rs:1906
↓ 1 callers
Function
execute_web_fetch
(input: &WebFetchInput)
rust/crates/tools/src/lib.rs:836
↓ 1 callers
Function
execute_web_search
(input: &WebSearchInput)
rust/crates/tools/src/lib.rs:870
↓ 1 callers
Method
exit_auto_mode
退出 auto 模式——恢复被剥离的规则
tutorials/15_permission_and_hook_pipeline.py:639
↓ 1 callers
Method
export_session
( &self, requested_path: Option<&str>, )
rust/crates/rusty-claude-cli/src/main.rs:1425
↓ 1 callers
Function
extract_bootstrap_plan
(source: &str)
rust/crates/compat-harness/src/lib.rs:187
↓ 1 callers
Function
extract_search_hits
(html: &str)
rust/crates/tools/src/lib.rs:1070
↓ 1 callers
Function
extract_search_hits_from_generic_links
(html: &str)
rust/crates/tools/src/lib.rs:1107
↓ 1 callers
Function
extract_tag_block
(content: &str, tag: &str)
rust/crates/runtime/src/compact.rs:340
↓ 1 callers
Function
extract_tag_block
提取 XML 标签内容。源码: compact.rs:340-346
mini_claude_code/compact.py:124
↓ 1 callers
Function
extract_title
(content: &str, raw_body: &str, content_type: &str)
rust/crates/tools/src/lib.rs:994
↓ 1 callers
Function
fake_network_stream
模拟从网络读取 SSE 字节
tutorials/17_async_await_for_sse.py:314
← previous
next →
601–700 of 1,659, ranked by callers