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

Method loadPersistedInputHistory

apps/kimi-code/src/tui/kimi-tui.ts:1123–1134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1121 }
1122
1123 private async loadPersistedInputHistory(): Promise<void> {
1124 try {
1125 const file = getInputHistoryFile(this.state.appState.workDir);
1126 const entries = await loadInputHistory(file);
1127 for (const entry of entries) {
1128 this.state.editor.addToHistory(entry.content);
1129 }
1130 this.lastHistoryContent = entries.at(-1)?.content;
1131 } catch {
1132 // best-effort
1133 }
1134 }
1135
1136 private async persistInputHistory(text: string): Promise<void> {
1137 const trimmed = text.trim();

Callers 1

initMainTuiMethod · 0.95

Calls 3

getInputHistoryFileFunction · 0.90
loadInputHistoryFunction · 0.90
addToHistoryMethod · 0.65

Tested by

no test coverage detected