Skip to content

Forward positionalArgs to resolved providers#1181

Merged
threepointone merged 6 commits intomainfrom
fix-codemode
Mar 24, 2026
Merged

Forward positionalArgs to resolved providers#1181
threepointone merged 6 commits intomainfrom
fix-codemode

Conversation

@threepointone
Copy link
Contributor

@threepointone threepointone commented Mar 24, 2026

Preserve provider.positionalArgs when resolving ToolProviders so multi-argument tool calls don't lose positional arguments. Update createCodeTool in both tanstack-ai.ts and tool.ts to copy positionalArgs into ResolvedProvider when present. Add unit tests verifying positionalArgs is forwarded or omitted appropriately, and add a changeset noting the fix.


Open with Devin

Preserve provider.positionalArgs when resolving ToolProviders so multi-argument tool calls don't lose positional arguments. Update createCodeTool in both tanstack-ai.ts and tool.ts to copy positionalArgs into ResolvedProvider when present. Add unit tests verifying positionalArgs is forwarded or omitted appropriately, and add a changeset noting the fix.
@changeset-bot
Copy link

changeset-bot bot commented Mar 24, 2026

🦋 Changeset detected

Latest commit: 523203c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
agents Patch
@cloudflare/codemode Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Wrap duplicate-schedule warning emission in a try/catch so any errors while warning/emit-ing won't block row processing. Move JSON.parse(row.payload) into the execute try block to avoid parsing exceptions happening before related events are emitted. Update tests accordingly: insert null payloads instead of JSON.stringify(undefined), delay setAlarm by 1s to avoid immediate processing, increase close wait timeout and poll for disconnect events to accomodate Workers runtime/hibernation timing.
Expose a callable setStoredAlarm on TestScheduleAgent and update schedule tests to use agentStub.clearStoredAlarm(), setStoredAlarm(), and backdateSchedule() instead of manipulating ctx.storage inside durable object callbacks. This avoids races with the auto-scheduled alarm and makes deterministic alarm firing in the tests by clearing, backdating, then re-arming the stored alarm before calling runDurableObjectAlarm.
devin-ai-integration[bot]

This comment was marked as resolved.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 24, 2026

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@1181

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@1181

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@1181

hono-agents

npm i https://pkg.pr.new/hono-agents@1181

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@1181

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@1181

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@1181

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@1181

commit: 523203c

@threepointone threepointone merged commit e9bace9 into main Mar 24, 2026
2 checks passed
@threepointone threepointone deleted the fix-codemode branch March 24, 2026 21:26
@github-actions github-actions bot mentioned this pull request Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant