mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
* feat: live provider quota panel (Claude + Codex) Adds Claude and Codex plan usage to the context window percentage circle tooltip, querying their respective APIs directly using existing CLI auth tokens. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: address review feedback - restore quota trigger, guard NaN date - Re-add triggerFetch() on agent idle/error in agent status subscription - Guard formatResetsAtLabel against NaN from malformed API date strings Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: resolve composer conflict and stub subscribe in websocket tests * feat(quota): add cursor, copilot, zai, grok, and kimi quota UI and improve type safety * feat(quota): make Claude and Codex pluggable, and map additional quota/credits metrics * security(quota): fix shell injection vulnerability by migrating exec to execFile * revert: restore original scripts/dev.ps1 and packages/desktop/scripts/dev.ps1 * Fix i18n resource test expectation * Fix quota tooltip empty-provider state * Preserve zero values in Grok quota * Fix empty quota fetch state * Ignore quota frames in relay reconnect tests * Persist refreshed Codex tokens to source auth file * fix(quota): read Claude OAuth credentials from the macOS login Keychain On macOS, Claude Code stores its OAuth credential in the login Keychain (generic-password item, service "Claude Code-credentials"), not in ~/.claude/.credentials.json — that file usually does not exist there, so the Claude provider's existsSync check failed and macOS users silently got no Claude quota. Read it via the macOS `security` CLI (its ACL only trusts /usr/bin/security to decrypt; a native Keychain read would prompt), and stay read-only there since Claude Code owns the refresh/persist. Linux and Windows keep using ~/.claude/.credentials.json unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Fix quota keychain timeout and local host reconciliation * Fix terminal notification test quota stub * Ignore quota frames in terminal notification tests * fix(quota): bypass Claude token refresh on macOS Keychain-backed logins * fix(dev): update local dev daemon port to 6768 on Windows scripts/dev.ps1 * fix(dev): bypass Unix dev-daemon.sh on Windows in dev.ps1 * fix(client): handle and dispatch provider_quota event in DaemonClient * fix(desktop): fix PowerShell quote stripping in desktop dev.ps1 config seeding * fix(desktop): execute config update via temp file to avoid PowerShell quoting bugs * fix(desktop): fix concurrently command invocation on Windows in dev.ps1 * fix(desktop): resolve path escaping and environment setting syntax errors in dev.ps1 for Windows * Add on-demand provider usage views * Fix Cursor usage billing dates * Move provider usage renderer coverage to e2e * Use provider manifest for quota fetchers * Add provider usage fetch timeouts * Reshape provider usage fetchers --------- Co-authored-by: ABorakati <ABorakati@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com> Co-authored-by: lumingjun <lumingjun@bytedance.com>
62 lines
2.5 KiB
PowerShell
62 lines
2.5 KiB
PowerShell
$ErrorActionPreference = "Stop"
|
|
|
|
# Ensure node_modules/.bin is in PATH
|
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
$env:PATH = "$ScriptDir\..\node_modules\.bin;$env:PATH"
|
|
|
|
# Derive PASEO_HOME: stable name for worktrees, temporary dir otherwise
|
|
if (-not $env:PASEO_HOME) {
|
|
$GitDir = git rev-parse --git-dir 2>$null
|
|
$GitCommonDir = git rev-parse --git-common-dir 2>$null
|
|
|
|
if ($GitDir -and $GitCommonDir -and ($GitDir -ne $GitCommonDir)) {
|
|
# Inside a worktree — derive a stable home from the worktree name
|
|
$WorktreeRoot = git rev-parse --show-toplevel
|
|
$WorktreeName = (Split-Path -Leaf $WorktreeRoot).ToLower() -replace '[^a-z0-9-]', '-' -replace '-+', '-' -replace '^-|-$', ''
|
|
$env:PASEO_HOME = "$env:USERPROFILE\.paseo-$WorktreeName"
|
|
New-Item -ItemType Directory -Force -Path $env:PASEO_HOME | Out-Null
|
|
} else {
|
|
$env:PASEO_HOME = Join-Path ([System.IO.Path]::GetTempPath()) "paseo-dev-$([System.Guid]::NewGuid().ToString('N').Substring(0,6))"
|
|
New-Item -ItemType Directory -Force -Path $env:PASEO_HOME | Out-Null
|
|
# Register cleanup on exit
|
|
$TempPaseoHome = $env:PASEO_HOME
|
|
Register-EngineEvent PowerShell.Exiting -Action {
|
|
Remove-Item -Recurse -Force $TempPaseoHome -ErrorAction SilentlyContinue
|
|
} | Out-Null
|
|
}
|
|
}
|
|
|
|
# Share speech models with the main install to avoid duplicate downloads
|
|
if (-not $env:PASEO_LOCAL_MODELS_DIR) {
|
|
$env:PASEO_LOCAL_MODELS_DIR = "$env:USERPROFILE\.paseo\models\local-speech"
|
|
New-Item -ItemType Directory -Force -Path $env:PASEO_LOCAL_MODELS_DIR | Out-Null
|
|
}
|
|
|
|
Write-Host @"
|
|
======================================================
|
|
Paseo Dev (Windows)
|
|
======================================================
|
|
Home: $($env:PASEO_HOME)
|
|
Models: $($env:PASEO_LOCAL_MODELS_DIR)
|
|
Daemon: localhost:6768
|
|
======================================================
|
|
"@
|
|
|
|
# Allow any origin in dev so Electron on random ports all work.
|
|
# SECURITY: wildcard CORS is unsafe in production — only acceptable here because
|
|
# the daemon binds to localhost and this script is never used for production.
|
|
$env:PASEO_CORS_ORIGINS = "*"
|
|
|
|
# Configure the app to auto-connect to this daemon on localhost
|
|
$env:APP_VARIANT = "development"
|
|
$env:EXPO_PUBLIC_LOCAL_DAEMON = "localhost:6768"
|
|
$env:PASEO_LISTEN = "127.0.0.1:6768"
|
|
$env:BROWSER = "none"
|
|
|
|
# Run both with concurrently
|
|
concurrently `
|
|
--names "daemon,metro" `
|
|
--prefix-colors "cyan,magenta" `
|
|
"npm run dev:server:watch" `
|
|
"cd packages/app && npx expo start"
|