remove terminate button

This commit is contained in:
Tienson Qin
2026-03-02 20:37:20 +08:00
parent ee749478e2
commit d5912717cc

View File

@@ -658,7 +658,6 @@
[starting-session? set-starting-session?!] (rum/use-state false)
[publish-mode set-publish-mode!] (rum/use-state nil)
[snapshot-busy? set-snapshot-busy?!] (rum/use-state false)
[terminating? set-terminating?!] (rum/use-state false)
[terminal-visible? set-terminal-visible!] (rum/use-state false)
[terminal-status set-terminal-status!] (rum/use-state :idle)
[terminal-error set-terminal-error!] (rum/use-state nil)
@@ -688,8 +687,6 @@
busy?
publish-busy?
snapshot-busy?)
terminate-disabled? (or (not session-started?)
terminating?)
can-send? (and (not input-disabled?)
(not (string/blank? trimmed-draft))
(not busy?))
@@ -744,12 +741,6 @@
(-> (agent-handler/<snapshot-session! block)
(p/catch (fn [_] nil))
(p/finally (fn [] (set-snapshot-busy?! false))))))
terminate! (fn []
(when (and base session-id (not terminate-disabled?))
(set-terminating?! true)
(-> (agent-handler/<cancel-session! block)
(p/catch (fn [_] nil))
(p/finally (fn [] (set-terminating?! false))))))
open-terminal! (fn []
(when (and terminal-enabled? (not terminal-open-disabled?))
(set-terminal-visible! true)
@@ -1029,15 +1020,6 @@
:class "h-7 px-2 text-xs"
:on-click (fn [_] (close-terminal!))}
"Disconnect"))])
(shui/button
{:size :sm
:variant :outline
:class "h-7 px-2 text-xs text-red-600 hover:text-red-700"
:disabled terminate-disabled?
:on-click (fn [_] (terminate!))}
(if terminating?
"Terminating..."
"Terminate"))
(when-not pr-created?
(shui/button
{:size :sm