@agent-native/core-corpus 0.216.0 → 0.218.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/.agents/skills/session-replay/SKILL.md +61 -1
- package/corpus/templates/analytics/AGENTS.md +1 -1
- package/corpus/templates/analytics/CHANGELOG.md +3 -0
- package/corpus/templates/analytics/actions/get-session-replay-summary.ts +9 -65
- package/corpus/templates/analytics/actions/list-event-catalog.ts +1 -1
- package/corpus/templates/analytics/actions/list-session-outputs.ts +40 -0
- package/corpus/templates/analytics/actions/list-session-recordings.ts +17 -4
- package/corpus/templates/analytics/actions/view-screen.ts +29 -3
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +38 -167
- package/corpus/templates/analytics/app/i18n/en-US.ts +27 -0
- package/corpus/templates/analytics/app/pages/sessions/EventCatalogPage.tsx +18 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +3 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionOutputs.tsx +197 -0
- package/corpus/templates/analytics/app/pages/sessions/SessionsTriagePage.tsx +114 -4
- package/corpus/templates/analytics/changelog/2026-10-15-sessions-can-find-people-who-made-a-slides-deck-but-didn-t-p.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-16-owned-and-shared-chats-appear-in-separate-history-sections.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-16-the-activation-funnel-counts-visitors-who-decline-analytics-.md +6 -0
- package/corpus/templates/analytics/server/db/schema.ts +67 -0
- package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +9 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +28 -22
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +36 -1
- package/corpus/templates/analytics/server/lib/output-outcomes.ts +712 -0
- package/corpus/templates/analytics/server/lib/replay-origins.ts +33 -0
- package/corpus/templates/analytics/server/lib/session-event-index.ts +20 -0
- package/corpus/templates/analytics/server/lib/session-performance.ts +6 -40
- package/corpus/templates/analytics/server/lib/session-recording-associations.ts +30 -1
- package/corpus/templates/analytics/server/lib/session-replay-triage.ts +99 -0
- package/corpus/templates/analytics/server/lib/session-replay.ts +45 -31
- package/corpus/templates/analytics/server/lib/sessions-triage-lab.ts +8 -2
- package/corpus/templates/analytics/server/plugins/db.ts +46 -0
- package/corpus/templates/analytics/shared/output-use.ts +205 -0
- package/corpus/templates/analytics/shared/session-events.ts +6 -0
- package/corpus/templates/assets/CHANGELOG.md +6 -0
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +51 -117
- package/corpus/templates/assets/changelog/2026-10-16-owned-and-shared-chats-appear-in-separate-history-sections.md +6 -0
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +34 -101
- package/corpus/templates/brain/app/routes/sources.tsx +1 -1
- package/corpus/templates/brain/vitest.config.ts +7 -0
- package/corpus/templates/calendar/CHANGELOG.md +12 -0
- package/corpus/templates/calendar/actions/create-event.ts +2 -4
- package/corpus/templates/calendar/actions/update-event.ts +35 -6
- package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +1 -1
- package/corpus/templates/calendar/changelog/2026-10-16-booking-links-show-localized-visibility-badges.md +6 -0
- package/corpus/templates/calendar/changelog/2026-10-21-solo-events-avoid-notification-approval.md +6 -0
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +62 -101
- package/corpus/templates/clips/CHANGELOG.md +7 -20
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +20 -77
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +63 -90
- package/corpus/templates/clips/app/components/sharing/share-test-support.tsx +180 -0
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +5 -584
- package/corpus/templates/clips/changelog/2026-10-16-share-dialogs-make-it-easier-to-see-who-has-access-and-manag.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-21-share-panels-describe-general-access-in-a-sentence.md +6 -0
- package/corpus/templates/community/qr/package.json +1 -1
- package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +6 -3
- package/corpus/templates/content/CHANGELOG.md +10 -0
- package/corpus/templates/content/actions/_browser-document-save-attempt.ts +23 -1
- package/corpus/templates/content/actions/_builder-cms-blob-custody.ts +467 -0
- package/corpus/templates/content/actions/_builder-cms-execution-lease.ts +17 -0
- package/corpus/templates/content/actions/_builder-cms-intent-lookup.ts +5 -0
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +881 -21
- package/corpus/templates/content/actions/_builder-cms-write-adapter.ts +28 -2
- package/corpus/templates/content/actions/_builder-cms-write-client.ts +109 -11
- package/corpus/templates/content/actions/_builder-docs-client.ts +1 -0
- package/corpus/templates/content/actions/_builder-private-blob.test-fixture.ts +90 -0
- package/corpus/templates/content/actions/_builder-source-execution-guard.ts +48 -0
- package/corpus/templates/content/actions/_content-save-outcomes.ts +5 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +290 -8
- package/corpus/templates/content/actions/_database-utils.ts +93 -7
- package/corpus/templates/content/actions/_database-view-setup.ts +21 -2
- package/corpus/templates/content/actions/_delete-content-space.ts +8 -1
- package/corpus/templates/content/actions/_github-source-freshness.ts +30 -4
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +23 -6
- package/corpus/templates/content/actions/cancel-prepared-builder-source-update.ts +110 -26
- package/corpus/templates/content/actions/change-content-database-source-role.ts +51 -7
- package/corpus/templates/content/actions/delete-document.ts +41 -3
- package/corpus/templates/content/actions/disconnect-content-database-source.ts +68 -2
- package/corpus/templates/content/actions/disconnect-local-folder-source.ts +33 -2
- package/corpus/templates/content/actions/execute-builder-source-execution.ts +900 -140
- package/corpus/templates/content/actions/get-document.ts +2 -0
- package/corpus/templates/content/actions/permanently-delete-document.ts +6 -0
- package/corpus/templates/content/actions/prepare-builder-source-execution.ts +155 -13
- package/corpus/templates/content/actions/prepare-builder-source-review.ts +299 -73
- package/corpus/templates/content/actions/set-live-body-switch.ts +45 -0
- package/corpus/templates/content/actions/update-document.ts +139 -20
- package/corpus/templates/content/actions/validate-builder-source-execution.ts +135 -26
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +119 -30
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +56 -13
- package/corpus/templates/content/app/components/editor/SuggestionText.tsx +18 -3
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +89 -22
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +23 -0
- package/corpus/templates/content/app/components/editor/database/GitHubSourceStatusLine.tsx +27 -2
- package/corpus/templates/content/app/components/editor/database/ListItemLayout.tsx +32 -8
- package/corpus/templates/content/app/components/editor/database/ListItemRow.tsx +27 -2
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +1 -0
- package/corpus/templates/content/app/components/editor/extensions/SuggestionHighlight.ts +383 -34
- package/corpus/templates/content/app/components/editor/suggestions/draft-session.ts +31 -0
- package/corpus/templates/content/app/components/editor/suggestions/presentation-rebase.ts +82 -4
- package/corpus/templates/content/app/global.css +31 -0
- package/corpus/templates/content/app/hooks/use-content-database.ts +40 -2
- package/corpus/templates/content/app/hooks/use-documents.ts +14 -0
- package/corpus/templates/content/app/i18n-data.ts +1 -0
- package/corpus/templates/content/changelog/2026-10-16-accepting-a-suggestion-on-a-page-that-changed-since-it-was-s.md +6 -0
- package/corpus/templates/content/changelog/2026-10-17-builder-content-avoids-retrying-a-write-when-builder-accepte.md +6 -0
- package/corpus/templates/content/changelog/2026-10-18-link-a-new-collection-to-a-github-folder-from-its-sources.md +1 -1
- package/corpus/templates/content/changelog/2026-10-20-builder-content-sync-keeps-read-and-write-status-accurate-wh.md +6 -0
- package/corpus/templates/content/changelog/2026-10-20-suggested-edits-that-add-remove-split-or-merge-paragraphs-li.md +6 -0
- package/corpus/templates/content/changelog/2026-10-21-list-rows-can-show-each-pages-first-lines.md +6 -0
- package/corpus/templates/content/changelog/2026-10-22-a-collection-linked-to-a-big-github-folder-fills-faster-and-p.md +6 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.adapters.md +29 -0
- package/corpus/templates/content/parity/matrix.md +42 -42
- package/corpus/templates/content/parity/matrix.ts +3 -1
- package/corpus/templates/content/server/db/schema.ts +20 -0
- package/corpus/templates/content/server/lib/content-trash-purge.ts +15 -1
- package/corpus/templates/content/server/lib/live-body-writer.ts +138 -26
- package/corpus/templates/content/server/live-copy/binding.ts +31 -0
- package/corpus/templates/content/server/live-copy/bounded-task.d.ts +6 -0
- package/corpus/templates/content/server/live-copy/exec-db.ts +1 -0
- package/corpus/templates/content/server/live-copy/holds.ts +59 -0
- package/corpus/templates/content/server/live-copy/persist.ts +656 -0
- package/corpus/templates/content/server/live-copy/switch.ts +136 -0
- package/corpus/templates/content/server/live-copy/task-names.ts +4 -0
- package/corpus/templates/content/server/live-copy/tasks.ts +183 -0
- package/corpus/templates/content/server/live-copy/write-cause.ts +85 -0
- package/corpus/templates/content/server/live-copy/write.ts +85 -0
- package/corpus/templates/content/server/plugins/builder-private-payload-cleanup.ts +22 -0
- package/corpus/templates/content/server/plugins/collab.ts +3 -0
- package/corpus/templates/content/server/plugins/db.ts +28 -0
- package/corpus/templates/content/shared/api.ts +30 -1
- package/corpus/templates/content/shared/database-item-layout.ts +54 -22
- package/corpus/templates/content/shared/document-intent-merge.ts +16 -9
- package/corpus/templates/content/shared/og-description.ts +258 -36
- package/corpus/templates/content/shared/suggestion-diff.ts +23 -6
- package/corpus/templates/content/shared/suggestion-formatting.ts +44 -14
- package/corpus/templates/content/shared/suggestion-text.ts +20 -5
- package/corpus/templates/design/.agents/skills/design-templates/SKILL.md +5 -1
- package/corpus/templates/design/.generated/bridge/shader-runtime.generated.ts +25 -4
- package/corpus/templates/design/CHANGELOG.md +5 -0
- package/corpus/templates/design/actions/get-getting-started.ts +53 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +10 -0
- package/corpus/templates/design/app/components/design/bridge/native-shader-runtime.bridge.ts +132 -79
- package/corpus/templates/design/app/components/design/bridge/native-source-provider.ts +268 -130
- package/corpus/templates/design/app/components/design/bridge/native-worker-scene-host.ts +122 -42
- package/corpus/templates/design/app/components/design/bridge/shader-runtime.bridge.ts +41 -4
- package/corpus/templates/design/app/components/design/design-canvas/text-content-change-result.ts +46 -12
- package/corpus/templates/design/app/components/home/DesignHomeLibrary.tsx +15 -8
- package/corpus/templates/design/app/components/layout/GettingStarted.tsx +50 -0
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +3 -0
- package/corpus/templates/design/app/components/templates/DesignTemplateGrid.tsx +163 -0
- package/corpus/templates/design/app/components/templates/DesignTemplateLibrary.tsx +65 -78
- package/corpus/templates/design/app/components/templates/TemplatePreview.tsx +6 -2
- package/corpus/templates/design/app/global.css +6 -0
- package/corpus/templates/design/app/i18n/en-US.ts +17 -0
- package/corpus/templates/design/app/lib/canvas-load-outcome.ts +147 -0
- package/corpus/templates/design/app/lib/canvas-outcome-tracking.ts +531 -0
- package/corpus/templates/design/app/lib/canvas-style-kind.ts +50 -0
- package/corpus/templates/design/app/pages/DesignSystems.tsx +1 -1
- package/corpus/templates/design/app/pages/Index.tsx +28 -67
- package/corpus/templates/design/app/pages/design-editor/commands/commit-visual-styles.ts +86 -29
- package/corpus/templates/design/app/pages/design-editor/commands/save-file-content.ts +38 -3
- package/corpus/templates/design/app/pages/design-editor/domains/use-editor-core.ts +9 -0
- package/corpus/templates/design/app/pages/design-editor/domains/use-editor-files-and-saving.ts +2 -0
- package/corpus/templates/design/changelog/2026-10-16-design-pages-use-localized-visibility-badges-and-a-shared-ow.md +6 -0
- package/corpus/templates/design/changelog/2026-10-21-a-getting-started-checklist-at-the-bottom-of-the-sidebar-tra.md +6 -0
- package/corpus/templates/design/changelog/2026-10-21-templates-now-open-a-read-only-preview-from-the-card-and-the.md +6 -0
- package/corpus/templates/design/changelog/2026-10-22-collapsed-shader-layers-no-longer-interrupt-other-shaders-on.md +6 -0
- package/corpus/templates/design/changelog/2026-10-22-shader-fills-keep-rendering-when-other-screen-content-cannot.md +6 -0
- package/corpus/templates/design/scripts/design-export-validation/export-baseline.json +24 -0
- package/corpus/templates/design/server/lib/getting-started.ts +267 -0
- package/corpus/templates/design/server/plugins/getting-started.ts +5 -0
- package/corpus/templates/design/shared/design-template-presets/analytics-dashboard.ts +127 -0
- package/corpus/templates/design/shared/design-template-presets/design-studio.ts +98 -0
- package/corpus/templates/design/shared/design-template-presets/messaging-app.ts +101 -0
- package/corpus/templates/design/shared/design-template-presets/project-tasks.ts +120 -0
- package/corpus/templates/design/shared/design-template-presets.ts +8 -0
- package/corpus/templates/dispatch/CHANGELOG.md +4 -0
- package/corpus/templates/dispatch/app/i18n-data.ts +75 -0
- package/corpus/templates/dispatch/changelog/2026-10-21-owned-and-shared-chats-appear-in-separate-history-sections.md +6 -0
- package/corpus/templates/factory/app/components/layout/Sidebar.tsx +34 -100
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +1 -1
- package/corpus/templates/forms/server/plugins/agent-chat.ts +1 -1
- package/corpus/templates/plan/CHANGELOG.md +6 -0
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +34 -109
- package/corpus/templates/plan/changelog/2026-10-16-owned-and-shared-chats-appear-in-separate-history-sections.md +6 -0
- package/corpus/templates/slides/CHANGELOG.md +7 -0
- package/corpus/templates/slides/actions/delete-deck.ts +7 -0
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +1 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +1 -1
- package/corpus/templates/slides/app/pages/Index.tsx +7 -2
- package/corpus/templates/slides/changelog/2026-10-16-deck-lists-use-the-shared-ownership-filter-and-visibility-ba.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-21-connected-deck-deletion-requires-approval.md +6 -0
- package/corpus/templates/slides/scripts/edit-fidelity/client-action.ts +61 -0
- package/corpus/templates/slides/scripts/edit-fidelity/run.ts +10 -0
- package/package.json +1 -1
- package/corpus/templates/chat/app/lib/sidebar-thread-state.ts +0 -29
- package/corpus/templates/slides/app/components/deck/DeckFilterMenu.tsx +0 -83
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
navigateWithAgentChatViewTransition,
|
|
3
3
|
sendToAgentChat,
|
|
4
4
|
useChatThreads,
|
|
5
|
-
type ChatThreadSummary,
|
|
6
5
|
} from "@agent-native/core/client/agent-chat";
|
|
7
6
|
import { useCodeMode } from "@agent-native/core/client/agent-chat";
|
|
8
7
|
import { appPath } from "@agent-native/core/client/api-path";
|
|
@@ -10,6 +9,11 @@ import { useSession } from "@agent-native/core/client/hooks";
|
|
|
10
9
|
import { useT } from "@agent-native/core/client/i18n";
|
|
11
10
|
import { buildSignInReturnHref } from "@agent-native/core/client/sign-in-return";
|
|
12
11
|
import { useSendToAgentChat } from "@agent-native/toolkit/app/chat/composer";
|
|
12
|
+
import {
|
|
13
|
+
OwnershipChatHistoryRail,
|
|
14
|
+
useOwnershipChatHistory,
|
|
15
|
+
ownDraftRows,
|
|
16
|
+
} from "@agent-native/toolkit/app/chat/ownership-history";
|
|
13
17
|
import { DevDatabaseLink } from "@agent-native/toolkit/app/db-admin";
|
|
14
18
|
import { FeedbackButton } from "@agent-native/toolkit/app/feedback";
|
|
15
19
|
import { OrgSwitcher } from "@agent-native/toolkit/app/org";
|
|
@@ -21,10 +25,6 @@ import {
|
|
|
21
25
|
} from "@agent-native/toolkit/app/shared";
|
|
22
26
|
import { LazyChunkErrorBoundary } from "@agent-native/toolkit/app/shared";
|
|
23
27
|
import { LazyChunkRetryFallback } from "@agent-native/toolkit/app/shared";
|
|
24
|
-
import {
|
|
25
|
-
ChatHistoryRail,
|
|
26
|
-
type ChatHistoryItem,
|
|
27
|
-
} from "@agent-native/toolkit/chat-history";
|
|
28
28
|
import { planPathForKind } from "@shared/plan-routes";
|
|
29
29
|
import {
|
|
30
30
|
IconClipboardCheck,
|
|
@@ -34,14 +34,7 @@ import {
|
|
|
34
34
|
IconRefresh,
|
|
35
35
|
IconNews,
|
|
36
36
|
} from "@tabler/icons-react";
|
|
37
|
-
import {
|
|
38
|
-
lazy,
|
|
39
|
-
Suspense,
|
|
40
|
-
useEffect,
|
|
41
|
-
useMemo,
|
|
42
|
-
useState,
|
|
43
|
-
type MouseEvent,
|
|
44
|
-
} from "react";
|
|
37
|
+
import { lazy, Suspense, useMemo, useState, type MouseEvent } from "react";
|
|
45
38
|
import { Link, useLocation, useNavigate } from "react-router";
|
|
46
39
|
import { toast } from "sonner";
|
|
47
40
|
|
|
@@ -121,40 +114,6 @@ function formatPlanAge(value: string) {
|
|
|
121
114
|
});
|
|
122
115
|
}
|
|
123
116
|
|
|
124
|
-
function formatThreadAge(updatedAt: number) {
|
|
125
|
-
const diffMs = Math.max(0, Date.now() - updatedAt);
|
|
126
|
-
const minutes = Math.floor(diffMs / 60_000);
|
|
127
|
-
if (minutes < 1) return "now";
|
|
128
|
-
if (minutes < 60) return `${minutes}m`;
|
|
129
|
-
const hours = Math.floor(minutes / 60);
|
|
130
|
-
if (hours < 24) return `${hours}h`;
|
|
131
|
-
const days = Math.floor(hours / 24);
|
|
132
|
-
if (days < 7) return `${days}d`;
|
|
133
|
-
return new Date(updatedAt).toLocaleDateString([], {
|
|
134
|
-
month: "short",
|
|
135
|
-
day: "numeric",
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function threadTitle(thread: ChatThreadSummary) {
|
|
140
|
-
return thread.title || thread.preview || "Untitled chat";
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function threadUpdatedAt(thread: ChatThreadSummary) {
|
|
144
|
-
return Number.isFinite(thread.updatedAt)
|
|
145
|
-
? thread.updatedAt
|
|
146
|
-
: Number.isFinite(thread.createdAt)
|
|
147
|
-
? thread.createdAt
|
|
148
|
-
: 0;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function compareThreads(a: ChatThreadSummary, b: ChatThreadSummary) {
|
|
152
|
-
const aPinned = a.pinnedAt ?? 0;
|
|
153
|
-
const bPinned = b.pinnedAt ?? 0;
|
|
154
|
-
if (aPinned || bPinned) return bPinned - aPinned;
|
|
155
|
-
return threadUpdatedAt(b) - threadUpdatedAt(a);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
117
|
function persistedActiveThreadId() {
|
|
159
118
|
try {
|
|
160
119
|
return localStorage.getItem(
|
|
@@ -182,53 +141,34 @@ function PlanChatsSection({
|
|
|
182
141
|
pinThread,
|
|
183
142
|
archiveThread,
|
|
184
143
|
renameThread,
|
|
185
|
-
|
|
144
|
+
isNewThread,
|
|
186
145
|
} = useChatThreads(undefined, PLAN_CHAT_STORAGE_KEY, undefined, {
|
|
146
|
+
ownership: "mine",
|
|
187
147
|
autoCreate: false,
|
|
188
148
|
restoreActiveThread: false,
|
|
189
149
|
});
|
|
190
150
|
|
|
191
|
-
const
|
|
192
|
-
() =>
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
() =>
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
);
|
|
213
|
-
|
|
214
|
-
useEffect(() => {
|
|
215
|
-
const refresh = () => refreshThreads();
|
|
216
|
-
const handleRunning = (event: Event) => {
|
|
217
|
-
const detail = (event as CustomEvent).detail as
|
|
218
|
-
| { isRunning?: unknown }
|
|
219
|
-
| undefined;
|
|
220
|
-
if (typeof detail?.isRunning === "boolean") refreshThreads();
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
window.addEventListener("agent-chat:threads-updated", refresh);
|
|
224
|
-
window.addEventListener("agentNative.chatRunning", handleRunning);
|
|
225
|
-
window.addEventListener("focus", refresh);
|
|
226
|
-
return () => {
|
|
227
|
-
window.removeEventListener("agent-chat:threads-updated", refresh);
|
|
228
|
-
window.removeEventListener("agentNative.chatRunning", handleRunning);
|
|
229
|
-
window.removeEventListener("focus", refresh);
|
|
230
|
-
};
|
|
231
|
-
}, [refreshThreads]);
|
|
151
|
+
const history = useOwnershipChatHistory({
|
|
152
|
+
getThreadUrl: (threadId) => appPath(planChatThreadPath(threadId)),
|
|
153
|
+
activeId: activeThreadId,
|
|
154
|
+
localMineRows: ownDraftRows({ threads, isNewThread }),
|
|
155
|
+
mutations: {
|
|
156
|
+
pin: pinThread,
|
|
157
|
+
rename: renameThread,
|
|
158
|
+
archive: archiveThread,
|
|
159
|
+
},
|
|
160
|
+
onMutationFailed: (kind) => {
|
|
161
|
+
toast.error(
|
|
162
|
+
t(
|
|
163
|
+
kind === "archive"
|
|
164
|
+
? "raw.sidebar.archiveChatFailed"
|
|
165
|
+
: kind === "rename"
|
|
166
|
+
? "raw.sidebar.renameChatFailed"
|
|
167
|
+
: "agentChat.common.saveFailed",
|
|
168
|
+
),
|
|
169
|
+
);
|
|
170
|
+
},
|
|
171
|
+
});
|
|
232
172
|
|
|
233
173
|
if (collapsed) return null;
|
|
234
174
|
|
|
@@ -252,20 +192,12 @@ function PlanChatsSection({
|
|
|
252
192
|
async function handleArchiveThread(threadId: string) {
|
|
253
193
|
const wasActive =
|
|
254
194
|
threadId === activeThreadId || threadId === persistedActiveThreadId();
|
|
255
|
-
const archived = await
|
|
256
|
-
if (!archived)
|
|
257
|
-
toast.error(t("raw.sidebar.archiveChatFailed"));
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
195
|
+
const archived = await history.listProps.onDelete!(threadId);
|
|
196
|
+
if (!archived) return false;
|
|
260
197
|
if (wasActive) {
|
|
261
198
|
await handleNewChat();
|
|
262
199
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
function handleRenameThread(threadId: string, title: string) {
|
|
266
|
-
void renameThread(threadId, title).then((renamed) => {
|
|
267
|
-
if (!renamed) toast.error(t("raw.sidebar.renameChatFailed"));
|
|
268
|
-
});
|
|
200
|
+
return true;
|
|
269
201
|
}
|
|
270
202
|
|
|
271
203
|
return (
|
|
@@ -275,22 +207,15 @@ function PlanChatsSection({
|
|
|
275
207
|
aria-hidden={!open}
|
|
276
208
|
>
|
|
277
209
|
<div className="ms-4">
|
|
278
|
-
<
|
|
279
|
-
|
|
210
|
+
<OwnershipChatHistoryRail
|
|
211
|
+
{...history}
|
|
280
212
|
activeId={activeThreadId}
|
|
281
213
|
onSelect={(threadId) => openThread(threadId)}
|
|
282
214
|
onNewChat={() => void handleNewChat()}
|
|
283
215
|
railLabels={{
|
|
284
216
|
newChat: t("sidebar.newChat"),
|
|
285
|
-
showMore: t("sidebar.chats"),
|
|
286
|
-
showLess: t("sidebar.chats"),
|
|
287
217
|
}}
|
|
288
218
|
renameMaxLength={160}
|
|
289
|
-
onTogglePin={(threadId) => {
|
|
290
|
-
const thread = visibleThreads.find((item) => item.id === threadId);
|
|
291
|
-
if (thread) void pinThread(threadId, !thread.pinnedAt);
|
|
292
|
-
}}
|
|
293
|
-
onRename={handleRenameThread}
|
|
294
219
|
onDelete={(threadId) => void handleArchiveThread(threadId)}
|
|
295
220
|
labels={{
|
|
296
221
|
options: (item) => `${t("sidebar.chats")}: ${item.titleText ?? ""}`,
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable user-facing changes to Agent-Native Slides are documented here. Open it any
|
|
4
4
|
time from the command menu (Cmd+K → "What's new").
|
|
5
5
|
|
|
6
|
+
## 2026-10-21
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- Deleting a deck through an agent requires approval for each deletion.
|
|
11
|
+
|
|
6
12
|
## 2026-10-20
|
|
7
13
|
|
|
8
14
|
### Improved
|
|
@@ -41,6 +47,7 @@ time from the command menu (Cmd+K → "What's new").
|
|
|
41
47
|
|
|
42
48
|
### Improved
|
|
43
49
|
|
|
50
|
+
- Deck lists use the shared ownership filter, and visibility badges use localized labels.
|
|
44
51
|
- Contextual toolbar: the second row now changes with what is selected (text, shape, image, video, multi-select), and every state ends with an Edit with Agent button with quick picks.
|
|
45
52
|
- The top bar shows a deck's privacy next to its name, Share has People and Agents tabs, and Present opens a menu to start in this tab, full screen, or Presenter View.
|
|
46
53
|
|
|
@@ -13,6 +13,13 @@ export default defineAction({
|
|
|
13
13
|
id: z.string().min(1).describe("Deck ID"),
|
|
14
14
|
}),
|
|
15
15
|
http: { method: "DELETE" },
|
|
16
|
+
needsApproval: true,
|
|
17
|
+
allowPersistentApproval: false,
|
|
18
|
+
mcpAnnotations: {
|
|
19
|
+
readOnlyHint: false,
|
|
20
|
+
destructiveHint: true,
|
|
21
|
+
openWorldHint: false,
|
|
22
|
+
},
|
|
16
23
|
run: async ({ id }) => {
|
|
17
24
|
try {
|
|
18
25
|
const access = await assertAccess("deck", id, "admin");
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
CreativeContextShareSheet,
|
|
4
4
|
useCreativeContextLab,
|
|
5
5
|
} from "@agent-native/creative-context/client";
|
|
6
|
-
import { VisibilityBadge } from "@agent-native/toolkit/sharing";
|
|
6
|
+
import { VisibilityBadge } from "@agent-native/toolkit/app/sharing/VisibilityBadge";
|
|
7
7
|
import {
|
|
8
8
|
IconBuildingCommunity,
|
|
9
9
|
IconDots,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useT } from "@agent-native/core/client/i18n";
|
|
2
2
|
import { ShareButton } from "@agent-native/toolkit/app/sharing";
|
|
3
|
-
import { VisibilityBadge } from "@agent-native/toolkit/sharing";
|
|
3
|
+
import { VisibilityBadge } from "@agent-native/toolkit/app/sharing/VisibilityBadge";
|
|
4
4
|
import {
|
|
5
5
|
IconBuildingCommunity,
|
|
6
6
|
IconComponents,
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
LazyChunkErrorBoundary,
|
|
31
31
|
LazyChunkRetryFallback,
|
|
32
32
|
} from "@agent-native/toolkit/app/shared";
|
|
33
|
+
import { OwnershipFilter } from "@agent-native/toolkit/app/sharing/OwnershipFilter";
|
|
33
34
|
import { appStateKeyForBrowserTab } from "@shared/app-state-tabs";
|
|
34
35
|
import { extractGoogleDocUrls } from "@shared/google-docs";
|
|
35
36
|
import {
|
|
@@ -62,7 +63,6 @@ import { toast } from "sonner";
|
|
|
62
63
|
import { z } from "zod";
|
|
63
64
|
|
|
64
65
|
import DeckCard from "@/components/deck/DeckCard";
|
|
65
|
-
import { DeckFilterMenu } from "@/components/deck/DeckFilterMenu";
|
|
66
66
|
import { DeckEditorSkeleton } from "@/components/editor/DeckEditorSkeleton";
|
|
67
67
|
import { ImportDeckButton } from "@/components/editor/ImportDeckButton";
|
|
68
68
|
import {
|
|
@@ -2928,7 +2928,12 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
2928
2928
|
/>
|
|
2929
2929
|
}
|
|
2930
2930
|
recentActions={
|
|
2931
|
-
<
|
|
2931
|
+
<OwnershipFilter
|
|
2932
|
+
value={deckFilter === "not-mine" ? "shared" : deckFilter}
|
|
2933
|
+
onChange={(value) =>
|
|
2934
|
+
setDeckFilter(value === "shared" ? "not-mine" : value)
|
|
2935
|
+
}
|
|
2936
|
+
/>
|
|
2932
2937
|
}
|
|
2933
2938
|
templates={<DeckTemplateLibrary enabled={isHome} />}
|
|
2934
2939
|
recent={
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ActionHttpError,
|
|
3
|
+
ActionRequestTimeoutError,
|
|
4
|
+
ActionTransportError,
|
|
5
|
+
isPlaywrightTargetTransportFailure,
|
|
6
|
+
} from "./run-outcomes.ts";
|
|
7
|
+
|
|
8
|
+
interface BrowserActionArgs {
|
|
9
|
+
body: Record<string, unknown>;
|
|
10
|
+
compatibilityVersion: string;
|
|
11
|
+
source: string;
|
|
12
|
+
timeoutMs: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface ActionPage {
|
|
16
|
+
evaluate<A, R>(run: (args: A) => Promise<R>, args: A): Promise<R>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export async function deleteScratchDeck<T>(
|
|
20
|
+
page: ActionPage,
|
|
21
|
+
args: BrowserActionArgs,
|
|
22
|
+
): Promise<T> {
|
|
23
|
+
const result = await page
|
|
24
|
+
.evaluate(async ({ body, compatibilityVersion, source, timeoutMs }) => {
|
|
25
|
+
try {
|
|
26
|
+
const { callAction } = await import(source);
|
|
27
|
+
const value: T = await callAction("delete-deck", body, {
|
|
28
|
+
method: "DELETE",
|
|
29
|
+
uiOnly: true,
|
|
30
|
+
timeoutMs,
|
|
31
|
+
// Cleanup can run before Vite's client bootstrap sets define globals.
|
|
32
|
+
headers: {
|
|
33
|
+
"X-Agent-Native-Client-Compatibility": compatibilityVersion,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
return { kind: "success" as const, value };
|
|
37
|
+
} catch (error) {
|
|
38
|
+
const fault = error as { status?: unknown; timedOut?: unknown } | null;
|
|
39
|
+
// Playwright does not preserve custom Error properties across evaluate.
|
|
40
|
+
return {
|
|
41
|
+
kind: "failure" as const,
|
|
42
|
+
message: String(error),
|
|
43
|
+
status: typeof fault?.status === "number" ? fault.status : null,
|
|
44
|
+
timedOut: fault?.timedOut === true,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}, args)
|
|
48
|
+
.catch((error: unknown) => {
|
|
49
|
+
if (isPlaywrightTargetTransportFailure(error)) {
|
|
50
|
+
throw new ActionTransportError(
|
|
51
|
+
`delete-deck action evaluation failed: ${String(error)}`,
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
throw error;
|
|
55
|
+
});
|
|
56
|
+
if (result.kind === "success") return result.value;
|
|
57
|
+
if (result.timedOut) throw new ActionRequestTimeoutError(result.message);
|
|
58
|
+
if (result.status !== null)
|
|
59
|
+
throw new ActionHttpError("delete-deck", result.status);
|
|
60
|
+
throw new ActionTransportError(result.message);
|
|
61
|
+
}
|
|
@@ -16,6 +16,7 @@ import { fileURLToPath } from "node:url";
|
|
|
16
16
|
import { parse, type DefaultTreeAdapterTypes as P5 } from "parse5";
|
|
17
17
|
|
|
18
18
|
import { IN_PLACE_TEXT_UNDO_LIMIT } from "../../app/components/editor/in-place-text-session.ts";
|
|
19
|
+
import { CLIENT_COMPATIBILITY_VERSION } from "../../shared/client-compatibility.ts";
|
|
19
20
|
import {
|
|
20
21
|
pick,
|
|
21
22
|
resolvePnpmEntry,
|
|
@@ -53,6 +54,7 @@ import {
|
|
|
53
54
|
shouldRetainCleanupRecoveryClaimEvidence,
|
|
54
55
|
type AuthoringFuzzPersistence,
|
|
55
56
|
} from "./authoring-fuzz.ts";
|
|
57
|
+
import { deleteScratchDeck } from "./client-action.ts";
|
|
56
58
|
import { devServerListeningUrl } from "./dev-server-url.ts";
|
|
57
59
|
import {
|
|
58
60
|
CHROME_SELECTOR,
|
|
@@ -742,6 +744,14 @@ async function action<T = any>(
|
|
|
742
744
|
method: "DELETE" | "GET" | "POST" = "POST",
|
|
743
745
|
timeoutMs = 30_000,
|
|
744
746
|
): Promise<T> {
|
|
747
|
+
if (name === "delete-deck") {
|
|
748
|
+
return deleteScratchDeck<T>(page, {
|
|
749
|
+
body,
|
|
750
|
+
compatibilityVersion: CLIENT_COMPATIBILITY_VERSION,
|
|
751
|
+
source: `/@fs/${WORKTREE_ROOT.replace(/\\/g, "/")}/packages/core/src/client/use-action.ts`,
|
|
752
|
+
timeoutMs,
|
|
753
|
+
});
|
|
754
|
+
}
|
|
745
755
|
const evaluation = page.evaluate(
|
|
746
756
|
async ({ name, body, method, timeoutMs }: any) => {
|
|
747
757
|
const url =
|
package/package.json
CHANGED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { ChatThreadSummary } from "@agent-native/toolkit/app/chat/agentkit-chat/index";
|
|
2
|
-
|
|
3
|
-
export function visibleChatThreads(
|
|
4
|
-
threads: ChatThreadSummary[],
|
|
5
|
-
observedThreadStarts: ReadonlyMap<string, number>,
|
|
6
|
-
): ChatThreadSummary[] {
|
|
7
|
-
const knownIds = new Set(threads.map((thread) => thread.id));
|
|
8
|
-
const optimistic: ChatThreadSummary[] = [...observedThreadStarts].flatMap(
|
|
9
|
-
([id, startedAt]) =>
|
|
10
|
-
knownIds.has(id)
|
|
11
|
-
? []
|
|
12
|
-
: [
|
|
13
|
-
{
|
|
14
|
-
id,
|
|
15
|
-
title: "",
|
|
16
|
-
preview: "",
|
|
17
|
-
messageCount: 0,
|
|
18
|
-
createdAt: startedAt,
|
|
19
|
-
updatedAt: startedAt,
|
|
20
|
-
scope: null,
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
);
|
|
24
|
-
return [...threads, ...optimistic].filter(
|
|
25
|
-
(thread) =>
|
|
26
|
-
!thread.archivedAt &&
|
|
27
|
-
(thread.messageCount > 0 || observedThreadStarts.has(thread.id)),
|
|
28
|
-
);
|
|
29
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { useT } from "@agent-native/core/client/i18n";
|
|
2
|
-
import { IconChevronDown } from "@tabler/icons-react";
|
|
3
|
-
|
|
4
|
-
import { Button } from "@/components/ui/button";
|
|
5
|
-
import {
|
|
6
|
-
DropdownMenu,
|
|
7
|
-
DropdownMenuContent,
|
|
8
|
-
DropdownMenuRadioGroup,
|
|
9
|
-
DropdownMenuRadioItem,
|
|
10
|
-
DropdownMenuTrigger,
|
|
11
|
-
} from "@/components/ui/dropdown-menu";
|
|
12
|
-
import type { DeckFilter } from "@/lib/deck-filter";
|
|
13
|
-
|
|
14
|
-
export function DeckFilterMenu({
|
|
15
|
-
value,
|
|
16
|
-
onChange,
|
|
17
|
-
}: {
|
|
18
|
-
value: DeckFilter;
|
|
19
|
-
onChange: (value: DeckFilter) => void;
|
|
20
|
-
}) {
|
|
21
|
-
const t = useT();
|
|
22
|
-
const optionLabels: Record<DeckFilter, string> = {
|
|
23
|
-
all: t("home.ownedByAnyone"),
|
|
24
|
-
mine: t("home.ownedByMe"),
|
|
25
|
-
"not-mine": t("home.sharedWithMe"),
|
|
26
|
-
};
|
|
27
|
-
const label = optionLabels[value];
|
|
28
|
-
return (
|
|
29
|
-
<DropdownMenu>
|
|
30
|
-
<DropdownMenuTrigger asChild>
|
|
31
|
-
<Button
|
|
32
|
-
type="button"
|
|
33
|
-
variant="outline"
|
|
34
|
-
size="sm"
|
|
35
|
-
aria-label={label}
|
|
36
|
-
className="h-9 shrink-0 gap-2"
|
|
37
|
-
>
|
|
38
|
-
<span className="grid">
|
|
39
|
-
{Object.entries(optionLabels).map(([filter, option]) => (
|
|
40
|
-
<span
|
|
41
|
-
key={filter}
|
|
42
|
-
aria-hidden="true"
|
|
43
|
-
className="invisible col-start-1 row-start-1 whitespace-nowrap"
|
|
44
|
-
>
|
|
45
|
-
{option}
|
|
46
|
-
</span>
|
|
47
|
-
))}
|
|
48
|
-
<span className="col-start-1 row-start-1 whitespace-nowrap">
|
|
49
|
-
{label}
|
|
50
|
-
</span>
|
|
51
|
-
</span>
|
|
52
|
-
<IconChevronDown className="size-4" aria-hidden="true" />
|
|
53
|
-
</Button>
|
|
54
|
-
</DropdownMenuTrigger>
|
|
55
|
-
<DropdownMenuContent align="start">
|
|
56
|
-
<DropdownMenuRadioGroup
|
|
57
|
-
value={value}
|
|
58
|
-
onValueChange={(nextValue) => {
|
|
59
|
-
if (
|
|
60
|
-
nextValue === "mine" ||
|
|
61
|
-
nextValue === "all" ||
|
|
62
|
-
nextValue === "not-mine"
|
|
63
|
-
) {
|
|
64
|
-
onChange(nextValue);
|
|
65
|
-
}
|
|
66
|
-
}}
|
|
67
|
-
>
|
|
68
|
-
<DropdownMenuRadioItem value="all" indicator="check">
|
|
69
|
-
{t("home.ownedByAnyone")}
|
|
70
|
-
</DropdownMenuRadioItem>
|
|
71
|
-
<DropdownMenuRadioItem value="mine" indicator="check">
|
|
72
|
-
{t("home.ownedByMe")}
|
|
73
|
-
</DropdownMenuRadioItem>
|
|
74
|
-
<DropdownMenuRadioItem value="not-mine" indicator="check">
|
|
75
|
-
{t("home.sharedWithMe")}
|
|
76
|
-
</DropdownMenuRadioItem>
|
|
77
|
-
</DropdownMenuRadioGroup>
|
|
78
|
-
</DropdownMenuContent>
|
|
79
|
-
</DropdownMenu>
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export default DeckFilterMenu;
|