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

Function compactCommit

packages/opencode/src/cli/cmd/run/subagent-data.ts:267–276  ·  view source on GitHub ↗
(commit: StreamCommit)

Source from the content-addressed store, hash-verified

265}
266
267function compactCommit(commit: StreamCommit): StreamCommit {
268 if (!commit.part) {
269 return commit
270 }
271
272 return {
273 ...commit,
274 part: compactToolPart(commit.part),
275 }
276}
277
278function stateUpdatedAt(part: ToolPart) {
279 if (!("time" in part.state)) {

Callers

nothing calls this directly

Calls 1

compactToolPartFunction · 0.85

Tested by

no test coverage detected