@bevel-software/platform-core-frontend 0.4.1 → 0.5.1
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/THIRD-PARTY-NOTICES.md +5366 -0
- package/package.json +7 -4
- package/src/core/CoreAppShell.tsx +195 -56
- package/src/core/__tests__/AppChrome.test.tsx +125 -0
- package/src/core/__tests__/ShellRoutes.test.tsx +37 -2
- package/src/core/__tests__/bootstrap.test.ts +63 -0
- package/src/core/bootstrap.ts +73 -0
- package/src/core/events.ts +12 -0
- package/src/core/registry.ts +58 -9
- package/src/index.css +100 -11
- package/src/index.ts +24 -23
- package/src/lib/utils.ts +93 -117
- package/src/modules/access/__tests__/ManageAccessDialog.placement.test.tsx +281 -0
- package/src/modules/access/__tests__/ManageAccessDialog.test.tsx +166 -1
- package/src/modules/access/api.ts +49 -0
- package/src/modules/access/components/ManageAccessDialog.tsx +786 -481
- package/src/modules/access/hooks/useFileAccess.ts +1 -1
- package/src/modules/admin/__tests__/AdminRolesPage.suggest.test.tsx +86 -0
- package/src/modules/admin/__tests__/UserAccountsPage.test.tsx +17 -1
- package/src/modules/admin/__tests__/admin.unread.test.tsx +61 -0
- package/src/modules/admin/components/AdminRolesPage.tsx +44 -38
- package/src/modules/admin/components/RolesCorruptedBanner.tsx +11 -10
- package/src/modules/admin/components/UserAccountsPage.tsx +36 -28
- package/src/modules/admin/state/admin.context.tsx +15 -6
- package/src/modules/auth/components/AccountPage.tsx +11 -11
- package/src/modules/auth/components/LoginScreen.tsx +12 -12
- package/src/modules/auth/services/sso.ts +47 -1
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.test.tsx +277 -0
- package/src/modules/change-requests/__tests__/author.test.ts +48 -0
- package/src/modules/change-requests/__tests__/conflict.test.ts +73 -0
- package/src/modules/change-requests/__tests__/diff.test.ts +134 -0
- package/src/modules/change-requests/__tests__/propose.test.ts +93 -0
- package/src/modules/change-requests/__tests__/useFileOnBranch.test.tsx +72 -0
- package/src/modules/change-requests/change-requests.css +22 -0
- package/src/modules/change-requests/components/ChangeBox.tsx +277 -0
- package/src/modules/change-requests/components/ChangeRequestDialog.tsx +713 -0
- package/src/modules/change-requests/components/ConflictHelp.tsx +47 -0
- package/src/modules/change-requests/components/CrFileTree.tsx +398 -0
- package/src/modules/change-requests/components/FileChangeBoxes.tsx +168 -0
- package/src/modules/change-requests/hooks/useApplyChangeRequest.ts +236 -0
- package/src/modules/change-requests/hooks/useCrFileDiffs.ts +79 -0
- package/src/modules/change-requests/hooks/useFileOnBranch.ts +80 -0
- package/src/modules/change-requests/services/change-requests.api.ts +45 -0
- package/src/modules/change-requests/services/propose.api.ts +162 -0
- package/src/modules/change-requests/utils/author.ts +47 -0
- package/src/modules/change-requests/utils/conflict.ts +38 -0
- package/src/modules/change-requests/utils/diff.ts +80 -0
- package/src/modules/git/__tests__/BranchSwitcher.test.tsx +27 -18
- package/src/modules/git/__tests__/FileHistoryPanel.test.tsx +36 -83
- package/src/modules/git/__tests__/PullNeededBanner.test.tsx +5 -5
- package/src/modules/git/__tests__/PullRequestsForMe.test.tsx +147 -0
- package/src/modules/git/__tests__/useAutoPullUpdates.test.tsx +2 -8
- package/src/modules/git/components/BranchSwitcher.tsx +68 -31
- package/src/modules/git/components/DiffView.tsx +4 -4
- package/src/modules/git/components/FileComparisonPanel.tsx +20 -20
- package/src/modules/git/components/FileHistoryPanel.tsx +71 -107
- package/src/modules/git/components/PullNeededBanner.tsx +6 -13
- package/src/modules/git/components/PullRequestsForMe.tsx +71 -36
- package/src/modules/git/components/UnifiedDiffView.tsx +4 -4
- package/src/modules/git/hooks/__tests__/useGitState.deleteBranch.test.tsx +2 -2
- package/src/modules/git/hooks/useGitState.ts +15 -14
- package/src/modules/git/services/__tests__/error-messages.test.ts +4 -4
- package/src/modules/git/services/error-messages.ts +7 -7
- package/src/modules/git/services/git.api.ts +17 -11
- package/src/modules/git/services/pr-prompts.ts +2 -2
- package/src/modules/git/state/git.context.ts +10 -1
- package/src/modules/layout/__tests__/SidebarFrameResponsive.test.tsx +224 -0
- package/src/modules/layout/__tests__/SidebarToggle.test.tsx +242 -0
- package/src/modules/layout/__tests__/breakpoints.test.ts +56 -0
- package/src/modules/layout/breakpoints.ts +6 -0
- package/src/modules/layout/components/AppLayout.tsx +17 -5
- package/src/modules/layout/components/DemoBanner.tsx +10 -1
- package/src/modules/layout/components/MaintenanceOverlay.tsx +3 -3
- package/src/modules/layout/components/MobileChatLayout.tsx +31 -26
- package/src/modules/layout/components/ResizableThreePaneLayout.tsx +59 -24
- package/src/modules/layout/components/SidebarFrame.tsx +317 -0
- package/src/modules/layout/components/SidebarToggle.tsx +86 -0
- package/src/modules/layout/components/SlideOverlay.tsx +1 -1
- package/src/modules/layout/components/__tests__/MobileChatLayout.test.tsx +40 -2
- package/src/modules/layout/components/__tests__/ResizableThreePaneLayout.test.tsx +19 -3
- package/src/modules/layout/state/sidebar.ts +200 -0
- package/src/modules/library/__tests__/AddToGroupDialog.test.tsx +313 -0
- package/src/modules/library/__tests__/ChangeRequestDock.test.tsx +84 -0
- package/src/modules/library/__tests__/GroupJoinRequests.test.tsx +178 -0
- package/src/modules/library/__tests__/GroupPage.test.tsx +479 -0
- package/src/modules/library/__tests__/GroupsIndexPage.test.tsx +283 -0
- package/src/modules/library/__tests__/GroupsSidebar.contextmenu.test.tsx +175 -0
- package/src/modules/library/__tests__/GroupsSidebar.locked.test.tsx +96 -0
- package/src/modules/library/__tests__/GroupsSidebar.test.tsx +142 -0
- package/src/modules/library/__tests__/GroupsSidebarMenu.test.tsx +142 -0
- package/src/modules/library/__tests__/LibraryCard.test.tsx +149 -0
- package/src/modules/library/__tests__/LibraryRoutes.test.tsx +378 -0
- package/src/modules/library/__tests__/LibrarySidebarMenu.test.tsx +347 -0
- package/src/modules/library/__tests__/LockedGroupView.test.tsx +203 -0
- package/src/modules/library/__tests__/NewGroupDialog.test.tsx +114 -0
- package/src/modules/library/__tests__/PersonalAddDialog.test.tsx +177 -0
- package/src/modules/library/__tests__/SkillPage.test.tsx +1063 -0
- package/src/modules/library/__tests__/ToolConnectionSection.test.tsx +259 -0
- package/src/modules/library/__tests__/ToolLogo.test.tsx +63 -0
- package/src/modules/library/__tests__/ToolPage.test.tsx +315 -0
- package/src/modules/library/__tests__/ToolSharePanel.test.tsx +36 -0
- package/src/modules/library/__tests__/ToolVarRow.test.tsx +260 -0
- package/src/modules/library/__tests__/WorkspaceItemRoute.test.tsx +197 -0
- package/src/modules/library/__tests__/auth-harness.tsx +37 -0
- package/src/modules/library/__tests__/oauth-fragment.test.ts +48 -0
- package/src/modules/library/__tests__/status.test.ts +113 -20
- package/src/modules/library/__tests__/useSkillDetail.test.tsx +102 -0
- package/src/modules/library/__tests__/useToolPage.test.tsx +146 -0
- package/src/modules/library/components/AccessRequestsBanner.tsx +101 -0
- package/src/modules/library/components/AddToGroupDialog.tsx +115 -0
- package/src/modules/library/components/ChangeRequestDock.tsx +52 -28
- package/src/modules/library/components/DeleteGroupDialog.tsx +87 -0
- package/src/modules/library/components/GroupIndexRow.tsx +63 -0
- package/src/modules/library/components/GroupJoinRequests.tsx +56 -0
- package/src/modules/library/components/GroupPage.tsx +373 -0
- package/src/modules/library/components/GroupsIndexPage.tsx +222 -0
- package/src/modules/library/components/GroupsSidebar.tsx +338 -0
- package/src/modules/library/components/GroupsSidebarMenu.tsx +160 -0
- package/src/modules/library/components/LibraryCard.tsx +123 -102
- package/src/modules/library/components/LibraryLayout.tsx +344 -0
- package/src/modules/library/components/LibraryPage.tsx +111 -227
- package/src/modules/library/components/LockGlyph.tsx +31 -0
- package/src/modules/library/components/LockedGroupView.tsx +159 -0
- package/src/modules/library/components/ManagedGroupRequests.tsx +70 -0
- package/src/modules/library/components/NewGroupDialog.tsx +112 -0
- package/src/modules/library/components/NewSkillPanel.tsx +151 -0
- package/src/modules/library/components/PageActions.tsx +156 -0
- package/src/modules/library/components/PendingSkillReview.tsx +63 -0
- package/src/modules/library/components/PersonalAddDialog.tsx +88 -0
- package/src/modules/library/components/PersonalGroupPage.tsx +125 -0
- package/src/modules/library/components/StatusDot.tsx +25 -0
- package/src/modules/library/components/ToolLogo.tsx +171 -0
- package/src/modules/library/components/group-page-parts.tsx +419 -0
- package/src/modules/library/components/skill-page/SkillFileEditor.tsx +134 -0
- package/src/modules/library/components/skill-page/SkillFilePane.tsx +117 -0
- package/src/modules/library/components/skill-page/SkillFileTabs.tsx +112 -0
- package/src/modules/library/components/skill-page/SkillPage.tsx +673 -0
- package/src/modules/library/components/skill-page/tab-ids.ts +33 -0
- package/src/modules/library/components/tool-page/ToolConnectionSection.tsx +175 -0
- package/src/modules/library/components/tool-page/ToolPage.tsx +228 -0
- package/src/modules/library/components/tool-page/ToolSharePanel.tsx +45 -0
- package/src/modules/library/components/tool-page/ToolVarRow.tsx +289 -0
- package/src/modules/library/hooks/useJoinRequests.ts +114 -0
- package/src/modules/library/hooks/useLibraryData.ts +134 -119
- package/src/modules/library/hooks/useSkillDetail.ts +119 -74
- package/src/modules/library/hooks/useToolPage.ts +145 -0
- package/src/modules/library/library.css +33 -245
- package/src/modules/library/routes/LibraryRoutes.tsx +134 -0
- package/src/modules/library/routes/WorkspaceItemRoute.tsx +74 -0
- package/src/modules/library/routes/library-paths.ts +191 -0
- package/src/modules/library/services/groups.api.ts +189 -0
- package/src/modules/library/services/library.api.ts +291 -164
- package/src/modules/library/services/tools.api.ts +60 -0
- package/src/modules/library/state/library-context.ts +22 -0
- package/src/modules/library/state/library-data.tsx +223 -0
- package/src/modules/library/state/toast.context.ts +32 -0
- package/src/modules/library/state/toast.tsx +84 -42
- package/src/modules/library/utils/clipboard.ts +33 -0
- package/src/modules/library/utils/group-summary.ts +68 -0
- package/src/modules/library/utils/names.ts +30 -0
- package/src/modules/library/utils/navigate-external.ts +15 -0
- package/src/modules/library/utils/oauth-fragment.ts +32 -0
- package/src/modules/library/utils/personal-group.ts +36 -0
- package/src/modules/library/utils/status.ts +108 -25
- package/src/modules/library/utils/toast-duration.ts +16 -0
- package/src/modules/onboarding/__tests__/onboarding.test.tsx +533 -0
- package/src/modules/onboarding/agent-clients.ts +48 -0
- package/src/modules/onboarding/components/ConnectAgentPill.tsx +133 -0
- package/src/modules/onboarding/components/RootLanding.tsx +54 -0
- package/src/modules/onboarding/components/WelcomePage.tsx +364 -0
- package/src/modules/onboarding/paths.ts +9 -0
- package/src/modules/onboarding/state/onboarding.ts +191 -0
- package/src/modules/pr/components/OpenChangeRequestDialog.tsx +10 -10
- package/src/modules/pr/services/pr-approvals.api.ts +19 -0
- package/src/modules/pr/services/pr-cancel.api.ts +11 -0
- package/src/modules/review/components/BinaryChangePlaceholder.tsx +3 -3
- package/src/modules/review/components/DiffViewer.tsx +4 -4
- package/src/modules/review/components/MarkdownDiffViewer.tsx +84 -26
- package/src/modules/review/components/ReviewFileRow.tsx +10 -10
- package/src/modules/review/components/ReviewPanel.tsx +49 -17
- package/src/modules/review/components/ReviewPanelSurface.tsx +1 -1
- package/src/modules/review/components/__tests__/MarkdownDiffViewer.test.tsx +122 -0
- package/src/modules/review/hooks/__tests__/useReviewState.test.ts +1 -1
- package/src/modules/secrets-vault/components/ConnectToolsPage.tsx +273 -171
- package/src/modules/secrets-vault/components/SecretsPage.tsx +147 -110
- package/src/modules/secrets-vault/components/ToolSecretsPanel.tsx +109 -92
- package/src/modules/secrets-vault/components/__tests__/SecretsPage.test.tsx +35 -4
- package/src/modules/secrets-vault/services/connect.api.ts +24 -3
- package/src/modules/settings/components/DeploymentPage.tsx +90 -0
- package/src/modules/settings/components/SettingsLayout.tsx +135 -0
- package/src/modules/settings/components/SettingsNav.tsx +114 -0
- package/src/modules/settings/components/__tests__/DeploymentPage.test.tsx +110 -0
- package/src/modules/settings/components/__tests__/SettingsLayout.test.tsx +249 -0
- package/src/modules/settings/settings-nav-items.tsx +166 -0
- package/src/modules/setup/__tests__/setup.test.tsx +540 -0
- package/src/modules/setup/components/SetupGate.tsx +67 -0
- package/src/modules/setup/components/SetupScreen.tsx +573 -0
- package/src/modules/setup/services/setup.api.ts +106 -0
- package/src/modules/setup/utils/git-host.ts +34 -0
- package/src/modules/toolbar/components/AppSwitcher.tsx +38 -15
- package/src/modules/toolbar/components/ExternalAgentAccessPage.tsx +50 -50
- package/src/modules/toolbar/components/ProfileMenu.tsx +294 -0
- package/src/modules/toolbar/components/Toolbar.tsx +56 -54
- package/src/modules/toolbar/components/__tests__/AppSwitcher.test.tsx +176 -122
- package/src/modules/toolbar/components/__tests__/Toolbar.test.tsx +252 -77
- package/src/modules/tools/ToolsExplorerPage.tsx +45 -40
- package/src/modules/workspace/__tests__/design-system-parity.test.ts +133 -0
- package/src/modules/workspace/__tests__/testFixtures.ts +2 -0
- package/src/modules/workspace/components/EditorTabs.tsx +82 -50
- package/src/modules/workspace/components/FileExplorer.tsx +413 -189
- package/src/modules/workspace/components/FilePaneCard.tsx +53 -0
- package/src/modules/workspace/components/FileRoute.tsx +89 -84
- package/src/modules/workspace/components/FileViewer.tsx +700 -294
- package/src/modules/workspace/components/KbDocumentShell.tsx +138 -0
- package/src/modules/workspace/components/KbFileRail.tsx +128 -0
- package/src/modules/workspace/components/KbPageHeader.tsx +390 -0
- package/src/modules/workspace/components/__tests__/EditorTabs.test.tsx +87 -3
- package/src/modules/workspace/components/__tests__/FileExplorer.test.tsx +293 -39
- package/src/modules/workspace/components/__tests__/FileRoute.test.tsx +1 -16
- package/src/modules/workspace/components/__tests__/FileViewer.test.tsx +462 -44
- package/src/modules/workspace/components/__tests__/KbDocumentShell.test.tsx +84 -0
- package/src/modules/workspace/components/__tests__/KbFileRail.test.tsx +83 -0
- package/src/modules/workspace/components/__tests__/KbPageHeader.test.tsx +192 -0
- package/src/modules/workspace/components/renderers/CopyAnchorButton.tsx +64 -0
- package/src/modules/workspace/components/renderers/CsvRenderer.tsx +8 -8
- package/src/modules/workspace/components/renderers/DocxRenderer.tsx +18 -9
- package/src/modules/workspace/components/renderers/HtmlRenderer.tsx +14 -14
- package/src/modules/workspace/components/renderers/ImageRenderer.tsx +2 -2
- package/src/modules/workspace/components/renderers/KbMarkdownView.tsx +31 -165
- package/src/modules/workspace/components/renderers/MarkdownRenderer.tsx +18 -5
- package/src/modules/workspace/components/renderers/MermaidDiagram.tsx +27 -10
- package/src/modules/workspace/components/renderers/PdfRenderer.tsx +2 -2
- package/src/modules/workspace/components/renderers/TextRenderer.tsx +11 -5
- package/src/modules/workspace/components/renderers/ToolForm.tsx +24 -24
- package/src/modules/workspace/components/renderers/ToolRenderer.tsx +27 -27
- package/src/modules/workspace/components/renderers/XlsxRenderer.tsx +11 -11
- package/src/modules/workspace/components/renderers/__tests__/DocxRenderer.test.tsx +66 -0
- package/src/modules/workspace/components/renderers/__tests__/KbMarkdownView.test.tsx +17 -1
- package/src/modules/workspace/components/renderers/__tests__/MarkdownRenderer.test.tsx +1 -1
- package/src/modules/workspace/components/renderers/__tests__/MermaidDiagram.test.tsx +58 -0
- package/src/modules/workspace/components/renderers/__tests__/lazyRenderer.test.tsx +68 -0
- package/src/modules/workspace/components/renderers/__tests__/rendererLayout.test.ts +64 -0
- package/src/modules/workspace/components/renderers/__tests__/sanitizeDocxHtml.test.ts +0 -0
- package/src/modules/workspace/components/renderers/chunk-boundary.tsx +71 -0
- package/src/modules/workspace/components/renderers/index.ts +78 -2
- package/src/modules/workspace/components/renderers/kbMarkdownPipeline.tsx +241 -0
- package/src/modules/workspace/components/renderers/lazyRenderer.tsx +59 -0
- package/src/modules/workspace/components/renderers/sanitizeDocxHtml.ts +91 -0
- package/src/modules/workspace/hooks/__tests__/useLinksOut.test.ts +59 -0
- package/src/modules/workspace/hooks/__tests__/useOpenChangeRequests.test.tsx +237 -0
- package/src/modules/workspace/hooks/__tests__/useWorkspaceState.test.tsx +185 -0
- package/src/modules/workspace/hooks/useAutoGrowTextarea.ts +30 -0
- package/src/modules/workspace/hooks/useLastCommit.ts +66 -0
- package/src/modules/workspace/hooks/useLinksOut.ts +56 -0
- package/src/modules/workspace/hooks/useOpenChangeRequests.ts +20 -0
- package/src/modules/workspace/hooks/useWorkspaceState.ts +123 -14
- package/src/modules/workspace/routing/__tests__/kb-routes.test.tsx +1 -1
- package/src/modules/workspace/services/workspace.api.ts +9 -2
- package/src/modules/workspace/state/open-change-requests.context.ts +35 -0
- package/src/modules/workspace/state/open-change-requests.tsx +185 -0
- package/src/modules/workspace/state/workspace.context.ts +9 -0
- package/src/modules/workspace/utils/__tests__/diff.test.ts +87 -0
- package/src/modules/workspace/utils/diff.ts +130 -53
- package/src/modules/workspace/utils/fileTree.ts +7 -4
- package/src/modules/workspace/workspace.css +28 -0
- package/src/shared/components/Badge.tsx +62 -0
- package/src/shared/components/Banner.tsx +58 -0
- package/src/shared/components/Button.tsx +90 -0
- package/src/shared/components/Dialog.tsx +6 -6
- package/src/shared/components/Field.tsx +45 -0
- package/src/shared/components/IconButton.tsx +74 -0
- package/src/shared/components/ListRow.tsx +96 -0
- package/src/shared/components/Menu.tsx +88 -0
- package/src/shared/components/PageShell.tsx +8 -5
- package/src/shared/components/Surface.tsx +86 -0
- package/src/shared/components/__tests__/primitives.test.tsx +333 -0
- package/src/shared/components/index.ts +48 -0
- package/src/shared/components/useDismissableMenu.ts +71 -0
- package/src/shared/theme/__tests__/accent-contrast.test.ts +84 -0
- package/src/shared/theme/index.css +12 -0
- package/src/shared/theme/measure.ts +64 -0
- package/src/shared/theme/shadows.css +34 -0
- package/src/shared/theme/tokens.css +193 -0
- package/src/test-setup.ts +9 -0
- package/src/modules/access/components/AccessRestrictedBanner.tsx +0 -31
- package/src/modules/access/components/NodeOwnersBanner.tsx +0 -30
- package/src/modules/git/__tests__/ProtectedBranchBanner.test.tsx +0 -82
- package/src/modules/git/components/ProtectedBranchBanner.tsx +0 -42
- package/src/modules/library/__tests__/DetailDialog.test.tsx +0 -200
- package/src/modules/library/__tests__/diff.test.ts +0 -62
- package/src/modules/library/__tests__/loadout.test.tsx +0 -72
- package/src/modules/library/components/CompareView.tsx +0 -357
- package/src/modules/library/components/DetailDialog.tsx +0 -566
- package/src/modules/library/components/GearIcon.tsx +0 -12
- package/src/modules/library/components/LoadoutSidebar.tsx +0 -156
- package/src/modules/library/components/StatusGem.tsx +0 -21
- package/src/modules/library/components/SuggestChange.tsx +0 -171
- package/src/modules/library/components/particles.ts +0 -50
- package/src/modules/library/state/loadout.tsx +0 -129
- package/src/modules/library/utils/diff.ts +0 -102
- package/src/modules/pr/__tests__/PrApprovalBadge.test.tsx +0 -93
- package/src/modules/pr/__tests__/PrCancelButton.test.tsx +0 -158
- package/src/modules/pr/__tests__/PrCancelConfirmDialog.test.tsx +0 -44
- package/src/modules/pr/__tests__/PrMergeButton.test.tsx +0 -360
- package/src/modules/pr/__tests__/bucketize-comments.test.ts +0 -85
- package/src/modules/pr/__tests__/parsePatch.test.ts +0 -104
- package/src/modules/pr/__tests__/usePrViewerState.test.ts +0 -72
- package/src/modules/pr/components/PrApprovalBadge.tsx +0 -80
- package/src/modules/pr/components/PrCancelButton.tsx +0 -99
- package/src/modules/pr/components/PrCancelConfirmDialog.tsx +0 -119
- package/src/modules/pr/components/PrCommentComposer.tsx +0 -92
- package/src/modules/pr/components/PrCommentThread.tsx +0 -168
- package/src/modules/pr/components/PrCommentsPanel.tsx +0 -143
- package/src/modules/pr/components/PrDiffPane.tsx +0 -425
- package/src/modules/pr/components/PrFileRow.tsx +0 -164
- package/src/modules/pr/components/PrFilesList.tsx +0 -53
- package/src/modules/pr/components/PrHeader.tsx +0 -45
- package/src/modules/pr/components/PrHeaderOverflowMenu.tsx +0 -58
- package/src/modules/pr/components/PrMergeButton.tsx +0 -268
- package/src/modules/pr/components/PrMergeConfirmDialog.tsx +0 -112
- package/src/modules/pr/components/PrRefreshFromTargetButton.tsx +0 -110
- package/src/modules/pr/components/PrViewer.tsx +0 -364
- package/src/modules/pr/hooks/usePrViewerState.ts +0 -150
- package/src/modules/pr/state/pr-viewer.context.ts +0 -34
- package/src/modules/pr/utils/bucketize-comments.ts +0 -55
- package/src/modules/pr/utils/parsePatch.ts +0 -57
- package/src/modules/toolbar/components/AdminMenu.tsx +0 -271
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which username a git host expects beside an access token.
|
|
3
|
+
*
|
|
4
|
+
* This is NOT a person's username, which is exactly why the setup screen no
|
|
5
|
+
* longer asks for it in plain sight: every host has one correct answer and it
|
|
6
|
+
* is a constant, so asking looked like a question about the operator's own
|
|
7
|
+
* account. It is derived from the repository URL and shown only under
|
|
8
|
+
* "Advanced", pre-filled, for the self-hosted cases where the host cannot be
|
|
9
|
+
* recognised from its domain.
|
|
10
|
+
*
|
|
11
|
+
* `null` means "not recognised" — the caller keeps the default rather than
|
|
12
|
+
* inventing something, and the advanced field is worth opening.
|
|
13
|
+
*/
|
|
14
|
+
export function tokenUsernameForHost(repoUrl: string): { username: string; host: string } | null {
|
|
15
|
+
let hostname: string;
|
|
16
|
+
try {
|
|
17
|
+
hostname = new URL(repoUrl).hostname.toLowerCase();
|
|
18
|
+
} catch {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
// Matched on the registrable domain so `gitlab.example.com` is NOT taken for
|
|
22
|
+
// GitLab: a self-hosted instance can sit on any domain, and guessing from a
|
|
23
|
+
// substring would confidently produce the wrong credential.
|
|
24
|
+
if (hostname === 'github.com' || hostname.endsWith('.github.com')) {
|
|
25
|
+
return { username: 'x-access-token', host: 'GitHub' };
|
|
26
|
+
}
|
|
27
|
+
if (hostname === 'gitlab.com') return { username: 'oauth2', host: 'GitLab' };
|
|
28
|
+
if (hostname === 'bitbucket.org') return { username: 'x-token-auth', host: 'Bitbucket' };
|
|
29
|
+
if (hostname === 'dev.azure.com' || hostname.endsWith('.visualstudio.com')) {
|
|
30
|
+
// Azure DevOps accepts any non-empty username beside a PAT.
|
|
31
|
+
return { username: 'azure', host: 'Azure DevOps' };
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { Check, ChevronDown } from 'lucide-react';
|
|
3
3
|
import { useLocation, useNavigate } from 'react-router-dom';
|
|
4
|
-
import { activeAppId, useAppRegistry, type AppDef } from '../../../core/registry';
|
|
4
|
+
import { activeAppId, useActiveAppId, useAppRegistry, type AppDef } from '../../../core/registry';
|
|
5
5
|
|
|
6
6
|
const MENU_ID = 'app-switcher-menu';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* The clickable brand in the toolbar's top-left: shows the product name
|
|
10
|
-
* opens the app switcher — the list of
|
|
11
|
-
* registry-contributed ones)
|
|
9
|
+
* The clickable brand in the toolbar's top-left: shows the product name, the
|
|
10
|
+
* app you are currently in, and opens the app switcher — the list of
|
|
11
|
+
* top-level surfaces (core apps + registry-contributed ones) you can move
|
|
12
|
+
* between.
|
|
13
|
+
*
|
|
14
|
+
* Switching between Knowledge and Skills & Tools changes everything below the
|
|
15
|
+
* toolbar, so the trigger names the destination it landed on ("Bevel /
|
|
16
|
+
* Knowledge"); a brand on its own left the switch invisible.
|
|
12
17
|
*
|
|
13
18
|
* Open/close mechanics mirror AdminMenu: click toggles, an outside mousedown
|
|
14
19
|
* or Escape closes, and closing hands focus back to the trigger.
|
|
@@ -27,7 +32,17 @@ export function AppSwitcher() {
|
|
|
27
32
|
() => [...registry.apps].sort((a, b) => (a.order ?? 100) - (b.order ?? 100)),
|
|
28
33
|
[registry],
|
|
29
34
|
);
|
|
30
|
-
|
|
35
|
+
// The shell's answer first: it folds in surfaces that CLAIM an app beyond
|
|
36
|
+
// the path-prefix rule (a skill page at its canonical /workspace URL claims
|
|
37
|
+
// Skills & Tools — see AppClaimContext). The local computation is the
|
|
38
|
+
// fallback for standalone renders, where the context is undefined and the
|
|
39
|
+
// prefix rule is all there is.
|
|
40
|
+
const shellActiveId = useActiveAppId();
|
|
41
|
+
const activeId = shellActiveId ?? activeAppId(apps, location.pathname);
|
|
42
|
+
// Named next to the brand so the toolbar answers "which app am I in?"
|
|
43
|
+
// without opening the menu. Undefined on the standalone settings pages,
|
|
44
|
+
// where no app is active and the trigger is the brand alone.
|
|
45
|
+
const activeApp = apps.find((a) => a.id === activeId);
|
|
31
46
|
|
|
32
47
|
const close = () => {
|
|
33
48
|
setOpen(false);
|
|
@@ -63,23 +78,31 @@ export function AppSwitcher() {
|
|
|
63
78
|
ref={buttonRef}
|
|
64
79
|
type="button"
|
|
65
80
|
onClick={() => setOpen((v) => !v)}
|
|
66
|
-
className="flex items-center gap-1 px-1.5 py-1 rounded hover:bg-
|
|
67
|
-
title=
|
|
81
|
+
className="flex min-w-0 items-center gap-1 px-1.5 py-1 rounded hover:bg-hover text-ink"
|
|
82
|
+
title={activeApp ? `Switch app. Currently ${activeApp.label}` : 'Switch app'}
|
|
68
83
|
aria-label="Switch app"
|
|
69
84
|
aria-haspopup="menu"
|
|
70
85
|
aria-expanded={open}
|
|
71
86
|
aria-controls={open ? MENU_ID : undefined}
|
|
72
87
|
>
|
|
73
|
-
<span className="text-sm font-semibold tracking-wide">Bevel</span>
|
|
74
|
-
|
|
88
|
+
<span className="shrink-0 text-sm font-semibold tracking-wide">Bevel</span>
|
|
89
|
+
{activeApp && (
|
|
90
|
+
<>
|
|
91
|
+
<span aria-hidden="true" className="shrink-0 text-sm text-ink-faint">
|
|
92
|
+
/
|
|
93
|
+
</span>
|
|
94
|
+
<span className="truncate text-sm text-ink-muted">{activeApp.label}</span>
|
|
95
|
+
</>
|
|
96
|
+
)}
|
|
97
|
+
<ChevronDown size={14} className="shrink-0 text-ink-muted" />
|
|
75
98
|
</button>
|
|
76
99
|
{open && (
|
|
77
100
|
<div
|
|
78
101
|
id={MENU_ID}
|
|
79
102
|
role="menu"
|
|
80
|
-
className="absolute left-0 top-full mt-1 w-64 rounded-md border border-
|
|
103
|
+
className="absolute left-0 top-full mt-1 w-64 rounded-md border border-line bg-white py-1 shadow-lg z-50"
|
|
81
104
|
>
|
|
82
|
-
<div className="px-3 pt-1 pb-1.5 text-[10px] font-semibold uppercase tracking-wider text-
|
|
105
|
+
<div className="px-3 pt-1 pb-1.5 text-[10px] font-semibold uppercase tracking-wider text-ink-faint">
|
|
83
106
|
Apps
|
|
84
107
|
</div>
|
|
85
108
|
{apps.map((app) => (
|
|
@@ -88,15 +111,15 @@ export function AppSwitcher() {
|
|
|
88
111
|
type="button"
|
|
89
112
|
role="menuitem"
|
|
90
113
|
onClick={() => select(app)}
|
|
91
|
-
className="flex w-full items-start gap-2 px-3 py-2 text-left hover:bg-
|
|
114
|
+
className="flex w-full items-start gap-2 px-3 py-2 text-left hover:bg-hover"
|
|
92
115
|
>
|
|
93
|
-
<span className="w-4 pt-0.5 shrink-0 text-
|
|
116
|
+
<span className="w-4 pt-0.5 shrink-0 text-ink">
|
|
94
117
|
{app.id === activeId && <Check size={14} aria-label="Current app" />}
|
|
95
118
|
</span>
|
|
96
119
|
<span className="min-w-0">
|
|
97
|
-
<span className="block text-sm text-
|
|
120
|
+
<span className="block text-sm text-ink">{app.label}</span>
|
|
98
121
|
{app.description && (
|
|
99
|
-
<span className="block text-xs text-
|
|
122
|
+
<span className="block text-xs text-ink-muted">{app.description}</span>
|
|
100
123
|
)}
|
|
101
124
|
</span>
|
|
102
125
|
</button>
|
|
@@ -167,7 +167,7 @@ export function ExternalAgentAccessPage() {
|
|
|
167
167
|
return (
|
|
168
168
|
<>
|
|
169
169
|
<PageShell title="External agent access" padded={false}>
|
|
170
|
-
<div className="flex border-b border-
|
|
170
|
+
<div className="flex border-b border-line px-4 shrink-0" role="tablist">
|
|
171
171
|
{(
|
|
172
172
|
[
|
|
173
173
|
['agent', 'Your agent'],
|
|
@@ -181,8 +181,8 @@ export function ExternalAgentAccessPage() {
|
|
|
181
181
|
onClick={() => setTab(id)}
|
|
182
182
|
className={`px-3 py-2 text-xs font-medium border-b-2 -mb-px ${
|
|
183
183
|
tab === id
|
|
184
|
-
? 'border-
|
|
185
|
-
: 'border-transparent text-
|
|
184
|
+
? 'border-accent text-ink'
|
|
185
|
+
: 'border-transparent text-ink-muted hover:text-ink'
|
|
186
186
|
}`}
|
|
187
187
|
>
|
|
188
188
|
{name}
|
|
@@ -192,8 +192,8 @@ export function ExternalAgentAccessPage() {
|
|
|
192
192
|
|
|
193
193
|
{tab === 'agent' && (
|
|
194
194
|
<div className="px-4 py-3 space-y-4">
|
|
195
|
-
<p className="text-xs text-
|
|
196
|
-
Connect your own agent
|
|
195
|
+
<p className="text-xs text-ink-muted leading-snug">
|
|
196
|
+
Connect your own agent: Claude Code, Claude Desktop, Cursor and similar. No key
|
|
197
197
|
needed: the first time the agent connects, your browser opens so you can sign in and
|
|
198
198
|
choose which tools to share with it. Everything it saves appears under your name.
|
|
199
199
|
</p>
|
|
@@ -201,7 +201,7 @@ export function ExternalAgentAccessPage() {
|
|
|
201
201
|
to="/connect"
|
|
202
202
|
target="_blank"
|
|
203
203
|
rel="noopener noreferrer"
|
|
204
|
-
className="flex items-center justify-center gap-1.5 rounded border border-
|
|
204
|
+
className="flex items-center justify-center gap-1.5 rounded border border-line px-2 py-1.5 text-xs text-ink hover:bg-hover"
|
|
205
205
|
>
|
|
206
206
|
<Wrench size={12} />
|
|
207
207
|
Configure your tools
|
|
@@ -213,16 +213,16 @@ export function ExternalAgentAccessPage() {
|
|
|
213
213
|
rows={2}
|
|
214
214
|
/>
|
|
215
215
|
<div>
|
|
216
|
-
<div className="text-xs font-medium text-
|
|
217
|
-
<p className="text-[11px] text-
|
|
216
|
+
<div className="text-xs font-medium text-ink mb-1">claude.ai / Claude Desktop</div>
|
|
217
|
+
<p className="text-[11px] text-ink-muted mb-1 leading-snug">
|
|
218
218
|
Settings → Connectors → Add custom connector, then paste this URL. When asked to
|
|
219
219
|
authorize, your browser opens this app to finish connecting.
|
|
220
220
|
</p>
|
|
221
221
|
<CopyBlock label={null} value={`${window.location.origin}/api/mcp`} rows={1} />
|
|
222
222
|
</div>
|
|
223
223
|
<div>
|
|
224
|
-
<div className="text-xs font-medium text-
|
|
225
|
-
<p className="text-[11px] text-
|
|
224
|
+
<div className="text-xs font-medium text-ink mb-1">Other agents (JSON config)</div>
|
|
225
|
+
<p className="text-[11px] text-ink-muted mb-1 leading-snug">
|
|
226
226
|
Works with Cursor, Windsurf, Cline, and most clients that load servers from a JSON
|
|
227
227
|
config and support signing in.
|
|
228
228
|
</p>
|
|
@@ -243,12 +243,12 @@ export function ExternalAgentAccessPage() {
|
|
|
243
243
|
rows={9}
|
|
244
244
|
/>
|
|
245
245
|
</div>
|
|
246
|
-
<p className="text-[11px] text-
|
|
246
|
+
<p className="text-[11px] text-ink-muted leading-snug">
|
|
247
247
|
Running an unattended pipeline or CI agent that can't open a browser? Use the{' '}
|
|
248
248
|
<button
|
|
249
249
|
type="button"
|
|
250
250
|
onClick={() => setTab('autonomous')}
|
|
251
|
-
className="underline text-
|
|
251
|
+
className="underline text-ink-muted hover:text-ink"
|
|
252
252
|
>
|
|
253
253
|
Autonomous agents
|
|
254
254
|
</button>{' '}
|
|
@@ -259,15 +259,15 @@ export function ExternalAgentAccessPage() {
|
|
|
259
259
|
|
|
260
260
|
{tab === 'autonomous' && (
|
|
261
261
|
<div className="px-4 py-3 space-y-4">
|
|
262
|
-
<p className="text-xs text-
|
|
262
|
+
<p className="text-xs text-ink-muted leading-snug">
|
|
263
263
|
For autonomous agents and pipelines (CI, scheduled jobs) that can't open a browser to
|
|
264
264
|
sign in. Create an external API key and give it to the agent. Each key carries your
|
|
265
|
-
identity, so any saves the agent makes appear under your name
|
|
265
|
+
identity, so any saves the agent makes appear under your name. And it only gets the
|
|
266
266
|
tools you've already connected on the Connect your tools page.
|
|
267
267
|
</p>
|
|
268
268
|
|
|
269
|
-
<div className="border border-
|
|
270
|
-
<label htmlFor={labelInputId} className="block text-xs font-medium text-
|
|
269
|
+
<div className="border border-line rounded p-3 space-y-2">
|
|
270
|
+
<label htmlFor={labelInputId} className="block text-xs font-medium text-ink">
|
|
271
271
|
Create an external API key
|
|
272
272
|
</label>
|
|
273
273
|
<div className="flex gap-2">
|
|
@@ -277,7 +277,7 @@ export function ExternalAgentAccessPage() {
|
|
|
277
277
|
onChange={(e) => setLabel(e.target.value)}
|
|
278
278
|
placeholder="e.g. Claude Code on my laptop"
|
|
279
279
|
maxLength={MAX_LABEL_LEN}
|
|
280
|
-
className="flex-1 bg-white border border-
|
|
280
|
+
className="flex-1 bg-white border border-line rounded px-2 py-1.5 text-sm focus:outline-none focus:border-accent"
|
|
281
281
|
onKeyDown={(e) => {
|
|
282
282
|
if (e.key === 'Enter' && canSubmit) handleCreate();
|
|
283
283
|
}}
|
|
@@ -285,7 +285,7 @@ export function ExternalAgentAccessPage() {
|
|
|
285
285
|
<button
|
|
286
286
|
onClick={handleCreate}
|
|
287
287
|
disabled={!canSubmit}
|
|
288
|
-
className="px-3 py-1.5 text-sm rounded bg-
|
|
288
|
+
className="px-3 py-1.5 text-sm rounded bg-accent hover:bg-accent-hover text-white disabled:opacity-50 disabled:hover:bg-accent"
|
|
289
289
|
>
|
|
290
290
|
{creating ? 'Creating…' : 'Create key'}
|
|
291
291
|
</button>
|
|
@@ -298,18 +298,18 @@ export function ExternalAgentAccessPage() {
|
|
|
298
298
|
</div>
|
|
299
299
|
|
|
300
300
|
<div className="space-y-2">
|
|
301
|
-
<div className="text-xs font-medium text-
|
|
301
|
+
<div className="text-xs font-medium text-ink">Your external API keys</div>
|
|
302
302
|
{loadError && (
|
|
303
303
|
<div className="text-xs text-red-600 bg-red-50 border border-red-200 rounded px-2 py-1.5">
|
|
304
304
|
{loadError}
|
|
305
305
|
</div>
|
|
306
306
|
)}
|
|
307
307
|
{loading ? (
|
|
308
|
-
<div className="text-xs text-
|
|
308
|
+
<div className="text-xs text-ink-muted">Loading…</div>
|
|
309
309
|
) : keys.length === 0 ? (
|
|
310
|
-
<div className="text-xs text-
|
|
310
|
+
<div className="text-xs text-ink-muted">No external API keys yet.</div>
|
|
311
311
|
) : (
|
|
312
|
-
<ul className="divide-y divide-
|
|
312
|
+
<ul className="divide-y divide-line border border-line rounded">
|
|
313
313
|
{sortedKeys.map((k) => {
|
|
314
314
|
const revoked = k.revokedAt !== null;
|
|
315
315
|
const usage = !revoked ? k.llmUsage : undefined;
|
|
@@ -326,7 +326,7 @@ export function ExternalAgentAccessPage() {
|
|
|
326
326
|
>
|
|
327
327
|
<div className="flex-1 min-w-0">
|
|
328
328
|
<div className="font-medium truncate">{k.label}</div>
|
|
329
|
-
<div className="text-[11px] text-
|
|
329
|
+
<div className="text-[11px] text-ink-muted">
|
|
330
330
|
Created {formatRelative(k.createdAt)} · Last used {formatRelative(k.lastUsedAt)}
|
|
331
331
|
{revoked && ' · Disconnected'}
|
|
332
332
|
</div>
|
|
@@ -334,7 +334,7 @@ export function ExternalAgentAccessPage() {
|
|
|
334
334
|
<div className="mt-1 max-w-xs">
|
|
335
335
|
<div
|
|
336
336
|
className={`flex items-center justify-between text-[11px] ${
|
|
337
|
-
overCap ? 'text-red-600' : 'text-
|
|
337
|
+
overCap ? 'text-red-600' : 'text-ink-muted'
|
|
338
338
|
}`}
|
|
339
339
|
>
|
|
340
340
|
<span>Model usage today</span>
|
|
@@ -342,9 +342,9 @@ export function ExternalAgentAccessPage() {
|
|
|
342
342
|
{used.toLocaleString()} / {cap.toLocaleString()} tokens
|
|
343
343
|
</span>
|
|
344
344
|
</div>
|
|
345
|
-
<div className="mt-0.5 h-1 rounded bg-
|
|
345
|
+
<div className="mt-0.5 h-1 rounded bg-sunken overflow-hidden">
|
|
346
346
|
<div
|
|
347
|
-
className={`h-full ${overCap ? 'bg-red-500' : 'bg-
|
|
347
|
+
className={`h-full ${overCap ? 'bg-red-500' : 'bg-accent'}`}
|
|
348
348
|
style={{ width: `${pct}%` }}
|
|
349
349
|
/>
|
|
350
350
|
</div>
|
|
@@ -354,7 +354,7 @@ export function ExternalAgentAccessPage() {
|
|
|
354
354
|
{revoked ? (
|
|
355
355
|
<button
|
|
356
356
|
onClick={() => setPendingDelete({ id: k.id, label: k.label })}
|
|
357
|
-
className="text-xs px-2 py-1 rounded text-red-600 hover:bg-red-50 border border-
|
|
357
|
+
className="text-xs px-2 py-1 rounded text-red-600 hover:bg-red-50 border border-line"
|
|
358
358
|
title="Permanently delete this disconnected key and its usage history."
|
|
359
359
|
>
|
|
360
360
|
Delete
|
|
@@ -362,7 +362,7 @@ export function ExternalAgentAccessPage() {
|
|
|
362
362
|
) : (
|
|
363
363
|
<button
|
|
364
364
|
onClick={() => handleDisconnect(k.id)}
|
|
365
|
-
className="text-xs px-2 py-1 rounded text-
|
|
365
|
+
className="text-xs px-2 py-1 rounded text-ink hover:bg-hover border border-line"
|
|
366
366
|
title="Disconnect this external API key. The external agent using it will lose access."
|
|
367
367
|
>
|
|
368
368
|
Disconnect
|
|
@@ -389,7 +389,7 @@ export function ExternalAgentAccessPage() {
|
|
|
389
389
|
<button
|
|
390
390
|
onClick={() => setPendingDelete(null)}
|
|
391
391
|
disabled={deleting}
|
|
392
|
-
className="px-3 py-1.5 text-sm rounded text-
|
|
392
|
+
className="px-3 py-1.5 text-sm rounded text-ink hover:bg-hover border border-line disabled:opacity-50"
|
|
393
393
|
>
|
|
394
394
|
Cancel
|
|
395
395
|
</button>
|
|
@@ -403,7 +403,7 @@ export function ExternalAgentAccessPage() {
|
|
|
403
403
|
</>
|
|
404
404
|
}
|
|
405
405
|
>
|
|
406
|
-
<p className="text-xs text-
|
|
406
|
+
<p className="text-xs text-ink leading-snug">
|
|
407
407
|
Permanently delete{' '}
|
|
408
408
|
<span className="font-medium">“{pendingDelete?.label}”</span>? This removes it
|
|
409
409
|
and its usage history for good.
|
|
@@ -412,19 +412,19 @@ export function ExternalAgentAccessPage() {
|
|
|
412
412
|
|
|
413
413
|
{reveal && (
|
|
414
414
|
<div
|
|
415
|
-
className="fixed inset-0 z-[60] bg-
|
|
415
|
+
className="fixed inset-0 z-[60] bg-scrim flex items-center justify-center p-4"
|
|
416
416
|
onClick={(e) => e.stopPropagation()}
|
|
417
417
|
>
|
|
418
418
|
<div
|
|
419
419
|
role="alertdialog"
|
|
420
420
|
aria-modal="true"
|
|
421
|
-
className="bg-white border border-
|
|
421
|
+
className="bg-white border border-line rounded-lg shadow-xl w-full max-w-xl max-h-[90vh] overflow-y-auto"
|
|
422
422
|
>
|
|
423
|
-
<div className="px-4 py-3 border-b border-
|
|
423
|
+
<div className="px-4 py-3 border-b border-line">
|
|
424
424
|
<h3 className="text-sm font-semibold">Save this external API key now</h3>
|
|
425
425
|
</div>
|
|
426
426
|
<div className="px-4 py-3 space-y-3">
|
|
427
|
-
<p className="text-xs text-
|
|
427
|
+
<p className="text-xs text-ink leading-snug">
|
|
428
428
|
This is the only time you'll see the full key. If you lose it, disconnect it and create a new one.
|
|
429
429
|
</p>
|
|
430
430
|
<div className="relative">
|
|
@@ -432,12 +432,12 @@ export function ExternalAgentAccessPage() {
|
|
|
432
432
|
readOnly
|
|
433
433
|
value={reveal.plaintext}
|
|
434
434
|
rows={2}
|
|
435
|
-
className="w-full font-mono text-xs bg-
|
|
435
|
+
className="w-full font-mono text-xs bg-sunken border border-line rounded px-2 py-1.5 pr-10 resize-none"
|
|
436
436
|
onFocus={(e) => e.currentTarget.select()}
|
|
437
437
|
/>
|
|
438
438
|
<button
|
|
439
439
|
onClick={() => copy(reveal.plaintext)}
|
|
440
|
-
className="absolute top-1.5 right-1.5 p-1 rounded hover:bg-
|
|
440
|
+
className="absolute top-1.5 right-1.5 p-1 rounded hover:bg-hover text-ink-muted"
|
|
441
441
|
aria-label="Copy external API key"
|
|
442
442
|
title="Copy to clipboard"
|
|
443
443
|
>
|
|
@@ -445,22 +445,22 @@ export function ExternalAgentAccessPage() {
|
|
|
445
445
|
</button>
|
|
446
446
|
</div>
|
|
447
447
|
<div>
|
|
448
|
-
<div className="text-xs font-medium text-
|
|
448
|
+
<div className="text-xs font-medium text-ink mb-1">
|
|
449
449
|
Connect Claude Code
|
|
450
450
|
</div>
|
|
451
451
|
<textarea
|
|
452
452
|
readOnly
|
|
453
453
|
value={`claude mcp add --transport http knowledge-base ${window.location.origin}/api/mcp --header "Authorization: Bearer ${reveal.plaintext}"`}
|
|
454
454
|
rows={3}
|
|
455
|
-
className="w-full font-mono text-[11px] bg-
|
|
455
|
+
className="w-full font-mono text-[11px] bg-sunken border border-line rounded px-2 py-1.5 resize-none"
|
|
456
456
|
onFocus={(e) => e.currentTarget.select()}
|
|
457
457
|
/>
|
|
458
458
|
</div>
|
|
459
459
|
<div>
|
|
460
|
-
<div className="text-xs font-medium text-
|
|
460
|
+
<div className="text-xs font-medium text-ink mb-1">
|
|
461
461
|
Connect Langdock
|
|
462
462
|
</div>
|
|
463
|
-
<ol className="text-[11px] text-
|
|
463
|
+
<ol className="text-[11px] text-ink-muted mb-1 leading-snug list-decimal pl-4 space-y-0.5">
|
|
464
464
|
<li>In Langdock, open your workspace settings and go to MCP servers → Add server.</li>
|
|
465
465
|
<li>Choose <span className="font-medium">HTTP</span> (Streamable HTTP) as the transport.</li>
|
|
466
466
|
<li>Give it a name (e.g. <span className="font-medium">Bevel</span>), paste the URL below into the server URL field, and add the Authorization header under custom headers.</li>
|
|
@@ -470,15 +470,15 @@ export function ExternalAgentAccessPage() {
|
|
|
470
470
|
readOnly
|
|
471
471
|
value={`URL: ${window.location.origin}/api/mcp\nHeader name: Authorization\nHeader value: Bearer ${reveal.plaintext}`}
|
|
472
472
|
rows={3}
|
|
473
|
-
className="w-full font-mono text-[11px] bg-
|
|
473
|
+
className="w-full font-mono text-[11px] bg-sunken border border-line rounded px-2 py-1.5 resize-none"
|
|
474
474
|
onFocus={(e) => e.currentTarget.select()}
|
|
475
475
|
/>
|
|
476
476
|
</div>
|
|
477
477
|
<div>
|
|
478
|
-
<div className="text-xs font-medium text-
|
|
478
|
+
<div className="text-xs font-medium text-ink mb-1">
|
|
479
479
|
Other agents (JSON config)
|
|
480
480
|
</div>
|
|
481
|
-
<p className="text-[11px] text-
|
|
481
|
+
<p className="text-[11px] text-ink-muted mb-1 leading-snug">
|
|
482
482
|
Works with Claude Desktop, Cursor, Windsurf, Cline, and most clients that load servers from a JSON config.
|
|
483
483
|
</p>
|
|
484
484
|
<textarea
|
|
@@ -499,17 +499,17 @@ export function ExternalAgentAccessPage() {
|
|
|
499
499
|
2,
|
|
500
500
|
)}
|
|
501
501
|
rows={11}
|
|
502
|
-
className="w-full font-mono text-[11px] bg-
|
|
502
|
+
className="w-full font-mono text-[11px] bg-sunken border border-line rounded px-2 py-1.5 resize-none"
|
|
503
503
|
onFocus={(e) => e.currentTarget.select()}
|
|
504
504
|
/>
|
|
505
505
|
</div>
|
|
506
506
|
</div>
|
|
507
|
-
<div className="flex justify-end px-4 py-3 border-t border-
|
|
507
|
+
<div className="flex justify-end px-4 py-3 border-t border-line">
|
|
508
508
|
<button
|
|
509
509
|
onClick={() => setReveal(null)}
|
|
510
|
-
className="px-3 py-1.5 text-sm rounded bg-
|
|
510
|
+
className="px-3 py-1.5 text-sm rounded bg-accent hover:bg-accent-hover text-white"
|
|
511
511
|
>
|
|
512
|
-
Done
|
|
512
|
+
Done: I've saved it
|
|
513
513
|
</button>
|
|
514
514
|
</div>
|
|
515
515
|
</div>
|
|
@@ -526,10 +526,10 @@ function CopyBlock({ label, value, rows }: { label: string | null; value: string
|
|
|
526
526
|
return (
|
|
527
527
|
<div>
|
|
528
528
|
<div className="flex items-center justify-between mb-1">
|
|
529
|
-
{label !== null && <div className="text-xs font-medium text-
|
|
529
|
+
{label !== null && <div className="text-xs font-medium text-ink">{label}</div>}
|
|
530
530
|
<button
|
|
531
531
|
onClick={() => copy(value)}
|
|
532
|
-
className="ml-auto p-1 rounded hover:bg-
|
|
532
|
+
className="ml-auto p-1 rounded hover:bg-hover text-ink-muted"
|
|
533
533
|
aria-label={label ? `Copy: ${label}` : 'Copy to clipboard'}
|
|
534
534
|
title="Copy to clipboard"
|
|
535
535
|
>
|
|
@@ -540,7 +540,7 @@ function CopyBlock({ label, value, rows }: { label: string | null; value: string
|
|
|
540
540
|
readOnly
|
|
541
541
|
value={value}
|
|
542
542
|
rows={rows}
|
|
543
|
-
className="w-full font-mono text-[11px] bg-
|
|
543
|
+
className="w-full font-mono text-[11px] bg-sunken border border-line rounded px-2 py-1.5 resize-none"
|
|
544
544
|
onFocus={(e) => e.currentTarget.select()}
|
|
545
545
|
/>
|
|
546
546
|
</div>
|