Skip to content

feat(tui): quick wins - input correctness, Update-loop I/O, dead boilerplate, shared render helpers - #1651

Merged
edenreich merged 19 commits into
mainfrom
fix/issue-1645
Oct 30, 2026
Merged

edenreich merged 19 commits into
mainfrom
fix/issue-1645

Conversation

@inference-gateway-maintainer

@inference-gateway-maintainer inference-gateway-maintainer Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #1645

Summary

Implements the TUI quick wins from issue #1645. The search input is now multibyte-safe. Update-loop I/O (delete and paste) moves onto returned tea.Cmds, per-call transition maps are hoisted, and dead model boilerplate and dead exports are deleted. All 16 divider strings route through the shared RenderSeparator, the welcome screen render is cached, and the duplicated plan-cursor handlers and panel shortcut shells are consolidated. All twelve acceptance-criteria groups from the issue are done.

The PR also adds one user-facing config key. The tool-result cap that channels apply moves out of a hardcoded constant into channels.max_tool_result_len.

New config key

  • channels.max_tool_result_len (env INFER_CHANNELS_MAX_TOOL_RESULT_LEN, default 1000) sets how many runes of one tool call or tool result a channel forwards before cutting it with an ellipsis.
  • The Telegram thread render and the scheduled-job notifier both read it through ChannelsConfig.ToolResultLimit(), which falls back to 1000 when the key is unset or not positive. A negative value would otherwise panic the rune cut.
  • Viper registers the key from DefaultChannelsConfig(), so channels.yaml, the env override and infer init seeding work with no extra wiring. docs/channels.md and docs/configuration-reference.md list it.

Changes

  • Search input in the conversation selector and task manager uses keys.PrintableText, so multibyte runes and the space bar land in the query. Backspace trims a rune instead of a byte (fix, user-facing).
  • loadConversationsCmd no longer sleeps constants.TestSleepDelay/10 on every list load.
  • Conversation delete runs in a returned tea.Cmd that captures the repo and the ID and delivers conversationDeletedMsg. The confirm dialog closes as the delete starts, so a repeated Y cannot delete the same row twice. The row removal (slices.DeleteFunc) and syncTable happen in Update on the result message.
  • handlePaste reads the clipboard and does its file writes, image optimization and ReadImageFromFile inside its returned tea.Cmd, delivering keybinding.PasteResultMsg. AddImageAttachment, SetText and SetCursor run in Update via keybinding.HandlePasteResult, with a table test against the fake input component.
  • The view-transition and chat-status transition maps in tui/state.go are hoisted to package-level vars, and the validators collapse to slices.Contains.
  • QueueBoxView and TodoBoxView lose their no-op Init/View/Update trio. SubagentList gets a plain SetWidth instead of its live Update. chat.go applies resize widths directly and the list's resize tests call SetWidth.
  • All 16 strings.Repeat("─", width) divider sites call the previously unused Provider.RenderSeparator. The three unstyled sites (help bar, conversation footer, delete dialog) pick up the dim theme color, and box borders stay explicit.
  • renderFullWelcome is memoized and invalidated on resize, theme change, and a new config path or version. os.Getwd() and the bordered-box rebuild no longer run every frame.
  • ConversationsLoadedEvent.Conversations is now []convdomain.ConversationSummary, deleting the []any boxing round-trip.
  • The four plan-approval cursor handlers share one extracted movePlanSelection clamp-and-emit helper.
  • The seven identical panel shortcut shells (diff, explorer, tasks, conversations, environments, tools, agents) collapse onto one exported PanelShortcut type built by per-command constructors. The unread repo field on ConversationSelectShortcut goes away from its three callers.
  • platform/render gains the shared QuoteBlock, and telegram/thread_render.go and agent/headless/agent_message.go use it and render.Truncate instead of their private copies. The byte cuts in render.Truncate and insights.truncate are now rune-safe.
  • Small cuts:
    • QueuedIcon/BulletIcon collapse to QueuedIcon and RenderBold/RenderBoldText collapse to RenderBoldText.
    • keybinding/validation.go (the keys.IsKnownKey wrapper) is deleted.
    • Dead exports are deleted: styles RenderStatusLine/PlaceCenterTop/RenderColoredDiff, colors BrightRed/LightGreenBg/LightRedBg/LipglossBlack/LipglossWhiteBg, registry HasSequenceWithPrefix, Dispatcher.GetRegistry and shortcuts Unregister/GetShortcuts/GetShortcutsStartingWith.
    • The test-only helpers formatting.FormatWarning, NewToolDiffRenderer, CreateSeparator and CreateStyledText are removed with their tests.
  • The conversation-input-routing test pumps each returned delete command like the Bubble Tea runtime does.

