@opensumi/ide-core-browser 3.1.2 → 3.1.3-next-1718964817.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.
Files changed (52) hide show
  1. package/lib/bootstrap/app.d.ts +0 -1
  2. package/lib/bootstrap/app.d.ts.map +1 -1
  3. package/lib/bootstrap/app.js +3 -14
  4. package/lib/bootstrap/app.js.map +1 -1
  5. package/lib/bootstrap/connection.d.ts.map +1 -1
  6. package/lib/bootstrap/connection.js +3 -0
  7. package/lib/bootstrap/connection.js.map +1 -1
  8. package/lib/bootstrap/inner-providers.d.ts.map +1 -1
  9. package/lib/bootstrap/inner-providers.js +4 -0
  10. package/lib/bootstrap/inner-providers.js.map +1 -1
  11. package/lib/common/common.command.d.ts +4 -0
  12. package/lib/common/common.command.d.ts.map +1 -1
  13. package/lib/common/common.command.js +5 -0
  14. package/lib/common/common.command.js.map +1 -1
  15. package/lib/components/actions/index.d.ts.map +1 -1
  16. package/lib/components/actions/index.js +0 -32
  17. package/lib/components/actions/index.js.map +1 -1
  18. package/lib/components/ai-native/ai-action/index.d.ts +2 -2
  19. package/lib/components/ai-native/ai-action/index.d.ts.map +1 -1
  20. package/lib/components/ai-native/ai-action/index.js +3 -3
  21. package/lib/components/ai-native/ai-action/index.js.map +1 -1
  22. package/lib/components/ai-native/enhanceIcon/index.d.ts +1 -0
  23. package/lib/components/ai-native/enhanceIcon/index.d.ts.map +1 -1
  24. package/lib/components/ai-native/enhanceIcon/index.js +14 -7
  25. package/lib/components/ai-native/enhanceIcon/index.js.map +1 -1
  26. package/lib/components/ai-native/interactive-input/index.d.ts.map +1 -1
  27. package/lib/components/ai-native/interactive-input/index.js +6 -1
  28. package/lib/components/ai-native/interactive-input/index.js.map +1 -1
  29. package/lib/components/layout/split-panel.service.d.ts +0 -1
  30. package/lib/components/layout/split-panel.service.d.ts.map +1 -1
  31. package/lib/components/layout/split-panel.service.js +17 -8
  32. package/lib/components/layout/split-panel.service.js.map +1 -1
  33. package/lib/contextkey/ai-native.d.ts +2 -0
  34. package/lib/contextkey/ai-native.d.ts.map +1 -1
  35. package/lib/contextkey/ai-native.js +3 -1
  36. package/lib/contextkey/ai-native.js.map +1 -1
  37. package/lib/logger/browser-logger.d.ts +10 -6
  38. package/lib/logger/browser-logger.d.ts.map +1 -1
  39. package/lib/logger/browser-logger.js +15 -5
  40. package/lib/logger/browser-logger.js.map +1 -1
  41. package/package.json +5 -5
  42. package/src/bootstrap/app.ts +2 -16
  43. package/src/bootstrap/connection.ts +6 -0
  44. package/src/bootstrap/inner-providers.ts +4 -0
  45. package/src/common/common.command.ts +7 -0
  46. package/src/components/actions/index.tsx +1 -35
  47. package/src/components/ai-native/ai-action/index.tsx +5 -5
  48. package/src/components/ai-native/enhanceIcon/index.tsx +15 -8
  49. package/src/components/ai-native/interactive-input/index.tsx +7 -0
  50. package/src/components/layout/split-panel.service.ts +16 -5
  51. package/src/contextkey/ai-native.ts +2 -0
  52. package/src/logger/browser-logger.ts +21 -9
@@ -3,6 +3,8 @@ import React from 'react';
3
3
  import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
4
4
  import { Deferred, Disposable, IDisposable } from '@opensumi/ide-core-common';
5
5
 
6
+ import { RESIZE_LOCK } from '../resize/resize';
7
+
6
8
  import { SplitPanelProps } from './split-panel';
7
9
 
8
10
  export const ISplitPanelService = Symbol('ISplitPanelService');
