@deepseek-harness-tui/dsh-tui 0.17.0 → 0.19.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 +43 -16
- package/bin/dsh-tui.js +46 -3
- package/cli/adapters/dsh/index.mjs +2 -2
- package/guide/dsh-tui-guide/cli.en.md +1 -1
- package/guide/dsh-tui-guide/cli.md +1 -1
- package/guide/dsh-tui-guide/codex-backend.en.md +2 -2
- package/guide/dsh-tui-guide/codex-backend.md +2 -2
- package/guide/dsh-tui-guide/configuration.en.md +8 -2
- package/guide/dsh-tui-guide/configuration.md +8 -2
- package/guide/dsh-tui-guide/getting-started.en.md +174 -6
- package/guide/dsh-tui-guide/getting-started.md +125 -15
- package/guide/dsh-tui-guide/interaction.en.md +30 -8
- package/guide/dsh-tui-guide/interaction.md +18 -5
- package/guide/dsh-tui-guide/plugins.en.md +28 -7
- package/guide/dsh-tui-guide/plugins.md +18 -5
- package/guide/dsh-tui-guide/user-guide.en.md +32 -17
- package/guide/dsh-tui-guide/user-guide.md +23 -12
- package/lib/settings.json +3 -3
- package/lib/types/adapter/channel/ui-policy.d.ts +1 -0
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +1 -0
- package/lib/types/adapter/ports/channel-ui.d.ts +10 -2
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +31 -5
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/standard/grants.d.ts +60 -0
- package/lib/types/adapter/standard/grants.d.ts.map +1 -1
- package/lib/types/adapter/standard/grants.js +74 -0
- package/lib/types/agent/events.d.ts +16 -3
- package/lib/types/agent/events.d.ts.map +1 -1
- package/lib/types/agent/session.d.ts +5 -0
- package/lib/types/agent/session.d.ts.map +1 -1
- package/lib/types/backends/claude/translate/core.d.ts +2 -2
- package/lib/types/backends/claude/translate/core.d.ts.map +1 -1
- package/lib/types/backends/claude/translate/core.js +10 -6
- package/lib/types/backends/codex/session/commands.d.ts +2 -0
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
- package/lib/types/backends/codex/session/commands.js +8 -4
- package/lib/types/backends/codex/session/input.d.ts +11 -7
- package/lib/types/backends/codex/session/input.d.ts.map +1 -1
- package/lib/types/backends/codex/session/input.js +68 -15
- package/lib/types/backends/codex/session/session.d.ts.map +1 -1
- package/lib/types/backends/codex/session/session.js +2 -3
- package/lib/types/channel/projection.d.ts.map +1 -1
- package/lib/types/channel/projection.js +78 -10
- package/lib/types/channel/questions.d.ts +19 -3
- package/lib/types/channel/questions.d.ts.map +1 -1
- package/lib/types/channel/sanitize.d.ts.map +1 -1
- package/lib/types/channel/sanitize.js +8 -4
- package/lib/types/channel/subagent-failure.d.ts +49 -0
- package/lib/types/channel/subagent-failure.d.ts.map +1 -0
- package/lib/types/channel/subagent-failure.js +59 -0
- package/lib/types/channel/transcript.d.ts +17 -0
- package/lib/types/channel/transcript.d.ts.map +1 -1
- package/lib/types/channel/transcript.js +35 -0
- package/lib/types/commands.js +2 -2
- package/lib/types/components/GoalTodoPanel.d.ts +71 -6
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +165 -17
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +14 -9
- package/lib/types/components/PluginGrantList.d.ts +45 -0
- package/lib/types/components/PluginGrantList.d.ts.map +1 -0
- package/lib/types/components/PluginGrantList.js +126 -0
- package/lib/types/components/PluginInstallPane.d.ts.map +1 -1
- package/lib/types/components/PluginInstallPane.js +35 -6
- package/lib/types/components/PluginManagePane.d.ts.map +1 -1
- package/lib/types/components/PluginManagePane.js +65 -8
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +63 -8
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +17 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +12 -0
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +16 -7
- package/lib/types/components/onboardingModel.d.ts +2 -2
- package/lib/types/components/onboardingModel.js +3 -3
- package/lib/types/components/onboardingProviderPlan.d.ts +110 -0
- package/lib/types/components/onboardingProviderPlan.d.ts.map +1 -0
- package/lib/types/components/onboardingProviderPlan.js +78 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +5 -8
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +7 -4
- package/lib/types/components/questions/PlanReviewPanel.d.ts +3 -6
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/revealScope.d.ts +15 -0
- package/lib/types/components/revealScope.d.ts.map +1 -0
- package/lib/types/components/revealScope.js +17 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +41 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +123 -6
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +9 -2
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +7 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +9 -2
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts +30 -0
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.js +94 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +14 -2
- package/lib/types/components/sidePanel/types.d.ts +2 -0
- package/lib/types/components/sidePanel/types.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.js +15 -1
- package/lib/types/components/smoothReveal.d.ts +36 -6
- package/lib/types/components/smoothReveal.d.ts.map +1 -1
- package/lib/types/components/smoothReveal.js +92 -21
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +4 -14
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +26 -17
- package/lib/types/dsh-adapter/backend/session.d.ts +7 -1
- package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/session.js +74 -6
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +15 -6
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +3 -1
- package/lib/types/dsh-adapter/channel/attached-context.d.ts +15 -2
- package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/attached-context.js +26 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +43 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +2 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +10 -2
- package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-mentions.js +22 -7
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +3 -7
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +16 -6
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +6 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +35 -1
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +3 -7
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/compose.js +6 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.js +3 -26
- package/lib/types/dsh-adapter/channel/emitter.js +1 -1
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +8 -0
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-actions.js +59 -5
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +3 -7
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +21 -8
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mentions.js +21 -7
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +4 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +26 -9
- package/lib/types/dsh-adapter/channel/model-selection.d.ts +27 -2
- package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-selection.js +81 -37
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/paths.js +11 -9
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +6 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +3 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +10 -3
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +9 -3
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +11 -5
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +6 -3
- package/lib/types/dsh-adapter/channel/transcript.d.ts +3 -2
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +13 -4
- package/lib/types/dsh-adapter/channel/types.d.ts +11 -2
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.d.ts +27 -3
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +47 -5
- package/lib/types/dsh-adapter/entry-slot.d.ts +6 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -1
- package/lib/types/dsh-adapter/experimental-bundles.d.ts +3 -0
- package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/experimental-bundles.js +4 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts +1 -1
- package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -1
- package/lib/types/dsh-adapter/fresh-agent.js +60 -11
- package/lib/types/dsh-adapter/grant-file.d.ts +70 -0
- package/lib/types/dsh-adapter/grant-file.d.ts.map +1 -0
- package/lib/types/dsh-adapter/grant-file.js +178 -0
- package/lib/types/dsh-adapter/host-access.d.ts +4 -0
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-access.js +114 -15
- package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
- package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-contract.js +5 -3
- package/lib/types/dsh-adapter/host-dsh.d.ts +0 -8
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-dsh.js +27 -6
- package/lib/types/dsh-adapter/host-entry.js +4 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +8 -5
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/profiles.js +14 -1
- package/lib/types/dsh-adapter/panels.d.ts +7 -1
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-declaration.d.ts +28 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-declaration.js +43 -1
- package/lib/types/dsh-adapter/plugin-install.d.ts +28 -1
- package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-install.js +160 -13
- package/lib/types/dsh-adapter/plugin-manage.d.ts +53 -10
- package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-manage.js +240 -51
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +203 -58
- package/lib/types/dsh-adapter/plugins-info.d.ts +6 -7
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +34 -21
- package/lib/types/dsh-adapter/presets.d.ts +41 -10
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +59 -12
- package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
- package/lib/types/dsh-adapter/process-exit.js +1 -1
- package/lib/types/dsh-adapter/providerWizard.d.ts +2 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +11 -5
- package/lib/types/dsh-adapter/questions.d.ts +3 -4
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +1 -1
- package/lib/types/dsh-adapter/row-attachment.d.ts +30 -0
- package/lib/types/dsh-adapter/row-attachment.d.ts.map +1 -0
- package/lib/types/dsh-adapter/row-attachment.js +29 -0
- package/lib/types/dsh-adapter/session-list-metadata.js +2 -2
- package/lib/types/dsh-adapter/subagents.d.ts +5 -0
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +22 -1
- package/lib/types/dsh-adapter/team-mode.d.ts +17 -10
- package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
- package/lib/types/dsh-adapter/team-mode.js +19 -12
- package/lib/types/dsh-adapter/tool-scope.d.ts +24 -0
- package/lib/types/dsh-adapter/tool-scope.d.ts.map +1 -0
- package/lib/types/dsh-adapter/tool-scope.js +127 -0
- package/lib/types/dsh-adapter/types.d.ts +2 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/worktree-tool.d.ts +27 -0
- package/lib/types/dsh-adapter/worktree-tool.d.ts.map +1 -0
- package/lib/types/dsh-adapter/worktree-tool.js +87 -0
- package/lib/types/heldInputs.d.ts +75 -0
- package/lib/types/heldInputs.d.ts.map +1 -0
- package/lib/types/heldInputs.js +409 -0
- package/lib/types/i18n.d.ts +577 -34
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +230 -22
- package/lib/types/ink/components/App.d.ts +2 -0
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +8 -0
- package/lib/types/ink/events/input-event.d.ts.map +1 -1
- package/lib/types/ink/events/input-event.js +7 -6
- package/lib/types/ink/hit-test.d.ts +2 -0
- package/lib/types/ink/hit-test.d.ts.map +1 -1
- package/lib/types/ink/hit-test.js +10 -0
- package/lib/types/ink/hooks/use-program-status.d.ts +1 -1
- package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-program-status.js +3 -2
- package/lib/types/ink/ink.d.ts +1 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +5 -2
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +25 -0
- package/lib/types/ink/terminal.d.ts +13 -2
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +29 -5
- package/lib/types/onboardingDraft.d.ts +143 -0
- package/lib/types/onboardingDraft.d.ts.map +1 -0
- package/lib/types/onboardingDraft.js +71 -0
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +133 -32
- package/lib/types/screens/Onboarding.d.ts +22 -3
- package/lib/types/screens/Onboarding.d.ts.map +1 -1
- package/lib/types/screens/Onboarding.js +606 -36
- package/lib/types/screens/SessionSupervisor.d.ts +3 -6
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +5 -8
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +1 -2
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +2 -2
- package/lib/types/screens/sessionSupervisor/model.d.ts +1 -1
- package/lib/types/screens/sessionSupervisor/model.js +1 -1
- package/lib/types/sessionMounts.d.ts +12 -5
- package/lib/types/sessionMounts.d.ts.map +1 -1
- package/lib/types/sessionMounts.js +33 -6
- package/lib/types/settings/definitions.js +2 -2
- package/lib/types/update.d.ts +412 -20
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +2094 -193
- package/lib/types/updateHost.d.ts +198 -0
- package/lib/types/updateHost.d.ts.map +1 -0
- package/lib/types/updateHost.js +608 -0
- package/lib/types/utils/paths.d.ts +15 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +25 -0
- package/lib/types/utils/processName.d.ts +16 -0
- package/lib/types/utils/processName.d.ts.map +1 -0
- package/lib/types/utils/processName.js +27 -0
- package/package.json +114 -108
- package/tui-profile/feed/README.md +1 -1
- package/tui-profile/feed/first-party.json +1 -1
|
@@ -72,12 +72,9 @@ export declare function SessionSupervisor({ channel, home, onClose, onOpenSessio
|
|
|
72
72
|
* directly. It used to be offset by the `+` row that led the rail, which is
|
|
73
73
|
* gone — a workspace joins the ledger by being a terminal's launch directory.
|
|
74
74
|
*
|
|
75
|
-
* `capacity`
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* entries made the window believe it could show twice as many workspaces as it
|
|
79
|
-
* can, and the focused entry was simply clipped away by `overflow="hidden"`
|
|
80
|
-
* while the user navigated it blind.
|
|
75
|
+
* `capacity` counts entries after accounting for {@link WORKSPACE_ROW_LINES}.
|
|
76
|
+
* Previously, two-line entries were budgeted as one terminal row, clipping
|
|
77
|
+
* the focused workspace out of the viewport.
|
|
81
78
|
*/
|
|
82
79
|
export declare function railWindowTop(focus: number, entryCount: number, capacity: number): number;
|
|
83
80
|
/** Re-exported so a regression can drive the spinner without importing ink. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionSupervisor.d.ts","sourceRoot":"","sources":["../../../src/screens/SessionSupervisor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAahF,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C,SAAS,CAAC,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,uBAAuB,GAAG,IAAI,CAAA;IACnF;;;;OAIG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAAA;CAChE,GAAG,KAAK,CAAC,SAAS,CAk3BlB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOzF;AAED,+EAA+E;AAC/E,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -501,14 +501,14 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
501
501
|
const next = { col: event.col, row: event.row, item: 0 };
|
|
502
502
|
tabMenuRef.current = next;
|
|
503
503
|
setTabMenu(next);
|
|
504
|
-
} }) }))] }), _jsx(Divider, { bleed: true }), pathRows > 0 && (_jsx(Box, { flexDirection: "column", flexShrink: 0, paddingX: 1, ...pathTooltip, children: pathLines.map((line, index) => _jsx(Text, { dimColor: true, children: line }, index)) })), tab !== DSH_TAB && (_jsx(ForeignSessionPanes, { model: foreign, sourceLabel: activeSource?.label ?? tab,
|
|
504
|
+
} }) }))] }), _jsx(Divider, { bleed: true }), pathRows > 0 && (_jsx(Box, { flexDirection: "column", flexShrink: 0, paddingX: 1, ...pathTooltip, children: pathLines.map((line, index) => _jsx(Text, { dimColor: true, children: line }, index)) })), tab !== DSH_TAB && (_jsx(ForeignSessionPanes, { model: foreign, sourceLabel: activeSource?.label ?? tab, now: now, query: query, notice: notice, railVisible: railVisible, railWidth: railWidth, railEntryCapacity: visibleRailCapacity, sessionWidth: sessionWidth, rows: rows - pathRows, isTerminalFocused: isTerminalFocused, filterFocused: filterFocused, cursorActive: cursorActive, onFilterFocus: setFilterFocused })), tab === DSH_TAB && (_jsxs(Box, { flexDirection: "row", flexGrow: 1, flexShrink: 1, overflow: "hidden", children: [railVisible && (_jsxs("ink-box", { style: { flexDirection: 'column', width: railWidth, height: '100%', flexShrink: 0, overflow: 'hidden' }, onClick: focusRail, onMouseEnter: focusRail, onWheel: (event) => {
|
|
505
505
|
setFilterFocused(false);
|
|
506
506
|
moveRail(event.deltaY >= 0 ? 1 : -1);
|
|
507
507
|
}, children: [_jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", paddingX: 1, children: _jsx(Text, { dimColor: true, children: truncateWidth(railEntries.length === entries.length
|
|
508
508
|
? t('home-section-workspaces', { n: entries.length })
|
|
509
509
|
: t('supervisor-workspace-groups', { registered: entries.length, history: railEntries.length - entries.length }), railWidth - 2) }) }), !loading && railEntries.length === 0 && (_jsx(Box, { paddingX: 1, children: _jsx(Text, { dimColor: true, italic: true, wrap: "truncate-end", children: truncateWidth(t('home-no-workspaces'), railWidth - 2) }) })), visibleRailRows.map((entry) => {
|
|
510
510
|
const absolute = railEntries.indexOf(entry);
|
|
511
|
-
return (_jsx(HomeWorkspaceRow, { title: entry.title,
|
|
511
|
+
return (_jsx(HomeWorkspaceRow, { title: entry.title, sessionCount: countOf(entry), historyOnly: entry.from === 'unregistered', present: entry.present, selected: selected !== undefined && selected.id === entry.id, focused: activePane === 'rail' && railFocus === absolute, declareCursor: cursorActive && !searchCursor, width: railWidth, onSelect: (event) => {
|
|
512
512
|
event.stopImmediatePropagation();
|
|
513
513
|
setFilterFocused(false);
|
|
514
514
|
railRef.current = absolute;
|
|
@@ -586,12 +586,9 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
|
|
|
586
586
|
* directly. It used to be offset by the `+` row that led the rail, which is
|
|
587
587
|
* gone — a workspace joins the ledger by being a terminal's launch directory.
|
|
588
588
|
*
|
|
589
|
-
* `capacity`
|
|
590
|
-
*
|
|
591
|
-
*
|
|
592
|
-
* entries made the window believe it could show twice as many workspaces as it
|
|
593
|
-
* can, and the focused entry was simply clipped away by `overflow="hidden"`
|
|
594
|
-
* while the user navigated it blind.
|
|
589
|
+
* `capacity` counts entries after accounting for {@link WORKSPACE_ROW_LINES}.
|
|
590
|
+
* Previously, two-line entries were budgeted as one terminal row, clipping
|
|
591
|
+
* the focused workspace out of the viewport.
|
|
595
592
|
*/
|
|
596
593
|
export function railWindowTop(focus, entryCount, capacity) {
|
|
597
594
|
const entries = Math.max(1, capacity);
|
|
@@ -25,11 +25,10 @@ export declare function windowTop(focus: number, total: number, capacity: number
|
|
|
25
25
|
* no workspace menu (the rail is derived, not a ledger), no new-session card,
|
|
26
26
|
* no live state and no pins.
|
|
27
27
|
*/
|
|
28
|
-
export declare function ForeignSessionPanes({ model, sourceLabel,
|
|
28
|
+
export declare function ForeignSessionPanes({ model, sourceLabel, now, query, notice, railVisible, railWidth, railEntryCapacity, sessionWidth, rows, isTerminalFocused, filterFocused, cursorActive, onFilterFocus, }: {
|
|
29
29
|
model: ForeignSessionsModel;
|
|
30
30
|
/** The active source's display name. */
|
|
31
31
|
sourceLabel: string;
|
|
32
|
-
home: string;
|
|
33
32
|
now: number;
|
|
34
33
|
query: string;
|
|
35
34
|
notice: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForeignSessionPanes.d.ts","sourceRoot":"","sources":["../../../../src/screens/sessionSupervisor/ForeignSessionPanes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAEnE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIhF;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"ForeignSessionPanes.d.ts","sourceRoot":"","sources":["../../../../src/screens/sessionSupervisor/ForeignSessionPanes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAEnE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIhF;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,WAAW,EACX,GAAG,EACH,KAAK,EACL,MAAM,EACN,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,IAAI,EACJ,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,aAAa,GACd,EAAE;IACD,KAAK,EAAE,oBAAoB,CAAA;IAC3B,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,SAAS,CAAA;IAC5D,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,iBAAiB,EAAE,MAAM,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,iBAAiB,EAAE,OAAO,CAAA;IAC1B,aAAa,EAAE,OAAO,CAAA;IACtB,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CACtC,GAAG,KAAK,CAAC,SAAS,CA+JlB"}
|
|
@@ -36,7 +36,7 @@ export function windowTop(focus, total, capacity) {
|
|
|
36
36
|
* no workspace menu (the rail is derived, not a ledger), no new-session card,
|
|
37
37
|
* no live state and no pins.
|
|
38
38
|
*/
|
|
39
|
-
export function ForeignSessionPanes({ model, sourceLabel,
|
|
39
|
+
export function ForeignSessionPanes({ model, sourceLabel, now, query, notice, railVisible, railWidth, railEntryCapacity, sessionWidth, rows, isTerminalFocused, filterFocused, cursorActive, onFilterFocus, }) {
|
|
40
40
|
const { groups, selected, railFocus, visibleRows, rowIndex, pane, loading } = model;
|
|
41
41
|
const searchCursor = filterFocused || (!railVisible && pane === 'rail') || (pane === 'list' && visibleRows.length === 0);
|
|
42
42
|
const activateRail = () => {
|
|
@@ -61,7 +61,7 @@ export function ForeignSessionPanes({ model, sourceLabel, home, now, query, noti
|
|
|
61
61
|
model.moveRail(event.deltaY >= 0 ? 1 : -1);
|
|
62
62
|
}, children: [_jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", paddingX: 1, children: _jsx(Text, { dimColor: true, children: truncateWidth(t('home-section-workspaces', { n: groups.length }), railWidth - 2) }) }), !loading && groups.length === 0 && (_jsx(Box, { paddingX: 1, children: _jsx(Text, { dimColor: true, italic: true, wrap: "truncate-end", children: truncateWidth(t('supervisor-foreign-empty', { source: sourceLabel }), railWidth - 2) }) })), railRows.map((group) => {
|
|
63
63
|
const absolute = groups.indexOf(group);
|
|
64
|
-
return (_jsx(HomeWorkspaceRow, { title: group.title,
|
|
64
|
+
return (_jsx(HomeWorkspaceRow, { title: group.title, sessionCount: group.rows.length, present: group.present, selected: selected?.key === group.key, focused: pane === 'rail' && railFocus === absolute, declareCursor: cursorActive && !searchCursor, width: railWidth, onSelect: (event) => {
|
|
65
65
|
event.stopImmediatePropagation();
|
|
66
66
|
onFilterFocus(false);
|
|
67
67
|
model.selectGroup(group);
|
|
@@ -18,7 +18,7 @@ import type { TuiWorkspaceEntry } from '../../workspaces.js';
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const RAIL_CHROME_ROWS = 4;
|
|
20
20
|
/** Terminal rows one rail entry occupies; see {@link HomeWorkspaceRow}. */
|
|
21
|
-
export declare const WORKSPACE_ROW_LINES =
|
|
21
|
+
export declare const WORKSPACE_ROW_LINES = 1;
|
|
22
22
|
/** Width the rail gets when the terminal is wide enough to show both panes. */
|
|
23
23
|
export declare const RAIL_MIN_TOTAL_COLUMNS = 84;
|
|
24
24
|
export declare const RAIL_WIDTH_MIN = 24;
|
|
@@ -20,7 +20,7 @@ import { stringWidth } from '../../ink/stringWidth.js';
|
|
|
20
20
|
*/
|
|
21
21
|
export const RAIL_CHROME_ROWS = 4;
|
|
22
22
|
/** Terminal rows one rail entry occupies; see {@link HomeWorkspaceRow}. */
|
|
23
|
-
export const WORKSPACE_ROW_LINES =
|
|
23
|
+
export const WORKSPACE_ROW_LINES = 1;
|
|
24
24
|
/** Width the rail gets when the terminal is wide enough to show both panes. */
|
|
25
25
|
export const RAIL_MIN_TOTAL_COLUMNS = 84;
|
|
26
26
|
export const RAIL_WIDTH_MIN = 24;
|
|
@@ -11,12 +11,15 @@
|
|
|
11
11
|
* the set of sessions it has mounted, and a reader that sees a foreign entry
|
|
12
12
|
* treats the session as OCCUPIED and refuses to mount it.
|
|
13
13
|
*
|
|
14
|
-
* Liveness
|
|
15
|
-
* a `kill -9`.
|
|
14
|
+
* Liveness starts with `process.kill(pid, 0)`: it catches a clean exit and
|
|
15
|
+
* a `kill -9`. On Linux, a surviving id must not be a non-leader thread: a TUI
|
|
16
|
+
* publishes its process id (TGID), but kill also accepts a recycled thread id.
|
|
17
|
+
* There is no heartbeat timestamp, because a timestamp only stays
|
|
16
18
|
* truthful while a timer keeps refreshing it, and the process that cannot
|
|
17
19
|
* refresh it is exactly the one whose record should expire. The cost is pid
|
|
18
|
-
* REUSE — a recycled
|
|
19
|
-
* refusing a session that is in fact free
|
|
20
|
+
* REUSE — a recycled process id can keep a dead owner's record alive — which
|
|
21
|
+
* errs toward refusing a session that is in fact free until that process exits;
|
|
22
|
+
* the opposite
|
|
20
23
|
* error interleaves two writers into one transcript. This is a same-machine
|
|
21
24
|
* guard only: the host's own session write lock stays the authority that
|
|
22
25
|
* actually separates writers.
|
|
@@ -114,7 +117,11 @@ export type MountClaim = {
|
|
|
114
117
|
/**
|
|
115
118
|
* Whether a process id is still alive. `process.kill(pid, 0)` sends no signal
|
|
116
119
|
* and throws `ESRCH` when the process is gone; `EPERM` means it exists but is
|
|
117
|
-
* owned by another user, which still counts as alive here.
|
|
120
|
+
* owned by another user, which still counts as alive here. Linux also accepts
|
|
121
|
+
* non-leader thread ids, which cannot own a TUI record: Node's process.pid is
|
|
122
|
+
* the thread group id. Only a readable, valid, different TGID disproves that
|
|
123
|
+
* identity, after confirming proc uses our PID namespace. Missing or unreadable
|
|
124
|
+
* proc information must preserve the owner.
|
|
118
125
|
*/
|
|
119
126
|
export declare function pidAlive(pid: number): boolean;
|
|
120
127
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionMounts.d.ts","sourceRoot":"","sources":["../../src/sessionMounts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sessionMounts.d.ts","sourceRoot":"","sources":["../../src/sessionMounts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAwCH,4EAA4E;AAC5E,MAAM,WAAW,iBAAiB;IAChC,qEAAqE;IACrE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,yEAAyE;IACzE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,qEAAqE;IACrE,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;CACvC;AAED,8DAA8D;AAC9D,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAE7D;AAED,uDAAuD;AACvD,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,M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AE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAA;CAAE,GAC7D,YAAY,CAAA;AAEhB;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAwBrF"}
|
|
@@ -11,12 +11,15 @@
|
|
|
11
11
|
* the set of sessions it has mounted, and a reader that sees a foreign entry
|
|
12
12
|
* treats the session as OCCUPIED and refuses to mount it.
|
|
13
13
|
*
|
|
14
|
-
* Liveness
|
|
15
|
-
* a `kill -9`.
|
|
14
|
+
* Liveness starts with `process.kill(pid, 0)`: it catches a clean exit and
|
|
15
|
+
* a `kill -9`. On Linux, a surviving id must not be a non-leader thread: a TUI
|
|
16
|
+
* publishes its process id (TGID), but kill also accepts a recycled thread id.
|
|
17
|
+
* There is no heartbeat timestamp, because a timestamp only stays
|
|
16
18
|
* truthful while a timer keeps refreshing it, and the process that cannot
|
|
17
19
|
* refresh it is exactly the one whose record should expire. The cost is pid
|
|
18
|
-
* REUSE — a recycled
|
|
19
|
-
* refusing a session that is in fact free
|
|
20
|
+
* REUSE — a recycled process id can keep a dead owner's record alive — which
|
|
21
|
+
* errs toward refusing a session that is in fact free until that process exits;
|
|
22
|
+
* the opposite
|
|
20
23
|
* error interleaves two writers into one transcript. This is a same-machine
|
|
21
24
|
* guard only: the host's own session write lock stays the authority that
|
|
22
25
|
* actually separates writers.
|
|
@@ -74,7 +77,11 @@ const EMPTY = { kind: 'free' };
|
|
|
74
77
|
/**
|
|
75
78
|
* Whether a process id is still alive. `process.kill(pid, 0)` sends no signal
|
|
76
79
|
* and throws `ESRCH` when the process is gone; `EPERM` means it exists but is
|
|
77
|
-
* owned by another user, which still counts as alive here.
|
|
80
|
+
* owned by another user, which still counts as alive here. Linux also accepts
|
|
81
|
+
* non-leader thread ids, which cannot own a TUI record: Node's process.pid is
|
|
82
|
+
* the thread group id. Only a readable, valid, different TGID disproves that
|
|
83
|
+
* identity, after confirming proc uses our PID namespace. Missing or unreadable
|
|
84
|
+
* proc information must preserve the owner.
|
|
78
85
|
*/
|
|
79
86
|
export function pidAlive(pid) {
|
|
80
87
|
if (!Number.isInteger(pid) || pid <= 0)
|
|
@@ -83,11 +90,31 @@ export function pidAlive(pid) {
|
|
|
83
90
|
return true;
|
|
84
91
|
try {
|
|
85
92
|
process.kill(pid, 0);
|
|
86
|
-
return true;
|
|
87
93
|
}
|
|
88
94
|
catch (error) {
|
|
89
95
|
return hasCode(error, 'EPERM');
|
|
90
96
|
}
|
|
97
|
+
if (process.platform === 'linux') {
|
|
98
|
+
try {
|
|
99
|
+
// A proc mount from another PID namespace may use different ids from
|
|
100
|
+
// process.kill. Do not compare its thread identities with our pids.
|
|
101
|
+
const selfStatus = readFileSync('/proc/self/status', 'utf8');
|
|
102
|
+
const selfTgid = Number(/^Tgid:[\t ]+([1-9]\d*)[\t ]*$/m.exec(selfStatus)?.[1]);
|
|
103
|
+
// NStgid lists ids from the proc mount's namespace inward. Require one
|
|
104
|
+
// id: equal numbers in two namespaces still do not prove equal views.
|
|
105
|
+
const namespaceTgid = Number(/^NStgid:[\t ]+([1-9]\d*)[\t ]*$/m.exec(selfStatus)?.[1]);
|
|
106
|
+
if (selfTgid !== process.pid || namespaceTgid !== process.pid)
|
|
107
|
+
return true;
|
|
108
|
+
const status = readFileSync(`/proc/${pid}/status`, 'utf8');
|
|
109
|
+
const tgid = Number(/^Tgid:[\t ]+([1-9]\d*)[\t ]*$/m.exec(status)?.[1]);
|
|
110
|
+
if (Number.isSafeInteger(tgid) && tgid > 0 && tgid !== pid)
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
// An unavailable identity witness is not evidence that an owner is gone.
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return true;
|
|
91
118
|
}
|
|
92
119
|
/** Parse one record, or undefined when the shape is wrong. */
|
|
93
120
|
function parseOwner(value) {
|
|
@@ -502,8 +502,8 @@ export const SETTING_DEFINITIONS = {
|
|
|
502
502
|
label: 'Tool background',
|
|
503
503
|
descriptions: { zh: '工具卡背景' },
|
|
504
504
|
group: 'appearance',
|
|
505
|
-
hint: 'Choose whether tool-call cards add no, subtle, or strong background emphasis.',
|
|
506
|
-
hintDescriptions: { zh: '
|
|
505
|
+
hint: 'Choose whether tool-call cards add no, subtle, or strong background emphasis; also applies when expanded.',
|
|
506
|
+
hintDescriptions: { zh: '选择工具调用卡片不添加、轻微或明显的背景强调;展开后也生效。' },
|
|
507
507
|
kind: 'select',
|
|
508
508
|
options: [
|
|
509
509
|
{ value: 'none', label: 'None', descriptions: { zh: '无' } },
|