Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**/node_modules/**
/.idea/
trae-usage-monitor-*.vsix
*.vsix
out/
trae-usage-server/
.vscode-test/
53 changes: 51 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
{
"idf.pythonInstallPath": "D:\\tools\\Espressif\\tools\\idf-python\\3.11.2\\python.exe"
}
"idf.pythonInstallPath": "D:\\tools\\Espressif\\tools\\idf-python\\3.11.2\\python.exe",
"projectColors.mainColor": "#f40b93",
"window.title": "TraeUsage",
"workbench.colorCustomizations": {
"statusBarItem.warningBackground": "#f40b93",
"statusBarItem.warningForeground": "#ffffff",
"statusBarItem.warningHoverBackground": "#f40b93",
"statusBarItem.warningHoverForeground": "#ffffff90",
"statusBarItem.remoteBackground": "#ff18a0",
"statusBarItem.remoteForeground": "#ffffff",
"statusBarItem.remoteHoverBackground": "#ff25ad",
"statusBarItem.remoteHoverForeground": "#ffffff90",
"statusBar.background": "#f40b93",
"statusBar.foreground": "#ffffff",
"statusBar.border": "#f40b93",
"statusBar.debuggingBackground": "#f40b93",
"statusBar.debuggingForeground": "#ffffff",
"statusBar.debuggingBorder": "#f40b93",
"statusBar.noFolderBackground": "#f40b93",
"statusBar.noFolderForeground": "#ffffff",
"statusBar.noFolderBorder": "#f40b93",
"statusBar.prominentBackground": "#f40b93",
"statusBar.prominentForeground": "#ffffff",
"statusBar.prominentHoverBackground": "#f40b93",
"statusBar.prominentHoverForeground": "#ffffff90",
"focusBorder": "#f40b9399",
"progressBar.background": "#f40b93",
"textLink.foreground": "#ff4bd3",
"textLink.activeForeground": "#ff58e0",
"selection.background": "#e70086",
"list.highlightForeground": "#f40b93",
"list.focusAndSelectionOutline": "#f40b9399",
"button.background": "#f40b93",
"button.foreground": "#ffffff",
"button.hoverBackground": "#ff18a0",
"tab.activeBorderTop": "#ff18a0",
"pickerGroup.foreground": "#ff18a0",
"list.activeSelectionBackground": "#f40b934d",
"panelTitle.activeBorder": "#ff18a0",
"activityBar.activeBorder": "#f40b93",
"activityBarBadge.foreground": "#ffffff",
"activityBarBadge.background": "#f40b93"
},
"projectColors.name": "TraeUsage",
"projectColors.isActivityBarColored": false,
"projectColors.isTitleBarColored": false,
"projectColors.isStatusBarColored": true,
"projectColors.isProjectNameColored": true,
"projectColors.isActiveItemsColored": true,
"projectColors.setWindowTitle": true
}
43 changes: 23 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Trae Usage Monitor

[English](README.en.md)
由于原项目出现本人无法使用是问题,并发现有其他用户也遇到了相同问题,因此本人 fork 了原项目,本意是为了帮助优先,但是反馈问题和提交 pr,等待好久无人回应,所以单开一个版本。

一个VSCode扩展,用于实时监控Trae AI的使用量统计
一个 VSCode 扩展,用于实时监控 Trae AI 的使用量统计

### 状态栏

Expand All @@ -23,42 +23,45 @@
<img src="https://raw.githubusercontent.com/whyuds/TraeUsage/refs/heads/master/img/traeusage_shot.gif" alt="功能截图" width="600">
</div>

### 2. 获取Session ID
### 2. 获取 Session ID

**使用浏览器扩展**

**Chrome浏览器:**
1. 安装Chrome扩展:[Trae Usage Token Extractor](https://chromewebstore.google.com/detail/edkpaodbjadikhahggapfilgmfijjhei?utm_source=item-share-cb)
**Chrome 浏览器:**

**Edge浏览器:**
1. 安装Edge扩展:[Trae Usage Token Extractor](https://microsoftedge.microsoft.com/addons/detail/trae-usage-token-extracto/leopdblngeedggognlgokdlfpiojalji)
1. 安装 Chrome 扩展:[Trae Usage Token Extractor](https://chromewebstore.google.com/detail/edkpaodbjadikhahggapfilgmfijjhei?utm_source=item-share-cb)

**Edge 浏览器:**

1. 安装 Edge 扩展:[Trae Usage Token Extractor](https://microsoftedge.microsoft.com/addons/detail/trae-usage-token-extracto/leopdblngeedggognlgokdlfpiojalji)

**使用步骤:**
1. 安装后通过通知或TraeUsage窗口设置跳转安装Chrome扩展
2. 安装后在浏览器点击Chrome扩展图标,点击跳转按钮到Usage页面
3. 登录并浏览usage页面,自动获取Session ID
4. 点击Chrome扩展图标,自动复制Session ID至粘贴板
5. 返回Trae,Trae Usage扩展会自动识别粘贴板并配置Session ID
6. Ctrl+Shift+P 打开命令面板,输入TraeUsage: Collect Usage Details

1. 安装后通过通知或 TraeUsage 窗口设置跳转安装 Chrome 扩展
2. 安装后在浏览器点击 Chrome 扩展图标,点击跳转按钮到 Usage 页面
3. 登录并浏览 usage 页面,自动获取 Session ID
4. 点击 Chrome 扩展图标,自动复制 Session ID 至粘贴板
5. 返回 Trae,Trae Usage 扩展会自动识别粘贴板并配置 Session ID
6. Ctrl+Shift+P 打开命令面板,输入 TraeUsage: Collect Usage Details

### 3. 查看使用量

配置完成后,在VSCode左侧的资源管理器面板中会出现 "Trae Usage" 视图,显示:
配置完成后,在 VSCode 左侧的资源管理器面板中会出现 "Trae Usage" 视图,显示:

- ⚡ Premium Fast Request:快速请求的使用量和剩余配额
- 🐌 Premium Slow Request:慢速请求的使用量和剩余配额
- 🐌 Premium Slow Request:慢速请求的使用量和剩余配额
- 🔧 Auto Completion:自动补全的使用量和剩余配额
- 🚀 Advanced Model:高级模型的使用量和剩余配额


## 反馈与支持

如果您在使用过程中遇到问题或有功能建议,欢迎访问我们的GitHub项目页面
如果您在使用过程中遇到问题或有功能建议,欢迎访问我们的 GitHub 项目页面

🔗 **项目地址**:[https://github.com/whyuds/TraeUsage](https://github.com/whyuds/TraeUsage)
🔗 **原项目地址**:[https://github.com/whyuds/TraeUsage](https://github.com/whyuds/TraeUsage)
🔗 **当前项目地址**:[https://github.com/mtpupil/TraeUsage](https://github.com/mtpupil/TraeUsage)

💬 **问题反馈**:如有问题请在GitHub上提交[Issues](https://github.com/whyuds/TraeUsage/issues)
💬 **问题反馈**:如有问题请在 GitHub 上提交[Issues](https://github.com/mtpupil/TraeUsage/issues)

## 许可证

MIT License
MIT License
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 51 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "trae-usage-monitor",
"displayName": "Trae Usage",
"name": "trae-usage-reborn",
"displayName": "Trae Usage Reborn",
"description": "Monitor Trae AI usage statistics in real-time",
"version": "1.3.3",
"publisher": "whyuds",
"version": "1.3.4",
"publisher": "MTpupil",
"repository": {
"type": "git",
"url": "https://github.com/whyuds/TraeUsage.git"
"url": "https://github.com/mtpupil/TraeUsage.git"
},
"license": "MIT",
"engines": {
Expand All @@ -15,6 +15,51 @@
"categories": [
"Other"
],
"keywords": [
"Trae",
"trae",
"Trae AI",
"AI",
"ai",
"人工智能",
"Usage",
"usage",
"使用量",
"用量",
"用量统计",
"配额",
"额度",
"Monitor",
"monitor",
"监控",
"统计",
"仪表板",
"看板",
"Token",
"token",
"令牌",
"JWT",
"Session",
"session",
"Session ID",
"会话",
"Cloud-IDE",
"Cloud IDE",
"云IDE",
"VSCode Extension",
"extension",
"扩展",
"插件",
"Usage Details",
"使用详情",
"Entitlement",
"权益",
"订阅",
"套餐",
"木瞳",
"mtpupil",
"MTpupil"
],
"icon": "img/logo_256.png",
"activationEvents": [
"onStartupFinished"
Expand Down Expand Up @@ -48,7 +93,6 @@
"icon": "$(output)"
}
],

"configuration": {
"title": "%configuration.title%",
"properties": {
Expand Down Expand Up @@ -107,4 +151,4 @@
"dependencies": {
"axios": "^1.6.0"
}
}
}
Loading