fix(ai): complete textSignature round-trip for Google providers
- Store thoughtSignature on text blocks during streaming (all 3 providers) - Replay textSignature as thoughtSignature in convertMessages - Remove redundant conditional since retainThoughtSignature handles undefined Per Google docs, text part signatures are optional but recommended for high-quality reasoning in multi-turn conversations.
This commit is contained in:
@@ -511,12 +511,10 @@ export const streamGoogleGeminiCli: StreamFunction<"google-gemini-cli"> = (
|
||||
});
|
||||
} else {
|
||||
currentBlock.text += part.text;
|
||||
if (part.thoughtSignature) {
|
||||
currentBlock.textSignature = retainThoughtSignature(
|
||||
currentBlock.textSignature,
|
||||
part.thoughtSignature,
|
||||
);
|
||||
}
|
||||
currentBlock.textSignature = retainThoughtSignature(
|
||||
currentBlock.textSignature,
|
||||
part.thoughtSignature,
|
||||
);
|
||||
stream.push({
|
||||
type: "text_delta",
|
||||
contentIndex: blockIndex(),
|
||||
|
||||
Reference in New Issue
Block a user