Compare commits

..
Author SHA1 Message Date
陈大猫 8f8b7458d2 fix(terminal): keep Shift+Insert as paste when Kitty keyboard is active
Related #4279
2026-11-20 15:25:45 +08:00
6 changed files with 10 additions and 20 deletions

No files matched your search

-1
View File
@@ -550,7 +550,6 @@ 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,7 +40,6 @@ 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;
@@ -367,9 +366,7 @@ function SettingsAppearanceTab(props: {
{renderThemeSwatches(visibleUiThemes, visibleUiThemeId, setVisibleUiThemeId)}
</div>
</SettingsAnchor>
{props.pluginRuntimeAvailable && (
<PluginThemePicker mode={resolvedTheme} onRestore={() => (resolvedTheme === "dark" ? setDarkUiThemeId : setLightUiThemeId)(resolvedTheme === "dark" ? "midnight" : "snow")} />
)}
<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,12 +1,6 @@
"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 {}
};
+8 -7
View File
@@ -5,15 +5,16 @@ const test = require("node:test");
const { startPluginHost } = require("./hostBootstrap.cjs");
test("default startup leaves the plugin host and stored plugin data untouched", () => {
const effects = [];
test("normal release constructs the browser plugin host without a developer flag", async () => {
let created = 0;
const service = { manager: { async initialize() {}, async shutdown() {} } };
assert.equal(startPluginHost({
env: {},
createService() { effects.push("create"); },
registerShutdown() { effects.push("register"); },
logger: { error() { effects.push("error"); } },
}), null);
assert.deepEqual(effects, []);
createService() { created += 1; return service; },
registerShutdown() {},
logger: { error() {} },
}), service);
assert.equal(created, 1);
});
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);
});
handlePassive(CHANNELS.themeCatalog, null, async () => {
handle(CHANNELS.themeCatalog, async () => {
if (!options.themeService) throw new Error("Plugin themes are unavailable");
return options.themeService.catalog();
});
-1
View File
@@ -53,7 +53,6 @@ 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)({}, {}), {