sync: update from private repo (826b23e)
Some checks failed
CI / build-and-test (push) Has been cancelled
Some checks failed
CI / build-and-test (push) Has been cancelled
This commit is contained in:
parent
1602d52510
commit
643232caba
@ -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 +
|
||||||
|
// 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);
|
await postLocalTaskComment(taskId, body, 'user', attachments);
|
||||||
qc.invalidateQueries({ queryKey: ['localTaskDetail', taskId] });
|
qc.invalidateQueries({ queryKey: ['localTaskDetail', taskId] });
|
||||||
qc.invalidateQueries({ queryKey: ['localTasks'] });
|
qc.invalidateQueries({ queryKey: ['localTasks'] });
|
||||||
} catch {
|
}, [taskId, qc]);
|
||||||
showToast(t('toast.commentFailed'), 'error');
|
|
||||||
}
|
|
||||||
}, [taskId, qc, showToast, t]);
|
|
||||||
|
|
||||||
const handleDelete = useCallback(async () => {
|
const handleDelete = useCallback(async () => {
|
||||||
if (!taskId) return;
|
if (!taskId) return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user