@nextclaw/ui 0.12.8 → 0.12.9
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/CHANGELOG.md +35 -0
- package/dist/assets/ChannelsList-Ita2Zm1_.js +8 -0
- package/dist/assets/{DocBrowser-BMxf9CIK.js → DocBrowser-6ReNjvzF.js} +1 -1
- package/dist/assets/DocBrowser-BNwbPHf4.js +1 -0
- package/dist/assets/{DocBrowserContext-Ce28gRXt.js → DocBrowserContext-B6SpA7Qs.js} +1 -1
- package/dist/assets/{LogoBadge-o92MOA2L.js → LogoBadge-ByNLYg65.js} +1 -1
- package/dist/assets/MarketplacePage-CjX2MWww.js +1 -0
- package/dist/assets/{MarketplacePage-BySqkYDh.js → MarketplacePage-D0sDlYX4.js} +1 -1
- package/dist/assets/McpMarketplacePage-BGKJm1sJ.js +40 -0
- package/dist/assets/{ModelConfig-IrmzoslW.js → ModelConfig-BzZenCH-.js} +1 -1
- package/dist/assets/{ProviderScopedModelInput-CmTIzgI7.js → ProviderScopedModelInput-Da7khnBA.js} +1 -1
- package/dist/assets/{ProvidersList-8_Kalfwl.js → ProvidersList-BbVzRxjY.js} +1 -1
- package/dist/assets/RemoteAccessPage-BaDH_X1Q.js +1 -0
- package/dist/assets/RuntimeConfig-F_XKGgLm.js +1 -0
- package/dist/assets/{SearchConfig-DNBR-UbE.js → SearchConfig-BGkzXQP-.js} +1 -1
- package/dist/assets/{SecretsConfig-Ba1RPJaG.js → SecretsConfig-D281Rotl.js} +2 -2
- package/dist/assets/{SessionsConfig-Doqp5ghH.js → SessionsConfig-ChHQ7M5c.js} +2 -2
- package/dist/assets/{app-query-client-DniXoIN5.js → app-query-client-VnFElj4E.js} +1 -1
- package/dist/assets/{book-open-DocgeQtR.js → book-open-BdcxxoQu.js} +1 -1
- package/dist/assets/chat-page-Doe0yTtB.js +58 -0
- package/dist/assets/chat-session-display-cw78aiI_.js +1 -0
- package/dist/assets/{chunk-JZWAC4HX-BvKvh1R8.js → chunk-JZWAC4HX-DK5HPmIK.js} +1 -1
- package/dist/assets/{client-CVqPF5ie.js → client-_i4MU2bB.js} +1 -1
- package/dist/assets/{config-Bop2oB18.js → config-DtIQwrHF.js} +1 -1
- package/dist/assets/{createLucideIcon-DVv8taGY.js → createLucideIcon-BSeTgkZW.js} +1 -1
- package/dist/assets/desktop-update-config-Dpcf4BKG.js +1 -0
- package/dist/assets/{dist-Da5Gm_pO.js → dist-6TrrnPCR.js} +1 -1
- package/dist/assets/{dist-DmAlInRu.js → dist-ccBFUi-o.js} +1 -1
- package/dist/assets/download-BhDxnyvU.js +1 -0
- package/dist/assets/{external-link-DFjw3x1B.js → external-link-BgErLCNT.js} +1 -1
- package/dist/assets/{hash-DJtaCejM.js → hash-Bl7dr_UG.js} +1 -1
- package/dist/assets/i18n-eDHeDY0n.js +1 -0
- package/dist/assets/index-CF9xve0E.js +6 -0
- package/dist/assets/index-FgA52VBt.css +1 -0
- package/dist/assets/{infiniteQueryBehavior-DHSEQ3OH.js → infiniteQueryBehavior-ZDS92Qpp.js} +1 -1
- package/dist/assets/loader-circle-ACM1s51e.js +1 -0
- package/dist/assets/{logos-DEFUIR12.js → logos-x89HbrZ4.js} +1 -1
- package/dist/assets/{page-layout-Da3i3r6G.js → page-layout-vZnghcFy.js} +1 -1
- package/dist/assets/play-CFUwCA2E.js +1 -0
- package/dist/assets/plus-rYsv72JG.js +1 -0
- package/dist/assets/{popover-C_mWOFzI.js → popover-Bg1VoTZ6.js} +1 -1
- package/dist/assets/{refresh-ccw-D6HkNtfz.js → refresh-ccw-DT98i__E.js} +1 -1
- package/dist/assets/{refresh-cw-DRcvRrnc.js → refresh-cw-C47QSEwg.js} +1 -1
- package/dist/assets/{rotate-cw-BmDKfXtH.js → rotate-cw-JtFzpNn6.js} +1 -1
- package/dist/assets/{save-DHGmi2e9.js → save-3S6-H3Xw.js} +1 -1
- package/dist/assets/search-3kFR_zh9.js +1 -0
- package/dist/assets/{security-config-CbXfPZzr.js → security-config-BWaiARNk.js} +1 -1
- package/dist/assets/{select-Caud8QvU.js → select-DJ2MUjBB.js} +1 -1
- package/dist/assets/skeleton-ByQepn0M.js +1 -0
- package/dist/assets/{status-dot-DurKKSwA.js → status-dot-vbanNPFU.js} +1 -1
- package/dist/assets/{switch-0rmPBRKI.js → switch-BsLtHOH-.js} +1 -1
- package/dist/assets/{tabs-custom-5JLVL6v8.js → tabs-custom-D3HYMt6k.js} +1 -1
- package/dist/assets/{trash-2-C6caKPoz.js → trash-2-G48scll7.js} +1 -1
- package/dist/assets/{use-infinite-scroll-loader-dwnaa_qi.js → use-infinite-scroll-loader-DkNhD-42.js} +1 -1
- package/dist/assets/{useConfirmDialog-mMeWD_yo.js → useConfirmDialog-BkvTN-vd.js} +1 -1
- package/dist/assets/{useMutation-BmxxvCNf.js → useMutation-CBWjE2uj.js} +1 -1
- package/dist/assets/x-ByDbItbq.js +1 -0
- package/dist/index.html +95 -21
- package/dist/manifest.webmanifest +30 -0
- package/dist/offline.html +102 -0
- package/dist/pwa-192.png +0 -0
- package/dist/pwa-512.png +0 -0
- package/dist/sw.js +80 -0
- package/index.html +73 -1
- package/package.json +6 -6
- package/public/manifest.webmanifest +30 -0
- package/public/offline.html +102 -0
- package/public/pwa-192.png +0 -0
- package/public/pwa-512.png +0 -0
- package/public/sw.js +80 -0
- package/src/api/server-path.ts +27 -4
- package/src/api/types.ts +17 -10
- package/src/app.tsx +9 -0
- package/src/components/chat/ChatSidebar.test.tsx +43 -1
- package/src/components/chat/ChatSidebar.tsx +24 -0
- package/src/components/chat/adapters/chat-message.summary-truncation.test.ts +66 -0
- package/src/components/chat/adapters/file-operation/card.ts +9 -0
- package/src/components/chat/adapters/file-operation/diff.ts +14 -0
- package/src/components/chat/{ChatConversationPanel.test.tsx → chat-conversation-panel.test.tsx} +107 -206
- package/src/components/chat/chat-conversation-panel.tsx +412 -0
- package/src/components/chat/chat-page-shell.tsx +1 -1
- package/src/components/chat/chat-session-workspace-file-preview.test.tsx +91 -0
- package/src/components/chat/chat-session-workspace-file-preview.tsx +307 -0
- package/src/components/chat/chat-session-workspace-panel-nav.tsx +197 -0
- package/src/components/chat/chat-session-workspace-panel.tsx +318 -0
- package/src/components/chat/chat-sidebar-session-item.tsx +32 -2
- package/src/components/chat/containers/chat-message-list.container.test.tsx +49 -0
- package/src/components/chat/containers/chat-message-list.container.tsx +4 -0
- package/src/components/chat/managers/chat-session-list.manager.test.ts +12 -0
- package/src/components/chat/managers/chat-session-list.manager.ts +7 -0
- package/src/components/chat/ncp/ncp-chat-page.tsx +7 -7
- package/src/components/chat/ncp/ncp-chat-thread.manager.ts +179 -41
- package/src/components/chat/ncp/ncp-session-adapter.test.ts +35 -1
- package/src/components/chat/ncp/ncp-session-adapter.ts +17 -0
- package/src/components/chat/ncp/page/ncp-chat-derived-state.ts +54 -11
- package/src/components/chat/ncp/tests/ncp-chat-thread.manager.test.ts +189 -0
- package/src/components/chat/presenter/chat-presenter-context.tsx +13 -2
- package/src/components/chat/session-header/chat-session-header-actions.test.tsx +26 -0
- package/src/components/chat/session-header/chat-session-header-actions.tsx +19 -1
- package/src/components/chat/stores/chat-thread.store.ts +24 -0
- package/src/components/config/RuntimeConfig.tsx +141 -2
- package/src/components/layout/AppLayout.tsx +1 -1
- package/src/components/providers/ThemeProvider.tsx +5 -0
- package/src/hooks/server-path/use-server-path-read.ts +20 -0
- package/src/lib/chat-message.ts +14 -3
- package/src/lib/i18n.chat.ts +12 -1
- package/src/lib/i18n.pwa.ts +62 -0
- package/src/lib/i18n.ts +2 -2
- package/src/pwa/components/pwa-install-entry.test.tsx +110 -0
- package/src/pwa/components/pwa-install-entry.tsx +205 -0
- package/src/pwa/managers/pwa-install.manager.test.ts +160 -0
- package/src/pwa/managers/pwa-install.manager.ts +232 -0
- package/src/pwa/managers/pwa-runtime.manager.ts +196 -0
- package/src/pwa/managers/pwa-shell-theme.manager.test.ts +30 -0
- package/src/pwa/managers/pwa-shell-theme.manager.ts +46 -0
- package/src/pwa/pwa-install-banner.storage.ts +55 -0
- package/src/pwa/pwa.types.ts +22 -0
- package/src/pwa/register-pwa.ts +14 -0
- package/src/pwa/stores/pwa.store.ts +17 -0
- package/src/vite-env.d.ts +9 -0
- package/dist/assets/ChannelsList-KIQIxluX.js +0 -8
- package/dist/assets/DocBrowser-CyDgAtO9.js +0 -1
- package/dist/assets/MarketplacePage-C0olZaek.js +0 -1
- package/dist/assets/McpMarketplacePage-DqKaiXO9.js +0 -40
- package/dist/assets/RemoteAccessPage-CyQlSjPf.js +0 -1
- package/dist/assets/RuntimeConfig-Bk0uYBhf.js +0 -1
- package/dist/assets/chat-page-Bph8M5zo.js +0 -58
- package/dist/assets/chat-session-display-CoN3Wmn-.js +0 -1
- package/dist/assets/desktop-update-config-1KBrqLBC.js +0 -1
- package/dist/assets/i18n-CwHZ-9vt.js +0 -1
- package/dist/assets/index-DafCdM4F.css +0 -1
- package/dist/assets/index-DdksE6U3.js +0 -6
- package/dist/assets/loader-circle-PsSP0H9n.js +0 -1
- package/dist/assets/play-DBQbBxTA.js +0 -1
- package/dist/assets/plus-DUOVbsyQ.js +0 -1
- package/dist/assets/search-MChQRYR1.js +0 -1
- package/dist/assets/skeleton-B-4vRq_Z.js +0 -1
- package/dist/assets/x-DuMhMATD.js +0 -1
- package/src/components/chat/ChatConversationPanel.tsx +0 -256
- package/src/components/chat/chat-child-session-panel.tsx +0 -270
- /package/dist/assets/{config-hints-BZoDjXye.js → config-hints-BhTmc9P1.js} +0 -0
- /package/dist/assets/{config-layout-DmlGaay2.js → config-layout-CHs0mAaR.js} +0 -0
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from "react";
|
|
2
|
-
import { ArrowLeft, Loader2, X } from "lucide-react";
|
|
3
|
-
import { useStickyBottomScroll } from "@nextclaw/agent-chat-ui";
|
|
4
|
-
import { ChatMessageListContainer } from "@/components/chat/containers/chat-message-list.container";
|
|
5
|
-
import {
|
|
6
|
-
useNcpChildSessionTabsView,
|
|
7
|
-
type ResolvedChildSessionTab,
|
|
8
|
-
} from "@/components/chat/ncp/session-conversation/use-ncp-child-session-tabs-view";
|
|
9
|
-
import { useNcpSessionConversation } from "@/components/chat/ncp/session-conversation/use-ncp-session-conversation";
|
|
10
|
-
import {
|
|
11
|
-
shouldShowUnreadSessionIndicator,
|
|
12
|
-
useChatSessionListStore,
|
|
13
|
-
} from "@/components/chat/stores/chat-session-list.store";
|
|
14
|
-
import { usePresenter } from "@/components/chat/presenter/chat-presenter-context";
|
|
15
|
-
import type { ChatChildSessionTab } from "@/components/chat/stores/chat-thread.store";
|
|
16
|
-
import { AgentIdentityAvatar } from "@/components/common/agent-identity";
|
|
17
|
-
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|
18
|
-
import { t } from "@/lib/i18n";
|
|
19
|
-
import { cn } from "@/lib/utils";
|
|
20
|
-
import type { ChatToolActionViewModel } from "@nextclaw/agent-chat-ui";
|
|
21
|
-
|
|
22
|
-
type ChatChildSessionPanelProps = {
|
|
23
|
-
tabs: readonly ChatChildSessionTab[];
|
|
24
|
-
activeSessionKey: string;
|
|
25
|
-
onSelectSession: (sessionKey: string) => void;
|
|
26
|
-
onClose: () => void;
|
|
27
|
-
onBackToParent: () => void;
|
|
28
|
-
onToolAction?: (action: ChatToolActionViewModel) => void;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
function ChildSessionPanelConversation({
|
|
32
|
-
sessionKey,
|
|
33
|
-
onToolAction,
|
|
34
|
-
}: {
|
|
35
|
-
sessionKey: string;
|
|
36
|
-
onToolAction?: (action: ChatToolActionViewModel) => void;
|
|
37
|
-
}) {
|
|
38
|
-
const agent = useNcpSessionConversation(sessionKey);
|
|
39
|
-
const messages = agent.visibleMessages;
|
|
40
|
-
const scrollRef = useRef<HTMLDivElement>(null);
|
|
41
|
-
const { onScroll } = useStickyBottomScroll({
|
|
42
|
-
scrollRef,
|
|
43
|
-
resetKey: sessionKey,
|
|
44
|
-
isLoading: agent.isHydrating,
|
|
45
|
-
hasContent: messages.length > 0,
|
|
46
|
-
contentVersion: messages[messages.length - 1] ?? null,
|
|
47
|
-
stickyThresholdPx: 20,
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<div
|
|
52
|
-
ref={scrollRef}
|
|
53
|
-
onScroll={onScroll}
|
|
54
|
-
className="h-full overflow-y-auto custom-scrollbar"
|
|
55
|
-
>
|
|
56
|
-
{agent.isHydrating ? (
|
|
57
|
-
<div className="flex h-full items-center justify-center text-sm text-gray-500">
|
|
58
|
-
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
|
|
59
|
-
{t("chatChildSessionLoading")}
|
|
60
|
-
</div>
|
|
61
|
-
) : agent.hydrateError ? (
|
|
62
|
-
<div className="px-4 py-5 text-sm text-rose-600">
|
|
63
|
-
{agent.hydrateError.message}
|
|
64
|
-
</div>
|
|
65
|
-
) : messages.length === 0 && !agent.isRunning ? (
|
|
66
|
-
<div className="px-4 py-5 text-sm text-gray-500">
|
|
67
|
-
{t("chatChildSessionEmpty")}
|
|
68
|
-
</div>
|
|
69
|
-
) : (
|
|
70
|
-
<div className="px-4 py-5">
|
|
71
|
-
<ChatMessageListContainer
|
|
72
|
-
messages={messages}
|
|
73
|
-
isSending={agent.isRunning}
|
|
74
|
-
onToolAction={onToolAction}
|
|
75
|
-
/>
|
|
76
|
-
</div>
|
|
77
|
-
)}
|
|
78
|
-
</div>
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function ChildSessionPanelMetaChip({ value }: { value: string }) {
|
|
83
|
-
return (
|
|
84
|
-
<span className="inline-flex max-w-full items-center rounded-full border border-gray-200/80 bg-gray-50/90 px-2.5 py-1 text-[11px] font-medium text-gray-600">
|
|
85
|
-
<span className="truncate">{value}</span>
|
|
86
|
-
</span>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function ChildSessionPanelMetaStrip({ tab }: { tab: ResolvedChildSessionTab }) {
|
|
91
|
-
const metaItems = [
|
|
92
|
-
tab.sessionTypeLabel,
|
|
93
|
-
tab.preferredModel,
|
|
94
|
-
tab.projectName,
|
|
95
|
-
].filter((value): value is string => Boolean(value?.trim()));
|
|
96
|
-
|
|
97
|
-
if (metaItems.length === 0 && !tab.projectRoot) {
|
|
98
|
-
return null;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return (
|
|
102
|
-
<div className="mt-3 space-y-2">
|
|
103
|
-
{metaItems.length > 0 ? (
|
|
104
|
-
<div className="flex flex-wrap gap-1.5">
|
|
105
|
-
{metaItems.map((item) => (
|
|
106
|
-
<ChildSessionPanelMetaChip key={item} value={item} />
|
|
107
|
-
))}
|
|
108
|
-
</div>
|
|
109
|
-
) : null}
|
|
110
|
-
{tab.projectRoot ? (
|
|
111
|
-
<div
|
|
112
|
-
title={tab.projectRoot}
|
|
113
|
-
className="truncate rounded-xl border border-gray-200/70 bg-gray-50/80 px-2.5 py-2 font-mono text-[11px] text-gray-500"
|
|
114
|
-
>
|
|
115
|
-
{tab.projectRoot}
|
|
116
|
-
</div>
|
|
117
|
-
) : null}
|
|
118
|
-
</div>
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export function ChatChildSessionPanel({
|
|
123
|
-
tabs,
|
|
124
|
-
activeSessionKey,
|
|
125
|
-
onSelectSession,
|
|
126
|
-
onClose,
|
|
127
|
-
onBackToParent,
|
|
128
|
-
onToolAction,
|
|
129
|
-
}: ChatChildSessionPanelProps) {
|
|
130
|
-
const presenter = usePresenter();
|
|
131
|
-
const resolvedTabs = useNcpChildSessionTabsView(tabs);
|
|
132
|
-
const optimisticReadAtBySessionKey = useChatSessionListStore(
|
|
133
|
-
(state) => state.optimisticReadAtBySessionKey,
|
|
134
|
-
);
|
|
135
|
-
const activeTab =
|
|
136
|
-
resolvedTabs.find((tab) => tab.sessionKey === activeSessionKey) ??
|
|
137
|
-
resolvedTabs[0] ??
|
|
138
|
-
null;
|
|
139
|
-
const activeTabSessionKey = activeTab?.sessionKey ?? null;
|
|
140
|
-
const activeTabReadAt = activeTab?.lastMessageAt?.trim() ?? null;
|
|
141
|
-
const hasParentSession = resolvedTabs.some((tab) =>
|
|
142
|
-
Boolean(tab.parentSessionKey),
|
|
143
|
-
);
|
|
144
|
-
const shouldShowTabs = resolvedTabs.length > 1;
|
|
145
|
-
|
|
146
|
-
useEffect(() => {
|
|
147
|
-
const syncActiveTabReadState = () => {
|
|
148
|
-
if (!activeTabSessionKey || !activeTabReadAt) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
presenter.chatSessionListManager.markSessionRead(
|
|
152
|
-
activeTabSessionKey,
|
|
153
|
-
activeTabReadAt,
|
|
154
|
-
activeTab?.readAt ?? null,
|
|
155
|
-
);
|
|
156
|
-
};
|
|
157
|
-
syncActiveTabReadState();
|
|
158
|
-
}, [activeTab?.readAt, activeTabReadAt, activeTabSessionKey, presenter]);
|
|
159
|
-
|
|
160
|
-
if (!activeTab) {
|
|
161
|
-
return null;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
return (
|
|
165
|
-
<aside className="hidden md:flex md:w-[24rem] lg:w-[28rem] shrink-0 border-l border-gray-200/70 bg-white/90 backdrop-blur-sm">
|
|
166
|
-
<div className="flex h-full min-h-0 w-full flex-col">
|
|
167
|
-
<div className="border-b border-gray-200/70 px-4 py-3">
|
|
168
|
-
<div className="flex items-center justify-between gap-3">
|
|
169
|
-
<button
|
|
170
|
-
type="button"
|
|
171
|
-
onClick={onBackToParent}
|
|
172
|
-
className={cn(
|
|
173
|
-
"inline-flex items-center gap-1 text-xs font-medium text-gray-600 transition-colors hover:text-gray-900",
|
|
174
|
-
!hasParentSession && "pointer-events-none opacity-0",
|
|
175
|
-
)}
|
|
176
|
-
>
|
|
177
|
-
<ArrowLeft className="h-3.5 w-3.5" />
|
|
178
|
-
<span>{t("chatBackToParent")}</span>
|
|
179
|
-
</button>
|
|
180
|
-
<button
|
|
181
|
-
type="button"
|
|
182
|
-
onClick={onClose}
|
|
183
|
-
className="rounded-full border border-gray-200/80 p-1.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900"
|
|
184
|
-
aria-label={t("chatChildSessionClosePanel")}
|
|
185
|
-
>
|
|
186
|
-
<X className="h-4 w-4" />
|
|
187
|
-
</button>
|
|
188
|
-
</div>
|
|
189
|
-
{!shouldShowTabs ? (
|
|
190
|
-
<div className="mt-3 flex min-w-0 items-center gap-2 text-sm font-semibold text-gray-900">
|
|
191
|
-
{activeTab.agentId ? (
|
|
192
|
-
<AgentIdentityAvatar
|
|
193
|
-
agentId={activeTab.agentId}
|
|
194
|
-
className="h-5 w-5 shrink-0"
|
|
195
|
-
/>
|
|
196
|
-
) : null}
|
|
197
|
-
<span className="truncate" title={activeTab.sessionKey}>
|
|
198
|
-
{activeTab.title}
|
|
199
|
-
</span>
|
|
200
|
-
</div>
|
|
201
|
-
) : null}
|
|
202
|
-
{shouldShowTabs ? (
|
|
203
|
-
<div className="mt-3 overflow-x-auto custom-scrollbar">
|
|
204
|
-
<Tabs value={activeSessionKey} onValueChange={onSelectSession}>
|
|
205
|
-
<TabsList className="h-auto min-w-max justify-start gap-1.5 rounded-none bg-transparent p-0 text-gray-500">
|
|
206
|
-
{resolvedTabs.map((tab) => {
|
|
207
|
-
const optimisticReadAt = optimisticReadAtBySessionKey[tab.sessionKey];
|
|
208
|
-
const effectiveReadAt =
|
|
209
|
-
optimisticReadAt && tab.readAt
|
|
210
|
-
? (optimisticReadAt.localeCompare(tab.readAt) > 0
|
|
211
|
-
? optimisticReadAt
|
|
212
|
-
: tab.readAt)
|
|
213
|
-
: optimisticReadAt ?? tab.readAt;
|
|
214
|
-
const showUnreadDot = shouldShowUnreadSessionIndicator({
|
|
215
|
-
active: tab.sessionKey === activeSessionKey,
|
|
216
|
-
lastMessageAt: tab.lastMessageAt,
|
|
217
|
-
readAt: effectiveReadAt,
|
|
218
|
-
runStatus: tab.runStatus,
|
|
219
|
-
});
|
|
220
|
-
return (
|
|
221
|
-
<TabsTrigger
|
|
222
|
-
key={tab.sessionKey}
|
|
223
|
-
value={tab.sessionKey}
|
|
224
|
-
className="gap-2 rounded-full border border-gray-200/80 bg-white/85 px-2.5 py-1.5 text-xs font-medium text-gray-600 shadow-none hover:border-primary/30 hover:text-primary data-[state=active]:border-primary/30 data-[state=active]:bg-primary-50/70 data-[state=active]:text-primary data-[state=active]:shadow-sm"
|
|
225
|
-
>
|
|
226
|
-
{tab.agentId ? (
|
|
227
|
-
<AgentIdentityAvatar
|
|
228
|
-
agentId={tab.agentId}
|
|
229
|
-
className="h-4 w-4 shrink-0"
|
|
230
|
-
/>
|
|
231
|
-
) : null}
|
|
232
|
-
<span className="max-w-[132px] truncate">
|
|
233
|
-
{tab.title}
|
|
234
|
-
</span>
|
|
235
|
-
{showUnreadDot ? (
|
|
236
|
-
<span
|
|
237
|
-
aria-label={t("chatSessionUnread")}
|
|
238
|
-
className="h-2 w-2 shrink-0 rounded-full bg-primary"
|
|
239
|
-
/>
|
|
240
|
-
) : null}
|
|
241
|
-
</TabsTrigger>
|
|
242
|
-
);
|
|
243
|
-
})}
|
|
244
|
-
</TabsList>
|
|
245
|
-
</Tabs>
|
|
246
|
-
</div>
|
|
247
|
-
) : null}
|
|
248
|
-
<ChildSessionPanelMetaStrip tab={activeTab} />
|
|
249
|
-
</div>
|
|
250
|
-
|
|
251
|
-
<div className="flex-1 min-h-0">
|
|
252
|
-
{resolvedTabs.map((tab) => (
|
|
253
|
-
<div
|
|
254
|
-
key={tab.sessionKey}
|
|
255
|
-
className={cn(
|
|
256
|
-
"h-full",
|
|
257
|
-
tab.sessionKey === activeSessionKey ? "block" : "hidden",
|
|
258
|
-
)}
|
|
259
|
-
>
|
|
260
|
-
<ChildSessionPanelConversation
|
|
261
|
-
sessionKey={tab.sessionKey}
|
|
262
|
-
onToolAction={onToolAction}
|
|
263
|
-
/>
|
|
264
|
-
</div>
|
|
265
|
-
))}
|
|
266
|
-
</div>
|
|
267
|
-
</div>
|
|
268
|
-
</aside>
|
|
269
|
-
);
|
|
270
|
-
}
|
|
File without changes
|
|
File without changes
|