MCPcopy Create free account
hub / github.com/anomalyco/opencode / sendUsageUpdate

Function sendUsageUpdate

packages/opencode/src/acp/service.ts:872–885  ·  view source on GitHub ↗
(
  usage: UsageService.Interface | undefined,
  sdk: OpencodeClient,
  connection: ServiceConnection | undefined,
  sessionID: string,
  directory: string,
)

Source from the content-addressed store, hash-verified

870}
871
872function sendUsageUpdate(
873 usage: UsageService.Interface | undefined,
874 sdk: OpencodeClient,
875 connection: ServiceConnection | undefined,
876 sessionID: string,
877 directory: string,
878) {
879 if (!connection) return Effect.void
880 return (usage ?? makeUsageService(sdk)).sendUpdate({
881 connection,
882 sessionID,
883 directory,
884 })
885}
886
887function selectVariant(snapshot: Directory.Snapshot, model: Directory.DefaultModel) {
888 const variants = Directory.variants(snapshot, model)

Callers 1

makeFunction · 0.85

Calls 1

makeUsageServiceFunction · 0.85

Tested by

no test coverage detected