-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add tool result support #1684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tool result support #1684
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 4bda389 in 1 minute and 46 seconds
More details
- Looked at
489
lines of code in14
files - Skipped
0
files when reviewing. - Skipped posting
9
drafted comments based on config settings.
1. packages/ai/package.json:34
- Draft comment:
Dependency 'ai' version updated to ^4.2.6. Ensure consistency across all packages. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
2. packages/models/package.json:36
- Draft comment:
Dependency 'ai' version updated to ^4.2.6 for consistency across projects. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
3. packages/models/src/chat/message/message.ts:9
- Draft comment:
Added TOOL role; ensure CoreToolMessage is compatible with your implementations. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
4. packages/models/src/chat/message/message.ts:27
- Draft comment:
Export interface for ToolChatMessage added; verify that downstream usage handles 'id' correctly. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
5. packages/ai/package.json:35
- Draft comment:
Dependency upgrade: The 'ai' dependency has been updated to ^4.2.6. Verify that this version is fully compatible with the rest of the codebase. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
6. packages/models/package.json:36
- Draft comment:
Consistent dependency update: 'ai' is now ^4.2.6. Ensure version alignment across all packages. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
7. packages/models/src/chat/message/message.ts:27
- Draft comment:
The new ToolChatMessage interface extending CoreToolMessage is defined correctly. Confirm that CoreToolMessage now includes the needed structure. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
8. apps/studio/package.json:30
- Draft comment:
The script key 'pree2e' looks like it might be a typographical error. Did you mean 'pre:e2e' (with a colon) or something similar? Please verify and fix if needed. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
9. packages/ai/package.json:3
- Draft comment:
Typo: In the description ('A AI library for Onlook'), consider changing 'A AI' to 'An AI' for correct grammar. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_H9TIwxCC1V4oLroS
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 5f049c6 in 39 seconds
More details
- Looked at
27
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. apps/studio/src/lib/editor/engine/chat/conversation/conversation.ts:89
- Draft comment:
Removed extraneous console.log. Ensure it's intentional and not needed for debugging. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
2. apps/studio/src/lib/editor/engine/chat/stream.ts:52
- Draft comment:
Updated resolveToolCallPart parameter to accept union types; removal of ts-expect error comment is appropriate. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
3. apps/studio/src/lib/editor/engine/chat/conversation/conversation.ts:89
- Draft comment:
Good removal of debug logging; avoid console.log in production. Use a dedicated logger for debugging if needed. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
4. apps/studio/src/lib/editor/engine/chat/stream.ts:52
- Draft comment:
Extending the payload type to include ToolCallPart and ToolResultPart improves type safety; removal of ts-expect-error is appropriate. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
5. apps/studio/src/lib/editor/engine/chat/conversation/conversation.ts:1
- Draft comment:
PR title/issue mentions onboarding docs updates, but diff shows only tool-related code changes. Ensure documentation updates are included. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_wDTp1K73g8T29IUG
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipped PR review on 1113746 because no changed files had a supported extension. If you think this was in error, please contact us and we'll fix it right away.
…slation_zh * 'main' of https://github.com/onlook-dev/onlook: fix: error when add new color to group (onlook-dev#1683) update searching brand color picker (onlook-dev#1681) Quicker build with freestyle (onlook-dev#1685) Add tool result support (onlook-dev#1684) feat: Include tool-result in chat (onlook-dev#1682)
* feat: Include tool-result in chat * Add tool impl in conversation --------- Co-authored-by: Wh1isper <[email protected]>
* feat: Include tool-result in chat * Add tool impl in conversation --------- Co-authored-by: Wh1isper <[email protected]>
Description
Related Issues
Type of Change
Testing
Screenshots (if applicable)
Additional Notes
Important
Add
ToolChatMessageImpl
and integrate tool messages into chat system with updated dependencies.ToolChatMessageImpl
class inmessage/tool.ts
to handle tool messages.ChatConversationImpl
inconversation.ts
to supportToolChatMessageImpl
.addCoreToolMessage()
inConversationManager
to append tool messages.ChatManager
inchat/index.ts
to handleTOOL
role messages.ToolMessage
component inToolMessage.tsx
to render tool messages.ChatMessages
inindex.tsx
to include tool messages.ai
dependency version to^4.2.6
inpackage.json
files.TOOL
toChatMessageRole
inmessage.ts
.This description was created by
for 5f049c6. It will automatically update as commits are pushed.