MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / loadLastChoice

Function loadLastChoice

scripts/dev-select.mjs:27–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25]
26
27function loadLastChoice() {
28 try {
29 const key = readFileSync(cacheFile, 'utf8').trim()
30 const idx = options.findIndex((o) => o.key === key)
31 return idx >= 0 ? idx : 0
32 } catch {
33 return 0
34 }
35}
36
37function saveChoice(key) {
38 try {

Callers 1

dev-select.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected