MCPcopy Create free account
hub / github.com/google-gemini/gemini-cli / save

Method save

packages/cli/src/utils/persistentState.ts:55–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 }
54
55 private save() {
56 if (!this.cache) return;
57 try {
58 const filePath = this.getPath();
59 const dir = path.dirname(filePath);
60 if (!fs.existsSync(dir)) {
61 fs.mkdirSync(dir, { recursive: true });
62 }
63 fs.writeFileSync(filePath, JSON.stringify(this.cache, null, 2));
64 } catch (error) {
65 debugLogger.warn('Failed to save persistent state:', error);
66 }
67 }
68
69 get<K extends keyof PersistentStateData>(
70 key: K,

Callers 1

setMethod · 0.95

Calls 2

getPathMethod · 0.95
warnMethod · 0.45

Tested by

no test coverage detected