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

Method steerMessage

apps/kimi-code/src/tui/kimi-tui.ts:1275–1303  ·  view source on GitHub ↗
(session: Session, input: string[])

Source from the content-addressed store, hash-verified

1273 }
1274
1275 steerMessage(session: Session, input: string[]): void {
1276 if (this.deferUserMessages || this.state.appState.isCompacting) {
1277 for (const part of input) {
1278 this.enqueueMessage(part);
1279 }
1280 return;
1281 }
1282 if (this.state.appState.streamingPhase === 'idle') {
1283 for (const part of input) {
1284 this.sendMessageInternal(session, part);
1285 }
1286 return;
1287 }
1288
1289 for (const part of input) {
1290 this.appendTranscriptEntry({
1291 id: nextTranscriptId(),
1292 kind: 'user',
1293 turnId: this.streamingUI.getTurnContext().turnId,
1294 renderMode: 'plain',
1295 content: part,
1296 });
1297 }
1298
1299 void session.steer(input.join('\n\n')).catch((error: unknown) => {
1300 const message = formatErrorMessage(error);
1301 this.showError(`Failed to steer: ${message}`);
1302 });
1303 }
1304
1305 // =========================================================================
1306 // State & Accessors

Callers

nothing calls this directly

Calls 8

enqueueMessageMethod · 0.95
sendMessageInternalMethod · 0.95
appendTranscriptEntryMethod · 0.95
showErrorMethod · 0.95
nextTranscriptIdFunction · 0.90
formatErrorMessageFunction · 0.90
getTurnContextMethod · 0.80
steerMethod · 0.65

Tested by

no test coverage detected