Merge pull request #5999 from haoqixu/fix-5996
fix(coding-agent): normalize session names
This commit is contained in:
@@ -1026,12 +1026,13 @@ export class SessionManager {
|
||||
|
||||
/** Append a session info entry (e.g., display name). Returns entry id. */
|
||||
appendSessionInfo(name: string): string {
|
||||
const sanitizedName = name.replace(/[\r\n]+/g, " ").trim();
|
||||
const entry: SessionInfoEntry = {
|
||||
type: "session_info",
|
||||
id: generateId(this.byId),
|
||||
parentId: this.leafId,
|
||||
timestamp: new Date().toISOString(),
|
||||
name: name.trim(),
|
||||
name: sanitizedName,
|
||||
};
|
||||
this._appendEntry(entry);
|
||||
return entry.id;
|
||||
|
||||
Reference in New Issue
Block a user