[template] fix thinking list#9679
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates swift/template/base.py to handle message content that may be formatted as a list instead of a string in both _add_non_thinking_prefix and _remove_history_thinking. The review feedback correctly points out that accessing the first element of the list without checking if it is empty could lead to an IndexError, and provides suggestions to safely handle empty lists.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates swift/template/base.py to handle scenarios where message['content'] is a list instead of a string. Specifically, in both _add_non_thinking_prefix and _remove_history_thinking methods, the code now checks if the content is a list and processes its first element accordingly. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
No description provided.