mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-19 16:31:36 +00:00
chore: temporary remove task pause and skip logic (#711)
This commit is contained in:
commit
0cba98c2aa
15 changed files with 44 additions and 16 deletions
|
|
@ -6,9 +6,9 @@ export interface FloatingActionProps {
|
|||
/** Current task status */
|
||||
status: "running" | "pause" | "pending" | "finished";
|
||||
/** Callback when pause button is clicked */
|
||||
onPause?: () => void;
|
||||
// onPause?: () => void; // Commented out - temporary not needed
|
||||
/** Callback when resume button is clicked */
|
||||
onResume?: () => void;
|
||||
// onResume?: () => void; // Commented out - temporary not needed
|
||||
/** Callback when skip to next is clicked */
|
||||
onSkip?: () => void;
|
||||
/** Loading state for pause/resume actions */
|
||||
|
|
@ -19,14 +19,14 @@ export interface FloatingActionProps {
|
|||
|
||||
export const FloatingAction = ({
|
||||
status,
|
||||
onPause,
|
||||
onResume,
|
||||
// onPause, // Commented out - temporary not needed
|
||||
// onResume, // Commented out - temporary not needed
|
||||
onSkip,
|
||||
loading = false,
|
||||
className,
|
||||
}: FloatingActionProps) => {
|
||||
// Only show when task is running or paused
|
||||
if (status !== "running" && status !== "pause") {
|
||||
// Only show when task is running (removed pause state)
|
||||
if (status !== "running") {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -38,6 +38,18 @@ export const FloatingAction = ({
|
|||
)}
|
||||
>
|
||||
<div className="pointer-events-auto flex items-center gap-2 bg-bg-surface-primary/95 backdrop-blur-md rounded-full p-1 shadow-[0px_4px_16px_rgba(0,0,0,0.12)] border border-border-default">
|
||||
{/* Always show Stop Task button when running (removed pause/resume logic) */}
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={onSkip}
|
||||
disabled={loading}
|
||||
className="gap-1.5 rounded-full"
|
||||
>
|
||||
<span className="text-sm font-semibold">Stop Task</span>
|
||||
</Button>
|
||||
|
||||
{/* Commented out pause/resume functionality
|
||||
{status === "running" ? (
|
||||
// State 1: Running - Show Pause button
|
||||
<Button
|
||||
|
|
@ -73,6 +85,7 @@ export const FloatingAction = ({
|
|||
</Button>
|
||||
</>
|
||||
)}
|
||||
*/}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ import useChatStoreAdapter from '@/hooks/useChatStoreAdapter';
|
|||
|
||||
interface ProjectChatContainerProps {
|
||||
className?: string;
|
||||
onPauseResume: () => void;
|
||||
// onPauseResume: () => void; // Commented out - temporary not needed
|
||||
onSkip: () => void;
|
||||
isPauseResumeLoading: boolean;
|
||||
}
|
||||
|
||||
export const ProjectChatContainer: React.FC<ProjectChatContainerProps> = ({
|
||||
export const ProjectChatContainer: React.FC<ProjectChatContainerProps> = ({
|
||||
className = "",
|
||||
onPauseResume,
|
||||
// onPauseResume, // Commented out - temporary not needed
|
||||
onSkip,
|
||||
isPauseResumeLoading
|
||||
}) => {
|
||||
|
|
@ -165,7 +165,7 @@ export const ProjectChatContainer: React.FC<ProjectChatContainerProps> = ({
|
|||
chatStore={chatStore}
|
||||
activeQueryId={activeQueryId}
|
||||
onQueryActive={setActiveQueryId}
|
||||
onPauseResume={onPauseResume}
|
||||
// onPauseResume={onPauseResume} // Commented out - temporary not needed
|
||||
onSkip={onSkip}
|
||||
isPauseResumeLoading={isPauseResumeLoading}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ interface ProjectSectionProps {
|
|||
chatStore: VanillaChatStore;
|
||||
activeQueryId: string | null;
|
||||
onQueryActive: (queryId: string | null) => void;
|
||||
onPauseResume: () => void;
|
||||
// onPauseResume: () => void; // Commented out - temporary not needed
|
||||
onSkip: () => void;
|
||||
isPauseResumeLoading: boolean;
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ export const ProjectSection = React.forwardRef<HTMLDivElement, ProjectSectionPro
|
|||
chatStore,
|
||||
activeQueryId,
|
||||
onQueryActive,
|
||||
onPauseResume,
|
||||
// onPauseResume, // Commented out - temporary not needed
|
||||
onSkip,
|
||||
isPauseResumeLoading
|
||||
}, ref) => {
|
||||
|
|
@ -64,8 +64,8 @@ export const ProjectSection = React.forwardRef<HTMLDivElement, ProjectSectionPro
|
|||
{activeTaskId && (
|
||||
<FloatingAction
|
||||
status={task.status}
|
||||
onPause={onPauseResume}
|
||||
onResume={onPauseResume}
|
||||
// onPause={onPauseResume} // Commented out - temporary not needed
|
||||
// onResume={onPauseResume} // Commented out - temporary not needed
|
||||
onSkip={onSkip}
|
||||
loading={isPauseResumeLoading}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -427,7 +427,10 @@ export default function ChatBox(): JSX.Element {
|
|||
chatStore.setStatus(taskId, 'finished');
|
||||
chatStore.setIsPending(taskId, false);
|
||||
|
||||
toast.success("Task skipped successfully", {
|
||||
// toast.success("Task skipped successfully", {
|
||||
// closeButton: true,
|
||||
// });
|
||||
toast.success("Task stopped successfully", {
|
||||
closeButton: true,
|
||||
});
|
||||
} catch (error) {
|
||||
|
|
@ -675,7 +678,7 @@ export default function ChatBox(): JSX.Element {
|
|||
<div className="w-full h-full flex-1 flex flex-col">
|
||||
{/* New Project Chat Container */}
|
||||
<ProjectChatContainer
|
||||
onPauseResume={handlePauseResume}
|
||||
// onPauseResume={handlePauseResume} // Commented out - temporary not needed
|
||||
onSkip={handleSkip}
|
||||
isPauseResumeLoading={isPauseResumeLoading}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
"agent-tool": "أداة الوكيل",
|
||||
"agent-tool-tooltip": "اختر الأدوات والتكاملات لوكيلك",
|
||||
"resume": "استئناف",
|
||||
"stop-task":"إيقاف المهمة",
|
||||
"next-task": "المهمة التالية",
|
||||
"task-splitting": "تقسيم المهام",
|
||||
"task-running": "تشغيل المهام",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
"agent-tool": "Agent-Tool",
|
||||
"agent-tool-tooltip": "Wählen Sie Tools und Integrationen für Ihren Agenten",
|
||||
"resume": "Fortsetzen",
|
||||
"stop-task": "Aufgabe stoppen",
|
||||
"next-task": "Nächste Aufgabe",
|
||||
"task-splitting": "Aufgabenteilung",
|
||||
"task-running": "Aufgabe wird ausgeführt",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
"agent-tool": "Agent Tool",
|
||||
"agent-tool-tooltip": "Select tools and integrations for your agent",
|
||||
"resume": "Resume",
|
||||
"stop-task": "Stop Task",
|
||||
"next-task": "Next Task",
|
||||
"task-splitting": "Task Splitting",
|
||||
"task-running": "Task Running",
|
||||
|
|
@ -114,6 +115,7 @@
|
|||
"project-ended-successfully": "Project ended successfully",
|
||||
"failed-to-end-project": "Failed to end project",
|
||||
"message-queued": "Message queued. It will be processed when the current task finishes.",
|
||||
"task-stopped-successfully": "Task stopped successfully",
|
||||
"task-skipped-successfully": "Task skipped successfully",
|
||||
"failed-to-skip-task": "Failed to skip task",
|
||||
"no-reply-received-task-continue": "No reply received, task continue",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
"agent-tool": "Herramienta de Agente",
|
||||
"agent-tool-tooltip": "Selecciona herramientas e integraciones para tu agente",
|
||||
"resume": "Reanudar",
|
||||
"stop-task": "Detener Tarea",
|
||||
"next-task": "Siguiente Tarea",
|
||||
"task-splitting": "División de Tareas",
|
||||
"task-running": "Ejecutando Tarea",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
"agent-tool": "Outil Agent",
|
||||
"agent-tool-tooltip": "Sélectionnez les outils et intégrations pour votre agent",
|
||||
"resume": "Reprendre",
|
||||
"stop-task": "Arrêter la Tâche",
|
||||
"next-task": "Tâche suivante",
|
||||
"task-splitting": "Division des Tâches",
|
||||
"task-running": "Exécution des Tâches",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
"agent-tool": "Strumento Agente",
|
||||
"agent-tool-tooltip": "Seleziona strumenti e integrazioni per il tuo agente",
|
||||
"resume": "Riprendi",
|
||||
"stop-task": "Ferma Attività",
|
||||
"next-task": "Prossima Attività",
|
||||
"task-splitting": "Divisione Attività",
|
||||
"task-running": "Esecuzione Attività",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
"agent-tool": "エージェントツール",
|
||||
"agent-tool-tooltip": "エージェントのツールと統合を選択",
|
||||
"resume": "再開",
|
||||
"stop-task": "タスクを停止",
|
||||
"next-task": "次のタスク",
|
||||
"task-splitting": "タスク分割",
|
||||
"task-running": "タスク実行中",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
"agent-tool": "에이전트 도구",
|
||||
"agent-tool-tooltip": "에이전트를 위한 도구 및 통합 선택",
|
||||
"resume": "재개",
|
||||
"stop-task": "작업 중지",
|
||||
"next-task": "다음 작업",
|
||||
"task-splitting": "작업 분할",
|
||||
"task-running": "작업 실행",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
"agent-tool": "Инструмент агента",
|
||||
"agent-tool-tooltip": "Выберите инструменты и интеграции для вашего агента",
|
||||
"resume": "Возобновить",
|
||||
"stop-task": "Остановить задачу",
|
||||
"next-task": "Следующая задача",
|
||||
"task-splitting": "Разделение задачи",
|
||||
"task-running": "Выполнение задачи",
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@
|
|||
"agent-tool": "智能体工具",
|
||||
"agent-tool-tooltip": "为您的智能体选择工具和集成",
|
||||
"resume": "恢复",
|
||||
"stop-task": "停止任务",
|
||||
"next-task": "下一个任务",
|
||||
"task-splitting": "任务拆分",
|
||||
"task-running": "任务运行",
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@
|
|||
"agent-tool": "智能體工具",
|
||||
"agent-tool-tooltip": "為您的智能體選擇工具和整合",
|
||||
"resume": "恢復",
|
||||
"stop-task": "停止任務",
|
||||
"next-task": "下一個任務",
|
||||
"task-splitting": "任務拆分",
|
||||
"task-running": "任務執行",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue