-
Choose an agent and assignment
+
Choose an agent
The task and execution sections appear after the daemon resolves the static input
surface.
diff --git a/apps/web/src/routes/run-chat-panel.tsx b/apps/web/src/routes/run-chat-panel.tsx
index ed1cb037..ebb6b39f 100644
--- a/apps/web/src/routes/run-chat-panel.tsx
+++ b/apps/web/src/routes/run-chat-panel.tsx
@@ -34,6 +34,13 @@ import {
import type { RunTimelineState } from "../lib/run-timeline.js";
const CHAT_SCROLL_EDGE_THRESHOLD_PX = 32;
+const TURN_DIVIDER_TIMESTAMP_FORMATTER = new Intl.DateTimeFormat(undefined, {
+ month: "short",
+ day: "numeric",
+ year: "numeric",
+ hour: "numeric",
+ minute: "2-digit",
+});
type DownloadAttachmentHandler = (
runId: string,
@@ -73,19 +80,13 @@ function scrollElementToTop(element: HTMLElement) {
}
function formatTurnDividerTimestamp(value: string) {
- return new Intl.DateTimeFormat(undefined, {
- month: "short",
- day: "numeric",
- year: "numeric",
- hour: "numeric",
- minute: "2-digit",
- }).format(new Date(value));
+ return TURN_DIVIDER_TIMESTAMP_FORMATTER.format(new Date(value));
}
function assistantEmptyText(emptyState: RunChatAssistantEmptyState | undefined) {
switch (emptyState) {
case "waiting_live_response":
- return "Waiting for live response...";
+ return "Waiting for live response…";
case "no_response_recorded":
return "No response recorded.";
case undefined:
@@ -268,7 +269,6 @@ export function RunChatView({
const [showScrollToBottom, setShowScrollToBottom] = useState(false);
const listRef = useRef(null);
const composerRef = useRef(null);
- const resetRunIdRef = useRef(selectedRunId);
const stickToBottomRef = useRef(true);
const scrollFrameRef = useRef(null);
const scrollTimeoutRef = useRef(null);
@@ -296,7 +296,7 @@ export function RunChatView({
(!queueMode && selectedRun?.capabilities.canResume !== true);
const composerActivityVisible = selectedRun?.isLive === true;
const submitLabel = queueMode ? "Queue" : "Send";
- const submitPendingLabel = queueMode ? "Queueing..." : "Sending...";
+ const submitPendingLabel = queueMode ? "Queueing…" : "Sending…";
const rememberScrollMetrics = useCallback((element: HTMLElement) => {
scrollMetricsRef.current = {
@@ -352,20 +352,6 @@ export function RunChatView({
[applyScrollToBottom, cancelScheduledScrollToBottom],
);
- useEffect(() => {
- if (resetRunIdRef.current === selectedRunId) {
- return;
- }
- resetRunIdRef.current = selectedRunId;
- setDraft("");
- setChatError(undefined);
- stickToBottomRef.current = true;
- scrollMetricsRef.current = null;
- cancelScheduledScrollToBottom();
- setShowScrollToTop(false);
- setShowScrollToBottom(false);
- }, [cancelScheduledScrollToBottom, selectedRunId]);
-
useEffect(() => {
return () => {
cancelScheduledScrollToBottom();
@@ -454,15 +440,9 @@ export function RunChatView({
} else {
await onSubmitResume(runId, trimmedDraft);
}
- if (resetRunIdRef.current !== runId) {
- return;
- }
setDraft("");
stickToBottomRef.current = true;
} catch (error) {
- if (resetRunIdRef.current !== runId) {
- return;
- }
setChatError(
error instanceof Error ? error.message : queueMode ? "Queue failed." : "Resume failed.",
);
@@ -479,9 +459,6 @@ export function RunChatView({
setChatError(undefined);
await onRemoveQueuedMessage(runId, messageId);
} catch (error) {
- if (resetRunIdRef.current !== runId) {
- return;
- }
setChatError(error instanceof Error ? error.message : "Remove queued message failed.");
}
}
@@ -628,9 +605,9 @@ export function RunChatView({
{renderBody()}