蜂鸟Pro v2.0.1 - 基础框架版本 (待完善)
## 当前状态 - 插件界面已完成重命名 (cursorpro → hummingbird) - 双账号池 UI 已实现 (Auto/Pro 卡片) - 后端已切换到 MySQL 数据库 - 添加了 Cursor 官方用量 API 文档 ## 已知问题 (待修复) 1. 激活时检查账号导致无账号时激活失败 2. 未启用无感换号时不应获取账号 3. 账号用量模块不显示 (seamless 未启用时应隐藏) 4. 积分显示为 0 (后端未正确返回) 5. Auto/Pro 双密钥逻辑混乱,状态不同步 6. 账号添加后无自动分析功能 ## 下一版本计划 - 重构数据模型,优化账号状态管理 - 实现 Cursor API 自动分析账号 - 修复激活流程,不依赖账号 - 启用无感时才分配账号 - 完善账号用量实时显示 ## 文件说明 - docs/系统设计文档.md - 完整架构设计 - cursor 官方用量接口.md - Cursor API 文档 - 参考计费/ - Vibeviewer 开源项目参考 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
// ============================================
|
||||
// CursorPro Extension - 反混淆版本
|
||||
// 蜂鸟Pro Extension
|
||||
// ============================================
|
||||
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
@@ -14,7 +14,7 @@ const path = require('path');
|
||||
let usageStatusBarItem;
|
||||
|
||||
// 创建输出通道
|
||||
exports.outputChannel = vscode.window.createOutputChannel('CursorPro');
|
||||
exports.outputChannel = vscode.window.createOutputChannel('蜂鸟Pro');
|
||||
|
||||
/**
|
||||
* 日志函数
|
||||
@@ -22,7 +22,7 @@ exports.outputChannel = vscode.window.createOutputChannel('CursorPro');
|
||||
function log(message) {
|
||||
const timestamp = new Date().toLocaleTimeString();
|
||||
exports.outputChannel.appendLine('[' + timestamp + '] ' + message);
|
||||
console.log('[CursorPro] ' + message);
|
||||
console.log('[蜂鸟Pro] ' + message);
|
||||
}
|
||||
exports.log = log;
|
||||
|
||||
@@ -70,7 +70,7 @@ function cleanServiceWorkerCache() {
|
||||
fs.unlinkSync(path.join(scriptCachePath, file));
|
||||
} catch (e) {}
|
||||
}
|
||||
console.log('[CursorPro] Service Worker ScriptCache 已清理:', scriptCachePath);
|
||||
console.log('[蜂鸟Pro] Service Worker ScriptCache 已清理:', scriptCachePath);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ function cleanServiceWorkerCache() {
|
||||
if (fs.existsSync(cacheStoragePath)) {
|
||||
try {
|
||||
deleteFolderRecursive(cacheStoragePath);
|
||||
console.log('[CursorPro] Service Worker CacheStorage 已清理:', cacheStoragePath);
|
||||
console.log('[蜂鸟Pro] Service Worker CacheStorage 已清理:', cacheStoragePath);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
@@ -88,12 +88,12 @@ function cleanServiceWorkerCache() {
|
||||
if (fs.existsSync(databasePath)) {
|
||||
try {
|
||||
deleteFolderRecursive(databasePath);
|
||||
console.log('[CursorPro] Service Worker Database 已清理:', databasePath);
|
||||
console.log('[蜂鸟Pro] Service Worker Database 已清理:', databasePath);
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('[CursorPro] 清理 Service Worker 缓存时出错:', error);
|
||||
console.log('[蜂鸟Pro] 清理 Service Worker 缓存时出错:', error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,22 +126,22 @@ function activate(context) {
|
||||
cleanServiceWorkerCache();
|
||||
|
||||
// 创建 WebView Provider
|
||||
const viewProvider = new provider_1.CursorProViewProvider(context.extensionUri, context);
|
||||
const viewProvider = new provider_1.HummingbirdProViewProvider(context.extensionUri, context);
|
||||
|
||||
// 注册 WebView
|
||||
context.subscriptions.push(
|
||||
vscode.window.registerWebviewViewProvider('cursorpro.mainView', viewProvider)
|
||||
vscode.window.registerWebviewViewProvider('hummingbird.mainView', viewProvider)
|
||||
);
|
||||
|
||||
// 创建状态栏项
|
||||
usageStatusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 100);
|
||||
usageStatusBarItem.text = '$(dashboard) 用量: --';
|
||||
usageStatusBarItem.tooltip = '点击查看账号用量详情';
|
||||
usageStatusBarItem.command = 'cursorpro.showPanel';
|
||||
usageStatusBarItem.command = 'hummingbird.showPanel';
|
||||
usageStatusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.prominentBackground');
|
||||
|
||||
// 如果有保存的 key,显示状态栏
|
||||
const savedKey = context.globalState.get('cursorpro.key');
|
||||
const savedKey = context.globalState.get('hummingbird.key');
|
||||
if (savedKey) {
|
||||
usageStatusBarItem.show();
|
||||
}
|
||||
@@ -149,12 +149,12 @@ function activate(context) {
|
||||
context.subscriptions.push(usageStatusBarItem);
|
||||
|
||||
// 设置同步的键
|
||||
context.globalState.setKeysForSync(['cursorpro.key']);
|
||||
context.globalState.setKeysForSync(['hummingbird.key']);
|
||||
|
||||
// 注册显示面板命令
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand('cursorpro.showPanel', () => {
|
||||
vscode.commands.executeCommand('cursorpro.mainView.focus');
|
||||
vscode.commands.registerCommand('hummingbird.showPanel', () => {
|
||||
vscode.commands.executeCommand('hummingbird.mainView.focus');
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -164,7 +164,7 @@ exports.activate = activate;
|
||||
* 停用扩展
|
||||
*/
|
||||
function deactivate() {
|
||||
console.log('CursorPro 插件已停用');
|
||||
console.log('蜂鸟Pro 插件已停用');
|
||||
}
|
||||
exports.deactivate = deactivate;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user