e795d24230207bf4be03f6269ba560e21873a6fb
The OpenCode TUI renders tool output through a literal <text> node (packages/tui/.../session/index.tsx, GenericTool), so a GFM table becomes a wall of pipes. The web/desktop client passes the same output through the markdown renderer and draws a proper grid, so a GFM table is the most compact form there. The previous fix emitted a markdown table and assumed the TUI would render it. It does not. The fix: ship both. The ASCII table is space- padded, word-wraps long cells, and stays aligned even when the TUI shows only its collapsed 3-line preview; the markdown table follows and is what the web/desktop client renders with a proper grid. - New rowsToAsciiTable: cellToAscii, truncateForCell, wrapCell, visibleWidth, padRight. NULL -> <null>, BLOB -> <BLOB nB>, Date -> ISO, BigInt -> string. Cell width capped at 40 chars by default (configurable). Single words longer than the cap are hard-wrapped. - sqlite_query's format=table path now emits the ASCII table first and the markdown table second, with a blank line between. - README explains why the duplication and how to read both. End-to-end verified via Code Mode (no model in the loop) after opencode service restart picked up the new transform.
Description
No description provided
Languages
TypeScript
100%