Skip to content

Commit 5f40aa3

Browse files
committed
fix: clarify disabled input + cache
Change-Id: I0b89b2cc25cb1c1f6eb7ee84b96723397ac5c3c3 Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent a5ba178 commit 5f40aa3

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

src/browser/components/AIView.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,11 @@ const AIViewInner: React.FC<AIViewProps> = ({
800800
onTruncateHistory={handleClearHistory}
801801
onProviderConfig={handleProviderConfig}
802802
disabled={!projectName || !workspaceName || isQueuedAgentTask}
803+
disabledReason={
804+
isQueuedAgentTask
805+
? "Queued — waiting for an available parallel task slot. This will start automatically."
806+
: undefined
807+
}
803808
isCompacting={isCompacting}
804809
editingMessage={editingMessage}
805810
onCancelEdit={handleCancelEdit}

src/browser/components/ChatInput/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,12 @@ const ChatInputInner: React.FC<ChatInputProps> = (props) => {
14841484
: `${formatKeybind(KEYBINDS.CANCEL_EDIT)} to cancel`;
14851485
return `Edit your message... (${cancelHint}, ${formatKeybind(KEYBINDS.SEND_MESSAGE)} to send)`;
14861486
}
1487+
if (disabled) {
1488+
const disabledReason = props.disabledReason;
1489+
if (typeof disabledReason === "string" && disabledReason.trim().length > 0) {
1490+
return disabledReason;
1491+
}
1492+
}
14871493
if (isCompacting) {
14881494
const interruptKeybind = vimEnabled
14891495
? KEYBINDS.INTERRUPT_STREAM_VIM

src/browser/components/ChatInput/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export interface ChatInputWorkspaceVariant {
2828
onEditLastUserMessage?: () => void;
2929
canInterrupt?: boolean;
3030
disabled?: boolean;
31+
/** Optional explanation displayed when input is disabled */
32+
disabledReason?: string;
3133
onReady?: (api: ChatInputAPI) => void;
3234
autoCompactionCheck?: AutoCompactionCheckResult; // Computed in parent (AIView) to avoid duplicate calculation
3335
/** Reviews currently attached to chat (from useReviews hook) */

src/node/services/taskService.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ export class TaskService {
156156
private readonly mutex = new AsyncMutex();
157157
private readonly pendingWaitersByTaskId = new Map<string, PendingTaskWaiter[]>();
158158
private readonly pendingStartWaitersByTaskId = new Map<string, PendingTaskStartWaiter[]>();
159+
// Cache completed reports so callers can retrieve them even after the task workspace is removed.
160+
// Bounded by TTL + max entries (see COMPLETED_REPORT_CACHE_*).
159161
private readonly completedReportsByTaskId = new Map<
160162
string,
161163
{ reportMarkdown: string; title?: string; expiresAtMs: number }

0 commit comments

Comments
 (0)