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

Function formatUndoLimitMessage

apps/kimi-code/src/tui/commands/undo.ts:341–349  ·  view source on GitHub ↗
(
  requestedCount: number,
  availability: UndoAvailability,
)

Source from the content-addressed store, hash-verified

339}
340
341function formatUndoLimitMessage(
342 requestedCount: number,
343 availability: UndoAvailability,
344): string {
345 const reason = availability.stoppedAtCompaction ? ' after the last compaction' : '';
346 const requested = formatPromptCount(requestedCount);
347 const max = formatPromptCount(availability.maxCount);
348 return `Cannot undo ${requested}; only ${max} can be undone in the active context${reason}.`;
349}
350
351function formatNothingToUndoMessage(availability: UndoAvailability): string {
352 if (availability.stoppedAtCompaction) {

Callers 2

handleUndoCommandFunction · 0.85
undoByCountFunction · 0.85

Calls 1

formatPromptCountFunction · 0.70

Tested by

no test coverage detected