Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(grok): surface context window usage in the composer #5405

Closedahmed-besic(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/5405/headopened View on GitHub

Showing 9 changed files with 116 additions and 2 deletions (loading 6).

x
0 of 9 viewed, 9 left
5 additions and 0 deletionsapps/server/src/provider/Layers/CursorAdapter.tsModified
View file
@@ -867,6 +867,11 @@
}),
return;
+ case "TokenUsageUpdated":
+ // Parsed from ACP usage_update; Grok wires this to the context
+ // meter. Cursor can emit the same makeAcpTokenUsageUpdatedEvent
+ // path once verified against a real Cursor ACP install.
+ return;
}),
80 additions and 2 deletionsapps/server/src/provider/Layers/GrokAdapter.tsModified
View file
@@ -49,15 +49,21 @@
makeAcpPlanUpdatedEvent,
makeAcpRequestOpenedEvent,
makeAcpRequestResolvedEvent,
+ makeAcpTokenUsageUpdatedEvent,
makeAcpToolCallEvent,
} from "../acp/AcpCoreRuntimeEvents.ts";
import { parsePermissionRequest } from "../acp/AcpRuntimeModel.ts";
import { makeAcpNativeLoggerFactory } from "../acp/AcpNativeLogging.ts";
import {
applyGrokAcpModelSelection,
+ contextWindowForModelId,
+ contextWindowsFromSessionModels,
currentGrokModelIdFromSessionSetup,