@opensumi/ide-ai-native 3.9.1-next-1749538805.0 → 3.9.1-next-1749540423.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.
- package/lib/browser/ai-core.contribution.d.ts.map +1 -1
- package/lib/browser/ai-core.contribution.js +4 -9
- package/lib/browser/ai-core.contribution.js.map +1 -1
- package/lib/browser/chat/apply.service.d.ts +0 -3
- package/lib/browser/chat/apply.service.d.ts.map +1 -1
- package/lib/browser/chat/apply.service.js +0 -47
- package/lib/browser/chat/apply.service.js.map +1 -1
- package/lib/browser/chat/chat-manager.service.d.ts +0 -1
- package/lib/browser/chat/chat-manager.service.d.ts.map +1 -1
- package/lib/browser/chat/chat-manager.service.js +3 -9
- package/lib/browser/chat/chat-manager.service.js.map +1 -1
- package/lib/browser/chat/chat-model.d.ts +1 -8
- package/lib/browser/chat/chat-model.d.ts.map +1 -1
- package/lib/browser/chat/chat-model.js +76 -113
- package/lib/browser/chat/chat-model.js.map +1 -1
- package/lib/browser/chat/chat-proxy.service.d.ts +2 -0
- package/lib/browser/chat/chat-proxy.service.d.ts.map +1 -1
- package/lib/browser/chat/chat-proxy.service.js +57 -50
- package/lib/browser/chat/chat-proxy.service.js.map +1 -1
- package/lib/browser/chat/chat.feature.registry.d.ts +1 -4
- package/lib/browser/chat/chat.feature.registry.d.ts.map +1 -1
- package/lib/browser/chat/chat.feature.registry.js +0 -6
- package/lib/browser/chat/chat.feature.registry.js.map +1 -1
- package/lib/browser/chat/chat.view.d.ts.map +1 -1
- package/lib/browser/chat/chat.view.js +10 -50
- package/lib/browser/chat/chat.view.js.map +1 -1
- package/lib/browser/components/ChatEditor.js +2 -2
- package/lib/browser/components/ChatEditor.js.map +1 -1
- package/lib/browser/components/ChatHistory.d.ts.map +1 -1
- package/lib/browser/components/ChatHistory.js +1 -2
- package/lib/browser/components/ChatHistory.js.map +1 -1
- package/lib/browser/components/ChatMentionInput.d.ts.map +1 -1
- package/lib/browser/components/ChatMentionInput.js +30 -148
- package/lib/browser/components/ChatMentionInput.js.map +1 -1
- package/lib/browser/components/ChatReply.js +2 -2
- package/lib/browser/components/ChatReply.js.map +1 -1
- package/lib/browser/components/ChatToolRender.d.ts.map +1 -1
- package/lib/browser/components/ChatToolRender.js +2 -7
- package/lib/browser/components/ChatToolRender.js.map +1 -1
- package/lib/browser/components/ChatToolRender.module.less +0 -25
- package/lib/browser/components/components.module.less +8 -37
- package/lib/browser/components/mention-input/mention-input.d.ts.map +1 -1
- package/lib/browser/components/mention-input/mention-input.js +14 -150
- package/lib/browser/components/mention-input/mention-input.js.map +1 -1
- package/lib/browser/components/mention-input/mention-input.module.less +1 -165
- package/lib/browser/components/mention-input/types.d.ts +1 -28
- package/lib/browser/components/mention-input/types.d.ts.map +1 -1
- package/lib/browser/components/mention-input/types.js +0 -1
- package/lib/browser/components/mention-input/types.js.map +1 -1
- package/lib/browser/components/utils.d.ts +2 -2
- package/lib/browser/context/llm-context.service.d.ts +2 -21
- package/lib/browser/context/llm-context.service.d.ts.map +1 -1
- package/lib/browser/context/llm-context.service.js +20 -162
- package/lib/browser/context/llm-context.service.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/decoration/additions-deletions.decoration.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/decoration/additions-deletions.decoration.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/diff-computer.js +1 -1
- package/lib/browser/contrib/intelligent-completions/diff-computer.js.map +1 -1
- package/lib/browser/contrib/terminal/terminal.feature.registry.js.map +1 -1
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +0 -7
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/layout/ai-layout.d.ts.map +1 -1
- package/lib/browser/layout/ai-layout.js +4 -6
- package/lib/browser/layout/ai-layout.js.map +1 -1
- package/lib/browser/layout/tabbar.view.d.ts +1 -1
- package/lib/browser/layout/tabbar.view.d.ts.map +1 -1
- package/lib/browser/layout/tabbar.view.js +12 -5
- package/lib/browser/layout/tabbar.view.js.map +1 -1
- package/lib/browser/mcp/base-apply.service.d.ts +4 -5
- package/lib/browser/mcp/base-apply.service.d.ts.map +1 -1
- package/lib/browser/mcp/base-apply.service.js +5 -23
- package/lib/browser/mcp/base-apply.service.js.map +1 -1
- package/lib/browser/mcp/mcp-server-proxy.service.d.ts +1 -3
- package/lib/browser/mcp/mcp-server-proxy.service.d.ts.map +1 -1
- package/lib/browser/mcp/mcp-server-proxy.service.js +0 -4
- package/lib/browser/mcp/mcp-server-proxy.service.js.map +1 -1
- package/lib/browser/mcp/mcp-server.feature.registry.d.ts.map +1 -1
- package/lib/browser/mcp/mcp-server.feature.registry.js +1 -7
- package/lib/browser/mcp/mcp-server.feature.registry.js.map +1 -1
- package/lib/browser/mcp/tools/createNewFileWithText.d.ts +3 -1
- package/lib/browser/mcp/tools/createNewFileWithText.d.ts.map +1 -1
- package/lib/browser/mcp/tools/createNewFileWithText.js +40 -14
- package/lib/browser/mcp/tools/createNewFileWithText.js.map +1 -1
- package/lib/browser/mcp/tools/fileSearch.d.ts.map +1 -1
- package/lib/browser/mcp/tools/fileSearch.js +5 -9
- package/lib/browser/mcp/tools/fileSearch.js.map +1 -1
- package/lib/browser/mcp/tools/getDiagnosticsByPath.js.map +1 -1
- package/lib/browser/mcp/tools/getOpenEditorFileDiagnostics.js.map +1 -1
- package/lib/browser/mcp/tools/grepSearch.d.ts.map +1 -1
- package/lib/browser/mcp/tools/grepSearch.js +10 -22
- package/lib/browser/mcp/tools/grepSearch.js.map +1 -1
- package/lib/browser/mcp/tools/handlers/ListDir.js +1 -1
- package/lib/browser/mcp/tools/handlers/ListDir.js.map +1 -1
- package/lib/browser/mcp/tools/handlers/ReadFile.js +1 -1
- package/lib/browser/mcp/tools/handlers/ReadFile.js.map +1 -1
- package/lib/browser/mcp/tools/handlers/RunCommand.d.ts +1 -11
- package/lib/browser/mcp/tools/handlers/RunCommand.d.ts.map +1 -1
- package/lib/browser/mcp/tools/handlers/RunCommand.js +4 -11
- package/lib/browser/mcp/tools/handlers/RunCommand.js.map +1 -1
- package/lib/browser/mcp/tools/listDir.d.ts.map +1 -1
- package/lib/browser/mcp/tools/listDir.js +15 -19
- package/lib/browser/mcp/tools/listDir.js.map +1 -1
- package/lib/browser/mcp/tools/runTerminalCmd.js.map +1 -1
- package/lib/browser/model/msg-history-manager.d.ts +1 -47
- package/lib/browser/model/msg-history-manager.d.ts.map +1 -1
- package/lib/browser/model/msg-history-manager.js +2 -127
- package/lib/browser/model/msg-history-manager.js.map +1 -1
- package/lib/browser/preferences/schema.d.ts.map +1 -1
- package/lib/browser/preferences/schema.js +0 -5
- package/lib/browser/preferences/schema.js.map +1 -1
- package/lib/browser/types.d.ts +1 -12
- package/lib/browser/types.d.ts.map +1 -1
- package/lib/browser/types.js.map +1 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.component.d.ts.map +1 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.component.js.map +1 -1
- package/lib/common/index.d.ts +1 -5
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +0 -2
- package/lib/common/index.js.map +1 -1
- package/lib/common/llm-context.d.ts +0 -19
- package/lib/common/llm-context.d.ts.map +1 -1
- package/lib/common/llm-context.js.map +1 -1
- package/lib/common/model.d.ts +0 -1
- package/lib/common/model.d.ts.map +1 -1
- package/lib/common/model.js.map +1 -1
- package/lib/common/prompts/context-prompt-provider.d.ts +2 -0
- package/lib/common/prompts/context-prompt-provider.d.ts.map +1 -1
- package/lib/common/prompts/context-prompt-provider.js +29 -35
- package/lib/common/prompts/context-prompt-provider.js.map +1 -1
- package/lib/common/types.d.ts +0 -21
- package/lib/common/types.d.ts.map +1 -1
- package/lib/common/types.js.map +1 -1
- package/lib/common/utils.d.ts +0 -1
- package/lib/common/utils.d.ts.map +1 -1
- package/lib/common/utils.js +2 -5
- package/lib/common/utils.js.map +1 -1
- package/lib/node/anthropic/anthropic-language-model.d.ts +1 -1
- package/lib/node/base-language-model.d.ts +1 -2
- package/lib/node/base-language-model.d.ts.map +1 -1
- package/lib/node/base-language-model.js +2 -12
- package/lib/node/base-language-model.js.map +1 -1
- package/lib/node/deepseek/deepseek-language-model.d.ts +1 -1
- package/lib/node/mcp/sumi-mcp-server.d.ts +1 -3
- package/lib/node/mcp/sumi-mcp-server.d.ts.map +1 -1
- package/lib/node/mcp/sumi-mcp-server.js +1 -7
- package/lib/node/mcp/sumi-mcp-server.js.map +1 -1
- package/lib/node/mcp-server-manager-impl.d.ts +1 -3
- package/lib/node/mcp-server-manager-impl.d.ts.map +1 -1
- package/lib/node/mcp-server-manager-impl.js +2 -14
- package/lib/node/mcp-server-manager-impl.js.map +1 -1
- package/lib/node/mcp-server.sse.d.ts +1 -187
- package/lib/node/mcp-server.sse.d.ts.map +1 -1
- package/lib/node/mcp-server.sse.js +2 -2
- package/lib/node/mcp-server.sse.js.map +1 -1
- package/lib/node/mcp-server.stdio.d.ts +1 -187
- package/lib/node/mcp-server.stdio.d.ts.map +1 -1
- package/package.json +26 -27
- package/src/browser/ai-core.contribution.ts +4 -14
- package/src/browser/chat/apply.service.ts +1 -62
- package/src/browser/chat/chat-manager.service.ts +7 -16
- package/src/browser/chat/chat-model.ts +73 -130
- package/src/browser/chat/chat-proxy.service.ts +81 -68
- package/src/browser/chat/chat.feature.registry.ts +1 -17
- package/src/browser/chat/chat.view.tsx +12 -73
- package/src/browser/components/ChatEditor.tsx +1 -1
- package/src/browser/components/ChatHistory.tsx +1 -2
- package/src/browser/components/ChatMentionInput.tsx +35 -180
- package/src/browser/components/ChatReply.tsx +4 -4
- package/src/browser/components/ChatToolRender.module.less +0 -25
- package/src/browser/components/ChatToolRender.tsx +2 -10
- package/src/browser/components/components.module.less +8 -37
- package/src/browser/components/mention-input/mention-input.module.less +1 -165
- package/src/browser/components/mention-input/mention-input.tsx +31 -232
- package/src/browser/components/mention-input/types.ts +0 -29
- package/src/browser/context/llm-context.service.ts +21 -182
- package/src/browser/contrib/intelligent-completions/decoration/additions-deletions.decoration.ts +1 -1
- package/src/browser/contrib/intelligent-completions/diff-computer.ts +1 -1
- package/src/browser/contrib/terminal/terminal.feature.registry.ts +1 -1
- package/src/browser/index.ts +0 -8
- package/src/browser/layout/ai-layout.tsx +8 -12
- package/src/browser/layout/tabbar.view.tsx +23 -10
- package/src/browser/mcp/base-apply.service.ts +10 -30
- package/src/browser/mcp/mcp-server-proxy.service.ts +1 -6
- package/src/browser/mcp/mcp-server.feature.registry.ts +1 -6
- package/src/browser/mcp/tools/createNewFileWithText.ts +46 -17
- package/src/browser/mcp/tools/fileSearch.ts +5 -8
- package/src/browser/mcp/tools/getDiagnosticsByPath.ts +1 -1
- package/src/browser/mcp/tools/getOpenEditorFileDiagnostics.ts +1 -1
- package/src/browser/mcp/tools/grepSearch.ts +21 -32
- package/src/browser/mcp/tools/handlers/ListDir.ts +2 -2
- package/src/browser/mcp/tools/handlers/ReadFile.ts +2 -2
- package/src/browser/mcp/tools/handlers/RunCommand.ts +14 -21
- package/src/browser/mcp/tools/listDir.ts +12 -15
- package/src/browser/mcp/tools/runTerminalCmd.ts +1 -1
- package/src/browser/model/msg-history-manager.ts +2 -181
- package/src/browser/preferences/schema.ts +0 -5
- package/src/browser/types.ts +0 -18
- package/src/browser/widget/inline-stream-diff/live-preview.component.tsx +1 -0
- package/src/common/index.ts +1 -6
- package/src/common/llm-context.ts +0 -23
- package/src/common/model.ts +0 -1
- package/src/common/prompts/context-prompt-provider.ts +40 -55
- package/src/common/types.ts +0 -18
- package/src/common/utils.ts +1 -4
- package/src/node/base-language-model.ts +14 -11
- package/src/node/mcp/sumi-mcp-server.ts +2 -10
- package/src/node/mcp-server-manager-impl.ts +2 -17
- package/src/node/mcp-server.sse.ts +2 -1
- package/lib/browser/components/mention-input/mention-select.d.ts +0 -28
- package/lib/browser/components/mention-input/mention-select.d.ts.map +0 -1
- package/lib/browser/components/mention-input/mention-select.js +0 -136
- package/lib/browser/components/mention-input/mention-select.js.map +0 -1
- package/lib/browser/components/mention-input/mention-select.module.less +0 -297
- package/lib/browser/mcp/tools/handlers/CreateNewFileWithText.d.ts +0 -15
- package/lib/browser/mcp/tools/handlers/CreateNewFileWithText.d.ts.map +0 -1
- package/lib/browser/mcp/tools/handlers/CreateNewFileWithText.js +0 -53
- package/lib/browser/mcp/tools/handlers/CreateNewFileWithText.js.map +0 -1
- package/lib/browser/rules/rules.contribution.d.ts +0 -29
- package/lib/browser/rules/rules.contribution.d.ts.map +0 -1
- package/lib/browser/rules/rules.contribution.js +0 -94
- package/lib/browser/rules/rules.contribution.js.map +0 -1
- package/lib/browser/rules/rules.module.less +0 -175
- package/lib/browser/rules/rules.service.d.ts +0 -25
- package/lib/browser/rules/rules.service.d.ts.map +0 -1
- package/lib/browser/rules/rules.service.js +0 -180
- package/lib/browser/rules/rules.service.js.map +0 -1
- package/lib/browser/rules/rules.view.d.ts +0 -3
- package/lib/browser/rules/rules.view.d.ts.map +0 -1
- package/lib/browser/rules/rules.view.js +0 -76
- package/lib/browser/rules/rules.view.js.map +0 -1
- package/lib/common/image-compression.d.ts +0 -25
- package/lib/common/image-compression.d.ts.map +0 -1
- package/lib/common/image-compression.js +0 -153
- package/lib/common/image-compression.js.map +0 -1
- package/lib/common/mdc-parser.d.ts +0 -60
- package/lib/common/mdc-parser.d.ts.map +0 -1
- package/lib/common/mdc-parser.js +0 -246
- package/lib/common/mdc-parser.js.map +0 -1
- package/lib/common/prompts/system-prompt.d.ts +0 -2
- package/lib/common/prompts/system-prompt.d.ts.map +0 -1
- package/lib/common/prompts/system-prompt.js +0 -5
- package/lib/common/prompts/system-prompt.js.map +0 -1
- package/src/browser/components/mention-input/mention-select.module.less +0 -297
- package/src/browser/components/mention-input/mention-select.tsx +0 -256
- package/src/browser/mcp/tools/handlers/CreateNewFileWithText.ts +0 -49
- package/src/browser/rules/rules.contribution.ts +0 -105
- package/src/browser/rules/rules.module.less +0 -175
- package/src/browser/rules/rules.service.ts +0 -189
- package/src/browser/rules/rules.view.tsx +0 -127
- package/src/common/image-compression.ts +0 -174
- package/src/common/mdc-parser.ts +0 -295
- package/src/common/prompts/system-prompt.ts +0 -2
|
@@ -10,13 +10,7 @@ import {
|
|
|
10
10
|
useInjectable,
|
|
11
11
|
} from '@opensumi/ide-core-browser';
|
|
12
12
|
import { Icon, getIcon } from '@opensumi/ide-core-browser/lib/components';
|
|
13
|
-
import {
|
|
14
|
-
AINativeSettingSectionsId,
|
|
15
|
-
ChatFeatureRegistryToken,
|
|
16
|
-
RulesServiceToken,
|
|
17
|
-
URI,
|
|
18
|
-
localize,
|
|
19
|
-
} from '@opensumi/ide-core-common';
|
|
13
|
+
import { AINativeSettingSectionsId, ChatFeatureRegistryToken, URI, localize } from '@opensumi/ide-core-common';
|
|
20
14
|
import { CommandService } from '@opensumi/ide-core-common/lib/command';
|
|
21
15
|
import { defaultFilesWatcherExcludes } from '@opensumi/ide-core-common/lib/preferences/file-watch';
|
|
22
16
|
import { WorkbenchEditorService } from '@opensumi/ide-editor';
|
|
@@ -24,8 +18,6 @@ import { FileSearchServicePath, IFileSearchService } from '@opensumi/ide-file-se
|
|
|
24
18
|
import { OutlineCompositeTreeNode, OutlineTreeNode } from '@opensumi/ide-outline/lib/browser/outline-node.define';
|
|
25
19
|
import { OutlineTreeService } from '@opensumi/ide-outline/lib/browser/services/outline-tree.service';
|
|
26
20
|
import { IMessageService } from '@opensumi/ide-overlay';
|
|
27
|
-
import { IconType } from '@opensumi/ide-theme';
|
|
28
|
-
import { IconService } from '@opensumi/ide-theme/lib/browser';
|
|
29
21
|
import { IWorkspaceService } from '@opensumi/ide-workspace';
|
|
30
22
|
|
|
31
23
|
import { IChatInternalService } from '../../common';
|
|
@@ -33,8 +25,6 @@ import { LLMContextService } from '../../common/llm-context';
|
|
|
33
25
|
import { ChatFeatureRegistry } from '../chat/chat.feature.registry';
|
|
34
26
|
import { ChatInternalService } from '../chat/chat.internal.service';
|
|
35
27
|
import { MCPConfigCommands } from '../mcp/config/mcp-config.commands';
|
|
36
|
-
import { RulesCommands } from '../rules/rules.contribution';
|
|
37
|
-
import { RulesService } from '../rules/rules.service';
|
|
38
28
|
|
|
39
29
|
import styles from './components.module.less';
|
|
40
30
|
import { MentionInput } from './mention-input/mention-input';
|
|
@@ -82,21 +72,15 @@ export const ChatMentionInput = (props: IChatMentionInputProps) => {
|
|
|
82
72
|
const workspaceService = useInjectable<IWorkspaceService>(IWorkspaceService);
|
|
83
73
|
const editorService = useInjectable<WorkbenchEditorService>(WorkbenchEditorService);
|
|
84
74
|
const labelService = useInjectable<LabelService>(LabelService);
|
|
85
|
-
const iconService = useInjectable<IconService>(IconService);
|
|
86
75
|
const messageService = useInjectable<IMessageService>(IMessageService);
|
|
87
76
|
const chatFeatureRegistry = useInjectable<ChatFeatureRegistry>(ChatFeatureRegistryToken);
|
|
88
77
|
const outlineTreeService = useInjectable<OutlineTreeService>(OutlineTreeService);
|
|
89
78
|
const prevOutlineItems = useRef<MentionItem[]>([]);
|
|
90
79
|
const preferenceService = useInjectable<PreferenceService>(PreferenceService);
|
|
91
|
-
const rulesService = useInjectable<RulesService>(RulesServiceToken);
|
|
92
80
|
const handleShowMCPConfig = React.useCallback(() => {
|
|
93
81
|
commandService.executeCommand(MCPConfigCommands.OPEN_MCP_CONFIG.id);
|
|
94
82
|
}, [commandService]);
|
|
95
83
|
|
|
96
|
-
const handleShowRules = React.useCallback(() => {
|
|
97
|
-
commandService.executeCommand(RulesCommands.OPEN_RULES_FILE.id);
|
|
98
|
-
}, [commandService]);
|
|
99
|
-
|
|
100
84
|
useEffect(() => {
|
|
101
85
|
if (props.value !== value) {
|
|
102
86
|
setValue(props.value || '');
|
|
@@ -123,55 +107,6 @@ export const ChatMentionInput = (props: IChatMentionInputProps) => {
|
|
|
123
107
|
[outlineTreeService],
|
|
124
108
|
);
|
|
125
109
|
|
|
126
|
-
// 拆分目录路径为多个层级的辅助函数
|
|
127
|
-
const expandFolderPaths = async (folderPaths: string[], workspaceRootPath: string): Promise<MentionItem[]> => {
|
|
128
|
-
const expandedPaths = new Set<string>();
|
|
129
|
-
const workspaceUri = new URI(workspaceRootPath);
|
|
130
|
-
|
|
131
|
-
// 将所有路径展开为多层级
|
|
132
|
-
for (const folderPath of folderPaths) {
|
|
133
|
-
const uri = new URI(folderPath);
|
|
134
|
-
const relativePath = await workspaceService.asRelativePath(uri);
|
|
135
|
-
|
|
136
|
-
if (relativePath?.path) {
|
|
137
|
-
const pathSegments = relativePath.path.split('/').filter(Boolean);
|
|
138
|
-
|
|
139
|
-
// 为每个层级创建路径
|
|
140
|
-
for (let i = 0; i < pathSegments.length; i++) {
|
|
141
|
-
const segmentPath = pathSegments.slice(0, i + 1).join('/');
|
|
142
|
-
const fullPath = workspaceUri.resolve(segmentPath).codeUri.fsPath;
|
|
143
|
-
|
|
144
|
-
// 避免添加工作区本身或其上级目录
|
|
145
|
-
if (fullPath !== workspaceRootPath && !workspaceRootPath.startsWith(fullPath)) {
|
|
146
|
-
expandedPaths.add(fullPath);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
} else {
|
|
150
|
-
// 如果无法获取相对路径,直接添加(但仍要过滤工作区路径)
|
|
151
|
-
if (folderPath !== workspaceRootPath && !workspaceRootPath.startsWith(folderPath)) {
|
|
152
|
-
expandedPaths.add(folderPath);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// 转换为 MentionItem 格式
|
|
158
|
-
return Promise.all(
|
|
159
|
-
Array.from(expandedPaths).map(async (folderPath) => {
|
|
160
|
-
const uri = new URI(folderPath);
|
|
161
|
-
const relativePath = await workspaceService.asRelativePath(uri);
|
|
162
|
-
return {
|
|
163
|
-
id: uri.codeUri.fsPath,
|
|
164
|
-
type: MentionType.FOLDER,
|
|
165
|
-
text: uri.displayName,
|
|
166
|
-
value: uri.codeUri.fsPath,
|
|
167
|
-
description: relativePath?.root ? relativePath.path : '',
|
|
168
|
-
contextId: uri.codeUri.fsPath,
|
|
169
|
-
icon: getIcon('folder'),
|
|
170
|
-
};
|
|
171
|
-
}),
|
|
172
|
-
);
|
|
173
|
-
};
|
|
174
|
-
|
|
175
110
|
// 默认菜单项
|
|
176
111
|
const defaultMenuItems: MentionItem[] = [
|
|
177
112
|
{
|
|
@@ -279,7 +214,21 @@ export const ChatMentionInput = (props: IChatMentionInputProps) => {
|
|
|
279
214
|
.filter((folder) => folder !== workspaceService.workspace?.uri.toString() && folder !== '/'),
|
|
280
215
|
),
|
|
281
216
|
);
|
|
282
|
-
folders = await
|
|
217
|
+
folders = await Promise.all(
|
|
218
|
+
recentFolder.map(async (folder) => {
|
|
219
|
+
const uri = new URI(folder);
|
|
220
|
+
const relativePath = await workspaceService.asRelativePath(uri);
|
|
221
|
+
return {
|
|
222
|
+
id: uri.codeUri.fsPath,
|
|
223
|
+
type: MentionType.FOLDER,
|
|
224
|
+
text: uri.displayName,
|
|
225
|
+
value: uri.codeUri.fsPath,
|
|
226
|
+
description: relativePath?.root ? relativePath.path : '',
|
|
227
|
+
contextId: uri.codeUri.fsPath,
|
|
228
|
+
icon: getIcon('folder'),
|
|
229
|
+
};
|
|
230
|
+
}),
|
|
231
|
+
);
|
|
283
232
|
} else {
|
|
284
233
|
const rootUris = (await workspaceService.roots).map((root) => new URI(root.uri).codeUri.fsPath.toString());
|
|
285
234
|
const files = await searchService.find(searchText, {
|
|
@@ -297,11 +246,22 @@ export const ChatMentionInput = (props: IChatMentionInputProps) => {
|
|
|
297
246
|
.filter((folder) => folder !== workspaceService.workspace?.uri.toString()),
|
|
298
247
|
),
|
|
299
248
|
);
|
|
300
|
-
return
|
|
249
|
+
return Promise.all(
|
|
250
|
+
folders.map(async (folder) => {
|
|
251
|
+
const uri = new URI(folder);
|
|
252
|
+
return {
|
|
253
|
+
id: uri.codeUri.fsPath,
|
|
254
|
+
type: MentionType.FOLDER,
|
|
255
|
+
text: uri.displayName,
|
|
256
|
+
value: uri.codeUri.fsPath,
|
|
257
|
+
description: (await workspaceService.asRelativePath(uri.parent))?.path || '',
|
|
258
|
+
contextId: uri.codeUri.fsPath,
|
|
259
|
+
icon: getIcon('folder'),
|
|
260
|
+
};
|
|
261
|
+
}),
|
|
262
|
+
);
|
|
301
263
|
}
|
|
302
|
-
return folders
|
|
303
|
-
.filter(Boolean)
|
|
304
|
-
.filter((folder) => folder.id !== new URI(workspaceService.workspace?.uri).codeUri.fsPath);
|
|
264
|
+
return folders.filter((folder) => folder.id !== new URI(workspaceService.workspace?.uri).codeUri.fsPath);
|
|
305
265
|
},
|
|
306
266
|
},
|
|
307
267
|
{
|
|
@@ -352,111 +312,13 @@ export const ChatMentionInput = (props: IChatMentionInputProps) => {
|
|
|
352
312
|
}
|
|
353
313
|
},
|
|
354
314
|
},
|
|
355
|
-
{
|
|
356
|
-
id: MentionType.RULE,
|
|
357
|
-
type: MentionType.RULE,
|
|
358
|
-
text: 'Rule',
|
|
359
|
-
icon: getIcon('rules'),
|
|
360
|
-
getHighestLevelItems: () => [],
|
|
361
|
-
getItems: async (searchText: string) => {
|
|
362
|
-
const rules = await rulesService.projectRules;
|
|
363
|
-
const mappedRules = rules.map((rule) => {
|
|
364
|
-
const uri = new URI(rule.path);
|
|
365
|
-
return {
|
|
366
|
-
id: uri.codeUri.fsPath,
|
|
367
|
-
type: MentionType.RULE,
|
|
368
|
-
text: uri.displayName,
|
|
369
|
-
value: uri.codeUri.fsPath,
|
|
370
|
-
contextId: uri.codeUri.fsPath,
|
|
371
|
-
description: rule.description,
|
|
372
|
-
icon: getIcon('rules'),
|
|
373
|
-
};
|
|
374
|
-
});
|
|
375
|
-
|
|
376
|
-
if (!searchText) {
|
|
377
|
-
return mappedRules.slice(0, 10);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
const lowerSearchText = searchText.toLocaleLowerCase();
|
|
381
|
-
return mappedRules
|
|
382
|
-
.filter((rule) => rule.text.toLocaleLowerCase().includes(lowerSearchText))
|
|
383
|
-
.sort((a, b) => {
|
|
384
|
-
const aTextLower = a.text.toLocaleLowerCase();
|
|
385
|
-
const bTextLower = b.text.toLocaleLowerCase();
|
|
386
|
-
const aDescLower = a.description?.toLocaleLowerCase() || '';
|
|
387
|
-
const bDescLower = b.description?.toLocaleLowerCase() || '';
|
|
388
|
-
|
|
389
|
-
// 优先级:文件名包含搜索文本 > 描述包含搜索文本
|
|
390
|
-
const aTextMatch = aTextLower.includes(lowerSearchText);
|
|
391
|
-
const bTextMatch = bTextLower.includes(lowerSearchText);
|
|
392
|
-
const aDescMatch = aDescLower.includes(lowerSearchText);
|
|
393
|
-
const bDescMatch = bDescLower.includes(lowerSearchText);
|
|
394
|
-
|
|
395
|
-
if (aTextMatch && bTextMatch) {
|
|
396
|
-
// 如果都匹配文件名,按文件名字母序排序
|
|
397
|
-
return aTextLower.localeCompare(bTextLower);
|
|
398
|
-
}
|
|
399
|
-
if (aTextMatch && !bTextMatch) {
|
|
400
|
-
return -1;
|
|
401
|
-
}
|
|
402
|
-
if (!aTextMatch && bTextMatch) {
|
|
403
|
-
return 1;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
// 如果文件名都不匹配,比较描述
|
|
407
|
-
if (aDescMatch && bDescMatch) {
|
|
408
|
-
return aTextLower.localeCompare(bTextLower);
|
|
409
|
-
}
|
|
410
|
-
if (aDescMatch && !bDescMatch) {
|
|
411
|
-
return -1;
|
|
412
|
-
}
|
|
413
|
-
if (!aDescMatch && bDescMatch) {
|
|
414
|
-
return 1;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
// 如果都不匹配,按文件名字母序排序
|
|
418
|
-
return aTextLower.localeCompare(bTextLower);
|
|
419
|
-
})
|
|
420
|
-
.slice(0, 10);
|
|
421
|
-
},
|
|
422
|
-
},
|
|
423
315
|
];
|
|
316
|
+
|
|
424
317
|
const defaultMentionInputFooterOptions: FooterConfig = useMemo(
|
|
425
318
|
() => ({
|
|
426
319
|
modelOptions: [
|
|
427
|
-
{
|
|
428
|
-
|
|
429
|
-
label: 'Qwen 3',
|
|
430
|
-
iconClass: iconService.fromIcon(
|
|
431
|
-
'',
|
|
432
|
-
'https://img.alicdn.com/imgextra/i3/O1CN01LFMrZj28YrnrzeebY_!!6000000007945-55-tps-16-16.svg',
|
|
433
|
-
IconType.Background,
|
|
434
|
-
),
|
|
435
|
-
tags: ['思考链', '擅长代码'],
|
|
436
|
-
description: '高性能代码模型,支持思考链',
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
label: 'Claude 4 Sonnet',
|
|
440
|
-
value: 'claude_sonnet4',
|
|
441
|
-
iconClass: iconService.fromIcon(
|
|
442
|
-
'',
|
|
443
|
-
'https://img.alicdn.com/imgextra/i3/O1CN01p0mziz1Nsl40lp1HO_!!6000000001626-55-tps-92-65.svg',
|
|
444
|
-
IconType.Background,
|
|
445
|
-
),
|
|
446
|
-
tags: ['多模态', '长上下文理解', '思考模式'],
|
|
447
|
-
description: '高性能模型,支持多模态输入',
|
|
448
|
-
},
|
|
449
|
-
{
|
|
450
|
-
label: 'DeepSeek R1',
|
|
451
|
-
value: 'DeepSeek-R1-0528',
|
|
452
|
-
iconClass: iconService.fromIcon(
|
|
453
|
-
'',
|
|
454
|
-
'https://img.alicdn.com/imgextra/i3/O1CN01ClcK2w1JwdxcbAB3a_!!6000000001093-55-tps-30-30.svg',
|
|
455
|
-
IconType.Background,
|
|
456
|
-
),
|
|
457
|
-
tags: ['思考模式', '长上下文理解'],
|
|
458
|
-
description: '专业创作,支持多模态输入',
|
|
459
|
-
},
|
|
320
|
+
{ label: 'QWQ 32B', value: 'qwq-32b' },
|
|
321
|
+
{ label: 'DeepSeek R1', value: 'deepseek-r1' },
|
|
460
322
|
],
|
|
461
323
|
defaultModel:
|
|
462
324
|
props.sessionModelId || preferenceService.get<string>(AINativeSettingSectionsId.ModelID) || 'deepseek-r1',
|
|
@@ -468,13 +330,6 @@ export const ChatMentionInput = (props: IChatMentionInputProps) => {
|
|
|
468
330
|
onClick: handleShowMCPConfig,
|
|
469
331
|
position: FooterButtonPosition.LEFT,
|
|
470
332
|
},
|
|
471
|
-
{
|
|
472
|
-
id: 'rules',
|
|
473
|
-
icon: 'rules',
|
|
474
|
-
title: 'Rules',
|
|
475
|
-
onClick: handleShowRules,
|
|
476
|
-
position: FooterButtonPosition.LEFT,
|
|
477
|
-
},
|
|
478
333
|
{
|
|
479
334
|
id: 'upload-image',
|
|
480
335
|
icon: 'image',
|
|
@@ -497,7 +352,7 @@ export const ChatMentionInput = (props: IChatMentionInputProps) => {
|
|
|
497
352
|
showModelSelector: true,
|
|
498
353
|
disableModelSelector: props.disableModelSelector,
|
|
499
354
|
}),
|
|
500
|
-
[
|
|
355
|
+
[handleShowMCPConfig, props.disableModelSelector, props.sessionModelId],
|
|
501
356
|
);
|
|
502
357
|
|
|
503
358
|
const handleStop = useCallback(() => {
|
|
@@ -342,10 +342,10 @@ export const ChatReply = (props: IChatReplyProps) => {
|
|
|
342
342
|
}}
|
|
343
343
|
>
|
|
344
344
|
<Icon iconClass='codicon codicon-sparkle' />
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
345
|
+
{localize('aiNative.chat.thinking')}
|
|
346
|
+
{isThinking ? (
|
|
347
|
+
<Loading />
|
|
348
|
+
) : collapseThinkingIndexSet.has(index) ? (
|
|
349
349
|
<Icon iconClass='codicon codicon-chevron-right' />
|
|
350
350
|
) : (
|
|
351
351
|
<Icon iconClass='codicon codicon-chevron-down' />
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: center;
|
|
25
25
|
font-weight: 500;
|
|
26
|
-
width: calc(100% - 20px);
|
|
27
26
|
color: var(--design-text-foreground);
|
|
28
27
|
}
|
|
29
28
|
|
|
@@ -35,30 +34,6 @@
|
|
|
35
34
|
margin-left: 5px;
|
|
36
35
|
font-size: 11px;
|
|
37
36
|
color: var(--descriptionForeground);
|
|
38
|
-
width: calc(100% - 36px);
|
|
39
|
-
display: flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
justify-content: flex-start;
|
|
42
|
-
|
|
43
|
-
.tool_prefix {
|
|
44
|
-
color: var(--design-text-placeholderForeground);
|
|
45
|
-
margin-right: 10px;
|
|
46
|
-
flex-shrink: 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.tool_name {
|
|
50
|
-
opacity: 0.8;
|
|
51
|
-
font-size: 9px;
|
|
52
|
-
flex: 1;
|
|
53
|
-
text-overflow: ellipsis;
|
|
54
|
-
direction: rtl;
|
|
55
|
-
unicode-bidi: plaintext;
|
|
56
|
-
overflow: hidden;
|
|
57
|
-
white-space: nowrap;
|
|
58
|
-
display: inline-block;
|
|
59
|
-
margin-right: 10px;
|
|
60
|
-
text-align: left;
|
|
61
|
-
}
|
|
62
37
|
}
|
|
63
38
|
|
|
64
39
|
.expand_icon {
|
|
@@ -7,7 +7,6 @@ import { Loading } from '@opensumi/ide-core-browser/lib/components/ai-native';
|
|
|
7
7
|
import { IChatToolContent, uuid } from '@opensumi/ide-core-common';
|
|
8
8
|
import { localize } from '@opensumi/ide-core-common/lib/localize';
|
|
9
9
|
|
|
10
|
-
import { TOOL_NAME_SEPARATOR } from '../../common/utils';
|
|
11
10
|
import { IMCPServerRegistry, TokenMCPServerRegistry } from '../types';
|
|
12
11
|
|
|
13
12
|
import { CodeEditorWithHighlight } from './ChatEditor';
|
|
@@ -22,9 +21,7 @@ export const ChatToolRender = (props: { value: IChatToolContent['content']; mess
|
|
|
22
21
|
if (!value || !value.function || !value.id) {
|
|
23
22
|
return null;
|
|
24
23
|
}
|
|
25
|
-
const
|
|
26
|
-
const parts = toolName.split(TOOL_NAME_SEPARATOR);
|
|
27
|
-
const label = parts.length >= 3 ? parts[2] : toolName;
|
|
24
|
+
const label = mcpServerFeatureRegistry.getMCPTool(value.function.name)?.label || value.function.name;
|
|
28
25
|
|
|
29
26
|
const ToolComponent = mcpServerFeatureRegistry.getToolComponent(value.function.name);
|
|
30
27
|
|
|
@@ -75,12 +72,7 @@ export const ChatToolRender = (props: { value: IChatToolContent['content']; mess
|
|
|
75
72
|
<div className={styles.tool_name}>
|
|
76
73
|
<Icon iconClass={`codicon codicon-chevron-${isExpanded ? 'down' : 'right'}`} />
|
|
77
74
|
<Icon size='small' iconClass={cls('codicon codicon-tools', styles.tool_icon)} />
|
|
78
|
-
<span className={styles.tool_label}>
|
|
79
|
-
<span className={styles.tool_prefix}>Called MCP Tool</span>
|
|
80
|
-
<span className={styles.tool_name} title={label}>
|
|
81
|
-
{label}
|
|
82
|
-
</span>
|
|
83
|
-
</span>
|
|
75
|
+
<span className={styles.tool_label}>{label}</span>
|
|
84
76
|
</div>
|
|
85
77
|
{value.state && (
|
|
86
78
|
<div className={styles.tool_state}>
|
|
@@ -524,6 +524,7 @@
|
|
|
524
524
|
display: flex;
|
|
525
525
|
font-size: 11px;
|
|
526
526
|
align-items: center;
|
|
527
|
+
min-width: 150px;
|
|
527
528
|
}
|
|
528
529
|
|
|
529
530
|
.mcp_desc {
|
|
@@ -584,6 +585,7 @@
|
|
|
584
585
|
.reasoning_content {
|
|
585
586
|
padding: 8px 12px;
|
|
586
587
|
margin-top: 4px;
|
|
588
|
+
border-left: 2px solid var(--descriptionForeground);
|
|
587
589
|
color: var(--descriptionForeground);
|
|
588
590
|
background: var(--design-block-background);
|
|
589
591
|
border-radius: 4px;
|
|
@@ -595,8 +597,8 @@
|
|
|
595
597
|
align-items: center;
|
|
596
598
|
padding: 0 4px;
|
|
597
599
|
margin: 0 2px;
|
|
598
|
-
background
|
|
599
|
-
color: var(--
|
|
600
|
+
background: var(--badge-background);
|
|
601
|
+
color: var(--badge-foreground);
|
|
600
602
|
border-radius: 3px;
|
|
601
603
|
vertical-align: middle;
|
|
602
604
|
font-size: 12px;
|
|
@@ -607,6 +609,10 @@
|
|
|
607
609
|
margin-right: 3px;
|
|
608
610
|
}
|
|
609
611
|
}
|
|
612
|
+
&:hover {
|
|
613
|
+
background-color: var(--chat-slashCommandBackground);
|
|
614
|
+
color: var(--chat-slashCommandForeground);
|
|
615
|
+
}
|
|
610
616
|
}
|
|
611
617
|
|
|
612
618
|
.attachment_text {
|
|
@@ -614,13 +620,6 @@
|
|
|
614
620
|
vertical-align: middle;
|
|
615
621
|
font-size: 12px;
|
|
616
622
|
word-break: break-all;
|
|
617
|
-
max-width: 100px;
|
|
618
|
-
text-overflow: ellipsis;
|
|
619
|
-
direction: rtl;
|
|
620
|
-
unicode-bidi: plaintext;
|
|
621
|
-
overflow: hidden;
|
|
622
|
-
white-space: nowrap;
|
|
623
|
-
display: inline-block;
|
|
624
623
|
}
|
|
625
624
|
|
|
626
625
|
.thumbnail_container {
|
|
@@ -673,31 +672,3 @@
|
|
|
673
672
|
border-radius: 3px;
|
|
674
673
|
overflow: hidden;
|
|
675
674
|
}
|
|
676
|
-
|
|
677
|
-
.shiny_text {
|
|
678
|
-
color: #b5b5b5a4; /* Adjust this color to change intensity/style */
|
|
679
|
-
background: linear-gradient(
|
|
680
|
-
120deg,
|
|
681
|
-
rgba(255, 255, 255, 0) 40%,
|
|
682
|
-
rgba(255, 255, 255, 0.8) 50%,
|
|
683
|
-
rgba(255, 255, 255, 0) 60%
|
|
684
|
-
);
|
|
685
|
-
background-size: 200% 100%;
|
|
686
|
-
-webkit-background-clip: text;
|
|
687
|
-
background-clip: text;
|
|
688
|
-
display: inline-block;
|
|
689
|
-
animation: shine 5s linear infinite;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
@keyframes shine {
|
|
693
|
-
0% {
|
|
694
|
-
background-position: 100%;
|
|
695
|
-
}
|
|
696
|
-
100% {
|
|
697
|
-
background-position: -100%;
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
.shiny_text.disabled {
|
|
702
|
-
animation: none;
|
|
703
|
-
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
.model_selector {
|
|
8
8
|
margin-right: 5px;
|
|
9
|
+
min-width: 150px;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
.editor_area {
|
|
@@ -28,9 +29,7 @@
|
|
|
28
29
|
word-break: break-word;
|
|
29
30
|
|
|
30
31
|
.mention_tag {
|
|
31
|
-
height: 20px;
|
|
32
32
|
margin: 0 2px;
|
|
33
|
-
margin-top: -3px;
|
|
34
33
|
vertical-align: middle;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
@@ -96,13 +95,11 @@
|
|
|
96
95
|
.stop_logo {
|
|
97
96
|
background-color: var(--badge-background);
|
|
98
97
|
color: var(--badge-foreground);
|
|
99
|
-
|
|
100
98
|
.stop_logo_icon {
|
|
101
99
|
line-height: 16px;
|
|
102
100
|
color: var(--kt-dangerButton-background);
|
|
103
101
|
}
|
|
104
102
|
}
|
|
105
|
-
|
|
106
103
|
.send_logo {
|
|
107
104
|
&:hover {
|
|
108
105
|
background-color: var(--kt-primaryButton-background);
|
|
@@ -143,38 +140,31 @@
|
|
|
143
140
|
display: flex;
|
|
144
141
|
justify-content: center;
|
|
145
142
|
}
|
|
146
|
-
|
|
147
143
|
.context_container {
|
|
148
144
|
display: flex;
|
|
149
145
|
align-items: center;
|
|
150
146
|
justify-content: center;
|
|
151
147
|
cursor: pointer;
|
|
152
|
-
|
|
153
148
|
.context_icon {
|
|
154
149
|
flex-grow: 0;
|
|
155
150
|
flex-shrink: 0;
|
|
156
|
-
|
|
157
151
|
:global(.kt-icon) {
|
|
158
152
|
font-size: 12px;
|
|
159
153
|
}
|
|
160
|
-
|
|
161
154
|
:global(.kticon-close) {
|
|
162
155
|
display: none;
|
|
163
156
|
}
|
|
164
157
|
}
|
|
165
|
-
|
|
166
158
|
&:hover {
|
|
167
159
|
.context_icon {
|
|
168
160
|
:global(.kticon-close) {
|
|
169
161
|
display: block;
|
|
170
162
|
}
|
|
171
|
-
|
|
172
163
|
:global(.kticon-out-link) {
|
|
173
164
|
display: none;
|
|
174
165
|
}
|
|
175
166
|
}
|
|
176
167
|
}
|
|
177
|
-
|
|
178
168
|
.context_description {
|
|
179
169
|
flex: 1;
|
|
180
170
|
margin-left: 3px;
|
|
@@ -264,7 +254,6 @@
|
|
|
264
254
|
display: inline;
|
|
265
255
|
flex: 1;
|
|
266
256
|
direction: rtl;
|
|
267
|
-
unicode-bidi: plaintext;
|
|
268
257
|
text-overflow: ellipsis;
|
|
269
258
|
overflow: hidden;
|
|
270
259
|
white-space: nowrap;
|
|
@@ -352,10 +341,6 @@
|
|
|
352
341
|
justify-content: center;
|
|
353
342
|
margin-right: 3px;
|
|
354
343
|
font-size: 12px;
|
|
355
|
-
&::before {
|
|
356
|
-
font-size: 12px;
|
|
357
|
-
background-size: 12px !important;
|
|
358
|
-
}
|
|
359
344
|
}
|
|
360
345
|
|
|
361
346
|
.empty_state {
|
|
@@ -419,152 +404,3 @@
|
|
|
419
404
|
color: #666;
|
|
420
405
|
font-style: italic;
|
|
421
406
|
}
|
|
422
|
-
|
|
423
|
-
.context_preview_container {
|
|
424
|
-
background-color: var(--kt-editorWidget-background);
|
|
425
|
-
border: 1px solid var(--kt-editorWidget-border);
|
|
426
|
-
margin: 0 16px;
|
|
427
|
-
animation: slideIn 0.3s ease-out;
|
|
428
|
-
display: flex;
|
|
429
|
-
flex-wrap: wrap;
|
|
430
|
-
gap: 4px;
|
|
431
|
-
align-items: flex-start;
|
|
432
|
-
margin-bottom: 3px;
|
|
433
|
-
width: calc(100% - 32px);
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.context_preview_title {
|
|
437
|
-
cursor: pointer;
|
|
438
|
-
display: flex;
|
|
439
|
-
align-items: center;
|
|
440
|
-
justify-content: center;
|
|
441
|
-
padding: 2px 3px;
|
|
442
|
-
height: 18px;
|
|
443
|
-
width: auto;
|
|
444
|
-
box-sizing: border-box;
|
|
445
|
-
border-radius: 4px;
|
|
446
|
-
border: 1px solid color-mix(in srgb, var(--editor-foreground) 10%, transparent);
|
|
447
|
-
outline: none;
|
|
448
|
-
flex-shrink: 0;
|
|
449
|
-
color: var(--descriptionForeground);
|
|
450
|
-
font-size: 11px;
|
|
451
|
-
|
|
452
|
-
&::before {
|
|
453
|
-
content: '@';
|
|
454
|
-
margin-right: 4px;
|
|
455
|
-
}
|
|
456
|
-
&.has_context {
|
|
457
|
-
width: 18px;
|
|
458
|
-
&::before {
|
|
459
|
-
content: '@';
|
|
460
|
-
margin-right: 0;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
&:hover {
|
|
465
|
-
color: var(--badge-foreground);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
.context_preview_item {
|
|
470
|
-
cursor: pointer;
|
|
471
|
-
display: flex;
|
|
472
|
-
align-items: center;
|
|
473
|
-
justify-content: flex-start;
|
|
474
|
-
padding: 2px 4px;
|
|
475
|
-
height: 18px;
|
|
476
|
-
width: auto;
|
|
477
|
-
min-width: fit-content;
|
|
478
|
-
max-width: 300px;
|
|
479
|
-
box-sizing: border-box;
|
|
480
|
-
border-radius: 4px;
|
|
481
|
-
border: 1px solid color-mix(in srgb, var(--badge-background) 30%, transparent);
|
|
482
|
-
outline: none;
|
|
483
|
-
flex: 0 1 auto;
|
|
484
|
-
margin-left: 3px;
|
|
485
|
-
|
|
486
|
-
.icon {
|
|
487
|
-
width: 12px !important;
|
|
488
|
-
height: 12px !important;
|
|
489
|
-
line-height: 12px !important;
|
|
490
|
-
margin-right: 2px;
|
|
491
|
-
flex-shrink: 0;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.close_icon {
|
|
495
|
-
margin-right: 2px;
|
|
496
|
-
display: none !important;
|
|
497
|
-
width: 12px !important;
|
|
498
|
-
height: 12px !important;
|
|
499
|
-
line-height: 12px !important;
|
|
500
|
-
flex-shrink: 0;
|
|
501
|
-
opacity: 0.8;
|
|
502
|
-
|
|
503
|
-
&:hover {
|
|
504
|
-
opacity: 1;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
&:hover {
|
|
509
|
-
opacity: 1;
|
|
510
|
-
.icon {
|
|
511
|
-
display: none;
|
|
512
|
-
}
|
|
513
|
-
.close_icon {
|
|
514
|
-
display: inline-block !important;
|
|
515
|
-
font-size: 12px !important;
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
.context_preview_item_icon {
|
|
521
|
-
display: flex;
|
|
522
|
-
align-items: center;
|
|
523
|
-
justify-content: center;
|
|
524
|
-
flex-shrink: 0;
|
|
525
|
-
opacity: 0.8;
|
|
526
|
-
&::before {
|
|
527
|
-
background-position: 2px !important;
|
|
528
|
-
font-size: 12px;
|
|
529
|
-
background-size: 11px !important;
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
.context_preview_item_text {
|
|
534
|
-
flex: 1;
|
|
535
|
-
overflow: hidden;
|
|
536
|
-
text-overflow: ellipsis;
|
|
537
|
-
color: var(--descriptionForeground);
|
|
538
|
-
white-space: nowrap;
|
|
539
|
-
font-weight: 400;
|
|
540
|
-
line-height: 1.2;
|
|
541
|
-
font-size: 11px;
|
|
542
|
-
max-width: 200px;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
.context_preview_item_remove {
|
|
546
|
-
cursor: pointer;
|
|
547
|
-
opacity: 0.5;
|
|
548
|
-
font-size: 12px;
|
|
549
|
-
margin-left: 4px;
|
|
550
|
-
padding: 2px;
|
|
551
|
-
border-radius: 50%;
|
|
552
|
-
display: flex;
|
|
553
|
-
align-items: center;
|
|
554
|
-
justify-content: center;
|
|
555
|
-
flex-shrink: 0;
|
|
556
|
-
transition: all 0.2s ease;
|
|
557
|
-
width: 16px;
|
|
558
|
-
height: 16px;
|
|
559
|
-
|
|
560
|
-
&:hover {
|
|
561
|
-
opacity: 1;
|
|
562
|
-
background-color: var(--kt-dangerButton-background);
|
|
563
|
-
color: var(--kt-dangerButton-foreground);
|
|
564
|
-
transform: scale(1.1);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
&:active {
|
|
568
|
-
transform: scale(0.9);
|
|
569
|
-
}
|
|
570
|
-
}
|