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

Method sendNormalUserInput

apps/kimi-code/src/tui/kimi-tui.ts:1069–1093  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

1067 }
1068
1069 sendNormalUserInput(text: string): void {
1070 if (this.btwPanelController.sendUserInput(text)) return;
1071 if (this.state.appState.model.trim().length === 0) {
1072 this.showError(LLM_NOT_SET_MESSAGE);
1073 return;
1074 }
1075 const extraction = extractMediaAttachments(text, this.imageStore);
1076 if (!this.validateMediaCapabilities(extraction)) return;
1077 const session = this.session;
1078 if (session === undefined) {
1079 this.showError(LLM_NOT_SET_MESSAGE);
1080 return;
1081 }
1082 if (extraction.hasMedia) {
1083 this.sendMessage(session, text, {
1084 hasMedia: true,
1085 parts: extraction.parts,
1086 imageAttachmentIds: extraction.imageAttachmentIds,
1087 });
1088 } else {
1089 this.sendMessage(session, text);
1090 }
1091 this.updateQueueDisplay();
1092 this.state.ui.requestRender();
1093 }
1094
1095 private validateMediaCapabilities(
1096 extraction: ReturnType<typeof extractMediaAttachments>,

Callers

nothing calls this directly

Calls 7

showErrorMethod · 0.95
sendMessageMethod · 0.95
updateQueueDisplayMethod · 0.95
extractMediaAttachmentsFunction · 0.90
sendUserInputMethod · 0.80
requestRenderMethod · 0.65

Tested by

no test coverage detected