MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / renameSession

Method renameSession

packages/agent-core/src/session/rpc.ts:54–66  ·  view source on GitHub ↗
(payload: RenameSessionPayload)

Source from the content-addressed store, hash-verified

52 constructor(protected readonly session: Session) {}
53
54 async renameSession(payload: RenameSessionPayload): Promise<void> {
55 const title = payload.title.trim();
56 if (title.length === 0) {
57 throw new KimiError(ErrorCodes.SESSION_TITLE_EMPTY, 'Session title cannot be empty');
58 }
59 this.session.metadata = {
60 ...this.session.metadata,
61 title,
62 isCustomTitle: true,
63 updatedAt: new Date().toISOString(),
64 };
65 await this.session.writeMetadata();
66 }
67
68 async updateSessionMetadata(payload: UpdateSessionMetadataPayload): Promise<void> {
69 this.session.metadata = {

Callers 2

createMethod · 0.45
updateMethod · 0.45

Calls 1

writeMetadataMethod · 0.80

Tested by

no test coverage detected