MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / loadPromptHistory

Function loadPromptHistory

src/config/promptHistory.ts:13–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12/** Prompt history shared across sessions, oldest first (like shell history). */
13export function loadPromptHistory(): string[] {
14 try {
15 const data = JSON.parse(fs.readFileSync(historyPath(), "utf8"))
16 return Array.isArray(data) ? data.filter((e): e is string => typeof e === "string") : []
17 } catch {
18 return []
19 }
20}
21
22export function appendPromptHistory(entry: string): void {
23 try {

Callers 2

InputBoxFunction · 0.85
appendPromptHistoryFunction · 0.85

Calls 1

historyPathFunction · 0.85

Tested by

no test coverage detected