1. cursor突然不能用了
2. 大批人在问
https://forum.cursor.com/t/this-model-provider-doesnt-serve-your-region/118453/36

3. 官方说可以退款
https://docs.cursor.com/account/regions#what-you-can-do-today

4. 我要退款
去你妈的,找开源方案
5. 开源的
5.1 roo-code
https://github.com/RooCodeInc/Roo-Code
Fork from cline
vscode插件形式

5.2 cline
https://github.com/cline/cline
vscode插件形式
5.2.1 使用


用不了自己的gemini

同样的配置roo-code可以用
5.2.2 源码
编译
npm run install:all
Debug
- Launch by pressing
F5
(orRun
->Start Debugging
) to open a new VSCode window with the extension loaded. (You may need to install the esbuild problem matchers extension if you run into issues building the project.)
5.2.3 入口
src/extension.ts
页面
const panel = vscode.window.createWebviewPanel(WebviewProvider.tabPanelId, "Cline", targetCol, {
enableScripts: true,
retainContextWhenHidden: true,
localResourceRoots: [context.extensionUri],
})
5.2.4 webui
Webview-ui
5.3 void
Vscode 换皮
源码位置
src/vs/workbench/contrib/void/
- common: 存放与具体运行环境(浏览器或桌面)无关的通用代码。
- browser: 存放只在浏览器(即渲染器进程)环境中运行的代码。
- electron-main: 存放与主进程相关的代码
5.3.1 代码补全的原理:
:src/vs/workbench/contrib/void/browser/autocompleteService.ts。
注册服务
registerWorkbenchContribution2(AutocompleteService.ID, AutocompleteService, WorkbenchPhase.BlockRestore);
注册为所有语言的自动补全

5.4 claude_code
https://github.com/anthropics/claude-code
只是一个命令行终端
5.5 gemini-cli
https://github.com/google-gemini/gemini-cli
使用gemni apikey
多注册google账号
在环境变量中加入
GEMINI_API_KEY,就可以

5.5.1 源码分析
用户输入在inputprompt.tsx中输入文本
handlerinput()-> handleSubmitAndClear(buffer.text);
app.tsx
<InputPrompt
buffer={buffer}
inputWidth={inputWidth}
suggestionsWidth={suggestionsWidth}
onSubmit={handleFinalSubmit}
userMessages={userMessages}
onClearScreen={handleClearScreen}
config={config}
slashCommands={slashCommands}
commandContext={commandContext}
shellModeActive={shellModeActive}
setShellModeActive={setShellModeActive}
focus={isFocused}
/>
handleFinalSubmit
const handleFinalSubmit = useCallback(
(submittedValue: string) => {
const trimmedValue = submittedValue.trim();
if (trimmedValue.length > 0) {
submitQuery(trimmedValue);
}
},
[submitQuery],
);
调用 useGeminiStream中的submitQuery
submitquery先处理输入
const { queryToSend, shouldProceed } = await prepareQueryForGemini(
query,
userMessageTimestamp,
abortSignal,
prompt_id!,
);
处理@ 和
// Handle @-commands (which might involve tool calls)
if (isAtCommand(trimmedQuery)) {
const atCommandResult = await handleAtCommand({
query: trimmedQuery,
config,
addItem,
onDebugMessage,
messageId: userMessageTimestamp,
signal: abortSignal,
});
if (!atCommandResult.shouldProceed) {
return { queryToSend: null, shouldProceed: false };
}
localQueryToSendToGemini = atCommandResult.processedQuery;
} else {
// Normal query for Gemini
addItem(
{ type: MessageType.USER, text: trimmedQuery },
userMessageTimestamp,
);
localQueryToSendToGemini = trimmedQuery;
}
} else {
// It's a function response (PartListUnion that isn't a string)
localQueryToSendToGemini = query;
}
5.5.2 举例

最终,gemini-cli
发送给 Gemini 模型的,并不是你输入的那一行简单文本,而是类似下面这样经过精心包装的多部分内容
[
{
"text": "请总结一下 @src/config/config.ts 这个文件的作用"
},
{
"text": "\n--- Content from referenced files ---"
},
{
"text": "\nContent from @src/config/config.ts:\n"
},
{
"text": "/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport yargs from 'yargs/yargs';\nimport { hideBin } from 'yargs/helpers';\nimport process from 'node:process';\n// ... (config.ts 文件的所有剩余内容) ...\n"
},
{
"text": "\n--- End of content ---"
}
]
5.5.3 总结:
从代码逻辑看,工具只是把用户需要提交的代码上下文和用户的输入组装成一个包发给ai,
并没有做过多的事。
那cursor应该也是如此,只是一个ui的包装而已。
6. 商业的
6.1 copilot
vscode插件
有代码补全,操作起来感觉没有cursor顺手,
比如,每次自动执行命令,都要我点一下,自动修改文件,自动读取文件是没问题的

有点不聪明,让他处理所有的报错,没处理完就退出了


想换个高级模型,要收费

价格挺轻民,cursor的一半。
6.2 kiro
Aws做的ide
还没开放
6.3 trae
字节ide
6.4 Vscode 中的gemni code
6.5 cursor的强大好用

全自动执行命令

自动读代码,分析 编译错误

自动修改代码,处理错误
7. ai代理
目前最强的ai是google 的gemini pro
但是需要翻墙。
我有国外服务器,搭了一个https://github.com/snailyp/gemini-balance
使用cherrystudio可以检查是否可用https://github.com/CherryHQ/cherry-studio
7.1 使用openai接口模式

填上地址和密码即可

7.2 使用gemini模式
去https://ai.google.dev/gemini-api/docs/models?hl=zh-cn找模型列表
复制id

添加模型

测试


7.3 gemini-balance 项目分析
8. 如何查看cursor的promotion
cursor的所有请求都是走自己的服务器中转,如果看他与ai模型的交互?
使用cloudflare ai gateway
开启日志

9. vscode插件开发
了解这个项目前提要先知道vscode插件是怎么回事
9.1 资源:
有个中文文档:https://liiked.github.io/VS-Code-Extension-Doc-ZH/#/
官方文档 :https://code.visualstudio.com/api
9.2 注册事件
package.json-》
"contributes": {
"commands": [
{
"command": "testhello.helloWorld",
"title": "Hello World"
}
]
},
插件的入口:activate和deactivate
export function activate(context: vscode.ExtensionContext) {
// Use the console to output diagnostic information (console.log) and errors (console.error)
// This line of code will only be executed once when your extension is activated
console.log('Congratulations, your extension "testhello" is now active!');
// The command has been defined in the package.json file
// Now provide the implementation of the command with registerCommand
// The commandId parameter must match the command field in package.json
const disposable = vscode.commands.registerCommand('testhello.helloWorld', () => {
// The code you place here will be executed every time your command is executed
// Display a message box to the user
vscode.window.showInformationMessage('Hello World from testhello!');
});
context.subscriptions.push(disposable);
}
// This method is called when your extension is deactivated
export function deactivate() {}
9.3 简单了解
能力
9.3.1 https://code.visualstudio.com/api/extension-capabilities/extending-workbench
10. 总结
cline没有自动补全,
Void 目前不能加自定义的gemini api,另外因为无法使用微软的c++ ,c#插件,有些不方便。
这种编程工具的形式,最好的还是以插件的形式集成在vscode中。