@@ -795,10 +817,6 @@ export function V2Conversation({ client, threadID, workspaces, onArchive, onMana
};
const canSteer = executionQuery.data?.state === "running" ||
(!executionQuery.data && detail.active_run?.status === "running");
- // A paused run is not gone: steer stays unavailable, but the explanation
- // names the pause so the operator does not think the task ended.
- const steerUnavailable = currentRun.status === "paused" ? t("当前任务已暂停", "The current task is paused")
- : t("当前任务已停止或不再运行", "The current task has stopped or is no longer running");
const activityLabel = threadActivityLabel({ threadID, execution: executionQuery.data,
readable: client.hasThreadExecutionRead === true, error: executionQuery.isError });
const fileReferenceUnavailableReason = currentRun.status === "waiting_approval"
@@ -811,13 +829,7 @@ export function V2Conversation({ client, threadID, workspaces, onArchive, onMana
: undefined;
const send = async (content: string, files?: V2FileReference[], images?: WorkspaceImageAttachment[], draftVersion?: V2DraftVersion, attachments?: WorkspaceFileAttachment[], mcpReferences?: MCPDraftReference[]) => {
- if (deliveryMode === "steer" && !canSteer) {
- throw new Error(`${steerUnavailable}。纠正草稿已保留;请选择“下一轮处理”发送。`);
- }
- if (deliveryMode === "steer" && (files?.length || images?.length || attachments?.length || mcpReferences?.length)) {
- throw new Error("更新当前任务目前只支持文字。附件和引用已保留,请选择“下一轮处理”发送完整消息。");
- }
- const fingerprint = JSON.stringify([deliveryMode, content, files ?? [], imageIdentities(images), fileAttachmentIdentities(attachments), mcpReferenceIdentities(mcpReferences)]);
+ const fingerprint = JSON.stringify(["next_turn", content, files ?? [], imageIdentities(images), fileAttachmentIdentities(attachments), mcpReferenceIdentities(mcpReferences)]);
let replaced = submissions.findLast(({ error }) => v2TurnOutcomeKnown(error))?.input.operationKey;
// The user's new request waits for unknown earlier submissions to settle.
// Confirmation uses the original payload and key, never the edited draft.
@@ -837,7 +849,6 @@ export function V2Conversation({ client, threadID, workspaces, onArchive, onMana
{ text: draft ?? content, files: files ?? [], images: images ?? [], attachments, mcpReferences });
const operationKey = `v2-thread-turn-${globalThis.crypto.randomUUID()}`;
const input: V2TurnInput = { threadID, workspaceID: detail.thread.workspace_id ?? "", content,
- ...(deliveryMode === "steer" ? { deliveryMode: "steer" as const, sessionID: currentRun.session_id } : {}),
...(draft !== undefined ? { draft } : {}),
operationKey, createdAt: new Date().toISOString(), ...(files?.length ? { files } : {}),
...(images?.length ? { images } : {}),
@@ -891,20 +902,21 @@ export function V2Conversation({ client, threadID, workspaces, onArchive, onMana
setReviewOpen(false); setPreviewOpen(false); setContextOpen(false);
setComposerFocusRequest({ threadID });
};
+ const companionDocked = view === "conversation" && !compactPaneOpen;
const companion = <>
- {filesOpen &&
setFileDrawerState((current) => ({ ...current, path, line: undefined }))}
onClose={() => {
setActivePane(null);
if (fileReturnFocus.current?.isConnected) fileReturnFocus.current.focus();
else fileTrigger.current?.focus();
}} returnFocusRef={fileReturnFocus} />}
- {terminalDrawerOpen && {
setTerminalDrawerOpen(false);
if (terminalReturnFocus.current?.isConnected) terminalReturnFocus.current.focus();
@@ -928,6 +940,13 @@ export function V2Conversation({ client, threadID, workspaces, onArchive, onMana
onArchive(detail.thread);
}} ref={firstMenuItemRef} role="menuitem" type="button">
{t("归档对话", "Archive conversation")}
+
+
{view !== "inspector" && }
@@ -937,33 +956,34 @@ export function V2Conversation({ client, threadID, workspaces, onArchive, onMana
{t("返回对话视图", "Return to conversation")}}
}