Skip to content

Commit daa854f

Browse files
committed
refactor: 更新包引用从@Anthropic@google命名空间
将所有@anthropic/gemini-*的包引用统一更新为@google/gemini-*命名空间 更新相关文档和示例代码中的包名和GitHub仓库链接
1 parent 0b05456 commit daa854f

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/pages/Animation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ ReadFileToolInvocation.execute({
189189
message: '返回 ToolResult',
190190
messageColor: 'bg-[var(--amber)]/10',
191191
extra: `{
192-
llmContent: "{\\"name\\": \\"@anthropic/gemini-cli\\", ...}",
192+
llmContent: "{\\"name\\": \\"@google/gemini-cli\\", ...}",
193193
returnDisplay: "package.json (1.2KB)"
194194
}`,
195195
},
@@ -215,7 +215,7 @@ ReadFileToolInvocation.execute({
215215
message: '最终回复 (finishReason: STOP)',
216216
messageColor: 'bg-[var(--purple)]/10',
217217
extra: `{
218-
content: "package.json 的 name 是 @anthropic/gemini-cli",
218+
content: "package.json 的 name 是 @google/gemini-cli",
219219
finishReason: "STOP" // 无更多工具调用
220220
}`,
221221
},

src/pages/IDEIntegrationOverview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ async function checkPortAvailability(port: number): Promise<boolean> {
509509

510510
<HighlightBox title="自动更新机制" icon="🔄" variant="green">
511511
<ul className="space-y-2 text-sm">
512-
<li><strong>CLI</strong>:运行 <code className="text-cyan-400">npm update -g @anthropic-ai/claude-code</code> 或使用包管理器更新</li>
512+
<li><strong>CLI</strong>:运行 <code className="text-cyan-400">npm update -g @google/gemini-cli</code> 或使用包管理器更新</li>
513513
<li><strong>VS Code 扩展</strong>:自动更新,或手动在扩展面板更新</li>
514514
<li><strong>Zed</strong>:自动更新,或通过 About 菜单检查</li>
515515
</ul>

src/pages/StartHere.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ export function StartHere({ onNavigate }: StartHereProps) {
525525
</div>
526526
<h2 className="text-lg font-bold font-mono text-[var(--text-primary)] mb-3">关于本文档</h2>
527527
<p className="text-sm text-[var(--text-secondary)] mb-6 font-mono">
528-
基于 <a href="https://github.com/anthropics/gemini-cli" className="text-[var(--terminal-green)] hover:underline hover:text-[var(--terminal-green)] transition-colors">gemini-cli</a> 源码分析,
528+
基于 <a href="https://github.com/google-gemini/gemini-cli" className="text-[var(--terminal-green)] hover:underline hover:text-[var(--terminal-green)] transition-colors">gemini-cli</a> 源码分析,
529529
所有结论均附带源文件路径和行号引用。
530530
</p>
531531
<div className="flex justify-center gap-8 text-xs font-mono text-[var(--text-muted)]">

src/pages/StartupFlow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,8 +1119,8 @@ export PATH="$(npm config get prefix)/bin:$PATH"
11191119
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
11201120
11211121
# 方案 D: 重新安装
1122-
npm uninstall -g @anthropics/gemini-cli
1123-
npm install -g @anthropics/gemini-cli`}
1122+
npm uninstall -g @google/gemini-cli
1123+
npm install -g @google/gemini-cli`}
11241124
language="bash"
11251125
title="启动问题诊断"
11261126
/>

src/pages/TokenAccountingSystem.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ DEBUG=gemini:tokens gemini
12321232
# 与本地计算值进行对比
12331233
12341234
# 调试方法 3: 单独测试 tokenizer
1235-
import { getDefaultTokenizer } from '@anthropic/gemini-core';
1235+
import { getDefaultTokenizer } from '@google/gemini-cli-core';
12361236
const tokenizer = getDefaultTokenizer();
12371237
const result = await tokenizer.calculateTokens(yourContent);
12381238
console.log(result.breakdown);`}
@@ -1273,7 +1273,7 @@ console.log(result.breakdown);`}
12731273
# 在 CLI 界面中查看状态栏的 Token 计数
12741274
12751275
# 检查模型限制是否正确匹配
1276-
import { getTokenLimits } from '@anthropic/gemini-core';
1276+
import { getTokenLimits } from '@google/gemini-cli-core';
12771277
console.log(getTokenLimits('your-model-name'));
12781278
12791279
# 调整压缩阈值(在 settings.json)
@@ -1328,7 +1328,7 @@ console.log('First 8 bytes:', buffer.subarray(0, 8));
13281328
# 检查 WebP 签名: 52 49 46 46 xx xx xx xx 57 45 42 50
13291329
13301330
# 手动测试图片 tokenizer
1331-
import { ImageTokenizer } from '@anthropic/gemini-core';
1331+
import { ImageTokenizer } from '@google/gemini-cli-core';
13321332
const tokenizer = new ImageTokenizer();
13331333
const tokens = await tokenizer.calculateTokens(base64Data, 'image/png');`}
13341334
language="bash"
@@ -1365,12 +1365,12 @@ const tokens = await tokenizer.calculateTokens(base64Data, 'image/png');`}
13651365
</div>
13661366
<CodeBlock
13671367
code={`# 检查归一化后的模型名称
1368-
import { normalizeModelName } from '@anthropic/gemini-core';
1368+
import { normalizeModelName } from '@google/gemini-cli-core';
13691369
console.log(normalizeModelName('openai/gpt-4o-2024-08-06'));
13701370
// 输出: gpt-4o
13711371
13721372
# 验证模式匹配结果
1373-
import { getTokenLimits } from '@anthropic/gemini-core';
1373+
import { getTokenLimits } from '@google/gemini-cli-core';
13741374
console.log(getTokenLimits('gpt-4o'));
13751375
// 输出: { input: 128000, output: 16384 }
13761376

src/pages/ToolDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async execute() {
125125
title: '结果返回',
126126
code: `// 工具返回的结果
127127
{
128-
llmContent: "{ \\"name\\": \\"@anthropic/gemini-cli\\", ... }",
128+
llmContent: "{ \\"name\\": \\"@google/gemini-cli\\", ... }",
129129
returnDisplay: "Read 50 lines from package.json"
130130
}
131131

0 commit comments

Comments
 (0)