Remove duplicate global aliases, use basename for project names, clean README

- Remove Warp display-name aliases from BUILTIN_ALIASES (already in warp.ts
  local modelAliases, no need to pollute the global namespace)
- sanitizeProject uses basename instead of full-path-with-dashes
- README: revert whitespace noise, keep only Warp-scoped additions
This commit is contained in:
iamtoruk 2026-05-21 00:19:38 -07:00
parent 4dfbf00d8b
commit 45ae64d0d3
4 changed files with 5 additions and 13 deletions

View file

@ -8,7 +8,7 @@
<a href="https://www.npmjs.com/package/codeburn"><img src="https://img.shields.io/npm/v/codeburn.svg" alt="npm version" /></a>
<a href="https://www.npmjs.com/package/codeburn"><img src="https://img.shields.io/npm/dt/codeburn.svg" alt="total downloads" /></a>
<a href="https://github.com/getagentseal/codeburn/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/codeburn.svg" alt="license" /></a>
<a href="https://github.com/getagentseal/codeburn"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg" alt="node version" /></a>
<a href="https://github.com/getagentseal/codeburn"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg" alt="node version" /></a>
<a href="https://discord.gg/pJ2DMWvtAx"><img src="https://img.shields.io/badge/discord-join-5865F2?logo=discord&logoColor=white" alt="Discord" /></a>
<a href="https://github.com/sponsors/iamtoruk"><img src="https://img.shields.io/badge/sponsor-♥-ea4aaa?logo=github" alt="Sponsor" /></a>
</p>
@ -378,7 +378,7 @@ These are starting points, not verdicts. A 60% cache hit on a single experimenta
**Codex** stores sessions at `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl` with `token_count` events containing per-call and cumulative token usage, and `function_call` entries for tool tracking.
**Cursor** stores session data in a SQLite database at `~/Library/Application Support/Cursor/User/globalStorage/state.vscdb` (macOS), `~/.config/Cursor/User/globalStorage/state.vscdb` (Linux), or `%APPDATA%/Cursor/User/globalStorage/state.vscdb` (Windows). Token counts are in `cursorDiskKV` table entries with `bubbleId:` key prefix. Parsed results are cached at `~/.cache/codeburn/cursor-results.json` and auto-invalidate when the database changes.
**Cursor** stores session data in a SQLite database at `~/Library/Application Support/Cursor/User/globalStorage/state.vscdb` (macOS), `~/.config/Cursor/User/globalStorage/state.vscdb` (Linux), or `%APPDATA%/Cursor/User/globalStorage/state.vscdb` (Windows). Token counts are in `cursorDiskKV` table entries with `bubbleId:` key prefix. Requires `better-sqlite3` (installed as optional dependency). Parsed results are cached at `~/.cache/codeburn/cursor-results.json` and auto-invalidate when the database changes.
**OpenCode** stores sessions in SQLite databases at `~/.local/share/opencode/opencode*.db`. CodeBurn queries the `session`, `message`, and `part` tables read-only, extracts token counts and tool usage, and recalculates cost using the LiteLLM pricing engine. Falls back to OpenCode's own cost field for models not in our pricing data. Subtask sessions (`parent_id IS NOT NULL`) are excluded to avoid double counting. Supports multiple channel databases and respects `XDG_DATA_HOME`.

View file

@ -173,14 +173,6 @@ const BUILTIN_ALIASES: Record<string, string> = {
'openclaw-auto': 'claude-sonnet-4-5',
'warp-auto-efficient': 'gpt-5.3-codex',
'warp-auto-powerful': 'claude-opus-4-6',
'GPT-5.3 Codex (low reasoning)': 'gpt-5.3-codex',
'GPT-5.3 Codex (medium reasoning)': 'gpt-5.3-codex',
'GPT-5.3 Codex (high reasoning)': 'gpt-5.3-codex',
'GPT-5.3 Codex (extra high reasoning)': 'gpt-5.3-codex',
'Claude Sonnet 4.6': 'claude-sonnet-4-6',
'Claude Sonnet 4.5': 'claude-sonnet-4-5',
'Claude Haiku 4.5': 'claude-haiku-4-5',
'Claude Opus 4.6': 'claude-opus-4-6',
'qwen-auto': 'claude-sonnet-4-5',
'kimi-auto': 'kimi-k2-thinking',
'kimi-code': 'kimi-k2-thinking',

View file

@ -73,7 +73,7 @@ type ExchangeToolInfo = {
}
function sanitizeProject(path: string): string {
return path.replace(/^\/+/, '').replace(/\//g, '-')
return path.split('/').filter(Boolean).pop() || path
}
function warpDbPath(bundleId: string): string {

View file

@ -204,7 +204,7 @@ skipUnlessSqlite('warp provider', () => {
expect(sessions).toHaveLength(1)
expect(sessions[0]!.provider).toBe('warp')
expect(sessions[0]!.path).toBe(`${dbPath}:conv-1`)
expect(sessions[0]!.project).toBe('Users-test-project-a')
expect(sessions[0]!.project).toBe('project-a')
})
it('parses one call per completed exchange and estimates tokens from primary-agent totals', async () => {
@ -263,7 +263,7 @@ skipUnlessSqlite('warp provider', () => {
expect(calls.reduce((sum, call) => sum + call.inputTokens, 0)).toBe(300)
expect(calls[1]!.inputTokens).toBeGreaterThan(calls[0]!.inputTokens)
expect(calls[0]!.projectPath).toBe('/Users/test/project-a')
expect(calls[0]!.project).toBe('Users-test-project-a')
expect(calls[0]!.project).toBe('project-a')
})
it('attributes command blocks to the nearest preceding exchange and extracts Bash commands', async () => {