Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-5760: align chat queue UI with desktop reference (#6430)

Multica Eve642b6942d7dc
diff --git a/packages/ui/components/common/submit-button.tsx b/packages/ui/components/common/submit-button.tsx
index 44471de97e..bb38a185e2 100644
--- a/packages/ui/components/common/submit-button.tsx
+++ b/packages/ui/components/common/submit-button.tsx
@@ -24,8 +24,6 @@ interface SubmitButtonProps {
busy?: boolean;
running?: boolean;
onStop?: () => void;
- /** Keep a send control beside Stop so callers can enqueue follow-up work. */
- allowSubmitWhileRunning?: boolean;
/**
* Tooltip shown over the send button when idle. Pass a string or a node
* (e.g. `Send · ⌘↵`). Omit to render no tooltip.
@@ -48,13 +46,11 @@ function SubmitButton({
busy,
running,
onStop,
- allowSubmitWhileRunning,
tooltip,
ariaLabel,
stopTooltip,
stopAriaLabel,
}: SubmitButtonProps) {
- let stopControl: ReactNode = null;
if (running) {
const stopButton = (
<Button
@@ -66,13 +62,12 @@ function SubmitButton({
<Square className="fill-current" aria-hidden="true" />
</Button>
);
- stopControl = stopTooltip ? (
+ return stopTooltip ? (
<Tooltip>
<TooltipTrigger render={stopButton} />
<TooltipContent side="top">{stopTooltip}</TooltipContent>
</Tooltip>
) : stopButton;
- if (!allowSubmitWhileRunning) return stopControl;
}
const submitButton = (
@@ -105,13 +100,7 @@ function SubmitButton({
<TooltipContent side="top">{tooltip}</TooltipContent>
</Tooltip>
);
- if (!stopControl) return submitControl;
- return (
- <>
- {stopControl}
- {submitControl}
- </>
- );
+ return submitControl;
}
export { SubmitButton, type SubmitButtonProps };
diff --git a/packages/views/chat/chat-page.tsx b/packages/views/chat/chat-page.tsx
index 4cf57f56fe..2828951615 100644
--- a/packages/views/chat/chat-page.tsx
+++ b/packages/views/chat/chat-page.tsx
@@ -241,6 +241,7 @@ export function ChatPage() {
// No compose-box agent selector — the agent is fixed when the chat starts.
// `@container`: the conversation column's gutter (CHAT_GUTTER) widens with
// THIS pane, which the user resizes independently of the browser window.
+ const queuedTasks = c.pendingTask?.queued_tasks ?? [];
const conversation = (
<div className="flex flex-1 flex-col min-h-0 @container">
{c.currentSession && (
@@ -298,7 +299,7 @@ export function ChatPage() {
)}
<ChatQueue
- tasks={c.pendingTask?.queued_tasks ?? []}
+ tasks={queuedTasks}
headStatus={c.pendingTask?.status}
onSendNow={c.handleSendQueuedTaskNow}
onEdit={c.handleEditQueuedTask}
@@ -314,6 +315,7 @@ export function ChatPage() {
onStop={c.handleStop}
isRunning={!!c.pendingTaskId}
allowSubmitWhileRunning={c.pendingTask?.supports_queue === true}
+ hasQueue={queuedTasks.length > 0}
disabled={
c.isSessionArchived || c.isAgentArchived || !c.isAgentRuntimeBound
}
diff --git a/packages/views/chat/components/chat-input.test.tsx b/packages/views/chat/components/chat-input.test.tsx
index a1a7617cbd..7d14315791 100644
--- a/packages/views/chat/components/chat-input.test.tsx
+++ b/packages/views/chat/components/chat-input.test.tsx
@@ -354,12 +354,12 @@ beforeEach(() => {
function renderInput(props: Partial<React.ComponentProps<typeof ChatInput>> = {}) {
const onSend = props.onSend ?? vi.fn();
- render(
+ const view = render(
<I18nProvider locale="en" resources={TEST_RESOURCES}>
<ChatInput onSend={onSend} uploadEnabled agentName="Multica" {...props} />
</I18nProvider>,
);
- return { onSend };
+ return { onSend, ...view };
}
function element(props: Partial<React.ComponentProps<typeof ChatInput>>) {
@@ -593,21 +593,67 @@ describe("ChatInput project context", () => {
expect(onProjectChange).toHaveBeenCalledWith(null);
});
- it("keeps Stop and Queue Send available while the agent is running", async () => {
+ it("swaps Stop for Queue Send when the running composer has content", async () => {
const onSend = vi.fn<ChatInputOnSend>(async () => true);
const onStop = vi.fn();
renderInput({ isRunning: true, allowSubmitWhileRunning: true, onSend, onStop });
+ expect(screen.getByRole("button", { name: "Stop" })).toBeInTheDocument();
+ expect(screen.queryByRole("button", { name: "Queue message" })).not.toBeInTheDocument();
+
fireEvent.change(screen.getByTestId("editor"), {
target: { value: "follow-up" },
});
- expect(screen.getByRole("button", { name: "Stop" })).toBeInTheDocument();
+ expect(screen.queryByRole("button", { name: "Stop" })).not.toBeInTheDocument();
const queueButton = screen.getByRole("button", { name: "Queue message" });
expect(queueButton).not.toBeDisabled();
fireEvent.click(queueButton);
await waitFor(() => expect(onSend).toHaveBeenCalledTimes(1));
+ await waitFor(() => {
+ expect(screen.getByRole("button", { name: "Stop" })).toBeInTheDocument();
+ });
+ expect(screen.queryByRole("button", { name: "Queue message" })).not.toBeInTheDocument();
+ });
+
+ it("keeps Stop available while queued content is uploading", async () => {
+ let resolveUpload!: (value: UploadResult) => void;
+ mockApiUploadFile.mockImplementation(
+ () => new Promise<UploadResult>((resolve) => (resolveUpload = resolve)),
+ );
+ const onStop = vi.fn();
+ renderInput({ isRunning: true, allowSubmitWhileRunning: true, onStop });
+
+ fireEvent.change(screen.getByTestId("editor"), {
+ target: { value: "follow-up with attachment" },
+ });
+ expect(screen.getByRole("button", { name: "Queue message" })).toBeInTheDocument();
+
+ await act(async () => {
+ dropHandlers.onDrop?.([
+ new File(["x"], "slow.png", { type: "image/png" }),
+ ]);
+ await Promise.resolve();
+ });
+
+ const stopButton = await screen.findByRole("button", { name: "Stop" });
+ expect(screen.queryByRole("button", { name: "Queue message" })).not.toBeInTheDocument();
+ fireEvent.click(stopButton);
+ expect(onStop).toHaveBeenCalledTimes(1);
+
+ await act(async () => {
+ resolveUpload(
+ makeUpload({
+ id: "att-slow-stop",
+ link: "/api/attachments/att-slow-stop/download",
+ filename: "slow.png",
+ }),
+ );
+ await Promise.resolve();
+ });
+
+ expect(await screen.findByRole("button", { name: "Queue message" })).not.toBeDisabled();
});
it("shows only Stop while an older server is running", () => {
@@ -617,6 +663,28 @@ describe("ChatInput project context", () => {
expect(screen.queryByRole("button", { name: "Queue message" })).not.toBeInTheDocument();
});
+ it("raises and rounds the composer above an attached queue", () => {
+ const { container } = renderInput({ hasQueue: true });
+
+ expect(container.firstElementChild).toHaveClass("relative", "z-10");
+ expect(container.querySelector('[data-slot="chat-input-surface"]')).toHaveClass(
+ "rounded-4xl",
+ "shadow-[var(--menu-shadow)]",
+ );
+ });
+
+ it("keeps the default composer chrome without an attached queue", () => {
+ const { container } = renderInput({ hasQueue: false });
+ const surface = container.querySelector('[data-slot="chat-input-surface"]');
+
+ expect(container.firstElementChild).not.toHaveClass("relative", "z-10");
+ expect(surface).toHaveClass("rounded-lg");
+ expect(surface).not.toHaveClass(
+ "rounded-4xl",
+ "shadow-[var(--menu-shadow)]",
+ );
+ });
+
it("locks the project control while a send is in flight so a mid-send switch cannot retarget the session", async () => {
// A brand-new chat creates its session row lazily during send, bound to
// the project selected at click time. If the user could switch project
diff --git a/packages/views/chat/components/chat-input.tsx b/packages/views/chat/components/chat-input.tsx
index f8090f224b..9f1e21c49c 100644
--- a/packages/views/chat/components/chat-input.tsx
+++ b/packages/views/chat/components/chat-input.tsx
@@ -89,6 +89,11 @@ interface ChatInputProps {
isRunning?: boolean;
/** Enabled only after the server explicitly advertises follow-up queues. */
allowSubmitWhileRunning?: boolean;
+ /**
+ * Visually stacks the composer above the ChatGPT-style follow-up queue.
+ * Must use the same queued-task array and non-empty condition as ChatQueue.
+ */
+ hasQueue?: boolean;
disabled?: boolean;
/** True when the user has no agent available — disables the editor and
* surfaces a distinct placeholder. Kept separate from `disabled` so
@@ -137,6 +142,7 @@ export function ChatInput({
onStop,
isRunning,
allowSubmitWhileRunning,
+ hasQueue,
disabled,
noAgent,
agentArchived,
@@ -569,6 +575,7 @@ export function ChatInput({
// spilling out of it.
"flex max-h-[50%] min-h-0 flex-col pb-3 pt-0",
CHAT_GUTTER,
+ hasQueue && "relative z-10",
// Outer wrapper carries the disabled cursor. Inner card sets
// pointer-events-none, which suppresses hover (and therefore
// any cursor of its own) — splitting the two layers lets hover
@@ -577,6 +584,7 @@ export function ChatInput({
)}
>
<div
+ data-slot="chat-input-surface"
{...(uploadEnabled ? dropZoneProps : {})}
className={cn(
// max-h-96 is the absolute ceiling on top of the wrapper's 50%: on a
@@ -586,6 +594,9 @@ export function ChatInput({
// then resolve to none).
CHAT_COLUMN,
"relative flex min-h-16 max-h-96 flex-col rounded-lg border border-surface-border bg-surface pb-9 transition-[border-color,box-shadow] focus-within:border-brand focus-within:ring-2 focus-within:ring-ring/20",
+ // The attached composer is the foreground card, so it intentionally
+ // uses a stronger shadow than ChatQueue's rear surface shadow.
+ hasQueue && "rounded-4xl shadow-[var(--menu-shadow)]",
// Visual + interaction lock when there's no agent. We don't
// toggle ContentEditor's editable mode (Tiptap can't switch
// cleanly post-mount, and the prop has been removed); instead
@@ -682,9 +693,17 @@ export function ChatInput({
disabled={hasNothingToSend || submitting || !!disabled || !!noAgent}
loading={submitting}
busy={gate.uploading}
- running={isRunning}
+ // Queue-capable runs reuse this one action slot: an empty composer
+ // offers Stop, while live content swaps it to Queue Send. Older
+ // servers cannot accept follow-ups, so they remain stop-only. An
+ // upload blocks submit, so it also falls back to Stop rather than
+ // removing chat's only cancellation path; the attachment node
+ // remains the visible upload-progress surface in the editor.
+ running={
+ !!isRunning &&
+ (!allowSubmitWhileRunning || hasNothingToSend || gate.uploading)
+ }
onStop={onStop}
- allowSubmitWhileRunning={allowSubmitWhileRunning}
tooltip={gate.uploading
? tEditor(($) => $.upload.in_progress)
: isRunning
diff --git a/packages/views/chat/components/chat-queue.test.tsx b/packages/views/chat/components/chat-queue.test.tsx
index e1301ed032..cbb05ba9d3 100644
--- a/packages/views/chat/components/chat-queue.test.tsx
+++ b/packages/views/chat/components/chat-queue.test.tsx
@@ -39,28 +39,46 @@ function renderQueue(headStatus = "running") {
}
describe("ChatQueue", () => {
- it("renders queued messages in order and falls back for empty content", () => {
- renderQueue();
+ it("matches the ChatGPT desktop queue chrome without a separate header", () => {
+ const { container } = renderQueue();
- expect(screen.getByText("2 queued messages")).toBeInTheDocument();
+ expect(screen.getByRole("region", { name: "2 queued messages" })).toBeInTheDocument();
+ expect(screen.queryByText("2 queued messages")).not.toBeInTheDocument();
expect(screen.getByText("First follow-up")).toBeInTheDocument();
expect(screen.getByText("Queued message")).toBeInTheDocument();
- expect(screen.getAllByLabelText("Send now")).toHaveLength(2);
- expect(screen.getAllByLabelText("Edit queued message")).toHaveLength(2);
+ expect(screen.getAllByRole("button", { name: "Steer" })).toHaveLength(2);
expect(screen.getAllByLabelText("Remove queued message")).toHaveLength(2);
- expect(screen.getByRole("button", { name: "Clear all" })).toBeInTheDocument();
+ expect(screen.getAllByLabelText("More queue actions")).toHaveLength(2);
+ expect(screen.queryByRole("button", { name: "Clear all" })).not.toBeInTheDocument();
+
+ const shell = container.querySelector('[data-slot="chat-queue-shell"]');
+ const queue = container.querySelector('[data-slot="chat-queue"]');
+ expect(shell).toHaveClass("-mb-8");
+ expect(queue).toHaveClass(
+ "rounded-4xl",
+ "border-surface-border",
+ "bg-surface",
+ "pb-10",
+ );
+ expect(container.querySelectorAll('[data-slot="chat-queue-row"]')).toHaveLength(2);
+ expect(container.querySelectorAll('[data-slot="chat-queue-item-icon"]')).toHaveLength(2);
});
- it("runs send-now, edit, remove, and clear against the selected queue state", async () => {
+ it("runs steer, remove, and overflow actions against the selected queue state", async () => {
const actions = renderQueue();
- fireEvent.click(screen.getAllByLabelText("Send now")[1]!);
+ fireEvent.click(screen.getAllByRole("button", { name: "Steer" })[1]!);
await waitFor(() => expect(actions.onSendNow).toHaveBeenCalledWith("task-3"));
- fireEvent.click(screen.getAllByLabelText("Edit queued message")[0]!);
+
+ fireEvent.click(screen.getAllByLabelText("More queue actions")[0]!);
+ fireEvent.click(await screen.findByRole("menuitem", { name: "Edit queued message" }));
await waitFor(() => expect(actions.onEdit).toHaveBeenCalledWith("task-2"));
+
fireEvent.click(screen.getAllByLabelText("Remove queued message")[1]!);
await waitFor(() => expect(actions.onRemove).toHaveBeenCalledWith("task-3"));
- fireEvent.click(screen.getByRole("button", { name: "Clear all" }));
+
+ fireEvent.click(screen.getAllByLabelText("More queue actions")[1]!);
+ fireEvent.click(await screen.findByRole("menuitem", { name: "Clear all" }));
await waitFor(() => expect(actions.onClear).toHaveBeenCalledTimes(1));
});
@@ -68,7 +86,7 @@ describe("ChatQueue", () => {
const actions = renderQueue("queued");
const buttons = screen.getAllByRole("button", {
- name: "Send now is available after the current reply starts",
+ name: "Steer is available after the current reply starts",
});
expect(buttons).toHaveLength(2);
for (const button of buttons) expect(button).toBeDisabled();
@@ -82,11 +100,14 @@ describe("ChatQueue", () => {
finishClear = resolve;
}));
- const scroller = actions.container.querySelector(".overflow-y-auto");
- expect(scroller).toHaveClass("max-h-40");
+ const scroller = actions.container.querySelector('[data-slot="chat-queue-list"]');
+ expect(scroller).toHaveClass("max-h-48");
- fireEvent.click(screen.getByRole("button", { name: "Clear all" }));
+ const clearTrigger = screen.getAllByLabelText("More queue actions")[0]!;
+ fireEvent.click(clearTrigger);
+ fireEvent.click(await screen.findByRole("menuitem", { name: "Clear all" }));
await waitFor(() => {
+ expect(clearTrigger.querySelector(".animate-spin")).toBeInTheDocument();
for (const button of screen.getAllByRole("button")) {
expect(button).toBeDisabled();
}
@@ -94,6 +115,7 @@ describe("ChatQueue", () => {
finishClear?.();
await waitFor(() => {
+ expect(clearTrigger.querySelector(".animate-spin")).not.toBeInTheDocument();
for (const button of screen.getAllByRole("button")) {
expect(button).toBeEnabled();
}
diff --git a/packages/views/chat/components/chat-queue.tsx b/packages/views/chat/components/chat-queue.tsx
index 8fbd4ba0de..e579bd8903 100644
--- a/packages/views/chat/components/chat-queue.tsx
+++ b/packages/views/chat/components/chat-queue.tsx
@@ -1,9 +1,23 @@
"use client";
import { useState } from "react";
-import { Loader2, Pencil, Send, X } from "lucide-react";
+import {
+ CornerDownRight,
+ Ellipsis,
+ ListEnd,
+ Loader2,
+ Pencil,
+ Trash2,
+} from "lucide-react";
import type { ChatQueuedTask } from "@multica/core/types";
import { Button } from "@multica/ui/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "@multica/ui/components/ui/dropdown-menu";
import { cn } from "@multica/ui/lib/utils";
import { useT } from "../../i18n";
import { CHAT_COLUMN, CHAT_GUTTER } from "./chat-column";
@@ -45,101 +59,136 @@ export function ChatQueue({
return (
<div
- className={cn(CHAT_GUTTER, "mb-2")}
+ data-slot="chat-queue-shell"
+ className={cn(CHAT_GUTTER, "relative z-0 -mb-8")}
aria-live="polite"
aria-busy={busyAction !== null}
>
- <div className={cn(CHAT_COLUMN, "rounded-lg border bg-muted/30 p-2")}>
- <div className="mb-1 flex items-center justify-between gap-2 px-1">
- <span className="text-caption font-medium text-muted-foreground">
- {t(($) => $.queue.title, { count: tasks.length })}
- </span>
- <Button
- variant="ghost"
- size="xs"
- disabled={busyAction !== null}
- onClick={() => void run("clear", onClear)}
- >
- {busyAction === "clear" && <Loader2 className="animate-spin" aria-hidden="true" />}
- {t(($) => $.queue.clear)}
- </Button>
- </div>
- <div className="max-h-40 space-y-0.5 overflow-y-auto">
- {tasks.map((task, index) => {
+ <section
+ data-slot="chat-queue"
+ aria-label={t(($) => $.queue.title, { count: tasks.length })}
+ className={cn(
+ CHAT_COLUMN,
+ // This is the rear card in the attached stack. The composer uses
+ // the stronger menu shadow so it reads as the foreground surface.
+ "overflow-hidden rounded-4xl border border-surface-border bg-surface pb-10 shadow-[var(--surface-shadow)]",
+ )}
+ >
+ <div
+ data-slot="chat-queue-list"
+ className="max-h-48 overflow-y-auto px-4 pt-3"
+ >
+ {tasks.map((task) => {
const sendNowKey = `send-now:${task.task_id}`;
const editKey = `edit:${task.task_id}`;
const removeKey = `remove:${task.task_id}`;
+ const clearKey = `clear:${task.task_id}`;
return (
<div
key={task.task_id}
- className="flex min-w-0 items-center gap-2 rounded-md px-1.5 py-1 text-body"
+ data-slot="chat-queue-row"
+ className="flex min-h-12 min-w-0 items-center gap-3 rounded-xl px-1 py-1 text-body"
>
- <span className="w-4 shrink-0 text-center text-caption tabular-nums text-muted-foreground">
- {index + 1}
- </span>
+ <ListEnd
+ data-slot="chat-queue-item-icon"
+ className="size-5 shrink-0 text-faint-foreground"
+ aria-hidden="true"
+ />
<span className="min-w-0 flex-1 truncate">
{task.content?.trim() || t(($) => $.queue.fallback)}
</span>
- <span
- className="shrink-0"
- title={t(($) =>
- canSendNow ? $.queue.send_now : $.queue.send_now_unavailable
- )}
- >
+ <div className="flex shrink-0 items-center gap-0.5">
+ <span
+ className="shrink-0"
+ title={t(($) =>
+ canSendNow ? $.queue.steer : $.queue.steer_unavailable
+ )}
+ >
+ <Button
+ variant="ghost"
+ size="sm"
+ className="gap-1.5 px-2 font-normal text-muted-foreground"
+ disabled={busyAction !== null || !canSendNow}
+ aria-label={t(($) =>
+ canSendNow
+ ? $.queue.steer
+ : $.queue.steer_unavailable
+ )}
+ onClick={() => void run(sendNowKey, () => onSendNow(task.task_id))}
+ >
+ {busyAction === sendNowKey ? (
+ <Loader2 className="animate-spin" aria-hidden="true" />
+ ) : (
+ <CornerDownRight aria-hidden="true" />
+ )}
+ {t(($) => $.queue.steer)}
+ </Button>
+ </span>
<Button
variant="ghost"
- size="icon-xs"
- className="text-muted-foreground"
- disabled={busyAction !== null || !canSendNow}
- aria-label={t(($) =>
- canSendNow
- ? $.queue.send_now
- : $.queue.send_now_unavailable
- )}
- onClick={() => void run(sendNowKey, () => onSendNow(task.task_id))}
+ size="icon-sm"
+ className="shrink-0 text-muted-foreground"
+ disabled={busyAction !== null}
+ title={t(($) => $.queue.remove)}
+ aria-label={t(($) => $.queue.remove)}
+ onClick={() => void run(removeKey, () => onRemove(task.task_id))}
>
- {busyAction === sendNowKey ? (
+ {busyAction === removeKey ? (
<Loader2 className="animate-spin" aria-hidden="true" />
) : (
- <Send aria-hidden="true" />
+ <Trash2 aria-hidden="true" />
)}
</Button>
- </span>
- <Button
- variant="ghost"
- size="icon-xs"
- className="shrink-0 text-muted-foreground"
- disabled={busyAction !== null}
- title={t(($) => $.queue.edit)}
- aria-label={t(($) => $.queue.edit)}
- onClick={() => void run(editKey, () => onEdit(task.task_id))}
- >
- {busyAction === editKey ? (
- <Loader2 className="animate-spin" aria-hidden="true" />
- ) : (
- <Pencil aria-hidden="true" />
- )}
- </Button>
- <Button
- variant="ghost"
- size="icon-xs"
- className="shrink-0 text-muted-foreground"
- disabled={busyAction !== null}
- title={t(($) => $.queue.remove)}
- aria-label={t(($) => $.queue.remove)}
- onClick={() => void run(removeKey, () => onRemove(task.task_id))}
- >
- {busyAction === removeKey ? (
- <Loader2 className="animate-spin" aria-hidden="true" />
- ) : (
- <X aria-hidden="true" />
- )}
- </Button>
+ <DropdownMenu>
+ <DropdownMenuTrigger
+ render={
+ <Button
+ type="button"
+ variant="ghost"
+ size="icon-sm"
+ className="shrink-0 text-muted-foreground"
+ disabled={busyAction !== null}
+ title={t(($) => $.queue.more)}
+ aria-label={t(($) => $.queue.more)}
+ />
+ }
+ >
+ {busyAction === editKey || busyAction === clearKey ? (
+ <Loader2 className="animate-spin" aria-hidden="true" />
+ ) : (
+ <Ellipsis aria-hidden="true" />
+ )}
+ </DropdownMenuTrigger>
+ <DropdownMenuContent
+ align="end"
+ side="top"
+ sideOffset={6}
+ className="w-auto"
+ >
+ <DropdownMenuItem
+ disabled={busyAction !== null}
+ onClick={() => void run(editKey, () => onEdit(task.task_id))}
+ >
+ <Pencil aria-hidden="true" />
+ {t(($) => $.queue.edit)}
+ </DropdownMenuItem>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem
+ variant="destructive"
+ disabled={busyAction !== null}
+ onClick={() => void run(clearKey, onClear)}
+ >
+ <Trash2 aria-hidden="true" />
+ {t(($) => $.queue.clear)}
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </div>
</div>
);
})}
</div>
- </div>
+ </section>
</div>
);
}
diff --git a/packages/views/chat/components/chat-window.tsx b/packages/views/chat/components/chat-window.tsx
index 7770fe0659..40abc75550 100644
--- a/packages/views/chat/components/chat-window.tsx
+++ b/packages/views/chat/components/chat-window.tsx
@@ -748,6 +748,7 @@ export function ChatWindow() {
};
const contextItems = useChatContextItems(wsId);
+ const queuedTasks = pendingTask?.queued_tasks ?? [];
return (
<motion.div
@@ -894,7 +895,7 @@ export function ChatWindow() {
)}
<ChatQueue
- tasks={pendingTask?.queued_tasks ?? []}
+ tasks={queuedTasks}
headStatus={pendingTask?.status}
onSendNow={handleSendQueuedTaskNow}
onEdit={handleEditQueuedTask}
@@ -913,6 +914,7 @@ export function ChatWindow() {
onStop={handleStop}
isRunning={!!pendingTaskId}
allowSubmitWhileRunning={pendingTask?.supports_queue === true}
+ hasQueue={queuedTasks.length > 0}
disabled={
isSessionArchived || isAgentArchived || !activeAgentRuntimeBound
}
diff --git a/packages/views/chat/components/use-chat-task-actions.ts b/packages/views/chat/components/use-chat-task-actions.ts
index dafbfbc8d5..6c8c3e0a3f 100644
--- a/packages/views/chat/components/use-chat-task-actions.ts
+++ b/packages/views/chat/components/use-chat-task-actions.ts
@@ -219,7 +219,7 @@ export function useChatTaskActions(
});
toast.error(
err instanceof ApiError && err.status === 409
- ? t(($) => $.queue.send_now_unavailable_toast)
+ ? t(($) => $.queue.steer_unavailable_toast)
: t(($) => $.queue.action_failed_toast),
);
} finally {
diff --git a/packages/views/locales/en/chat.json b/packages/views/locales/en/chat.json
index c38edbb826..d1541a8499 100644
--- a/packages/views/locales/en/chat.json
+++ b/packages/views/locales/en/chat.json
@@ -36,11 +36,12 @@
"title_one": "{{count}} queued message",
"title_other": "{{count}} queued messages",
"clear": "Clear all",
- "send_now": "Send now",
- "send_now_unavailable": "Send now is available after the current reply starts",
- "send_now_unavailable_toast": "Send now is unavailable. Refreshing the queue.",
+ "steer": "Steer",
+ "steer_unavailable": "Steer is available after the current reply starts",
+ "steer_unavailable_toast": "Steer is unavailable. Refreshing the queue.",
"edit": "Edit queued message",
"remove": "Remove queued message",
+ "more": "More queue actions",
"fallback": "Queued message",
"action_failed_toast": "Couldn't update the queued message"
},
diff --git a/packages/views/locales/ja/chat.json b/packages/views/locales/ja/chat.json
index 663584b661..382ae627b9 100644
--- a/packages/views/locales/ja/chat.json
+++ b/packages/views/locales/ja/chat.json
@@ -34,11 +34,12 @@
"queue": {
"title_other": "キュー内のメッセージ {{count}} 件",
"clear": "すべて削除",
- "send_now": "今すぐ送信",
- "send_now_unavailable": "現在の返信が開始されると今すぐ送信できます",
- "send_now_unavailable_toast": "今すぐ送信できません。キューを更新しています。",
+ "steer": "指示",
+ "steer_unavailable": "現在の返信が開始されると指示できます",
+ "steer_unavailable_toast": "現在は指示できません。キューを更新しています。",
"edit": "キュー内のメッセージを編集",
"remove": "キューから削除",
+ "more": "その他のキュー操作",
"fallback": "キュー内のメッセージ",
"action_failed_toast": "キュー内のメッセージを更新できませんでした"
},
diff --git a/packages/views/locales/ko/chat.json b/packages/views/locales/ko/chat.json
index d2eee7a6e2..9dbfb85884 100644
--- a/packages/views/locales/ko/chat.json
+++ b/packages/views/locales/ko/chat.json
@@ -34,11 +34,12 @@
"queue": {
"title_other": "대기 중인 메시지 {{count}}개",
"clear": "모두 지우기",
- "send_now": "지금 보내기",
- "send_now_unavailable": "현재 답변이 시작되면 지금 보낼 수 있습니다",
- "send_now_unavailable_toast": "지금 보낼 수 없습니다. 대기열을 새로 고치는 중입니다.",
+ "steer": "지시",
+ "steer_unavailable": "현재 답변이 시작되면 지시할 수 있습니다",
+ "steer_unavailable_toast": "현재는 지시할 수 없습니다. 대기열을 새로 고치는 중입니다.",
"edit": "대기 중인 메시지 편집",
"remove": "대기열에서 삭제",
+ "more": "추가 대기열 작업",
"fallback": "대기 중인 메시지",
"action_failed_toast": "대기 중인 메시지를 업데이트하지 못했습니다"
},
diff --git a/packages/views/locales/zh-Hans/chat.json b/packages/views/locales/zh-Hans/chat.json
index 298f3a8aac..74a411202d 100644
--- a/packages/views/locales/zh-Hans/chat.json
+++ b/packages/views/locales/zh-Hans/chat.json
@@ -34,11 +34,12 @@
"queue": {
"title_other": "{{count}} 条排队消息",
"clear": "全部清空",
- "send_now": "立即发送",
- "send_now_unavailable": "当前回复开始后才能立即发送",
- "send_now_unavailable_toast": "暂时无法立即发送,正在刷新队列。",
+ "steer": "引导",
+ "steer_unavailable": "当前回复开始后才能引导",
+ "steer_unavailable_toast": "暂时无法引导,正在刷新队列。",
"edit": "编辑排队消息",
"remove": "移除排队消息",
+ "more": "更多队列操作",
"fallback": "排队消息",
"action_failed_toast": "无法更新排队消息"
},