@agent-native/core 0.149.1 → 0.149.2

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 (115) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +2 -0
  3. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +150 -46
  4. package/corpus/templates/analytics/app/global.css +1 -1
  5. package/corpus/templates/analytics/app/i18n-data.ts +37 -0
  6. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +1 -1
  7. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +32 -0
  8. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +2 -0
  9. package/corpus/templates/analytics/changelog/2026-08-10-dashboard-tables-can-be-copied-and-sorted-by-multiple-column.md +6 -0
  10. package/corpus/templates/analytics/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  11. package/corpus/templates/assets/app/global.css +1 -1
  12. package/corpus/templates/assets/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  13. package/corpus/templates/brain/app/global.css +1 -1
  14. package/corpus/templates/brain/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  15. package/corpus/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  16. package/corpus/templates/clips/changelog/2026-08-10-clips-desktop-sign-in-now-starts-with-magic-links-and-google.md +6 -0
  17. package/corpus/templates/clips/chrome-extension/src/overlay.css +1 -0
  18. package/corpus/templates/clips/desktop/src/app.tsx +274 -137
  19. package/corpus/templates/clips/desktop/src/styles.css +35 -0
  20. package/corpus/templates/content/app/global.css +1 -0
  21. package/corpus/templates/crm/app/global.css +1 -1
  22. package/corpus/templates/crm/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  23. package/corpus/templates/dispatch/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  24. package/corpus/templates/factory/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  25. package/corpus/templates/forms/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  26. package/corpus/templates/plan/app/global.css +1 -0
  27. package/corpus/templates/plan/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  28. package/corpus/templates/plan/server/ui-plan-html.ts +4 -1
  29. package/corpus/templates/slides/AGENTS.md +11 -10
  30. package/corpus/templates/slides/actions/add-deck.ts +2 -0
  31. package/corpus/templates/slides/actions/add-slide.ts +15 -1
  32. package/corpus/templates/slides/actions/create-deck.ts +18 -6
  33. package/corpus/templates/slides/actions/get-deck.ts +29 -1
  34. package/corpus/templates/slides/actions/patch-deck.ts +122 -9
  35. package/corpus/templates/slides/actions/save-deck.ts +24 -1
  36. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +134 -618
  37. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +69 -60
  38. package/corpus/templates/slides/app/components/editor/GeneratingSlidePreview.tsx +1 -1
  39. package/corpus/templates/slides/app/components/editor/GoogleDriveConnectionCta.tsx +13 -1
  40. package/corpus/templates/slides/app/components/editor/NewDeckReferenceStep.tsx +56 -174
  41. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +239 -116
  42. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +3 -3
  43. package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +1 -1
  44. package/corpus/templates/slides/app/components/layout/Layout.tsx +34 -35
  45. package/corpus/templates/slides/app/components/layout/layout-route-policy.ts +2 -5
  46. package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +45 -40
  47. package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +63 -16
  48. package/corpus/templates/slides/app/hooks/use-generating-slide-preview.ts +25 -3
  49. package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
  50. package/corpus/templates/slides/app/lib/create-deck-generation.ts +5 -4
  51. package/corpus/templates/slides/app/lib/recent-references.ts +23 -1
  52. package/corpus/templates/slides/app/lib/slide-animation-elements.ts +41 -3
  53. package/corpus/templates/slides/app/pages/DeckEditor.tsx +4 -27
  54. package/corpus/templates/slides/app/pages/Index.tsx +240 -89
  55. package/corpus/templates/slides/changelog/2026-08-10-ai-editing-avatar-badge.md +6 -0
  56. package/corpus/templates/slides/changelog/2026-08-10-generated-decks-keep-a-clear-human-readable-title.md +6 -0
  57. package/corpus/templates/slides/changelog/2026-08-10-new-deck-creation-now-shows-progress-opens-the-editor-direct.md +6 -0
  58. package/corpus/templates/slides/changelog/2026-08-10-presentation-reveals-now-follow-valid-targets.md +6 -0
  59. package/corpus/templates/slides/changelog/2026-08-10-slides-editing-controls-are-consolidated-into-one-focused-me.md +6 -0
  60. package/corpus/templates/slides/changelog/2026-08-10-slides-now-verify-and-restyle-every-imported-slide-in-one-pa.md +6 -0
  61. package/corpus/templates/slides/changelog/2026-08-10-slides-only-suggests-a-google-connection-for-relevant-reques.md +6 -0
  62. package/corpus/templates/slides/changelog/2026-08-10-the-google-slides-import-option-is-now-labeled-slides.md +6 -0
  63. package/corpus/templates/slides/server/lib/chat-attachments.ts +1 -1
  64. package/corpus/templates/slides/server/plugins/agent-chat.ts +5 -3
  65. package/corpus/templates/slides/shared/api.ts +2 -1
  66. package/corpus/templates/slides/shared/deck-title.ts +135 -0
  67. package/corpus/templates/tasks/app/components/tasks/TaskListRow.tsx +4 -1
  68. package/dist/agent/engine/ai-sdk-engine.js +1 -1
  69. package/dist/agent/production-agent.d.ts +21 -1
  70. package/dist/agent/production-agent.js +129 -10
  71. package/dist/agent/tool-approval-store.d.ts +18 -0
  72. package/dist/agent/tool-approval-store.js +122 -0
  73. package/dist/agent/types.d.ts +1 -1
  74. package/dist/cli/code-agent-executor.js +11 -2
  75. package/dist/client/AgentPanel.js +31 -6
  76. package/dist/client/AssistantChat.d.ts +3 -2
  77. package/dist/client/AssistantChat.js +7 -20
  78. package/dist/client/agent-chat/index.d.ts +1 -1
  79. package/dist/client/agent-chat-adapter.js +11 -0
  80. package/dist/client/agent-chat.d.ts +1 -1
  81. package/dist/client/chat/markdown-renderer.js +14 -2
  82. package/dist/client/chat/message-components.d.ts +6 -2
  83. package/dist/client/chat/message-components.js +25 -47
  84. package/dist/client/chat/tool-call-display.d.ts +3 -5
  85. package/dist/client/chat/tool-call-display.js +7 -212
  86. package/dist/client/chat-first/apps-rail.js +3 -3
  87. package/dist/client/chat-first/browser-pane.js +4 -1
  88. package/dist/client/chat-first/chat-history.d.ts +3 -1
  89. package/dist/client/chat-first/chat-history.js +2 -2
  90. package/dist/client/chat-first/surface-tabs.d.ts +1 -1
  91. package/dist/client/chat-first/surface-tabs.js +52 -41
  92. package/dist/client/chat-first/types.d.ts +3 -0
  93. package/dist/client/chat-first.d.ts +10 -0
  94. package/dist/client/chat-first.js +37 -2
  95. package/dist/client/components/ui/message-scroller.js +4 -1
  96. package/dist/client/i18n.js +3 -1
  97. package/dist/client/resources/McpConnectionSuggestion.js +9 -1
  98. package/dist/client/sse-event-processor.js +10 -0
  99. package/dist/client/use-chat-models.js +156 -80
  100. package/dist/collab/struct-routes.d.ts +1 -1
  101. package/dist/integrations/webhook-handler.js +1 -1
  102. package/dist/observability/routes.d.ts +1 -1
  103. package/dist/provider-api/actions/custom-provider-registration.d.ts +1 -1
  104. package/dist/resources/handlers.d.ts +1 -1
  105. package/dist/secrets/routes.d.ts +9 -9
  106. package/dist/server/auth.js +262 -31
  107. package/dist/server/onboarding-html.js +56 -9
  108. package/dist/shared/reasoning-effort.d.ts +8 -8
  109. package/dist/shared/reasoning-effort.js +10 -10
  110. package/dist/shared/streaming-text-smoothing.js +41 -11
  111. package/dist/styles/agent-native.css +19 -32
  112. package/dist/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  113. package/docs/content/template-chat.mdx +1 -1
  114. package/package.json +2 -2
  115. package/src/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
