Repository navigation
claudecast: add cmux support, update cost calculation, new usage dashboard, fix ooms, etc. - #27693
Conversation
- Merge contributions: keep local 1.8.0 state with cmux + auth gate broadening - Pull contributions - chore(gitignore): also ignore PR_*.md naming variant - fix(1.8.0): broaden auth gate, restore detail-view recency, fix kitty window mode - chore(release): v1.8.0 - Merge branch \'contributions/merge-pr27154\' - Pull contributions: PR raycast#27154 (open-in tab/window preference for all terminal apps)
|
Thank you for the update! 🎉 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
Greptile SummaryClaudeCast 1.8.0 is a substantial quality release addressing cost calculation accuracy, OOM crashes, a usage dashboard rewrite, cmux terminal support, an auth gate for Claude API commands, and a Git Actions project-picker rewrite.
Confidence Score: 5/5Safe to merge — the correctness fixes are well-scoped and the OOM mitigations are additive. The only nit is a hardcoded date in the changelog entry. The cost calculation, OOM, and UI changes are all carefully structured: dedup logic is keyed on stable IDs, tier pricing matches Anthropic's documented per-request semantics, the bounded file collector is correct, and the auth preflight adds safety without breaking existing flows. No logic errors or data integrity concerns were identified. No files require special attention beyond the CHANGELOG date placeholder. Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
extensions/claudecast/CHANGELOG.md:3
The 1.8.0 entry uses a hardcoded date instead of the `{PR_MERGE_DATE}` placeholder required by the repository's changelog convention. Raycast's build pipeline populates the placeholder automatically at merge time; a literal date may be wrong if the PR lands on a different day.
```suggestion
## [1.8.0] - {PR_MERGE_DATE}
```
Reviews (3): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile |
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
ClaudeCast 1.8.0
Cost calculation correctness, OOM crash fixes, dashboard rewrite, cmux terminal support, broadened auth gate, Git Actions rewrite, and a sync of upstream PR #27154.
Cost calculation (correctness)
streamSessionUsagededups by(message.id, requestId)and keeps the last cumulative value per key. Anthropic'smessage_deltaevents emit cumulative usage; the CLI persists one JSONL line per chunk, so naive summing inflated session totals 2-4x. Verified on real sessions: one went 440K -> 114K, another 242K -> 95K.MODEL_PRICINGrows accept an optionaltierblock applied per-message (per-request), not per-session.opussubstring and were billed at the deprecated $15/$75 tier (3x overcharge).getDailyStatsnow buckets per-entry timestamps viastreamSessionUsage(..., { bucketByDay: true })instead of stamping a session's full cost on its file mtime date.calculateStatsWithUsageno longer mutates input. Costs computed into a localMap<string, number>. Top sessions returned as a lightweightTopSessionSummaryso cachedUsageStatsdoes not aliasSessionMetadatareferences the menu bar holds.OOM crash fixes (menu-bar-monitor, usage-dashboard, browse-sessions)
getTodayStatswrites/readsclaudecast-today-stats-v1in LocalStorage with a 30s TTL.environment.launchTypedifferentiation in menu bar. Background ticks fetch onlyisClaudeActive()+ cached today stats. The full-historygetMostRecentProject()scan only runs onLaunchType.UserInitiated.listAllSessions. When alimitis provided, maintains a sorted top-N array and skips files older than the current N-th-oldest, instead of statting every file then sorting.getSessionDetail(defaults: last 200 messages, 5KB per message). ReturnsSessionDetail.totalMessageCountso the UI can show the truncation notice.streamSessionUsagemirrors the pattern fromparseSessionMetadataFast.Usage Dashboard rewrite
Detailpage with range tabs (Today / This Week / This Month / All Time) that drive both the chart bin granularity and the rest of the page (Today/Week: 7 daily bars, Month: 4-5 weekly bars, All Time: up to 12 monthly bars).file://URL, generated by newsrc/lib/svg-chart.ts. White text fill with a stackedfeDropShadowhalo so labels read on both Raycast themes.dailyRange(the range the loaded data was fetched for), not the currentrange. Stale fetches are cancelled.cmux terminal support
terminalApppreference dropdown.open -a cmux <cwd>+ AppleScriptperform action ("text:" & "<cmd>" & (ASCII character 10))via cmux's own input pipeline. No Accessibility permission needed.new windowverb + typedcd "<cwd>" && <cmd>.Auth gate for Claude API commands
ensureClaudeApiAuth()preflights authentication before spawning claude. Accepts:anthropicApiKeyoroauthToken)ANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKEN, orCLAUDE_CODE_OAUTH_TOKENclaude auth status --json(coversclaude auth login)When none are configured the user gets a Failure toast with an "Open Preferences" action instead of a hung claude process waiting on its
/loginprompt. Wired intoask-claude,git-actions,transform-selection,prompt-library.Git Actions rewrite
discoverClaudeProjects()).executePromptdefault timeout extended from 2 to 10 minutes; git review actions scale further (3-15 min) based on diff size, with a "Large diff (NNN KB). This may take a few minutes." toast when >50KB.Session prompt extraction (Browse Sessions, Deep Search Sessions)
cleanUserMessageContent(raw)helper applied whereverfirstMessageis derived (parseSessionMetadataFast,searchSingleSession,parseFullSession):nullfor any<local-command-*>wrapper (catches both<local-command-caveat>boilerplate and<local-command-stdout>echo from/model,/effort, etc.).nullfor short slash-only prompts (/model,/effort high,/clear, anything/-prefixed under 30 chars). Long slash commands with substantive args (/review https://github.com/.../pull/123 ...) are kept.<command-prefix in any leading order and unwraps to/cmd args.extractUserText(content)helper centralizes the "string vs array-of-blocks" content shape handling.Detail view: last 20 messages
Browse Sessions and Deep Search Sessions detail views now render the most recent 20 messages with a "Showing last N of M messages" notice keyed to the rendered count. The banner now also appears for any session over 20 messages, not just sessions over 200.
Kitty window mode
Restored
--single-instanceon the kitty window-mode fallback so launches reuse the running kitty instance instead of spawning a separate process.Synced from upstream PR #27154
openIn: "window" | "tab"preference (defaultwindow). Each terminal honors it: Terminal/iTerm sendCmd+Tvia System Events for tab; kitty useskitten @ launch --type=tab(falls back to window if remote-control disabled); Ghostty usesnew tabvsnew windowAppleScript verbs; cmux gets both modes; Warp ignores the preference.Continue with Promptshortcut in Launch Project changedCmd+P->Cmd+Shift+P(Cmd+P is Raycast-reserved).user_675a985a803f8cc8105badded back tocontributors.Other fixes
$escape bug inopenInTerminalAppandopenInITerm. Removed the.replace(/\$/g, "\\$")that convertedbash -c 'echo $SHELL'into the literal text$SHELL. Centralized into a sharedescapeAppleScriptDoubleQuoted()helper.Test plan
npm run lint,npx tsc --noEmit, andnpm run buildclean.new windowverb. Both run the typed command.ANTHROPIC_AUTH_TOKENexported in shell: Ask Claude Code works; auth toast does not appear.openIn = "window"reuses the running kitty instance.