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

Function pushText

packages/app/src/utils/prompt.ts:138–147  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

136 let cursor = 0
137
138 const pushText = (content: string) => {
139 if (!content) return
140 result.push({
141 type: "text",
142 content,
143 start: position,
144 end: position + content.length,
145 })
146 position += content.length
147 }
148
149 const pushFile = (item: Extract<Inline, { type: "file" }>) => {
150 const content = item.value

Callers 1

extractPromptFromPartsFunction · 0.70

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected