@agent-native/core 0.36.0 → 0.37.1

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.
Files changed (50) hide show
  1. package/dist/agent/production-agent.d.ts.map +1 -1
  2. package/dist/agent/production-agent.js +72 -10
  3. package/dist/agent/production-agent.js.map +1 -1
  4. package/dist/cli/skills.d.ts.map +1 -1
  5. package/dist/cli/skills.js +78 -0
  6. package/dist/cli/skills.js.map +1 -1
  7. package/dist/client/AssistantChat.d.ts.map +1 -1
  8. package/dist/client/AssistantChat.js +8 -4
  9. package/dist/client/AssistantChat.js.map +1 -1
  10. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  11. package/dist/client/MultiTabAssistantChat.js +14 -10
  12. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  13. package/dist/client/composer/TiptapComposer.js +1 -1
  14. package/dist/client/composer/TiptapComposer.js.map +1 -1
  15. package/dist/client/composer/extensions/SkillReference.js +1 -1
  16. package/dist/client/composer/extensions/SkillReference.js.map +1 -1
  17. package/dist/client/dynamic-suggestions.d.ts +13 -7
  18. package/dist/client/dynamic-suggestions.d.ts.map +1 -1
  19. package/dist/client/dynamic-suggestions.js +23 -12
  20. package/dist/client/dynamic-suggestions.js.map +1 -1
  21. package/dist/client/index.d.ts +1 -0
  22. package/dist/client/index.d.ts.map +1 -1
  23. package/dist/client/index.js +1 -0
  24. package/dist/client/index.js.map +1 -1
  25. package/dist/client/resources/ResourcesPanel.js +2 -2
  26. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  27. package/dist/client/route-state.d.ts +116 -0
  28. package/dist/client/route-state.d.ts.map +1 -0
  29. package/dist/client/route-state.js +205 -0
  30. package/dist/client/route-state.js.map +1 -0
  31. package/dist/resources/store.js +4 -4
  32. package/dist/resources/store.js.map +1 -1
  33. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  34. package/dist/server/agent-chat-plugin.js +92 -56
  35. package/dist/server/agent-chat-plugin.js.map +1 -1
  36. package/dist/server/agents-bundle.d.ts +6 -4
  37. package/dist/server/agents-bundle.d.ts.map +1 -1
  38. package/dist/server/agents-bundle.js +20 -12
  39. package/dist/server/agents-bundle.js.map +1 -1
  40. package/dist/templates/default/AGENTS.md +16 -8
  41. package/dist/templates/default/app/hooks/use-navigation-state.ts +10 -76
  42. package/dist/vite/agents-bundle-plugin.d.ts.map +1 -1
  43. package/dist/vite/agents-bundle-plugin.js +16 -6
  44. package/dist/vite/agents-bundle-plugin.js.map +1 -1
  45. package/docs/content/context-awareness.md +90 -48
  46. package/docs/content/creating-templates.md +22 -1
  47. package/docs/content/workspace.md +3 -3
  48. package/package.json +2 -1
  49. package/src/templates/default/AGENTS.md +16 -8
  50. package/src/templates/default/app/hooks/use-navigation-state.ts +10 -76
@@ -6,7 +6,7 @@ import ReactMarkdown, { defaultUrlTransform } from "react-markdown";
6
6
  import remarkGfm from "remark-gfm";
7
7
  import { createAgentChatAdapter, } from "./agent-chat-adapter.js";
8
8
  import { appendAgentChatContextToMessage, formatAgentChatContextItemsForPrompt, normalizeAgentChatContextItem, publishAgentChatContextItems, refreshAgentChatContext, } from "./agent-chat.js";
9
- import { useAgentDynamicSuggestions, } from "./dynamic-suggestions.js";
9
+ import { useAgentDynamicSuggestionsResult, } from "./dynamic-suggestions.js";
10
10
  import { initialSmoothStreamingGraphemeCount, SMOOTH_STREAMING_COMMIT_INTERVAL_MS, smoothStreamingPunctuationDelayMs, smoothStreamingRevealCount, splitStreamingTextGraphemes, } from "../shared/streaming-text-smoothing.js";
11
11
  import { getActiveRun } from "./active-run-state.js";
12
12
  import { AgentAutoContinueSignal, readSSEStreamRaw, } from "./sse-event-processor.js";
@@ -1949,13 +1949,16 @@ function ensureMessageMetadata(repo) {
1949
1949
  // Re-export for backwards compatibility
1950
1950
  import { extractThreadMeta, normalizeThreadRepository, } from "../agent/thread-data-builder.js";
1951
1951
  export { extractThreadMeta };
1952
+ function EmptyStateSuggestionSkeleton() {
1953
+ return (_jsxs("div", { className: "flex w-full max-w-[280px] flex-col gap-1.5", "aria-hidden": "true", children: [_jsx("div", { className: "h-12 w-full rounded-lg border border-border bg-muted/60 animate-pulse" }), _jsx("div", { className: "h-12 w-full rounded-lg border border-border bg-muted/60 animate-pulse" }), _jsx("div", { className: "h-12 w-full rounded-lg border border-border bg-muted/60 animate-pulse" })] }));
1954
+ }
1952
1955
  const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateText, suggestions, dynamicSuggestions, emptyStateAddon, showHeader = true, onSwitchToCli, className, apiUrl, tabId, browserTabId, threadId, contextScope, isActiveComposer = true, onMessageCountChange, onSaveThread, onGenerateTitle, composerSlot, composerAreaClassName, composerPlaceholder, composerLayoutVariant = "default", centerComposerWhenEmpty = false, emptyStateDisplay = "default", composerToolbarSlot, composerExtraActionButton, composerDisabled = false, composerDisabledPlaceholder, isNewThread, onSlashCommand, execMode, onExecModeChange, planModeDisabled, planModeDisabledReason, selectedModel, defaultModel, selectedEngine, selectedEffort, availableModels, onModelChange, onEffortChange, onForkChat, onConnectProvider, plusMenuMode = "full", providerStatusChecksEnabled = true, loadHistoryRepository, historyReloadKey, externalStreaming = false, }, ref) {
1953
1956
  const thread = useThread();
1954
1957
  const threadRuntime = useThreadRuntime();
1955
1958
  const composerRuntime = useComposerRuntime();
1956
1959
  const isRuntimeRunning = thread.isRunning;
1957
1960
  const messages = thread.messages;
1958
- const resolvedSuggestions = useAgentDynamicSuggestions({
1961
+ const { suggestions: resolvedSuggestions, isLoading: suggestionsLoading } = useAgentDynamicSuggestionsResult({
1959
1962
  staticSuggestions: suggestions,
1960
1963
  dynamicSuggestions,
1961
1964
  browserTabId,
@@ -3248,12 +3251,13 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
3248
3251
  ? "text-xs text-background bg-foreground hover:opacity-90 px-3 py-1.5 rounded-md"
3249
3252
  : "text-xs text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md border border-border hover:bg-accent", children: "Refresh chat" })] })] })) : missingApiKey && messages.length === 0 ? (_jsx("div", { className: "flex flex-col items-center justify-center h-full px-2", children: _jsx(BuilderSetupCard, { onConnected: handleBuilderConnected, bouncePulse: missingKeyBouncePulse }) })) : isRestoring ? (_jsxs("div", { className: "flex flex-col gap-3 p-4", children: [_jsx("div", { className: "flex justify-end", children: _jsx("div", { className: "h-8 w-32 rounded-lg bg-muted animate-pulse" }) }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx("div", { className: "h-4 w-48 rounded bg-muted animate-pulse" }), _jsx("div", { className: "h-4 w-64 rounded bg-muted animate-pulse" }), _jsx("div", { className: "h-4 w-40 rounded bg-muted animate-pulse" })] })] })) : messages.length === 0 && !isReconnecting ? (_jsxs("div", { className: cn("agent-empty-state", emptyStateDisplay === "hidden"
3250
3253
  ? "sr-only"
3251
- : "flex h-full flex-col items-center justify-center gap-4 px-4 py-16"), children: [_jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-muted", children: _jsx(IconMessage, { className: "h-5 w-5 text-muted-foreground" }) }), _jsx("p", { className: "text-sm text-muted-foreground text-center max-w-[240px]", children: emptyStateText ?? "How can I help you?" }), emptyStateAddon, resolvedSuggestions && resolvedSuggestions.length > 0 && (_jsx("div", { className: "flex flex-col gap-1.5 w-full max-w-[280px]", children: resolvedSuggestions.map((suggestion) => (_jsx("button", { onClick: () => {
3254
+ : "flex h-full flex-col items-center justify-center gap-4 px-4 py-16"), children: [_jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-muted", children: _jsx(IconMessage, { className: "h-5 w-5 text-muted-foreground" }) }), _jsx("p", { className: "sr-only", children: emptyStateText ?? "How can I help you?" }), emptyStateAddon, suggestionsLoading ? (_jsx(EmptyStateSuggestionSkeleton, {})) : resolvedSuggestions &&
3255
+ resolvedSuggestions.length > 0 ? (_jsx("div", { className: "flex flex-col gap-1.5 w-full max-w-[280px]", children: resolvedSuggestions.map((suggestion) => (_jsx("button", { onClick: () => {
3252
3256
  threadRuntime.append({
3253
3257
  role: "user",
3254
3258
  content: [{ type: "text", text: suggestion }],
3255
3259
  });
3256
- }, className: "w-full rounded-lg border border-border px-3 py-2 text-left text-[13px] text-muted-foreground hover:bg-accent hover:text-foreground", children: suggestion }, suggestion))) }))] })) : (_jsxs("div", { className: "agent-thread-content flex flex-col gap-4 px-4 py-4", children: [_jsx(AssistantMessageListErrorBoundary, { resetKey: messageListResetKey, children: _jsx(ThreadPrimitive.Messages, { components: {
3260
+ }, className: "w-full rounded-lg border border-border px-3 py-2 text-left text-[13px] text-muted-foreground hover:bg-accent hover:text-foreground", children: suggestion }, suggestion))) })) : null] })) : (_jsxs("div", { className: "agent-thread-content flex flex-col gap-4 px-4 py-4", children: [_jsx(AssistantMessageListErrorBoundary, { resetKey: messageListResetKey, children: _jsx(ThreadPrimitive.Messages, { components: {
3257
3261
  UserMessage,
3258
3262
  AssistantMessage,
3259
3263
  } }) }), missingApiKey && (_jsx(BuilderSetupCard, { onConnected: handleBuilderConnected, bouncePulse: missingKeyBouncePulse })), visibleLoopLimit && !showRunningInUI && (_jsx(LoopLimitContinueCard, { info: visibleLoopLimit, onContinue: () => {