# Persist per-thread composer drafts and reuse project draft threads · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/cadef14a8428fe62f53d4ac7502cfaa7fa512333)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: cadef14a8428fe62f53d4ac7502cfaa7fa512333

Requested commit: cadef14a8428fe62f53d4ac7502cfaa7fa512333

Commit: cadef14a8428fe62f53d4ac7502cfaa7fa512333

Tree: 3073fe425e78f823a00349aa31ba4021f19e57f6

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Persist per-thread composer drafts and reuse project draft threads

- add a zustand-backed composer draft store with localStorage persistence for prompt, cursor, model/effort, and image attachments
- wire ChatView to draft state, restore/clear drafts correctly, and warn when an attachment cannot be persisted
- track per-project draft thread IDs so Sidebar reuses hidden draft threads and excludes empty drafts from thread lists

```

## Parents

- [10660f376cd410dbbbfea239b45e79fbcde4ddbc](https://git.cafe/pingdotgg/t3code/commit/10660f376cd410dbbbfea239b45e79fbcde4ddbc?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/cadef14a8428fe62f53d4ac7502cfaa7fa512333?format=markdown)
