@bevel-software/platform-core-frontend 0.32.0 → 0.33.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/package.json +2 -2
- package/src/core/CoreAppShell.tsx +1 -1
- package/src/modules/access/api.ts +1 -1
- package/src/modules/access/components/ManageAccessDialog.tsx +4 -5
- package/src/modules/access/hooks/useAccessRequests.ts +1 -1
- package/src/modules/access/hooks/useFileAccess.ts +1 -1
- package/src/modules/access/index.ts +11 -0
- package/src/modules/access/requests.api.ts +1 -1
- package/src/modules/admin/components/AddMemberInput.tsx +1 -1
- package/src/modules/admin/components/UserAccountsPage.tsx +3 -3
- package/src/modules/admin/index.ts +7 -0
- package/src/modules/admin/state/admin.context.tsx +1 -1
- package/src/modules/audit/components/AuditEventsPanel.tsx +1 -1
- package/src/modules/audit/components/AuditLogPage.tsx +2 -2
- package/src/modules/auth/index.ts +12 -0
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.access-rules.test.tsx +0 -1
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.binary.test.tsx +0 -1
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.brings-itself-up-to-date.test.tsx +0 -1
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.edit.test.tsx +166 -0
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.fork-point.test.tsx +0 -1
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.initial-file.test.tsx +0 -1
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.moved.test.tsx +0 -1
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.sync-banner.test.tsx +0 -1
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.test.tsx +0 -2
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.unreadable.test.tsx +0 -1
- package/src/modules/change-requests/__tests__/apply-outcome-for-every-viewer.test.tsx +0 -1
- package/src/modules/change-requests/components/BranchFilePreview.tsx +4 -12
- package/src/modules/change-requests/components/ChangeRequestDialog.tsx +138 -30
- package/src/modules/change-requests/components/ChangeRequestLink.tsx +2 -3
- package/src/modules/change-requests/components/CrFileTree.tsx +1 -1
- package/src/modules/change-requests/components/FileChangeBoxes.tsx +2 -3
- package/src/modules/change-requests/hooks/useApplyChangeRequest.ts +3 -5
- package/src/modules/change-requests/hooks/useCrFileDiffs.ts +1 -1
- package/src/modules/change-requests/index.ts +14 -0
- package/src/modules/change-requests/services/change-requests.api.ts +2 -2
- package/src/modules/change-requests/services/denied-file.api.ts +2 -2
- package/src/modules/change-requests/services/propose.api.ts +3 -4
- package/src/modules/change-requests/utils/diff.ts +1 -1
- package/src/modules/change-requests/utils/readFailure.ts +1 -1
- package/src/modules/embed/__tests__/EmbedView.test.tsx +19 -2
- package/src/modules/embed/components/EmbedLinkPage.tsx +1 -2
- package/src/modules/git/components/BranchSwitcher.tsx +3 -4
- package/src/modules/git/components/FileHistoryPanel.tsx +2 -2
- package/src/modules/git/components/GitSyncFailedBanner.tsx +2 -4
- package/src/modules/git/components/HistoryVersionPreview.tsx +4 -15
- package/src/modules/git/components/PullNeededBanner.tsx +1 -1
- package/src/modules/git/hooks/useAutoPullUpdates.ts +1 -1
- package/src/modules/git/index.ts +11 -0
- package/src/modules/layout/components/MobileChatLayout.tsx +1 -1
- package/src/modules/layout/index.ts +9 -0
- package/src/modules/library/__tests__/SkillPage.test.tsx +39 -0
- package/src/modules/library/__tests__/propose-change.test.ts +75 -0
- package/src/modules/library/components/AddToPluginDialog.tsx +1 -1
- package/src/modules/library/components/ChangeRequestDock.tsx +1 -1
- package/src/modules/library/components/LibraryLayout.tsx +2 -2
- package/src/modules/library/components/LibraryPage.tsx +3 -3
- package/src/modules/library/components/ManagedPluginRequests.tsx +1 -1
- package/src/modules/library/components/NewSkillPanel.tsx +2 -2
- package/src/modules/library/components/PersonalAddDialog.tsx +1 -1
- package/src/modules/library/components/PersonalPluginPage.tsx +1 -1
- package/src/modules/library/components/PluginExtras.tsx +1 -4
- package/src/modules/library/components/PluginPage.tsx +1 -1
- package/src/modules/library/components/PluginRows.tsx +1 -1
- package/src/modules/library/components/SkillsTree.tsx +1 -4
- package/src/modules/library/components/plugin-page-parts.tsx +1 -1
- package/src/modules/library/components/skill-page/SkillFilePane.tsx +19 -7
- package/src/modules/library/components/skill-page/SkillPage.tsx +19 -26
- package/src/modules/library/components/tool-page/ToolConnectionSection.tsx +2 -4
- package/src/modules/library/components/tool-page/ToolVarRow.tsx +2 -2
- package/src/modules/library/hooks/useJoinRequests.ts +1 -1
- package/src/modules/library/hooks/useLibraryData.ts +3 -3
- package/src/modules/library/hooks/useToolPage.ts +1 -1
- package/src/modules/library/hooks/useToolSource.ts +1 -1
- package/src/modules/library/index.ts +12 -0
- package/src/modules/library/routes/LibraryRoutes.tsx +1 -1
- package/src/modules/library/routes/WorkspaceItemRoute.tsx +1 -3
- package/src/modules/library/routes/library-paths.ts +1 -1
- package/src/modules/library/services/library.api.ts +10 -8
- package/src/modules/library/services/plugins.api.ts +1 -1
- package/src/modules/library/services/teams.api.ts +1 -1
- package/src/modules/library/utils/status.ts +2 -2
- package/src/modules/onboarding/components/ConnectAgentPill.tsx +1 -1
- package/src/modules/onboarding/components/CreatorWelcomePage.tsx +2 -3
- package/src/modules/onboarding/components/GetStartedColumn.tsx +6 -13
- package/src/modules/onboarding/components/InviteButton.tsx +2 -2
- package/src/modules/onboarding/components/InviteDialog.tsx +4 -6
- package/src/modules/onboarding/components/RootLanding.tsx +2 -2
- package/src/modules/onboarding/components/StarterPackCard.tsx +1 -1
- package/src/modules/onboarding/components/WelcomePage.tsx +2 -5
- package/src/modules/onboarding/index.ts +10 -0
- package/src/modules/onboarding/paths.ts +1 -1
- package/src/modules/onboarding/state/agent-connection.ts +2 -2
- package/src/modules/onboarding/state/onboarding.ts +1 -1
- package/src/modules/onboarding/state/starter-packs.ts +1 -1
- package/src/modules/pr/components/OpenChangeRequestDialog.tsx +1 -1
- package/src/modules/pr/index.ts +14 -0
- package/src/modules/pr/services/pr-approvals.api.ts +1 -1
- package/src/modules/pr/services/pr-cancel.api.ts +1 -1
- package/src/modules/pr/services/pr-detail.api.ts +2 -2
- package/src/modules/pr/services/pr-edit.api.ts +22 -0
- package/src/modules/pr/services/pr-merge.api.ts +1 -1
- package/src/modules/pr/services/pr-open.api.ts +1 -1
- package/src/modules/review/components/DiffViewer.tsx +1 -1
- package/src/modules/review/components/MarkdownDiffViewer.tsx +1 -2
- package/src/modules/review/components/ReviewPanel.tsx +2 -3
- package/src/modules/review/state/ReviewProvider.tsx +2 -2
- package/src/modules/secrets-vault/index.ts +6 -0
- package/src/modules/settings/components/DeploymentPage.tsx +2 -2
- package/src/modules/settings/components/SettingsLayout.tsx +2 -2
- package/src/modules/settings/index.ts +8 -0
- package/src/modules/setup/components/FirstRunStorage.tsx +1 -1
- package/src/modules/setup/index.ts +6 -0
- package/src/modules/toolbar/commands/actions.tsx +3 -3
- package/src/modules/toolbar/commands/useCommandActions.ts +5 -9
- package/src/modules/toolbar/components/AgentInstructionsCard.tsx +2 -2
- package/src/modules/toolbar/components/AppSwitcher.tsx +1 -2
- package/src/modules/toolbar/components/CoworkSetupSteps.tsx +1 -1
- package/src/modules/toolbar/components/ExternalAgentAccessPage.tsx +1 -1
- package/src/modules/toolbar/components/ProfileMenu.tsx +3 -3
- package/src/modules/toolbar/components/SearchPalette.tsx +4 -8
- package/src/modules/toolbar/components/Toolbar.tsx +2 -5
- package/src/modules/toolbar/index.ts +6 -0
- package/src/modules/toolbar/search/sources.ts +4 -7
- package/src/modules/toolbar/services/agent-instructions.api.ts +1 -1
- package/src/modules/tools/ToolsExplorerPage.tsx +217 -18
- package/src/modules/tools/__tests__/ToolsExplorerPage.read-only.test.tsx +220 -0
- package/src/modules/tools/tool-hints.api.ts +44 -0
- package/src/modules/workflow/index.ts +7 -0
- package/src/modules/workflow/state/ChangeRequestStaleBinder.tsx +1 -0
- package/src/modules/workflow/state/EventBusFocusBinder.tsx +1 -1
- package/src/modules/workspace/components/FileExplorer.tsx +35 -8
- package/src/modules/workspace/components/FilePaneCard.tsx +37 -12
- package/src/modules/workspace/components/FileRoute.tsx +10 -3
- package/src/modules/workspace/components/FileViewer.tsx +169 -25
- package/src/modules/workspace/components/FullScreenView.tsx +93 -0
- package/src/modules/workspace/components/KbFileRail.tsx +1 -1
- package/src/modules/workspace/components/KbPageHeader.tsx +9 -0
- package/src/modules/workspace/components/__tests__/FileExplorer.test.tsx +137 -0
- package/src/modules/workspace/components/__tests__/FileRoute.test.tsx +11 -0
- package/src/modules/workspace/components/__tests__/FileViewer.test.tsx +487 -3
- package/src/modules/workspace/components/readingCarry.ts +59 -0
- package/src/modules/workspace/components/renderers/HtmlRenderer.tsx +36 -175
- package/src/modules/workspace/components/renderers/ToolRenderer.tsx +1 -1
- package/src/modules/workspace/components/renderers/__tests__/HtmlRenderer.tools.test.tsx +168 -42
- package/src/modules/workspace/components/renderers/__tests__/bridgeHarness.ts +20 -3
- package/src/modules/workspace/components/renderers/__tests__/htmlSandbox.test.ts +63 -4
- package/src/modules/workspace/components/renderers/__tests__/htmlToolBridge.test.ts +235 -1
- package/src/modules/workspace/components/renderers/__tests__/htmlViewsGuide.test.ts +14 -3
- package/src/modules/workspace/components/renderers/__tests__/pageToolsHarness.ts +79 -0
- package/src/modules/workspace/components/renderers/__tests__/useHtmlToolBridge.test.tsx +316 -0
- package/src/modules/workspace/components/renderers/htmlSandbox.ts +75 -13
- package/src/modules/workspace/components/renderers/htmlToolBridge.ts +196 -25
- package/src/modules/workspace/components/renderers/index.ts +10 -0
- package/src/modules/workspace/components/renderers/useHtmlToolBridge.tsx +253 -0
- package/src/modules/workspace/hooks/useFullScreenView.ts +52 -0
- package/src/modules/workspace/hooks/useImageRevision.ts +1 -1
- package/src/modules/workspace/hooks/useKnowledgeWriteTarget.ts +1 -1
- package/src/modules/workspace/hooks/useLastCommit.ts +1 -1
- package/src/modules/workspace/hooks/useWorkspaceState.ts +4 -4
- package/src/modules/workspace/index.ts +30 -1
- package/src/modules/workspace/routing/kb-routes.ts +1 -1
- package/src/modules/workspace/state/__tests__/applied-request-clears-pending.test.tsx +0 -1
- package/src/modules/workspace/state/open-change-requests.tsx +1 -1
- package/src/modules/workspace/utils/frameEscape.ts +15 -0
- package/src/modules/workspace/utils/treeConfirm.ts +1 -1
- package/src/shared/theme/measure.ts +7 -0
- package/src/modules/pr/services/pr-comments.api.ts +0 -45
|
@@ -11,18 +11,11 @@ import {
|
|
|
11
11
|
import { Button, IconButton, buttonClasses } from '../../../shared/components';
|
|
12
12
|
import { cn } from '../../../lib/utils';
|
|
13
13
|
import { copyToClipboard } from '../../../lib/clipboard';
|
|
14
|
-
import { useAdmin } from '../../admin
|
|
15
|
-
import { listAccounts } from '../../auth
|
|
16
|
-
import { listPlugins, type PluginSummary } from '../../library
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { useMediaQuery } from '../../layout/hooks/useMediaQuery';
|
|
20
|
-
import { SETUP_COLUMN_HIDDEN_QUERY } from '../../layout/breakpoints';
|
|
21
|
-
import { useWorkspace } from '../../workspace/state/workspace.context';
|
|
22
|
-
import { useMergedWorkspaceTree } from '../../workspace/hooks/useMergedWorkspaceTree';
|
|
23
|
-
import { useFileNav } from '../../workspace/routing/kb-routes';
|
|
24
|
-
import { useCreatePage } from '../../workspace/hooks/useCreatePage';
|
|
25
|
-
import { findEntryByPath, pathExistsInTree } from '../../workspace/utils/fileTree';
|
|
14
|
+
import { useAdmin } from '../../admin';
|
|
15
|
+
import { listAccounts } from '../../auth';
|
|
16
|
+
import { listPlugins, type PluginSummary, LIBRARY_ROOT, isLibraryLocation, usePluginsRevision } from '../../library';
|
|
17
|
+
import { useMediaQuery, SETUP_COLUMN_HIDDEN_QUERY } from '../../layout';
|
|
18
|
+
import { useWorkspace, useMergedWorkspaceTree, useFileNav, useCreatePage, findEntryByPath, pathExistsInTree } from '../../workspace';
|
|
26
19
|
import { useOnboarding, useSetupChecklist } from '../state/onboarding';
|
|
27
20
|
import { useAgentConnection } from '../state/agent-connection';
|
|
28
21
|
import {
|
|
@@ -35,7 +28,7 @@ import {
|
|
|
35
28
|
import { useStarterPacks } from '../state/starter-packs';
|
|
36
29
|
import { useInviteDialog } from '../state/invite-dialog.context';
|
|
37
30
|
import { WELCOME_PATH } from '../paths';
|
|
38
|
-
import { COMMAND_MENU_SHORTCUT_LABEL, openCommandMenu } from '../../toolbar
|
|
31
|
+
import { COMMAND_MENU_SHORTCUT_LABEL, openCommandMenu } from '../../toolbar';
|
|
39
32
|
|
|
40
33
|
/** The starter page every new knowledge base is seeded with (`kb-template/`). */
|
|
41
34
|
const GUIDE_FILE = 'How to get started.md';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { Users } from 'lucide-react';
|
|
3
3
|
import { Button, IconButton, MenuPanel, buttonClasses, useDismissableMenu } from '../../../shared/components';
|
|
4
|
-
import { useAdmin } from '../../admin
|
|
5
|
-
import { fetchAdmins, type AdminContact } from '../../access
|
|
4
|
+
import { useAdmin } from '../../admin';
|
|
5
|
+
import { fetchAdmins, type AdminContact } from '../../access';
|
|
6
6
|
import { useInviteDialog } from '../state/invite-dialog.context';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -4,12 +4,10 @@ import { MIN_PASSWORD_LENGTH } from '@bevel-software/platform-shared';
|
|
|
4
4
|
import { Badge, Banner, Button, Dialog, TextField, type BadgeTone } from '../../../shared/components';
|
|
5
5
|
import { SlotBoundary } from '../../../shared/components/SlotBoundary';
|
|
6
6
|
import { useAppRegistry } from '../../../core/registry';
|
|
7
|
-
import { useAuth } from '../../auth
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { addMember, fetchRoles } from '../../admin/services/roles.api';
|
|
12
|
-
import { copyToClipboard } from '../../library/utils/clipboard';
|
|
7
|
+
import { useAuth, useSignInMethods, createAccount, listAccounts } from '../../auth';
|
|
8
|
+
import type { LoginProviders } from '../../auth';
|
|
9
|
+
import { addMember, fetchRoles } from '../../admin';
|
|
10
|
+
import { copyToClipboard } from '../../library';
|
|
13
11
|
import { initials } from '../../../lib/email';
|
|
14
12
|
import { EmailChipsInput } from './EmailChipsInput';
|
|
15
13
|
import {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import { Navigate } from 'react-router-dom';
|
|
3
|
-
import { KB_ROUTE_PREFIX } from '../../workspace
|
|
4
|
-
import { takePostLoginRedirect } from '../../auth
|
|
3
|
+
import { KB_ROUTE_PREFIX } from '../../workspace';
|
|
4
|
+
import { takePostLoginRedirect } from '../../auth';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Where `/` lands: Knowledge, for everyone, brand-new accounts included.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { Button } from '../../../shared/components';
|
|
3
|
-
import { useWorkspace } from '../../workspace
|
|
3
|
+
import { useWorkspace } from '../../workspace';
|
|
4
4
|
import { useStarterPacks } from '../state/starter-packs';
|
|
5
5
|
import { SKIP_STARTER_PACK, type StarterPackApplied, type StarterPackSummary } from '../services/starter-packs.api';
|
|
6
6
|
|
|
@@ -3,12 +3,9 @@ import { useNavigate } from 'react-router-dom';
|
|
|
3
3
|
import { Check, Copy, X } from 'lucide-react';
|
|
4
4
|
import { cn } from '../../../lib/utils';
|
|
5
5
|
import { Button, IconButton } from '../../../shared/components';
|
|
6
|
-
import { useAuth } from '../../auth
|
|
7
|
-
import { useLibraryToast } from '../../library
|
|
8
|
-
import { copyToClipboard, COPY_FAILED_TOAST } from '../../library/utils/clipboard';
|
|
9
|
-
import { pathForLibraryFilter } from '../../library/routes/library-paths';
|
|
6
|
+
import { useAuth } from '../../auth';
|
|
7
|
+
import { useLibraryToast, copyToClipboard, COPY_FAILED_TOAST, pathForLibraryFilter, displayFirstName } from '../../library';
|
|
10
8
|
import { useAppRegistry } from '../../../core/registry';
|
|
11
|
-
import { displayFirstName } from '../../library/utils/personal-plugin';
|
|
12
9
|
import { ChatGptInstallLink, ClaudeInstallLink, mcpEndpointUrl } from '../../../shared/mcp';
|
|
13
10
|
import { AGENT_CLIENTS, type AgentClient } from '../agent-clients';
|
|
14
11
|
import { useOnboarding } from '../state/onboarding';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the onboarding module offers the other modules. A consumer outside the
|
|
3
|
+
* module imports from here, never from the files: they are the module's own
|
|
4
|
+
* layout and free to move. Export what another module needs; nothing more.
|
|
5
|
+
*/
|
|
6
|
+
export { WELCOME_PATH } from './paths';
|
|
7
|
+
export { useInviteDialog } from './state/invite-dialog.context';
|
|
8
|
+
export type { InviteDialogController } from './state/invite-dialog.context';
|
|
9
|
+
export { useOnboarding, useSetupChecklist } from './state/onboarding';
|
|
10
|
+
export { useStarterPacks } from './state/starter-packs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext, useEffect, useState, useSyncExternalStore } from 'react';
|
|
2
|
-
import { AuthContext } from '../../auth
|
|
3
|
-
import { useEventBus } from '../../workflow
|
|
2
|
+
import { AuthContext } from '../../auth';
|
|
3
|
+
import { useEventBus } from '../../workflow';
|
|
4
4
|
import { fetchAgentConnection, type AgentConnection } from '../services/agent-connection.api';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
protectedBranchDisplayName,
|
|
6
6
|
} from '@bevel-software/platform-shared';
|
|
7
7
|
import { Dialog } from '../../../shared/components/Dialog';
|
|
8
|
-
import { useGit } from '../../git
|
|
8
|
+
import { useGit } from '../../git';
|
|
9
9
|
import { openChangeRequest } from '../services/pr-open.api';
|
|
10
10
|
import { PR_STALE_EVENT } from '../../../core/events';
|
|
11
11
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pr module's public surface: the change-request operations other modules
|
|
3
|
+
* call. Composed from the service files here, so a caller depends on the
|
|
4
|
+
* module and not on which file happens to hold a verb.
|
|
5
|
+
*/
|
|
6
|
+
export { fetchPrDetail } from './services/pr-detail.api';
|
|
7
|
+
export { openChangeRequest } from './services/pr-open.api';
|
|
8
|
+
export { updateChangeRequest } from './services/pr-edit.api';
|
|
9
|
+
export { approvePrFile, revertPrFile, unapprovePrFile } from './services/pr-approvals.api';
|
|
10
|
+
export { deleteChangeRequest } from './services/pr-cancel.api';
|
|
11
|
+
export { refreshChangeRequestFromTarget } from './services/pr-merge.api';
|
|
12
|
+
// Reached by other modules; exported here so they stop importing the files.
|
|
13
|
+
export { cancelPullRequest } from './services/pr-cancel.api';
|
|
14
|
+
export { mergePullRequest } from './services/pr-merge.api';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FileApprovalState } from '@bevel-software/platform-shared';
|
|
2
2
|
import { authFetch } from '../../../lib/api';
|
|
3
|
-
import { handleApiResponse } from '../../git
|
|
3
|
+
import { handleApiResponse } from '../../git';
|
|
4
4
|
|
|
5
5
|
export async function approvePrFile(
|
|
6
6
|
prNumber: number,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CancelPrResult } from '@bevel-software/platform-shared';
|
|
2
2
|
import { authFetch } from '../../../lib/api';
|
|
3
|
-
import { handleApiResponse } from '../../git
|
|
3
|
+
import { handleApiResponse } from '../../git';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Close the change request without merging. The backend re-validates that the
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PullRequestDetail } from '@bevel-software/platform-shared';
|
|
2
2
|
import { authFetch } from '../../../lib/api';
|
|
3
|
-
import { handleApiResponse } from '../../git
|
|
3
|
+
import { handleApiResponse } from '../../git';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Fetch the full PR detail (metadata + file diffs). `fresh` bypasses the
|
|
7
7
|
* backend's 30s detail cache — use from event-driven refreshes (post-merge,
|
|
8
|
-
* post-
|
|
8
|
+
* post-edit, post-open-change-request) but leave off for user-triggered
|
|
9
9
|
* navigation.
|
|
10
10
|
*/
|
|
11
11
|
export async function fetchPrDetail(
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { PullRequestSummary, UpdateChangeRequestInput } from '@bevel-software/platform-shared';
|
|
2
|
+
import { authFetch } from '../../../lib/api';
|
|
3
|
+
import { handleApiResponse } from '../../git';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Change an open change request's title and/or description. The server
|
|
7
|
+
* re-checks who may (the author, or anyone who may merge it — the
|
|
8
|
+
* `viewerCanEdit` verdict) and refuses a merged or closed request; its
|
|
9
|
+
* refusal's words arrive as the thrown error's message.
|
|
10
|
+
*/
|
|
11
|
+
export async function updateChangeRequest(
|
|
12
|
+
prNumber: number,
|
|
13
|
+
input: UpdateChangeRequestInput,
|
|
14
|
+
): Promise<PullRequestSummary> {
|
|
15
|
+
return handleApiResponse(
|
|
16
|
+
await authFetch(`/api/workflow/change-requests/${prNumber}`, {
|
|
17
|
+
method: 'PATCH',
|
|
18
|
+
headers: { 'Content-Type': 'application/json' },
|
|
19
|
+
body: JSON.stringify(input),
|
|
20
|
+
}),
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChangeRequestUpdateResult } from '@bevel-software/platform-shared';
|
|
2
2
|
import { authFetch } from '../../../lib/api';
|
|
3
|
-
import { handleApiResponse } from '../../git
|
|
3
|
+
import { handleApiResponse } from '../../git';
|
|
4
4
|
|
|
5
5
|
/** The 202 ack the merge endpoint returns — the merge then runs in the background. */
|
|
6
6
|
export interface MergeAccepted {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { authFetch } from '../../../lib/api';
|
|
2
|
-
import { handleApiResponse } from '../../git
|
|
2
|
+
import { handleApiResponse } from '../../git';
|
|
3
3
|
|
|
4
4
|
/** Request shape of `POST /api/workflow/change-requests` (see backend
|
|
5
5
|
* `modules/workflow/workflow.routes.ts`). */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import type { FileDiffPayload } from '@bevel-software/platform-shared';
|
|
3
|
-
import { computeDiff, type DiffLine } from '../../workspace
|
|
3
|
+
import { computeDiff, type DiffLine } from '../../workspace';
|
|
4
4
|
|
|
5
5
|
const MAX_RENDERED_LINES = 5000;
|
|
6
6
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import Markdown from 'react-markdown';
|
|
3
3
|
import { isFrontmatterFence, type FileDiffPayload } from '@bevel-software/platform-shared';
|
|
4
|
-
import { computeDiff, type DiffLine } from '../../workspace
|
|
5
|
-
import { parseFrontmatter, labelFor, type FrontmatterData } from '../../workspace/utils/frontmatter';
|
|
4
|
+
import { computeDiff, type DiffLine, parseFrontmatter, labelFor, type FrontmatterData } from '../../workspace';
|
|
6
5
|
import { escapeSpacesInLinkDestinations } from '../../../shared/markdown/Markdown';
|
|
7
6
|
import {
|
|
8
7
|
KB_REMARK_PLUGINS,
|
|
@@ -2,13 +2,12 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import { Check, Trash2, Eye, ChevronDown, X } from 'lucide-react';
|
|
3
3
|
import type { PendingChange } from '@bevel-software/platform-shared';
|
|
4
4
|
import { useReview } from '../state/review.context';
|
|
5
|
-
import { useWorkspace } from '../../workspace
|
|
5
|
+
import { useWorkspace, useWorkspaceImageResolver } from '../../workspace';
|
|
6
6
|
import {
|
|
7
7
|
useFileNav,
|
|
8
8
|
useNodeIdNav,
|
|
9
9
|
stripJunkBeforeKbDir,
|
|
10
|
-
} from '../../workspace
|
|
11
|
-
import { useWorkspaceImageResolver } from '../../workspace/hooks/useWorkspaceImageResolver';
|
|
10
|
+
} from '../../workspace';
|
|
12
11
|
import { pluginOfPath, currentKbLayout, DEFAULT_BRANCH } from '@bevel-software/platform-shared';
|
|
13
12
|
import { cn } from '../../../lib/utils';
|
|
14
13
|
import { DOCUMENT_COLUMN, documentGutters } from '../../../shared/theme/measure';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { ReviewContext } from './review.context';
|
|
3
3
|
import { useReviewState } from '../hooks/useReviewState';
|
|
4
|
-
import { useWorkspace } from '../../workspace
|
|
5
|
-
import { useGit } from '../../git
|
|
4
|
+
import { useWorkspace } from '../../workspace';
|
|
5
|
+
import { useGit } from '../../git';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Wires the agent-review session state into the tree. Registered by the
|
|
@@ -5,3 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
/** "Connect your tools", mounted by Skills & Tools at `/skills-and-tools/connect`. */
|
|
7
7
|
export { ConnectToolsPage } from './components/ConnectToolsPage';
|
|
8
|
+
// Reached by other modules; exported here so they stop importing the files.
|
|
9
|
+
export { probeWords } from './probe/probe-verdict';
|
|
10
|
+
export { useSavedKeyProbe } from './probe/useSavedKeyProbe';
|
|
11
|
+
export { startToolOAuth } from './services/connect.api';
|
|
12
|
+
export { deleteAdminVar, listToolSecrets, setAdminVar, setOAuthClientSecret, setUserVar } from './services/tool-secrets.api';
|
|
13
|
+
export type { ProbeVerdict, ToolSecrets, ToolVarStatus } from './services/tool-secrets.api';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PageShell } from '../../../shared/components/PageShell';
|
|
2
2
|
import { Banner, Button } from '../../../shared/components';
|
|
3
3
|
import { SlotBoundary } from '../../../shared/components/SlotBoundary';
|
|
4
|
-
import { useAdmin } from '../../admin
|
|
5
|
-
import { useSetupStatus } from '../../setup
|
|
4
|
+
import { useAdmin } from '../../admin';
|
|
5
|
+
import { useSetupStatus } from '../../setup';
|
|
6
6
|
import { SetupScreen } from '../../setup/components/SetupScreen';
|
|
7
7
|
import { useAppRegistry } from '../../../core/registry';
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useContext, useMemo } from 'react';
|
|
2
2
|
import { Outlet, useLocation } from 'react-router-dom';
|
|
3
|
-
import { AdminContext } from '../../admin
|
|
3
|
+
import { AdminContext } from '../../admin';
|
|
4
4
|
import type { AdminMenuItem } from '../../../core/registry';
|
|
5
5
|
import { SidebarFrame } from '../../layout/components/SidebarFrame';
|
|
6
|
-
import { useMediaQuery } from '../../layout
|
|
6
|
+
import { useMediaQuery } from '../../layout';
|
|
7
7
|
import {
|
|
8
8
|
isSettingsNavPath,
|
|
9
9
|
normalizeSettingsPath,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the settings module offers the other modules. A consumer outside the
|
|
3
|
+
* module imports from here, never from the files: they are the module's own
|
|
4
|
+
* layout and free to move. Export what another module needs; nothing more.
|
|
5
|
+
*/
|
|
6
|
+
export { fetchMarketplaceRegistration } from './services/github-facade.api';
|
|
7
|
+
export { isSettingsNavPath, useMenuSections } from './settings-nav-items';
|
|
8
|
+
export type { MenuSections } from './settings-nav-items';
|
|
@@ -8,7 +8,7 @@ import { GitHubRepositoryPanel } from './GitHubRepositoryPanel';
|
|
|
8
8
|
import { forgetDraft } from '../utils/kept-draft';
|
|
9
9
|
import { tokenUsernameForHost } from '../utils/git-host';
|
|
10
10
|
import { suggestedBranch } from '../utils/suggested-branch';
|
|
11
|
-
import { KB_ROUTE_PREFIX } from '../../workspace
|
|
11
|
+
import { KB_ROUTE_PREFIX } from '../../workspace';
|
|
12
12
|
import { ConnectionProbeFailed, useConnectionProbe } from '../hooks/useConnectionProbe';
|
|
13
13
|
import {
|
|
14
14
|
saveSettings,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the setup module offers the other modules. A consumer outside the
|
|
3
|
+
* module imports from here, never from the files: they are the module's own
|
|
4
|
+
* layout and free to move. Export what another module needs; nothing more.
|
|
5
|
+
*/
|
|
6
|
+
export { useSetupStatus } from './hooks/useSetupStatus';
|
|
@@ -2,9 +2,9 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import type { AuthUser } from '@bevel-software/platform-shared';
|
|
3
3
|
import { ArrowRight, FilePlus, Pencil, Plug, Settings, UserPlus } from 'lucide-react';
|
|
4
4
|
import type { AdminMenuItem, AppDef } from '../../../core/registry';
|
|
5
|
-
import type { MenuSections } from '../../settings
|
|
6
|
-
import type { InviteDialogController } from '../../onboarding
|
|
7
|
-
import { WELCOME_PATH } from '../../onboarding
|
|
5
|
+
import type { MenuSections } from '../../settings';
|
|
6
|
+
import type { InviteDialogController } from '../../onboarding';
|
|
7
|
+
import { WELCOME_PATH } from '../../onboarding';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The commands the toolbar's menu can run, beside the pages and items it
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { useNavigate } from 'react-router-dom';
|
|
3
3
|
import { useActiveAppId, useAppRegistry } from '../../../core/registry';
|
|
4
|
-
import { useAdmin } from '../../admin
|
|
5
|
-
import { useAuth } from '../../auth
|
|
6
|
-
import { useMenuSections } from '../../settings
|
|
7
|
-
import { useInviteDialog } from '../../onboarding
|
|
8
|
-
import {
|
|
9
|
-
import { useWorkspace } from '../../workspace/state/workspace.context';
|
|
10
|
-
import { useEditablePage } from '../../workspace/state/editable-page';
|
|
11
|
-
import { useFileNav } from '../../workspace/routing/kb-routes';
|
|
12
|
-
import { useCreatePage } from '../../workspace/hooks/useCreatePage';
|
|
4
|
+
import { useAdmin } from '../../admin';
|
|
5
|
+
import { useAuth } from '../../auth';
|
|
6
|
+
import { useMenuSections } from '../../settings';
|
|
7
|
+
import { useInviteDialog, useOnboarding } from '../../onboarding';
|
|
8
|
+
import { useWorkspace, useEditablePage, useFileNav, useCreatePage } from '../../workspace';
|
|
13
9
|
import {
|
|
14
10
|
coreCommandActions,
|
|
15
11
|
mergeCommandActions,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { Pencil } from 'lucide-react';
|
|
3
|
-
import { AdminContext } from '../../admin
|
|
4
|
-
import { WorkspaceContext } from '../../workspace
|
|
3
|
+
import { AdminContext } from '../../admin';
|
|
4
|
+
import { WorkspaceContext } from '../../workspace';
|
|
5
5
|
import { Button } from '../../../shared/components';
|
|
6
6
|
import { Markdown } from '../../../shared/markdown/Markdown';
|
|
7
7
|
import {
|
|
@@ -2,8 +2,7 @@ import { useEffect, useMemo, useRef, useState, type MouseEvent as ReactMouseEven
|
|
|
2
2
|
import { Check, ChevronDown } from 'lucide-react';
|
|
3
3
|
import { Link, useLocation, useNavigate } from 'react-router-dom';
|
|
4
4
|
import { activeAppId, useActiveAppId, useAppRegistry, type AppDef } from '../../../core/registry';
|
|
5
|
-
import { useMediaQuery } from '../../layout
|
|
6
|
-
import { TOOLBAR_STACK_QUERY } from '../../layout/breakpoints';
|
|
5
|
+
import { useMediaQuery, TOOLBAR_STACK_QUERY } from '../../layout';
|
|
7
6
|
import { cn } from '../../../lib/utils';
|
|
8
7
|
import { PRODUCT_NAME, ProductName } from '../../../core/ProductName';
|
|
9
8
|
import { useMakerLinkLabel, useMakerUrl } from '../../../core/maker-url';
|
|
@@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
|
|
|
3
3
|
import { Banner } from '../../../shared/components';
|
|
4
4
|
import { CopyBlock } from '../../../shared/mcp';
|
|
5
5
|
import { marketplaceGitUrl } from '../../../shared/marketplace-url';
|
|
6
|
-
import { fetchMarketplaceRegistration } from '../../settings
|
|
6
|
+
import { fetchMarketplaceRegistration } from '../../settings';
|
|
7
7
|
import { ClaudeMarketplaceCarousel } from './ClaudeMarketplaceCarousel';
|
|
8
8
|
import { Prose } from './setup-step-parts';
|
|
9
9
|
import { deploymentHost } from './deployment-address';
|
|
@@ -22,7 +22,7 @@ import { CODEX_LOGIN_NOTE, GITHUB_LINK_KIND, marketplaceCommands, marketplaceGit
|
|
|
22
22
|
import { AgentInstructionsCard } from './AgentInstructionsCard';
|
|
23
23
|
import { CONNECT_TOOLS_PATH } from '../../library';
|
|
24
24
|
import { CoworkSetupSteps } from './CoworkSetupSteps';
|
|
25
|
-
import { useAdmin } from '../../admin
|
|
25
|
+
import { useAdmin } from '../../admin';
|
|
26
26
|
import {
|
|
27
27
|
type ExternalApiKeySummary,
|
|
28
28
|
type MintedExternalApiKey,
|
|
@@ -2,10 +2,10 @@ import { Fragment, useCallback, useRef, useState } from 'react';
|
|
|
2
2
|
import { ChevronDown, LogOut } from 'lucide-react';
|
|
3
3
|
import { useNavigate } from 'react-router-dom';
|
|
4
4
|
import type { AuthUser } from '@bevel-software/platform-shared';
|
|
5
|
-
import { useAuth } from '../../auth
|
|
6
|
-
import { useAdmin } from '../../admin
|
|
5
|
+
import { useAuth } from '../../auth';
|
|
6
|
+
import { useAdmin } from '../../admin';
|
|
7
7
|
import type { AdminMenuItem } from '../../../core/registry';
|
|
8
|
-
import { useMenuSections } from '../../settings
|
|
8
|
+
import { useMenuSections } from '../../settings';
|
|
9
9
|
import {
|
|
10
10
|
MenuItem,
|
|
11
11
|
MenuLabel,
|
|
@@ -13,13 +13,9 @@ import { useNavigate } from 'react-router-dom';
|
|
|
13
13
|
import { ChevronRight, FileText, Puzzle, Search, Sparkles, Wrench } from 'lucide-react';
|
|
14
14
|
import { MenuPanel, useDismissableMenu, useLatestRef } from '../../../shared/components';
|
|
15
15
|
import { cn } from '../../../lib/utils';
|
|
16
|
-
import { useWorkspace } from '../../workspace
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { knowledgeFiles } from '../../workspace/utils/fileTree';
|
|
20
|
-
import { listSkills } from '../../library/services/library.api';
|
|
21
|
-
import { listPlugins } from '../../library/services/plugins.api';
|
|
22
|
-
import { listToolSecrets } from '../../secrets-vault/services/tool-secrets.api';
|
|
16
|
+
import { useWorkspace, useMergedWorkspaceTree, useFileNav, knowledgeFiles } from '../../workspace';
|
|
17
|
+
import { listSkills, listPlugins } from '../../library';
|
|
18
|
+
import { listToolSecrets } from '../../secrets-vault';
|
|
23
19
|
import { rankByName, rankByNames } from '../search/rank';
|
|
24
20
|
import {
|
|
25
21
|
libraryResults,
|
|
@@ -39,7 +35,7 @@ import {
|
|
|
39
35
|
shortcutHint,
|
|
40
36
|
shortcutKeycapWidth,
|
|
41
37
|
} from '../commands/command-menu';
|
|
42
|
-
import { useSetupChecklist } from '../../onboarding
|
|
38
|
+
import { useSetupChecklist } from '../../onboarding';
|
|
43
39
|
|
|
44
40
|
/** Rows per group. Past this the query is too short to be useful, not the list too long. */
|
|
45
41
|
const GROUP_LIMIT = 8;
|
|
@@ -4,13 +4,10 @@ import { PanelRight } from 'lucide-react';
|
|
|
4
4
|
import { ProfileMenu } from './ProfileMenu';
|
|
5
5
|
import { AppSwitcher } from './AppSwitcher';
|
|
6
6
|
import { SearchPalette } from './SearchPalette';
|
|
7
|
-
import { useLayout } from '../../layout
|
|
8
|
-
import { useMediaQuery } from '../../layout/hooks/useMediaQuery';
|
|
7
|
+
import { useLayout, useMediaQuery, toggleSidebar, useSidebar, TOOLBAR_STACK_QUERY } from '../../layout';
|
|
9
8
|
import { useActiveAppId, useAppRegistry } from '../../../core/registry';
|
|
10
9
|
import { SidebarToggle } from '../../layout/components/SidebarToggle';
|
|
11
|
-
import {
|
|
12
|
-
import { TOOLBAR_STACK_QUERY } from '../../layout/breakpoints';
|
|
13
|
-
import { isSettingsNavPath } from '../../settings/settings-nav-items';
|
|
10
|
+
import { isSettingsNavPath } from '../../settings';
|
|
14
11
|
import { InviteButton } from '../../onboarding/components/InviteButton';
|
|
15
12
|
|
|
16
13
|
/**
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the toolbar module offers the other modules. A consumer outside the
|
|
3
|
+
* module imports from here, never from the files: they are the module's own
|
|
4
|
+
* layout and free to move. Export what another module needs; nothing more.
|
|
5
|
+
*/
|
|
6
|
+
export { COMMAND_MENU_SHORTCUT_LABEL, openCommandMenu } from './commands/command-menu';
|
|
@@ -6,13 +6,10 @@ import {
|
|
|
6
6
|
pluginOfPath,
|
|
7
7
|
type FileTreeEntry,
|
|
8
8
|
} from '@bevel-software/platform-shared';
|
|
9
|
-
import type { LibrarySkillSummary } from '../../library
|
|
10
|
-
import type {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import { pluginLabel, pluginNameForPath } from '../../library/utils/plugin-summary';
|
|
14
|
-
import { PERSONAL_PLUGIN_NAME } from '../../library/utils/personal-plugin';
|
|
15
|
-
import { displayFileName } from '../../workspace/utils/display-file-name';
|
|
9
|
+
import type { LibrarySkillSummary, PluginSummary } from '../../library';
|
|
10
|
+
import type { ToolSecrets } from '../../secrets-vault';
|
|
11
|
+
import { pathForPlugin, urlForLibraryItem, pluginLabel, pluginNameForPath, PERSONAL_PLUGIN_NAME } from '../../library';
|
|
12
|
+
import { displayFileName } from '../../workspace';
|
|
16
13
|
|
|
17
14
|
/**
|
|
18
15
|
* What the search palette lists, flattened out of the two places it reads:
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getOrCreateWorkspace,
|
|
12
12
|
readFile,
|
|
13
13
|
writeFile,
|
|
14
|
-
} from '../../workspace
|
|
14
|
+
} from '../../workspace';
|
|
15
15
|
|
|
16
16
|
// The caps, the file name and the comment rule come from
|
|
17
17
|
// `@bevel-software/platform-shared`, the same module the backend composer
|