@@ -163,51 +163,51 @@ export function ToolReference() {
163163 Gemini CLI 的工具系统由三种来源组成,提供了从核心功能到动态扩展的完整能力:
164164 </ p >
165165
166- < div className = ” space- y-6 ” >
166+ < div className = " space-y-6" >
167167 { /* Core 工具 */ }
168168 < div >
169- < h4 className = ” text- heading font-semibold mb-2 ” > Core 注册工具</ h4 >
170- < p className = ” text- body text-sm mb-3 ” >
169+ < h4 className = " text-heading font-semibold mb-2" > Core 注册工具</ h4 >
170+ < p className = " text-body text-sm mb-3" >
171171 来源: < code > config.ts#createToolRegistry()</ code > 。默认注册到 ToolRegistry,实际启用受 < code > coreTools</ code > 、< code > tools.allowed</ code > 等配置影响。
172172 </ p >
173- < div className = ” grid grid-cols-2 md :grid-cols-3 lg :grid-cols-4 gap-x-4 gap-y-1 text-sm text-body mb-3 ” >
174- < div > < code className = ” text- heading text-xs ” > LSTool</ code > list_directory</ div >
175- < div > < code className = ” text- heading text-xs ” > ReadFileTool</ code > read_file</ div >
176- < div > < code className = ” text- heading text-xs ” > GrepTool</ code > search_file_content</ div >
177- < div > < code className = ” text- heading text-xs ” > RipGrepTool</ code > search_file_content*</ div >
178- < div > < code className = ” text- heading text-xs ” > GlobTool</ code > glob</ div >
179- < div > < code className = ” text- heading text-xs ” > SmartEditTool</ code > replace</ div >
180- < div > < code className = ” text- heading text-xs ” > WriteFileTool</ code > write_file</ div >
181- < div > < code className = ” text- heading text-xs ” > ShellTool</ code > run_shell_command</ div >
182- < div > < code className = ” text- heading text-xs ” > WebFetchTool</ code > web_fetch</ div >
183- < div > < code className = ” text- heading text-xs ” > WebSearchTool</ code > google_web_search</ div >
184- < div > < code className = ” text- heading text-xs ” > MemoryTool</ code > save_memory</ div >
185- < div > < code className = ” text- heading text-xs ” > ActivateSkillTool</ code > activate_skill</ div >
186- < div > < code className = ” text- heading text-xs ” > WriteTodosTool</ code > write_todos</ div >
187- < div > < code className = ” text- heading text-xs ” > DelegateToAgentTool</ code > delegate_to_agent</ div >
188- </ div >
189- < p className = ” text- dim text-xs ” >
173+ < div className = " grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-sm text-body mb-3" >
174+ < div > < code className = " text-heading text-xs" > LSTool</ code > list_directory</ div >
175+ < div > < code className = " text-heading text-xs" > ReadFileTool</ code > read_file</ div >
176+ < div > < code className = " text-heading text-xs" > GrepTool</ code > search_file_content</ div >
177+ < div > < code className = " text-heading text-xs" > RipGrepTool</ code > search_file_content*</ div >
178+ < div > < code className = " text-heading text-xs" > GlobTool</ code > glob</ div >
179+ < div > < code className = " text-heading text-xs" > SmartEditTool</ code > replace</ div >
180+ < div > < code className = " text-heading text-xs" > WriteFileTool</ code > write_file</ div >
181+ < div > < code className = " text-heading text-xs" > ShellTool</ code > run_shell_command</ div >
182+ < div > < code className = " text-heading text-xs" > WebFetchTool</ code > web_fetch</ div >
183+ < div > < code className = " text-heading text-xs" > WebSearchTool</ code > google_web_search</ div >
184+ < div > < code className = " text-heading text-xs" > MemoryTool</ code > save_memory</ div >
185+ < div > < code className = " text-heading text-xs" > ActivateSkillTool</ code > activate_skill</ div >
186+ < div > < code className = " text-heading text-xs" > WriteTodosTool</ code > write_todos</ div >
187+ < div > < code className = " text-heading text-xs" > DelegateToAgentTool</ code > delegate_to_agent</ div >
188+ </ div >
189+ < p className = " text-dim text-xs" >
190190 * RipGrepTool/GrepTool 运行时二选一。WriteTodosTool 仅在开启时注册。DelegateToAgentTool 仅在 agents 启用时注册。
191191 </ p >
192192 </ div >
193193
194194 { /* tool-names.ts */ }
195195 < div >
196- < h4 className = ” text- heading font-semibold mb-2 ” > tool-names.ts 常量</ h4 >
197- < p className = ” text- body text-sm mb-3 ” >
196+ < h4 className = " text-heading font-semibold mb-2" > tool-names.ts 常量</ h4 >
197+ < p className = " text-body text-sm mb-3" >
198198 来源: < code > packages/core/src/tools/tool-names.ts</ code > ,共 14 个核心工具名称常量。
199199 </ p >
200- < div className = ” flex flex-wrap gap-1 . 5 ” >
200+ < div className = " flex flex-wrap gap-1.5" >
201201 { [ 'glob' , 'write_file' , 'web_fetch' , 'run_shell_command' , 'read_many_files' , 'list_directory' , 'activate_skill' , 'write_todos' , 'google_web_search' , 'replace' , 'search_file_content' , 'read_file' , 'save_memory' , 'delegate_to_agent' ] . map ( name => (
202- < code key = { name } className = ” text- xs px-1 . 5 py-0 . 5 bg-surface border border-edge rounded” > { name } </ code >
202+ < code key = { name } className = " text-xs px-1.5 py-0.5 bg-surface border border-edge rounded" > { name } </ code >
203203 ) ) }
204204 </ div >
205205 </ div >
206206
207207 { /* 动态工具 */ }
208208 < div >
209- < h4 className = ” text- heading font-semibold mb-2 ” > 动态工具(MCP + Extensions)</ h4 >
210- < p className = ” text- body text-sm ” >
209+ < h4 className = " text-heading font-semibold mb-2" > 动态工具(MCP + Extensions)</ h4 >
210+ < p className = " text-body text-sm" >
211211 通过 MCP 协议和扩展系统在运行时动态注册。包括 < strong > MCP 工具</ strong > (Model Context Protocol)和 < strong > Discovered 工具</ strong > (运行时发现的扩展),根据配置和环境动态加载。
212212 </ p >
213213 </ div >
@@ -444,12 +444,12 @@ export function ToolReference() {
444444 < HighlightBox title = "Kind 分类决定审批行为" variant = "purple" >
445445 < div className = "text-sm space-y-2" >
446446 < p className = "text-body" >
447- < code > Kind</ code > 是 PolicyEngine 决策的重要维度之一,但不是“ 硬编码的自动批准/必须确认” 。最终取决于:policy rules、approvalMode、
447+ < code > Kind</ code > 是 PolicyEngine 决策的重要维度之一,但不是" 硬编码的自动批准/必须确认" 。最终取决于:policy rules、approvalMode、
448448 以及 shell 子命令/重定向等解析结果。
449449 </ p >
450450 < div className = "grid grid-cols-2 gap-3" >
451451 < div className = "bg-surface rounded p-2" >
452- < h5 className = "font-semibold text-heading mb-1" > 常见默认更“ 容易放行” </ h5 >
452+ < h5 className = "font-semibold text-heading mb-1" > 常见默认更" 容易放行" </ h5 >
453453 < ul className = "space-y-1 text-body text-xs" >
454454 < li > < code className = "text-heading" > Kind.Read</ code > - 只读操作</ li >
455455 < li > < code className = "text-heading" > Kind.Search</ code > - 搜索操作</ li >
@@ -458,7 +458,7 @@ export function ToolReference() {
458458 </ ul >
459459 </ div >
460460 < div className = "bg-surface rounded p-2" >
461- < h5 className = "font-semibold text-heading mb-1" > 常见默认更“ 需要确认” </ h5 >
461+ < h5 className = "font-semibold text-heading mb-1" > 常见默认更" 需要确认" </ h5 >
462462 < ul className = "space-y-1 text-body text-xs" >
463463 < li > < code className = "text-heading" > Kind.Edit</ code > - 修改文件</ li >
464464 < li > < code className = "text-heading" > Kind.Execute</ code > - 执行命令</ li >
@@ -1159,7 +1159,7 @@ export const ALL_BUILTIN_TOOL_NAMES = [...] as const; // 14 个内置工具`}
11591159 < div className = "bg-surface rounded-lg p-5 border border-edge/30" >
11601160 < h4 className = "text-heading font-bold font-mono mb-3" > Kind 分类驱动权限</ h4 >
11611161 < p className = "text-body text-sm leading-relaxed" >
1162- 工具按 Kind(read/edit/delete/move/search/execute/think/fetch/other)分类,提供一个“ 粗粒度安全语义” 。
1162+ 工具按 Kind(read/edit/delete/move/search/execute/think/fetch/other)分类,提供一个" 粗粒度安全语义" 。
11631163 PolicyEngine 会结合 Kind、toolName、argsPattern(尤其是 shell)、serverName(MCP)与 approvalMode 等信息,输出
11641164 ALLOW / ASK_USER / DENY。
11651165 </ p >
0 commit comments