@@ -25,7 +25,25 @@ function getSegmenter() {
25
25
  * together with the new suffix, then splice the results in.
26
26
  */
27
27
  const SEGMENTER_OVERLAP = 16; // chars — safely covers any real grapheme cluster
28
- let _segCache = null;
28
+ /**
29
+ * A single shared slot is not enough: an assistant message and each of its
30
+ * streaming reasoning blocks segment concurrently, and with one slot every
31
+ * caller evicts the previous one's entry, so all of them take the full-fallback
32
+ * branch on every call and the incremental path never fires. Keep the few most
33
+ * recent entries so concurrent streams each keep their own.
34
+ */
35
+ const SEGMENTER_CACHE_SLOTS = 8;
36
+ let _segCaches = [];
37
+ /** Move `entry` to the front (most-recently-used) and cap the cache size. */
38
+ function promoteSegmenterCache(entry) {
39
+ const existing = _segCaches.indexOf(entry);
40
+ if (existing !== -1)
41
+ _segCaches.splice(existing, 1);
42
+ _segCaches.unshift(entry);
43
+ if (_segCaches.length > SEGMENTER_CACHE_SLOTS) {
44
+ _segCaches.length = SEGMENTER_CACHE_SLOTS;
45
+ }
46
+ }
29
47
  /**
30
48
  * Split `text` into grapheme clusters.
31
49
  *
@@ -43,13 +61,23 @@ export function splitStreamingTextGraphemes(text) {
43
61
  return Array.from(text);
44
62
  }
45
63
  // Fast path: exact cache hit
46
- if (_segCache && _segCache.text === text) {
47
- return _segCache.graphemes;
64
+ const exact = _segCaches.find((entry) => entry.text === text);
65
+ if (exact) {
66
+ promoteSegmenterCache(exact);
67
+ return exact.graphemes;
68
+ }
69
+ // Incremental path: new text extends one of the cached texts. Prefer the
70
+ // longest match so the re-segmented suffix stays as short as possible.
71
+ let best = null;
72
+ for (const entry of _segCaches) {
73
+ if (!text.startsWith(entry.text))
74
+ continue;
75
+ if (!best || entry.text.length > best.text.length)
76
+ best = entry;
48
77
  }
49
- // Incremental path: new text extends the cached text
50
- if (_segCache && text.startsWith(_segCache.text)) {
51
- const prevLen = _segCache.text.length;
52
- const cached = _segCache.graphemes;
78
+ if (best) {
79
+ const prevLen = best.text.length;
80
+ const cached = best.graphemes;
53
81
  // Walk back over cached graphemes until at least OVERLAP characters have
54
82
  // been released, so the re-segmented suffix starts on a known grapheme
55
83
  // boundary. Slicing at a fixed character offset instead would cut a
@@ -66,12 +94,14 @@ export function splitStreamingTextGraphemes(text) {
66
94
  const suffix = text.slice(overlapStart);
67
95
  const newGraphemes = Array.from(segmenter.segment(suffix), (entry) => entry.segment);
68
96
  const merged = cached.slice(0, stableCount).concat(newGraphemes);
69
- _segCache = { text, graphemes: merged };
97
+ best.text = text;
98
+ best.graphemes = merged;
99
+ promoteSegmenterCache(best);
70
100
  return merged;
71
101
  }
72
- // Full fallback: text is not an append of cached text (reset or replacement)
102
+ // Full fallback: text is not an append of any cached text (reset or replacement)
73
103
  const graphemes = Array.from(segmenter.segment(text), (entry) => entry.segment);
74
- _segCache = { text, graphemes };
104
+ promoteSegmenterCache({ text, graphemes });
75
105
  return graphemes;
76
106
  }
77
107
  /**
@@ -81,7 +111,7 @@ export function splitStreamingTextGraphemes(text) {
81
111
  * but avoids holding a reference to the last message's text string.)
82
112
  */
83
113
  export function resetSegmenterCache() {
84
- _segCache = null;
114
+ _segCaches = [];
85
115
  }
86
116
  export function initialSmoothStreamingGraphemeCount(graphemes) {
87
117
  if (graphemes.length <= SMOOTH_STREAMING_LONG_TEXT_THRESHOLD_GRAPHEMES) {
@@ -153,8 +153,15 @@
153
153
  background: inherit;
154
154
  }
155
155
 
156
- .message-scroller-viewport--top-fade {
157
- --message-scroller-top-fade-size: 48px;
156
+ /* The mask is declared unconditionally and the fade is driven by its size
157
+ variable. Adding/removing a mask changes the element's paint properties, and
158
+ the `--top-fade` modifier flips with `hasContentAbove` — which oscillates
159
+ while a reply streams into an auto-scrolled transcript. Toggling the
160
+ declaration made Chromium tear down and rebuild this scroller's paint state
161
+ on every flip; animating a length inside a mask that is always present does
162
+ not. Keep the fade size at 0 rather than removing the mask. */
163
+ .message-scroller-viewport {
164
+ --message-scroller-top-fade-size: 0px;
158
165
  -webkit-mask-image: linear-gradient(
159
166
  to bottom,
160
167
  transparent 0,
@@ -175,6 +182,10 @@
175
182
  mask-size: 100% 100%;
176
183
  }
177
184
 
185
+ .message-scroller-viewport--top-fade {
186
+ --message-scroller-top-fade-size: 48px;
187
+ }
188
+
178
189
  .agent-sidebar-resize-handle {
179
190
  background: transparent;
180
191
  }
@@ -299,7 +310,11 @@
299
310
  max-width: var(--agent-sidebar-width);
300
311
  height: 100%;
301
312
  transform: var(--agent-sidebar-inner-closed-transform, translateX(100%));
302
- will-change: transform;
313
+ /* No `will-change: transform` here. This element wraps the whole chat
314
+ transcript and stays mounted for the life of the page, so the hint is never
315
+ retired — it pins a permanently composited layer whose backing store grows
316
+ with the transcript. Chromium already promotes a transform transition for
317
+ the 260ms it runs, which is the entire benefit. */
303
318
  transition: transform 260ms var(--ease-drawer);
304
319
  }
305
320
 
@@ -308,7 +323,6 @@
308
323
  when available; these transforms provide the fallback and exit motion. */
309
324
  .agent-sidebar-panel[data-agent-sidebar-animation="drawer"] {
310
325
  overflow: clip;
311
- will-change: transform;
312
326
  --agent-shadow: 0 0% 0%;
313
327
  --agent-shadow-o: 0.14;
314
328
  box-shadow: -12px 0 30px hsl(var(--agent-shadow) / var(--agent-shadow-o));
@@ -337,7 +351,6 @@
337
351
  --agent-sidebar-closed-transform,
338
352
  translateX(calc(100% + 1px))
339
353
  );
340
- will-change: transform;
341
354
  box-shadow: 0 18px 40px hsl(var(--agent-shadow) / var(--agent-shadow-o));
342
355
  transition: transform 260ms var(--ease-drawer);
343
356
  }
@@ -973,20 +986,11 @@
973
986
  }
974
987
 
975
988
  /* Tool-call rows are rendered in several disclosure/grouping shapes as the
976
- stream grows. Keep the motion wrapper layout-transparent, while its short
977
- lived exit clones can travel from the visible stack into the summary row. */
989
+ stream grows. Keep the layout wrapper transparent. */
978
990
  .agent-tool-call-stack {
979
991
  display: contents;
980
992
  }
981
993
 
982
- .agent-tool-call-stack__exit {
983
- box-sizing: border-box;
984
- position: fixed;
985
- z-index: 2;
986
- pointer-events: none;
987
- margin: 0 !important;
988
- }
989
-
990
994
  [data-agent-empty-state="centered"] {
991
995
  justify-content: center;
992
996
  padding-bottom: clamp(3rem, 8vh, 6rem);
@@ -1030,11 +1034,6 @@
1030
1034
  }
1031
1035
 
1032
1036
  @media (prefers-reduced-motion: no-preference) {
1033
- .agent-tool-call--entering > .agent-tool-call__content,
1034
- .agent-tool-call--stack-entering > .agent-tool-call__content {
1035
- animation: agent-tool-call-enter 220ms var(--ease-out-strong) both;
1036
- }
1037
-
1038
1037
  .agent-tool-summary__label {
1039
1038
  display: inline-block;
1040
1039
  }
@@ -1071,18 +1070,6 @@
1071
1070
  }
1072
1071
  }
