@agent-native/core 0.193.0 → 0.193.1-nightly-20260926224948
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +1 -1
- package/corpus/templates/assets/changelog/2026-09-26-builder-is-the-primary-first-run-setup.md +6 -0
- package/corpus/templates/chat/app/components/chat/ChatRouteContent.tsx +93 -0
- package/corpus/templates/chat/app/i18n/en-US.ts +2 -0
- package/corpus/templates/chat/changelog/2026-09-26-builder-setup-retry.md +6 -0
- package/corpus/templates/clips/changelog/2026-09-26-builder-is-the-primary-first-run-setup.md +6 -0
- package/corpus/templates/content/app/hooks/use-content-recent.ts +137 -16
- package/corpus/templates/content/changelog/2026-09-26-empty-recent-list.md +6 -0
- package/corpus/templates/design/changelog/2026-09-26-builder-is-the-primary-first-run-setup.md +6 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +9 -8
- package/corpus/templates/mail/app/components/layout/HeaderActions.tsx +2 -2
- package/corpus/templates/mail/changelog/2026-09-26-fixed-an-inbox-crash-when-the-sidebar-is-pinned.md +6 -0
- package/corpus/templates/slides/changelog/2026-09-26-builder-is-the-primary-first-run-setup.md +6 -0
- package/dist/automation/index.d.ts +1 -1
- package/dist/client/AgentPanel.js +3 -2
- package/dist/client/agent-chat/index.d.ts +1 -1
- package/dist/client/agent-chat/index.js +1 -1
- package/dist/client/chat/agentkit-protocol.js +18 -1
- package/dist/client/chat/run-recovery.d.ts +1 -0
- package/dist/client/chat/run-recovery.js +1 -1
- package/dist/client/onboarding/FirstRunOnboarding.js +59 -22
- package/dist/client/ui/AppSidebar.d.ts +2 -1
- package/dist/client/ui/AppSidebar.js +11 -2
- package/dist/client/ui/index.d.ts +1 -1
- package/dist/client/ui/index.js +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/localization/core-messages/ar-SA.js +1 -0
- package/dist/localization/core-messages/de-DE.js +1 -0
- package/dist/localization/core-messages/en-US.d.ts +1 -0
- package/dist/localization/core-messages/en-US.js +1 -0
- package/dist/localization/core-messages/es-ES.js +1 -0
- package/dist/localization/core-messages/fr-FR.js +1 -0
- package/dist/localization/core-messages/hi-IN.js +1 -0
- package/dist/localization/core-messages/ja-JP.js +1 -0
- package/dist/localization/core-messages/ko-KR.js +1 -0
- package/dist/localization/core-messages/pt-BR.js +1 -0
- package/dist/localization/core-messages/zh-CN.js +1 -0
- package/dist/localization/core-messages/zh-TW.js +1 -0
- package/dist/localization/core-messages.d.ts +1 -0
- package/dist/observability/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-engine-ollama-models-route.d.ts +1 -1
- package/dist/server/core-routes-plugin.d.ts +1 -1
- package/dist/templates/chat/app/components/chat/ChatRouteContent.tsx +93 -0
- package/dist/templates/chat/app/i18n/ar-SA.ts +1 -0
- package/dist/templates/chat/app/i18n/de-DE.ts +2 -0
- package/dist/templates/chat/app/i18n/en-US.ts +2 -0
- package/dist/templates/chat/app/i18n/es-ES.ts +2 -0
- package/dist/templates/chat/app/i18n/fr-FR.ts +2 -0
- package/dist/templates/chat/app/i18n/hi-IN.ts +2 -0
- package/dist/templates/chat/app/i18n/ja-JP.ts +2 -0
- package/dist/templates/chat/app/i18n/ko-KR.ts +2 -0
- package/dist/templates/chat/app/i18n/pt-BR.ts +2 -0
- package/dist/templates/chat/app/i18n/zh-CN.ts +1 -0
- package/dist/templates/chat/app/i18n/zh-TW.ts +1 -0
- package/dist/templates/chat/changelog/2026-09-26-builder-setup-retry.md +6 -0
- package/package.json +1 -1
- package/src/templates/chat/app/components/chat/ChatRouteContent.tsx +93 -0
- package/src/templates/chat/app/i18n/ar-SA.ts +1 -0
- package/src/templates/chat/app/i18n/de-DE.ts +2 -0
- package/src/templates/chat/app/i18n/en-US.ts +2 -0
- package/src/templates/chat/app/i18n/es-ES.ts +2 -0
- package/src/templates/chat/app/i18n/fr-FR.ts +2 -0
- package/src/templates/chat/app/i18n/hi-IN.ts +2 -0
- package/src/templates/chat/app/i18n/ja-JP.ts +2 -0
- package/src/templates/chat/app/i18n/ko-KR.ts +2 -0
- package/src/templates/chat/app/i18n/pt-BR.ts +2 -0
- package/src/templates/chat/app/i18n/zh-CN.ts +1 -0
- package/src/templates/chat/app/i18n/zh-TW.ts +1 -0
- package/src/templates/chat/changelog/2026-09-26-builder-setup-retry.md +6 -0
|
@@ -34,6 +34,8 @@ const messages = {
|
|
|
34
34
|
pinChat: "Fixar chat",
|
|
35
35
|
pinned: "Fixados",
|
|
36
36
|
recents: "Recentes",
|
|
37
|
+
retryPreviousRequest:
|
|
38
|
+
"Tente novamente minha solicitação anterior agora que o provedor do modelo está conectado.",
|
|
37
39
|
renameChat: "Renomear chat",
|
|
38
40
|
renameFailed: "Falha ao renomear",
|
|
39
41
|
renameThread: "Renomear conversa",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.193.
|
|
3
|
+
"version": "0.193.1-nightly-20260926224948",
|
|
4
4
|
"description": "The agentic application framework for building autonomous agents with intuitive UIs",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -3,6 +3,8 @@ import type {
|
|
|
3
3
|
AgentMessage,
|
|
4
4
|
} from "@agent-native/agentkit";
|
|
5
5
|
import {
|
|
6
|
+
AgentMessageView,
|
|
7
|
+
AgentRunFailure,
|
|
6
8
|
AgentConnectionRequestCard,
|
|
7
9
|
AgentKitChat,
|
|
8
10
|
} from "@agent-native/agentkit/react/components";
|
|
@@ -10,9 +12,14 @@ import {
|
|
|
10
12
|
useAgentKit,
|
|
11
13
|
useAgentKitControl,
|
|
12
14
|
useAgentThread,
|
|
15
|
+
type AgentRunFailureRenderProps,
|
|
13
16
|
type AgentKitRenderProps,
|
|
14
17
|
} from "@agent-native/agentkit/react/context";
|
|
15
18
|
import { AgentKitRoot } from "@agent-native/agentkit/react/root";
|
|
19
|
+
import {
|
|
20
|
+
BuilderSetupCard,
|
|
21
|
+
isMissingLlmProviderRunError,
|
|
22
|
+
} from "@agent-native/core/client/agent-chat";
|
|
16
23
|
import { CoreComposerRuntimeProvider } from "@agent-native/core/client/agentkit-chat/composer";
|
|
17
24
|
import {
|
|
18
25
|
McpAgentKitConnectionRequestCard,
|
|
@@ -120,7 +127,9 @@ function ChatThreadRouteContent({
|
|
|
120
127
|
labels={{ composerPlaceholder: t("chat.composerPlaceholder") }}
|
|
121
128
|
slots={{
|
|
122
129
|
emptyState: ChatEmptyState,
|
|
130
|
+
message: ChatMessage,
|
|
123
131
|
messageSupplement: ChatMcpConnectionSuggestion,
|
|
132
|
+
runFailure: ChatRunFailure,
|
|
124
133
|
connectionRequest: ChatMcpConnectionRequest,
|
|
125
134
|
footer: ChatAgentFooter,
|
|
126
135
|
}}
|
|
@@ -153,6 +162,90 @@ function ChatThreadRouteContent({
|
|
|
153
162
|
);
|
|
154
163
|
}
|
|
155
164
|
|
|
165
|
+
function ChatMessage({ value, threadId }: AgentKitRenderProps<AgentMessage>) {
|
|
166
|
+
const metadata = value.metadata as
|
|
167
|
+
| { custom?: { agentNativeRecoveryAction?: unknown } }
|
|
168
|
+
| undefined;
|
|
169
|
+
const recoveryAction = metadata?.custom?.agentNativeRecoveryAction;
|
|
170
|
+
if (
|
|
171
|
+
value.role === "user" &&
|
|
172
|
+
(recoveryAction === "continue" || recoveryAction === "retry")
|
|
173
|
+
) {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
return <AgentMessageView value={value} threadId={threadId} />;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function ChatRunFailure({
|
|
180
|
+
error,
|
|
181
|
+
runId,
|
|
182
|
+
threadId,
|
|
183
|
+
}: AgentRunFailureRenderProps) {
|
|
184
|
+
const thread = useAgentThread(threadId);
|
|
185
|
+
const { controller } = useAgentKit();
|
|
186
|
+
const t = useT();
|
|
187
|
+
const recoveryMetadata = (message: (typeof thread.messages)[number]) =>
|
|
188
|
+
(
|
|
189
|
+
message.metadata as
|
|
190
|
+
| {
|
|
191
|
+
custom?: {
|
|
192
|
+
agentNativeRecoveryAction?: unknown;
|
|
193
|
+
agentNativeRecoveryOfRunId?: unknown;
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
| undefined
|
|
197
|
+
)?.custom;
|
|
198
|
+
const userRequests = thread.messages.filter((message) => {
|
|
199
|
+
if (message.role !== "user") return false;
|
|
200
|
+
const action = recoveryMetadata(message)?.agentNativeRecoveryAction;
|
|
201
|
+
return action !== "continue" && action !== "retry";
|
|
202
|
+
});
|
|
203
|
+
const originalRequest = userRequests[0];
|
|
204
|
+
const hasRetryForThisRun = thread.messages.some(
|
|
205
|
+
(message) =>
|
|
206
|
+
recoveryMetadata(message)?.agentNativeRecoveryAction === "retry" &&
|
|
207
|
+
recoveryMetadata(message)?.agentNativeRecoveryOfRunId === runId,
|
|
208
|
+
);
|
|
209
|
+
const retryFirstMessage = useCallback(() => {
|
|
210
|
+
const prompt =
|
|
211
|
+
originalRequest?.parts
|
|
212
|
+
.filter((part) => part.type === "text")
|
|
213
|
+
.map((part) => part.text)
|
|
214
|
+
.join("\n") ?? "";
|
|
215
|
+
const attachments =
|
|
216
|
+
originalRequest?.parts.filter((part) => part.type === "file") ?? [];
|
|
217
|
+
void controller.sendMessage({
|
|
218
|
+
threadId,
|
|
219
|
+
text: prompt || t("chat.retryPreviousRequest"),
|
|
220
|
+
...(attachments.length ? { attachments } : {}),
|
|
221
|
+
metadata: {
|
|
222
|
+
custom: {
|
|
223
|
+
agentNativeRecoveryAction: "retry",
|
|
224
|
+
agentNativeRecoveryOfRunId: runId,
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
}, [controller, originalRequest, runId, t, threadId]);
|
|
229
|
+
const isFirstMessage = userRequests.length === 1 && !hasRetryForThisRun;
|
|
230
|
+
if (
|
|
231
|
+
isFirstMessage &&
|
|
232
|
+
isMissingLlmProviderRunError({
|
|
233
|
+
message: error.message,
|
|
234
|
+
details: typeof error.details === "string" ? error.details : undefined,
|
|
235
|
+
errorCode: error.code,
|
|
236
|
+
})
|
|
237
|
+
) {
|
|
238
|
+
return (
|
|
239
|
+
<BuilderSetupCard
|
|
240
|
+
fullWidth
|
|
241
|
+
layout="sidebar"
|
|
242
|
+
onRetry={retryFirstMessage}
|
|
243
|
+
/>
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
return <AgentRunFailure error={error} runId={runId} threadId={threadId} />;
|
|
247
|
+
}
|
|
248
|
+
|
|
156
249
|
function ChatLifecycleTracking({ threadId }: { threadId: string }) {
|
|
157
250
|
const thread = useAgentThread(threadId);
|
|
158
251
|
const lifecycleRef = useRef({
|
|
@@ -32,6 +32,7 @@ const messages = {
|
|
|
32
32
|
pinChat: "تثبيت المحادثة",
|
|
33
33
|
pinned: "المثبتة",
|
|
34
34
|
recents: "الأخيرة",
|
|
35
|
+
retryPreviousRequest: "أعِد محاولة طلبي السابق الآن بعد توصيل مزود النموذج.",
|
|
35
36
|
renameChat: "إعادة تسمية المحادثة",
|
|
36
37
|
renameFailed: "فشلت إعادة التسمية",
|
|
37
38
|
renameThread: "إعادة تسمية السلسلة",
|
|
@@ -34,6 +34,8 @@ const messages = {
|
|
|
34
34
|
pinChat: "Chat anheften",
|
|
35
35
|
pinned: "Angepinnt",
|
|
36
36
|
recents: "Kürzlich",
|
|
37
|
+
retryPreviousRequest:
|
|
38
|
+
"Wiederhole meine vorherige Anfrage, jetzt wo der KI-Anbieter verbunden ist.",
|
|
37
39
|
renameChat: "Chat umbenennen",
|
|
38
40
|
renameFailed: "Umbenennen fehlgeschlagen",
|
|
39
41
|
renameThread: "Thread umbenennen",
|
|
@@ -33,6 +33,8 @@ const messages = {
|
|
|
33
33
|
pinChat: "Pin Chat",
|
|
34
34
|
pinned: "Pinned",
|
|
35
35
|
recents: "Recents",
|
|
36
|
+
retryPreviousRequest:
|
|
37
|
+
"Retry my previous request now that the model provider is connected.",
|
|
36
38
|
renameChat: "Rename Chat",
|
|
37
39
|
renameFailed: "Rename Failed",
|
|
38
40
|
renameThread: "Rename Thread",
|
|
@@ -34,6 +34,8 @@ const messages = {
|
|
|
34
34
|
pinChat: "Fijar chat",
|
|
35
35
|
pinned: "Fijados",
|
|
36
36
|
recents: "Recientes",
|
|
37
|
+
retryPreviousRequest:
|
|
38
|
+
"Reintenta mi solicitud anterior ahora que el proveedor del modelo está conectado.",
|
|
37
39
|
renameChat: "Renombrar chat",
|
|
38
40
|
renameFailed: "No se pudo renombrar",
|
|
39
41
|
renameThread: "Renombrar hilo",
|
|
@@ -34,6 +34,8 @@ const messages = {
|
|
|
34
34
|
pinChat: "Épingler le chat",
|
|
35
35
|
pinned: "Épinglés",
|
|
36
36
|
recents: "Récents",
|
|
37
|
+
retryPreviousRequest:
|
|
38
|
+
"Réessaie ma demande précédente maintenant que le fournisseur du modèle est connecté.",
|
|
37
39
|
renameChat: "Renommer le chat",
|
|
38
40
|
renameFailed: "Échec du renommage",
|
|
39
41
|
renameThread: "Renommer le fil",
|
|
@@ -32,6 +32,8 @@ const messages = {
|
|
|
32
32
|
pinChat: "चैट पिन करें",
|
|
33
33
|
pinned: "पिन की गई",
|
|
34
34
|
recents: "हाल की",
|
|
35
|
+
retryPreviousRequest:
|
|
36
|
+
"मेरा पिछला अनुरोध फिर से आज़माएँ, अब जबकि मॉडल प्रदाता कनेक्ट हो गया है।",
|
|
35
37
|
renameChat: "चैट का नाम बदलें",
|
|
36
38
|
renameFailed: "नाम बदलना विफल",
|
|
37
39
|
renameThread: "थ्रेड का नाम बदलें",
|
|
@@ -34,6 +34,8 @@ const messages = {
|
|
|
34
34
|
pinChat: "Fixar chat",
|
|
35
35
|
pinned: "Fixados",
|
|
36
36
|
recents: "Recentes",
|
|
37
|
+
retryPreviousRequest:
|
|
38
|
+
"Tente novamente minha solicitação anterior agora que o provedor do modelo está conectado.",
|
|
37
39
|
renameChat: "Renomear chat",
|
|
38
40
|
renameFailed: "Falha ao renomear",
|
|
39
41
|
renameThread: "Renomear conversa",
|