-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.json
More file actions
248 lines (248 loc) · 7.74 KB
/
Copy pathpackage.json
File metadata and controls
248 lines (248 loc) · 7.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
{
"name": "tokalator",
"displayName": "Tokalator",
"description": "Count your tokens like beads on an abacus. Real-time context budget calculator for AI coding assistants.",
"version": "3.1.7",
"publisher": "vfaraji89",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/vfaraji89/tokalator"
},
"icon": "media/icon.png",
"engines": {
"vscode": "^1.99.0"
},
"categories": [
"AI",
"Other"
],
"keywords": [
"tokens",
"context",
"context-engineering",
"ai",
"copilot",
"claude",
"tokalator",
"abacus"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./dist/extension.js",
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "tokalator",
"title": "Tokalator",
"icon": "media/abacus.svg"
}
]
},
"views": {
"tokalator": [
{
"type": "webview",
"id": "tokalator.dashboard",
"name": "Token Budget"
}
]
},
"chatParticipants": [
{
"id": "tokalator.tokens",
"name": "tokalator",
"fullName": "Tokalator",
"description": "Count and manage your AI context token budget",
"isSticky": false,
"commands": [
{
"name": "count",
"description": "Show current token count and budget status"
},
{
"name": "optimize",
"description": "Close low-relevance tabs to free up tokens"
},
{
"name": "pin",
"description": "Pin a file so it's always included"
},
{
"name": "breakdown",
"description": "Show where your tokens are going"
},
{
"name": "instructions",
"description": "List, count, and estimate tokens for instruction files in workspace"
},
{
"name": "model",
"description": "Show or switch the active AI model"
},
{
"name": "unpin",
"description": "Unpin a file so it returns to normal relevance scoring"
},
{
"name": "reset",
"description": "Reset session state (chat turn counter)"
},
{
"name": "compaction",
"description": "Show per-turn token growth and compaction recommendations"
},
{
"name": "preview",
"description": "Preview token cost of your next message before sending"
},
{
"name": "exit",
"description": "End the current session and save summary"
},
{
"name": "terminology-gen",
"description": "Scan terminology sources and show compression potential"
}
]
}
],
"commands": [
{
"command": "tokalator.refresh",
"title": "Refresh Token Count",
"category": "Tokalator",
"icon": "$(refresh)"
},
{
"command": "tokalator.optimize",
"title": "Optimize (Close Low-Relevance Tabs)",
"category": "Tokalator",
"icon": "$(sparkle)"
},
{
"command": "tokalator.clearPins",
"title": "Clear All Pinned Files",
"category": "Tokalator"
},
{
"command": "tokalator.refreshPricing",
"title": "Refresh Pricing Catalog",
"category": "Tokalator",
"icon": "$(cloud-download)"
}
],
"menus": {
"view/title": [
{
"command": "tokalator.refresh",
"when": "view == tokalator.dashboard",
"group": "navigation"
},
{
"command": "tokalator.optimize",
"when": "view == tokalator.dashboard",
"group": "navigation"
}
]
},
"configuration": {
"title": "Tokalator",
"properties": {
"tokalator.relevanceThreshold": {
"type": "number",
"default": 0.3,
"minimum": 0,
"maximum": 1,
"description": "Tabs below this relevance score are marked as distractors (0-1)"
},
"tokalator.windowSize": {
"type": "number",
"default": 1000000,
"description": "Override context window size in tokens. Leave at default to use the selected model's window."
},
"tokalator.model": {
"type": "string",
"default": "claude-opus-4.8",
"enum": [
"claude-opus-4.8",
"claude-opus-4.7",
"claude-opus-4.6",
"claude-sonnet-4.6",
"claude-haiku-4.5",
"gpt-5.5",
"gpt-5.4",
"gpt-5.4-mini",
"gpt-5.4-nano",
"gpt-5.3-codex",
"o4-mini",
"gemini-3.5-flash",
"gemini-3.1-pro",
"gemini-3.1-flash-lite",
"gemini-2.5-pro",
"gemini-2.5-flash",
"gemini-2.5-flash-lite"
],
"enumDescriptions": [
"Claude Opus 4.8 — 1M tokens — $5.00/$25.00 per MTok",
"Claude Opus 4.7 — 1M tokens — $5.00/$25.00 per MTok",
"Claude Opus 4.6 — 1M tokens — $5.00/$25.00 per MTok",
"Claude Sonnet 4.6 — 1M tokens — $3.00/$15.00 per MTok",
"Claude Haiku 4.5 — 200K tokens — $1.00/$5.00 per MTok",
"GPT-5.5 — 1M tokens — $5.00/$30.00 per MTok",
"GPT-5.4 — 1M tokens — $2.50/$15.00 per MTok",
"GPT-5.4 Mini — 400K tokens — $0.75/$4.50 per MTok",
"GPT-5.4 Nano — 400K tokens — $0.20/$1.25 per MTok",
"GPT-5.3 Codex — 400K tokens — $1.75/$14.00 per MTok",
"o4-mini — 200K tokens — $4.00/$16.00 per MTok",
"Gemini 3.5 Flash — 1M tokens — $1.50/$9.00 per MTok",
"Gemini 3.1 Pro — 1M tokens — $2.00/$12.00 per MTok",
"Gemini 3.1 Flash-Lite — 1M tokens — $0.25/$1.50 per MTok",
"Gemini 2.5 Pro — 1M tokens — $1.25/$10.00 per MTok",
"Gemini 2.5 Flash — 1M tokens — $0.30/$2.50 per MTok",
"Gemini 2.5 Flash-Lite — 1M tokens — $0.10/$0.40 per MTok"
],
"description": "AI model to calculate context budget against"
},
"tokalator.contextRotWarningTurns": {
"type": "number",
"default": 20,
"description": "Warn about context rot after this many chat turns (Opus 4.6 scores 76% on 1M MRCR v2 vs 18.5% for Sonnet 4.5)"
},
"tokalator.autoRefreshInterval": {
"type": "number",
"default": 2000,
"description": "Dashboard refresh interval in milliseconds"
},
"tokalator.enableSessionLogging": {
"type": "boolean",
"default": false,
"description": "Enable opt-in session logging for research studies. Logs only aggregate counts and scores — no file names or contents."
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "esbuild ./src/extension.ts --bundle --outfile=dist/extension.js --external:vscode --format=cjs --platform=node --sourcemap",
"watch": "esbuild ./src/extension.ts --bundle --outfile=dist/extension.js --external:vscode --format=cjs --platform=node --sourcemap --watch",
"generate-models": "npx tsx scripts/generate-models.ts",
"lint": "eslint src",
"test": "jest --verbose"
},
"devDependencies": {
"@types/jest": "^30.0.0",
"@types/node": "^24.12.0",
"@types/vscode": "^1.99.0",
"esbuild": "^0.27.4",
"jest": "^30.2.0",
"ts-jest": "^29.4.6",
"typescript": "^5.5.0"
},
"dependencies": {
"@anthropic-ai/tokenizer": "^0.0.4",
"js-tiktoken": "^1.0.21"
}
}