Skip to content

Commit

Permalink
fix: inline chat lower level than findwidget (#4251)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricbet authored Dec 20, 2024
1 parent 47aace4 commit cf44454
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback, useEffect, useMemo, useState } from 'react';

import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
import { IAIInlineChatService, StackingLevelStr, useInjectable } from '@opensumi/ide-core-browser';
import { IAIInlineChatService, StackingLevel, useInjectable } from '@opensumi/ide-core-browser';
import { AIAction } from '@opensumi/ide-core-browser/lib/components/ai-native';
import { InteractiveInput } from '@opensumi/ide-core-browser/lib/components/ai-native/interactive-input/index';
import { MenuNode } from '@opensumi/ide-core-browser/lib/menu/next/base';
Expand Down Expand Up @@ -261,7 +261,7 @@ export class AIInlineContentWidget extends ReactInlineContentWidget {
override getDomNode(): HTMLElement {
const domNode = super.getDomNode();
requestAnimationFrame(() => {
domNode.style.zIndex = StackingLevelStr.OverlayTop;
domNode.style.zIndex = (StackingLevel.FindWidget - 1).toString();
});
return domNode;
}
Expand Down
5 changes: 5 additions & 0 deletions packages/core-browser/src/design/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ export const StackingLevel = Object.freeze({

EditorFloatingContainer: 20,

/**
* Find 控件的 zIndex 是 25
*/
FindWidget: 25,

// #region 中级弹窗区域
Popup: 100,
// #endregion
Expand Down

0 comments on commit cf44454

Please sign in to comment.