@nextclaw/ui 0.13.10-beta.1 → 0.13.11-beta.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/CHANGELOG.md +37 -0
- package/dist/assets/{api-DhI2lb1f.js → api-C0F4luAh.js} +6 -6
- package/dist/assets/{app-presenter-provider-BFbrQp8q.js → app-presenter-provider-3K24vYTD.js} +2 -2
- package/dist/assets/{channels-list-page-B6CvmU9T.js → channels-list-page-DT8gjnFw.js} +1 -1
- package/dist/assets/{chat-page-Ch4ShlKB.js → chat-page-By1I_JyH.js} +1 -1
- package/dist/assets/{confirm-dialog-DXRWJ5uB.js → confirm-dialog-a7YIzprP.js} +1 -1
- package/dist/assets/{desktop-update-config-DPk5V1Nl.js → desktop-update-config-CbJZyLND.js} +1 -1
- package/dist/assets/{index-DZoXsgdz.js → index-DBOXf-UA.js} +3 -3
- package/dist/assets/mcp-marketplace-page-C2O8-sSE.js +1 -0
- package/dist/assets/{mcp-marketplace-page-WAgpy0hp.js → mcp-marketplace-page-IhNyQ9Hh.js} +1 -1
- package/dist/assets/{model-config-CixioI5U.js → model-config-Z7oAQmlP.js} +1 -1
- package/dist/assets/{notice-card-BLklZuEa.js → notice-card-DhE1Fafy.js} +1 -1
- package/dist/assets/{provider-scoped-model-input-BbWqk2yz.js → provider-scoped-model-input-BfhiS3GD.js} +1 -1
- package/dist/assets/{providers-list-C_JOSjYd.js → providers-list-DpAMol1o.js} +1 -1
- package/dist/assets/remote-hKy7hvBh.js +1 -0
- package/dist/assets/{runtime-config-page-ByvKO6Yn.js → runtime-config-page-BvLypM3f.js} +1 -1
- package/dist/assets/{search-config-Cl2_NgFY.js → search-config-mD9kAsXy.js} +1 -1
- package/dist/assets/{secrets-config-BkR72J4g.js → secrets-config-Dvd4VEDw.js} +1 -1
- package/dist/assets/{tag-chip-Kib_ljle.js → tag-chip-BFTpu75w.js} +1 -1
- package/dist/index.html +5 -5
- package/package.json +8 -8
- package/src/features/panel-apps/components/panel-app-toolbar.test.tsx +24 -0
- package/src/features/panel-apps/components/panel-app-toolbar.tsx +11 -2
- package/src/features/panel-apps/utils/panel-app-doc-browser.utils.tsx +2 -1
- package/src/shared/hooks/use-config.ts +2 -2
- package/src/shared/lib/api/ncp-session-query-cache.utils.test.ts +35 -0
- package/src/shared/lib/api/ncp-session-query-cache.utils.ts +9 -1
- package/src/shared/lib/api/utils/ncp-session.utils.ts +2 -2
- package/vite.config.ts +8 -0
- package/dist/assets/mcp-marketplace-page-9maf_9fL.js +0 -1
- package/dist/assets/remote-qtmzkte2.js +0 -1
|
@@ -80,8 +80,9 @@ export const PANEL_APPS_DOC_BROWSER_RENDERERS: DocBrowserCustomTabRenderers = {
|
|
|
80
80
|
getTitle: (tab) => tab.title || t('panelAppsTitle'),
|
|
81
81
|
onIframeMessage: (params) => getPresenter().panelAppBridgeManager.handleIframeMessage(params),
|
|
82
82
|
renderIcon: () => <AppWindow className="w-4 h-4 text-primary shrink-0" />,
|
|
83
|
-
renderToolbar: ({ open, refreshIframe }) => (
|
|
83
|
+
renderToolbar: ({ open, refreshIframe, tab }) => (
|
|
84
84
|
<PanelAppToolbar
|
|
85
|
+
appTitle={tab.title || t('panelAppsTitle')}
|
|
85
86
|
onOpenApps={() => openApps({ open })}
|
|
86
87
|
onRefresh={refreshIframe}
|
|
87
88
|
/>
|
|
@@ -257,9 +257,9 @@ export function useExecuteConfigAction() {
|
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
export function useNcpSessions(params?: { limit?: number }) {
|
|
260
|
+
export function useNcpSessions(params?: { limit?: number; peerId?: string }) {
|
|
261
261
|
return useQuery({
|
|
262
|
-
queryKey: ['ncp-sessions', params?.limit ?? null],
|
|
262
|
+
queryKey: ['ncp-sessions', params?.limit ?? null, params?.peerId?.trim() || null],
|
|
263
263
|
queryFn: () => fetchNcpSessions(params),
|
|
264
264
|
staleTime: 5_000,
|
|
265
265
|
retry: false
|
|
@@ -198,4 +198,39 @@ describe('ncp-session-query-cache', () => {
|
|
|
198
198
|
queryClient.getQueryData<NcpSessionsListView>(['ncp-sessions', 200])?.sessions.map((session) => session.sessionId)
|
|
199
199
|
).toEqual(['session-3', 'session-2']);
|
|
200
200
|
});
|
|
201
|
+
|
|
202
|
+
it('does not upsert a peer summary into another peer filtered session cache', () => {
|
|
203
|
+
const queryClient = new QueryClient();
|
|
204
|
+
queryClient.setQueryData(['ncp-sessions', 200, 'peer-a'], {
|
|
205
|
+
sessions: [],
|
|
206
|
+
total: 0
|
|
207
|
+
});
|
|
208
|
+
queryClient.setQueryData(['ncp-sessions', 200, 'peer-b'], {
|
|
209
|
+
sessions: [],
|
|
210
|
+
total: 0
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
applyNcpSessionRealtimeEvent(queryClient, {
|
|
214
|
+
type: 'session.summary.upsert',
|
|
215
|
+
payload: {
|
|
216
|
+
summary: {
|
|
217
|
+
sessionId: 'session-peer-a',
|
|
218
|
+
peerId: 'peer-a',
|
|
219
|
+
messageCount: 1,
|
|
220
|
+
updatedAt: '2026-03-29T12:00:00.000Z',
|
|
221
|
+
status: 'idle'
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
expect(
|
|
227
|
+
queryClient.getQueryData<NcpSessionsListView>(['ncp-sessions', 200, 'peer-a'])?.sessions
|
|
228
|
+
).toEqual([
|
|
229
|
+
expect.objectContaining({
|
|
230
|
+
peerId: 'peer-a',
|
|
231
|
+
sessionId: 'session-peer-a'
|
|
232
|
+
})
|
|
233
|
+
]);
|
|
234
|
+
expect(queryClient.getQueryData<NcpSessionsListView>(['ncp-sessions', 200, 'peer-b'])?.sessions).toEqual([]);
|
|
235
|
+
});
|
|
201
236
|
});
|
|
@@ -21,6 +21,14 @@ function shouldReplaceSessionSummary(
|
|
|
21
21
|
return current.status === next.status || next.status === 'idle';
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
function queryKeyAcceptsSessionSummary(queryKey: readonly unknown[], summary: NcpSessionSummaryView): boolean {
|
|
25
|
+
if (queryKey[0] !== 'ncp-sessions') {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
const peerId = typeof queryKey[2] === 'string' ? queryKey[2].trim() : '';
|
|
29
|
+
return !peerId || summary.peerId === peerId;
|
|
30
|
+
}
|
|
31
|
+
|
|
24
32
|
export function upsertNcpSessionSummaryList(
|
|
25
33
|
current: NcpSessionsListView | undefined,
|
|
26
34
|
summary: NcpSessionSummaryView
|
|
@@ -80,7 +88,7 @@ export function upsertNcpSessionSummaryInQueryClient(
|
|
|
80
88
|
summary: NcpSessionSummaryView
|
|
81
89
|
): void {
|
|
82
90
|
queryClient?.setQueriesData<NcpSessionsListView>(
|
|
83
|
-
{
|
|
91
|
+
{ predicate: (query) => queryKeyAcceptsSessionSummary(query.queryKey, summary) },
|
|
84
92
|
(current) => upsertNcpSessionSummaryList(current, summary)
|
|
85
93
|
);
|
|
86
94
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nextclawClient } from '
|
|
1
|
+
import { nextclawClient } from '@/shared/lib/api/managers/client.manager';
|
|
2
2
|
import type {
|
|
3
3
|
NcpSessionMessagesView,
|
|
4
4
|
NcpSessionSkillsView,
|
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
} from '@/shared/lib/api/types';
|
|
9
9
|
|
|
10
10
|
// GET /api/ncp/sessions
|
|
11
|
-
export async function fetchNcpSessions(params?: { limit?: number }): Promise<NcpSessionsListView> {
|
|
11
|
+
export async function fetchNcpSessions(params?: { limit?: number; peerId?: string }): Promise<NcpSessionsListView> {
|
|
12
12
|
return await nextclawClient.sessions.list(params) as NcpSessionsListView;
|
|
13
13
|
}
|
|
14
14
|
|
package/vite.config.ts
CHANGED
|
@@ -39,6 +39,14 @@ export default defineConfig({
|
|
|
39
39
|
server: {
|
|
40
40
|
host: '127.0.0.1',
|
|
41
41
|
port: 5174,
|
|
42
|
+
cors: {
|
|
43
|
+
credentials: true,
|
|
44
|
+
origin: [
|
|
45
|
+
/^http:\/\/localhost:\d+$/,
|
|
46
|
+
/^http:\/\/127\.0\.0\.1:\d+$/,
|
|
47
|
+
'null',
|
|
48
|
+
],
|
|
49
|
+
},
|
|
42
50
|
strictPort: true,
|
|
43
51
|
proxy: {
|
|
44
52
|
'/api': {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./mcp-marketplace-page-WAgpy0hp.js";export{e as McpMarketplacePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./app-presenter-provider-BFbrQp8q.js";export{e as RemoteAccessPage};
|