MCPcopy Index your code
hub / github.com/anomalyco/opencode / footer

Function footer

packages/opencode/test/cli/run/stream.test.ts:5–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import type { FooterApi, FooterEvent, StreamCommit } from "@/cli/cmd/run/types"
4
5function footer() {
6 const events: FooterEvent[] = []
7 const commits: StreamCommit[] = []
8
9 const api: FooterApi = {
10 isClosed: false,
11 onPrompt: () => () => {},
12 onQueuedRemove: () => () => {},
13 onClose: () => () => {},
14 event: (next) => {
15 events.push(next)
16 },
17 append: (next) => {
18 commits.push(next)
19 },
20 idle: () => Promise.resolve(),
21 close: () => {},
22 destroy: () => {},
23 }
24
25 return { api, events, commits }
26}
27
28describe("run stream bridge", () => {
29 test("defaults status patches to running phase", () => {

Callers 1

stream.test.tsFile · 0.70

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected