@@ -1835,9 +1836,9 @@ export function SessionsTab({ taskId }: { taskId: string }) {
onKeyDown={(e) => {
if (!shouldSubmitOnKey(e, sendMode)) return;
e.preventDefault();
- if (!mainLive) send();
+ if (!mainBusy) send();
}}
- disabled={mainLive}
+ disabled={mainBusy}
className="max-h-36 min-h-9 overflow-y-auto"
/>
@@ -1845,13 +1846,13 @@ export function SessionsTab({ taskId }: { taskId: string }) {
size="icon-xs"
variant="ghost"
onClick={() => fileInputRef.current?.click()}
- disabled={mainLive || uploading}
+ disabled={mainBusy || uploading}
title="上传文件"
aria-label="上传文件"
>
{uploading ? : }
- {mainLive ? (
+ {mainBusy ? (
- post<{ reply: string; mode: string }>(`/chat${tq(task)}`, { message, attachments }),
+ chat: (message: string, task?: string, attachments?: ChatAttachment[], seg?: number) =>
+ post<{ reply: string; mode: string }>(`/chat${tq(task)}`, { message, attachments, seg }),
chatStatus: (taskId: string) => get<{ running: boolean }>(`/tasks/${taskId}/chat/status`),
// 方式1 文件上传:落到会话/任务工作目录 uploads/,返回可供 agent Read 的相对路径。
chatUpload: async (scope: "task" | "session" | "staging", id: string, files: File[]) => {
diff --git a/web/src/lib/types.ts b/web/src/lib/types.ts
index 2df07e0..b5bab8a 100644
--- a/web/src/lib/types.ts
+++ b/web/src/lib/types.ts
@@ -831,7 +831,6 @@ export interface Session {
source_task_id?: string;
inherited?: boolean;
seg?: number; // main-agent session: which conversation segment (0 = original)
- isCurrentMain?: boolean; // main-agent session: the writable current segment
}
// ---- Security ----