Add reasoning extraction + adapt to v0.4.0-beta.10#14
Conversation
Add reasoning data extraction
Reasoning extraction
Few more fixes
reverted reference
Summary of ChangesHello @fr33z00, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses two main objectives: enabling the extraction and display of 'reasoning' message content and updating the project's dependencies to Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request primarily upgrades all @xsai dependencies (including @xsai/shared-chat, @xsai/stream-text, @xsai/tool, @xsai/utils-reasoning, @xsai/shared, and xsschema) from version 0.3.3 to 0.4.0-beta.10 across the project, as reflected in pnpm-lock.yaml and pnpm-workspace.yaml. Concurrently, the packages/shared/package.json version was updated to 0.0.2-reasoning. The dependency upgrade led to type definition changes in packages/shared/src/part-parser.ts and packages/shared/src/types/ui.ts, where generic Part types were replaced with more specific CommonContentPart and RefusalContentPart types, and ToolMessagePart was replaced by CommonContentPart in UIMessageToolCallPart. In packages/react/src/hooks/use-chat.ts, a property name was changed from signal to abortSignal. A notable functional change in packages/shared/src/utils/call-api.ts introduces handling for a new reasoning-delta event type, allowing the system to process and display reasoning information, and the streamText call was modified to be non-awaiting. No review comments were provided for this pull request.
Fix tool calls not shown until there is some text in message
|
Other LGTM |
Co-authored-by: 藍+85CD <50108258+kwaa@users.noreply.github.com>
Fixed signal -> abortSignal in svelte & vue
|
Seing the compilation error in CI, I fixed signal into abortSignal in svelte & vue. The error confirms the name change in react was legit. |
Fix typing in svelte
|
A type error was still there in svelte. This is out of the scope of my PR, but I guess needed for it to be accepted. |
Types reordering
|
Fix type ordering complain from linter. |
|
All good, now, thanks @kwaa for the review. |
Hello.
Message parts of type reasoning were desperately empty, and I didn't figure out how extract-reasonning could fit. So, I decided to modify the api-call function.
As I needed to work with v0.4.0-beta.10 after an issue I published and you fixed, and xsai-use was still based on v0.3.3, I faced the need to adapt the code to this new version. This led to a more complex PR that would have been necessary by the only change on api-call.
Hoping this work to be useful and of reasonable quality, please consider merging it or using it freely as a basis for a new release of xsai-use.
Regards.