@nextclaw/ui 0.12.9 → 0.12.10
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 +61 -0
- package/dist/assets/ChannelsList-M9FTK1Ak.js +8 -0
- package/dist/assets/DocBrowser-CH7-GxlL.js +1 -0
- package/dist/assets/{DocBrowser-6ReNjvzF.js → DocBrowser-DMfr0Oow.js} +1 -1
- package/dist/assets/{DocBrowserContext-B6SpA7Qs.js → DocBrowserContext-BXydqby-.js} +1 -1
- package/dist/assets/{LogoBadge-ByNLYg65.js → LogoBadge-hO7tY7hE.js} +1 -1
- package/dist/assets/ModelConfig-CNIgLf0e.js +1 -0
- package/dist/assets/{ProviderScopedModelInput-Da7khnBA.js → ProviderScopedModelInput-B3HWP4oz.js} +1 -1
- package/dist/assets/ProvidersList-CHjMnRhX.js +1 -0
- package/dist/assets/RuntimeConfig-psp8nMSG.js +1 -0
- package/dist/assets/SearchConfig-CSoKip1f.js +1 -0
- package/dist/assets/{SecretsConfig-D281Rotl.js → SecretsConfig-MEt6MjuD.js} +2 -2
- package/dist/assets/SessionsConfig-DifCiXwR.js +2 -0
- package/dist/assets/{app-query-client-VnFElj4E.js → app-query-client-9jNewezV.js} +1 -1
- package/dist/assets/{book-open-BdcxxoQu.js → book-open-DzdUViDm.js} +1 -1
- package/dist/assets/chat-page-CLp0UV0Y.js +58 -0
- package/dist/assets/chat-session-display-DsYHx0RZ.js +1 -0
- package/dist/assets/{chunk-JZWAC4HX-DK5HPmIK.js → chunk-JZWAC4HX-C5dEc8hV.js} +1 -1
- package/dist/assets/{client-_i4MU2bB.js → client-C-8fH7-c.js} +1 -1
- package/dist/assets/{config-DtIQwrHF.js → config-CBScxsdV.js} +1 -1
- package/dist/assets/config-split-page-BUout_Ak.js +1 -0
- package/dist/assets/{createLucideIcon-BSeTgkZW.js → createLucideIcon-dy5ie7Ox.js} +1 -1
- package/dist/assets/desktop-update-config-2BS6BMkW.js +1 -0
- package/dist/assets/{dist-ccBFUi-o.js → dist-BruyLa92.js} +1 -1
- package/dist/assets/{dist-6TrrnPCR.js → dist-Cy7_j6hA.js} +1 -1
- package/dist/assets/{download-BhDxnyvU.js → download-BD0ETkB-.js} +1 -1
- package/dist/assets/{external-link-BgErLCNT.js → external-link-kZSAO8nT.js} +1 -1
- package/dist/assets/{hash-Bl7dr_UG.js → hash-BHJC2Ovu.js} +1 -1
- package/dist/assets/{i18n-eDHeDY0n.js → i18n-CpTZLchQ.js} +1 -1
- package/dist/assets/index-mW8W2FUu.css +1 -0
- package/dist/assets/index-zDZfXoI4.js +6 -0
- package/dist/assets/{infiniteQueryBehavior-ZDS92Qpp.js → infiniteQueryBehavior-CyER9hv0.js} +1 -1
- package/dist/assets/loader-circle-Bc2gCU33.js +1 -0
- package/dist/assets/{logos-x89HbrZ4.js → logos-B7gRObP8.js} +1 -1
- package/dist/assets/marketplace-page-3qVMnF3d.js +1 -0
- package/dist/assets/marketplace-page-BhFIeQzI.js +49 -0
- package/dist/assets/mcp-marketplace-page-DYfteJ1D.js +40 -0
- package/dist/assets/{page-layout-vZnghcFy.js → page-layout-0UcO9H9Z.js} +1 -1
- package/dist/assets/play-CKDjSQFL.js +1 -0
- package/dist/assets/plus-CG0QrVY_.js +1 -0
- package/dist/assets/{refresh-ccw-DT98i__E.js → refresh-ccw-COVhNHtN.js} +1 -1
- package/dist/assets/{refresh-cw-C47QSEwg.js → refresh-cw-Bcv40SXy.js} +1 -1
- package/dist/assets/remote-access-page-CWHG-sug.js +1 -0
- package/dist/assets/{rotate-cw-JtFzpNn6.js → rotate-cw-oHMKJMC8.js} +1 -1
- package/dist/assets/{save-3S6-H3Xw.js → save-EqJPOF0G.js} +1 -1
- package/dist/assets/search-BCAlB8nz.js +1 -0
- package/dist/assets/security-config-Slh0Mayz.js +1 -0
- package/dist/assets/select-CVz0t7MF.js +41 -0
- package/dist/assets/setting-row-CbVHAuQt.js +1 -0
- package/dist/assets/skeleton-D5rdKvzy.js +1 -0
- package/dist/assets/{status-dot-vbanNPFU.js → status-dot-DpPtVzQT.js} +1 -1
- package/dist/assets/{switch-BsLtHOH-.js → switch-CM29eCAR.js} +1 -1
- package/dist/assets/{tabs-custom-D3HYMt6k.js → tabs-custom-YcZUWn3o.js} +1 -1
- package/dist/assets/tag-chip-DMXdnLcj.js +1 -0
- package/dist/assets/{trash-2-G48scll7.js → trash-2-mJT6oWa2.js} +1 -1
- package/dist/assets/{use-infinite-scroll-loader-DkNhD-42.js → use-infinite-scroll-loader-DJ1L81Dz.js} +1 -1
- package/dist/assets/{useConfirmDialog-BkvTN-vd.js → useConfirmDialog-BsVuqu1x.js} +1 -1
- package/dist/assets/{useMutation-CBWjE2uj.js → useMutation-CNcz2fgt.js} +1 -1
- package/dist/assets/x-Czwxm82I.js +1 -0
- package/dist/index.html +22 -22
- package/dist/runtime-icons/claude.ico +0 -0
- package/dist/runtime-icons/codex-openai.svg +6 -0
- package/dist/runtime-icons/hermes-agent.png +0 -0
- package/package.json +6 -6
- package/public/runtime-icons/claude.ico +0 -0
- package/public/runtime-icons/codex-openai.svg +6 -0
- package/public/runtime-icons/hermes-agent.png +0 -0
- package/src/account/components/account-panel.tsx +217 -97
- package/src/account/managers/account.manager.ts +3 -2
- package/src/api/chat-session-type.types.ts +7 -0
- package/src/api/runtime-control.types.ts +8 -0
- package/src/api/types.ts +8 -0
- package/src/app.tsx +221 -57
- package/src/components/agents/agent-dialogs.tsx +499 -0
- package/src/components/agents/agents-page.test.tsx +238 -0
- package/src/components/agents/agents-page.tsx +435 -0
- package/src/components/chat/ChatSidebar.tsx +11 -35
- package/src/components/chat/chat-conversation-panel.test.tsx +20 -0
- package/src/components/chat/chat-conversation-panel.tsx +83 -13
- package/src/components/chat/chat-page-shell.tsx +19 -13
- package/src/components/chat/chat-session-type-option-item.test.tsx +46 -0
- package/src/components/chat/chat-session-type-option-item.tsx +68 -0
- package/src/components/chat/chat-session-workspace-file-preview.test.tsx +87 -0
- package/src/components/chat/chat-session-workspace-file-preview.tsx +14 -43
- package/src/components/chat/chat-session-workspace-panel-nav.tsx +8 -2
- package/src/components/chat/chat-sidebar-project-groups.tsx +11 -36
- package/src/components/chat/ncp/__tests__/ncp-session-adapter.cancelled-tool.test.ts +77 -0
- package/src/components/chat/ncp/ncp-chat-page.tsx +2 -0
- package/src/components/chat/ncp/ncp-session-adapter.test.ts +1 -0
- package/src/components/chat/ncp/ncp-session-adapter.ts +3 -0
- package/src/components/chat/ncp/page/ncp-chat-derived-state.ts +10 -4
- package/src/components/chat/stores/chat-input.store.ts +2 -1
- package/src/components/chat/stores/chat-thread.store.ts +3 -1
- package/src/components/chat/useChatSessionTypeState.ts +10 -1
- package/src/components/chat/workspace/chat-session-workspace-file-breadcrumbs.tsx +86 -0
- package/src/components/common/BrandHeader.tsx +3 -1
- package/src/components/common/session-context-icon.tsx +15 -2
- package/src/components/common/{TagInput.tsx → tag-input.tsx} +25 -17
- package/src/components/config/ChannelForm.test.tsx +89 -3
- package/src/components/config/ChannelForm.tsx +157 -188
- package/src/components/config/ChannelsList.test.tsx +163 -119
- package/src/components/config/ChannelsList.tsx +90 -101
- package/src/components/config/ProviderForm.tsx +108 -146
- package/src/components/config/ProvidersList.tsx +100 -123
- package/src/components/config/SearchConfig.tsx +423 -393
- package/src/components/config/channel-form-fields-section.tsx +70 -37
- package/src/components/config/config-split-page.tsx +109 -0
- package/src/components/config/provider-enabled-field.tsx +17 -10
- package/src/components/config/runtime-control-card.test.tsx +56 -0
- package/src/components/config/runtime-control-card.tsx +25 -0
- package/src/components/config/runtime-presence-card.tsx +93 -79
- package/src/components/layout/AppLayout.tsx +25 -37
- package/src/components/layout/app-layout.test.tsx +46 -14
- package/src/components/layout/runtime-status-entry.test.tsx +157 -0
- package/src/components/layout/runtime-status-entry.tsx +143 -0
- package/src/components/marketplace/marketplace-detail-doc.ts +93 -0
- package/src/components/marketplace/marketplace-list-card.tsx +288 -0
- package/src/components/marketplace/marketplace-page-data.ts +129 -0
- package/src/components/marketplace/marketplace-page.test.tsx +339 -0
- package/src/components/marketplace/marketplace-page.tsx +596 -0
- package/src/components/marketplace/mcp/mcp-marketplace-card.tsx +128 -0
- package/src/components/marketplace/mcp/mcp-marketplace-dialogs.tsx +191 -0
- package/src/components/marketplace/mcp/mcp-marketplace-doc.ts +152 -0
- package/src/components/marketplace/mcp/mcp-marketplace-page.test.tsx +223 -0
- package/src/components/marketplace/mcp/mcp-marketplace-page.tsx +414 -0
- package/src/components/remote/remote-access-page.test.tsx +105 -0
- package/src/components/remote/remote-access-page.tsx +248 -0
- package/src/components/ui/notice-card.tsx +129 -0
- package/src/components/ui/setting-row.tsx +51 -0
- package/src/components/ui/tag-chip.tsx +39 -0
- package/src/components/ui/textarea.tsx +19 -0
- package/src/hooks/useConfig.ts +2 -1
- package/src/index.css +24 -0
- package/src/lib/app-resource-uri.test.ts +20 -0
- package/src/lib/app-resource-uri.ts +29 -0
- package/src/lib/i18n.remote.ts +1 -1
- package/src/lib/i18n.runtime-control.ts +31 -0
- package/src/lib/i18n.ts +5 -8
- package/src/lib/session-context.utils.test.ts +71 -0
- package/src/lib/session-context.utils.ts +28 -3
- package/src/lib/session-project/workspace-file-breadcrumb.test.ts +83 -0
- package/src/lib/session-project/workspace-file-breadcrumb.ts +188 -0
- package/dist/assets/ChannelsList-Ita2Zm1_.js +0 -8
- package/dist/assets/DocBrowser-BNwbPHf4.js +0 -1
- package/dist/assets/MarketplacePage-CjX2MWww.js +0 -1
- package/dist/assets/MarketplacePage-D0sDlYX4.js +0 -49
- package/dist/assets/McpMarketplacePage-BGKJm1sJ.js +0 -40
- package/dist/assets/ModelConfig-BzZenCH-.js +0 -1
- package/dist/assets/ProvidersList-BbVzRxjY.js +0 -1
- package/dist/assets/RemoteAccessPage-BaDH_X1Q.js +0 -1
- package/dist/assets/RuntimeConfig-F_XKGgLm.js +0 -1
- package/dist/assets/SearchConfig-BGkzXQP-.js +0 -1
- package/dist/assets/SessionsConfig-ChHQ7M5c.js +0 -2
- package/dist/assets/chat-page-Doe0yTtB.js +0 -58
- package/dist/assets/chat-session-display-cw78aiI_.js +0 -1
- package/dist/assets/config-layout-CHs0mAaR.js +0 -1
- package/dist/assets/desktop-update-config-Dpcf4BKG.js +0 -1
- package/dist/assets/index-CF9xve0E.js +0 -6
- package/dist/assets/index-FgA52VBt.css +0 -1
- package/dist/assets/loader-circle-ACM1s51e.js +0 -1
- package/dist/assets/play-CFUwCA2E.js +0 -1
- package/dist/assets/plus-rYsv72JG.js +0 -1
- package/dist/assets/popover-Bg1VoTZ6.js +0 -1
- package/dist/assets/search-3kFR_zh9.js +0 -1
- package/dist/assets/security-config-BWaiARNk.js +0 -1
- package/dist/assets/select-DJ2MUjBB.js +0 -41
- package/dist/assets/skeleton-ByQepn0M.js +0 -1
- package/dist/assets/x-ByDbItbq.js +0 -1
- package/src/components/agents/AgentDialogs.tsx +0 -400
- package/src/components/agents/AgentsPage.test.tsx +0 -217
- package/src/components/agents/AgentsPage.tsx +0 -352
- package/src/components/config/config-layout.ts +0 -10
- package/src/components/marketplace/MarketplacePage.test.tsx +0 -322
- package/src/components/marketplace/MarketplacePage.tsx +0 -827
- package/src/components/marketplace/mcp/McpMarketplacePage.test.tsx +0 -208
- package/src/components/marketplace/mcp/McpMarketplacePage.tsx +0 -580
- package/src/components/remote/RemoteAccessPage.test.tsx +0 -103
- package/src/components/remote/RemoteAccessPage.tsx +0 -144
package/src/app.tsx
CHANGED
|
@@ -1,74 +1,234 @@
|
|
|
1
|
-
import { lazy, Suspense } from
|
|
2
|
-
import { QueryClientProvider } from
|
|
3
|
-
import { AccountPanel } from
|
|
4
|
-
import { appQueryClient } from
|
|
5
|
-
import { LoginPage } from
|
|
6
|
-
import { AppLayout } from
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
1
|
+
import { lazy, Suspense } from "react";
|
|
2
|
+
import { QueryClientProvider } from "@tanstack/react-query";
|
|
3
|
+
import { AccountPanel } from "@/account/components/account-panel";
|
|
4
|
+
import { appQueryClient } from "@/app-query-client";
|
|
5
|
+
import { LoginPage } from "@/components/auth/login-page";
|
|
6
|
+
import { AppLayout } from "@/components/layout/AppLayout";
|
|
7
|
+
import {
|
|
8
|
+
isTransientAuthStatusBootstrapError,
|
|
9
|
+
useAuthStatus,
|
|
10
|
+
} from "@/hooks/use-auth";
|
|
11
|
+
import { useRealtimeQueryBridge } from "@/hooks/use-realtime-query-bridge";
|
|
12
|
+
import { AppPresenterProvider } from "@/presenter/app-presenter-context";
|
|
13
|
+
import {
|
|
14
|
+
PwaInstallBanner,
|
|
15
|
+
PwaUpdateBanner,
|
|
16
|
+
} from "@/pwa/components/pwa-install-entry";
|
|
17
|
+
import { startNextClawPwa } from "@/pwa/register-pwa";
|
|
18
|
+
import { Toaster } from "sonner";
|
|
19
|
+
import { Routes, Route, Navigate } from "react-router-dom";
|
|
20
|
+
import { useEffect } from "react";
|
|
15
21
|
|
|
16
|
-
const ModelConfigPage = lazy(async () => ({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
22
|
+
const ModelConfigPage = lazy(async () => ({
|
|
23
|
+
default: (await import("@/components/config/ModelConfig")).ModelConfig,
|
|
24
|
+
}));
|
|
25
|
+
const ChatPage = lazy(async () => ({
|
|
26
|
+
default: (await import("@/components/chat/chat-page")).ChatPage,
|
|
27
|
+
}));
|
|
28
|
+
const SearchConfigPage = lazy(async () => ({
|
|
29
|
+
default: (await import("@/components/config/SearchConfig")).SearchConfig,
|
|
30
|
+
}));
|
|
31
|
+
const ProvidersListPage = lazy(async () => ({
|
|
32
|
+
default: (await import("@/components/config/ProvidersList")).ProvidersList,
|
|
33
|
+
}));
|
|
34
|
+
const ChannelsListPage = lazy(async () => ({
|
|
35
|
+
default: (await import("@/components/config/ChannelsList")).ChannelsList,
|
|
36
|
+
}));
|
|
37
|
+
const RuntimeConfigPage = lazy(async () => ({
|
|
38
|
+
default: (await import("@/components/config/RuntimeConfig")).RuntimeConfig,
|
|
39
|
+
}));
|
|
40
|
+
const DesktopUpdateConfigPage = lazy(async () => ({
|
|
41
|
+
default: (await import("@/components/config/desktop-update-config"))
|
|
42
|
+
.DesktopUpdateConfig,
|
|
43
|
+
}));
|
|
44
|
+
const SecurityConfigPage = lazy(async () => ({
|
|
45
|
+
default: (await import("@/components/config/security-config")).SecurityConfig,
|
|
46
|
+
}));
|
|
47
|
+
const SessionsConfigPage = lazy(async () => ({
|
|
48
|
+
default: (await import("@/components/config/SessionsConfig")).SessionsConfig,
|
|
49
|
+
}));
|
|
50
|
+
const SecretsConfigPage = lazy(async () => ({
|
|
51
|
+
default: (await import("@/components/config/SecretsConfig")).SecretsConfig,
|
|
52
|
+
}));
|
|
53
|
+
const RemoteAccessPage = lazy(async () => ({
|
|
54
|
+
default: (await import("@/components/remote/remote-access-page"))
|
|
55
|
+
.RemoteAccessPage,
|
|
56
|
+
}));
|
|
57
|
+
const MarketplacePage = lazy(async () => ({
|
|
58
|
+
default: (await import("@/components/marketplace/marketplace-page"))
|
|
59
|
+
.MarketplacePage,
|
|
60
|
+
}));
|
|
61
|
+
const McpMarketplacePage = lazy(async () => ({
|
|
62
|
+
default: (await import("@/components/marketplace/mcp/mcp-marketplace-page"))
|
|
63
|
+
.McpMarketplacePage,
|
|
64
|
+
}));
|
|
29
65
|
|
|
30
66
|
function RouteFallback() {
|
|
31
|
-
return
|
|
67
|
+
return (
|
|
68
|
+
<div className="h-full w-full animate-pulse rounded-2xl border border-border/40 bg-card/40" />
|
|
69
|
+
);
|
|
32
70
|
}
|
|
33
71
|
|
|
34
72
|
function LazyRoute({ children }: { children: JSX.Element }) {
|
|
35
73
|
return <Suspense fallback={<RouteFallback />}>{children}</Suspense>;
|
|
36
74
|
}
|
|
37
75
|
|
|
76
|
+
function ProtectedRoutes() {
|
|
77
|
+
return (
|
|
78
|
+
<Routes>
|
|
79
|
+
<Route path="/chat/skills" element={<Navigate to="/skills" replace />} />
|
|
80
|
+
<Route path="/chat/cron" element={<Navigate to="/cron" replace />} />
|
|
81
|
+
<Route path="/chat/agents" element={<Navigate to="/agents" replace />} />
|
|
82
|
+
<Route
|
|
83
|
+
path="/chat/:sessionId?"
|
|
84
|
+
element={
|
|
85
|
+
<LazyRoute>
|
|
86
|
+
<ChatPage view="chat" />
|
|
87
|
+
</LazyRoute>
|
|
88
|
+
}
|
|
89
|
+
/>
|
|
90
|
+
<Route
|
|
91
|
+
path="/agents"
|
|
92
|
+
element={
|
|
93
|
+
<LazyRoute>
|
|
94
|
+
<ChatPage view="agents" />
|
|
95
|
+
</LazyRoute>
|
|
96
|
+
}
|
|
97
|
+
/>
|
|
98
|
+
<Route
|
|
99
|
+
path="/skills"
|
|
100
|
+
element={
|
|
101
|
+
<LazyRoute>
|
|
102
|
+
<ChatPage view="skills" />
|
|
103
|
+
</LazyRoute>
|
|
104
|
+
}
|
|
105
|
+
/>
|
|
106
|
+
<Route
|
|
107
|
+
path="/cron"
|
|
108
|
+
element={
|
|
109
|
+
<LazyRoute>
|
|
110
|
+
<ChatPage view="cron" />
|
|
111
|
+
</LazyRoute>
|
|
112
|
+
}
|
|
113
|
+
/>
|
|
114
|
+
<Route
|
|
115
|
+
path="/model"
|
|
116
|
+
element={
|
|
117
|
+
<LazyRoute>
|
|
118
|
+
<ModelConfigPage />
|
|
119
|
+
</LazyRoute>
|
|
120
|
+
}
|
|
121
|
+
/>
|
|
122
|
+
<Route
|
|
123
|
+
path="/search"
|
|
124
|
+
element={
|
|
125
|
+
<LazyRoute>
|
|
126
|
+
<SearchConfigPage />
|
|
127
|
+
</LazyRoute>
|
|
128
|
+
}
|
|
129
|
+
/>
|
|
130
|
+
<Route
|
|
131
|
+
path="/providers"
|
|
132
|
+
element={
|
|
133
|
+
<LazyRoute>
|
|
134
|
+
<ProvidersListPage />
|
|
135
|
+
</LazyRoute>
|
|
136
|
+
}
|
|
137
|
+
/>
|
|
138
|
+
<Route
|
|
139
|
+
path="/channels"
|
|
140
|
+
element={
|
|
141
|
+
<LazyRoute>
|
|
142
|
+
<ChannelsListPage />
|
|
143
|
+
</LazyRoute>
|
|
144
|
+
}
|
|
145
|
+
/>
|
|
146
|
+
<Route
|
|
147
|
+
path="/runtime"
|
|
148
|
+
element={
|
|
149
|
+
<LazyRoute>
|
|
150
|
+
<RuntimeConfigPage />
|
|
151
|
+
</LazyRoute>
|
|
152
|
+
}
|
|
153
|
+
/>
|
|
154
|
+
<Route
|
|
155
|
+
path="/updates"
|
|
156
|
+
element={
|
|
157
|
+
<LazyRoute>
|
|
158
|
+
<DesktopUpdateConfigPage />
|
|
159
|
+
</LazyRoute>
|
|
160
|
+
}
|
|
161
|
+
/>
|
|
162
|
+
<Route
|
|
163
|
+
path="/remote"
|
|
164
|
+
element={
|
|
165
|
+
<LazyRoute>
|
|
166
|
+
<RemoteAccessPage />
|
|
167
|
+
</LazyRoute>
|
|
168
|
+
}
|
|
169
|
+
/>
|
|
170
|
+
<Route
|
|
171
|
+
path="/security"
|
|
172
|
+
element={
|
|
173
|
+
<LazyRoute>
|
|
174
|
+
<SecurityConfigPage />
|
|
175
|
+
</LazyRoute>
|
|
176
|
+
}
|
|
177
|
+
/>
|
|
178
|
+
<Route
|
|
179
|
+
path="/sessions"
|
|
180
|
+
element={
|
|
181
|
+
<LazyRoute>
|
|
182
|
+
<SessionsConfigPage />
|
|
183
|
+
</LazyRoute>
|
|
184
|
+
}
|
|
185
|
+
/>
|
|
186
|
+
<Route
|
|
187
|
+
path="/secrets"
|
|
188
|
+
element={
|
|
189
|
+
<LazyRoute>
|
|
190
|
+
<SecretsConfigPage />
|
|
191
|
+
</LazyRoute>
|
|
192
|
+
}
|
|
193
|
+
/>
|
|
194
|
+
<Route path="/settings" element={<Navigate to="/model" replace />} />
|
|
195
|
+
<Route
|
|
196
|
+
path="/marketplace/skills"
|
|
197
|
+
element={<Navigate to="/skills" replace />}
|
|
198
|
+
/>
|
|
199
|
+
<Route
|
|
200
|
+
path="/marketplace"
|
|
201
|
+
element={<Navigate to="/marketplace/plugins" replace />}
|
|
202
|
+
/>
|
|
203
|
+
<Route
|
|
204
|
+
path="/marketplace/mcp"
|
|
205
|
+
element={
|
|
206
|
+
<LazyRoute>
|
|
207
|
+
<McpMarketplacePage />
|
|
208
|
+
</LazyRoute>
|
|
209
|
+
}
|
|
210
|
+
/>
|
|
211
|
+
<Route
|
|
212
|
+
path="/marketplace/:type"
|
|
213
|
+
element={
|
|
214
|
+
<LazyRoute>
|
|
215
|
+
<MarketplacePage />
|
|
216
|
+
</LazyRoute>
|
|
217
|
+
}
|
|
218
|
+
/>
|
|
219
|
+
<Route path="/" element={<Navigate to="/chat" replace />} />
|
|
220
|
+
<Route path="*" element={<Navigate to="/chat" replace />} />
|
|
221
|
+
</Routes>
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
38
225
|
function ProtectedApp() {
|
|
39
226
|
useRealtimeQueryBridge(appQueryClient);
|
|
40
227
|
|
|
41
228
|
return (
|
|
42
229
|
<AppPresenterProvider>
|
|
43
230
|
<AppLayout>
|
|
44
|
-
<
|
|
45
|
-
<Routes>
|
|
46
|
-
<Route path="/chat/skills" element={<Navigate to="/skills" replace />} />
|
|
47
|
-
<Route path="/chat/cron" element={<Navigate to="/cron" replace />} />
|
|
48
|
-
<Route path="/chat/agents" element={<Navigate to="/agents" replace />} />
|
|
49
|
-
<Route path="/chat/:sessionId?" element={<LazyRoute><ChatPage view="chat" /></LazyRoute>} />
|
|
50
|
-
<Route path="/agents" element={<LazyRoute><ChatPage view="agents" /></LazyRoute>} />
|
|
51
|
-
<Route path="/skills" element={<LazyRoute><ChatPage view="skills" /></LazyRoute>} />
|
|
52
|
-
<Route path="/cron" element={<LazyRoute><ChatPage view="cron" /></LazyRoute>} />
|
|
53
|
-
<Route path="/model" element={<LazyRoute><ModelConfigPage /></LazyRoute>} />
|
|
54
|
-
<Route path="/search" element={<LazyRoute><SearchConfigPage /></LazyRoute>} />
|
|
55
|
-
<Route path="/providers" element={<LazyRoute><ProvidersListPage /></LazyRoute>} />
|
|
56
|
-
<Route path="/channels" element={<LazyRoute><ChannelsListPage /></LazyRoute>} />
|
|
57
|
-
<Route path="/runtime" element={<LazyRoute><RuntimeConfigPage /></LazyRoute>} />
|
|
58
|
-
<Route path="/updates" element={<LazyRoute><DesktopUpdateConfigPage /></LazyRoute>} />
|
|
59
|
-
<Route path="/remote" element={<LazyRoute><RemoteAccessPage /></LazyRoute>} />
|
|
60
|
-
<Route path="/security" element={<LazyRoute><SecurityConfigPage /></LazyRoute>} />
|
|
61
|
-
<Route path="/sessions" element={<LazyRoute><SessionsConfigPage /></LazyRoute>} />
|
|
62
|
-
<Route path="/secrets" element={<LazyRoute><SecretsConfigPage /></LazyRoute>} />
|
|
63
|
-
<Route path="/settings" element={<Navigate to="/model" replace />} />
|
|
64
|
-
<Route path="/marketplace/skills" element={<Navigate to="/skills" replace />} />
|
|
65
|
-
<Route path="/marketplace" element={<Navigate to="/marketplace/plugins" replace />} />
|
|
66
|
-
<Route path="/marketplace/mcp" element={<LazyRoute><McpMarketplacePage /></LazyRoute>} />
|
|
67
|
-
<Route path="/marketplace/:type" element={<LazyRoute><MarketplacePage /></LazyRoute>} />
|
|
68
|
-
<Route path="/" element={<Navigate to="/chat" replace />} />
|
|
69
|
-
<Route path="*" element={<Navigate to="/chat" replace />} />
|
|
70
|
-
</Routes>
|
|
71
|
-
</div>
|
|
231
|
+
<ProtectedRoutes />
|
|
72
232
|
</AppLayout>
|
|
73
233
|
<AccountPanel />
|
|
74
234
|
</AppPresenterProvider>
|
|
@@ -80,7 +240,11 @@ function AuthGate() {
|
|
|
80
240
|
const isTransientBootstrapFailure =
|
|
81
241
|
authStatus.isError && isTransientAuthStatusBootstrapError(authStatus.error);
|
|
82
242
|
|
|
83
|
-
if (
|
|
243
|
+
if (
|
|
244
|
+
(authStatus.isLoading && !authStatus.isError) ||
|
|
245
|
+
isTransientBootstrapFailure ||
|
|
246
|
+
authStatus.isError
|
|
247
|
+
) {
|
|
84
248
|
return <ProtectedApp />;
|
|
85
249
|
}
|
|
86
250
|
|