Verification

  • Every commit passed the repo's pre-commit gate (mod tidy, mocks, gofmt/gci, golangci-lint, markdownlint).
  • go test -race -tags purego ./... runs green across all 114 packages with no data races.
  • New tests cover ToolResultLimit (set, unset, negative), the INFER_CHANNELS_MAX_TOOL_RESULT_LEN env override and the capped headless tool result. A selector test checks that a repeated Y issues one delete, and it fails without the fix.

Docs

Use keys.PrintableText for the conversation-selector and task-management search boxes so multibyte runes and the space bar land in the query, and trim a full rune on backspace instead of a byte.
time.Sleep(constants.TestSleepDelay/10) is a test-support pacing constant that added 10ms of latency to every list load; the constants import goes with it.
performDelete now returns a tea.Cmd that captures the repo and the conversation ID and delivers a conversationDeletedMsg result; removing the row and syncTable run in Update when the message arrives.
handlePaste reads the clipboard, writes and optimizes pasted images inside its returned tea.Cmd and delivers a PasteResultMsg; AddImageAttachment, SetText and SetCursor run in Update via keybinding.HandlePasteResult, together with the status flash. Covered by a table test against the fake input component.
…vars

Building both maps on every transition check was per-frame work; they are immutable data that belong at package level, and the validators collapse to a slices.Contains over them.
The four plan-approval cursor handlers (left/right in the editor pair and the dedicated plan-approval ones) duplicated the wrap-around logic; movePlanSelection now owns the clamp-and-emit and the handlers delegate to it.
…ew, TodoBoxView and SubagentList

QueueBoxView and TodoBoxView lost their no-op Tea trio, whose Model-returning Update forced the other two to exist, and SubagentList gets a plain SetWidth instead of its live Update (the row window never used other messages); chat.go now applies resize widths directly and the list's resize tests call SetWidth.
The 16 hand-built strings.Repeat divider sites now call the existing, previously unused Provider.RenderSeparator; the three unstyled sites (help bar, conversation list footer and delete dialog) pick up the dim theme color for free, and the redundant dimColor locals go with the conversions. Box borders stay explicit.
renderFullWelcome no longer calls os.Getwd() and rebuilds the bordered box every frame - its result is memoized and invalidated on resize or theme change, exactly the two things it derives from. ConversationsLoadedEvent.Conversations becomes []convdomain.ConversationSummary, deleting the []any boxing round-trip between the load command and the selector.
…e panelShortcut type

Diff, explorer, tasks, conversations, environments, tools and agents shortcuts were identical shells differing only in name, description and side effect; they now share panelShortcut with per-command constructors. The unread repo field on ConversationSelectShortcut goes too, dropping it from its three constructor callers.
…and make byte cuts rune-safe

telegram/thread_render.go and agent/headless/agent_message.go carried identical capRunes, quoteBlock and maxToolResultLen declarations; they now use render.CapRunes, render.QuoteBlock and render.MaxToolResultLen. The byte cuts in render.Truncate and insights.truncate split a UTF-8 rune mid-character and now cut by rune.
@edenreich

Copy link
Copy Markdown
Contributor

@infer can you continue on the last todos and make this PR ready for review?

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Model: ollama_cloud/glm-5.3-flash · Action: v0.59.2 · CLI: v0.238.0 · Gateway: v0.60.1 · View Job

Todos

Pull Request

#1651

✅ Infer Result: Success

All done - the last todos are complete and PR #1651 is ready for review with a fully green CI.

What this run did

