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 }>) => {
if (!taskId) return;
try {
// Let send failures propagate to ChatPane, which preserves the draft +
// attachments and shows an inline error with a retry button. Swallowing the
// error here would make ChatPane treat the send as successful and clear the
// user's input (losing the prompt and attachments on failure).
await postLocalTaskComment(taskId, body, 'user', attachments);
qc.invalidateQueries({ queryKey: ['localTaskDetail', taskId] });
qc.invalidateQueries({ queryKey: ['localTasks'] });
} catch {
showToast(t('toast.commentFailed'), 'error');
}
}, [taskId, qc, showToast, t]);
}, [taskId, qc]);
const handleDelete = useCallback(async () => {
if (!taskId) return;