@nextclaw/ui 0.13.10-beta.1 → 0.13.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/CHANGELOG.md +57 -0
- package/dist/assets/{api-DhI2lb1f.js → api-DmxQnm30.js} +7 -7
- package/dist/assets/{app-presenter-provider-BFbrQp8q.js → app-presenter-provider-CDSjiqfE.js} +2 -2
- package/dist/assets/arrow-left-Dd45Mvr1.js +1 -0
- package/dist/assets/channels-list-page-bkKDqaO5.js +8 -0
- package/dist/assets/chat-page-YKdeGoVx.js +105 -0
- package/dist/assets/{config-split-page-bO0K6uQv.js → config-split-page-CdJEkWxv.js} +1 -1
- package/dist/assets/{confirm-dialog-DXRWJ5uB.js → confirm-dialog-BWRNsRgb.js} +1 -1
- package/dist/assets/{desktop-update-config-DPk5V1Nl.js → desktop-update-config-CLXdVz9r.js} +1 -1
- package/dist/assets/{dist-T6rf86Nf.js → dist-CyWdaJvr.js} +1 -1
- package/dist/assets/{dist-DQoV-62W.js → dist-DzM2ZEVN.js} +1 -1
- package/dist/assets/doc-browser-D5FJcAyz.js +1 -0
- package/dist/assets/{doc-browser-CTFB6ACN.js → doc-browser-DewXa6oX.js} +1 -1
- package/dist/assets/{doc-browser-context-CP2tI-Br.js → doc-browser-context-CpL2m4Sp.js} +1 -1
- package/dist/assets/{ellipsis-B7CbNPNr.js → ellipsis-BDgTYNDX.js} +1 -1
- package/dist/assets/{es2015-BSPOGpH4.js → es2015-WqekV0OK.js} +1 -1
- package/dist/assets/{external-link-CefT35zP.js → external-link-BLjo8z2a.js} +1 -1
- package/dist/assets/{index-DZoXsgdz.js → index-DKflQCOL.js} +15 -15
- package/dist/assets/index-Q891JiF_.css +1 -0
- package/dist/assets/{key-round-BpM3GZn4.js → key-round-Du8x3sWa.js} +1 -1
- package/dist/assets/{loader-circle-_edjOFsw.js → loader-circle-Dz4FssYC.js} +1 -1
- package/dist/assets/{mcp-marketplace-page-WAgpy0hp.js → mcp-marketplace-page-BaBuHB2L.js} +2 -2
- package/dist/assets/mcp-marketplace-page-ooEvG_bB.js +1 -0
- package/dist/assets/{model-config-CixioI5U.js → model-config-B-qg70S4.js} +1 -1
- package/dist/assets/{notice-card-BLklZuEa.js → notice-card-3a7FmAz-.js} +1 -1
- package/dist/assets/play-BziM-Y34.js +1 -0
- package/dist/assets/plus-DrpyArC8.js +1 -0
- package/dist/assets/{popover-D_pJfOlM.js → popover-BlJLguiZ.js} +1 -1
- package/dist/assets/{provider-scoped-model-input-BbWqk2yz.js → provider-scoped-model-input-BgPTQa8H.js} +1 -1
- package/dist/assets/providers-list-cBeeslbc.js +1 -0
- package/dist/assets/{react-Bl8iJUcF.js → react-BVjl1ZaK.js} +1 -1
- package/dist/assets/{refresh-cw-CqfS1EhK.js → refresh-cw-DFR87zei.js} +1 -1
- package/dist/assets/remote-DjhVMpVd.js +1 -0
- package/dist/assets/rotate-cw-DMBnsYKm.js +1 -0
- package/dist/assets/{runtime-config-page-ByvKO6Yn.js → runtime-config-page-DYH2ejUI.js} +1 -1
- package/dist/assets/{save-CQERCODg.js → save-BDmIlHvN.js} +1 -1
- package/dist/assets/search-CjHGYvTI.js +1 -0
- package/dist/assets/{search-config-Cl2_NgFY.js → search-config-BRsrQ4zK.js} +1 -1
- package/dist/assets/{secrets-config-BkR72J4g.js → secrets-config-eYdx5_AW.js} +2 -2
- package/dist/assets/{status-dot-DY0xUUvK.js → status-dot-SVPjIyG5.js} +1 -1
- package/dist/assets/{tabs-C77i1w90.js → tabs-Czd2mj6z.js} +1 -1
- package/dist/assets/{tabs-custom-CFpR54-m.js → tabs-custom-Ix4nkp2h.js} +1 -1
- package/dist/assets/{tag-chip-Kib_ljle.js → tag-chip-Cdwb3JSH.js} +1 -1
- package/dist/assets/{tooltip-fs7VQG7d.js → tooltip-CKGxLGnG.js} +1 -1
- package/dist/assets/{trash-2-Bb8mTTLl.js → trash-2-yLA8BEcE.js} +1 -1
- package/dist/assets/x-dpDISboO.js +1 -0
- package/dist/index.html +25 -25
- package/package.json +8 -8
- package/src/features/chat/components/chat-session-workspace-panel-nav.tsx +86 -64
- package/src/features/chat/components/chat-session-workspace-panel.tsx +14 -25
- package/src/features/chat/components/conversation/chat-conversation-panel.test.tsx +3 -3
- 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/components/cron-config.tsx +367 -91
- 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/src/shared/lib/cron/cron-job-view.utils.ts +124 -6
- package/src/shared/lib/i18n/README.md +7 -0
- package/src/shared/lib/i18n/cron-labels.utils.ts +32 -0
- package/src/shared/lib/i18n/index.ts +2 -25
- package/vite.config.ts +8 -0
- package/dist/assets/arrow-left-CI0Ocu9p.js +0 -1
- package/dist/assets/channels-list-page-B6CvmU9T.js +0 -8
- package/dist/assets/chat-page-Ch4ShlKB.js +0 -105
- package/dist/assets/doc-browser-yi02ASOL.js +0 -1
- package/dist/assets/index-CevK3jug.css +0 -1
- package/dist/assets/mcp-marketplace-page-9maf_9fL.js +0 -1
- package/dist/assets/play-DD0bg50i.js +0 -1
- package/dist/assets/plus-zZ2GC_AJ.js +0 -1
- package/dist/assets/providers-list-C_JOSjYd.js +0 -1
- package/dist/assets/remote-qtmzkte2.js +0 -1
- package/dist/assets/rotate-cw-C7EvaSlb.js +0 -1
- package/dist/assets/search-C0b2yzmt.js +0 -1
- package/dist/assets/x-BV4iiea8.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { FolderGit2, Loader2 } from "lucide-react";
|
|
3
3
|
import type {
|
|
4
4
|
ChatFileOpenActionViewModel,
|
|
5
5
|
ChatToolActionViewModel,
|
|
@@ -269,7 +269,10 @@ export function ChatSessionWorkspacePanel({
|
|
|
269
269
|
);
|
|
270
270
|
|
|
271
271
|
useEffect(() => {
|
|
272
|
-
if (
|
|
272
|
+
if (
|
|
273
|
+
activeSelection?.kind !== "child-session" ||
|
|
274
|
+
activeSelection.tab.runStatus === "running"
|
|
275
|
+
) {
|
|
273
276
|
return;
|
|
274
277
|
}
|
|
275
278
|
const activeTabReadAt = activeSelection.tab.lastMessageAt?.trim() ?? null;
|
|
@@ -326,29 +329,15 @@ export function ChatSessionWorkspacePanel({
|
|
|
326
329
|
maxWidth={860}
|
|
327
330
|
overlay={displayMode === "overlay"}
|
|
328
331
|
>
|
|
329
|
-
<
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
<ArrowLeft className="h-3.5 w-3.5" />
|
|
339
|
-
<span>{t("chatBackToParent")}</span>
|
|
340
|
-
</button>
|
|
341
|
-
<button
|
|
342
|
-
type="button"
|
|
343
|
-
onClick={presenter.chatThreadManager.closeWorkspacePanel}
|
|
344
|
-
className="rounded-full border border-gray-200/80 p-1.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900"
|
|
345
|
-
aria-label={t("chatWorkspaceClosePanel")}
|
|
346
|
-
>
|
|
347
|
-
<X className="h-4 w-4" />
|
|
348
|
-
</button>
|
|
349
|
-
</div>
|
|
350
|
-
|
|
351
|
-
<WorkspaceTabsBar tabs={workspaceTabs} />
|
|
332
|
+
<WorkspaceTabsBar
|
|
333
|
+
tabs={workspaceTabs}
|
|
334
|
+
onBack={
|
|
335
|
+
hasParentSession
|
|
336
|
+
? presenter.chatThreadManager.goToParentSession
|
|
337
|
+
: undefined
|
|
338
|
+
}
|
|
339
|
+
onClose={presenter.chatThreadManager.closeWorkspacePanel}
|
|
340
|
+
/>
|
|
352
341
|
|
|
353
342
|
<div className="flex min-h-0 flex-1 flex-col bg-white">
|
|
354
343
|
{activeSelection.kind === "child-session" ? (
|
|
@@ -653,9 +653,9 @@ describe("ChatSessionWorkspacePanel", () => {
|
|
|
653
653
|
expect(screen.getByTestId("workspace-file-preview").textContent).toBe(
|
|
654
654
|
"README.md",
|
|
655
655
|
);
|
|
656
|
-
expect(
|
|
657
|
-
"workspace-
|
|
658
|
-
);
|
|
656
|
+
expect(
|
|
657
|
+
screen.getByTestId("workspace-tabs-scroll").parentElement?.className,
|
|
658
|
+
).toContain("workspace-horizontal-scrollbar");
|
|
659
659
|
});
|
|
660
660
|
|
|
661
661
|
it("renders session cron jobs in the workspace sidebar and deletes with a neutral confirmation", async () => {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import userEvent from '@testing-library/user-event';
|
|
3
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
4
|
+
import { PanelAppToolbar } from './panel-app-toolbar';
|
|
5
|
+
|
|
6
|
+
describe('PanelAppToolbar', () => {
|
|
7
|
+
it('shows the current panel app title in the detail header', async () => {
|
|
8
|
+
const user = userEvent.setup();
|
|
9
|
+
const onOpenApps = vi.fn();
|
|
10
|
+
render(
|
|
11
|
+
<PanelAppToolbar
|
|
12
|
+
appTitle="墨爪助手"
|
|
13
|
+
onOpenApps={onOpenApps}
|
|
14
|
+
onRefresh={vi.fn()}
|
|
15
|
+
/>,
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
expect(screen.getByText('墨爪助手')).toBeTruthy();
|
|
19
|
+
|
|
20
|
+
await user.click(screen.getByRole('button', { name: 'Apps' }));
|
|
21
|
+
|
|
22
|
+
expect(onOpenApps).toHaveBeenCalledTimes(1);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -2,11 +2,13 @@ import { ArrowLeft, RefreshCw } from 'lucide-react';
|
|
|
2
2
|
import { t } from '@/shared/lib/i18n';
|
|
3
3
|
|
|
4
4
|
type PanelAppToolbarProps = {
|
|
5
|
+
appTitle: string;
|
|
5
6
|
onOpenApps: () => void;
|
|
6
7
|
onRefresh: () => void;
|
|
7
8
|
};
|
|
8
9
|
|
|
9
10
|
export function PanelAppToolbar({
|
|
11
|
+
appTitle,
|
|
10
12
|
onOpenApps,
|
|
11
13
|
onRefresh,
|
|
12
14
|
}: PanelAppToolbarProps) {
|
|
@@ -15,11 +17,18 @@ export function PanelAppToolbar({
|
|
|
15
17
|
<button
|
|
16
18
|
type="button"
|
|
17
19
|
onClick={onOpenApps}
|
|
18
|
-
className="inline-flex items-center
|
|
20
|
+
className="inline-flex shrink-0 items-center rounded-md p-1.5 text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-900"
|
|
21
|
+
title={t('appsTitle')}
|
|
22
|
+
aria-label={t('appsTitle')}
|
|
19
23
|
>
|
|
20
24
|
<ArrowLeft className="h-3.5 w-3.5" />
|
|
21
|
-
{t('appsTitle')}
|
|
22
25
|
</button>
|
|
26
|
+
<span
|
|
27
|
+
className="min-w-0 flex-1 truncate text-xs font-medium text-gray-600"
|
|
28
|
+
title={appTitle}
|
|
29
|
+
>
|
|
30
|
+
{appTitle}
|
|
31
|
+
</span>
|
|
23
32
|
<button
|
|
24
33
|
type="button"
|
|
25
34
|
onClick={onRefresh}
|
|
@@ -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
|
/>
|