DGC v0.46.0 is out
Navigate
Install DGC
DGC v0.46.0Edit on GitHub ↗
Using DGC/Pasted text

a tall paste, a pasted link, and characters you cannot see

Pasted text

#

A paste is not typing. It can be forty lines of log, a bare URL, a whole file, or text carrying characters that have no glyph at all. DGC handles each of those differently, and changes what you pasted only when you ask it to.

A tall paste folds

#

In the terminal, a paste of five lines or more — or over 600 characters — collapses to a chip in the composer, [Pasted text #1 +40 lines], so a forty-line paste no longer takes half the screen. It expands back to the full text the moment you send. A shorter paste inserts as typed, and a field prompt that wants one exact value (a URL, a session name) always takes the raw text.

In the editor, a paste of 5,000 characters or more becomes an attachment chip reading Pasted text · 12,480 chars instead of filling the composer. Click it to read what it holds. Whatever you had already typed stays where it was.

#

In the editor, a clipboard holding exactly one URL and nothing else inserts a pill showing the host and path — github.com/OpenPeach-ai/dgc — with the whole URL on its tooltip. What the model receives is the URL itself, character for character: the pill shows the link, it does not replace it. Nothing is fetched to draw it, not even a favicon, so pasting a link discloses it to nobody. A paragraph that happens to contain a URL is prose, and is pasted as prose.

Characters you cannot see are counted, never removed for you

#

Three kinds of invisible character can hide an instruction inside text that looks ordinary:

  • Bidirectional overrides reorder how text displays without changing its bytes, so what you read and what the model reads can differ.
  • Tag characters encode a whole line of ASCII inside something that renders as nothing at all.
  • Zero-width characters pad text invisibly.

DGC hands your draft to a model and then acts on it, so this is a way in rather than untidiness. In the editor a bar appears over the composer: Remove 3 invisible characters — 2 can carry a hidden instruction, with Keep beside it. Click Remove and exactly those characters go, and nothing else. Click Keep to say the text is deliberate, and the row goes until the draft changes again. Ignore it and nothing changes either way: the count is a report, not an edit, because quietly altering what you pasted would be its own bug. The bar watches the whole draft rather than only a paste, so text you typed or dictated raises it the same way.

The bar is deliberately quiet about the harmless cases. Arabic, Persian and Hebrew carry directional marks as a matter of course, every multi-person emoji is held together by zero-width joiners, and the three subdivision flags are built from tag characters. None of them raise it, because a notice that fires on ordinary text teaches you to dismiss it — which is worse than no notice. And "can carry a hidden instruction" is said only for the two classes that actually can, so a stray byte-order mark from a web page is not dressed up as an attack.

Two limits, stated rather than hidden. This is the editor's composer: the terminal does not show the bar. And a paste large enough to fold into an attachment changes no composer text, so nothing counts it yet — the text inside that chip still reaches the model.

The editor never pastes markup

#

The composer is an editing host, which means the browser would otherwise insert your clipboard's HTML into it rather than its text. DGC takes the plain text instead, on every path — so a copied web page cannot bring an image that calls home the instant you paste, or an element laid over the Send button.

Documentation