Fixed the failing test CI check (pushed as test(tui): pump the delete command in the conversation routing test, a99a831):

  • Root cause: after the async-delete refactor, performDelete returns a Cmd that delivers conversationDeletedMsg - the row removal and confirmDelete reset happen in Update when that message arrives. TestConversationSelectionDeleteKeysDoNotLeakIntoInput sent its "d"/"y" pairs while discarding the returned Cmd, so the completion message was never pumped, the confirm dialog stayed open, and the final Escape was swallowed as a delete-confirmation key instead of cancelling the selector. app.Update(Escape) then returned a nil command and the "clears the transient status" assertion failed.
  • This is a test-simulation gap, not a product bug: the real Bubble Tea runtime always executes returned commands and feeds messages back. The test now pumps each key's returned command through the existing pumpApp/drainAppCmd helpers (same package, already used by the question-form repro test), so the dialog completes before the Escape assertion. In the real runner the delete message is processed before the user's next keypress, so behavior is unchanged.
  • Verified locally: the formerly failing test and the whole tui/app pass green (go test -race -tags purego ./internal/presentation/tui/app/), and the repo's pre-commit gate (mod tidy, mocks, fmt, lint) passed before the commit.

Confirmed the remaining acceptance-criteria groups are done (the last two commits of the previous pass, verified by a code sweep rather than the stale PR body):

  • Shared render helpers: platform/render now owns Truncate, MaxToolResultLen, CapRunes and QuoteBlock; telegram/thread_render.go and agent/headless/agent_message.go both use them, and the byte cuts in render.Truncate and insights.truncate are rune-safe.
  • Small cuts: QueuedIcon/BulletIcon collapsed to QueuedIcon, RenderBold/RenderBoldText collapsed to RenderBoldText; keybinding/validation.go deleted; the dead exports (styles RenderStatusLine/PlaceCenterTop/RenderColoredDiff, colors BrightRed/LightGreenBg/LightRedBg/LipglossBlack/LipglossWhiteBg, registry HasSequenceWithPrefix, Dispatcher.GetRegistry, shortcuts Unregister/GetShortcuts/GetShortcutsStartingWith) and the test-only helpers (FormatWarning, NewToolDiffRenderer, CreateSeparator, CreateStyledText) are all gone. The only remaining strings.Repeat("─", ...) sites are the box borders the issue explicitly keeps.

Made the PR ready for review:

No schemas, gateway or SDK impact; the only knock-on is the docs ticket above.

Risk note: I did not change any product behavior in this run (one test file only), and I left the pre-existing quirk that Escape does nothing while the delete-confirm dialog is up despite its footer saying "N or esc to cancel" - that predates the PR and is out of its scope; flag it if you want it fixed here or in a follow-up.

Model: ollama_cloud/glm-5.3-flash · Action: v0.59.2 · CLI: v0.238.0 · Gateway: v0.60.1 · Exit Code: 0 · Duration: 23m 5s

Tokens: 3,196,505 in · 24,343 out · 3,220,848 total (45 requests)

Tool calls: 68 total · 100% success rate

Traces
Session: 1793392911-4cf3beb1

