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

Method steer

packages/agent-core/src/agent/turn/index.ts:134–149  ·  view source on GitHub ↗
(input: readonly ContentPart[], origin: PromptOrigin = USER_PROMPT_ORIGIN)

Source from the content-addressed store, hash-verified

132 // Returns the new turnId, or null if the input was buffered as a steer
133 // message or the turn was marked as resuming.
134 steer(input: readonly ContentPart[], origin: PromptOrigin = USER_PROMPT_ORIGIN): number | null {
135 this.agent.records.logRecord({
136 type: 'turn.steer',
137 input,
138 origin,
139 });
140 // Buffer while a turn is active OR a manual compaction holds the context;
141 // `onCompactionFinished` replays the buffer once compaction's full lifecycle
142 // (summary + reinjection) is done. Returning null means "buffered" — which is
143 // exactly what fire-and-forget callers (background notifications, cron) assume.
144 if (this.activeTurn || this.agent.fullCompaction.isCompacting) {
145 this.steerBuffer.push({ input, origin });
146 return null;
147 }
148 return this.launch(input, origin);
149 }
150
151 retry(trigger?: string): number | null {
152 return this.prompt([], { kind: 'retry', trigger });

Callers

nothing calls this directly

Calls 3

launchMethod · 0.95
logRecordMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected