@kabmo-labs/kabmo 0.11.1 → 0.12.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/README.md +67 -421
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +426 -413
- package/dist/client/static/js/{index-amss8pge.js → index-0smc9gm2.js} +1123 -747
- package/dist/client/static/js/index-shexbk5f.css +1 -0
- package/marketplace/marketplace.json +13 -3
- package/marketplace/plugins/command-runner/package.json +4 -2
- package/marketplace/plugins/git-forge/README.md +219 -0
- package/marketplace/plugins/git-forge/icon.svg +20 -0
- package/marketplace/plugins/git-forge/package.json +56 -0
- package/marketplace/plugins/git-forge/src/app.tsx +82 -0
- package/marketplace/plugins/git-forge/src/command.test.ts +181 -0
- package/marketplace/plugins/git-forge/src/command.ts +119 -0
- package/marketplace/plugins/git-forge/src/header.tsx +87 -0
- package/marketplace/plugins/git-forge/src/panel/Badge.tsx +76 -0
- package/marketplace/plugins/git-forge/src/panel/Change.tsx +150 -0
- package/marketplace/plugins/git-forge/src/panel/CiBadge.tsx +51 -0
- package/marketplace/plugins/git-forge/src/panel/Credential.tsx +107 -0
- package/marketplace/plugins/git-forge/src/panel/Glyph.tsx +70 -0
- package/marketplace/plugins/git-forge/src/panel/Header.tsx +255 -0
- package/marketplace/plugins/git-forge/src/panel/ItemView.tsx +198 -0
- package/marketplace/plugins/git-forge/src/panel/List.tsx +89 -0
- package/marketplace/plugins/git-forge/src/panel/Row.tsx +68 -0
- package/marketplace/plugins/git-forge/src/panel/Sidebar.tsx +94 -0
- package/marketplace/plugins/git-forge/src/panel/Write.tsx +236 -0
- package/marketplace/plugins/git-forge/src/panel/format.ts +78 -0
- package/marketplace/plugins/git-forge/src/panel/index.test.tsx +344 -0
- package/marketplace/plugins/git-forge/src/panel/index.tsx +193 -0
- package/marketplace/plugins/git-forge/src/panel/use-forge.ts +250 -0
- package/marketplace/plugins/git-forge/src/panel/write.test.tsx +269 -0
- package/marketplace/plugins/git-forge/src/protocol.ts +308 -0
- package/marketplace/plugins/git-forge/src/server/adapters.test.ts +274 -0
- package/marketplace/plugins/git-forge/src/server/bitbucket.ts +307 -0
- package/marketplace/plugins/git-forge/src/server/capabilities.test.ts +116 -0
- package/marketplace/plugins/git-forge/src/server/capabilities.ts +105 -0
- package/marketplace/plugins/git-forge/src/server/ci.test.ts +88 -0
- package/marketplace/plugins/git-forge/src/server/ci.ts +118 -0
- package/marketplace/plugins/git-forge/src/server/context.ts +76 -0
- package/marketplace/plugins/git-forge/src/server/diff.test.ts +127 -0
- package/marketplace/plugins/git-forge/src/server/diff.ts +120 -0
- package/marketplace/plugins/git-forge/src/server/filters.test.ts +138 -0
- package/marketplace/plugins/git-forge/src/server/filters.ts +138 -0
- package/marketplace/plugins/git-forge/src/server/forges.test.ts +235 -0
- package/marketplace/plugins/git-forge/src/server/gitea.ts +296 -0
- package/marketplace/plugins/git-forge/src/server/github-extras.ts +92 -0
- package/marketplace/plugins/git-forge/src/server/github.ts +320 -0
- package/marketplace/plugins/git-forge/src/server/gitlab-detail.ts +207 -0
- package/marketplace/plugins/git-forge/src/server/gitlab.test.ts +195 -0
- package/marketplace/plugins/git-forge/src/server/gitlab.ts +176 -0
- package/marketplace/plugins/git-forge/src/server/http.test.ts +270 -0
- package/marketplace/plugins/git-forge/src/server/http.ts +329 -0
- package/marketplace/plugins/git-forge/src/server/map.ts +120 -0
- package/marketplace/plugins/git-forge/src/server/registry.ts +47 -0
- package/marketplace/plugins/git-forge/src/server/remote.test.ts +146 -0
- package/marketplace/plugins/git-forge/src/server/remote.ts +188 -0
- package/marketplace/plugins/git-forge/src/server/scope-probe.test.ts +98 -0
- package/marketplace/plugins/git-forge/src/server/scope-probe.ts +128 -0
- package/marketplace/plugins/git-forge/src/server/scope.ts +66 -0
- package/marketplace/plugins/git-forge/src/server/test-context.ts +67 -0
- package/marketplace/plugins/git-forge/src/server/test-host.ts +51 -0
- package/marketplace/plugins/git-forge/src/server/token.test.ts +107 -0
- package/marketplace/plugins/git-forge/src/server/token.ts +139 -0
- package/marketplace/plugins/git-forge/src/server/write-http.test.ts +127 -0
- package/marketplace/plugins/git-forge/src/server/write-http.ts +110 -0
- package/marketplace/plugins/git-forge/src/server/writes.test.ts +218 -0
- package/marketplace/plugins/git-forge/src/server/writes.ts +313 -0
- package/marketplace/plugins/git-forge/src/server.ts +284 -0
- package/marketplace/plugins/git-forge/tsconfig.json +16 -0
- package/marketplace/plugins/session-info/package.json +4 -2
- package/marketplace/plugins/stats/package.json +4 -2
- package/package.json +6 -1
- package/src/client/components/common/code-surface/blame-hover.ts +188 -0
- package/src/client/components/common/code-surface/blame-panel.test.ts +304 -0
- package/src/client/components/common/code-surface/blame-panel.ts +306 -0
- package/src/client/components/common/code-surface/blame.test.ts +303 -0
- package/src/client/components/common/code-surface/blame.ts +227 -0
- package/src/client/components/common/code-surface/conflict-markers.test.ts +135 -0
- package/src/client/components/common/code-surface/conflict-markers.ts +144 -0
- package/src/client/components/common/code-surface/documents.ts +48 -1
- package/src/client/components/common/code-surface/extensions.test.ts +4 -0
- package/src/client/components/common/code-surface/extensions.ts +44 -0
- package/src/client/components/common/code-surface/fold-stack.test.ts +4 -0
- package/src/client/components/common/code-surface/indent.test.ts +5 -0
- package/src/client/components/common/code-surface/index.tsx +16 -2
- package/src/client/components/common/code-surface/lint-parsers.test.ts +109 -0
- package/src/client/components/common/code-surface/lint-parsers.ts +134 -0
- package/src/client/components/common/code-surface/lint.test.ts +101 -0
- package/src/client/components/common/code-surface/lint.ts +85 -0
- package/src/client/components/common/code-surface/props.ts +17 -0
- package/src/client/components/common/code-surface/surface-failures.test.ts +132 -0
- package/src/client/components/common/code-surface/theme.ts +71 -0
- package/src/client/components/common/header-controls/index.test.tsx +1 -1
- package/src/client/components/common/header-controls/plugin-entry.test.tsx +1 -1
- package/src/client/components/common/header-controls/shell-chrome.test.tsx +1 -1
- package/src/client/components/common/provider-icon/Plate.tsx +88 -0
- package/src/client/components/common/provider-icon/index.tsx +55 -11
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +5 -2
- package/src/client/components/mobile/SessionSidebar.tsx +2 -10
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +6 -0
- package/src/client/components/mobile/mobile-right-sidebar/StatusBar.tsx +8 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +3 -0
- package/src/client/components/settings/categories/ProviderSettings.tsx +43 -41
- package/src/client/components/settings/categories/appearance-settings/EditorBlameSection.tsx +97 -0
- package/src/client/components/settings/categories/panel-plugins/AvailableList.tsx +106 -54
- package/src/client/components/settings/categories/panel-plugins/GitFreshness.tsx +14 -1
- package/src/client/components/settings/categories/panel-plugins/InstalledList.tsx +39 -150
- package/src/client/components/settings/categories/panel-plugins/Meta.test.tsx +143 -0
- package/src/client/components/settings/categories/panel-plugins/Meta.tsx +157 -0
- package/src/client/components/settings/categories/panel-plugins/Placement.test.tsx +149 -0
- package/src/client/components/settings/categories/panel-plugins/Placement.tsx +99 -0
- package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +270 -0
- package/src/client/components/settings/categories/panel-plugins/Section.tsx +11 -3
- package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +25 -0
- package/src/client/components/settings/categories/provider-settings/AuthSection.tsx +135 -80
- package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +51 -21
- package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +175 -0
- package/src/client/components/settings/categories/provider-settings/EntryModal.tsx +275 -0
- package/src/client/components/settings/categories/provider-settings/Header.tsx +40 -9
- package/src/client/components/settings/categories/provider-settings/LoginModal.tsx +142 -160
- package/src/client/components/settings/categories/provider-settings/LogoutProviderModal.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/ModelCapabilitiesModal.tsx +84 -46
- package/src/client/components/settings/categories/provider-settings/ModelsList.tsx +217 -102
- package/src/client/components/settings/categories/provider-settings/PresetPicker.tsx +5 -2
- package/src/client/components/settings/categories/provider-settings/SidebarList.plugin.test.ts +3 -3
- package/src/client/components/settings/categories/provider-settings/SidebarList.tsx +158 -102
- package/src/client/components/settings/categories/provider-settings/auth-section.test.tsx +135 -0
- package/src/client/components/settings/categories/provider-settings/groups.test.ts +98 -0
- package/src/client/components/settings/categories/provider-settings/groups.ts +108 -0
- package/src/client/components/settings/categories/provider-settings/layout.test.tsx +325 -0
- package/src/client/components/settings/categories/provider-settings/model-dialogs.test.tsx +135 -0
- package/src/client/components/settings/categories/provider-settings/preset-picker.test.tsx +73 -0
- package/src/client/components/settings/categories/usage-settings/ProviderCard.tsx +22 -2
- package/src/client/components/settings/categories/usage-settings/ProviderDetail.tsx +2 -0
- package/src/client/components/settings/categories/usage-settings/SidebarList.tsx +16 -6
- package/src/client/components/settings/categories/usage-settings/providers.ts +3 -0
- package/src/client/components/settings/categories/usage-settings/usage-and-picker.test.ts +19 -0
- package/src/client/components/settings/categories/usage-settings/usage-icons.test.tsx +143 -0
- package/src/client/components/workspace/chat-timeline/MinimapShortcuts.test.ts +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.test.ts +23 -19
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +23 -19
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +20 -18
- package/src/client/components/workspace/chat-timeline/chat-input/compact.test.tsx +19 -6
- package/src/client/components/workspace/chat-timeline/index.tsx +7 -16
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.missing.test.ts +100 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.test.ts +3 -47
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +8 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/wait-test-util.ts +62 -0
- package/src/client/components/workspace/diff-panel/HunkStepper.tsx +62 -0
- package/src/client/components/workspace/diff-panel/MergeDiffView.tsx +29 -0
- package/src/client/components/workspace/diff-panel/Toolbar.tsx +32 -1
- package/src/client/components/workspace/diff-panel/changes.ts +69 -0
- package/src/client/components/workspace/diff-panel/chunks.ts +85 -0
- package/src/client/components/workspace/diff-panel/index.tsx +21 -1
- package/src/client/components/workspace/diff-panel/merge.test.ts +145 -0
- package/src/client/components/workspace/diff-panel/merge.ts +63 -68
- package/src/client/components/workspace/editor/EditorDropOverlay.tsx +6 -1
- package/src/client/components/workspace/editor/FileDocument.tsx +51 -1
- package/src/client/components/workspace/editor/FilePane.tsx +25 -1
- package/src/client/components/workspace/editor/StatusBar.tsx +19 -0
- package/src/client/components/workspace/editor/Toolbar.tsx +29 -5
- package/src/client/components/workspace/editor/toolbar-clusters.test.ts +86 -0
- package/src/client/components/workspace/editor/toolbar-clusters.tsx +48 -16
- package/src/client/components/workspace/editor/viewers/bytes.ts +16 -0
- package/src/client/components/workspace/git-panel/index.test.ts +46 -1
- package/src/client/components/workspace/git-panel/index.tsx +11 -38
- package/src/client/components/workspace/model-dropdown/Item.plugin.test.ts +66 -0
- package/src/client/components/workspace/model-dropdown/Item.tsx +71 -62
- package/src/client/components/workspace/model-dropdown/Section.tsx +31 -14
- package/src/client/components/workspace/model-dropdown/collapsed.ts +72 -0
- package/src/client/components/workspace/model-dropdown/index.tsx +42 -19
- package/src/client/components/workspace/model-dropdown/refresh.test.tsx +260 -0
- package/src/client/components/workspace/model-dropdown/trigger.test.ts +34 -0
- package/src/client/components/workspace/model-dropdown/use-catalog.ts +13 -2
- package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +19 -3
- package/src/client/hooks/chat/omp/folder-auto-expand.ts +113 -0
- package/src/client/hooks/chat/omp/index.ts +20 -0
- package/src/client/hooks/chat/omp/pending-rows.ts +21 -0
- package/src/client/hooks/chat/omp/pending-sessions.test.ts +16 -1
- package/src/client/hooks/chat/omp/session-sidebar-controller.test.ts +102 -0
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +21 -1
- package/src/client/hooks/chat/omp/stream.ts +8 -1
- package/src/client/hooks/chat/timeline/index.ts +1 -1
- package/src/client/hooks/chat/timeline/new-chat-open.ts +60 -0
- package/src/client/hooks/editor/blame-settings.ts +67 -0
- package/src/client/hooks/editor/blame.test.ts +272 -0
- package/src/client/hooks/editor/blame.ts +232 -0
- package/src/client/hooks/editor/file-editor-types.ts +23 -0
- package/src/client/hooks/editor/save-file.test.ts +20 -0
- package/src/client/hooks/editor/use-editor-drop.test-util.ts +198 -0
- package/src/client/hooks/editor/use-editor-drop.test.ts +70 -175
- package/src/client/hooks/editor/use-editor-drop.ts +19 -36
- package/src/client/hooks/editor/use-file-editor.ts +7 -1
- package/src/client/hooks/settings/providers/actions.ts +90 -194
- package/src/client/hooks/settings/providers/api.ts +7 -1
- package/src/client/hooks/settings/providers/index.ts +171 -59
- package/src/client/hooks/settings/providers/login.test.ts +79 -0
- package/src/client/hooks/settings/providers/login.ts +276 -0
- package/src/client/hooks/settings/providers/messages.ts +28 -0
- package/src/client/hooks/settings/providers/model-actions.ts +178 -0
- package/src/client/hooks/ui/editor-error-toast.ts +47 -0
- package/src/client/hooks/ui/open-file.ts +7 -0
- package/src/client/hooks/ui/toasts.ts +7 -0
- package/src/client/hooks/workspace/file-tabs.ts +4 -1
- package/src/client/hooks/workspace/folder-expansion.test.ts +62 -0
- package/src/client/hooks/workspace/folder-expansion.ts +33 -0
- package/src/client/hooks/workspace/git-action-outcome.ts +86 -0
- package/src/client/hooks/workspace/git-actions.ts +29 -2
- package/src/client/hooks/workspace/plugin-contributions.test.ts +117 -0
- package/src/client/hooks/workspace/plugin-contributions.ts +146 -0
- package/src/client/lib/editor-errors.test.ts +85 -0
- package/src/client/lib/editor-errors.ts +71 -0
- package/src/client/lib/fs/resolve-open.test.ts +125 -0
- package/src/client/lib/fs/resolve-open.ts +90 -0
- package/src/client/lib/git/action-message.test.ts +82 -0
- package/src/client/lib/git/action-message.ts +160 -0
- package/src/client/lib/launch/device-files.test.ts +160 -0
- package/src/client/lib/launch/device-files.ts +197 -0
- package/src/client/lib/native/open-paths.test.ts +140 -0
- package/src/client/lib/native/open-paths.ts +157 -0
- package/src/client/lib/plugins/bootstrap.test.ts +1 -1
- package/src/client/main.tsx +20 -0
- package/src/server/db.server.test.ts +39 -0
- package/src/server/db.server.ts +21 -2
- package/src/server/lib/db/schema.ts +2 -0
- package/src/server/lib/fs/external-roots.test.ts +100 -0
- package/src/server/lib/fs/external-roots.ts +101 -0
- package/src/server/lib/fs/git-actions-branch.ts +15 -2
- package/src/server/lib/fs/git-actions-shared.ts +24 -0
- package/src/server/lib/fs/git-actions-sync.test.ts +18 -7
- package/src/server/lib/fs/git-actions-worktree.ts +5 -1
- package/src/server/lib/fs/git-blame.test.ts +206 -0
- package/src/server/lib/fs/git-blame.ts +189 -0
- package/src/server/lib/fs/root.ts +14 -0
- package/src/server/lib/http/same-origin.ts +28 -7
- package/src/server/lib/models/catalog.server.ts +230 -0
- package/src/server/lib/models/catalog.test.ts +83 -0
- package/src/server/lib/models/credential-origin.server.ts +108 -0
- package/src/server/lib/models/credential-origin.test.ts +132 -0
- package/src/server/lib/models/provider-icon-fetch.ts +115 -0
- package/src/server/lib/models/provider-icon-parse.test.ts +134 -0
- package/src/server/lib/models/provider-icon-parse.ts +139 -0
- package/src/server/lib/models/provider-icon-store.server.ts +118 -0
- package/src/server/lib/models/provider-icon-store.test.ts +107 -0
- package/src/server/lib/models/provider-icon.server.ts +209 -0
- package/src/server/lib/models/provider-items.server.ts +211 -37
- package/src/server/lib/models/provider-items.test.ts +201 -0
- package/src/server/lib/models/provider-registry.server.test.ts +27 -9
- package/src/server/lib/models/provider-registry.server.ts +160 -67
- package/src/server/lib/models/registry.server.test.ts +3 -3
- package/src/server/lib/models/registry.server.ts +8 -0
- package/src/server/lib/omp/config/definitions.test.ts +5 -4
- package/src/server/lib/omp/config/models-config.ts +42 -0
- package/src/server/lib/omp/config/provider-entry.test.ts +205 -0
- package/src/server/lib/omp/config/provider-entry.ts +197 -0
- package/src/server/lib/omp/config/provider-seeds.ts +10 -0
- package/src/server/lib/omp/core/models-json.ts +69 -0
- package/src/server/lib/omp/session/messages.ts +17 -3
- package/src/server/lib/omp/session/sidebar-data.canonical.test.ts +13 -3
- package/src/server/lib/panels/bundled-catalog.server.ts +7 -0
- package/src/server/lib/panels/catalog-offers.server.ts +68 -0
- package/src/server/lib/panels/git-update.server.test.ts +14 -0
- package/src/server/lib/panels/git-update.server.ts +63 -1
- package/src/server/lib/panels/manifest.test.ts +65 -0
- package/src/server/lib/panels/manifest.ts +55 -1
- package/src/server/lib/panels/offers.server.test.ts +191 -0
- package/src/server/lib/panels/offers.server.ts +108 -0
- package/src/server/lib/panels/registry.server.test.ts +35 -1
- package/src/server/lib/panels/registry.server.ts +51 -142
- package/src/server/lib/panels/scan.server.ts +162 -0
- package/src/server/lib/route-adapter.ts +13 -2
- package/src/server/lib/tray/tray.test.ts +2 -1
- package/src/server/lib/usage/providers.server.ts +4 -1
- package/src/server/routes/chat/session.ts +7 -1
- package/src/server/routes/fs/git-blame-loader.test.ts +146 -0
- package/src/server/routes/fs/git.ts +17 -0
- package/src/server/routes/fs/grant.test.ts +135 -0
- package/src/server/routes/fs/grant.ts +79 -0
- package/src/server/routes/fs/index.ts +2 -0
- package/src/server/routes/fs/scope.ts +34 -17
- package/src/server/routes/omp/login.ts +41 -14
- package/src/server/routes/omp/routes.test.ts +23 -10
- package/src/server/routes/settings/index.ts +8 -0
- package/src/server/routes/settings/provider-entry.ts +108 -0
- package/src/server/routes/settings/provider-icon.ts +99 -0
- package/src/server/routes/settings/provider-model.ts +4 -1
- package/src/server/routes/settings/provider-refresh.ts +87 -0
- package/src/server/routes/settings/providers.ts +31 -2
- package/src/shared/lib/chat/omp/fold.test.ts +34 -0
- package/src/shared/lib/chat/omp/tool-frames.test.ts +20 -0
- package/src/shared/lib/chat/omp/tool-frames.ts +5 -1
- package/src/shared/lib/chat/omp/tool-results.ts +29 -3
- package/src/shared/lib/chat/tool/wait-facts.ts +4 -0
- package/src/shared/lib/fs/git-blame.test.ts +266 -0
- package/src/shared/lib/fs/git-blame.ts +246 -0
- package/src/shared/lib/git/url.ts +18 -0
- package/src/shared/lib/markdown/sanitize.test.ts +57 -0
- package/src/shared/lib/markdown/sanitize.ts +30 -7
- package/src/shared/lib/models/provider/connection.ts +135 -0
- package/src/shared/lib/models/provider/dialect.test.ts +4 -2
- package/src/shared/lib/models/provider/dialect.ts +76 -6
- package/src/shared/lib/models/provider/models.ts +2 -0
- package/src/shared/lib/models/provider/origin.ts +94 -0
- package/src/shared/lib/models/provider/provider-ui.test.ts +7 -0
- package/src/shared/lib/models/server-cache.ts +8 -3
- package/src/shared/lib/omp/session/messages-map-pending.test.ts +110 -0
- package/src/shared/lib/omp/session/messages-map.ts +34 -2
- package/src/shared/lib/omp/session/prewarm-misc.test.ts +7 -90
- package/src/shared/lib/omp/session/prewarm.test.ts +133 -0
- package/src/shared/lib/omp/session/prewarm.ts +23 -1
- package/src/shared/lib/omp/session/wait.test.ts +28 -0
- package/src/shared/lib/omp/session/wait.ts +38 -3
- package/src/shared/lib/panels/slot-labels.test.ts +61 -0
- package/src/shared/lib/panels/slot-labels.ts +133 -0
- package/src/shared/lib/workspace/panel-ids.ts +11 -0
- package/src/shared/types/fs.ts +6 -0
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/models.ts +12 -0
- package/src/shared/types/panels-registry.ts +277 -0
- package/src/shared/types/panels.ts +46 -213
- package/src/shared/types/settings/provider.ts +58 -0
- package/src/shared/types/settings/usage.ts +10 -0
- package/src/test-support/pristine-globals.ts +7 -0
- package/dist/client/static/js/index-bq6qeayr.css +0 -1
- package/src/client/components/settings/categories/provider-settings/ReconnectModal.tsx +0 -184
|
@@ -104,8 +104,10 @@ export function PanelPluginsSection() {
|
|
|
104
104
|
<div className="space-y-4">
|
|
105
105
|
<div className="flex items-start justify-between gap-3">
|
|
106
106
|
<p className="text-xs text-ink/60 max-w-xl">
|
|
107
|
-
Panels bundled with Kabmo, plus the ones you install from a git URL
|
|
108
|
-
|
|
107
|
+
Panels bundled with Kabmo, plus the ones you install from a git URL — typed here or listed in
|
|
108
|
+
{' '}<span className="font-mono text-ink/70">marketplace.json</span>. A plugin is local code Kabmo loads
|
|
109
|
+
into this page and renders in its own tree, so it looks and behaves like the rest of the app — treat it
|
|
110
|
+
the way you would a VS Code extension.
|
|
109
111
|
</p>
|
|
110
112
|
</div>
|
|
111
113
|
|
|
@@ -156,7 +158,12 @@ export function PanelPluginsSection() {
|
|
|
156
158
|
</div>
|
|
157
159
|
) : null}
|
|
158
160
|
|
|
159
|
-
<AvailableList
|
|
161
|
+
<AvailableList
|
|
162
|
+
entries={available}
|
|
163
|
+
busy={actions.busy}
|
|
164
|
+
onInstall={actions.installBundled}
|
|
165
|
+
onInstallUrl={actions.install}
|
|
166
|
+
/>
|
|
160
167
|
|
|
161
168
|
{/* A blocked bundled update, above the list it explains: the plugin is in
|
|
162
169
|
the Installed grid below, and a notice underneath it would be read after
|
|
@@ -171,6 +178,7 @@ export function PanelPluginsSection() {
|
|
|
171
178
|
iconUrls={iconUrls}
|
|
172
179
|
readmeUrls={readmeUrls}
|
|
173
180
|
busy={actions.busy}
|
|
181
|
+
dock={dock}
|
|
174
182
|
onBuild={actions.build}
|
|
175
183
|
onRemove={actions.remove}
|
|
176
184
|
onSetEnabled={actions.setEnabled}
|
|
@@ -4,7 +4,10 @@ import { Check, Globe, Hash, Layers, Plus, Sparkles } from 'lucide-preact';
|
|
|
4
4
|
import type { ProviderItem } from '@/shared/types';
|
|
5
5
|
import { addProviderModel, type ManualModelRequest } from '@/shared/lib/models/provider/models';
|
|
6
6
|
import {
|
|
7
|
+
MODEL_KINDS,
|
|
8
|
+
MODEL_KIND_LABELS,
|
|
7
9
|
PROVIDER_THINKING_EFFORTS,
|
|
10
|
+
type ProviderModelKind,
|
|
8
11
|
type ProviderThinkingEffort,
|
|
9
12
|
} from '@/shared/lib/models/provider/dialect';
|
|
10
13
|
import { Modal } from '@/client/components/common/Modal';
|
|
@@ -50,6 +53,7 @@ export function AddModelModal({
|
|
|
50
53
|
const [costOutput, setCostOutput] = useState('');
|
|
51
54
|
const [costCacheRead, setCostCacheRead] = useState('');
|
|
52
55
|
const [costCacheWrite, setCostCacheWrite] = useState('');
|
|
56
|
+
const [kind, setKind] = useState<ProviderModelKind>('chat');
|
|
53
57
|
const [reasoning, setReasoning] = useState(false);
|
|
54
58
|
const [imageInput, setImageInput] = useState(false);
|
|
55
59
|
const [efforts, setEfforts] = useState<ProviderThinkingEffort[]>([]);
|
|
@@ -116,6 +120,7 @@ export function AddModelModal({
|
|
|
116
120
|
? { contextWindow: numberOrUndefined(contextWindow) }
|
|
117
121
|
: {}),
|
|
118
122
|
...(numberOrUndefined(maxTokens) !== undefined ? { maxTokens: numberOrUndefined(maxTokens) } : {}),
|
|
123
|
+
...(kind !== 'chat' ? { kind } : {}),
|
|
119
124
|
...(reasoning ? { reasoning: true } : {}),
|
|
120
125
|
...(reasoning && efforts.length > 0 ? { efforts } : {}),
|
|
121
126
|
...(imageInput ? { imageInput: true } : {}),
|
|
@@ -232,6 +237,26 @@ export function AddModelModal({
|
|
|
232
237
|
/>
|
|
233
238
|
</div>
|
|
234
239
|
|
|
240
|
+
{/* Kind: which role omp resolves this model for. A provider routinely
|
|
241
|
+
serves an embedding, image or rerank model beside its chat models, and
|
|
242
|
+
registering one as `chat` made it appear in the chat picker and behave
|
|
243
|
+
oddly there. */}
|
|
244
|
+
<div>
|
|
245
|
+
<label className="block text-xs font-semibold text-ink mb-1">Kind</label>
|
|
246
|
+
<select
|
|
247
|
+
value={kind}
|
|
248
|
+
onChange={(e) => setKind(e.currentTarget.value as ProviderModelKind)}
|
|
249
|
+
className="w-full text-xs py-2 px-3 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper focus:outline-none focus:border-ink text-ink transition-colors cursor-pointer"
|
|
250
|
+
>
|
|
251
|
+
{MODEL_KINDS.map((value) => (
|
|
252
|
+
<option key={value} value={value}>{MODEL_KIND_LABELS[value]}</option>
|
|
253
|
+
))}
|
|
254
|
+
</select>
|
|
255
|
+
<p className="text-[10px] text-ink/40 mt-1">
|
|
256
|
+
Chat is omp’s default. A non-chat kind keeps this model out of the chat picker.
|
|
257
|
+
</p>
|
|
258
|
+
</div>
|
|
259
|
+
|
|
235
260
|
{/* Limits */}
|
|
236
261
|
<div className="grid grid-cols-2 gap-3">
|
|
237
262
|
<div>
|
|
@@ -1,24 +1,40 @@
|
|
|
1
1
|
import { useState } from 'preact/hooks';
|
|
2
|
-
import { AlertCircle, Ban, Check, Info, Trash2 } from 'lucide-preact';
|
|
2
|
+
import { AlertCircle, Ban, Check, Info, KeyRound, LogIn, LogOut, Pencil, Trash2 } from 'lucide-preact';
|
|
3
3
|
import type { ProviderItem } from '@/shared/types';
|
|
4
|
+
import { credentialOriginLabel, canSignOut, connectOffers } from '@/shared/lib/models/provider/origin';
|
|
5
|
+
import { providerDeletable } from '@/client/components/settings/categories/provider-settings/groups';
|
|
4
6
|
|
|
5
7
|
interface ProviderAuthSectionProps {
|
|
6
8
|
provider: ProviderItem;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
9
|
+
/** Opens one of the connection dialogs the provider actually offers. */
|
|
10
|
+
onConnect: (kind: 'login' | 'edit') => void;
|
|
11
|
+
/** Writes/removes the provider in omp's config.yml `disabledProviders`. */
|
|
10
12
|
onToggleDisabled: () => void;
|
|
11
|
-
/** Opens the delete confirmation
|
|
13
|
+
/** Opens the delete confirmation. */
|
|
12
14
|
onDelete: () => void;
|
|
13
|
-
/** Opens the credential-removal
|
|
14
|
-
* `disconnect`, which only hide the provider and leave the secret stored. */
|
|
15
|
+
/** Opens the credential-removal dialog. */
|
|
15
16
|
onSignOut: () => void;
|
|
16
17
|
}
|
|
17
18
|
|
|
19
|
+
/**
|
|
20
|
+
* The provider's identity block: what it is signed in with, and the three
|
|
21
|
+
* operations that are actually different from each other.
|
|
22
|
+
*
|
|
23
|
+
* - **disable / enable** writes `config.yml disabledProviders` — the provider
|
|
24
|
+
* and every model it serves leave the chat picker, and the credential stays.
|
|
25
|
+
* - **sign out** removes a credential omp has stored. It is offered only where
|
|
26
|
+
* one exists: an environment-authenticated provider has nothing on disk, so
|
|
27
|
+
* the control used to be a button whose only outcome was a failure.
|
|
28
|
+
* - **connect** is one control, not two. The old panel had `connect` AND
|
|
29
|
+
* `reconnect`, both of which wrote the same SQLite overlay, and a separate
|
|
30
|
+
* `disconnect` that was literally the disable switch under a second name.
|
|
31
|
+
* The label follows the state and the action follows the provider's shape:
|
|
32
|
+
* an OAuth provider with no credential opens the sign-in flow, a
|
|
33
|
+
* `models.yml` entry opens its editor.
|
|
34
|
+
*/
|
|
18
35
|
export function ProviderAuthSection({
|
|
19
36
|
provider,
|
|
20
|
-
|
|
21
|
-
onToggleDisconnect,
|
|
37
|
+
onConnect,
|
|
22
38
|
onToggleDisabled,
|
|
23
39
|
onDelete,
|
|
24
40
|
onSignOut,
|
|
@@ -26,20 +42,15 @@ export function ProviderAuthSection({
|
|
|
26
42
|
const [showInfoTooltip, setShowInfoTooltip] = useState(false);
|
|
27
43
|
const isConnected = provider.status === 'connected';
|
|
28
44
|
const isDisabled = provider.disabled === true;
|
|
45
|
+
const origin = provider.credentialOrigin;
|
|
46
|
+
const signOutAvailable = canSignOut(origin);
|
|
47
|
+
const offers = connectOffers(provider);
|
|
29
48
|
|
|
30
49
|
return (
|
|
31
50
|
<div className="space-y-6">
|
|
32
|
-
{/* 1. Authentication Section */}
|
|
33
51
|
<div className="space-y-3">
|
|
34
|
-
<div className="text-xs font-semibold text-ink">
|
|
35
|
-
Authentication
|
|
36
|
-
</div>
|
|
52
|
+
<div className="text-xs font-semibold text-ink">Authentication</div>
|
|
37
53
|
|
|
38
|
-
{/* Wraps instead of overflowing: this row is a status group plus three
|
|
39
|
-
action buttons, which needs ~330px, while the detail pane is 206px
|
|
40
|
-
at a 768px window (the modal's own two-pane split). Without the wrap
|
|
41
|
-
the buttons ran past the panel and were clipped by the modal's
|
|
42
|
-
`overflow-hidden`. */}
|
|
43
54
|
<div className="flex flex-wrap items-center justify-between gap-x-4 gap-y-2">
|
|
44
55
|
<div className="flex items-center gap-2 min-w-0">
|
|
45
56
|
{isDisabled ? (
|
|
@@ -54,11 +65,15 @@ export function ProviderAuthSection({
|
|
|
54
65
|
</>
|
|
55
66
|
) : (
|
|
56
67
|
<>
|
|
57
|
-
<AlertCircle size={15} className="text-
|
|
58
|
-
<span className="text-xs font-medium text-
|
|
68
|
+
<AlertCircle size={15} className="text-amber-500 flex-shrink-0" strokeWidth={2.4} />
|
|
69
|
+
<span className="text-xs font-medium text-ink/80">Not signed in</span>
|
|
59
70
|
</>
|
|
60
71
|
)}
|
|
61
72
|
|
|
73
|
+
<span className="text-[11px] text-ink/55 font-mono px-1.5 py-0.5 rounded bg-ink/5 border border-ink/10">
|
|
74
|
+
{credentialOriginLabel(origin)}
|
|
75
|
+
</span>
|
|
76
|
+
|
|
62
77
|
<div
|
|
63
78
|
className="relative inline-block cursor-help ml-0.5"
|
|
64
79
|
onMouseEnter={() => setShowInfoTooltip(true)}
|
|
@@ -66,12 +81,12 @@ export function ProviderAuthSection({
|
|
|
66
81
|
>
|
|
67
82
|
<Info size={13} className="text-ink/40 hover:text-ink/70 transition-colors" />
|
|
68
83
|
{showInfoTooltip && (
|
|
69
|
-
<div className="absolute left-4 top-1/2 -translate-y-1/2 bg-ink text-canvas text-[10px] rounded px-2.5 py-1.5 shadow-xl
|
|
84
|
+
<div className="absolute left-4 top-1/2 -translate-y-1/2 bg-ink text-canvas text-[10px] rounded px-2.5 py-1.5 shadow-xl w-64 z-50 pointer-events-none leading-relaxed">
|
|
70
85
|
{isDisabled
|
|
71
|
-
? '
|
|
86
|
+
? 'Disabled in omp’s config.yml — none of its models appear in the chat model list. The credential is untouched.'
|
|
72
87
|
: isConnected
|
|
73
|
-
? '
|
|
74
|
-
: '
|
|
88
|
+
? 'omp can resolve a credential for this provider, so its models are offered in the chat picker.'
|
|
89
|
+
: 'omp knows this provider but has no credential for it. Connect to sign in or supply a key.'}
|
|
75
90
|
</div>
|
|
76
91
|
)}
|
|
77
92
|
</div>
|
|
@@ -81,85 +96,108 @@ export function ProviderAuthSection({
|
|
|
81
96
|
<button
|
|
82
97
|
type="button"
|
|
83
98
|
onClick={onToggleDisabled}
|
|
84
|
-
title={isDisabled
|
|
99
|
+
title={isDisabled
|
|
100
|
+
? 'Offer this provider in the model list again'
|
|
101
|
+
: 'Hide this provider and its models from the model list'}
|
|
85
102
|
className="px-3 py-1.5 rounded-md bg-ink/5 hover:bg-ink/10 text-ink text-xs font-medium transition-colors cursor-pointer border border-ink/10"
|
|
86
103
|
>
|
|
87
104
|
{isDisabled ? 'enable' : 'disable'}
|
|
88
105
|
</button>
|
|
89
106
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
{/* One button per thing the provider can DO. An Anthropic override
|
|
108
|
+
pointing at a proxy is both an OAuth login and a models.yml
|
|
109
|
+
entry, and a single button made whichever lost unreachable. */}
|
|
110
|
+
{offers.login && (
|
|
111
|
+
<button
|
|
112
|
+
type="button"
|
|
113
|
+
onClick={() => onConnect('login')}
|
|
114
|
+
title="Sign in to this provider through omp"
|
|
115
|
+
className="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md bg-ink text-canvas text-xs font-medium hover:opacity-90 transition-opacity cursor-pointer"
|
|
116
|
+
>
|
|
117
|
+
<LogIn size={12} />
|
|
118
|
+
<span>{isConnected && origin === 'login' ? 'sign in again' : 'sign in'}</span>
|
|
119
|
+
</button>
|
|
120
|
+
)}
|
|
121
|
+
{offers.edit && (
|
|
122
|
+
<button
|
|
123
|
+
type="button"
|
|
124
|
+
onClick={() => onConnect('edit')}
|
|
125
|
+
title="Edit this provider’s endpoint, credential and dialect in models.yml"
|
|
126
|
+
className={`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors cursor-pointer border ${
|
|
127
|
+
offers.login
|
|
128
|
+
? 'bg-ink/5 hover:bg-ink/10 text-ink border-ink/15'
|
|
129
|
+
: 'bg-ink text-canvas hover:opacity-90 border-ink'
|
|
130
|
+
}`}
|
|
131
|
+
>
|
|
132
|
+
<Pencil size={12} />
|
|
133
|
+
<span>edit</span>
|
|
134
|
+
</button>
|
|
135
|
+
)}
|
|
136
|
+
{!offers.login && !offers.edit && (
|
|
137
|
+
<button
|
|
138
|
+
type="button"
|
|
139
|
+
disabled
|
|
140
|
+
title={offers.reason}
|
|
141
|
+
className="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md bg-ink text-canvas text-xs font-medium opacity-40 cursor-not-allowed"
|
|
142
|
+
>
|
|
143
|
+
<KeyRound size={12} />
|
|
144
|
+
<span>connect</span>
|
|
145
|
+
</button>
|
|
146
|
+
)}
|
|
111
147
|
|
|
112
|
-
{/*
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
{provider.inModelsYml && (
|
|
148
|
+
{/* Only where a stored credential exists: `disable` writes
|
|
149
|
+
config.yml and leaves the token on disk, and an environment
|
|
150
|
+
credential has nothing to remove at all. */}
|
|
151
|
+
{signOutAvailable && (
|
|
117
152
|
<button
|
|
118
153
|
type="button"
|
|
119
|
-
onClick={
|
|
120
|
-
title="Remove this provider
|
|
121
|
-
className="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md bg-
|
|
154
|
+
onClick={onSignOut}
|
|
155
|
+
title="Remove the credential omp stored for this provider"
|
|
156
|
+
className="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md bg-ink/5 hover:bg-ink/10 text-ink text-xs font-medium transition-colors cursor-pointer border border-ink/10"
|
|
122
157
|
>
|
|
123
|
-
<
|
|
124
|
-
<span>
|
|
158
|
+
<LogOut size={12} />
|
|
159
|
+
<span>sign out</span>
|
|
125
160
|
</button>
|
|
126
161
|
)}
|
|
162
|
+
|
|
163
|
+
{/* Delete removes the models.yml entry and/or Kabmo's own row; a
|
|
164
|
+
login provider's credential is never touched by it. Disabled
|
|
165
|
+
where neither exists, with the reason on the button — a control
|
|
166
|
+
whose only outcome is a server refusal is worse than none. */}
|
|
167
|
+
<button
|
|
168
|
+
type="button"
|
|
169
|
+
onClick={onDelete}
|
|
170
|
+
disabled={!providerDeletable(provider)}
|
|
171
|
+
title={providerDeletable(provider)
|
|
172
|
+
? (provider.inModelsYml
|
|
173
|
+
? 'Remove this provider’s models.yml entry'
|
|
174
|
+
: 'Remove this provider’s Kabmo settings row')
|
|
175
|
+
: 'Nothing to delete: omp discovered this provider from its endpoint. Use disable to hide it.'}
|
|
176
|
+
className="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md bg-error/10 hover:bg-error/20 text-error text-xs font-medium transition-colors cursor-pointer border border-error/30 disabled:opacity-40 disabled:cursor-not-allowed"
|
|
177
|
+
>
|
|
178
|
+
<Trash2 size={12} />
|
|
179
|
+
<span>delete</span>
|
|
180
|
+
</button>
|
|
127
181
|
</div>
|
|
128
182
|
</div>
|
|
129
183
|
</div>
|
|
130
184
|
|
|
131
185
|
<div className="border-b border-ink/10" />
|
|
132
186
|
|
|
133
|
-
{/* 2. Connection Details Section */}
|
|
134
187
|
<div className="space-y-3">
|
|
135
|
-
<div className="text-xs font-semibold text-ink">
|
|
136
|
-
Connection Details
|
|
137
|
-
</div>
|
|
188
|
+
<div className="text-xs font-semibold text-ink">Connection details</div>
|
|
138
189
|
|
|
139
190
|
<div className="flex items-center justify-between gap-4">
|
|
140
|
-
<div className="text-xs text-ink/70">
|
|
141
|
-
Configured in:
|
|
191
|
+
<div className="text-xs text-ink/70 min-w-0">
|
|
192
|
+
Configured in:{' '}
|
|
193
|
+
<span className="font-mono text-ink font-medium break-all">{provider.configuredIn}</span>
|
|
142
194
|
</div>
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
type="button"
|
|
147
|
-
onClick={onToggleDisconnect}
|
|
148
|
-
className="text-xs text-error/90 hover:text-error font-medium hover:underline transition-colors cursor-pointer"
|
|
149
|
-
>
|
|
150
|
-
disconnect
|
|
151
|
-
</button>
|
|
152
|
-
) : (
|
|
153
|
-
<span className="text-xs text-ink/40 italic">
|
|
154
|
-
inactive
|
|
155
|
-
</span>
|
|
156
|
-
)}
|
|
195
|
+
<span className="text-[11px] text-ink/40 italic shrink-0">
|
|
196
|
+
{isDisabled ? 'hidden' : isConnected ? 'active' : 'inactive'}
|
|
197
|
+
</span>
|
|
157
198
|
</div>
|
|
158
199
|
|
|
159
|
-
{
|
|
160
|
-
endpoint is right but whose dialect is wrong fails on every request,
|
|
161
|
-
so it belongs next to the connection status rather than in a log. */}
|
|
162
|
-
{(provider.api || provider.auth || provider.discovery) && (
|
|
200
|
+
{(provider.api || provider.auth || provider.discovery || provider.transport) && (
|
|
163
201
|
<div className="flex flex-wrap items-center gap-1.5 pt-0.5">
|
|
164
202
|
{provider.api && (
|
|
165
203
|
<span
|
|
@@ -185,6 +223,23 @@ export function ProviderAuthSection({
|
|
|
185
223
|
discovery: {provider.discovery}
|
|
186
224
|
</span>
|
|
187
225
|
)}
|
|
226
|
+
{provider.transport && (
|
|
227
|
+
<span
|
|
228
|
+
className="px-1.5 py-0.5 rounded border border-ink/15 text-[10px] font-mono text-ink/70"
|
|
229
|
+
title="Requests are routed through the auth gateway"
|
|
230
|
+
>
|
|
231
|
+
transport: {provider.transport}
|
|
232
|
+
</span>
|
|
233
|
+
)}
|
|
234
|
+
{provider.headers && Object.keys(provider.headers).length > 0 && (
|
|
235
|
+
<span
|
|
236
|
+
className="px-1.5 py-0.5 rounded border border-ink/15 text-[10px] font-mono text-ink/70"
|
|
237
|
+
title={Object.entries(provider.headers).map(([key, value]) => `${key}: ${value}`).join('\n')}
|
|
238
|
+
>
|
|
239
|
+
{Object.keys(provider.headers).length} header
|
|
240
|
+
{Object.keys(provider.headers).length === 1 ? '' : 's'}
|
|
241
|
+
</span>
|
|
242
|
+
)}
|
|
188
243
|
</div>
|
|
189
244
|
)}
|
|
190
245
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from 'preact/hooks';
|
|
2
2
|
import { AlertTriangle, Loader2, Trash2 } from 'lucide-preact';
|
|
3
3
|
import type { ProviderItem } from '@/shared/types';
|
|
4
|
-
import {
|
|
4
|
+
import { ProviderIconPlate } from '@/client/components/common/provider-icon/Plate';
|
|
5
5
|
|
|
6
6
|
interface DeleteProviderModalProps {
|
|
7
7
|
isOpen: boolean;
|
|
@@ -13,17 +13,20 @@ interface DeleteProviderModalProps {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* Confirmation for deleting a provider
|
|
16
|
+
* Confirmation for deleting a provider.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* reversible from the UI: the endpoint and API key are only ever shown masked,
|
|
21
|
-
* so a deleted provider has to be reconfigured from scratch.
|
|
18
|
+
* What disappears depends on the provider's shape, and the dialog says which
|
|
19
|
+
* case it is instead of describing a `models.yml` entry for all of them:
|
|
22
20
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
21
|
+
* - a `models.yml` entry goes, with its model list and the endpoint/key stored
|
|
22
|
+
* on it (only ever shown masked, so it cannot be recovered);
|
|
23
|
+
* - a Kabmo-only row (a visibility/sampling overlay) goes, and omp keeps
|
|
24
|
+
* serving the provider — so the dialog says the provider itself survives;
|
|
25
|
+
* - a login provider's credential is never touched by either path.
|
|
26
|
+
*
|
|
27
|
+
* The list can now offer delete on EVERY row, so this distinction is what stops
|
|
28
|
+
* "delete" from reading as "sign out" on a provider whose credential it cannot
|
|
29
|
+
* remove.
|
|
27
30
|
*/
|
|
28
31
|
export function DeleteProviderModal({
|
|
29
32
|
isOpen,
|
|
@@ -47,6 +50,9 @@ export function DeleteProviderModal({
|
|
|
47
50
|
if (!isOpen || !provider) return null;
|
|
48
51
|
|
|
49
52
|
const modelCount = provider.models.length;
|
|
53
|
+
const removesFileEntry = provider.inModelsYml === true;
|
|
54
|
+
const removesOnlySettings = !removesFileEntry;
|
|
55
|
+
const environmentCredential = provider.credentialOrigin === 'environment';
|
|
50
56
|
|
|
51
57
|
return (
|
|
52
58
|
<div
|
|
@@ -72,22 +78,42 @@ export function DeleteProviderModal({
|
|
|
72
78
|
|
|
73
79
|
<div className="px-5 py-4 space-y-3">
|
|
74
80
|
<div className="flex items-center gap-2.5 px-3 py-2.5 rounded-lg bg-ink/5 border border-ink/10">
|
|
75
|
-
<
|
|
81
|
+
<ProviderIconPlate provider={provider} size={26} />
|
|
76
82
|
<span className="text-xs font-medium text-ink truncate">{provider.name}</span>
|
|
77
83
|
</div>
|
|
78
84
|
|
|
79
85
|
<ul className="text-[11.5px] leading-relaxed text-ink/70 space-y-1.5">
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
{removesFileEntry ? (
|
|
87
|
+
<>
|
|
88
|
+
<li>
|
|
89
|
+
Its entry is removed from{' '}
|
|
90
|
+
<span className="font-mono text-ink">~/.omp/agent/models.yml</span>
|
|
91
|
+
{modelCount > 0
|
|
92
|
+
? `, along with its ${modelCount} registered model${modelCount === 1 ? '' : 's'}.`
|
|
93
|
+
: '.'}
|
|
94
|
+
</li>
|
|
95
|
+
<li>The endpoint and API key stored on that entry are removed with it — they are shown masked here, so you would need to enter them again.</li>
|
|
96
|
+
</>
|
|
97
|
+
) : (
|
|
98
|
+
<>
|
|
99
|
+
<li>
|
|
100
|
+
Kabmo’s own settings row for this provider is removed (per-model visibility and
|
|
101
|
+
sampling choices). omp keeps the provider itself.
|
|
102
|
+
</li>
|
|
103
|
+
<li>
|
|
104
|
+
The provider and its models stay available to the chat picker — use{' '}
|
|
105
|
+
<span className="text-ink">disable</span> to hide them instead.
|
|
106
|
+
</li>
|
|
107
|
+
</>
|
|
108
|
+
)}
|
|
109
|
+
{environmentCredential && (
|
|
110
|
+
<li className="text-ink/60">
|
|
111
|
+
Its credential comes from an environment variable, which this cannot remove.
|
|
112
|
+
</li>
|
|
113
|
+
)}
|
|
88
114
|
{provider.credentialSource === 'omp-auth' && (
|
|
89
115
|
<li className="text-ink/60">
|
|
90
|
-
Your omp login for <span className="font-mono">{provider.slug}</span> is NOT touched — only the
|
|
116
|
+
Your omp login for <span className="font-mono">{provider.slug}</span> is NOT touched — only the
|
|
91
117
|
entry above. The provider stays available through that login.
|
|
92
118
|
</li>
|
|
93
119
|
)}
|
|
@@ -95,7 +121,11 @@ export function DeleteProviderModal({
|
|
|
95
121
|
|
|
96
122
|
<div className="flex items-start gap-2 px-3 py-2 rounded-md border border-error/30 bg-error/5 text-[11px] text-ink/75">
|
|
97
123
|
<AlertTriangle size={13} className="mt-0.5 shrink-0 text-error" />
|
|
98
|
-
<span>
|
|
124
|
+
<span>
|
|
125
|
+
{removesOnlySettings
|
|
126
|
+
? 'Only Kabmo’s stored preferences go — nothing in omp’s own configuration changes.'
|
|
127
|
+
: 'This cannot be undone from the UI. Re-adding the provider starts from an empty endpoint and key.'}
|
|
128
|
+
</span>
|
|
99
129
|
</div>
|
|
100
130
|
</div>
|
|
101
131
|
|