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

Method writeMetadata

packages/agent-core/src/session/index.ts:689–697  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

687 }
688
689 writeMetadata() {
690 const text = JSON.stringify(this.metadata, null, 2);
691 const write = async () => {
692 await this.persistenceKaos.mkdir(this.options.homedir, { parents: true, existOk: true });
693 await this.persistenceKaos.writeText(this.metadataPath, text);
694 };
695 this.writeMetadataPromise = this.writeMetadataPromise.then(write, write);
696 return this.writeMetadataPromise;
697 }
698
699 async readMetadata() {
700 const text = await this.persistenceKaos.readText(this.metadataPath);

Callers 5

createAgentMethod · 0.95
renameSessionMethod · 0.80
updateSessionMetadataMethod · 0.80
updatePromptMetadataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected