@agent-native/core 0.190.0-nightly-20260926012834 → 0.190.0
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/analytics/CHANGELOG.md +12 -0
- package/corpus/templates/analytics/app/global.css +5 -1
- package/corpus/templates/analytics/changelog/2026-09-25-chat-composer-background.md +6 -0
- package/corpus/templates/calendar/CHANGELOG.md +7 -0
- package/corpus/templates/calendar/app/root.tsx +7 -7
- package/corpus/templates/calendar/app/routes/meet.$username.tsx +8 -0
- package/corpus/templates/calendar/changelog/2026-09-25-booking-links-without-a-meeting-type-now-show-a-not-found-pa.md +6 -0
- package/corpus/templates/clips/CHANGELOG.md +4 -0
- package/corpus/templates/content/app/root.tsx +0 -7
- package/corpus/templates/design/CHANGELOG.md +5 -0
- package/corpus/templates/design/actions/get-design.ts +9 -9
- package/corpus/templates/mail/CHANGELOG.md +13 -0
- package/corpus/templates/mail/app/root.tsx +1 -16
- package/corpus/templates/slides/CHANGELOG.md +8 -0
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +1 -1
- package/corpus/templates/slides/app/hooks/use-agent-generating.ts +76 -0
- package/corpus/templates/slides/app/hooks/use-new-deck-generation.ts +16 -4
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +591 -30
- package/corpus/templates/slides/changelog/2026-09-25-empty-decks-keep-their-retry-option-when-a-retry-cannot-be-s.md +6 -0
- package/corpus/templates/slides/changelog/2026-09-25-prevent-setup-generation-while-figma-indexing-is-in-progress.md +6 -0
- package/dist/automation/index.d.ts +1 -1
- package/dist/client/ErrorBoundary.js +2 -14
- package/dist/client/ErrorReportActions.js +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/org/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-engine-ollama-models-route.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/sharing/actions/list-resource-shares.d.ts +1 -1
- package/package.json +4 -4
package/corpus/README.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable user-facing changes to Agent-Native Analytics are documented here. Open it any
|
|
4
4
|
time from the command menu (Cmd+K → "What's new") or from Settings.
|
|
5
5
|
|
|
6
|
+
## 2026-09-25
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Org admins can review agent runs from Settings
|
|
11
|
+
|
|
12
|
+
### Improved
|
|
13
|
+
|
|
14
|
+
- First-run onboarding records setup choices and Builder connection outcomes
|
|
15
|
+
- Human review previews Analytics dashboards as real charts
|
|
16
|
+
- Relevant metric definitions and saved dashboard examples are available with the first response so Analytics queries can reuse proven definitions and query shapes.
|
|
17
|
+
|
|
6
18
|
## 2026-09-24
|
|
7
19
|
|
|
8
20
|
### Improved
|
|
@@ -385,7 +385,11 @@
|
|
|
385
385
|
.analytics-chat-panel
|
|
386
386
|
[data-agent-empty-state="centered"]
|
|
387
387
|
.agent-composer-root {
|
|
388
|
-
background:
|
|
388
|
+
background: color-mix(
|
|
389
|
+
in srgb,
|
|
390
|
+
hsl(var(--secondary)) 72%,
|
|
391
|
+
color-mix(in srgb, hsl(var(--card)) 97%, hsl(var(--foreground)) 3%)
|
|
392
|
+
);
|
|
389
393
|
box-shadow: none;
|
|
390
394
|
}
|
|
391
395
|
|
|
@@ -9,6 +9,13 @@ time from the command menu (Cmd+K → "What's new") or from Settings.
|
|
|
9
9
|
|
|
10
10
|
- Add Jev invitation rules for auto-accept, auto-decline, and auto-hide with automation status.
|
|
11
11
|
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Booking link previews now show their image in browser-based link preview tools
|
|
15
|
+
- Calendar feeds with the same URL keep their own names and colors.
|
|
16
|
+
- Calendar invitation rules surface expired connections and undo safely without duplicate RSVP updates
|
|
17
|
+
- Restore locally hidden events from activity after disconnecting an account
|
|
18
|
+
|
|
12
19
|
## 2026-09-24
|
|
13
20
|
|
|
14
21
|
### Fixed
|
|
@@ -187,17 +187,17 @@ function ThemeToggleItem() {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
* Public booking routes
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
190
|
+
* Public booking routes must SSR real content for first-visit signed-out users
|
|
191
|
+
* and crawlers. These paths bypass ClientOnly so entry.server.tsx can stream
|
|
192
|
+
* the actual route markup rather than a bare spinner. Auth/private routes are
|
|
193
|
+
* unaffected.
|
|
194
194
|
*/
|
|
195
195
|
function isPublicBookingPath(pathname: string): boolean {
|
|
196
196
|
const p = pathname.replace(/\/+$/, "") || "/";
|
|
197
197
|
return (
|
|
198
|
-
|
|
199
|
-
p
|
|
200
|
-
|
|
198
|
+
/^\/book\/[^/]+(?:\/[^/]+)?$/.test(p) ||
|
|
199
|
+
/^\/meet\/[^/]+\/[^/]+$/.test(p) ||
|
|
200
|
+
/^\/booking\/manage\/[^/]+$/.test(p)
|
|
201
201
|
);
|
|
202
202
|
}
|
|
203
203
|
|
|
@@ -9,6 +9,10 @@ from the command menu (Cmd+K → "What's new") or from Settings.
|
|
|
9
9
|
|
|
10
10
|
- Shared clips remember your sidebar choice and help new viewers understand why to sign up.
|
|
11
11
|
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Signed-in viewers who hit an unavailable, expired, or private share link now land in their library instead of the public marketing page when they choose "Go home."
|
|
15
|
+
|
|
12
16
|
## 2026-09-24
|
|
13
17
|
|
|
14
18
|
### Improved
|
|
@@ -516,13 +516,6 @@ function ContentErrorBoundaryBody() {
|
|
|
516
516
|
>
|
|
517
517
|
Go to page list
|
|
518
518
|
</a>
|
|
519
|
-
<button
|
|
520
|
-
type="button"
|
|
521
|
-
onClick={() => window.location.reload()}
|
|
522
|
-
className="mt-3 inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-border bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm hover:bg-accent"
|
|
523
|
-
>
|
|
524
|
-
Reload
|
|
525
|
-
</button>
|
|
526
519
|
<ErrorReportActions
|
|
527
520
|
appName="Content"
|
|
528
521
|
title={title}
|
|
@@ -9,8 +9,13 @@ from the command menu (Cmd+K → "What's new") or from Settings.
|
|
|
9
9
|
|
|
10
10
|
- Chat messages can be reverted to their autosaved version, including a shortcut to restore the start of a chat.
|
|
11
11
|
|
|
12
|
+
### Improved
|
|
13
|
+
|
|
14
|
+
- Live preview snapshots stay private until an editor signs in and enables collaboration.
|
|
15
|
+
|
|
12
16
|
### Fixed
|
|
13
17
|
|
|
18
|
+
- Live canvas sharing requires an account, with a sign-up path for signed-out owners.
|
|
14
19
|
- Cross-screen moves preserve Flex and Grid sizing through undo and redo.
|
|
15
20
|
- Moving a layer from one live app screen into another now lands it instead of failing with "Could not move that layer", and a failed move no longer leaves the layer stuck to the cursor.
|
|
16
21
|
|
|
@@ -86,24 +86,22 @@ export default defineAction({
|
|
|
86
86
|
eq(schema.designFiles.id, fileId),
|
|
87
87
|
)
|
|
88
88
|
: eq(schema.designFiles.designId, id);
|
|
89
|
+
const fileOrder = [
|
|
90
|
+
asc(schema.designFiles.createdAt),
|
|
91
|
+
asc(schema.designFiles.id),
|
|
92
|
+
] as const;
|
|
89
93
|
const files =
|
|
90
94
|
includeFileContent === false
|
|
91
95
|
? await db
|
|
92
96
|
.select(baseFileFields)
|
|
93
97
|
.from(schema.designFiles)
|
|
94
98
|
.where(fileFilter)
|
|
95
|
-
.orderBy(
|
|
96
|
-
asc(schema.designFiles.createdAt),
|
|
97
|
-
asc(schema.designFiles.id),
|
|
98
|
-
)
|
|
99
|
+
.orderBy(...fileOrder)
|
|
99
100
|
: await db
|
|
100
101
|
.select({ ...baseFileFields, content: schema.designFiles.content })
|
|
101
102
|
.from(schema.designFiles)
|
|
102
103
|
.where(fileFilter)
|
|
103
|
-
.orderBy(
|
|
104
|
-
asc(schema.designFiles.createdAt),
|
|
105
|
-
asc(schema.designFiles.id),
|
|
106
|
-
);
|
|
104
|
+
.orderBy(...fileOrder);
|
|
107
105
|
const designSystem = await loadAgentDesignSystemContext(
|
|
108
106
|
typeof row.designSystemId === "string" ? row.designSystemId : null,
|
|
109
107
|
getDesignSystem,
|
|
@@ -140,7 +138,9 @@ export default defineAction({
|
|
|
140
138
|
id: f.id,
|
|
141
139
|
filename: f.filename,
|
|
142
140
|
fileType: f.fileType,
|
|
143
|
-
...("content" in f
|
|
141
|
+
...(includeFileContent === false || !("content" in f)
|
|
142
|
+
? {}
|
|
143
|
+
: { content: f.content }),
|
|
144
144
|
createdAt: f.createdAt,
|
|
145
145
|
updatedAt: f.updatedAt,
|
|
146
146
|
})),
|
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable user-facing changes to Agent-Native Mail are documented here. Open it any
|
|
4
4
|
time from the command menu (Cmd+K → "What's new") or from Settings.
|
|
5
5
|
|
|
6
|
+
## 2026-09-25
|
|
7
|
+
|
|
8
|
+
### Improved
|
|
9
|
+
|
|
10
|
+
- Tune inbox priorities with Jev, label messages clearly, and teach importance with feedback.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Editing importance rules preserves disabled instructions and recovers from duplicate-rule deletion failures
|
|
15
|
+
- Handle astral Unicode letters in autocomplete word boundaries
|
|
16
|
+
- Keep existing AI filter rules intact when saving a prompt
|
|
17
|
+
- Keep inbox tab counts consistent when switching tabs
|
|
18
|
+
|
|
6
19
|
## 2026-09-24
|
|
7
20
|
|
|
8
21
|
### Improved
|
|
@@ -96,7 +96,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
96
96
|
title: string;
|
|
97
97
|
fallback: string;
|
|
98
98
|
back: string;
|
|
99
|
-
reload: string;
|
|
100
99
|
loading: string;
|
|
101
100
|
sendFeedback: string;
|
|
102
101
|
feedbackPlaceholder: string;
|
|
@@ -107,7 +106,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
107
106
|
title: "Mail could not load this view.",
|
|
108
107
|
fallback: "Something went wrong while loading Mail.",
|
|
109
108
|
back: "Back",
|
|
110
|
-
reload: "Reload",
|
|
111
109
|
loading: "Reloading Mail...",
|
|
112
110
|
sendFeedback: "Send feedback",
|
|
113
111
|
feedbackPlaceholder:
|
|
@@ -118,7 +116,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
118
116
|
title: "Mail 无法加载此视图。",
|
|
119
117
|
fallback: "加载 Mail 时出现问题。",
|
|
120
118
|
back: "返回",
|
|
121
|
-
reload: "重新加载",
|
|
122
119
|
loading: "正在重新加载 Mail...",
|
|
123
120
|
sendFeedback: "发送反馈",
|
|
124
121
|
feedbackPlaceholder: "描述此 Mail 错误出现前发生了什么。",
|
|
@@ -128,7 +125,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
128
125
|
title: "Mail 無法載入此檢視。",
|
|
129
126
|
fallback: "載入 Mail 時發生問題。",
|
|
130
127
|
back: "返回",
|
|
131
|
-
reload: "重新載入",
|
|
132
128
|
loading: "正在重新載入 Mail...",
|
|
133
129
|
sendFeedback: "傳送意見回饋",
|
|
134
130
|
feedbackPlaceholder: "描述此 Mail 錯誤出現前發生了什麼。",
|
|
@@ -138,7 +134,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
138
134
|
title: "Mail no pudo cargar esta vista.",
|
|
139
135
|
fallback: "Algo salió mal al cargar Mail.",
|
|
140
136
|
back: "Atrás",
|
|
141
|
-
reload: "Recargar",
|
|
142
137
|
loading: "Recargando Mail...",
|
|
143
138
|
sendFeedback: "Enviar comentarios",
|
|
144
139
|
feedbackPlaceholder:
|
|
@@ -149,7 +144,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
149
144
|
title: "Mail n'a pas pu charger cette vue.",
|
|
150
145
|
fallback: "Un problème est survenu lors du chargement de Mail.",
|
|
151
146
|
back: "Retour",
|
|
152
|
-
reload: "Recharger",
|
|
153
147
|
loading: "Rechargement de Mail...",
|
|
154
148
|
sendFeedback: "Envoyer un retour",
|
|
155
149
|
feedbackPlaceholder:
|
|
@@ -160,7 +154,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
160
154
|
title: "Mail konnte diese Ansicht nicht laden.",
|
|
161
155
|
fallback: "Beim Laden von Mail ist ein Fehler aufgetreten.",
|
|
162
156
|
back: "Zurück",
|
|
163
|
-
reload: "Neu laden",
|
|
164
157
|
loading: "Mail wird neu geladen...",
|
|
165
158
|
sendFeedback: "Feedback senden",
|
|
166
159
|
feedbackPlaceholder:
|
|
@@ -171,7 +164,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
171
164
|
title: "Mail はこのビューを読み込めませんでした。",
|
|
172
165
|
fallback: "Mail の読み込み中に問題が発生しました。",
|
|
173
166
|
back: "戻る",
|
|
174
|
-
reload: "再読み込み",
|
|
175
167
|
loading: "Mail を再読み込み中...",
|
|
176
168
|
sendFeedback: "フィードバックを送信",
|
|
177
169
|
feedbackPlaceholder:
|
|
@@ -182,7 +174,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
182
174
|
title: "Mail에서 이 보기를 불러올 수 없습니다.",
|
|
183
175
|
fallback: "Mail을 불러오는 중 문제가 발생했습니다.",
|
|
184
176
|
back: "뒤로",
|
|
185
|
-
reload: "새로고침",
|
|
186
177
|
loading: "Mail 새로고침 중...",
|
|
187
178
|
sendFeedback: "피드백 보내기",
|
|
188
179
|
feedbackPlaceholder:
|
|
@@ -193,7 +184,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
193
184
|
title: "O Mail não conseguiu carregar esta visualização.",
|
|
194
185
|
fallback: "Algo deu errado ao carregar o Mail.",
|
|
195
186
|
back: "Voltar",
|
|
196
|
-
reload: "Recarregar",
|
|
197
187
|
loading: "Recarregando o Mail...",
|
|
198
188
|
sendFeedback: "Enviar feedback",
|
|
199
189
|
feedbackPlaceholder:
|
|
@@ -204,7 +194,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
204
194
|
title: "Mail यह दृश्य लोड नहीं कर सका।",
|
|
205
195
|
fallback: "Mail लोड करते समय कुछ गलत हुआ।",
|
|
206
196
|
back: "वापस",
|
|
207
|
-
reload: "रीलोड",
|
|
208
197
|
loading: "Mail रीलोड हो रहा है...",
|
|
209
198
|
sendFeedback: "फ़ीडबैक भेजें",
|
|
210
199
|
feedbackPlaceholder: "इस Mail त्रुटि से पहले क्या हुआ, उसका वर्णन करें।",
|
|
@@ -214,7 +203,6 @@ const MAIL_ERROR_COPY: Record<
|
|
|
214
203
|
title: "تعذر على Mail تحميل هذا العرض.",
|
|
215
204
|
fallback: "حدث خطأ أثناء تحميل Mail.",
|
|
216
205
|
back: "رجوع",
|
|
217
|
-
reload: "إعادة التحميل",
|
|
218
206
|
loading: "جارٍ إعادة تحميل Mail...",
|
|
219
207
|
sendFeedback: "إرسال الملاحظات",
|
|
220
208
|
feedbackPlaceholder: "صف ما حدث قبل ظهور خطأ Mail هذا.",
|
|
@@ -563,7 +551,7 @@ export function ErrorBoundary() {
|
|
|
563
551
|
<div className="w-full max-w-md text-center">
|
|
564
552
|
<p className="text-sm font-semibold">{copy.title}</p>
|
|
565
553
|
<p className="mt-2 text-sm text-muted-foreground">{message}</p>
|
|
566
|
-
<div className="mt-5 flex
|
|
554
|
+
<div className="mt-5 flex flex-col items-center gap-2">
|
|
567
555
|
<Button
|
|
568
556
|
variant="outline"
|
|
569
557
|
size="sm"
|
|
@@ -571,9 +559,6 @@ export function ErrorBoundary() {
|
|
|
571
559
|
>
|
|
572
560
|
{copy.back}
|
|
573
561
|
</Button>
|
|
574
|
-
<Button size="sm" onClick={() => window.location.reload()}>
|
|
575
|
-
{copy.reload}
|
|
576
|
-
</Button>
|
|
577
562
|
</div>
|
|
578
563
|
<ErrorReportActions
|
|
579
564
|
appName="Mail"
|
|
@@ -7,10 +7,18 @@ time from the command menu (Cmd+K → "What's new").
|
|
|
7
7
|
|
|
8
8
|
### Added
|
|
9
9
|
|
|
10
|
+
- Org admins can review agent runs from Settings
|
|
10
11
|
- Chat messages can be reverted to their autosaved version, including a shortcut to restore the start of a chat.
|
|
11
12
|
|
|
13
|
+
### Improved
|
|
14
|
+
|
|
15
|
+
- Improve Slides design system setup feedback
|
|
16
|
+
|
|
12
17
|
### Fixed
|
|
13
18
|
|
|
19
|
+
- Empty decks keep their retry option when a retry cannot be sent.
|
|
20
|
+
- Prevent setup generation while Figma indexing is in progress
|
|
21
|
+
- Text on a slide is now edited in place: clicking into it changes nothing on the slide, Enter adds the new line immediately, and what you see while typing is what gets saved. The slash menu is no longer available inside slide text.
|
|
14
22
|
- Word document imports now complete successfully.
|
|
15
23
|
|
|
16
24
|
## 2026-09-24
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
sendToAgentChatAndConfirm,
|
|
2
3
|
useAgentChatGenerating,
|
|
3
4
|
useAgentEngineConfigured,
|
|
4
5
|
type AgentChatMessage,
|
|
@@ -294,6 +295,80 @@ export function useAgentGenerating(options?: { tabId: string | null }) {
|
|
|
294
295
|
[send, clearWatchdog],
|
|
295
296
|
);
|
|
296
297
|
|
|
298
|
+
const submitAndConfirm = useCallback(
|
|
299
|
+
(
|
|
300
|
+
message: string,
|
|
301
|
+
context: string,
|
|
302
|
+
options?: AgentGeneratingSubmitOptions,
|
|
303
|
+
) => {
|
|
304
|
+
const {
|
|
305
|
+
generationAttemptId,
|
|
306
|
+
generationOutputId,
|
|
307
|
+
submitMessageId: requestedSubmitMessageId,
|
|
308
|
+
...agentOptions
|
|
309
|
+
} = options ?? {};
|
|
310
|
+
const submitMessageId =
|
|
311
|
+
requestedSubmitMessageId ??
|
|
312
|
+
`slides-submit-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
313
|
+
setTimedOut(false);
|
|
314
|
+
setRunError(false);
|
|
315
|
+
clearWatchdog();
|
|
316
|
+
timeoutRef.current = setTimeout(
|
|
317
|
+
() => setTimedOut(true),
|
|
318
|
+
MAX_GENERATING_MS,
|
|
319
|
+
);
|
|
320
|
+
activeSubmitRef.current = submitMessageId;
|
|
321
|
+
activeTabRef.current = null;
|
|
322
|
+
const submission = sendToAgentChatAndConfirm(
|
|
323
|
+
{
|
|
324
|
+
message,
|
|
325
|
+
context,
|
|
326
|
+
submit: true,
|
|
327
|
+
submitMessageId,
|
|
328
|
+
chatTarget: "local",
|
|
329
|
+
...agentOptions,
|
|
330
|
+
} as AgentChatMessage & { attachments?: ReadonlyArray<unknown> },
|
|
331
|
+
{ submitMessageId },
|
|
332
|
+
);
|
|
333
|
+
void submission.then(({ tabId, delivered }) => {
|
|
334
|
+
if (!delivered) {
|
|
335
|
+
if (activeSubmitRef.current === submitMessageId) {
|
|
336
|
+
activeSubmitRef.current = null;
|
|
337
|
+
activeTabRef.current = null;
|
|
338
|
+
clearWatchdog();
|
|
339
|
+
setRecentlyGenerating(false);
|
|
340
|
+
setTimedOut(false);
|
|
341
|
+
setRunError(false);
|
|
342
|
+
}
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const targetTabId = activeTabRef.current ?? tabId;
|
|
346
|
+
activeTabRef.current = targetTabId;
|
|
347
|
+
if (
|
|
348
|
+
generationAttemptId &&
|
|
349
|
+
generationOutputId &&
|
|
350
|
+
typeof window !== "undefined"
|
|
351
|
+
) {
|
|
352
|
+
startedGenerationAttempts.set(
|
|
353
|
+
generationAttemptKey(generationAttemptId, generationOutputId),
|
|
354
|
+
targetTabId,
|
|
355
|
+
);
|
|
356
|
+
window.dispatchEvent(
|
|
357
|
+
new CustomEvent(SLIDES_GENERATION_STARTED_EVENT, {
|
|
358
|
+
detail: {
|
|
359
|
+
generationAttemptId,
|
|
360
|
+
outputId: generationOutputId,
|
|
361
|
+
tabId: targetTabId,
|
|
362
|
+
},
|
|
363
|
+
}),
|
|
364
|
+
);
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
return submission;
|
|
368
|
+
},
|
|
369
|
+
[clearWatchdog],
|
|
370
|
+
);
|
|
371
|
+
|
|
297
372
|
return {
|
|
298
373
|
generating:
|
|
299
374
|
!providerMissing &&
|
|
@@ -306,5 +381,6 @@ export function useAgentGenerating(options?: { tabId: string | null }) {
|
|
|
306
381
|
observedRun,
|
|
307
382
|
timedOut,
|
|
308
383
|
submit,
|
|
384
|
+
submitAndConfirm,
|
|
309
385
|
};
|
|
310
386
|
}
|
|
@@ -16,6 +16,9 @@ import {
|
|
|
16
16
|
|
|
17
17
|
import { CHAT_STOP_DEBOUNCE_MS } from "./use-agent-generating";
|
|
18
18
|
|
|
19
|
+
export const NEW_DECK_GENERATION_SUBMIT_TARGET_EVENT =
|
|
20
|
+
"agentNative.chatSubmitTarget";
|
|
21
|
+
|
|
19
22
|
type NewDeckGenerationLifecycle = {
|
|
20
23
|
deckId: string;
|
|
21
24
|
isNewDeckCreation: boolean;
|
|
@@ -149,6 +152,7 @@ export function useNewDeckGenerationRun(
|
|
|
149
152
|
submitMessageId: string | null,
|
|
150
153
|
): {
|
|
151
154
|
generating: boolean;
|
|
155
|
+
tabId: string | null;
|
|
152
156
|
questionContinuationPending: boolean;
|
|
153
157
|
expectQuestionContinuation: (submitMessageId: string) => void;
|
|
154
158
|
submitQuestionContinuation: (input: {
|
|
@@ -331,12 +335,19 @@ export function useNewDeckGenerationRun(
|
|
|
331
335
|
? { ...previous, tabId: detail.tabId }
|
|
332
336
|
: previous,
|
|
333
337
|
);
|
|
334
|
-
|
|
338
|
+
rememberNewDeckGenerationRunTab(
|
|
339
|
+
currentRun.deckId,
|
|
340
|
+
submitId,
|
|
341
|
+
detail.tabId,
|
|
342
|
+
);
|
|
335
343
|
};
|
|
336
|
-
window.addEventListener(
|
|
344
|
+
window.addEventListener(
|
|
345
|
+
NEW_DECK_GENERATION_SUBMIT_TARGET_EVENT,
|
|
346
|
+
handleSubmitTarget,
|
|
347
|
+
);
|
|
337
348
|
return () =>
|
|
338
349
|
window.removeEventListener(
|
|
339
|
-
|
|
350
|
+
NEW_DECK_GENERATION_SUBMIT_TARGET_EVENT,
|
|
340
351
|
handleSubmitTarget,
|
|
341
352
|
);
|
|
342
353
|
}, [currentRun.deckId, currentRun.submitMessageId, currentRun.tabId]);
|
|
@@ -414,6 +425,7 @@ export function useNewDeckGenerationRun(
|
|
|
414
425
|
|
|
415
426
|
return {
|
|
416
427
|
generating: activeRun.runKey === runKey && activeRun.generating,
|
|
428
|
+
tabId: currentRun.tabId,
|
|
417
429
|
questionContinuationPending: currentContinuation.submitMessageId !== null,
|
|
418
430
|
expectQuestionContinuation,
|
|
419
431
|
submitQuestionContinuation,
|
|
@@ -447,7 +459,7 @@ function getRunTabId(deckId: string, submitMessageId: string): string | null {
|
|
|
447
459
|
return stored;
|
|
448
460
|
}
|
|
449
461
|
|
|
450
|
-
function
|
|
462
|
+
export function rememberNewDeckGenerationRunTab(
|
|
451
463
|
deckId: string,
|
|
452
464
|
submitMessageId: string,
|
|
453
465
|
tabId: string,
|