Skip to content

Commit

Permalink
fix: codefuse ide support web ide
Browse files Browse the repository at this point in the history
  • Loading branch information
weimin2.zhou committed Nov 8, 2024
1 parent d7142f9 commit 4b123dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core-browser/src/common/common.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export class ClientCommonContribution

constructor() {
const overridePropertiesDefault = {
'application.supportsOpenFolder': !!this.appConfig.isElectronRenderer && !this.appConfig.isRemote,
'application.supportsOpenWorkspace': !!this.appConfig.isElectronRenderer && !this.appConfig.isRemote,
'application.supportsOpenFolder': !this.appConfig.isRemote,
'application.supportsOpenWorkspace': !this.appConfig.isRemote,
'debug.toolbar.top': this.appConfig.isElectronRenderer ? 0 : this.layoutViewSize.menubarHeight,
};
const keys = Object.keys(this.schema.properties);
Expand Down
8 changes: 8 additions & 0 deletions packages/core-browser/src/keybinding/keybinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { ContextKeyExpression } from '@opensumi/monaco-editor-core/esm/vs/platfo
import { IContextKeyService } from '../context-key';
import { KeyboardLayoutService } from '../keyboard/keyboard-layout-service';
import { Key, KeyCode, KeySequence, SpecialCases } from '../keyboard/keys';
import { AppConfig } from '../react-providers/config-provider';
import { IStatusBarService, StatusBarAlignment } from '../services';

export enum KeybindingScope {
Expand Down Expand Up @@ -230,6 +231,9 @@ export class KeybindingRegistryImpl implements KeybindingRegistry, KeybindingSer
@Autowired(IStatusBarService)
protected readonly statusBar: IStatusBarService;

@Autowired(AppConfig)
private readonly appConfig: AppConfig;

public async initialize(): Promise<void> {
await this.keyboardLayoutService.initialize();
this.keyboardLayoutService.onKeyboardLayoutChanged(() => {
Expand Down Expand Up @@ -884,6 +888,10 @@ export class KeybindingRegistryImpl implements KeybindingRegistry, KeybindingSer
return false;
}
for (const binding of bindings) {
// 在web下electron绑定的浏览器基础快捷键无法使用,这里跳过,直接使用浏览器的快捷键
if (!this.appConfig.isElectronRenderer && binding.command.startsWith('electron.')) {
continue;
}
if (this.isEnabled(binding, event)) {
if (this.isPseudoCommand(binding.command)) {
// 让事件冒泡
Expand Down

0 comments on commit 4b123dc

Please sign in to comment.