Skip to content

docs(platform): useChat backend wording for 0.6.0, and server-route examples - #356

Merged
wixysam merged 1 commit into
mainfrom
usechat-0-6-docs
Oct 29, 2026
Merged

wixysam merged 1 commit into
mainfrom
usechat-0-6-docs

Conversation

@wixysam

@wixysam wixysam commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #354. Updates the useChat reference for how a send or an answer ends in 0.6.0, and adds the server-route examples that were waiting on it.

Wording

  • The Backend calls closing paragraph is split in two, with no colons. The first part says to forward each request and return its result, and when a failure sets error. The second covers Next.js server actions, which should wait a few seconds for a refusal and then resolve.
  • The Returned actions and Questions intros said "a failure sets error". They now say it's set when Base44 refuses the request, or when the backend fails before Base44 has the prompt or answer. A question reopens only in that case.

Examples

  • sendMessage() has two tabs. One is a route handler that forwards the request. The other is a server action that races the request against 3 seconds and logs a failure that arrives later, modeled on waitForRefusal in base44-platform-starter.
  • submitToolCallInput() has a route handler that forwards tool_call_id, action, and extra_user_input. extra_user_input is now a documented field on Submit tool-call input, and message_id stays private, so the example leaves it out.

Each route checks in a comment that the signed-in user may use the app before forwarding anything.

All three examples type-check in strict mode. npm test in packages/platform passes, and the docs build has no warnings.

After this merges, the Platform SDK reference needs regenerating in mintlify-docs. @base44/platform 0.6.0 is already published.

🤖 Generated with Claude Code

…xamples for sendMessage and submitToolCallInput

#354 changed how a send or an answer ends, so the intros that said a failure
sets `error` now say when it does. The Backend calls closing paragraph is split
into the route-handler case and the server-action case, without colons.

sendMessage() gets a route handler and a server action that waits a few seconds
for a refusal, modeled on the starter's waitForRefusal. submitToolCallInput()
gets a route handler that forwards extra_user_input, which Submit tool-call
input now documents.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available! (@base44/platform)


Install this PR's preview build with npm:

npm i @base44-preview/platform@0.6.0-pr.356.0052aed

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/platform:

npm i "@base44/platform@npm:@base44-preview/platform@0.6.0-pr.356.0052aed"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/platform": "npm:@base44-preview/platform@0.6.0-pr.356.0052aed"
  }
}

Preview published to npm registry — try new features instantly!

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.57-pr.356.0052aed

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.57-pr.356.0052aed"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.57-pr.356.0052aed"
  }
}

Preview published to npm registry — try new features instantly!

@wixysam
wixysam merged commit 2f3e6ec into main Oct 29, 2026
8 checks passed
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.

2 participants