(messages)
| 102 | |
| 103 | // Auto-title from first user message |
| 104 | autoTitle(messages) { |
| 105 | if (this.current && !this.current.title) { |
| 106 | const firstUser = messages.find(m => m.role === 'user'); |
| 107 | if (firstUser) { |
| 108 | this.current.title = firstUser.content.slice(0, 60).replace(/\n/g, ' '); |
| 109 | this._save(this.current); |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | // List all sessions (newest first) |
| 115 | list() { |
no test coverage detected