(opts)
| 54 | }, |
| 55 | |
| 56 | async create(opts) { |
| 57 | const store = getStore(); |
| 58 | const id = store.getState().createConversation(); |
| 59 | |
| 60 | if (opts?.title || opts?.model) { |
| 61 | store.getState().updateConversation(id, { |
| 62 | ...(opts.title ? { title: opts.title } : {}), |
| 63 | ...(opts.model ? { model: opts.model } : {}), |
| 64 | }); |
| 65 | } |
| 66 | |
| 67 | return findConversation(id); |
| 68 | }, |
| 69 | |
| 70 | async update(id, updates) { |
| 71 | findConversation(id); // throws 404 if missing |
no test coverage detected