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

Method sendMessageInternal

apps/kimi-code/src/tui/kimi-tui.ts:1219–1240  ·  view source on GitHub ↗
(session: Session, input: string, options?: SendMessageOptions)

Source from the content-addressed store, hash-verified

1217 }
1218
1219 private sendMessageInternal(session: Session, input: string, options?: SendMessageOptions): void {
1220 const imageAttachmentIds =
1221 options?.imageAttachmentIds !== undefined && options.imageAttachmentIds.length > 0
1222 ? options.imageAttachmentIds
1223 : undefined;
1224 this.appendTranscriptEntry({
1225 id: nextTranscriptId(),
1226 kind: 'user',
1227 turnId: undefined,
1228 renderMode: 'plain',
1229 content: input,
1230 imageAttachmentIds,
1231 });
1232
1233 this.beginSessionRequest();
1234
1235 const sdkInput = options?.parts ?? input;
1236 void session.prompt(sdkInput).catch((error: unknown) => {
1237 const message = formatErrorMessage(error);
1238 this.failSessionRequest(`Failed to send: ${message}`);
1239 });
1240 }
1241
1242 sendSkillActivation(session: Session, skillName: string, skillArgs: string): void {
1243 this.beginSessionRequest();

Callers 3

sendQueuedMessageMethod · 0.95
sendMessageMethod · 0.95
steerMessageMethod · 0.95

Calls 6

appendTranscriptEntryMethod · 0.95
beginSessionRequestMethod · 0.95
failSessionRequestMethod · 0.95
nextTranscriptIdFunction · 0.90
formatErrorMessageFunction · 0.90
promptMethod · 0.65

Tested by

no test coverage detected