Download src/agents/sessions/compaction/runtime.ts from SaylorTwift/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 459 Bytes
-
https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/agents/sessions/compaction/runtime.ts
- Command line
-
hf download hf://SaylorTwift/openclaw/src/agents/sessions/compaction/runtime.ts
-
curl -L -o runtime.ts https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/agents/sessions/compaction/runtime.ts
459 Bytes
| import type { Usage } from "../../../llm/types.js"; | |
| import { openClawAgentCoreRuntime } from "../../runtime/index.js"; | |
| export type SessionModelUsageSink = (usage: Usage) => void; | |
| /** Adds a private usage sink without changing public summary result shapes. */ | |
| export function createCompactionRuntime(usageSink?: SessionModelUsageSink) { | |
| return usageSink | |
| ? { ...openClawAgentCoreRuntime, internalUsageSink: usageSink } | |
| : openClawAgentCoreRuntime; | |
| } | |