1073
1072
 
1074
- @keyframes agent-tool-call-enter {
1075
- from {
1076
- opacity: 0;
1077
- transform: translateY(0.375rem);
1078
- }
1079
-
1080
- to {
1081
- opacity: 1;
1082
- transform: translateY(0);
1083
- }
1084
- }
1085
-
1086
1073
  @supports (view-transition-name: agent-native-chat) {
1087
1074
  .agent-native-chat-view-transition {
1088
1075
  contain: layout;
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-08-10
4
+ ---
5
+
6
+ Full-page chat now uses the available width up to 1000px for more comfortable prompts and responses.
@@ -13,7 +13,7 @@ If you want a finished domain product shape, start from [Calendar](/docs/templat
13
13
  <Screen
14
14
  surface="desktop"
15
15
  html={
16
- "<div style='min-height:560px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:56px 40px'><div style='display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;width:min(700px,92%);min-height:430px'><div style='height:34px'></div><div style='text-align:center'><h1 style='margin:0'>How can I help?</h1><p class='wf-muted' style='margin:10px 0 0'>Chat about anything. Add actions, components, pages, jobs, or your own backend.</p></div><div class='wf-card' style='width:100%;min-height:150px;display:flex;flex-direction:column;gap:18px'><span class='wf-muted'>Message the agent...</span><div style='flex:1'></div><div style='display:flex;align-items:center;gap:10px'><span data-icon='plus' aria-label='Attach'></span><div style='flex:1'></div><span class='wf-pill'>GPT-5.6 Luna · Auto</span><span class='wf-pill'>Act</span><button class='primary'>↑</button></div></div><div style='height:34px'></div></div></div>"
16
+ "<div style='min-height:560px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:56px 40px'><div style='display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;width:min(700px,92%);min-height:430px'><div style='height:34px'></div><div style='text-align:center'><h1 style='margin:0'>How can I help?</h1><p class='wf-muted' style='margin:10px 0 0'>Chat about anything. Add actions, components, pages, jobs, or your own backend.</p></div><div class='wf-card' style='width:100%;min-height:150px;display:flex;flex-direction:column;gap:18px'><span class='wf-muted'>Message the agent...</span><div style='flex:1'></div><div style='display:flex;align-items:center;gap:10px'><span data-icon='plus' aria-label='Attach'></span><div style='flex:1'></div><span class='wf-pill'>GPT-5.6 Luna · High</span><span class='wf-pill'>Act</span><button class='primary'>↑</button></div></div><div style='height:34px'></div></div></div>"
17
17
  }
18
18
  />
19
19
  </WireframeBlock>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.149.1",
3
+ "version": "0.149.2",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -414,7 +414,7 @@
414
414
  "yjs": "^13.6.31",
415
415
  "zod": "^4.3.6",
416
416
  "@agent-native/recap-cli": "0.5.4",
417
- "@agent-native/toolkit": "^0.13.8"
417
+ "@agent-native/toolkit": "^0.13.9"
418
418
  },
419
419
  "devDependencies": {
420
420
  "@ai-sdk/anthropic": "^3.0.71",
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-08-10
4
+ ---
5
+
6
+ Full-page chat now uses the available width up to 1000px for more comfortable prompts and responses.