mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 15:01:24 +00:00
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:
parent
4f757fbe23
commit
a315cfe813
4 changed files with 16 additions and 19 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue