Cometix Tab 是一个 VS Code 扩展,将 Cursor 编辑器的智能代码补全功能带入 VS Code。通过调用 Cursor 的后端 API,为您提供强大的 AI 辅助编程体验。
YOU ARE NOT ALLOWED TO USE THIS PLUGIN FOR COMMERCIAL PURPOSES, AND YOU ARE NOT ALLOWED TO DISTRIBUTE THIS PLUGIN WITHOUT PERMISSION (including but not limited to plugin, code, document, etc.). 禁止使用本插件用于商业目的,禁止未经授权的传播(包括但不限于插件、代码、文档等)。
The purpose of this project is to explore and learn from Cursor Tab, and to reverse-engineer the interface and code of Cursor. Please respect Anysphere and hope Cursor can provide an official vscode plugin someday. 本项目仅为对Cursor Tab的探索与学习,出于针对Cursor的接口与代码的逆向,请其他使用者和研究者保持对Anysphere的尊重。希望Cursor有朝一日能提供官方的vscode插件。
This is an experimental version, built with mostly vibe coding, highly unreliable, please report any bugs and use at your own risk!
The purpose of current experimental project is to investigate how to implement more Cursor-like completion features and mechanics in vscode.
This plugin may modify part of vscode files (if you agree with these modification), thus use with caution!
这是一个实验版本,主要使用vibe coding编写,不太可靠,此外有比较多的日志输出,请尽可能报告相关的bug并自担责任!
本实验项目目的在于探索更接近Cursor Tab的功能和机制的vscode插件。
本插件可能修改部分vscode本体文件(如果你同意相关修改),请小心使用。
# 克隆仓库
git clone https://github.com/your-repo/cometix-tab.git
cd cometix-tab
# 安装依赖
pnpm install
# 编译
pnpm run compile
# 在 VS Code 中按 F5 启动调试
# 打包
pnpm run package
# 在 VS Code 中安装
code --install-extension cometix-tab-0.0.1.vsix
在 VS Code 设置中配置 Cometix Tab:
| 配置项 | 说明 |
|---|---|
cometixTab.authToken |
Cursor 认证令牌(必需) |
| 配置项 | 默认值 | 说明 |
|---|---|---|
cometixTab.enableInlineSuggestions |
true |
启用内联代码建议 |
cometixTab.enableCursorPrediction |
true |
启用光标位置预测 |
cometixTab.enableAdditionalFilesContext |
true |
在请求中包含最近查看的文件上下文 |
cometixTab.cppTriggerInComments |
true |
在注释中触发建议 |
cometixTab.excludedLanguages |
[] |
禁用建议的语言列表 |
| 配置项 | 默认值 | 说明 |
|---|---|---|
cometixTab.endpointMode |
"auto" |
端点模式:official/auto/custom |
cometixTab.officialRegion |
"default" |
官方端点区域:default/us/eu/asia |
cometixTab.customEndpoint |
"" |
自定义端点 URL |
cometixTab.clientKey |
"" |
客户端密钥(留空自动生成) |
| 配置项 | 默认值 | 说明 |
|---|---|---|
cometixTab.debug.enabled |
true |
启用调试日志 |
cometixTab.debug.logStream |
true |
记录流式响应 |
cometixTab.debug.logRpc |
true |
记录 RPC 请求/响应 |
cometixTab.debug.verbosePayloads |
false |
记录完整载荷 |
Tab 接受建议| 命令 | 说明 |
|---|---|
Cursor Tab: Accept Inline Suggestion |
接受当前内联建议 |
Cursor Tab: Apply Next Edit |
应用队列中的下一个编辑 |
Cursor Tab: Go To Cursor Prediction |
跳转到预测的光标位置 |
Cometix Tab: Enable Proposed API |
启用 VS Code Proposed API |
详细的技术文档位于 docs/ 目录:
Cometix Tab 使用 VS Code 的 Proposed API (inlineCompletionsAdditions) 来提供完整功能。
首次启动时,扩展会自动检测并提示您启用 Proposed API:
如果您选择了「不再提示」,可以通过命令重新触发:
Ctrl+Shift+P 打开命令面板Cometix Tab: Enable Proposed APIsrc/
├── api/ # API 客户端
├── commands/ # VS Code 命令
├── container/ # 依赖注入容器
├── context/ # 上下文和请求构建
├── controllers/ # 控制器
├── providers/ # VS Code Provider
├── rpc/ # Protobuf 定义
├── services/ # 核心服务
├── utils/ # 工具函数
└── extension.ts # 扩展入口
# 编译
pnpm run compile
# 监视模式
pnpm run watch
# 类型检查
pnpm run check-types
# 代码检查
pnpm run lint
# 运行测试
pnpm run test
# 打包
pnpm run package
@bufbuild/protobuf - Protobuf 序列化@connectrpc/connect - Connect RPC 客户端@connectrpc/connect-node - Node.js 传输层@vscode/sudo-prompt - 权限提升支持AGPL-3.0, 适用于从本项目初始commit开始的所有代码,即使当时尚未将LICENSE文件添加
本项目是自Cometix Tab项目基础上进行的实验性探索,感觉Cursor, Codex, Windsurf在vibe coding上基于的帮助。感谢Anysphere的Cursor中Cursor Tab相关的实现。
~~本项目基于对 Haleclipse 的开发~~(逃),感谢 Cometix Space 的大家支持
$ claude mcp add cometix-tab-copilot-exp \
-- python -m otcore.mcp_server <graph>