MCPcopy
hub / github.com/Doorman11991/smallcode / autoTitle

Method autoTitle

src/session/persistence.js:104–112  ·  view source on GitHub ↗
(messages)

Source from the content-addressed store, hash-verified

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() {

Callers 2

chatCompletionFunction · 0.80
chatCompletionFunction · 0.80

Calls 1

_saveMethod · 0.95

Tested by

no test coverage detected