Compare commits

..
Author SHA1 Message Date
陈大猫 5b9d5351d7 fix(release): hide the plugin platform by default 2026-11-21 10:31:43 +08:00
陈大猫 ed9da31034 fix(terminal): keep Shift+Insert as paste when Kitty keyboard is active
Related #4279

When a TUI such as Claude Code enables the Kitty keyboard protocol, Shift+Insert was encoded as an Insert key (CSI 2;2~) instead of pasting. Netcatty always constructs xterm with Kitty support, so this happened even with the user Kitty setting off.

This claims bare Shift+Insert as clipboard paste (the same onPaste path as the paste keybinding) after user/snippet shortcuts and before Kitty/Win32 encoding.

This does not change right-click / context-menu behavior while mouse tracking is active.
2026-11-20 15:53:40 +08:00
6 changed files with 20 additions and 10 deletions

No files matched your search

+1
View File
@@ -550,6 +550,7 @@ const SettingsPageContent: React.FC<{ settings: SettingsState; appLock?: AppLock
{mountedTabs.has("appearance") && (
<SettingsLazyTab value="appearance">
<LazySettingsAppearanceTab
pluginRuntimeAvailable={pluginRuntimeAvailable}
theme={settings.theme}
resolvedTheme={settings.resolvedTheme}
setTheme={settings.setTheme}
@@ -40,6 +40,7 @@ const CUSTOM_CSS_HELP_PROSE_CLASS =
"text-xs text-foreground/90 leading-relaxed [&>*:first-child]:mt-0 [&>*:last-child]:mb-0";
function SettingsAppearanceTab(props: {
pluginRuntimeAvailable: boolean;
theme: "dark" | "light" | "system";
resolvedTheme: "dark" | "light";
setTheme: (theme: "dark" | "light" | "system") => void;
@@ -366,7 +367,9 @@ function SettingsAppearanceTab(props: {
{renderThemeSwatches(visibleUiThemes, visibleUiThemeId, setVisibleUiThemeId)}
</div>
</SettingsAnchor>
<PluginThemePicker mode={resolvedTheme} onRestore={() => (resolvedTheme === "dark" ? setDarkUiThemeId : setLightUiThemeId)(resolvedTheme === "dark" ? "midnight" : "snow")} />
{props.pluginRuntimeAvailable && (
<PluginThemePicker mode={resolvedTheme} onRestore={() => (resolvedTheme === "dark" ? setDarkUiThemeId : setLightUiThemeId)(resolvedTheme === "dark" ? "midnight" : "snow")} />
)}
{pluginThemeError && <p role="alert" className="text-xs text-destructive">{pluginThemeError}</p>}
<SettingRow
anchorId="appearance-accent-mode"
+6
View File
@@ -1,6 +1,12 @@
"use strict";
const { isPluginDevelopmentEnabled } = require("./constants.cjs");
function startPluginHost(options) {
// The plugin platform is not shipping in this release. Keep its data
// untouched and allow existing developer workflows to opt in as before.
if (!isPluginDevelopmentEnabled(options.env)) return null;
const reportFailure = (message, error) => {
try { options.logger?.error?.(message, error); } catch {}
};
+7 -8
View File
@@ -5,16 +5,15 @@ const test = require("node:test");
const { startPluginHost } = require("./hostBootstrap.cjs");
test("normal release constructs the browser plugin host without a developer flag", async () => {
let created = 0;
const service = { manager: { async initialize() {}, async shutdown() {} } };
test("default startup leaves the plugin host and stored plugin data untouched", () => {
const effects = [];
assert.equal(startPluginHost({
env: {},
createService() { created += 1; return service; },
registerShutdown() {},
logger: { error() {} },
}), service);
assert.equal(created, 1);
createService() { effects.push("create"); },
registerShutdown() { effects.push("register"); },
logger: { error() { effects.push("error"); } },
}), null);
assert.deepEqual(effects, []);
});
test("synchronous plugin host construction failure leaves Netcatty available", () => {
+1 -1
View File
@@ -804,7 +804,7 @@ function registerPluginBridge(ipcMain, options) {
if (!options.interactionService) throw new Error("Host interactions unavailable");
return options.interactionService.setTerminalTarget(event.sender, target);
});
handle(CHANNELS.themeCatalog, async () => {
handlePassive(CHANNELS.themeCatalog, null, async () => {
if (!options.themeService) throw new Error("Plugin themes are unavailable");
return options.themeService.catalog();
});
+1
View File
@@ -53,6 +53,7 @@ test("disabled plugin runtime keeps passive host integration channels quiet", as
assert.deepEqual(await ipcMain.handlers.get(CHANNELS.terminalProviders)({}, {}), []);
assert.deepEqual(await ipcMain.handlers.get(CHANNELS.terminalSessionEvent)({}, {}), []);
assert.deepEqual(await ipcMain.handlers.get(CHANNELS.extensionProviders)({}, {}), []);
assert.equal(await ipcMain.handlers.get(CHANNELS.themeCatalog)({}), null);
assert.equal(await ipcMain.handlers.get(CHANNELS.credentialCatalogUpdate)({}, { entries: [] }), 0);
assert.equal(await ipcMain.handlers.get(CHANNELS.setScopeCatalog)({}, {}), null);
assert.deepEqual(await ipcMain.handlers.get(CHANNELS.getScopeCatalog)({}, {}), {