sync: update from private repo (826b23e)
Some checks failed
CI / build-and-test (push) Has been cancelled

This commit is contained in:
oss-sync 2026-06-17 06:21:18 +00:00
parent 1602d52510
commit 643232caba

View File

@ -28,14 +28,14 @@ export function useTaskOperations({ taskId, showToast, setUrlState, setShowCreat
const handleComment = useCallback(async (body: string, attachments?: Array<{ name: string; contentBase64: string }>) => { const handleComment = useCallback(async (body: string, attachments?: Array<{ name: string; contentBase64: string }>) => {
if (!taskId) return; if (!taskId) return;
try { // Let send failures propagate to ChatPane, which preserves the draft +
await postLocalTaskComment(taskId, body, 'user', attachments); // attachments and shows an inline error with a retry button. Swallowing the
qc.invalidateQueries({ queryKey: ['localTaskDetail', taskId] }); // error here would make ChatPane treat the send as successful and clear the
qc.invalidateQueries({ queryKey: ['localTasks'] }); // user's input (losing the prompt and attachments on failure).
} catch { await postLocalTaskComment(taskId, body, 'user', attachments);
showToast(t('toast.commentFailed'), 'error'); qc.invalidateQueries({ queryKey: ['localTaskDetail', taskId] });
} qc.invalidateQueries({ queryKey: ['localTasks'] });
}, [taskId, qc, showToast, t]); }, [taskId, qc]);
const handleDelete = useCallback(async () => { const handleDelete = useCallback(async () => {
if (!taskId) return; if (!taskId) return;