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

Method handleTabCompletion

packages/pi-tui/src/components/editor.ts:2208–2219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2206 }
2207
2208 private handleTabCompletion(): void {
2209 if (!this.autocompleteProvider) return;
2210
2211 const currentLine = this.state.lines[this.state.cursorLine] || "";
2212 const beforeCursor = currentLine.slice(0, this.state.cursorCol);
2213
2214 if (this.isInSlashCommandContext(beforeCursor) && !beforeCursor.trimStart().includes(" ")) {
2215 this.handleSlashCommandCompletion();
2216 } else {
2217 this.forceFileAutocomplete(true);
2218 }
2219 }
2220
2221 private handleSlashCommandCompletion(): void {
2222 this.requestAutocomplete({ force: false, explicitTab: true });

Callers 1

handleInputMethod · 0.95

Calls 3

forceFileAutocompleteMethod · 0.95

Tested by

no test coverage detected