@@ -23,7 +25,6 @@ export interface ISplitPanelService extends IDisposable {
23
25
 
24
26
  @Injectable({ multiple: true })
25
27
  export class SplitPanelService extends Disposable implements ISplitPanelService {
26
- private static MIN_SIZE = 120;
27
28
  constructor(protected readonly panelId: string) {
28
29
  super();
29
30
  }
@@ -50,20 +51,30 @@ export class SplitPanelService extends Disposable implements ISplitPanelService
50
51
  getFirstResizablePanel(index: number, direction: boolean, isPrev?: boolean): HTMLElement | undefined {
51
52
  if (isPrev) {
52
53
  if (direction) {
53
- return this.panels[index];
54
+ for (let i = index; i >= 0; i--) {
55
+ if (!this.panels[i].classList.contains(RESIZE_LOCK)) {
56
+ // 跳过无法调整的面板
57
+ return this.panels[i];
58
+ }
59
+ }
54
60
  } else {
55
61
  for (let i = index; i >= 0; i--) {
56
- if (this.panels[i].clientHeight > SplitPanelService.MIN_SIZE) {
62
+ if (!this.panels[i].classList.contains(RESIZE_LOCK)) {
57
63
  return this.panels[i];
58
64
  }
59
65
  }
60
66
  }
61
67
  } else {
62
68
  if (!direction) {
63
- return this.panels[index + 1];
69
+ for (let i = index + 1; i < this.panels.length; i++) {
70
+ if (!this.panels[i].classList.contains(RESIZE_LOCK)) {
71
+ // 跳过无法调整的面板
72
+ return this.panels[i];
73
+ }
74
+ }
64
75
  } else {
65
76
  for (let i = index + 1; i < this.panels.length; i++) {
66
- if (this.panels[i].clientHeight > SplitPanelService.MIN_SIZE) {
77
+ if (!this.panels[i].classList.contains(RESIZE_LOCK)) {
67
78
  return this.panels[i];
68
79
  }
69
80
  }
@@ -2,3 +2,5 @@ import { RawContextKey } from '../raw-context-key';
2
2
 
3
3
  export const InlineChatIsVisible = new RawContextKey('ai.native.inlineChatIsVisible', false);
4
4
  export const InlineCompletionIsTrigger = new RawContextKey('ai.native.inlineCompletionIsTrigger', false);
5
+ export const InlineHintWidgetIsVisible = new RawContextKey('ai.native.inlineHintWidgetIsVisible', false);
6
+ export const InlineInputWidgetIsVisible = new RawContextKey('ai.native.inlineInputWidgetIsVisible', false);
@@ -3,19 +3,15 @@ import { ILogServiceClient, ILoggerManagerClient, LogLevel, SupportLogNamespace
3
3
 
4
4
  export { ILogger } from '@opensumi/ide-core-common';
5
5
 
6
- @Injectable()
7
- export class Logger implements ILogServiceClient {
8
- @Autowired(ILoggerManagerClient)
9
- private LoggerManager: ILoggerManagerClient;
6
+ class LoggerWrapper implements ILogServiceClient {
7
+ protected logger: ILogServiceClient;
10
8
 
11
- private logger: ILogServiceClient;
12
-
13
- constructor() {
14
- this.logger = this.LoggerManager.getLogger(SupportLogNamespace.Browser);
9
+ setup(logger: ILogServiceClient) {
10
+ this.logger = logger;
15
11
  }
16
12
 
17
13
  public getLevel() {
18
- return this.getLevel();
14
+ return this.logger.getLevel();
19
15
  }
20
16
 
21
17
  public setLevel(level: LogLevel) {
@@ -49,3 +45,19 @@ export class Logger implements ILogServiceClient {
49
45
  return this.logger.dispose();
50
46
  }
51
47
  }
48
+
49
+ @Injectable()
50
+ export class Logger extends LoggerWrapper implements ILogServiceClient {
51
+ @Autowired(ILoggerManagerClient)
52
+ protected loggerManager: ILoggerManagerClient;
53
+
54
+ constructor() {
55
+ super();
56
+ this.logger = this.loggerManager.getBrowserLogger(SupportLogNamespace.Browser);
57
+ }
58
+
59
+ public reportToServer() {
60
+ this.logger.dispose();
61
+ this.logger = this.loggerManager.getLogger(SupportLogNamespace.Browser);
62
+ }
63
+ }