session (headless, success)                                                                       22m58s
├── chat ollama_cloud/glm-5.3-flash                                                                 3.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.8s
│           ╰── POST [inference-gateway, server]                                                    3.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.8s
├── execute_tool Bash call_jv615iux                                                                  8ms
├── execute_tool Bash call_xwv0bacr                                                                  4ms
├── execute_tool Bash call_lt6j9njr                                                                 1.2s [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                                                 4.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.8s
│           ╰── POST [inference-gateway, server]                                                    4.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.8s
├── execute_tool Bash call_q6uk2fpv                                                                 3.5s
├── execute_tool TodoWrite call_jod401w0                                                            56µs
├── chat ollama_cloud/glm-5.3-flash                                                                 2.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.9s
│           ╰── POST [inference-gateway, server]                                                    2.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.9s
├── execute_tool Read call_tt9mroul                                                                550µs
├── chat ollama_cloud/glm-5.3-flash                                                                 9.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       9.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     9.2s
│           ╰── POST [inference-gateway, server]                                                    9.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 9.2s
├── execute_tool Bash call_rkoa0bpg                                                                 2.6s
├── execute_tool Bash call_azg9lygi                                                                1m23s [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                                                 3.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.2s
│           ╰── POST [inference-gateway, server]                                                    3.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.2s
├── execute_tool Bash call_kmh1wock                                                                  7ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.2s
│           ╰── POST [inference-gateway, server]                                                    3.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.2s
├── execute_tool Grep call_bujs1mse                                                                  8ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.0s
│           ╰── POST [inference-gateway, server]                                                    2.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.0s
├── execute_tool Read call_yrjacylq                                                                551µs
├── chat ollama_cloud/glm-5.3-flash                                                                 4.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.9s
│           ╰── POST [inference-gateway, server]                                                    4.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.9s
├── execute_tool Read call_y7dxm7ni                                                                488µs
├── chat ollama_cloud/glm-5.3-flash                                                                 4.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.6s
│           ╰── POST [inference-gateway, server]                                                    4.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.6s
├── execute_tool Grep call_9vmgd91a                                                                  8ms
├── execute_tool Grep call_3pryt5ho                                                                  2ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.2s
│           ╰── POST [inference-gateway, server]                                                    1.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.2s
├── execute_tool Read call_sec6vos1                                                                515µs
├── chat ollama_cloud/glm-5.3-flash                                                                 2.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.2s
│           ╰── POST [inference-gateway, server]                                                    2.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.2s
├── execute_tool Read call_mubtkxed                                                                482µs
├── execute_tool Read call_fdkdqen4                                                                482µs
├── chat ollama_cloud/glm-5.3-flash                                                                 5.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.6s
│           ╰── POST [inference-gateway, server]                                                    5.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.6s
├── execute_tool Bash call_f05cr79z                                                                  5ms
├── chat ollama_cloud/glm-5.3-flash                                                                13.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      13.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    13.2s
│           ╰── POST [inference-gateway, server]                                                   13.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                13.2s
├── execute_tool Grep call_9j1u4kgm                                                                  7ms
├── execute_tool Bash call_lxcxbc7t                                                                  7ms
├── execute_tool Memory call_zz1ypg9z                                                              118µs
├── chat ollama_cloud/glm-5.3-flash                                                                 3.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.7s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.7s
├── execute_tool Bash call_unmb788y                                                                 1.0s
├── execute_tool Read call_gri3obdn                                                                554µs
├── chat ollama_cloud/glm-5.3-flash                                                                21.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      21.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    21.7s
│           ╰── POST [inference-gateway, server]                                                   21.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                21.7s
├── execute_tool TodoWrite call_82p9e6mj                                                            59µs
├── chat ollama_cloud/glm-5.3-flash                                                                 3.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.1s
│           ╰── POST [inference-gateway, server]                                                    3.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.1s
├── execute_tool Edit call_b3qb9459                                                                929µs
├── chat ollama_cloud/glm-5.3-flash                                                                 2.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.1s
│           ╰── POST [inference-gateway, server]                                                    2.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.1s
├── execute_tool Bash call_xhc0rjba                                                                 2.9s
├── chat ollama_cloud/glm-5.3-flash                                                                 2.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.8s
│           ╰── POST [inference-gateway, server]                                                    2.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.8s
├── execute_tool Bash call_95853rq8                                                                1m47s
├── chat ollama_cloud/glm-5.3-flash                                                                 3.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.8s
│           ╰── POST [inference-gateway, server]                                                    3.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.8s
├── execute_tool Bash call_ylt2hixv                                                                 2.1s
├── chat ollama_cloud/glm-5.3-flash                                                                 1.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.6s
│           ╰── POST [inference-gateway, server]                                                    1.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.6s
├── execute_tool Bash call_l3axse62                                                                  9ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.5s
│           ╰── POST [inference-gateway, server]                                                    1.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.5s
├── execute_tool Bash call_jt4wzykv                                                                3m52s
├── chat ollama_cloud/glm-5.3-flash                                                                 1.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.9s
│           ╰── POST [inference-gateway, server]                                                    1.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.9s
├── execute_tool Bash call_omhex42t                                                                  5ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.4s
│           ╰── POST [inference-gateway, server]                                                    2.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.4s
├── execute_tool Bash call_4j3b6d97                                                                 6.0s
├── chat ollama_cloud/glm-5.3-flash                                                                 1.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.5s
│           ╰── POST [inference-gateway, server]                                                    1.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.5s
├── execute_tool Bash call_17a0e621                                                                 1.5s
├── chat ollama_cloud/glm-5.3-flash                                                                13.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      13.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    13.6s
│           ╰── POST [inference-gateway, server]                                                   13.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                13.6s
├── execute_tool Grep call_48m9if22                                                                  3ms
├── execute_tool Grep call_xp51e09j                                                                796ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.1s
│           ╰── POST [inference-gateway, server]                                                    3.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.1s
├── execute_tool Grep call_4w8oec5o                                                                871ms
├── execute_tool Grep call_5dfl9cty                                                                871ms
├── chat ollama_cloud/glm-5.3-flash                                                                 4.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.3s
│           ╰── POST [inference-gateway, server]                                                    4.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.3s
├── execute_tool Bash call_sd4u2736                                                                  5ms
├── execute_tool Grep call_mwl2ws2o                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                 8.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       8.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     8.0s
│           ╰── POST [inference-gateway, server]                                                    8.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 8.0s
├── execute_tool Grep call_28ct2tpv                                                                 25ms
├── execute_tool Grep call_jk401717                                                                 17ms
├── execute_tool Grep call_64zxlg8x                                                                  8ms
├── chat ollama_cloud/glm-5.3-flash                                                                 6.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       6.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     6.5s
│           ╰── POST [inference-gateway, server]                                                    6.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 6.5s
├── execute_tool Grep call_aoj9y4uw                                                                902ms
├── execute_tool Grep call_o9f4f61z                                                                767ms
├── chat ollama_cloud/glm-5.3-flash                                                                 5.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.4s
│           ╰── POST [inference-gateway, server]                                                    5.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.4s
├── execute_tool Grep call_j64e9bi0                                                                  1ms
├── execute_tool Grep call_mcua18dj                                                                  1ms
├── execute_tool Grep call_qncikeh0                                                                  1ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.0s
│           ╰── POST [inference-gateway, server]                                                    2.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.0s
├── execute_tool Read call_hk31z860                                                                538µs
├── execute_tool Read call_l9cy2li8                                                                474µs
├── chat ollama_cloud/glm-5.3-flash                                                                11.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      11.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    11.1s
│           ╰── POST [inference-gateway, server]                                                   11.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                11.1s
├── execute_tool TodoWrite call_w1t0bnym                                                            56µs
├── execute_tool Bash call_8rm7i8hq                                                                 1.2s
├── chat ollama_cloud/glm-5.3-flash                                                                 3.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.3s
│           ╰── POST [inference-gateway, server]                                                    3.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.3s
├── execute_tool Bash call_89o9tgvw                                                                286ms
├── execute_tool Grep call_5bav8a41                                                                 12ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.1s
│           ╰── POST [inference-gateway, server]                                                    3.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.1s
├── execute_tool Grep call_fx8fxdv6                                                                  1ms
├── execute_tool Grep call_j6o4rubi                                                                  2ms
├── chat ollama_cloud/glm-5.3-flash                                                                 5.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.2s
│           ╰── POST [inference-gateway, server]                                                    5.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.2s
├── execute_tool Write call_hdojar07                                                                 1ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.7s
│           ╰── POST [inference-gateway, server]                                                    1.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.7s
├── execute_tool Bash call_xatvk1hd                                                                 1.5s
├── chat ollama_cloud/glm-5.3-flash                                                                11.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      11.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    11.9s
│           ╰── POST [inference-gateway, server]                                                   11.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                11.9s
├── execute_tool Write call_xglq1m2i                                                                 1ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.8s
│           ╰── POST [inference-gateway, server]                                                    1.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.8s
├── execute_tool Bash call_jbu09qqs                                                                 2.0s
├── chat ollama_cloud/glm-5.3-flash                                                                 2.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.0s
│           ╰── POST [inference-gateway, server]                                                    2.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.0s
├── execute_tool Bash call_tmqckan4                                                                 1.0s
├── chat ollama_cloud/glm-5.3-flash                                                                 3.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.5s
│           ╰── POST [inference-gateway, server]                                                    3.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.5s
├── execute_tool TodoWrite call_rxjprlsx                                                            75µs
├── chat ollama_cloud/glm-5.3-flash                                                                 2.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.8s
│           ╰── POST [inference-gateway, server]                                                    2.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.8s
├── execute_tool Wait call_ee7xot84                                                                10m0s [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                                                 4.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.2s
│           ╰── POST [inference-gateway, server]                                                    4.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.2s
├── execute_tool Wait call_ox94i8gz                                                                1m33s
├── chat ollama_cloud/glm-5.3-flash                                                                 4.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.0s
│           ╰── POST [inference-gateway, server]                                                    4.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.0s
├── execute_tool Bash call_w4cmdbdg                                                                  9ms
├── execute_tool Bash call_ghgjy8p8                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                 5.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.8s
│           ╰── POST [inference-gateway, server]                                                    5.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.8s
├── execute_tool TodoWrite call_lugorzge                                                            63µs
├── execute_tool Memory call_icliwm4o                                                               1.2s
╰── chat ollama_cloud/glm-5.3-flash                                                                11.4s
    ╰── POST /v1/chat/completions [inference-gateway, server]                                      11.4s
        ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    11.4s
            ╰── POST [inference-gateway, server]                                                   11.4s
                ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                11.4s
Stats
Tool Calls

╭───────────┬───────┬───────┬──────────╮
│ Tool      │ Calls │ Fail% │ Avg      │
├───────────┼───────┼───────┼──────────┤
│ Bash      │ 26    │ 8%    │ 17312ms  │
│ Grep      │ 20    │ 0%    │ 216ms    │
│ Read      │ 9     │ 0%    │ 505µs    │
│ TodoWrite │ 5     │ 0%    │ 54µs     │
│ Write     │ 2     │ 0%    │ 1ms      │
│ Wait      │ 2     │ 50%   │ 346377ms │
│ Memory    │ 2     │ 0%    │ 614ms    │
│ Edit      │ 1     │ 0%    │ 898µs    │
╰───────────┴───────┴───────┴──────────╯

Token Usage

╭────────────────────────────┬─────────┬─────────┬────────────┬─────────┬──────╮
│ Model                      │ Prompt  │ Cached  │ Completion │ Total   │ Cost │
├────────────────────────────┼─────────┼─────────┼────────────┼─────────┼──────┤
│ ollama_cloud/glm-5.3-flash │ 3196505 │ 2463616 │ 24343      │ 3220848 │ -    │
╰────────────────────────────┴─────────┴─────────┴────────────┴─────────┴──────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ headless │ 1        │
╰───────────┴──────────┴──────────╯

Triggered by edenreich · Infer Action · OSS

channels.max_tool_result_len (INFER_CHANNELS_MAX_TOOL_RESULT_LEN) replaces the hardcoded render.MaxToolResultLen. The Telegram thread render and the scheduled-job notifier read it through ChannelsConfig.ToolResultLimit, which falls back to 1000 when the key is unset or not positive. render.CapRunes goes away and callers use render.Truncate with the configured limit.
The confirmation stayed open while the delete command ran, so a second Y issued another delete of the same conversation and could surface a not-found error for a delete that worked. The row removal now uses slices.DeleteFunc and the loaded list is cloned with slices.Clone.
The seven panel constructors are exported but returned the unexported panelShortcut, so callers could not name the type and the tasks docs pointed at it. The type is now PanelShortcut and each constructor builds it with a keyed literal in place of the newPanelShortcut helper.
SetConfigPath and SetVersionInfo feed the memoized welcome box but left the cache valid, so a later call would keep rendering the old values.
@edenreich edenreich changed the title refactor(tui): quick wins - input correctness, Update-loop I/O, dead boilerplate, shared render helpers feat(tui): quick wins - input correctness, Update-loop I/O, dead boilerplate, shared render helpers Oct 30, 2026
@edenreich
edenreich merged commit f6615c9 into main Oct 30, 2026
1 check passed
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.239.0-rc.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@edenreich edenreich added the rc Shipped in a release candidate label Oct 31, 2026
@edenreich edenreich moved this from Todo to Done in 2026 Oct 31, 2026
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.239.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rc Shipped in a release candidate released Shipped in a release

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[TASK] Refactor the TUI quick wins: input correctness, Update-loop I/O, dead boilerplate, shared render helpers

1 participant