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

Function descriptionText

packages/opencode/src/cli/cmd/run/footer.menu.tsx:210–225  ·  view source on GitHub ↗
(item: RunFooterMenuItem)

Source from the content-addressed store, hash-verified

208 return " ".repeat(Math.max(1, descriptionColumn() - Bun.stringWidth(item.display)))
209 }
210 const descriptionText = (item: RunFooterMenuItem) => {
211 if (!item.description) {
212 return
213 }
214
215 const footerWidth = item.footer ? Bun.stringWidth(item.footer) + 1 : 0
216 const available =
217 term().width -
218 (border() ? 1 : 0) -
219 (props.paddingLeft ?? 1) -
220 (props.paddingRight ?? 0) -
221 descriptionColumn() -
222 footerWidth -
223 4
224 return Locale.truncate(item.description, Math.max(12, available))
225 }
226 return (
227 <box
228 width="100%"

Callers 1

RunFooterMenuFunction · 0.85

Calls 1

borderFunction · 0.85

Tested by

no test coverage detected