@exagone313/dsh-podman 1.5.1 → 1.6.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/dist/client/container-card-workspace.d.ts +1 -0
- package/dist/client/container-card-workspace.js +2 -2
- package/dist/client/container-panel-scope.d.ts +13 -0
- package/dist/client/container-panel-scope.js +45 -0
- package/dist/client/containers-tab.d.ts +26 -0
- package/dist/client/containers-tab.js +39 -0
- package/dist/client/index.js +673 -295
- package/dist/client/locales.d.ts +1 -1
- package/dist/client/locales.js +12 -0
- package/dist/client/plugin-navigation.d.ts +24 -0
- package/dist/client/plugin-navigation.js +44 -0
- package/dist/client/podman-containers-guide.d.ts +5 -0
- package/dist/client/podman-containers-guide.js +73 -0
- package/dist/client/podman-containers-styles.d.ts +5 -0
- package/dist/client/podman-containers-styles.js +33 -0
- package/dist/client/podman-containers.d.ts +11 -0
- package/dist/client/podman-containers.js +113 -0
- package/dist/generated/version.d.ts +2 -2
- package/dist/generated/version.js +2 -2
- package/docs/usage.md +38 -17
- package/docs/usage.zh.md +24 -4
- package/package.json +1 -1
package/dist/client/locales.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const NS = "podman";
|
|
2
|
-
export type ContainerPluginKey = "cardTitle" | "loading" | "versionMismatchMajor" | "versionMismatchMinor" | "versionIncompatible" | "versionCompatibleDifferent" | "stateReady" | "stateNotReady" | "stateUnknown" | "stateAbsent" | "valueMissing" | "columnComponent" | "columnState" | "columnVersion" | "columnCommit" | "versionsTitle" | "orchestrator" | "gateway" | "gatewayNotRunning" | "gatewayIncompatible" | "dsh" | "copyVersions" | "copied" | "copyFailed" | "copyWorkspaceId" | "reload" | "notice" | "defaultImage" | "noDefaultImage" | "defaultEnvironment" | "addMissingVars" | "applyTo" | "allContainers" | "variablesToAdd" | "addMissingVarsApply" | "gitIdentity" | "gitName" | "gitEmail" | "save" | "discard" | "unsavedChanges" | "stagedChanges" | "recreateContainer" | "updateContainer" | "confirmUpdate" | "discardChanges" | "discardChangesTitle" | "confirmDiscardChanges" | "containerNameReserved" | "containerNamePtcReserved" | "containerKindPtc" | "invalidSecretLength" | "secretLengthHint" | "portPendingSuffix" | "portDuplicate" | "groupDefaultsTitle" | "groupStatusTitle" | "tabWorkspaces" | "tabImages" | "tabStorage" | "tabDefaults" | "tabStatus" | "settingsTabs" | "statusOverview" | "gatewayReady" | "gatewayNotReady" | "gatewayUnknown" | "edit" | "editContainerTitle" | "done" | "countImageOne" | "countImageMany" | "countVolumeOne" | "countVolumeMany" | "countSecretOne" | "countSecretMany" | "countCacheOne" | "countCacheMany" | "statusRunning" | "statusStopped" | "statusMissing" | "statusPulled" | "statusBuilt" | "countWorkspaceOne" | "countWorkspaceMany" | "countContainerOne" | "countContainerMany" | "countRunningContainerOne" | "countRunningContainerMany" | "countStoppedContainerOne" | "countStoppedContainerMany" | "countVersionOne" | "countVersionMany" | "orchestratorReady" | "orchestratorUnavailable" | "orchestratorNotReady" | "orchestratorUnknown" | "noWorkspaces" | "ptcMissing" | "ptcContainerTooltip" | "ptcImageTooltip" | "recreatePtcTitle" | "confirmRecreatePtc" | "ptcImageReserved" | "removePtcTitle" | "confirmRemovePtc" | "createContainer" | "containerName" | "image" | "copyImage" | "copyCreated" | "remove" | "removeWorkspace" | "confirmRemoveWorkspace" | "recreate" | "imageName" | "built" | "packages" | "noPackages" | "volumesTitle" | "noVolumes" | "createVolume" | "removeVolume" | "volumeName" | "secretsTitle" | "noSecrets" | "createSecret" | "secretName" | "secretCharset" | "setSecret" | "removeSecret" | "removeImage" | "rebuildImage" | "rebuildAllImages" | "buildImage" | "build" | "buildImageTitle" | "pullImage" | "setDefaultImage" | "baseImagesTitle" | "noBaseImages" | "customImagesTitle" | "noCustomImages" | "parentImage" | "cancel" | "removeTag" | "envTitle" | "envKey" | "copyEnvKey" | "envValue" | "copyEnvValue" | "addEnv" | "removeEnv" | "removeVariable" | "envNameRequired" | "envNameDuplicate" | "secretLength" | "containerSecretsTitle" | "addSecretEnv" | "secretEnvName" | "portsTitle" | "publishPort" | "unpublishPort" | "containerPort" | "copyContainerPort" | "hostPort" | "hostPortOptional" | "copyHostPort" | "protocol" | "copyProtocol" | "invalidPort" | "invalidHostPort" | "publishNeedsGateway" | "containerNotRunning" | "confirmUnpublishPort" | "none" | "unavailable" | "busy" | "confirmRemoveContainer" | "confirmRecreate" | "confirmRemoveImage" | "confirmRebuildImage" | "confirmRebuildAllImages" | "confirmRemoveVolume" | "confirmRemoveSecret" | "mountsTitle" | "addMount" | "mountKind" | "mountProject" | "mountProjectShort" | "mountPath" | "browse" | "browseTitle" | "browseSelect" | "browseLoading" | "browseError" | "browseUnavailable" | "browseHidden" | "browseTruncated" | "browseOutsideRoot" | "mountDestination" | "pathsTitle" | "path" | "copyPathEntry" | "noPaths" | "editPaths" | "addPathEntry" | "moveUp" | "moveDown" | "apply" | "dragToReorder" | "remountWaiting" | "remountApprove" | "remountReject" | "mountVolume" | "mountSecret" | "mountTmpfs" | "mountAt" | "mountMode" | "copyMountPath" | "copyMountName" | "copyMountMode" | "readOnly" | "readWrite" | "mountReadOnlySuffix" | "mountReadWriteSuffix" | "confirmRemoveMount" | "removeContainerTitle" | "removeVolumeTitle" | "removeImageTitle" | "removeSecretTitle" | "removeMountTitle" | "defaultMountNotRemovable" | "rebuildImageTitle" | "rebuildAllImagesTitle" | "setSecretTitle" | "acknowledgeRemoveWorkspace" | "acknowledgeRebuildAllImages" | "cachesTitle" | "noCaches" | "cacheUsage" | "cacheKeepLatest" | "confirmCacheKeepLatest" | "cacheRemoveAll" | "confirmCacheRemoveAll" | "addContainer" | "invalidContainerName" | "containerNameTaken" | "invalidName" | "invalidImageId" | "terminalCommandLine" | "terminalSignal" | "terminalExitCode" | "terminalNoExitCode" | "terminalRunning" | "terminalFailed" | "terminalDone" | "terminalNoOutput" | "terminalCollapseAria" | "terminalExpandAria" | "terminalExpandRest" | "toolTitle_container_bash" | "toolTitle_container_exec" | "toolTitle_container_read" | "toolTitle_container_write" | "toolTitle_container_edit" | "toolTitle_container_glob" | "toolTitle_container_grep" | "toolTitle_container_list" | "toolTitle_container_start" | "toolTitle_container_recreate" | "toolTitle_container_remove" | "toolTitle_container_mount_list" | "toolTitle_container_mount_add" | "toolTitle_container_mount_remove" | "toolTitle_container_mount_update" | "toolTitle_container_path_set" | "toolTitle_container_path_add" | "toolTitle_container_path_remove" | "toolTitle_container_secret_add" | "toolTitle_container_secret_remove" | "toolTitle_container_publish_port" | "toolTitle_container_unpublish_port" | "toolTitle_image_list" | "toolTitle_image_get" | "toolTitle_image_build" | "toolTitle_image_rebuild" | "toolTitle_image_rebuild_all" | "toolTitle_image_remove" | "toolTitle_volume_list" | "toolTitle_volume_create" | "toolTitle_volume_remove" | "toolTitle_secret_list" | "toolTitle_secret_create" | "toolTitle_secret_remove" | "toolTitle_daemon_start" | "toolTitle_daemon_list" | "toolTitle_daemon_logs" | "toolTitle_daemon_restart" | "toolTitle_daemon_stop" | "terminalTabTitle" | "terminalGuideTitle" | "terminalGuideDescription" | "terminalShortcut" | "terminalShortcutNoSession" | "terminalContainer" | "terminalShell" | "terminalDefaultContainer" | "terminalStart" | "terminalConnect" | "terminalReconnect" | "terminalStatusConnecting" | "terminalStatusRunning" | "terminalStatusExited" | "terminalStatusDetached" | "terminalNoShells" | "terminalShellsFailed" | "terminalLoading";
|
|
2
|
+
export type ContainerPluginKey = "cardTitle" | "loading" | "versionMismatchMajor" | "versionMismatchMinor" | "versionIncompatible" | "versionCompatibleDifferent" | "stateReady" | "stateNotReady" | "stateUnknown" | "stateAbsent" | "valueMissing" | "columnComponent" | "columnState" | "columnVersion" | "columnCommit" | "versionsTitle" | "orchestrator" | "gateway" | "gatewayNotRunning" | "gatewayIncompatible" | "dsh" | "copyVersions" | "copied" | "copyFailed" | "copyWorkspaceId" | "reload" | "notice" | "defaultImage" | "noDefaultImage" | "defaultEnvironment" | "addMissingVars" | "applyTo" | "allContainers" | "variablesToAdd" | "addMissingVarsApply" | "gitIdentity" | "gitName" | "gitEmail" | "save" | "discard" | "unsavedChanges" | "stagedChanges" | "recreateContainer" | "updateContainer" | "confirmUpdate" | "discardChanges" | "discardChangesTitle" | "confirmDiscardChanges" | "containerNameReserved" | "containerNamePtcReserved" | "containerKindPtc" | "invalidSecretLength" | "secretLengthHint" | "portPendingSuffix" | "portDuplicate" | "groupDefaultsTitle" | "groupStatusTitle" | "tabWorkspaces" | "tabImages" | "tabStorage" | "tabDefaults" | "tabStatus" | "settingsTabs" | "statusOverview" | "gatewayReady" | "gatewayNotReady" | "gatewayUnknown" | "edit" | "editContainerTitle" | "done" | "countImageOne" | "countImageMany" | "countVolumeOne" | "countVolumeMany" | "countSecretOne" | "countSecretMany" | "countCacheOne" | "countCacheMany" | "statusRunning" | "statusStopped" | "statusMissing" | "statusPulled" | "statusBuilt" | "countWorkspaceOne" | "countWorkspaceMany" | "countContainerOne" | "countContainerMany" | "countRunningContainerOne" | "countRunningContainerMany" | "countStoppedContainerOne" | "countStoppedContainerMany" | "countVersionOne" | "countVersionMany" | "orchestratorReady" | "orchestratorUnavailable" | "orchestratorNotReady" | "orchestratorUnknown" | "noWorkspaces" | "ptcMissing" | "ptcContainerTooltip" | "ptcImageTooltip" | "recreatePtcTitle" | "confirmRecreatePtc" | "ptcImageReserved" | "removePtcTitle" | "confirmRemovePtc" | "createContainer" | "containerName" | "image" | "copyImage" | "copyCreated" | "remove" | "removeWorkspace" | "confirmRemoveWorkspace" | "recreate" | "imageName" | "built" | "packages" | "noPackages" | "volumesTitle" | "noVolumes" | "createVolume" | "removeVolume" | "volumeName" | "secretsTitle" | "noSecrets" | "createSecret" | "secretName" | "secretCharset" | "setSecret" | "removeSecret" | "removeImage" | "rebuildImage" | "rebuildAllImages" | "buildImage" | "build" | "buildImageTitle" | "pullImage" | "setDefaultImage" | "baseImagesTitle" | "noBaseImages" | "customImagesTitle" | "noCustomImages" | "parentImage" | "cancel" | "removeTag" | "envTitle" | "envKey" | "copyEnvKey" | "envValue" | "copyEnvValue" | "addEnv" | "removeEnv" | "removeVariable" | "envNameRequired" | "envNameDuplicate" | "secretLength" | "containerSecretsTitle" | "addSecretEnv" | "secretEnvName" | "portsTitle" | "publishPort" | "unpublishPort" | "containerPort" | "copyContainerPort" | "hostPort" | "hostPortOptional" | "copyHostPort" | "protocol" | "copyProtocol" | "invalidPort" | "invalidHostPort" | "publishNeedsGateway" | "containerNotRunning" | "confirmUnpublishPort" | "none" | "unavailable" | "busy" | "confirmRemoveContainer" | "confirmRecreate" | "confirmRemoveImage" | "confirmRebuildImage" | "confirmRebuildAllImages" | "confirmRemoveVolume" | "confirmRemoveSecret" | "mountsTitle" | "addMount" | "mountKind" | "mountProject" | "mountProjectShort" | "mountPath" | "browse" | "browseTitle" | "browseSelect" | "browseLoading" | "browseError" | "browseUnavailable" | "browseHidden" | "browseTruncated" | "browseOutsideRoot" | "mountDestination" | "pathsTitle" | "path" | "copyPathEntry" | "noPaths" | "editPaths" | "addPathEntry" | "moveUp" | "moveDown" | "apply" | "dragToReorder" | "remountWaiting" | "remountApprove" | "remountReject" | "mountVolume" | "mountSecret" | "mountTmpfs" | "mountAt" | "mountMode" | "copyMountPath" | "copyMountName" | "copyMountMode" | "readOnly" | "readWrite" | "mountReadOnlySuffix" | "mountReadWriteSuffix" | "confirmRemoveMount" | "removeContainerTitle" | "removeVolumeTitle" | "removeImageTitle" | "removeSecretTitle" | "removeMountTitle" | "defaultMountNotRemovable" | "rebuildImageTitle" | "rebuildAllImagesTitle" | "setSecretTitle" | "acknowledgeRemoveWorkspace" | "acknowledgeRebuildAllImages" | "cachesTitle" | "noCaches" | "cacheUsage" | "cacheKeepLatest" | "confirmCacheKeepLatest" | "cacheRemoveAll" | "confirmCacheRemoveAll" | "addContainer" | "invalidContainerName" | "containerNameTaken" | "invalidName" | "invalidImageId" | "terminalCommandLine" | "terminalSignal" | "terminalExitCode" | "terminalNoExitCode" | "terminalRunning" | "terminalFailed" | "terminalDone" | "terminalNoOutput" | "terminalCollapseAria" | "terminalExpandAria" | "terminalExpandRest" | "toolTitle_container_bash" | "toolTitle_container_exec" | "toolTitle_container_read" | "toolTitle_container_write" | "toolTitle_container_edit" | "toolTitle_container_glob" | "toolTitle_container_grep" | "toolTitle_container_list" | "toolTitle_container_start" | "toolTitle_container_recreate" | "toolTitle_container_remove" | "toolTitle_container_mount_list" | "toolTitle_container_mount_add" | "toolTitle_container_mount_remove" | "toolTitle_container_mount_update" | "toolTitle_container_path_set" | "toolTitle_container_path_add" | "toolTitle_container_path_remove" | "toolTitle_container_secret_add" | "toolTitle_container_secret_remove" | "toolTitle_container_publish_port" | "toolTitle_container_unpublish_port" | "toolTitle_image_list" | "toolTitle_image_get" | "toolTitle_image_build" | "toolTitle_image_rebuild" | "toolTitle_image_rebuild_all" | "toolTitle_image_remove" | "toolTitle_volume_list" | "toolTitle_volume_create" | "toolTitle_volume_remove" | "toolTitle_secret_list" | "toolTitle_secret_create" | "toolTitle_secret_remove" | "toolTitle_daemon_start" | "toolTitle_daemon_list" | "toolTitle_daemon_logs" | "toolTitle_daemon_restart" | "toolTitle_daemon_stop" | "terminalTabTitle" | "terminalGuideTitle" | "terminalGuideDescription" | "terminalShortcut" | "terminalShortcutNoSession" | "terminalContainer" | "terminalShell" | "terminalDefaultContainer" | "terminalStart" | "terminalConnect" | "terminalReconnect" | "terminalStatusConnecting" | "terminalStatusRunning" | "terminalStatusExited" | "terminalStatusDetached" | "terminalNoShells" | "terminalShellsFailed" | "terminalLoading" | "containersTabTitle" | "containersCommand" | "containersPanelNoWorkspace" | "containersGuideTitle" | "containersGuideDescription" | "moreSettings";
|
|
3
3
|
/**
|
|
4
4
|
* Translate one key, interpolating `{name}` placeholders when given. Components
|
|
5
5
|
* that build dialog copy declare this so they can name their subject.
|
package/dist/client/locales.js
CHANGED
|
@@ -321,6 +321,12 @@ export const en = {
|
|
|
321
321
|
terminalNoShells: "No shells available",
|
|
322
322
|
terminalShellsFailed: "Could not list shells: {message}",
|
|
323
323
|
terminalLoading: "Loading…",
|
|
324
|
+
containersTabTitle: "Containers",
|
|
325
|
+
containersCommand: "Containers",
|
|
326
|
+
containersPanelNoWorkspace: "This session is not in a known workspace.",
|
|
327
|
+
containersGuideTitle: "Workspace containers",
|
|
328
|
+
containersGuideDescription: "Manage the Session workspace's containers",
|
|
329
|
+
moreSettings: "More settings…",
|
|
324
330
|
};
|
|
325
331
|
export const zh = {
|
|
326
332
|
cardTitle: "dsh-podman",
|
|
@@ -641,4 +647,10 @@ export const zh = {
|
|
|
641
647
|
terminalNoShells: "没有可用的 Shell",
|
|
642
648
|
terminalShellsFailed: "读取 Shell 失败:{message}",
|
|
643
649
|
terminalLoading: "正在加载…",
|
|
650
|
+
containersTabTitle: "容器",
|
|
651
|
+
containersCommand: "容器",
|
|
652
|
+
containersPanelNoWorkspace: "此会话不属于任何已知工作区。",
|
|
653
|
+
containersGuideTitle: "工作区容器",
|
|
654
|
+
containersGuideDescription: "管理会话工作区中的容器",
|
|
655
|
+
moreSettings: "更多设置…",
|
|
644
656
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const PLUGIN_PACKAGE = "@exagone313/dsh-podman";
|
|
2
|
+
/** The plugin-navigation service's face, as this client half uses it. */
|
|
3
|
+
export interface PluginNavigation {
|
|
4
|
+
/**
|
|
5
|
+
* Open one bundle's page on the Plugins panel.
|
|
6
|
+
* @param packageName - npm package name of the bundle.
|
|
7
|
+
*/
|
|
8
|
+
openBundle(packageName: string): void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Record the plugin-navigation service (or clear it).
|
|
12
|
+
* @param service - the live service, or undefined on teardown.
|
|
13
|
+
*/
|
|
14
|
+
export declare function setPluginNavigation(service: PluginNavigation | undefined): void;
|
|
15
|
+
/** Whether a plugin-navigation face is currently adopted. */
|
|
16
|
+
export declare function pluginSettingsAvailable(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Observe whether the navigation face is available.
|
|
19
|
+
* @param listener - invoked when the face is adopted or cleared.
|
|
20
|
+
* @returns the disposer removing it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function subscribePluginSettings(listener: () => void): () => void;
|
|
23
|
+
/** Open this plugin's page on the Plugins panel, when the client UI is served. */
|
|
24
|
+
export declare function openPluginSettings(): void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
|
|
2
|
+
//
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
// The plugin's installed package name. The Plugins page keys
|
|
5
|
+
// `plugins.bundle.config` by the bundle package name, so it must match
|
|
6
|
+
// package.json's `name`.
|
|
7
|
+
export const PLUGIN_PACKAGE = "@exagone313/dsh-podman";
|
|
8
|
+
// The service the apply closure adopted, or undefined before it mounts (and
|
|
9
|
+
// after a plugin reload). A missing service makes the button a no-op rather
|
|
10
|
+
// than a failed click.
|
|
11
|
+
let navigation;
|
|
12
|
+
// Render seats observing adoption, so the pane's settings action appears as
|
|
13
|
+
// soon as the face does and disappears with it.
|
|
14
|
+
const listeners = new Set();
|
|
15
|
+
/**
|
|
16
|
+
* Record the plugin-navigation service (or clear it).
|
|
17
|
+
* @param service - the live service, or undefined on teardown.
|
|
18
|
+
*/
|
|
19
|
+
export function setPluginNavigation(service) {
|
|
20
|
+
if (navigation === service)
|
|
21
|
+
return;
|
|
22
|
+
navigation = service;
|
|
23
|
+
for (const listener of listeners)
|
|
24
|
+
listener();
|
|
25
|
+
}
|
|
26
|
+
/** Whether a plugin-navigation face is currently adopted. */
|
|
27
|
+
export function pluginSettingsAvailable() {
|
|
28
|
+
return navigation !== undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Observe whether the navigation face is available.
|
|
32
|
+
* @param listener - invoked when the face is adopted or cleared.
|
|
33
|
+
* @returns the disposer removing it.
|
|
34
|
+
*/
|
|
35
|
+
export function subscribePluginSettings(listener) {
|
|
36
|
+
listeners.add(listener);
|
|
37
|
+
return () => {
|
|
38
|
+
listeners.delete(listener);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** Open this plugin's page on the Plugins panel, when the client UI is served. */
|
|
42
|
+
export function openPluginSettings() {
|
|
43
|
+
navigation?.openBundle(PLUGIN_PACKAGE);
|
|
44
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PropsLocale, PropsRuntime } from "@deepseek-ai/dsh-client-ui-slots";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import { NS } from "./locales.js";
|
|
4
|
+
export type PodmanContainersGuideProps = PropsRuntime<"sidebar.right.tab.guide.entry"> & PropsLocale<typeof NS>;
|
|
5
|
+
export declare function PodmanContainersGuide(props: PodmanContainersGuideProps): ReactNode;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
|
|
3
|
+
//
|
|
4
|
+
// SPDX-License-Identifier: MIT
|
|
5
|
+
// The workspace Containers panel's guide card: one capsule saying what the
|
|
6
|
+
// panel shows, and a click that opens it in the guide tab's place. Unlike the
|
|
7
|
+
// terminal's card it has nothing to choose, so the capsule the guide would draw
|
|
8
|
+
// itself is all it needs; it is still this plugin's own card so the entry reads
|
|
9
|
+
// in the same vocabulary as the terminal's.
|
|
10
|
+
import { PluginArtworkDefault } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
11
|
+
import { PODMAN_CONTAINERS_KIND } from "./containers-tab.js";
|
|
12
|
+
export function PodmanContainersGuide(props) {
|
|
13
|
+
const { tab } = props.useTabInfo();
|
|
14
|
+
return (_jsxs("button", { type: "button", style: CARD_STYLE, "data-sidebar-right-guide-entry": props.kind, onClick: () => {
|
|
15
|
+
// Replace the guide tab in place, exactly like the shipped entry
|
|
16
|
+
// capsules: the guide is a doorway, not a page that stays open.
|
|
17
|
+
tab.actions.openTab(PODMAN_CONTAINERS_KIND, { replaceTab: true });
|
|
18
|
+
}, children: [_jsx("span", { style: ICON_STYLE, "aria-hidden": "true", children: _jsx(PluginArtworkDefault, { size: 22 }) }), _jsxs("span", { style: TEXT_STYLE, children: [_jsx("span", { style: TITLE_STYLE, children: props.title }), props.description === undefined
|
|
19
|
+
? null
|
|
20
|
+
: _jsx("span", { style: DESCRIPTION_STYLE, children: props.description })] })] }));
|
|
21
|
+
}
|
|
22
|
+
// The card mirrors the harness guide capsule skin (`GuideBody .entry`): same
|
|
23
|
+
// padding, radius token, border and background as the entries beside it, so the
|
|
24
|
+
// glyph and title line up. Being a button, it also carries the capsule's
|
|
25
|
+
// pointer cursor and left-aligned text.
|
|
26
|
+
const CARD_STYLE = {
|
|
27
|
+
display: "flex",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
gap: "14px",
|
|
30
|
+
boxSizing: "border-box",
|
|
31
|
+
width: "100%",
|
|
32
|
+
minHeight: "56px",
|
|
33
|
+
padding: "14px 20px",
|
|
34
|
+
color: "var(--dsw-alias-label-primary)",
|
|
35
|
+
font: "inherit",
|
|
36
|
+
textAlign: "left",
|
|
37
|
+
cursor: "pointer",
|
|
38
|
+
border: "0.5px solid var(--dsw-alias-border-l3)",
|
|
39
|
+
borderRadius: "var(--dsl-guide-entry-radius)",
|
|
40
|
+
background: "var(--dsw-alias-bg-layer-1)",
|
|
41
|
+
};
|
|
42
|
+
const ICON_STYLE = {
|
|
43
|
+
display: "flex",
|
|
44
|
+
flex: "none",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
justifyContent: "center",
|
|
47
|
+
width: "26px",
|
|
48
|
+
height: "26px",
|
|
49
|
+
color: "var(--dsw-alias-label-secondary)",
|
|
50
|
+
};
|
|
51
|
+
const TEXT_STYLE = {
|
|
52
|
+
display: "flex",
|
|
53
|
+
flex: 1,
|
|
54
|
+
flexDirection: "column",
|
|
55
|
+
gap: "2px",
|
|
56
|
+
minWidth: 0,
|
|
57
|
+
};
|
|
58
|
+
const TITLE_STYLE = {
|
|
59
|
+
overflow: "hidden",
|
|
60
|
+
color: "var(--dsw-alias-label-primary)",
|
|
61
|
+
fontSize: "14px",
|
|
62
|
+
lineHeight: 1.4,
|
|
63
|
+
whiteSpace: "nowrap",
|
|
64
|
+
textOverflow: "ellipsis",
|
|
65
|
+
};
|
|
66
|
+
const DESCRIPTION_STYLE = {
|
|
67
|
+
overflow: "hidden",
|
|
68
|
+
color: "var(--dsw-alias-label-tertiary)",
|
|
69
|
+
fontSize: "11px",
|
|
70
|
+
lineHeight: 1.4,
|
|
71
|
+
whiteSpace: "nowrap",
|
|
72
|
+
textOverflow: "ellipsis",
|
|
73
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Context as ClientContext } from "@deepseek-ai/cordis";
|
|
2
|
+
export declare const CONTAINERS_PANEL_CLASS = "dsh-podman-containers-panel";
|
|
3
|
+
export declare const CONTAINERS_PANEL_STYLES = "\n.dsh-podman-containers-panel > .dsh-podman-table-card {\n border: 0 !important;\n}\n";
|
|
4
|
+
/** Inject the panel's border override for the owning plugin lifetime. */
|
|
5
|
+
export declare function installContainersPanelStyles(ctx: ClientContext): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
|
|
2
|
+
//
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
import { TABLE_CARD_CLASS } from "./container-card-table-styles.js";
|
|
5
|
+
// The class on the workspace containers panel's own wrapper. The panel renders
|
|
6
|
+
// the settings page's WorkspaceSection, whose card keeps everything it draws in
|
|
7
|
+
// the panel — its fill, its padding and the rules between its own rows — but not
|
|
8
|
+
// its outline: the pane is already the surface, so the card's border would only
|
|
9
|
+
// draw a box inside a box. Keying the override to this wrapper is what leaves the
|
|
10
|
+
// settings page's card exactly as it was, since no card there sits under it.
|
|
11
|
+
export const CONTAINERS_PANEL_CLASS = "dsh-podman-containers-panel";
|
|
12
|
+
// The card's border is an inline style (`card` in container-card-styles.ts), so
|
|
13
|
+
// only an important declaration can drop it; the rule touches no other property,
|
|
14
|
+
// which is what keeps the card's own look inside the panel unchanged.
|
|
15
|
+
export const CONTAINERS_PANEL_STYLES = `
|
|
16
|
+
.${CONTAINERS_PANEL_CLASS} > .${TABLE_CARD_CLASS} {
|
|
17
|
+
border: 0 !important;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
/** Inject the panel's border override for the owning plugin lifetime. */
|
|
21
|
+
export function installContainersPanelStyles(ctx) {
|
|
22
|
+
if (typeof document === "undefined")
|
|
23
|
+
return;
|
|
24
|
+
ctx.effect(() => {
|
|
25
|
+
const tag = document.createElement("style");
|
|
26
|
+
tag.dataset.plugin = "@exagone313/dsh-podman";
|
|
27
|
+
tag.textContent = CONTAINERS_PANEL_STYLES;
|
|
28
|
+
document.head.appendChild(tag);
|
|
29
|
+
return () => {
|
|
30
|
+
tag.remove();
|
|
31
|
+
};
|
|
32
|
+
}, "podman: containers panel styles");
|
|
33
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { InjectFace, PropsLocale, PropsRuntime } from "@deepseek-ai/dsh-client-ui-slots";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import type { ContainerCardFace } from "./container-card-controller.js";
|
|
4
|
+
import { NS } from "./locales.js";
|
|
5
|
+
/** Everything the tab body is given: framework shares plus the injected card face. */
|
|
6
|
+
export interface PodmanContainersInjected extends ContainerCardFace {
|
|
7
|
+
/** Owning session, resolved by the host to its own workspace. */
|
|
8
|
+
readonly sessionId: string;
|
|
9
|
+
}
|
|
10
|
+
export type PodmanContainersProps = PropsRuntime<"sidebar.right.pane.tab"> & PropsLocale<typeof NS> & InjectFace<PodmanContainersInjected>;
|
|
11
|
+
export declare function PodmanContainers(props: PodmanContainersProps): ReactNode;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
|
|
3
|
+
//
|
|
4
|
+
// SPDX-License-Identifier: MIT
|
|
5
|
+
// The Containers right-Sidebar tab's body: the Session workspace's containers
|
|
6
|
+
// only, rendered as the same workspace block the settings card shows — the
|
|
7
|
+
// workspace's name, its copyable ID, its running-container count and its Add
|
|
8
|
+
// container / Remove containers actions, followed by the full container rows
|
|
9
|
+
// with their labelled fields. The workspace is the Session's own — never
|
|
10
|
+
// chosen, never shown as another workspace's rows — and it is resolved once
|
|
11
|
+
// through the host route the terminal uses.
|
|
12
|
+
//
|
|
13
|
+
// The slot body is unpadded, so this pane brings its own insets and scroll
|
|
14
|
+
// container. The settings action opens the harness's Plugins panel and is
|
|
15
|
+
// hidden while no plugin-navigation face is mounted, rather than doing nothing
|
|
16
|
+
// silently.
|
|
17
|
+
import { Button } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
18
|
+
import { useEffect, useState, useSyncExternalStore, } from "react";
|
|
19
|
+
import { hint } from "./container-card-styles.js";
|
|
20
|
+
import { WorkspaceSection } from "./container-card-workspace.js";
|
|
21
|
+
import { containersInWorkspace } from "./container-panel-scope.js";
|
|
22
|
+
import { openPluginSettings, pluginSettingsAvailable, subscribePluginSettings, } from "./plugin-navigation.js";
|
|
23
|
+
import { CONTAINERS_PANEL_CLASS } from "./podman-containers-styles.js";
|
|
24
|
+
import { fetchTerminalTarget } from "./terminal-transport.js";
|
|
25
|
+
export function PodmanContainers(props) {
|
|
26
|
+
const { t, sessionId } = props;
|
|
27
|
+
const state = props.useContainerCard((snapshot) => snapshot);
|
|
28
|
+
// The settings action opens the harness's Plugins panel, whose navigation
|
|
29
|
+
// face the plugin-manager client UI provides lazily. The pane follows that
|
|
30
|
+
// availability through this module's store rather than reading a service, so
|
|
31
|
+
// a shell without the UI hides the action instead of offering a failed click.
|
|
32
|
+
const settingsAvailable = useSyncExternalStore(subscribePluginSettings, pluginSettingsAvailable);
|
|
33
|
+
// The host resolves the Session's workspace from the Session itself; the
|
|
34
|
+
// browser neither chooses nor guesses one. `failed` means it cannot place this
|
|
35
|
+
// session in a workspace, so the panel says so instead of listing every row.
|
|
36
|
+
const [target, setTarget] = useState({ phase: "loading" });
|
|
37
|
+
const scope = target.phase === "ready" ? target.target : undefined;
|
|
38
|
+
const listedWorkspace = scope === undefined
|
|
39
|
+
? undefined
|
|
40
|
+
: state.workspaces.find((entry) => entry.workspaceSlug === scope.workspaceSlug);
|
|
41
|
+
// The settings snapshot may not have listed the workspace yet; the host's
|
|
42
|
+
// target already names it, so the header can still render its identity while
|
|
43
|
+
// the full row follows.
|
|
44
|
+
const workspace = scope === undefined || scope.workspaceSlug === ""
|
|
45
|
+
? undefined
|
|
46
|
+
: listedWorkspace ?? {
|
|
47
|
+
workspaceSlug: scope.workspaceSlug,
|
|
48
|
+
projectName: scope.workspace,
|
|
49
|
+
containerName: "",
|
|
50
|
+
imageId: "",
|
|
51
|
+
status: "",
|
|
52
|
+
createdAt: "",
|
|
53
|
+
mounts: [],
|
|
54
|
+
};
|
|
55
|
+
// The card snapshot is the only source of containers, and the settings scope
|
|
56
|
+
// may not have loaded when this tab opens.
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
props.reload();
|
|
59
|
+
}, [props.reload]);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
const controller = new AbortController();
|
|
62
|
+
setTarget({ phase: "loading" });
|
|
63
|
+
void fetchTerminalTarget(sessionId, controller.signal).then((resolved) => {
|
|
64
|
+
if (!controller.signal.aborted) {
|
|
65
|
+
setTarget({ phase: "ready", target: resolved });
|
|
66
|
+
}
|
|
67
|
+
}, (error) => {
|
|
68
|
+
if (controller.signal.aborted)
|
|
69
|
+
return;
|
|
70
|
+
setTarget({
|
|
71
|
+
phase: "failed",
|
|
72
|
+
message: error instanceof Error ? error.message : String(error),
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
return () => {
|
|
76
|
+
controller.abort();
|
|
77
|
+
};
|
|
78
|
+
}, [sessionId]);
|
|
79
|
+
const containers = containersInWorkspace(state.containers, scope);
|
|
80
|
+
// The workspace header is the settings card's own block header, with this
|
|
81
|
+
// pane's settings action appended to its action group. Both places render the
|
|
82
|
+
// same identity, copy button, count and Add/Remove controls.
|
|
83
|
+
const settingsAction = settingsAvailable
|
|
84
|
+
? (_jsx(Button, { variant: "outline", size: "sm", onClick: openPluginSettings, children: t("moreSettings") }))
|
|
85
|
+
: undefined;
|
|
86
|
+
return (_jsx("section", { className: CONTAINERS_PANEL_CLASS, style: PANE_STYLE, "data-dsh-podman-containers": true, children: state.loadState === "loading"
|
|
87
|
+
? _jsx("p", { style: hint, role: "status", children: t("loading") })
|
|
88
|
+
: !state.available
|
|
89
|
+
? _jsx("p", { style: hint, role: "alert", children: t("unavailable") })
|
|
90
|
+
: target.phase === "loading"
|
|
91
|
+
? _jsx("p", { style: hint, role: "status", children: t("loading") })
|
|
92
|
+
: target.phase === "failed"
|
|
93
|
+
? _jsx("p", { style: hint, role: "alert", children: target.message })
|
|
94
|
+
: workspace === undefined
|
|
95
|
+
? _jsx("p", { style: hint, role: "status", children: t("containersPanelNoWorkspace") })
|
|
96
|
+
: (_jsx(WorkspaceSection, { t: t, workspace: workspace, containers: containers, images: state.images, volumes: state.volumes, secrets: state.secrets, busy: state.busy, writable: state.writable, locale: state.locale, pendingActions: state.pendingActions, defaultImage: state.defaultImage, defaultEnv: state.containerEnv, projectsRoot: state.projectsRoot, directoryPicker: state.directoryPicker, onRemove: props.remove, onRecreate: props.recreate, onRemoveWorkspace: props.removeWorkspace, onCreate: props.createContainer, onCreateSecret: props.createSecret, onStartContainer: props.startContainer, onApplyContainerConfig: props.applyContainerConfig, gatewayUnavailable: state.gatewayState === "absent" ||
|
|
97
|
+
state.gatewayState === "incompatible", extraAction: settingsAction })) }));
|
|
98
|
+
}
|
|
99
|
+
// The slot body has no padding of its own, so the pane supplies its insets and
|
|
100
|
+
// scrolls the workspace block as one unit. The pane is the panel's one surface:
|
|
101
|
+
// the card it holds draws no outline here (see podman-containers-styles.ts),
|
|
102
|
+
// while its fill, padding and inner rules stay exactly as the settings page
|
|
103
|
+
// renders them.
|
|
104
|
+
const PANE_STYLE = {
|
|
105
|
+
boxSizing: "border-box",
|
|
106
|
+
height: "100%",
|
|
107
|
+
minHeight: 0,
|
|
108
|
+
overflowY: "auto",
|
|
109
|
+
padding: "10px",
|
|
110
|
+
color: "var(--dsw-alias-label-primary)",
|
|
111
|
+
background: "var(--dsw-alias-bg-layer-2)",
|
|
112
|
+
fontSize: "13px",
|
|
113
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
2
|
-
export declare const GIT_COMMIT = "
|
|
1
|
+
export declare const VERSION = "1.6.0";
|
|
2
|
+
export declare const GIT_COMMIT = "a1a5ab0";
|
package/docs/usage.md
CHANGED
|
@@ -630,23 +630,22 @@ its **Recreate**/**Remove** actions.
|
|
|
630
630
|
|
|
631
631
|
## Podman terminal
|
|
632
632
|
|
|
633
|
-
The plugin owns a **Podman terminal** right-Sidebar tab
|
|
634
|
-
|
|
635
|
-
terminal
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
to **Ctrl+Shift
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
offers.
|
|
633
|
+
The plugin owns a **Podman terminal** right-Sidebar tab. It replaces the
|
|
634
|
+
built-in dsh terminal with its own implementation: the plugin's bundle patch
|
|
635
|
+
disables the stock terminal row and registers this one instead, so the terminal
|
|
636
|
+
shown in the Sidebar is dsh-podman's. Open it from the right Sidebar's new-tab
|
|
637
|
+
guide — the card is **New terminal** — or press **Ctrl+\`**; the tab is named
|
|
638
|
+
after the shell it runs (`bash`, `sh`, …). If the built-in terminal is enabled
|
|
639
|
+
again, the plugin falls back to **Ctrl+Shift+\`**; the agent's `terminal` tool
|
|
640
|
+
is unaffected. It always runs in the session's own workspace — each workspace
|
|
641
|
+
has its own side panes and terminals — so the start form only asks for a
|
|
642
|
+
container and then a shell, and a shell can run in the default container or in a
|
|
643
|
+
named one. If the session's directory names no known workspace the form reports
|
|
644
|
+
that instead of guessing; the harness's own Terminal always uses that
|
|
645
|
+
workspace's default container. The container and shell you last started are
|
|
646
|
+
remembered in the browser's local storage and preselected while they are still
|
|
647
|
+
available — a container that disappeared falls back to the default, and a shell
|
|
648
|
+
the image no longer ships falls back to the first one the container offers.
|
|
650
649
|
|
|
651
650
|
The shell list is discovered **inside the chosen container**: candidate names
|
|
652
651
|
are looked up on that container's PATH (`command -v`) and merged with
|
|
@@ -662,6 +661,28 @@ the screen. Closing the tab leaves the shell retained for a while (until the
|
|
|
662
661
|
host reaps it); **Reconnect** starts a fresh shell in the current selection.
|
|
663
662
|
Closing or recreating a container drops its terminals, so reconnect afterwards.
|
|
664
663
|
|
|
664
|
+
## Workspace containers panel
|
|
665
|
+
|
|
666
|
+
The plugin also owns a **Containers** right-Sidebar tab, separate from the
|
|
667
|
+
Podman terminal. Open it from the right Sidebar's new-tab menu: the **Workspace
|
|
668
|
+
containers** card sits right after **New terminal**, and picking it opens the
|
|
669
|
+
panel in that tab's place. The same panel opens from its **Containers** command.
|
|
670
|
+
|
|
671
|
+
The panel lists only containers from the current session's workspace: the host
|
|
672
|
+
resolves the workspace from the session once, through the same route the
|
|
673
|
+
terminal uses, and other workspaces, the workspace-less PTC container and rows
|
|
674
|
+
without a workspace never appear. If the session belongs to no known workspace,
|
|
675
|
+
the panel says so instead of listing anything. Its header is the workspace block
|
|
676
|
+
from the settings card — the workspace name, a button copying its UUID, its
|
|
677
|
+
running-container count, and **Add container** / **Remove containers** with the
|
|
678
|
+
same confirmations. Each row carries the container's name, state and age and the
|
|
679
|
+
same labelled fields as the settings card — environment and secret environment
|
|
680
|
+
variables, mounts, PATH additions and published ports — with **Edit**,
|
|
681
|
+
**Recreate** and **Remove**. A **More settings…** button in the header opens
|
|
682
|
+
this plugin's settings card — under **Plugins** → **Installed** — when the
|
|
683
|
+
harness serves the **Plugins** panel; without it the button is hidden. Images,
|
|
684
|
+
storage, defaults and the version status stay on that settings card.
|
|
685
|
+
|
|
665
686
|
## Podman operator mode
|
|
666
687
|
|
|
667
688
|
The plugin ships an **agent preset** named _Podman operator mode_ (id
|
package/docs/usage.zh.md
CHANGED
|
@@ -517,10 +517,13 @@ chip 输入框(输入名称并按空格/逗号,或粘贴列表,以添加
|
|
|
517
517
|
|
|
518
518
|
## Podman 终端
|
|
519
519
|
|
|
520
|
-
插件自带一个右侧边栏的 **Podman
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
插件自带一个右侧边栏的 **Podman 终端**标签页,以自身实现取代 dsh
|
|
521
|
+
自带的终端:插件的 bundle patch
|
|
522
|
+
会禁用内置终端界面并改为注册这个终端,因此侧边栏中显示的就是 dsh-podman
|
|
523
|
+
的终端。可从右侧边栏的“新建标签页”指南中打开(卡片名为**新建终端**),或按
|
|
524
|
+
**Ctrl+\`**;标签页以所运行的 shell
|
|
525
|
+
命名(`bash`、`sh`等)。若重新启用内置终端,插件会回退到
|
|
526
|
+
**Ctrl+Shift+\`**;agent 的 `terminal`
|
|
524
527
|
工具不受影响。它始终在会话所在的工作区中运行——每个工作区都有自己的侧边栏和终端——因此启动表单只需选择容器和
|
|
525
528
|
shell,既可在默认容器中运行,也可在命名容器中运行;若会话目录不属于任何已知工作区,表单会直接提示而不是猜测。harness
|
|
526
529
|
自带的终端始终使用该工作区的默认容器。上次启动所使用的容器与 shell
|
|
@@ -539,6 +542,23 @@ shell。启动前还会再次校验所选 shell。
|
|
|
539
542
|
仍会保留一段时间(直到主机回收);**重新连接**会在当前选择中启动一个新的
|
|
540
543
|
shell。关闭或重建容器会丢弃其终端,之后请重新连接。
|
|
541
544
|
|
|
545
|
+
## 工作区容器面板
|
|
546
|
+
|
|
547
|
+
插件还自带一个右侧边栏的 **容器** 标签页,与 Podman
|
|
548
|
+
终端相互独立。可从右侧边栏的新建标签页菜单中打开:**工作区容器** 卡片紧跟在
|
|
549
|
+
**新建终端** 之后,选择该卡片会在该标签页的位置打开面板。也可从 **容器**
|
|
550
|
+
命令打开。
|
|
551
|
+
|
|
552
|
+
面板只列出当前会话所在工作区的容器:主机通过终端所使用的同一路由从会话解析工作区一次,其他工作区、无工作区的
|
|
553
|
+
PTC
|
|
554
|
+
容器以及没有工作区的行都不会出现。若会话不属于任何已知工作区,面板会直接说明而不会列出任何内容。面板标题栏就是设置卡片中的工作区区块:工作区名称、复制其
|
|
555
|
+
UUID 的按钮、正在运行的容器数量,以及带有相同确认流程的 **添加容器** /
|
|
556
|
+
**移除容器**。每个容器行显示名称、状态与创建时间,并与设置卡片一样带有完整的带标签字段——环境变量与机密环境变量、挂载、PATH
|
|
557
|
+
追加项与已发布端口——并提供 **编辑**、**重建** 与 **移除**。当 harness 提供
|
|
558
|
+
**插件** 面板时,标题栏的 **更多设置…** 按钮会打开本插件的设置卡片(位于
|
|
559
|
+
**插件** →
|
|
560
|
+
**已安装**);没有该面板时该按钮会隐藏。镜像、存储、默认值与版本状态仍在该设置卡片中。
|
|
561
|
+
|
|
542
562
|
## Podman 操作员模式
|
|
543
563
|
|
|
544
564
|
插件附带一个名为 _Podman operator mode_(id `podman-ops`)的 **agent
|