-
Notifications
You must be signed in to change notification settings - Fork 2
fix: resolve CI build errors in types, console, and fields packages #1154
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ import { useObjectChat } from './useObjectChat'; | |
| * - Uses @ai-sdk/react for SSE streaming, tool-calling, and production-grade chat | ||
| * - Connects to service-ai backend (e.g., /api/v1/ai/chat) | ||
| * - Supports streaming, stop, reload, clear actions | ||
| * - Schema fields: api, conversationId, systemPrompt, model, streamingEnabled, headers, body, maxToolRoundtrips | ||
| * - Schema fields: api, conversationId, systemPrompt, model, streamingEnabled, headers, requestBody, maxToolRoundtrips | ||
| * | ||
| * **Legacy Mode** (when `api` is not set): | ||
| * - Local auto-response for demo/playground use | ||
|
|
@@ -57,7 +57,7 @@ ComponentRegistry.register('chatbot', | |
| model: schema.model, | ||
| streamingEnabled: schema.streamingEnabled, | ||
| headers: schema.headers, | ||
| body: schema.body, | ||
| body: schema.requestBody, | ||
| maxToolRoundtrips: schema.maxToolRoundtrips, | ||
|
Comment on lines
57
to
61
|
||
| onError: schema.onError, | ||
| showTimestamp: schema.showTimestamp, | ||
|
|
@@ -260,7 +260,7 @@ ComponentRegistry.register('chatbot-enhanced', | |
| model: schema.model, | ||
| streamingEnabled: schema.streamingEnabled, | ||
| headers: schema.headers, | ||
| body: schema.body, | ||
| body: schema.requestBody, | ||
| maxToolRoundtrips: schema.maxToolRoundtrips, | ||
| onError: schema.onError, | ||
| showTimestamp: schema.showTimestamp, | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -528,7 +528,7 @@ export interface ChatbotSchema extends BaseSchema { | |||||
| /** | ||||||
| * Additional body parameters to include with each API request. | ||||||
|
||||||
| * Additional body parameters to include with each API request. | |
| * Additional request body parameters to include with each API request. |
Copilot
AI
Mar 31, 2026
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.
ChatbotSchema was renamed to requestBody, but the runtime Zod validator for Chatbot still defines an API body field (and overrides BaseSchema.body). This leaves validation/JSON-schema behavior inconsistent with the TypeScript interface and reintroduces the same conceptual conflict at runtime (child nodes vs HTTP body params). Update the Zod ChatbotSchema to use requestBody (and keep BaseSchema.body for child schema nodes) so validated schemas match the published types.
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.
Casting
field.typetoDesignerFieldTypebypasses type safety without ensuring the value is actually one of the supported field types. Since this comes from loose API metadata (type?: string), it would be safer to validate/narrow the value (e.g., via a small type guard / allowlist) and fall back to'text'when unknown, instead of asserting.