-
Notifications
You must be signed in to change notification settings - Fork 0
Fix docs + examples #99
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
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.
2 issues found across 3 files
Prompt for AI agents (all 2 issues)
Understand the root cause of the following 2 issues and fix them.
<file name="site/docs/pages/tools/blockchain.md">
<violation number="1" location="site/docs/pages/tools/blockchain.md:153">
The "Custom Transaction Tool" example uses `createTool` and `z` but never imports them, so the sample cannot run when copied.</violation>
</file>
<file name="site/docs/pages/tools/xmtp.md">
<violation number="1" location="site/docs/pages/tools/xmtp.md:100">
ContentTypeText is imported from `@xmtp/content-type-reply`, but that package does not export it, so the sample code will not compile; import ContentTypeText from `@xmtp/content-type-text` instead.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| import { privateKeyToAccount } from "viem/accounts" | ||
| import { mainnet } from "viem/chains" | ||
|
|
||
| const sendWithRetryTool = createTool({ |
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.
The "Custom Transaction Tool" example uses createTool and z but never imports them, so the sample cannot run when copied.
Prompt for AI agents
Address the following comment on site/docs/pages/tools/blockchain.md at line 153:
<comment>The "Custom Transaction Tool" example uses `createTool` and `z` but never imports them, so the sample cannot run when copied.</comment>
<file context>
@@ -7,800 +7,340 @@ description: Built-in blockchain tools for crypto operations and DeFi interactio
+import { privateKeyToAccount } from "viem/accounts"
+import { mainnet } from "viem/chains"
+
+const sendWithRetryTool = createTool({
+ description: "Send transaction with automatic retry",
+ inputSchema: z.object({
</file context>
| }) | ||
| import { createTool } from "hybrid" | ||
| import { z } from "zod" | ||
| import { ContentTypeReply, ContentTypeText } from "@xmtp/content-type-reply" |
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.
ContentTypeText is imported from @xmtp/content-type-reply, but that package does not export it, so the sample code will not compile; import ContentTypeText from @xmtp/content-type-text instead.
Prompt for AI agents
Address the following comment on site/docs/pages/tools/xmtp.md at line 100:
<comment>ContentTypeText is imported from `@xmtp/content-type-reply`, but that package does not export it, so the sample code will not compile; import ContentTypeText from `@xmtp/content-type-text` instead.</comment>
<file context>
@@ -37,224 +37,229 @@ await agent.listen({
- })
+import { createTool } from "hybrid"
+import { z } from "zod"
+import { ContentTypeReply, ContentTypeText } from "@xmtp/content-type-reply"
+
+const replyTool = createTool({
</file context>
Summary by cubic
Updated blockchain, XMTP, and agent behavior docs to match the current Hybrid API and runtime model, fixing incorrect imports, usage patterns, and removing unsupported features to prevent misleading examples.
Bug Fixes
Migration
Written for commit f863d65. Summary will update automatically on new commits.