mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
fix(v2 managed agents ui): only treat assistant in_progress as active
User messages from opencode have no completed_at and normalize to status=in_progress, which made hasInProgress always true → Stop button stuck on. Filter to assistant-only.
This commit is contained in:
parent
07315c47e9
commit
7e0e4f1dfc
1 changed files with 7 additions and 1 deletions
|
|
@ -174,8 +174,14 @@ export default function SessionThreadView() {
|
|||
const messagesEndRef = useRef<HTMLDivElement | null>(null);
|
||||
const scrollContainerRef = useRef<HTMLDivElement | null>(null);
|
||||
|
||||
// Only ASSISTANT messages count as "in flight". User messages from opencode
|
||||
// have no completed_at so they normalize as in_progress, but they're not
|
||||
// running anything — only assistant turns are.
|
||||
const hasInProgress = useMemo(
|
||||
() => messages.some((m) => m.status === "in_progress"),
|
||||
() =>
|
||||
messages.some(
|
||||
(m) => m.role === "assistant" && m.status === "in_progress",
|
||||
),
|
||||
[messages],
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue