Direct naar hoofdinhoud

Claude Code

Onofficiรซle Beta-vertaling

Deze pagina is vertaald door PageTurner AI (beta). Niet officieel goedgekeurd door het project. Een fout gevonden? Probleem melden โ†’

Watโ€‹

Toont Claude Code-sessiegegevens inclusief het huidige AI-model, tokenverbruik, kosten en werkruimtedetails. Laat een visuele meter zien van contextvenstergebruik en geformatteerde kosten/token-informatie voor het monitoren van je Claude-gebruik.

Dit segment integreert met de statusregelfunctionaliteit van Claude Code om realtime sessiegegevens in je prompt te tonen.

Voorbeeldconfiguratieโ€‹

{
"type": "claude",
"style": "diamond",
"leading_diamond": "๎‚ถ",
"trailing_diamond": "๎‚ด",
"foreground": "#FFFFFF",
"background": "#FF6B35",
"template": " ๓ฐฏ‰ {{ .Model.DisplayName }} ๏‹ {{ .TokenUsagePercent.Gauge }} "
}

Template (informatie)โ€‹

standaard template
 \udb82\udfc9 {{ .Model.DisplayName }} \uf2d0 {{ .TokenUsagePercent.Gauge }}

Eigenschappenโ€‹

NameTypeDescription
.SessionIDstringUnique identifier for the Claude session
.ModelModelAI model information
.WorkspaceWorkspaceWorkspace directory information
.CostCostCost and duration information
.ContextWindowContextWindowToken usage information
.TokenUsagePercentPercentagePercentage of context window used (0-100)
.FormattedCoststringFormatted cost string (e.g., "$0.15" or "$0.0012")
.FormattedTokensstringHuman-readable token count (e.g., "1.2K", "15.3M")

Model Eigenschappenโ€‹

NameTypeDescription
.IDstringTechnical model identifier
.DisplayNamestringHuman-readable model name (e.g., "Claude 3.5 Sonnet")

Werkruimte Eigenschappenโ€‹

NameTypeDescription
.CurrentDirstringCurrent working directory
.ProjectDirstringRoot project directory

Kosten Eigenschappenโ€‹

NameTypeDescription
.TotalCostUSDfloat64Total cost in USD
.TotalDurationMSint64Total session duration in milliseconds

ContextVenster Eigenschappenโ€‹

NameTypeDescription
.TotalInputTokensintTotal input tokens used in the session
.TotalOutputTokensintTotal output tokens generated in the session
.ContextWindowSizeintMaximum context window size for the model
.CurrentUsageCurrentUsageCurrent message token usage

HuidigGebruik Eigenschappenโ€‹

NameTypeDescription
.InputTokensintInput tokens for the current message
.OutputTokensintOutput tokens for the current message

Percentage-methodenโ€‹

De TokenUsagePercent eigenschap is een Percentage type dat extra functionaliteit biedt:

MethodReturnsDescription
.GaugestringVisual gauge showing remaining capacity using 5 bar blocks (โ–ฐโ–ฐโ–ฐโ–ฐโ–ฑ)
.GaugeUsedstringVisual gauge showing used capacity using 5 bar blocks (โ–ฐโ–ฑโ–ฑโ–ฑโ–ฑ)
.StringstringNumeric percentage value (e.g., "75" for use in templates)

Hoe het werktโ€‹

Het segment leest sessiegegevens uit de POSH_CLAUDE_STATUS omgevingsvariabele, die automatisch wordt ingesteld bij gebruik van het oh-my-posh claude commando. De gegevens omvatten:

  • Informatie over het huidige AI-model

  • Tokenverbruik en contextvensterbenutting

  • Sessiekosten en duur

  • Werkruimtemapinformatie

Het segment wordt alleen getoond wanneer Claude Code actief sessiegegevens levert.