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

Function buildDebouncePattern

packages/pi-tui/src/components/editor.ts:260–263  ·  view source on GitHub ↗
(triggerCharacters: string[])

Source from the content-addressed store, hash-verified

258}
259
260function buildDebouncePattern(triggerCharacters: string[]): RegExp {
261 const escapedWithoutAt = triggerCharacters.filter((character) => character !== "@").map(escapeCharacterClass);
262 return new RegExp(`(?:^|[ \\t])(?:@(?:"[^"]*|[^\\s]*)|[${escapedWithoutAt.join("")}][^\\s]*)$`);
263}
264
265export class Editor implements Component, Focusable {
266 private state: EditorState = {

Callers 2

EditorClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected