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

Function add

packages/opencode/src/cli/cmd/run/session.shared.ts:92–99  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

90 }
91
92 const add = (value: string) => {
93 const gap = text ? " " : ""
94 const start = cursor + Bun.stringWidth(gap)
95 text += gap + value
96 const end = start + Bun.stringWidth(value)
97 cursor = end
98 return { start, end, value }
99 }
100
101 for (const part of msg.parts) {
102 if (part.type === "file") {

Callers 1

messagePromptFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected