Replace the stored cancel func with a handle so a stale deferred cleanup
can't delete a newer task's cancellation, and clear a thread's cancelled
flag when it submits fresh work instead of refusing to restart. Thread
progress/finished state now derives from the latest user task in the
thread rather than the whole history. Adds coverage for continuing a
stopped thread and for sanitized generation-failure messages.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Propagate an optional imageName through the agent content pipeline
(frontend types → API → domain → prompt building) so reference images
render with their name instead of a bare "image" label.
Also switch PromptComposer to submit on plain Enter (Shift+Enter for
newline, IME-safe) and add a submitDisabled guard wired from the canvas
and home composers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>