feat(ui): кнопка «Перезапустить» — полный аналог /retry N
Some checks failed
CI / test (push) Failing after 1m14s
CI / build-and-package (amd64, linux) (push) Failing after 59s
CI / build-and-package (amd64, windows) (push) Successful in 30s

This commit is contained in:
ki.sagidullin
2026-08-22 00:19:39 +05:00
parent 23bae9a68f
commit ef812bb3d7
6 changed files with 80 additions and 6 deletions

View File

@@ -15,6 +15,10 @@ type ChatPanel interface {
Clear()
// SetCommands подключает команды к композитору (ввод + кнопки).
SetCommands(c *Commands)
// SetBoundTask сообщает панели задачу, к которой привязана вкладка
// (0 — свободный чат). Кнопка «Перезапустить» (/retry N) активна только
// для вкладки с привязанной задачей.
SetBoundTask(taskID int64)
}
// NilChatPanel — no-op реализация ChatPanel для headless-режима и тестов.
@@ -27,6 +31,7 @@ func (NilChatPanel) SetTranscript(string) {}
func (NilChatPanel) Append(string) {}
func (NilChatPanel) Clear() {}
func (NilChatPanel) SetCommands(*Commands) {}
func (NilChatPanel) SetBoundTask(int64) {}
// FormatRole — строка роли в диалоге (pure-функция, спец 12.12).
func FormatRole(role string) string {