Skip to content

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 17 Aug 21:46
· 13 commits to main since this release

Added

  • Copying text out. ctrl+y (or /copy) puts the last reply on the
    clipboard and /copy all the whole conversation; thoth asks the terminal
    to do it with OSC 52, so it works over ssh and inside tmux and pulls in no
    clipboard library. ctrl+t hands the mouse back to the terminal so
    click-and-drag selects text the way it does in every other program, and
    ctrl+t again gives thoth the scroll wheel.
  • Slash commands complete as you type them. A / at the start of the
    message opens the list, with what each command does beside it, narrowing
    with every letter; tab or enter takes the highlighted one. It is the
    same picker @path already used.
  • thoth --view <name> in a debug build draws any screen of the interface
    with made-up contents and prints it as text: the start screen, a session
    mid-task, a permission prompt, the chooser, plan mode, both pickers, the
    four permission modes, the profile screen, and the whole thing at 46
    columns, a turn mid-stream, a scrolled-back transcript, hostile content,
    markdown, and a chooser with more options than rows to draw them in.
    thoth --view lists them and --view-size WxH sets the
    terminal. Screens that only appear after a permission prompt or an
    ask_user call were minutes of model time away from being looked at,
    which is where their bugs were living. cargo test every_view_draws
    renders all of them at two sizes.

Fixed

  • A shell command could draw on top of the interface on Windows. Redirecting
    stdout and stderr is not enough there: a console program inherits its
    parent's console and can write to it through the console api, which is what
    Write-Progress, Invoke-WebRequest's progress bar and a coloured
    Write-Host do, and a child that changes the console mode takes the
    terminal's escape handling with it. Commands now run with no console of
    their own.
  • PowerShell wrote its output in the console codepage, so anything past ascii
    came back through the pipe as mojibake: Thai, Japanese and accented text in
    a command's output was unreadable, to the user and to the model both. The
    pipe is UTF-8 now. Commands also run -NonInteractive, so one that would
    have asked a question fails instead of waiting for an answer nobody can
    give.
  • Escape sequences from tool output reached the terminal. cargo test,
    git and npm emit colour the moment they think a terminal is listening
    and the shell tool captures it verbatim, so a \x1b[31m in a result
    repainted the rest of the screen and \x1b[2J wiped it. Every line thoth
    draws now has its escapes, control characters and bidi overrides taken out
    first, wherever it came from: tool output, a file, a web page, the model's
    own reply, the model name the server gave, or a paste.
  • A question with more options than the terminal had rows drew as many as
    fitted and no more: the rest could be walked onto with the arrows but
    never seen, and the question itself could be pushed off the screen. The
    list scrolls with the highlight now, says how many are below it, and never
    takes the last row of the transcript.
  • A tool call with a permission prompt open said "running" underneath it.
    It has not run, and may never run: it now says it is waiting for you.
  • "plan ready" and its three keys were written into the transcript and drawn
    again on the state line one row below. The transcript keeps the moment,
    the state line keeps the keys.
  • Tabs in tool results and error messages were drawn as a single character,
    so a stack trace lost its indentation.
  • On a narrow terminal the status line dropped "scrolled up" and "selecting"
    to make room for the token counts, so the two states that explain why the
    screen has stopped behaving were exactly the ones not shown. They win over
    the numbers now.

Changed

  • The input sits in a box of its own instead of under a rule. It is the one
    part of the screen written into rather than read, and the border says so;
    it also carries whether thoth is listening, in the colour, which saves
    saying it in words somewhere else.
  • A tool's result hangs off the call on a corner (⎿) with the rest of it
    lined up past the corner. A result and the next line of prose were both
    just indented text before.
  • A shell command is drawn once, not twice: the preview under the call
    repeated what the header line already said. It comes back the moment the
    header line is too narrow to hold the whole command, and a command that
    does not fit now wraps at its spaces instead of being cut, because a
    permission prompt is answered on what is drawn.
  • The model's question is drawn above the input rather than below it: it is
    asked before anything is typed, while @path completes what is being
    typed, and the two belong on opposite sides of the box.
  • Markdown markers are obeyed instead of printed: ## in front of a heading
    is dropped rather than shown next to a heading that is already bold, -
    becomes a bullet with the wrapped rest of the item lined up under it, >
    becomes a bar down the side, a ``` fence becomes a rule carrying the
    language, and --- becomes a rule.
  • Each tool call is marked with a dot coloured by how it went: still going,
    done, failed. A screenful of them reads down the left edge.
  • The start screen names the three things nobody discovers by typing a
    sentence at thoth: /, @ and shift+tab.
  • The chooser for a question from the model is a list you move through with
    up/down and take with enter, drawn under the input with the
    highlighted row marked. 1-9 still picks one straight off.
  • Its last row is not one of the model's options: it opens the input box so
    you can write the answer in your own words when none of them is what you
    wanted. The model is told plainly that you took none of its options, so it
    does what you asked rather than the offer yours sounded closest to. esc
    goes back to the list, and a message half-typed when the question arrived
    is put back afterwards.

Full changelog: v0.4.1...v0.4.2