tweak: remove steering wrapper that can bust cache (#33039)

This commit is contained in:
Aiden Cline 2026-06-19 19:10:09 -04:00 committed by GitHub
parent 3f1fffeb6d
commit f092bafe88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 19 deletions

View File

@ -1304,24 +1304,6 @@ export const layer = Layer.effect(
if (step === 1)
yield* summary.summarize({ sessionID, messageID: lastUser.id }).pipe(Effect.ignore, Effect.forkIn(scope))
if (step > 1 && lastFinished) {
for (const m of msgs) {
if (m.info.role !== "user" || m.info.id <= lastFinished.id) continue
for (const p of m.parts) {
if (p.type !== "text" || p.ignored || p.synthetic) continue
if (!p.text.trim()) continue
p.text = [
"<system-reminder>",
"The user sent the following message:",
p.text,
"",
"Please address this message and continue with your tasks.",
"</system-reminder>",
].join("\n")
}
}
}
yield* plugin.trigger("experimental.chat.messages.transform", {}, { messages: msgs })
const [skills, env, instructions, modelMsgs] = yield* Effect.all([

View File

@ -1346,7 +1346,9 @@ it.instance(
const inputs = yield* llm.inputs
expect(inputs).toHaveLength(2)
expect(JSON.stringify(inputs.at(-1)?.messages)).toContain("second")
const messages = inputs.at(-1)?.messages
if (!Array.isArray(messages)) throw new Error("expected LLM messages")
expect(messages.at(-1)).toEqual({ role: "user", content: "second" })
}),
3_000,
)