Skip to content

Commit 8561cc7

Browse files
committed
refactor: 移除所有页面的 emoji icon
- 移除 122 个文件的 Layer/HighlightBox icon 属性 - 移除 131 个文件标题内嵌的 emoji 前缀
1 parent f98d067 commit 8561cc7

148 files changed

Lines changed: 1909 additions & 2191 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/pages/AIToolInteraction.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function AIToolInteraction() {
5555
</p>
5656
</div>
5757

58-
<HighlightBox title="术语对齐(非常重要)" icon="🧭" variant="yellow">
58+
<HighlightBox title="术语对齐(非常重要)" variant="yellow">
5959
<div className="space-y-2 text-sm text-heading">
6060
<p className="m-0">
6161
上游 Gemini CLI 主线使用 <code>tools: [&#123; functionDeclarations: FunctionDeclaration[] &#125;]</code> 声明工具,
@@ -67,11 +67,11 @@ export function AIToolInteraction() {
6767
</div>
6868
</HighlightBox>
6969

70-
<Layer title="端到端时序" icon="🗺️" defaultOpen>
70+
<Layer title="端到端时序" defaultOpen>
7171
<MermaidDiagram chart={sequence} />
7272
</Layer>
7373

74-
<Layer title="1) 工具声明(FunctionDeclaration)" icon="📋">
74+
<Layer title="1) 工具声明(FunctionDeclaration)">
7575
<p className="text-body mb-4">
7676
CLI 每次向模型发起请求时,会把当前可用工具的 <code>FunctionDeclaration</code> 一并发送。上游实现来自:
7777
<code className="ml-2 text-heading">packages/core/src/tools/tool-registry.ts</code>
@@ -120,15 +120,15 @@ getFunctionDeclarations(): FunctionDeclaration[] {
120120
}`}
121121
/>
122122

123-
<HighlightBox title="要点" icon="💡" variant="blue">
123+
<HighlightBox title="要点" variant="blue">
124124
<ul className="pl-5 list-disc space-y-1 text-sm text-heading">
125125
<li><code>parametersJsonSchema</code> 是上游的字段名(不是 <code>parameters</code>)。</li>
126126
<li><code>read_file</code> 参数名是 <code>file_path</code>(不是 <code>absolute_path</code>)。</li>
127127
</ul>
128128
</HighlightBox>
129129
</Layer>
130130

131-
<Layer title="2) 模型请求工具(functionCall / functionCalls)" icon="🤖">
131+
<Layer title="2) 模型请求工具(functionCall / functionCalls)">
132132
<p className="text-body mb-4">
133133
Gemini SDK 的响应 chunk 可以直接通过 <code>resp.functionCalls</code> 读取工具请求(SDK 从候选内容 parts 中推导得到)。上游核心处理在 <code>Turn.run()</code>
134134
</p>
@@ -158,14 +158,14 @@ for (const fnCall of functionCalls) {
158158
}`}
159159
/>
160160

161-
<HighlightBox title="args 是对象,不需要 JSON.parse" icon="✅" variant="green">
161+
<HighlightBox title="args 是对象,不需要 JSON.parse" variant="green">
162162
<p className="m-0 text-sm text-heading">
163163
上游主线里 <code>fnCall.args</code> 已经是对象。只有在 OpenAI-compatible 兼容层里,才会遇到 <code>arguments</code> 为 JSON 字符串需要解析的情况。
164164
</p>
165165
</HighlightBox>
166166
</Layer>
167167

168-
<Layer title="3) 调度与执行(CoreToolScheduler → ToolInvocation)" icon="⚙️">
168+
<Layer title="3) 调度与执行(CoreToolScheduler → ToolInvocation)">
169169
<p className="text-body mb-4">
170170
<code>ToolCallRequest</code> 事件到达后,CLI 把它交给 <code>CoreToolScheduler</code>:负责队列、确认、执行、以及把结果转换为 <code>functionResponse</code> parts。
171171
</p>
@@ -184,15 +184,15 @@ const confirmation = await invocation.shouldConfirmExecute(signal);
184184
`}
185185
/>
186186

187-
<HighlightBox title="两个关键边界" icon="⚠️" variant="yellow">
187+
<HighlightBox title="两个关键边界" variant="yellow">
188188
<ul className="pl-5 list-disc space-y-1 text-sm text-heading">
189189
<li><strong>参数非法</strong><code>tool.build(args)</code> 会直接抛错或返回 INVALID_TOOL_PARAMS 类错误。</li>
190190
<li><strong>需要确认</strong><code>shouldConfirmExecute()</code> 由 policy + messageBus 决策(ALLOW/DENY/ASK_USER)。</li>
191191
</ul>
192192
</HighlightBox>
193193
</Layer>
194194

195-
<Layer title="4) 回传 functionResponse 并继续(Continuation)" icon="📤">
195+
<Layer title="4) 回传 functionResponse 并继续(Continuation)">
196196
<p className="text-body mb-4">
197197
工具执行结果会被转换为 Gemini 的 <code>functionResponse</code> part,并以 <code>role: 'user'</code> 的消息写回历史,
198198
然后再发起一次 continuation 请求,让模型基于结果继续完成任务。
@@ -220,14 +220,14 @@ export function convertToFunctionResponse(
220220
/>
221221
</Layer>
222222

223-
<Layer title="5) 多工具调用与 finishReason" icon="🧩">
224-
<HighlightBox title="一次响应里可能有多个 functionCalls" icon="📦" variant="blue">
223+
<Layer title="5) 多工具调用与 finishReason">
224+
<HighlightBox title="一次响应里可能有多个 functionCalls" variant="blue">
225225
<p className="m-0 text-sm text-heading">
226226
<code>resp.functionCalls</code> 是数组:模型可能一次请求多个工具调用。CLI 的 scheduler 会把它们排队执行,并逐个回传对应的 functionResponse。
227227
</p>
228228
</HighlightBox>
229229

230-
<HighlightBox title="finishReason 是状态信号" icon="🔄" variant="purple">
230+
<HighlightBox title="finishReason 是状态信号" variant="purple">
231231
<ul className="pl-5 list-disc space-y-1 text-sm text-heading">
232232
<li><code>TOOL_USE</code>:模型请求工具(本轮会出现 functionCalls)。</li>
233233
<li><code>STOP</code>:模型认为本轮已经完成自然语言回复。</li>
@@ -236,7 +236,7 @@ export function convertToFunctionResponse(
236236
</HighlightBox>
237237
</Layer>
238238

239-
<Layer title="6) 错误与停止执行(含 stop_execution)" icon="🧨">
239+
<Layer title="6) 错误与停止执行(含 stop_execution)">
240240
<p className="text-body mb-4">
241241
工具执行失败也必须返回给模型(让它理解发生了什么并决定下一步)。上游用 <code>ToolResult.error</code> 携带机器可读的 <code>ToolErrorType</code>
242242
</p>
@@ -275,7 +275,7 @@ if (beforeOutput?.shouldStopExecution()) {
275275
/>
276276
</Layer>
277277

278-
<Layer title="Fork-only:OpenAI tool_calls 对照" icon="🧷">
278+
<Layer title="Fork-only:OpenAI tool_calls 对照">
279279
<div className="space-y-3 text-body text-sm">
280280
<p className="m-0">
281281
如果你的 fork 需要兼容 OpenAI 协议:<code>tool_calls[].function.arguments</code> 通常是 JSON 字符串,需要 <code>JSON.parse</code> 才能得到对象;

src/pages/AgentFramework.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ function QuickSummary({ isExpanded, onToggle }: { isExpanded: boolean; onToggle:
2323
className="w-full px-6 py-4 flex items-center justify-between hover:bg-elevated transition-colors"
2424
>
2525
<div className="flex items-center gap-3">
26-
<span className="text-2xl">🤖</span>
27-
<span className="text-xl font-bold text-heading">30秒快速理解</span>
26+
<span className="text-xl font-bold text-heading">30秒快速理解</span>
2827
</div>
2928
<span className={`transform transition-transform text-dim ${isExpanded ? 'rotate-180' : ''}`}>
3029
@@ -85,7 +84,7 @@ function QuickSummary({ isExpanded, onToggle }: { isExpanded: boolean; onToggle:
8584

8685
{/* 源码入口 */}
8786
<div className="flex items-center gap-2 text-sm">
88-
<span className="text-dim">📍 源码入口:</span>
87+
<span className="text-dim">源码入口:</span>
8988
<code className="px-2 py-1 bg-base rounded text-heading text-xs">
9089
packages/core/src/agents/
9190
</code>
@@ -865,12 +864,12 @@ this.emitActivity('ERROR', { error: errorMessage, context: 'tool_call' });`;
865864
<tr className="border- border-edge/50">
866865
<td className="py-2 px-3 text-heading font-bold">TIMEOUT</td>
867866
<td className="py-2 px-3 text-body">超过 max_time_minutes</td>
868-
<td className="py-2 px-3 text-heading">60秒恢复期</td>
867+
<td className="py-2 px-3 text-heading">60秒恢复期</td>
869868
</tr>
870869
<tr className="border- border-edge/50">
871870
<td className="py-2 px-3 text-heading font-bold">MAX_TURNS</td>
872871
<td className="py-2 px-3 text-body">达到 max_turns 限制</td>
873-
<td className="py-2 px-3 text-heading">60秒恢复期</td>
872+
<td className="py-2 px-3 text-heading">60秒恢复期</td>
874873
</tr>
875874
<tr className="border- border-edge/50">
876875
<td className="py-2 px-3 text-heading font-bold">ERROR</td>

src/pages/AgentLoopAnimation.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,20 @@ function Introduction({ isExpanded, onToggle }: { isExpanded: boolean; onToggle:
77
<div className="mb-8 bg-surface rounded-lg border border-edge overflow-hidden">
88
<button onClick={onToggle} className="w-full px-6 py-4 flex items-center justify-between hover:bg-elevated transition-colors">
99
<div className="flex items-center gap-3">
10-
<span className="text-2xl">🤖</span>
11-
<span className="text-xl font-bold text-heading">核心概念介绍</span>
10+
<span className="text-xl font-bold text-heading">核心概念介绍</span>
1211
</div>
1312
<span className={`transform transition-transform text-dim ${isExpanded ? 'rotate-180' : ''}`}></span>
1413
</button>
1514
{isExpanded && (
1615
<div className="px-6 pb-6 space-y-4">
1716
<div className="bg-base/50 rounded-lg p-4 ">
18-
<h4 className="text-heading font-bold mb-2">🎯 核心概念</h4>
17+
<h4 className="text-heading font-bold mb-2">核心概念</h4>
1918
<p className="text-body text-sm">
2019
Agent 执行循环是 LocalAgentExecutor 的核心,通过迭代调用 LLM 和执行工具完成复杂任务,直到调用 complete_task 工具或达到终止条件。
2120
</p>
2221
</div>
2322
<div className="bg-base/50 rounded-lg p-4 ">
24-
<h4 className="text-heading font-bold mb-2">🔄 6 种终止模式</h4>
23+
<h4 className="text-heading font-bold mb-2">6 种终止模式</h4>
2524
<div className="grid grid-cols-2 md:grid-cols-3 gap-2 mt-2 text-xs">
2625
<div className="bg-surface p-2 rounded text-center text-heading">GOAL</div>
2726
<div className="bg-surface p-2 rounded text-center text-heading">MAX_TURNS</div>
@@ -610,8 +609,7 @@ export function AgentLoopAnimation() {
610609
</div>
611610
{step.visualData.success && (
612611
<div className="text-heading flex items-center gap-2">
613-
<span></span>
614-
<span>任务成功完成</span>
612+
<span>任务成功完成</span>
615613
</div>
616614
)}
617615
</div>

src/pages/AgentSkills.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function AgentSkills() {
3333
</p>
3434
</section>
3535

36-
<Layer title="目标" icon="🎯">
36+
<Layer title="目标">
3737
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
3838
<HighlightBox title="可复用工作流" variant="blue">
3939
<p className="text-sm text-body">
@@ -54,7 +54,7 @@ export function AgentSkills() {
5454
</div>
5555
</Layer>
5656

57-
<Layer title="技能发现(Discovery)" icon="🗂️">
57+
<Layer title="技能发现(Discovery)">
5858
<p className="text-body mb-4">
5959
skills 启用后,<code>SkillManager</code> 会扫描{' '}
6060
<code>*/SKILL.md</code> 并汇总为“可用技能清单”。 覆盖优先级为:
@@ -115,7 +115,7 @@ description: Pre-implementation confidence assessment (≥90% required).
115115
/>
116116
</Layer>
117117

118-
<Layer title="激活机制(activate_skill)" icon="🧩">
118+
<Layer title="激活机制(activate_skill)">
119119
<p className="text-body mb-4">
120120
模型激活 skill 时调用{' '}
121121
<code className="text-heading">activate_skill</code>
@@ -152,7 +152,7 @@ return {
152152
</div>
153153
</Layer>
154154

155-
<Layer title="Schema 收敛:把 name 变成 enum" icon="🧷">
155+
<Layer title="Schema 收敛:把 name 变成 enum">
156156
<p className="text-body mb-4">
157157
技能列表发现完成后,CLI 会<strong>重新注册一次</strong>{' '}
158158
<code>ActivateSkillTool</code>,让参数 <code>name</code>{' '}
@@ -174,7 +174,7 @@ if (this.skillsSupport) {
174174
/>
175175
</Layer>
176176

177-
<Layer title="System Prompt 注入" icon="🧱">
177+
<Layer title="System Prompt 注入">
178178
<p className="text-body mb-4">
179179
当存在可用 skills 时,System Prompt 会追加一个{' '}
180180
<code>Available Agent Skills</code> 段落,列出技能元信息,并要求模型:
@@ -195,7 +195,7 @@ You have access to the following specialized skills...
195195
/>
196196
</Layer>
197197

198-
<Layer title="用户侧管理(/skills + settings)" icon="🧰">
198+
<Layer title="用户侧管理(/skills + settings)">
199199
<p className="text-body mb-4">
200200
Skills 目前属于实验特性:通过 <code>experimental.skills</code>{' '}
201201
开启;通过 <code>skills.disabled</code> 禁用特定技能。 CLI 也提供{' '}
@@ -221,7 +221,7 @@ skills.disabled: string[] # List of disabled skills (restart required)`}
221221
</p>
222222
</Layer>
223223

224-
<Layer title="终端命令(gemini skills)" icon="🧪">
224+
<Layer title="终端命令(gemini skills)">
225225
<p className="text-body mb-4">
226226
除了 Slash Commands,CLI 还提供 <code>gemini skills</code>{' '}
227227
子命令用于安装/卸载技能包(默认 user scope)。
@@ -242,7 +242,7 @@ gemini skills disable my-skill --scope workspace`}
242242
/>
243243
</Layer>
244244

245-
<Layer title="扩展技能与安全披露" icon="🛡️">
245+
<Layer title="扩展技能与安全披露">
246246
<p className="text-body mb-4">
247247
Extension 可以携带 <code>skills/</code> 目录(例如{' '}
248248
<code>skills/my-skill/SKILL.md</code>)。在安装/更新扩展时,CLI 会在

src/pages/Animation.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ function Introduction({ isExpanded, onToggle }: { isExpanded: boolean; onToggle:
1010
onClick={onToggle}
1111
className="w-full px-4 py-3 flex items-center justify-between text-left hover:bg-surface transition-colors"
1212
>
13-
<span className="text-lg font-semibold text-heading">📖 什么是核心交互循环?</span>
13+
<span className="text-lg font-semibold text-heading">什么是核心交互循环?</span>
1414
<span className={`transform transition-transform text-dim ${isExpanded ? 'rotate-180' : ''}`}></span>
1515
</button>
1616

1717
{isExpanded && (
1818
<div className="px-4 pb-4 space-y-4 text-sm">
1919
{/* 核心概念 */}
2020
<div>
21-
<h3 className="text-heading font-semibold mb-2">🎯 核心概念</h3>
21+
<h3 className="text-heading font-semibold mb-2">核心概念</h3>
2222
<p className="text-body">
2323
<strong>核心交互循环</strong>是 Gemini CLI 的心跳。当用户发送消息后,CLI 会与 AI 进行多轮交互,
2424
直到 AI 完成任务或需要用户输入。这个循环包括:消息发送 → AI 思考 → 工具调用 → 用户审批 → 执行 → 继续对话。
@@ -27,7 +27,7 @@ function Introduction({ isExpanded, onToggle }: { isExpanded: boolean; onToggle:
2727

2828
{/* 为什么需要 */}
2929
<div>
30-
<h3 className="text-heading font-semibold mb-2">为什么需要理解这个循环?</h3>
30+
<h3 className="text-heading font-semibold mb-2">为什么需要理解这个循环?</h3>
3131
<ul className="text-body space-y-1 list-disc list-inside">
3232
<li><strong>掌控全局</strong>:理解 CLI 每一步在做什么,不再黑箱操作</li>
3333
<li><strong>排查问题</strong>:当 CLI 卡住或行为异常时,知道从哪里入手</li>
@@ -38,30 +38,30 @@ function Introduction({ isExpanded, onToggle }: { isExpanded: boolean; onToggle:
3838

3939
{/* 关键参与者 */}
4040
<div>
41-
<h3 className="text-heading font-semibold mb-2">👥 关键参与者</h3>
41+
<h3 className="text-heading font-semibold mb-2">关键参与者</h3>
4242
<div className="grid grid-cols-2 gap-2 text-xs">
4343
<div className="bg-base p-2 rounded border border-edge">
44-
<div className="text-heading">👤 用户</div>
44+
<div className="text-heading">用户</div>
4545
<div className="text-dim">发起请求、审批工具、接收结果</div>
4646
</div>
4747
<div className="bg-base p-2 rounded border border-edge">
48-
<div className="text-heading">🖥️ CLI</div>
48+
<div className="text-heading">CLI</div>
4949
<div className="text-dim">协调各方、执行工具、管理状态</div>
5050
</div>
5151
<div className="bg-base p-2 rounded border border-edge">
52-
<div className="text-heading">☁️ AI API</div>
52+
<div className="text-heading">AI API</div>
5353
<div className="text-dim">理解意图、生成回复、调用工具</div>
5454
</div>
5555
<div className="bg-base p-2 rounded border border-edge">
56-
<div className="text-heading">🔧 工具</div>
56+
<div className="text-heading">工具</div>
5757
<div className="text-dim">读写文件、执行命令、搜索代码</div>
5858
</div>
5959
</div>
6060
</div>
6161

6262
{/* 源码位置 */}
6363
<div>
64-
<h3 className="text-heading font-semibold mb-2">📁 核心源码</h3>
64+
<h3 className="text-heading font-semibold mb-2">核心源码</h3>
6565
<div className="bg-base p-2 rounded font-mono text-xs border border-edge">
6666
<div className="text-dim">// 主循环入口</div>
6767
<div>packages/core/src/core/geminiChat.ts</div>
@@ -72,7 +72,7 @@ function Introduction({ isExpanded, onToggle }: { isExpanded: boolean; onToggle:
7272

7373
{/* 相关机制 */}
7474
<div>
75-
<h3 className="text-heading font-semibold mb-2">🔗 相关机制</h3>
75+
<h3 className="text-heading font-semibold mb-2">相关机制</h3>
7676
<div className="flex flex-wrap gap-2">
7777
<span className="px-2 py-1 bg-elevated/20 text-heading rounded text-xs">工具调度器</span>
7878
<span className="px-2 py-1 bg-elevated/20 text-heading rounded text-xs">流式解析</span>

0 commit comments

Comments
 (0)