MCPcopy Create free account
hub / github.com/coderoad/coderoad-vscode / writeToSessionFile

Method writeToSessionFile

src/services/storage/index.ts:81–92  ·  view source on GitHub ↗
(data: string)

Source from the content-addressed store, hash-verified

79 this.writeToSessionFile(next)
80 }
81 public writeToSessionFile(data: string) {
82 // optionally write state to file, useful when state cannot be controlled across containers
83 if (SESSION_STORAGE_PATH) {
84 try {
85 writeFile(data, SESSION_STORAGE_PATH, `${this.filePath}.json`)
86 } catch (err: any) {
87 logger(
88 `Failed to write coderoad session to path: ${SESSION_STORAGE_PATH}/${this.filePath}.json: ${err.message}`,
89 )
90 }
91 }
92 }
93 public reset = () => {
94 this.set(this.defaultValue)
95 }

Callers 1

StorageClass · 0.95

Calls 2

writeFileFunction · 0.90
loggerFunction · 0.50

Tested by

no test coverage detected