Merge remote-tracking branch 'origin/master' into feat/add-session-data-preview
# Conflicts: # docs/core-data-structures/session.i18n.yaml # packages/client/ui-conversation/README.i18n.yaml # packages/client/ui-conversation/README.md # packages/llm/token-meter/README.i18n.yaml # packages/llm/token-meter/README.md # packages/llm/token-meter/README.zh.md # packages/llm/token-meter/src/projection.ts
This commit is contained in:
@@ -82,8 +82,8 @@ export class TokenMeterService extends Service {
|
||||
super(ctx, 'tokenMeter')
|
||||
validateConfigKeys(config)
|
||||
|
||||
// Projection registration is an optional child: headless and TUI
|
||||
// compositions without the generic registry keep the meter's old shape.
|
||||
// Projection registration is an optional child: compositions without the
|
||||
// generic registry keep the meter's standalone read shape.
|
||||
ctx.inject(['sessionProjections'], (projectionCtx) => {
|
||||
projectionCtx.sessionProjections.register(tokenUsageProjectionDefinition)
|
||||
projectionCtx.sessionProjections.register(contextPressureProjectionDefinition)
|
||||
|
||||
@@ -24,9 +24,8 @@ export interface TokenUsageProjection {
|
||||
* observation: each is a last-wins record of a different moment. Switching
|
||||
* models can therefore pair a fresh capacity with the previous route's
|
||||
* pressure until the next request reports usage. This is an intentional trade
|
||||
* — the value is a user-facing reference, not a billing or gating input — and
|
||||
* it matches how the TUI status line has always computed occupancy. See the
|
||||
* token-meter README for the full rationale.
|
||||
* — the value is a user-facing reference, not a billing or gating input. See
|
||||
* the token-meter README for the full rationale.
|
||||
*/
|
||||
export interface ContextPressureProjection {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user