@agent-native/core 0.76.9 → 0.76.11
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/core/CHANGELOG.md +39 -0
- package/corpus/core/docs/content/locales/ar-SA/actions.md +7 -7
- package/corpus/core/docs/content/locales/ar-SA/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/de-DE/actions.md +9 -9
- package/corpus/core/docs/content/locales/de-DE/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/es-ES/actions.md +9 -9
- package/corpus/core/docs/content/locales/es-ES/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/fr-FR/actions.md +9 -9
- package/corpus/core/docs/content/locales/fr-FR/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/hi-IN/actions.md +9 -9
- package/corpus/core/docs/content/locales/hi-IN/template-plan.md +4 -4
- package/corpus/core/docs/content/locales/ja-JP/actions.md +9 -9
- package/corpus/core/docs/content/locales/ja-JP/template-plan.md +4 -4
- package/corpus/core/docs/content/locales/ko-KR/actions.md +9 -9
- package/corpus/core/docs/content/locales/ko-KR/template-plan.md +4 -4
- package/corpus/core/docs/content/locales/pt-BR/actions.md +9 -9
- package/corpus/core/docs/content/locales/pt-BR/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/zh-CN/actions.md +9 -9
- package/corpus/core/docs/content/locales/zh-CN/template-plan.md +4 -4
- package/corpus/core/package.json +1 -1
- package/corpus/core/scripts/generate-og-font-data.mjs +9 -5
- package/corpus/core/src/client/AgentPanel.tsx +70 -1
- package/corpus/core/src/client/AssistantChat.tsx +1 -3
- package/corpus/core/src/client/ErrorBoundary.tsx +151 -10
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +0 -62
- package/corpus/core/src/client/composer/TiptapComposer.tsx +6 -13
- package/corpus/core/src/server/og-fonts-data.ts +7 -4
- package/corpus/core/src/server/og-fonts.ts +10 -3
- package/corpus/core/src/server/social-og-image.ts +45 -6
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +199 -19
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +51 -31
- package/corpus/templates/analytics/app/components/layout/DashboardHeader.tsx +26 -16
- package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -2
- package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +8 -1
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +2 -5
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +172 -107
- package/corpus/templates/analytics/app/i18n-data.ts +1076 -5
- package/corpus/templates/analytics/app/pages/Settings.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/AdhocRouter.tsx +1 -21
- package/corpus/templates/analytics/app/pages/adhoc/DashboardSkeleton.tsx +35 -0
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +3 -23
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +3 -26
- package/corpus/templates/analytics/changelog/2026-06-24-analytics-navigation-command-palette-and-settings-now-honor-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-daily-dashboard-charts-now-use-local-day-buckets-and-show-th.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-dashboard-loading-placeholders-now-span-the-available-page-w.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-first-party-dashboard-dates-now-align-to-pacific-time-for-da.md +6 -0
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +19 -7
- package/corpus/templates/assets/app/components/layout/Header.tsx +0 -2
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +0 -2
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +0 -2
- package/corpus/templates/chat/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/clips/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/clips/app/hooks/use-library.ts +2 -0
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +3 -1
- package/corpus/templates/clips/changelog/2026-06-24-archive-and-spaces-navigation-is-more-resilient-when-sidebar.md +6 -0
- package/corpus/templates/content/app/components/layout/Header.tsx +0 -2
- package/corpus/templates/design/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/forms/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/macros/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +4 -2
- package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +18 -12
- package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +9 -5
- package/corpus/templates/mail/app/components/email/ComposeModal.tsx +36 -19
- package/corpus/templates/mail/app/components/email/EmailList.tsx +59 -55
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +7 -3
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +25 -16
- package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +25 -19
- package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +32 -17
- package/corpus/templates/mail/app/components/email/RecipientInput.tsx +26 -10
- package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +5 -3
- package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +4 -2
- package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +9 -5
- package/corpus/templates/mail/app/components/email/extensions/ComposeImageBlock.tsx +4 -2
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +168 -86
- package/corpus/templates/mail/app/components/layout/SearchBar.tsx +4 -2
- package/corpus/templates/mail/app/i18n/ar-SA.ts +212 -0
- package/corpus/templates/mail/app/i18n/de-DE.ts +212 -0
- package/corpus/templates/mail/app/i18n/en-US.ts +212 -0
- package/corpus/templates/mail/app/i18n/es-ES.ts +212 -0
- package/corpus/templates/mail/app/i18n/fr-FR.ts +212 -0
- package/corpus/templates/mail/app/i18n/hi-IN.ts +212 -0
- package/corpus/templates/mail/app/i18n/ja-JP.ts +212 -0
- package/corpus/templates/mail/app/i18n/ko-KR.ts +212 -0
- package/corpus/templates/mail/app/i18n/pt-BR.ts +212 -0
- package/corpus/templates/mail/app/i18n/zh-CN.ts +211 -0
- package/corpus/templates/mail/changelog/2026-06-24-interface-language-support-now-covers-more-mail-controls-and.md +6 -0
- package/corpus/templates/plan/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/slides/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/videos/app/components/layout/Header.tsx +1 -6
- package/dist/client/AgentPanel.d.ts +5 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +23 -4
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +1 -3
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/ErrorBoundary.d.ts.map +1 -1
- package/dist/client/ErrorBoundary.js +128 -7
- package/dist/client/ErrorBoundary.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +1 -17
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +4 -0
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +5 -9
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/server/og-fonts-data.d.ts +1 -0
- package/dist/server/og-fonts-data.d.ts.map +1 -1
- package/dist/server/og-fonts-data.js +5 -4
- package/dist/server/og-fonts-data.js.map +1 -1
- package/dist/server/og-fonts.d.ts +1 -0
- package/dist/server/og-fonts.d.ts.map +1 -1
- package/dist/server/og-fonts.js +10 -4
- package/dist/server/og-fonts.js.map +1 -1
- package/dist/server/social-og-image.d.ts.map +1 -1
- package/dist/server/social-og-image.js +33 -6
- package/dist/server/social-og-image.js.map +1 -1
- package/docs/content/locales/ar-SA/actions.md +7 -7
- package/docs/content/locales/ar-SA/template-plan.md +6 -4
- package/docs/content/locales/de-DE/actions.md +9 -9
- package/docs/content/locales/de-DE/template-plan.md +6 -4
- package/docs/content/locales/es-ES/actions.md +9 -9
- package/docs/content/locales/es-ES/template-plan.md +6 -4
- package/docs/content/locales/fr-FR/actions.md +9 -9
- package/docs/content/locales/fr-FR/template-plan.md +6 -4
- package/docs/content/locales/hi-IN/actions.md +9 -9
- package/docs/content/locales/hi-IN/template-plan.md +4 -4
- package/docs/content/locales/ja-JP/actions.md +9 -9
- package/docs/content/locales/ja-JP/template-plan.md +4 -4
- package/docs/content/locales/ko-KR/actions.md +9 -9
- package/docs/content/locales/ko-KR/template-plan.md +4 -4
- package/docs/content/locales/pt-BR/actions.md +9 -9
- package/docs/content/locales/pt-BR/template-plan.md +6 -4
- package/docs/content/locales/zh-CN/actions.md +9 -9
- package/docs/content/locales/zh-CN/template-plan.md +4 -4
- package/package.json +1 -1
|
@@ -9,10 +9,151 @@ import {
|
|
|
9
9
|
isDynamicImportFailureMessage,
|
|
10
10
|
recoverFromStaleChunkError,
|
|
11
11
|
} from "./route-chunk-recovery.js";
|
|
12
|
+
import {
|
|
13
|
+
DEFAULT_LOCALE,
|
|
14
|
+
LOCALE_HYDRATION_GLOBAL,
|
|
15
|
+
LOCALE_STORAGE_KEY,
|
|
16
|
+
normalizeLocaleCode,
|
|
17
|
+
type LocaleCode,
|
|
18
|
+
} from "../localization/shared.js";
|
|
12
19
|
|
|
13
20
|
const homeLinkClassName =
|
|
14
21
|
"mt-6 inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm hover:bg-primary/90 cursor-pointer";
|
|
15
22
|
|
|
23
|
+
const errorCopy: Record<
|
|
24
|
+
LocaleCode,
|
|
25
|
+
{
|
|
26
|
+
loadingLatest: string;
|
|
27
|
+
genericTitle: string;
|
|
28
|
+
genericDetails: string;
|
|
29
|
+
notFoundTitle: string;
|
|
30
|
+
notFoundDetails: string;
|
|
31
|
+
statusTitle: (status: number) => string;
|
|
32
|
+
goHome: string;
|
|
33
|
+
reload: string;
|
|
34
|
+
}
|
|
35
|
+
> = {
|
|
36
|
+
"en-US": {
|
|
37
|
+
loadingLatest: "Loading the latest version...",
|
|
38
|
+
genericTitle: "Something went wrong",
|
|
39
|
+
genericDetails: "An unexpected error occurred.",
|
|
40
|
+
notFoundTitle: "Page not found",
|
|
41
|
+
notFoundDetails: "We couldn't find this page.",
|
|
42
|
+
statusTitle: (status) => `${status} Error`,
|
|
43
|
+
goHome: "Go home",
|
|
44
|
+
reload: "Reload",
|
|
45
|
+
},
|
|
46
|
+
"zh-CN": {
|
|
47
|
+
loadingLatest: "正在加载最新版本...",
|
|
48
|
+
genericTitle: "出错了",
|
|
49
|
+
genericDetails: "发生了意外错误。",
|
|
50
|
+
notFoundTitle: "页面未找到",
|
|
51
|
+
notFoundDetails: "我们找不到这个页面。",
|
|
52
|
+
statusTitle: (status) => `${status} 错误`,
|
|
53
|
+
goHome: "回到首页",
|
|
54
|
+
reload: "重新加载",
|
|
55
|
+
},
|
|
56
|
+
"es-ES": {
|
|
57
|
+
loadingLatest: "Cargando la versión más reciente...",
|
|
58
|
+
genericTitle: "Algo salió mal",
|
|
59
|
+
genericDetails: "Se produjo un error inesperado.",
|
|
60
|
+
notFoundTitle: "Página no encontrada",
|
|
61
|
+
notFoundDetails: "No pudimos encontrar esta página.",
|
|
62
|
+
statusTitle: (status) => `Error ${status}`,
|
|
63
|
+
goHome: "Ir al inicio",
|
|
64
|
+
reload: "Recargar",
|
|
65
|
+
},
|
|
66
|
+
"fr-FR": {
|
|
67
|
+
loadingLatest: "Chargement de la dernière version...",
|
|
68
|
+
genericTitle: "Un problème est survenu",
|
|
69
|
+
genericDetails: "Une erreur inattendue s'est produite.",
|
|
70
|
+
notFoundTitle: "Page introuvable",
|
|
71
|
+
notFoundDetails: "Nous n'avons pas trouvé cette page.",
|
|
72
|
+
statusTitle: (status) => `Erreur ${status}`,
|
|
73
|
+
goHome: "Accueil",
|
|
74
|
+
reload: "Recharger",
|
|
75
|
+
},
|
|
76
|
+
"de-DE": {
|
|
77
|
+
loadingLatest: "Neueste Version wird geladen...",
|
|
78
|
+
genericTitle: "Etwas ist schiefgelaufen",
|
|
79
|
+
genericDetails: "Ein unerwarteter Fehler ist aufgetreten.",
|
|
80
|
+
notFoundTitle: "Seite nicht gefunden",
|
|
81
|
+
notFoundDetails: "Wir konnten diese Seite nicht finden.",
|
|
82
|
+
statusTitle: (status) => `Fehler ${status}`,
|
|
83
|
+
goHome: "Zur Startseite",
|
|
84
|
+
reload: "Neu laden",
|
|
85
|
+
},
|
|
86
|
+
"ja-JP": {
|
|
87
|
+
loadingLatest: "最新バージョンを読み込み中...",
|
|
88
|
+
genericTitle: "問題が発生しました",
|
|
89
|
+
genericDetails: "予期しないエラーが発生しました。",
|
|
90
|
+
notFoundTitle: "ページが見つかりません",
|
|
91
|
+
notFoundDetails: "このページは見つかりませんでした。",
|
|
92
|
+
statusTitle: (status) => `${status} エラー`,
|
|
93
|
+
goHome: "ホームへ",
|
|
94
|
+
reload: "再読み込み",
|
|
95
|
+
},
|
|
96
|
+
"ko-KR": {
|
|
97
|
+
loadingLatest: "최신 버전을 불러오는 중...",
|
|
98
|
+
genericTitle: "문제가 발생했습니다",
|
|
99
|
+
genericDetails: "예기치 않은 오류가 발생했습니다.",
|
|
100
|
+
notFoundTitle: "페이지를 찾을 수 없음",
|
|
101
|
+
notFoundDetails: "이 페이지를 찾을 수 없습니다.",
|
|
102
|
+
statusTitle: (status) => `${status} 오류`,
|
|
103
|
+
goHome: "홈으로 이동",
|
|
104
|
+
reload: "새로고침",
|
|
105
|
+
},
|
|
106
|
+
"pt-BR": {
|
|
107
|
+
loadingLatest: "Carregando a versão mais recente...",
|
|
108
|
+
genericTitle: "Algo deu errado",
|
|
109
|
+
genericDetails: "Ocorreu um erro inesperado.",
|
|
110
|
+
notFoundTitle: "Página não encontrada",
|
|
111
|
+
notFoundDetails: "Não encontramos esta página.",
|
|
112
|
+
statusTitle: (status) => `Erro ${status}`,
|
|
113
|
+
goHome: "Ir para início",
|
|
114
|
+
reload: "Recarregar",
|
|
115
|
+
},
|
|
116
|
+
"hi-IN": {
|
|
117
|
+
loadingLatest: "नवीनतम संस्करण लोड हो रहा है...",
|
|
118
|
+
genericTitle: "कुछ गलत हो गया",
|
|
119
|
+
genericDetails: "एक अनपेक्षित त्रुटि हुई।",
|
|
120
|
+
notFoundTitle: "पेज नहीं मिला",
|
|
121
|
+
notFoundDetails: "हमें यह पेज नहीं मिला।",
|
|
122
|
+
statusTitle: (status) => `${status} त्रुटि`,
|
|
123
|
+
goHome: "होम पर जाएं",
|
|
124
|
+
reload: "रीलोड करें",
|
|
125
|
+
},
|
|
126
|
+
"ar-SA": {
|
|
127
|
+
loadingLatest: "جار تحميل أحدث إصدار...",
|
|
128
|
+
genericTitle: "حدث خطأ ما",
|
|
129
|
+
genericDetails: "حدث خطأ غير متوقع.",
|
|
130
|
+
notFoundTitle: "الصفحة غير موجودة",
|
|
131
|
+
notFoundDetails: "تعذر العثور على هذه الصفحة.",
|
|
132
|
+
statusTitle: (status) => `خطأ ${status}`,
|
|
133
|
+
goHome: "العودة للرئيسية",
|
|
134
|
+
reload: "إعادة التحميل",
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
function readErrorLocale(): LocaleCode {
|
|
139
|
+
if (typeof window === "undefined") return DEFAULT_LOCALE;
|
|
140
|
+
const hydrated = (window as any)[LOCALE_HYDRATION_GLOBAL]?.locale;
|
|
141
|
+
const stored = window.localStorage?.getItem(LOCALE_STORAGE_KEY);
|
|
142
|
+
return (
|
|
143
|
+
normalizeLocaleCode(hydrated) ??
|
|
144
|
+
normalizeLocaleCode(stored) ??
|
|
145
|
+
DEFAULT_LOCALE
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function useErrorCopy() {
|
|
150
|
+
const [locale, setLocale] = useState<LocaleCode>(readErrorLocale);
|
|
151
|
+
useEffect(() => {
|
|
152
|
+
setLocale(readErrorLocale());
|
|
153
|
+
}, []);
|
|
154
|
+
return errorCopy[locale] ?? errorCopy[DEFAULT_LOCALE];
|
|
155
|
+
}
|
|
156
|
+
|
|
16
157
|
function useApplyThemeClass() {
|
|
17
158
|
useEffect(() => {
|
|
18
159
|
const root = document.documentElement;
|
|
@@ -57,16 +198,16 @@ function useStaleChunkRecovery(error: unknown): boolean {
|
|
|
57
198
|
}
|
|
58
199
|
|
|
59
200
|
function UpdatingScreen() {
|
|
201
|
+
const copy = useErrorCopy();
|
|
60
202
|
return (
|
|
61
203
|
<main className="flex items-center justify-center min-h-screen p-4 bg-background text-foreground">
|
|
62
|
-
<p className="text-muted-foreground text-sm">
|
|
63
|
-
Loading the latest version…
|
|
64
|
-
</p>
|
|
204
|
+
<p className="text-muted-foreground text-sm">{copy.loadingLatest}</p>
|
|
65
205
|
</main>
|
|
66
206
|
);
|
|
67
207
|
}
|
|
68
208
|
|
|
69
209
|
function ErrorScreen({ error }: { error: unknown }) {
|
|
210
|
+
const copy = useErrorCopy();
|
|
70
211
|
const recovering = useStaleChunkRecovery(error);
|
|
71
212
|
// While auto-recovering a stale chunk, show a neutral state and skip the
|
|
72
213
|
// console.error below so the transient, self-healing failure does not get
|
|
@@ -74,17 +215,17 @@ function ErrorScreen({ error }: { error: unknown }) {
|
|
|
74
215
|
if (recovering) return <UpdatingScreen />;
|
|
75
216
|
|
|
76
217
|
let status: number | null = null;
|
|
77
|
-
let title =
|
|
78
|
-
let details =
|
|
218
|
+
let title = copy.genericTitle;
|
|
219
|
+
let details = copy.genericDetails;
|
|
79
220
|
let stack: string | undefined;
|
|
80
221
|
|
|
81
222
|
if (isRouteErrorResponse(error)) {
|
|
82
223
|
status = error.status;
|
|
83
224
|
if (error.status === 404) {
|
|
84
|
-
title =
|
|
85
|
-
details =
|
|
225
|
+
title = copy.notFoundTitle;
|
|
226
|
+
details = copy.notFoundDetails;
|
|
86
227
|
} else {
|
|
87
|
-
title =
|
|
228
|
+
title = copy.statusTitle(error.status);
|
|
88
229
|
details = error.statusText || details;
|
|
89
230
|
}
|
|
90
231
|
} else if (error instanceof Error) {
|
|
@@ -122,14 +263,14 @@ function ErrorScreen({ error }: { error: unknown }) {
|
|
|
122
263
|
<h1 className="mt-3 text-2xl font-semibold">{title}</h1>
|
|
123
264
|
<p className="mt-2 text-muted-foreground text-sm">{details}</p>
|
|
124
265
|
<a href={appPath("/")} className={homeLinkClassName}>
|
|
125
|
-
|
|
266
|
+
{copy.goHome}
|
|
126
267
|
</a>
|
|
127
268
|
<button
|
|
128
269
|
type="button"
|
|
129
270
|
onClick={() => window.location.reload()}
|
|
130
271
|
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"
|
|
131
272
|
>
|
|
132
|
-
|
|
273
|
+
{copy.reload}
|
|
133
274
|
</button>
|
|
134
275
|
{stack && (
|
|
135
276
|
<pre className="mt-6 w-full text-start text-xs overflow-auto p-4 bg-muted rounded">
|
|
@@ -342,57 +342,6 @@ function ScopeBadge({
|
|
|
342
342
|
);
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
/**
|
|
346
|
-
* Empty-state addon shown when the user starts a fresh chat inside a
|
|
347
|
-
* scoped surface that already has other threads. Surfaces those threads
|
|
348
|
-
* inline so chats don't feel "lost" after the user navigates away and
|
|
349
|
-
* back — the chip popover lists them too, but this nudge is visible
|
|
350
|
-
* without any extra clicks.
|
|
351
|
-
*/
|
|
352
|
-
function PreviousScopedChatsHint({
|
|
353
|
-
scope,
|
|
354
|
-
threads,
|
|
355
|
-
onSelectThread,
|
|
356
|
-
}: {
|
|
357
|
-
scope: ChatThreadScope;
|
|
358
|
-
threads: ChatThreadSummary[];
|
|
359
|
-
onSelectThread: (id: string) => void;
|
|
360
|
-
}) {
|
|
361
|
-
const MAX_INLINE = 3;
|
|
362
|
-
const shown = threads.slice(0, MAX_INLINE);
|
|
363
|
-
const remaining = threads.length - shown.length;
|
|
364
|
-
const scopeLabel = scope.label || `this ${formatScopeType(scope.type)}`;
|
|
365
|
-
return (
|
|
366
|
-
<div className="flex w-full max-w-[280px] flex-col gap-1.5">
|
|
367
|
-
<div className="text-[10px] uppercase tracking-wider text-muted-foreground/70 text-center">
|
|
368
|
-
Previous chats for {scopeLabel}
|
|
369
|
-
</div>
|
|
370
|
-
<div className="flex flex-col gap-1">
|
|
371
|
-
{shown.map((thread) => (
|
|
372
|
-
<button
|
|
373
|
-
key={thread.id}
|
|
374
|
-
type="button"
|
|
375
|
-
onClick={() => onSelectThread(thread.id)}
|
|
376
|
-
className="flex items-baseline justify-between gap-2 rounded-md border border-border px-2.5 py-1.5 text-start hover:bg-accent cursor-pointer"
|
|
377
|
-
>
|
|
378
|
-
<span className="truncate text-[12px] text-foreground">
|
|
379
|
-
{thread.title || thread.preview || "Chat"}
|
|
380
|
-
</span>
|
|
381
|
-
<span className="shrink-0 text-[10px] text-muted-foreground">
|
|
382
|
-
{formatThreadTime(thread.updatedAt)}
|
|
383
|
-
</span>
|
|
384
|
-
</button>
|
|
385
|
-
))}
|
|
386
|
-
</div>
|
|
387
|
-
{remaining > 0 && (
|
|
388
|
-
<div className="text-[10px] text-muted-foreground/70 text-center">
|
|
389
|
-
+{remaining} more
|
|
390
|
-
</div>
|
|
391
|
-
)}
|
|
392
|
-
</div>
|
|
393
|
-
);
|
|
394
|
-
}
|
|
395
|
-
|
|
396
345
|
/**
|
|
397
346
|
* Thin confirmation banner shown briefly after detach. The chip itself
|
|
398
347
|
* unmounts the moment scope clears on the active thread, so this banner
|
|
@@ -2777,17 +2726,6 @@ export function MultiTabAssistantChat({
|
|
|
2777
2726
|
? `Ask about ${tabScope.label}`
|
|
2778
2727
|
: props.emptyStateText
|
|
2779
2728
|
}
|
|
2780
|
-
emptyStateAddon={
|
|
2781
|
-
tabId === activeThreadId &&
|
|
2782
|
-
tabScope &&
|
|
2783
|
-
otherScopedThreads.length > 0 ? (
|
|
2784
|
-
<PreviousScopedChatsHint
|
|
2785
|
-
scope={tabScope}
|
|
2786
|
-
threads={otherScopedThreads}
|
|
2787
|
-
onSelectThread={openFromHistory}
|
|
2788
|
-
/>
|
|
2789
|
-
) : undefined
|
|
2790
|
-
}
|
|
2791
2729
|
ref={(handle) => {
|
|
2792
2730
|
if (handle) {
|
|
2793
2731
|
chatRefs.current.set(tabId, handle);
|
|
@@ -596,6 +596,11 @@ const FRIENDLY_MODEL_NAMES: Record<string, string> = {
|
|
|
596
596
|
"deepseek-v3-1": "DeepSeek v3.1",
|
|
597
597
|
};
|
|
598
598
|
|
|
599
|
+
export const MODEL_SELECTOR_POPOVER_STYLE = {
|
|
600
|
+
fontSize: 13,
|
|
601
|
+
maxHeight: "min(500px, var(--radix-popover-content-available-height, 500px))",
|
|
602
|
+
} satisfies React.CSSProperties;
|
|
603
|
+
|
|
599
604
|
function friendlyModelName(model: string): string {
|
|
600
605
|
if (FRIENDLY_MODEL_NAMES[model]) return FRIENDLY_MODEL_NAMES[model];
|
|
601
606
|
// Claude: claude-{tier}-{major}-{minor}[-dateYYYYMMDD] → Tier Major.Minor
|
|
@@ -835,19 +840,7 @@ function ModelSelector({
|
|
|
835
840
|
collisionPadding={8}
|
|
836
841
|
data-agent-native-composer-popover="true"
|
|
837
842
|
className="z-[260] box-border w-72 overflow-y-auto rounded-lg border-border p-0 py-1 shadow-lg"
|
|
838
|
-
style={
|
|
839
|
-
providerGroups.length > 0
|
|
840
|
-
? {
|
|
841
|
-
fontSize: 13,
|
|
842
|
-
height:
|
|
843
|
-
"min(500px, var(--radix-popover-content-available-height, 500px))",
|
|
844
|
-
}
|
|
845
|
-
: {
|
|
846
|
-
fontSize: 13,
|
|
847
|
-
maxHeight:
|
|
848
|
-
"min(500px, var(--radix-popover-content-available-height, 500px))",
|
|
849
|
-
}
|
|
850
|
-
}
|
|
843
|
+
style={MODEL_SELECTOR_POPOVER_STYLE}
|
|
851
844
|
>
|
|
852
845
|
{showBuilderCta && (
|
|
853
846
|
<>
|